1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 1 (PROP) F 2 2 INPUT SOURCE.OPSYS:PROP 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 3 4 5 6 * TTTTTTT OOOOO PPPPPP L 7 * T O O P P L 8 * T O O P P L 9 * T O O PPPPPP L 10 * T O O P L 11 * T O O P L 12 * T OOOOO P LLLLLL 13 14 15 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 2 F 0 17 18 ********************************************************************************** 19 * * 20 * Revisions Date * 21 * --------- ---- * 22 * 1.2 8311 27 Oct 83 * 23 * New field in DISKCB, DCBVOLSIZE * 24 * * 25 * 1.3 8401 19 Jan 84 * 26 * Changes to FTCHITEM routine to allow file punc * 27 * to terminate a number * 28 * * 29 * 1.4 8402 28 Feb 84 * 30 * Bug fix. * 31 * * 32 * 1.5 8407 02 Jul 84 * 33 * Changes to PREPOUT to print dates. MH * 34 * * 35 * 1.6 8412 05 Dec 84 * 36 * Addition of GETDATE to OPLVECTORS and TOPL. MH * 37 * * 38 * 1.7 8511 20 Nov 85 * 39 * Bug fix in WRITECHAR. MH * 40 * * 41 * A8512 12 Dec 85 * 42 * Will talk to operator's terminal. * 43 * * 44 * A8607 11 Jul 86 * 45 * Reassembled to get new SALON. * 46 * Clear CIA input buffer to prevent parity errors. * 47 * * 48 * A8608 15 Aug 86 * 49 * Mods to allow multiple CPUs to be used. Other * 50 * minor. RC * 51 * * 52 * A8611 26 Nov 86 * 53 * Fixes to front panel displays to not alarm. RC * 54 * * 55 * A8612 18 Dec 86 * 56 * Modified to share common routines with OPL. Misc * 57 * bugs fixed in the process. RC * 58 * A8811 02 Nov 88 * 59 * Reassembled to get new SALON with fixes for disks * 60 * using the SMD-ESDI adaptor. Other minor changes. RC * 61 * A8903 22 Mar 89 * 62 * Reassembled to get new SALON with fixes for segment * 63 * error correction. RC * 64 * A9306 30 Jun 92 * 65 * Reassembled to get new OPENDISK with fixes for * 66 * uninitialized memory. RC * 67 * * 68 ********************************************************************************** 69 70 BLOCK 71 72 NOLIST CREF 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 3 (MACHDEFS) F 3 73 INPUT SOURCE.OPSYS:MACHDEFS 74 INPUT SOURCE.OPSYS:IODEFS 75 INPUT SOURCE.OPSYS:HALTDEFS 76 INPUT SOURCE.OPSYS:DISKDEFS 77 INPUT SOURCE.OPSYS:PAGEDEFS 78 INPUT SOURCE.OPSYS:IBLOCK 79 LIST CREF 80 INPUT BOOT.OPSYS:DISKCB 81 INPUT BOOT.OPSYS:TAPECB 82 INPUT BOOT.OPSYS:TAPEVECT 83 INPUT BOOT.OPSYS:OPLVECTORS 84 INPUT BOOT.OPSYS:ERRLOGBLK 85 INPUT .SYS:MACROS 1 * Including MACROS.ASSEM Version A8607. 86 87 INITPSECT 02000,01C00,PROGRAM 88 89 START BEGINNING 90 START2 MULTICPUS 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 4 F 0 92 93 ********************************************************************************** 94 * * 95 * This program is loaded onto the machine by TAPEBOOT * 96 * when selected by one of the front panel switch * 97 * combinations. This program communicates to the operator * 98 * via the SSU terminal, or through the first available port * 99 * on the CIA, depending on whether the machine was booted * 100 * from the operators CP or the RFP, and provides for the * 101 * loading of offline utility routines. This also provides * 102 * output routines for the utility programs. * 103 * If the boot operation was from the operators control * 104 * panel, we go directly to the indicated program. This * 105 * prevents customers from getting to magic stuff like * 106 * PEEK&POKE, etc. See the table of OFFNAMES to find out * 107 * what will be run. * 108 * * 109 * To invoke an offline routine, the name of the CODE * 110 * file is just typed. Only routines which exist in the * 111 * special tape boot area of a system backup tape can be * 112 * booted in this manner. Note especially the case where * 113 * a taperecovery has been run. The system tape (normally * 114 * the first tape of the set recovered) must be re-installed * 115 * so that the tape boot area is accessable. Before one can * 116 * access a disk they must specify a disk and open it with * 117 * the "DISK" command. * 118 * * 119 ********************************************************************************** 120 121 INPUT OPLDOC 1 2 ********************************************************************************** 3 * * 4 * OPL provides an offline working environment. This is * 5 * accomplished by a number of subroutines which can be accessed * 6 * indirectly via a jump table. OPL furnishes some of these * 7 * subroutines and the rest are provided by DISKBOOT. Any program * 8 * running through OPL may access these subroutines. * 9 * TOPL provides the same support subroutines as OPL but * 10 * is read from tape. This provides a way to run utility programs * 11 * when there is no disk present from which to get them. TOPL * 12 * also provides some tape manipulation subroutines. TOPL can * 13 * only run programs that have been written to tape by BACKUP or * 14 * DISKTOTAPE in the TapeBootMake portion of the BACKUP operation. * 15 * See the TAPEBOOTMAKE routine to see what programs are written * 16 * to backup tapes. * 17 * ONPL is provided so that utilities written for the * 18 * offline environment can also be run online with little or no * 19 * modification. ONPL sets up many of the same subroutines that * 20 * OPL and DISKBOOT provide. However there are instructions that * 21 * may be used in the offline enviroment that are reserved only * 22 * for use by the operating system when running online. Any * 23 * program executing one of these monitor instructions while * 24 * running under ONPL will halt with an "undefined opcode" * 25 * error. * 26 * * 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 5 (OPLDOC) F 15 27 * DISKBOOT is loaded from the disk by PROMBOOT onto virtual * 28 * page 4 (physical page 1). DISKBOOT then loads OPL starting at * 29 * virtual page 7 (physical page 5). (OPL uses virtual page 7 * 30 * for variables.) OPL will then load a user requested program * 31 * starting at virtual (and physical) page 12 and transfer * 32 * control to that code file's secondary start address. * 33 * * 34 * * 35 * MEMORY MAP * 36 * * 37 * VPN MA VIRTUAL PAGE PHYSICAL LOCATION * 38 * --- -- ------------ ----------------- * 39 * 0 00000 PROM BOOT PAGE 0 * 40 * 1 00400 unmapped * 41 * 2 00800 window 1 PAGE 2 * 42 * 3 00C00 window 2 PAGE 3 * 43 * 4 01000 DISKBOOT PAGE 1 * 44 * 5 01400 window 4 PAGE 4 * 45 * 6 01800 CIX --- * 46 * 7 01C00 OPL PAGE 5 * 47 * 8 02000 " PAGE 6 * 48 * 9 02400 " PAGE 7 * 49 * 10 02800 " PAGE 8 * 50 * 11 02C00 unmapped * 51 * 12 03000 utility program PAGE 12 * 52 * * 53 * * 54 * The jump table used to access subroutines provided by OPL * 55 * is defined in OPLVECTORS. This jump table is placed in memory * 56 * at locations 013E0:013FF (at the end of DISKBOOT). The first * 57 * 16 locations are initialized by DISKBOOT and contain the * 58 * addresses of subroutines found in DISKBOOT, the second 16 * 59 * locations are set up by OPL and point to subroutines which OPL * 60 * provides. * 61 * DISKBOOT uses some of its vector locations to contain * 62 * pointers used for memory management. These include pointers to * 63 * words containing the page map values for windows 1 and 2, a * 64 * pointer to available free space in window 4, and a pointer to * 65 * a word which contains a page map value for some page in the * 66 * memory box being used. * 67 * * 68 * * 69 * VECTOR LOCATIONS PROVIDED BY DISKBOOT * 70 * * 71 * ADDRESS NAME DESCRIPTION * 72 * ------- ---- ----------- * 73 * 013E0 VREAD disk read routine * 74 * 013E1 VWRITE disk write routine * 75 * 013E2 VSRCHDIR search account file directory * 76 * 013E3 VDISPLAY front panel displayer * 77 * 013E4 VDISKCB pointer to boot disk control block * 78 * 013E5 VPF4SSU page file for SSU (0 if none) * 79 * 013E6 VMEMPF page file for a page in this memory * 80 * 013E7 VSLOTWRU pointer to array of WRU reponses * 81 * 013E8 VPFWNDO1 pointer to page file for window 1 * 82 * 013E9 VPFWNDO2 pointer to page file for window 2 * 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 6 (OPLDOC) F 15 83 * 013EA VERRLOGPTR next entry in error log buffer * 84 * 013EB VOPENDISK initialize a disk control block * 85 * 013EC VCLOSEDISK close a disk control block * 86 * 013ED VMEMSPACE pointer to unused space in window 4 * 87 * 013EE VSRCHDIRSN search directory for serial number * 88 * 013EF undefined * 89 * * 90 * * 91 * VECTOR LOCATIONS PROVIDED BY OPL * 92 * * 93 * ADDRESS NAME DESCRIPTION * 94 * ------- ---- ----------- * 95 * 013F0 VDONEEXIT address of re-entry point for OPL * 96 * 013F1 VREADCHAR read one character from terminal * 97 * 013F2 VWRITECHAR write one character to terminal * 98 * 013F3 VREADLINE read one line from terminal * 99 * 013F4 VWRITELINE write one line to terminal * 100 * 013F5 VFETCHITEM fetch an input item * 101 * 013F6 VFETCHFNM fetch a file name * 102 * 013F7 VSCANOVER scan over non-item characters * 103 * 013F8 VFETCHITMH fetch item with hex number assumed * 104 * 013F9 VPREPOUT output formatting routine * 105 * 013FA VERRLOGPT1 beginning of error log buffer * 106 * 013FB VGETDATE get the system date and time * 107 * 013FC VEXTRACPUS address where extra (more than one) CPUs spin * 108 * 013FD undefined * 109 * 013FE undefined * 110 * 013FF undefined * 111 * * 112 * For more information on routines and pointers provided * 113 * by these vector locations look in the listings of the program * 114 * (OPL or DISKBOOT) which sets up the vector. * 115 * A 64-word stack is provided by OPL and may be used by * 116 * programs being run under OPL. There are also a number of words * 117 * defined by IBLOCK that will remain present. These include WRU * 118 * information for all of the slots on the system and the front * 119 * panel switches at boot time. See IBLOCK for more information * 120 * on these. * 121 * * 122 * TOPL provides most of the vector locations also provided * 123 * by OPL and DISKBOOT, plus a set of vector locations for tape * 124 * manipulation subroutines. TOPL does not initialize a system * 125 * disk, so programs running under TOPL should not assume that * 126 * VDISKCB points to an initialized disk control block. However, * 127 * issuing the "DISK" command to TOPL will initialize the disk * 128 * control block, and a program running under TOPL can initialize * 129 * the disk control block with the OPENDISK subroutine. TOPL sets * 130 * up a 64-word stack pointed to by register R6. * 131 * * 132 * * 133 * VECTOR LOCATIONS PROVIDED BY TOPL * 134 * * 135 * ADDRESS NAME DESCRIPTION * 136 * ------- ---- ----------- * 137 * 013D0 VTAPECB pointer to tape control block * 138 * 013D1 VOPENTAPE tape open routine * 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 7 (OPLDOC) F 15 139 * 013D2 VTAPELOAD tape file load routine * 140 * 013D3 VREADTAPE tape read routine * 141 * 013D4 VREWIND tape rewind routine * 142 * 013D5 VSEFF tape search end of file forward routine * 143 * 013D6 VSEFB tape search end of file backwards routine * 144 * 013D7 VTAPEFUNC general tape function routine * 145 * 013D8 VSETTAPE tape track select routine * 146 * 013D9 VPPUIWAIT wait for interrupt routine * 147 * 013DA VCHECKHDR tape header checksum routine * 148 * 013DB VCHECKDATA tape data checksum routine * 149 * 013DC undefined * 150 * 013DD undefined * 151 * 013DE undefined * 152 * 013DF undefined * 153 * * 154 * 013E0 VREAD disk read routine * 155 * 013E1 VWRITE disk write routine * 156 * 013E2 VSRCHDIR search account file directory * 157 * 013E3 VDISPLAY front panel displayer * 158 * 013E4 VDISKCB pointer to disk control block (unitialized) * 159 * 013E5 VPF4SSU page file for SSU (0 if none) * 160 * 013E6 VMEMPF page file for a page in this memory * 161 * 013E7 VSLOTWRU pointer to array of WRU reponses * 162 * 013E8 VPFWNDO1 pointer to page file for window 1 * 163 * 013E9 VPFWNDO2 pointer to page file for window 2 * 164 * 013EA VERRLOGPTR next entry in error log buffer * 165 * 013EB VOPENDISK initialize a disk control block * 166 * 013EC VCLOSEDISK close a disk control block * 167 * 013ED VMEMSPACE pointer to unused space in window 4 * 168 * 013EE VSRCHDIRSN search directory for serial number * 169 * 013EF undefined * 170 * * 171 * 013F0 VDONEEXIT address of re-entry point for OPL * 172 * 013F1 VREADCHAR read one character from terminal * 173 * 013F2 VWRITECHAR write one character to terminal * 174 * 013F3 VREADLINE read one line from terminal * 175 * 013F4 VWRITELINE write one line to terminal * 176 * 013F5 VFETCHITEM fetch an input item * 177 * 013F6 VFETCHFNM fetch a file name * 178 * 013F7 VSCANOVER scan over non-item characters * 179 * 013F8 VFETCHITMH fetch item with hex number assumed * 180 * 013F9 VPREPOUT output formatting routine * 181 * 013FA VERRLOGPT1 beginning of error log buffer * 182 * 013FB VGETDATE get the system date and time * 183 * 013FC VEXTRACPUS address where extra (more than one) CPUs spin * 184 * 013FD undefined * 185 * 013FE undefined * 186 * 013FF undefined * 187 * * 188 * * 189 * ONPL cannot provide all of the vector locations provided by * 190 * OPL and DISKBOOT. The locations it does provide perform the * 191 * same functions provided by OPL in those locations. The calling * 192 * sequence for ONPL's subroutines remain identical. ONPL starts * 193 * programs running under it at the primary transfer address. * 194 * * 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 8 (OPLDOC) F 15 195 * VECTOR LOCATIONS PROVIDED BY ONPL * 196 * * 197 * ADDRESS NAME DESCRIPTION * 198 * ------- ---- ----------- * 199 * 013E0 VREAD disk read routine * 200 * 013E1 VWRITE disk write routine * 201 * 013E2 VSRCHDIR search account file directory * 202 * 013E3 VDISPLAY front panel displayer (dummy routine) * 203 * 013E4 VDISKCB pointer to boot disk control block * 204 * 013E5 undefined * 205 * 013E6 undefined * 206 * 013E7 undefined * 207 * 013E8 VPFWNDO1 pointer to pointer for window 1 * 208 * 013E9 VPFWNDO2 pointer to pointer for window 2 * 209 * 013EA undefined * 210 * 013EB VOPENDISK initialize a disk control block * 211 * 013EC VCLOSEDISK close a disk control block * 212 * 013ED undefined * 213 * 013EE VSRCHDIRSN search directory for serial number * 214 * 013EF undefined * 215 * * 216 * 013F0 VDONEEXIT address of re-entry point for OPL * 217 * 013F1 VREADCHAR read one character from terminal * 218 * 013F2 VWRITECHAR write one character to terminal * 219 * 013F3 VREADLINE read one line from terminal * 220 * 013F4 VWRITELINE write one line to terminal * 221 * 013F5 VFETCHITEM fetch an input item * 222 * 013F6 VFETCHFNM fetch a file name * 223 * 013F7 VSCANOVER scan over non-item characters * 224 * 013F8 VFETCHITMH fetch item with hex number assumed * 225 * 013F9 VPREPOUT output formatting routine * 226 * 013FA undefined * 227 * 013FB VGETDATE get the system date and time * 228 * 013FC undefined * 229 * * 230 * * 231 * VECTORS COMMON TO OPL, ONPL, AND TOPL * 232 * * 233 * ADDRESS NAME DESCRIPTION * 234 * ------- ---- ----------- * 235 * 013E0 VREAD disk read routine * 236 * 013E1 VWRITE disk write routine * 237 * 013E2 VSRCHDIR search account file directory * 238 * 013E3 VDISPLAY front panel displayer * 239 * 013E4 VDISKCB pointer to boot disk control block * 240 * 013EB VOPENDISK initialize a disk control block * 241 * 013EC VCLOSEDISK close a disk control block * 242 * 013EE VSRCHDIRSN search directory for serial number * 243 * * 244 * 013F0 VDONEEXIT address of re-entry point for OPL * 245 * 013F1 VREADCHAR read one character from terminal * 246 * 013F2 VWRITECHAR write one character to terminal * 247 * 013F3 VREADLINE read one line from terminal * 248 * 013F4 VWRITELINE write one line to terminal * 249 * 013F5 VFETCHITEM fetch an input item * 250 * 013F6 VFETCHFNM fetch a file name * 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 9 (OPLDOC) F 15 251 * 013F7 VSCANOVER scan over non-item characters * 252 * 013F8 VFETCHITMH fetch item with hex number assumed * 253 * 013F9 VPREPOUT output formatting routine * 254 * 013FB VGETDATE get the system date and time * 255 * * 256 * * 257 * OPL, ONPL, and TOPL all provide VPFWNDO1 and VPFWNDO2 * 258 * vectors but they are different in ONPL than in OPL and TOPL. * 259 * Since ONPL is run online and cannot change page file contents * 260 * these two vectors point to pointers to windows 1 and 2 instead * 261 * of page map values. * 262 * * 263 * 013E8 VPFWNDO1 pointer to page map value for window 1 * 264 * 013E9 VPFWNDO2 pointer to page map value for window 2 * 265 * * 266 ********************************************************************************** 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 10 F 0 123 02000 FE0E201B 124 JMP BEGINNING jump over version & then some! 125 * --- 126 02001 41393330 127 VERSION TEXTZ "A9306" change title line and revisions too 128 02003 20546170 129 MYTITLE TEXTZ " Tape Offline Program Loader \C1\." 0200C 2A544F50 130 PROMPT TEXTZ "*TOPL>" 0200E 533719C0 131 RADCODE PAK6 CODE 00003000 ABS 132 PROGAREA EQU 03000 beginning of area for loading programs 0000008C ABS 133 PNPROGAREA EQU MONPF+PROGAREA/FLDPAGE 134 0200F 020C1C04 135 TERMBUFP PTR TERMBUF 02010 20546865 136 ERRMSG TEXTZ " The I/O error log contains \D1\ entries." 137 138 VARS 00001C00 139 TERMPOS BSS 1 holds invocation terminator 00001C01 140 RUNFLAG BSS 1 sez whether to run loaded file 00001C02 141 ENTRYPT BSS 1 entry point of loaded file 00001C03 142 SPACEINW4 BSS 1 space in window 4 00000050 ABS 143 BUFL EQU 80 02001C04 144 TERMBUF BSSC BUFL general terminal input buffer 00001C18 145 FILENAME BSS 15 146 00001C27 147 DCB BSS DCBLEN buffer for disk control block 00001C2F 148 FBIBUFF BSS FBILNTH buffer for FBI during disk reads 149 00001C3A 150 INTRPTCA BSS 10 console area for us 151 00001C44 152 ERRCNT BSS 1 number of entries in error buffer 00001C45 153 OPLTYPE BSS 1 -1 => program already run for customer (just halt) 154 * 0 => booted by RFP, accept commands 155 * >0 => Customer did boot, just run indicated program 00000008 ABS 156 TOPLCODES EQU 8 first legitimate value 157 00000008 ABS 158 BS EQU 08 back space 0000000A ABS 159 LF EQU 0A ascii line feed 0000000D ABS 160 CR EQU 0D ascii carriage return 00000018 ABS 161 CAN EQU 018 line kill (^X) 162 163 PROG 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 11 F 0 165 166 ********************************************************************************** 167 * * 168 * Main entry. Perform miscellaneous initialization. * 169 * The stack pointer should be properly set from PromBoot * 170 * and TapeBoot, but we reset it as added assurance. * 171 * * 172 ********************************************************************************** 173 0000201B 174 BEGINNING LABEL 0201B 61840360 6 IMM 175 LD SP ADR IBSTACK load stack pointer 0201C DC4020B2 176 CALLNP INITIALIZE initialize vectors and error log 0201D DC002A03 177 CALL PREPOUTR output my name and version 0201E 41002001 178 PAR VERSION 0201F 40002003 179 PARL MYTITLE 180 * \ / 181 182 ********************************************************************************** 183 * * 184 * Re-entry point. When offline programs finish up they * 185 * come back to this point. We recapture any CPUs that might * 186 * have been in use, restore our page file, and issue another * 187 * prompt to the operator or halt with the message left in the * 188 * lights. * 189 * * 190 ********************************************************************************** 191 192 * \ / 00002020 193 DONEEXITR LABEL 02020 5904E1F0 IMM 194 LDMSR MONMSRIOFF interrupts off 02021 01441C3A IMM 195 LDCAR ADR INTRPTCA point at our console area 02022 61840360 6 IMM 196 LD SP ADR IBSTACK reload stack pointer 197 02023 600420B0 0 IMM 198 LD R0 ADR MULTILOOP retrieve any extra CPUs 02024 E40013FC 0 199 ST R0 VEXTRACPUS by putting loop address in the vectors 02025 DC4020A5 200 CALLNP LOADPF restore the page file 02026 60001C03 0 201 LD R0 SPACEINW4 02027 E41013ED 0 @ 202 ST R0 @VMEMSPACE undo old substitution lists 203 02028 60001C45 0 204 LD R0 OPLTYPE check current state 02029 FA2E202B 0 205 JNEMW R0 DOPROG Jump if not returning from prog. 206 * \ / 207 208 ********************************************************************************** 209 * * 210 * We get here if we have returned from a program that we * 211 * ran for a customer. We wish to just halt without changing * 212 * the message in the lights (in case the program that just * 213 * terminated left something meaningful there). * 214 * * 215 ********************************************************************************** 216 217 * \ / called from CP and program done 0202A 003FFFFF 218 HALT NOHALTCODE completion of offline program run by customer 219 * --- 220 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 12 F 0 0000202B 221 DOPROG LABEL 0202B DC5013E3 @ 222 CALLNP @VDISPLAY tell the world we're here 0202C 544F504C 223 ASCII 2,TOPL "TOPL " 0202E 20200000 224 VFD " " AND 03F3F0000 225 * \ / 226 0202F 600013EA 0 227 LD R0 VERRLOGPTR R0 -> place for next log entry 02030 10041C7F 0 IMM 228 SUB R0 ADR LOGBUFFER R0 = number of words of log info 02031 14040005 0 IMM 229 DIV R0 ERRLNTH R0 = number of entries in buffer 02032 604013EA 1 230 LD R1 VERRLOGPTR R1 -> place for next entry 02033 60964800 2 1 BASE 231 LD R2 R1,0 see if buffer is full 02034 FAAE2036 2 232 JNEMW R2 NOTFULL jump if not full 02035 18164801 0 1 BASE 233 ADD R0 R1,1 else add number of overflowed entries 00002036 234 NOTFULL LABEL 02036 FA02203B 0 235 JEQZ R0 SKIPMSG if no errors, don't tell user 02037 E4001C44 0 236 ST R0 ERRCNT save number of errors 237 02038 DC002A03 238 CALL PREPOUTR tell the user about them 02039 41001C44 239 PAR ERRCNT 0203A 40002010 240 PARL ERRMSG 0000203B 241 SKIPMSG LABEL 242 * \ / 243 244 ********************************************************************************** 245 * * 246 * See if we're running from the control panel. * 247 * * 248 ********************************************************************************** 249 250 * \ / 0000203B 251 MC LABEL 0203B 60001C45 0 252 LD R0 OPLTYPE get type of boot 0203C FA022049 0 253 JEQZ R0 MC1 jump if field service 254 * \ / 255 0203D 6804000F 0 IMM 256 UCPR R0 MAXOFFSYS is this allowed to this offline loader? 0203E FE0A2040 257 JLE MCHKLO jump if we'll attempt it 0203F 00025004 258 HALT HALTB5004 switches too high for this loader 259 * --- 260 00002040 261 MCHKLO LABEL 02040 68040008 0 IMM 262 UCPR R0 TOPLCODES codes below 8 are disk boot 02041 FE062043 263 JGE CUSTSWTCOK and should never get here 02042 00025005 264 HALT HALTB5005 switches were 0:7. Should not 265 * --- have gotten to TOPL 266 267 ********************************************************************************** 268 * * 269 * The customer supplied switches are within the range * 270 * that we allow him to use. To find what he actually runs, * 271 * we look up the program name in a table and go process by * 272 * loading the command from tape and executing it. * 273 * Since this was a boot from the control panel, we don't * 274 * have any invocation parameters to pass to the called * 275 * program. We must, therefore, indicate that the buffer is * 276 * empty. * 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 13 F 0 277 * * 278 ********************************************************************************** 279 00002043 280 CUSTSWTCOK LABEL 02043 D1401C45 281 STMW OPLTYPE Say we've been this way before 02044 62A020D0 23 0 282 LD2 R2 OFFNAMES(R0) load the pre-determined name 02045 6100200F 4 283 LD R4 TERMBUFP get pointer to operator input buffer 02046 E5001C00 4 284 ST R4 TERMPOS set current position... nothing in buffer 02047 EC170400 4 @R 285 STZ @R4 and put EOL into buffer 02048 FE0E205D 286 JMP NOTCOMND go process program name 287 * --- 288 289 ********************************************************************************** 290 * * 291 * We have been booted by the RFP or RITA. Prompt the * 292 * operator and execute his input as a command or implicit * 293 * RUN. * 294 * * 295 ********************************************************************************** 296 00002049 297 MC1 LABEL 02049 DC002A03 298 CALL PREPOUTR give prompt 0204A 4000200C 299 PARL PROMPT 0204B 60440050 1 IMM 300 LD R1 BUFL get limiting buffer length 0204C 6080200F 2 301 LD R2 TERMBUFP get the buffer pointer 0204D DC5013F3 @ 302 CALLNP @VREADLINE get the input 0204E FA48203B 1 303 JLTZ R1 MC ignore a line too long 0204F 30440050 1 IMM 304 RSB R1 BUFL make R1=length of record 02050 FA42203B 1 305 JEQZ R1 MC ignore empty line 02051 EC32200F 1 @ 306 STZ @TERMBUFP(R1) terminate line with a null 02052 EC001C01 307 STZ RUNFLAG assume running the program 308 * \ / 309 310 ********************************************************************************** 311 * * 312 * Line has been read. Try to fetch a filename. * 313 * * 314 ********************************************************************************** 315 316 * \ / 02053 6100200F 4 317 LD R4 TERMBUFP get the buffer pointer 02054 DC4026F8 318 CALLNP FETCHITEMR pick up command name 02055 F678203B 1 319 JBT R1/TEOL MC if just eol go try again 02056 F27C2099 1 320 JBF R1/TALPH PACKBAD jump if not what we want 02057 E5001C00 4 321 ST R4 TERMPOS save the location of the terminator 322 * \ / 323 324 ********************************************************************************** 325 * * 326 * Commands are processed here. If the symbol we fetched * 327 * matches one of our command names then we know what to do. * 328 * If the name does not match then we will search for it on * 329 * the boot tape. * 330 * * 331 ********************************************************************************** 332 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 14 F 0 333 * \ / 02058 6004000B 0 IMM 334 LD R0 COMNDTABL-1 00002059 335 FINDCOMND LABEL 02059 66A020F0 23 0 336 CPR2 R2 COMNDTAB(R0) is it this command? 0205A FE0C205C 337 JNE NOTTHISCMD jump if not this one 0205B 5CA02108 0 338 LDPC COMNDJMP(R0) goto the processing routine 339 * --- 0000205C 340 NOTTHISCMD LABEL 0205C FA262059 0 341 JDR R0 FINDCOMND otherwise, try the next one 342 * \ / 343 344 345 ********************************************************************************** 346 * * 347 * The file name is still packed up in R2. We will go * 348 * try to find it on the boot tape. * 349 * * 350 ********************************************************************************** 351 352 * \ / 0000205D 353 NOTCOMND LABEL 0205D 611013D0 4 @ 354 LD R4 @VTAPECB point to tape control block 0205E DC1013D2 @ 355 CALL @VTAPELOAD go try to find the thing 0205F 43548000 23 PAIR 356 PARV2 PAIR R2 name is still in PAIR R2 02060 41443000 IMM 357 PARV PROGAREA address for data 02061 40441C2F IMM 358 PARVL ADR(FBIBUFF) address for header 02062 FA0C207B 0 359 JNEZ R0 BADFILE jump if couldn't get it 360 * \ / 361 362 ********************************************************************************** 363 * * 364 * The program has been read into real memory. Jump at * 365 * him. * 366 * * 367 ********************************************************************************** 368 369 * \ / 02063 61001C00 4 370 LD R4 TERMPOS point R4 to the terminator 02064 60843000 2 IMM 371 LD R2 PROGAREA point to start of program 02065 5C001C01 372 CMZ RUNFLAG am I to run the program? 02066 FE0C206C 373 JNE ITSLOADED jump if not, say loaded 02067 DC5013E3 @ 374 CALLNP @VDISPLAY remove writing on the display 02068 20202020 375 ASCII 2, 0206A 20200000 376 VFD " " AND 03F3F0000 0206B 5C928000 2 REG 377 LDPC R2 goto the program 378 * --- 379 380 ********************************************************************************** 381 * * 382 * The file was just to be loaded. Tell him so. * 383 * * 384 ********************************************************************************** 385 0000206C 386 ITSLOADED LABEL 0206C E4801C02 2 387 ST R2 ENTRYPT save transfer point 0206D DC002A03 388 CALL PREPOUTR print the informative message 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 15 F 0 0206E 41001C18 389 PAR FILENAME 0206F 41001C02 390 PAR ENTRYPT 02070 40002072 391 PARL LOADEDM 02071 FE0E203B 392 JMP MC before going back for another command 393 * --- 394 02072 2046696C 395 LOADEDM TEXTZ " File \F1\ loaded, start = \H2,5\." 396 397 ********************************************************************************** 398 * * 399 * The data file wouldn't read. Error message output. * 400 * * 401 ********************************************************************************** 402 0000207B 403 BADFILE LABEL 404 405 * See if we're running from the front panel 406 0207B 60401C45 1 407 LD R1 OPLTYPE Get magic flag 0207C FA4C208A 1 408 JNEZ R1 BADFILEOFF We are, go elsewhere 409 * \ / 410 0207D 64040009 0 IMM 411 CPR R0 TERRFNF not found??? 0207E FE02208F 412 JEQ FNF if so then different error 0207F 6044001C 1 IMM 413 LD R1 BADFILEML 02080 60842083 2 IMM 414 LD R2 ADR BADFILEM 02081 DC5013F4 @ 415 CALLNP @VWRITELINE output error message 02082 FE0E203B 416 JMP MC 417 * --- 418 02083 20546170 419 BADFILEM TEXT " Tape error reading file." 0000001C ABS 420 BADFILEML EQU DISPC BADFILEM 421 422 ********************************************************************************** 423 * * 424 * We're running from the front panel and the file * 425 * wouldn't read. Panic, then put something meaningful in the * 426 * lights and wait for the user to do something. * 427 * * 428 ********************************************************************************** 429 0000208A 430 BADFILEOFF LABEL 0208A DC5013E3 @ 431 CALLNP @VDISPLAY 0208B 42414420 432 ASCII 2,BAD FILE "BAD FILE " 0208D 20200000 433 VFD " " AND 03F3F0000 0208E 003FFFFF 434 HALT NOHALTCODE Wait for something to happen 435 * --- 436 437 ********************************************************************************** 438 * * 439 * We could not find the named file on the tape. Print * 440 * an appropriate error message. * 441 * * 442 ********************************************************************************** 443 0000208F 444 FNF LABEL 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 16 F 0 0208F 60440018 1 IMM 445 LD R1 NOFILEML 02090 60842093 2 IMM 446 LD R2 ADR NOFILEM 02091 DC5013F4 @ 447 CALLNP @VWRITELINE output error message 02092 FE0E203B 448 JMP MC 449 * --- 450 02093 2046696C 451 NOFILEM TEXT " File does not exist." 00000018 ABS 452 NOFILEML EQU DISPC NOFILEM 453 454 ********************************************************************************** 455 * * 456 * Filename not in proper format. * 457 * * 458 ********************************************************************************** 459 00002099 460 PACKBAD LABEL 02099 60440020 1 IMM 461 LD R1 PACKBADML 0209A 6084209D 2 IMM 462 LD R2 ADR PACKBADM 0209B DC5013F4 @ 463 CALLNP @VWRITELINE output the error message 0209C FE0E203B 464 JMP MC give another prompt 465 * --- 466 0209D 2046696C 467 PACKBADM TEXT " Filename not in proper format." 00000020 ABS 468 PACKBADML EQU DISPC PACKBADM 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 17 F 0 470 471 ********************************************************************************** 472 * * 473 * LOADPF. Routine to load the page file locations, * 474 * starting with virtual page 3000 in monitor memory and * 475 * going through the end of the page file, with the matching * 476 * physical pages from the MCU that DISKBOOT used when * 477 * loading us. * 478 * e.g. PF location 08C gets physical page 0C mapped into it. * 479 * Call: * 480 * CALLNP LOADPF * 481 * Eats R0,R1,R3 * 482 * * 483 ********************************************************************************** 484 485 LOADPF BLOCK 486 487 ENTRY LOADPF 488 020A5 DD524000 1 REG 489 LOADPF ENTRNP R1 020A6 60C4008C 3 IMM 490 LD PFPTR PNPROGAREA page number for beginning of program 020A7 601013E6 0 @ 491 LD R0 @VMEMPF page file for this memory box 000020A8 492 PFLOADLOOP LABEL 020A8 E4CA28C0 3 0 CBM 493 ST PFPTR R0/PFPAGENUM make page file for that page 020A9 EC0A3010 0 CBM 494 STZ R0/PFPAGENUM/MONBIT remove the monitor bit 020AA 00D20000 0 REG 495 LDPF R0 map memory one-to-one 020AB 18C40001 3 IMM 496 ADD PFPTR 1 020AC 64C40100 3 IMM 497 CPR PFPTR PFSIZE check for beyond end 020AD FE0820A8 498 JLT PFLOADLOOP jump if more pages to do 020AE 5D124000 1 REG 499 LEAVE R1 500 * --- 501 +LOADPF 000020A5 F 0 487 489= PFLOADLOOP 000020A8 F 0 492= 498j +PNPROGAREA 0000008C F 0 490 +VMEMPF 000013E6 F 0 491 502 END LOADPF 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 18 F 0 504 505 ********************************************************************************** 506 * * 507 * If there are other CPUs, they will come here, load * 508 * their page files, and stop. They can be brought into use * 509 * by an offline program by storing a starting address into * 510 * VEXTRACPUS. * 511 * * 512 ********************************************************************************** 513 000020AF 514 MULTICPUS LABEL 020AF DC4020A5 515 CALLNP LOADPF load the page file 000020B0 516 MULTILOOP LABEL 020B0 00420008 IMM 517 WAIT WAITCOUNT wait here a bit 020B1 5C8013FC 518 LDPC VEXTRACPUS loop to where the vectors want us 519 * --- 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 19 F 0 521 522 ********************************************************************************** 523 * * 524 * This is the INITIALIZE section. It sets up the * 525 * vectors for use by other off-line programs and clears the * 526 * error log. If booted from the front panel, it initializes * 527 * the comm. * 528 * Call: * 529 * CALLNP INITIALIZE * 530 * * 531 * Eats: R0:R5 * 532 * * 533 ********************************************************************************** 534 535 INITIALIZE BLOCK 536 537 ENTRY INITIALIZE 538 539 VARS 00001C46 540 INITRS BSS 1 return info 541 PROG 542 020B2 DD401C46 543 INITIALIZE ENTRNP INITRS 020B3 600420D3 0 IMM 544 LD R0 ADR VECTORS set up source address... 020B4 60440034 1 IMM 545 LD R1 VECTORL*CPW ... length... 020B5 608413F0 2 IMM 546 LD R2 ADR VDONEEXIT ... and destination address 020B6 FE400000 547 CMOVE copy my vectors into table 548 549 * Fill in the empty vectors, since TapeBoot does not. 020B7 60042408 0 IMM 550 LD R0 ADR(READ) 020B8 E40013E0 0 551 ST R0 VREAD 020B9 60042435 0 IMM 552 LD R0 ADR(WRITE) 020BA E40013E1 0 553 ST R0 VWRITE 020BB 60042363 0 IMM 554 LD R0 ADR(SRCHDIR) 020BC E40013E2 0 555 ST R0 VSRCHDIR 020BD 60041C27 0 IMM 556 LD R0 ADR(DCB) 020BE E40013E4 0 557 ST R0 VDISKCB 020BF 600422DF 0 IMM 558 LD R0 ADR(OPENDISK) 020C0 E40013EB 0 559 ST R0 VOPENDISK 020C1 6004234E 0 IMM 560 LD R0 ADR(CLOSEDISK) 020C2 E40013EC 0 561 ST R0 VCLOSEDISK 020C3 60042360 0 IMM 562 LD R0 ADR(SRCHDIRSN) 020C4 E40013EE 0 563 ST R0 VSRCHDIRSN 020C5 601013ED 0 @ 564 LD R0 @VMEMSPACE 020C6 E4001C03 0 565 ST R0 SPACEINW4 save end of substitution list 020C7 60841C7F 2 IMM 566 LD R2 ADR LOGBUFFER get address of error log buffer 020C8 E48013EA 2 567 ST R2 VERRLOGPTR tell DISKBOOT about it 020C9 604407D8 1 IMM 568 LD R1 (LOGENTRIES*ERRLNTH+2)*CPW get buffer length 020CA DA800800 2 1 569 FILLI R2 R1 000 clear the error log buffer 020CB D1401E73 570 STMW LOGBUFFER(LOGENTRIES*ERRLNTH) flag end of buffer 571 020CC 60000313 0 572 LD R0 FPSWITCHX get front panel switches 020CD EC001C45 573 STZ OPLTYPE guess RFP boot 020CE F60020D2 0 574 JBT R0/SSURFP SKPCIAINIT skip CIA initialize if RFP 575 * \ / customer boot, process accordingly 020CF 604A3840 1 0 CBM 576 LD R1 R0/SSUSWITCH Get meaningful bits 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 20 F 0 020D0 E4401C45 1 577 ST R1 OPLTYPE indicate actually customer boot 020D1 DC4025F2 578 CALLNP INITCIA find CIA and initialize it 000020D2 579 SKPCIAINIT LABEL 020D2 5D001C46 580 LEAVE INITRS then return to main line 581 * --- 582 583 * Vectors copied into diskboot vector area 000020D3 584 VECTORS LABEL 020D3 00002020 585 VFD ADR DONEEXITR exit on program completion 020D4 00002633 586 VFD ADR READCHARR read one character 020D5 00002674 587 VFD ADR WRITECHARR write one character 020D6 0000269A 588 VFD ADR READLINER read one line 020D7 000026BC 589 VFD ADR WRITELINER write one line 020D8 000026F8 590 VFD ADR FETCHITEMR fetch an item 020D9 00002761 591 VFD ADR FETCHFNMR fetch (pack) a filename 020DA 00002785 592 VFD ADR SCANOVERR scan over non-item characters 020DB 000026F5 593 VFD ADR FTCHITEMHR fetchitem with hex numbers 020DC 00002A03 594 VFD ADR PREPOUTR output formatter 020DD 00001C7F 595 VFD ADR LOGBUFFER beginning of error log buffer 020DE 000026D9 596 VFD ADR GETDATE date fetcher 020DF 000020B0 597 VFD ADR MULTILOOP where multiple CPUs should go 0000000D ABS 598 VECTORL EQU DISPW VECTORS 599 +CLOSEDISK UUUUUUUU F 0 560a +DCB 00001C27 F 0 556a +DONEEXITR 00002020 F 0 585a +ERRLNTH 00000005 F 0 568 570s +FETCHFNMR UUUUUUUU F 0 591a +FETCHITEMR UUUUUUUU F 0 590a +FTCHITEMHR UUUUUUUU F 0 593a +GETDATE UUUUUUUU F 0 596a +INITCIA UUUUUUUU F 0 578 +INITIALIZE 000020B2 F 0 537 543= INITRS 00001C46 F 0 540= 543s 580 +LOGBUFFER UUUUUUUU F 0 566a 570s 595a +LOGENTRIES UUUUUUUU F 0 568 570s +MULTILOOP 000020B0 F 0 597a +OPENDISK UUUUUUUU F 0 558a +OPLTYPE 00001C45 F 0 573s 577s +PREPOUTR UUUUUUUU F 0 594a +PROG MACRO F 0 541 +PROGRAM! 000020B2 F 0 539e 539= 541a +PSECT! 00000000 F 0 539a 539e 539e 539a 539= 541e 541a 541= 541a 541e +READ UUUUUUUU F 0 550a +READCHARR UUUUUUUU F 0 586a +READLINER UUUUUUUU F 0 588a +SCANOVERR UUUUUUUU F 0 592a SKPCIAINIT 000020D2 F 0 574j 579= +SPACEINW4 00001C03 F 0 565s +SRCHDIR UUUUUUUU F 0 554a +SRCHDIRSN UUUUUUUU F 0 562a +VARIABLES! 00001C47 F 0 539a 541e 541= +VARS MACRO F 0 539 +VCLOSEDISK 000013EC F 0 561s +VDISKCB 000013E4 F 0 557s 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 21 F 0 +VDONEEXIT 000013F0 F 0 546a VECTORL 0000000D F 0 545 598= VECTORS 000020D3 F 0 544a 584= 598e +VERRLOGPTR 000013EA F 0 567s +VMEMSPACE 000013ED F 0 564 +VOPENDISK 000013EB F 0 559s +VREAD 000013E0 F 0 551s +VSRCHDIR 000013E2 F 0 555s +VSRCHDIRSN 000013EE F 0 563s +VWRITE 000013E1 F 0 553s +WRITE UUUUUUUU F 0 552a +WRITECHARR UUUUUUUU F 0 587a +WRITELINER UUUUUUUU F 0 589a 600 END INITIALIZE 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 22 F 0 602 603 ********************************************************************************** 604 * * 605 * Name table for those offline programs that a customer * 606 * may invoke from the control panel. RFP and RITA users can * 607 * be relied on to know the names of their favorite programs. * 608 * The programs currently available to customers are... * 609 * Boot 8 => TapeRecover * 610 * Boot 9 => DiskInit * 611 * * 612 ********************************************************************************** 613 000020E0 614 OFFNAMTAB LABEL 000020D0 615 OFFNAMES EQU OFFNAMTAB(-TOPLCODES*2) codes must be 8 or above 020E0 B8E2762F 616 PAK12 TAPERECOVER boot switches = 8 => tape recover 020E2 58760850 617 PAK12 DISKINIT boot switches = 9 => disk initializer 020E4 E79EDF2D 618 PAK12 !!!!!!!!!!!! boot switches = A => not assigned 020E6 E79EDF2D 619 PAK12 !!!!!!!!!!!! boot switches = B => not assigned 020E8 E79EDF2D 620 PAK12 !!!!!!!!!!!! boot switches = C => not assigned 020EA E79EDF2D 621 PAK12 !!!!!!!!!!!! boot switches = D => not assigned 020EC E79EDF2D 622 PAK12 !!!!!!!!!!!! boot switches = E => not assigned 020EE E79EDF2D 623 PAK12 !!!!!!!!!!!! boot switches = F => not assigned 624 0000000F ABS 625 MAXOFFSYS EQU ((DISPW OFFNAMES)/2)-1 Max legal 626 627 ********************************************************************************** 628 * * 629 * Command names recognized by TOPL. * 630 * Note that the COMMANDS command relies on this table * 631 * having a multiple of four entries in it. The extra entries * 632 * beyond the last used are blanks and they will print as * 633 * blanks on the last output line. * 634 * Note that the help routine has a table with the same * 635 * index for finding the help info. * 636 * * 637 ********************************************************************************** 638 000020F0 639 COMNDTAB LABEL 020F0 4D27B580 640 PAK12 BOOT 020F2 53401790 641 PAK12 COMMANDS 020F4 58760540 642 PAK12 DISK 020F6 6B931000 643 PAK12 GO 644 020F8 703D0E80 645 PAK12 HELP 020FA 8A22A580 646 PAK12 LOAD 020FC A3146E3C 647 PAK12 PRTERRLOG 020FE AFB86000 648 PAK12 RUN 649 02100 B46AE7D0 650 PAK12 SLEEP 02102 00000000 651 PAK12 02104 00000000 652 PAK12 02106 00000000 653 PAK12 0000000C ABS 654 COMNDTABL EQU (DISPW COMNDTAB)/2 number of entries in table 655 00002108 656 COMNDJMP LABEL 02108 0000211C 657 VFD ADR BOOTR 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 23 F 0 02109 0000215B 658 VFD ADR COMMANDSR 0210A 0000213B 659 VFD ADR DISKR 0210B 0000211B 660 VFD ADR GOR 661 0210C 00002177 662 VFD ADR HELPR 0210D 00002114 663 VFD ADR LOADR 0210E 0000205D 664 VFD ADR NOTCOMND 0210F 00002115 665 VFD ADR RUNR 666 02110 000022DA 667 VFD ADR SLEEPR 02111 000022DA 668 VFD ADR SLEEPR (no corresponding command) 02112 000022DA 669 VFD ADR SLEEPR (no corresponding command) 02113 000022DA 670 VFD ADR SLEEPR (no corresponding command) 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 24 F 0 672 673 BLOCK 674 ENTRY LOADR 675 ENTRY RUNR 676 ENTRY GOR 677 678 ********************************************************************************** 679 * * 680 * LOAD filename * 681 * * 682 * This command loads the specified file but does not * 683 * run it. This allows the program to be modified or started * 684 * at some funny location for diagnostic work. * 685 * * 686 ********************************************************************************** 687 00002114 688 LOADR LABEL 02114 EDC01C01 689 STW RUNFLAG say to only load it 690 * \ / 691 692 ********************************************************************************** 693 * * 694 * RUN filename * 695 * * 696 * This command loads and runs the specified file. * 697 * This only exists because there may be a program named * 698 * LOAD or RUN or any of the other OPL commands. * 699 * * 700 ********************************************************************************** 701 702 * \ / 00002115 703 RUNR LABEL 02115 61441C18 5 IMM 704 LD R5 ADR FILENAME 02116 60C0200E 3 705 LD R3 RADCODE get the default extension 02117 DC4026F8 706 CALLNP FETCHITEMR get the filename 02118 FA082099 0 707 JLTZ R0 PACKBAD bad format 02119 E5001C00 4 708 ST R4 TERMPOS remember where the parameters begin 0211A FE0E205D 709 JMP NOTCOMND load the file 710 * --- 711 712 ********************************************************************************** 713 * * 714 * GO [parameters] * 715 * * 716 * This command will transfer control to a previously * 717 * loaded program. You may optionally specify parameters for * 718 * that program. * 719 * * 720 ********************************************************************************** 721 0000211B 722 GOR LABEL 0211B 5C801C02 723 LDPC ENTRYPT go do it 724 * --- 725 +ENTRYPT 00001C02 F 0 723 +FETCHITEMR UUUUUUUU F 0 706 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 25 F 0 +FILENAME 00001C18 F 0 704a +GOR 0000211B F 0 676 722= +LOADR 00002114 F 0 674 688= +NOTCOMND 0000205D F 0 709j +PACKBAD 00002099 F 0 707j +RADCODE 0000200E F 0 705 +RUNFLAG 00001C01 F 0 689s +RUNR 00002115 F 0 675 703= +TERMPOS 00001C00 F 0 708s 726 END 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 26 F 0 728 729 BLOCK 730 ENTRY BOOTR 731 732 ********************************************************************************** 733 * * 734 * BOOT [number] * 735 * * 736 * This command commands the SSU to boot the system with * 737 * the specified switch setting. The number is a hexadecimal * 738 * number that corresponds to the four front panel switches. * 739 * If the number is not specified, then zero (the operating * 740 * system) is assumed. * 741 * * 742 ********************************************************************************** 743 0000211C 744 BOOTR LABEL 0211C DC4026F5 745 CALLNP FTCHITEMHR pick up the number 0211D F678212D 1 746 JBT R1/TEOL BOOT0 if eol, assume zero 0211E F27E212F 1 747 JBF R1/TNUM BADFORM only numbers are allowed 0000211F 748 BOOT0X LABEL 0211F 60C40086 3 IMM 749 LD PFPTR PNCIX 02120 00D013E5 @ 750 LDPF @VPF4SSU make a window to the SSU 02121 E4801810 2 751 ST R2 CIX(SSUBOOTFP) tell him to boot 752 * \ / 753 02122 00420008 IMM 754 WAIT WAITCOUNT wait for the boot to happen 755 * !!! should boot before fall through 02123 DC002A03 756 CALL PREPOUTR say if it didn't work 02124 40002126 757 PARL NOBOOTM 02125 FE0E2020 758 JMP DONEEXITR re-initialize 759 * --- 760 02126 20546865 761 NOBOOTM TEXTZ " The SSU will not boot us." 762 0000212D 763 BOOT0 LABEL 0212D 60840000 2 IMM 764 LD R2 0 0212E FE0E211F 765 JMP BOOT0X 766 * --- 767 0000212F 768 BADFORM LABEL bad format of parameter 0212F DC002A03 769 CALL PREPOUTR 02130 40002132 770 PARL BADFORMMSG 02131 FE0E2020 771 JMP DONEEXITR re-initialize 772 * --- 773 02132 20426164 774 BADFORMMSG TEXTZ " Bad format for boot switch value." 775 BADFORM 0000212F F 0 747j 768= BADFORMMSG 00002132 F 0 770a 774= BOOT0 0000212D F 0 746j 763= BOOT0X 0000211F F 0 748= 765j +BOOTR 0000211C F 0 730 744= +DONEEXITR 00002020 F 0 758j 771j +FTCHITEMHR UUUUUUUU F 0 745 NOBOOTM 00002126 F 0 757a 761= 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 27 F 0 +PREPOUTR UUUUUUUU F 0 756 769 +TEOL 00003810 F 0 746j +TNUM 00003E10 F 0 747j +VPF4SSU 000013E5 F 0 750 776 END 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 28 F 0 778 779 ********************************************************************************** 780 * * 781 * This section processes the DISK command. It allows * 782 * the user to select a disk for use by TOPL or other * 783 * programs. This is because we are booted from tape and * 784 * have no default disk. * 785 * * 786 ********************************************************************************** 787 788 DISKR BLOCK 789 ENTRY DISKR 790 791 VARS 00001C47 792 ERRORCODE BSS 1 memory location for value 793 PROG 794 0000213B 795 DISKR LABEL 0213B DC4026F8 796 CALLNP FETCHITEMR go get the disk name 0213C F27C2149 1 797 JBF R1/TALPH DISKR90 jump if no good 0213D FACC2149 3 798 JNEZ R3 DISKR90 or if name too long 0213E 60128000 0 2 REG 799 LD R0 R2 transfer name 0213F 60440000 1 IMM 800 LD R1 0 substitution pointer 02140 60840000 2 IMM 801 LD R2 0 (just in case) 02141 61041C27 4 IMM 802 LD R4 ADR DCB point to disk control buffer 02142 DC5013EB @ 803 CALLNP @VOPENDISK set up the disk block 02143 FA02203B 0 804 JEQZ R0 MC jump if all went well 02144 E4001C47 0 805 ST R0 ERRORCODE save error code to display 02145 DC002A03 806 CALL PREPOUTR complain 02146 41001C47 807 PAR ERRORCODE 02147 4000214C 808 PARL BADDSKMSG 02148 FE0E203B 809 JMP MC 810 * --- 811 00002149 812 DISKR90 LABEL 02149 DC002A03 813 CALL PREPOUTR complain 0214A 40002153 814 PARL BADDSKNAM 0214B FE0E203B 815 JMP MC 816 * --- 817 0214C 20446973 818 BADDSKMSG TEXTZ " Disk error on open - \H1\." 02153 20457870 819 BADDSKNAM TEXTZ " Expecting disk name, DSKscu." 820 BADDSKMSG 0000214C F 0 808a 818= BADDSKNAM 00002153 F 0 814a 819= +DCB 00001C27 F 0 802a +DISKR 0000213B F 0 789 795= DISKR90 00002149 F 0 797j 798j 812= ERRORCODE 00001C47 F 0 792= 805s 807a +FETCHITEMR UUUUUUUU F 0 796 +MC 0000203B F 0 804j 809j 815j +PREPOUTR UUUUUUUU F 0 806 813 +PROG MACRO F 0 793 +PROGRAM! 0000213B F 0 791e 791= 793a +PSECT! 00000000 F 0 791e 791a 791e 791a 791= 793e 793e 793a 793a 793= 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 29 F 0 +TALPH 00003C10 F 0 797j +VARIABLES! 00001C48 F 0 791a 793= 793e +VARS MACRO F 0 791 +VOPENDISK 000013EB F 0 803 821 END DISKR 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 30 F 0 823 824 ********************************************************************************** 825 * * 826 * COMMANDS * 827 * This command lists the names of the legal commands. * 828 * * 829 ********************************************************************************** 830 831 BLOCK 832 ENTRY COMMANDSR 833 0000215B 834 COMMANDSR LABEL 0215B DC002A03 835 CALL PREPOUTR 0215C 410020F0 836 PAR COMNDTAB(0) 0215D 410020F2 837 PAR COMNDTAB(2) 0215E 410020F4 838 PAR COMNDTAB(4) 0215F 410020F6 839 PAR COMNDTAB(6) 02160 4000216E 840 PARL COMNDRM 02161 DC002A03 841 CALL PREPOUTR 02162 410020F8 842 PAR COMNDTAB(8) 02163 410020FA 843 PAR COMNDTAB(10) 02164 410020FC 844 PAR COMNDTAB(12) 02165 410020FE 845 PAR COMNDTAB(14) 02166 4000216E 846 PARL COMNDRM 02167 DC002A03 847 CALL PREPOUTR 02168 41002100 848 PAR COMNDTAB(16) 02169 41002102 849 PAR COMNDTAB(18) 0216A 41002104 850 PAR COMNDTAB(20) 0216B 41002106 851 PAR COMNDTAB(22) 0216C 4000216E 852 PARL COMNDRM 0216D FE0E203B 853 JMP MC 854 * --- 855 0216E 205C7331 856 COMNDRM TEXTZ " \s1,10\ \s2,10\ \s3,10\ \s4,10\" 857 +COMMANDSR 0000215B F 0 832 834= COMNDRM 0000216E F 0 840a 846a 852a 856= +COMNDTAB 000020F0 F 0 836a 837a 838a 839a 842a 843a 844a 845a 848a 849a 850a 851a +MC 0000203B F 0 853j +PREPOUTR UUUUUUUU F 0 835 841 847 858 END 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 31 F 0 Command: "Help" 861 862 ********************************************************************************** 863 * The HELP command is used to give brief descriptions of * 864 * each of the commands. * 865 ********************************************************************************** 866 867 BLOCK 868 ENTRY HELPR HELP command 869 870 VARS 00001C48 871 MESPTR BSS 1 holds pointer to current line of help output 872 PROG 873 00002177 874 HELPR LABEL 02177 DC4026F8 875 CALLNP FETCHITEMR fetch the next item (command name) 02178 F678217E 1 876 JBT R1/BIT 28 GENERAL give general help if no command name 02179 F27C217E 1 877 JBF R1/BIT 30 BADFORM must be symbol 0217A 6144000B 5 IMM 878 LD R5 COMNDTABL-1 get number of commands in table 0000217B 879 HELPCOMLP LABEL 0217B 66AA20F0 23 5 880 CPR2 R2 COMNDTAB(R5) look for this command 0217C FE022180 881 JEQ HELPCOMFND jump if found 0217D FB66217B 5 882 JDR R5 HELPCOMLP go back until done 883 * \ / sorry, no such command 884 0000217E 885 BADFORM LABEL 0000217E 886 GENERAL LABEL 0217E 600421A1 0 IMM 887 LD R0 ADR HIGENHELP get pointer to general help 0217F FE0E2181 888 JMP HELPWPTR and go to general printer 889 * --- 890 00002180 891 HELPCOMFND LABEL 02180 602A2198 0 5 892 LD R0 COMMHELPT(R5) get pointer to the appropriate text 00002181 893 HELPWPTR LABEL 02181 E4001C48 0 894 ST R0 MESPTR and save for following code 00002182 895 HELPNXTLIN LABEL message pointer in R0 02182 60440064 1 IMM 896 LD R1 100 all lines are shorter than this 02183 60840000 2 IMM 897 LD R2 0 we will look for the terminator (null) 02184 FE560000 898 CSRCH look for its end 02185 FE0C218D 899 JNE HELPERR must find terminator 02186 30440064 1 IMM 900 RSB R1 100 make line length 02187 FA42203B 1 901 JEQZ R1 MC if another null, done with help 02188 38960801 2 0 BASE 902 LEA R2 R0,1 make word address of next word 02189 E0801C48 2 903 EXCH R2 MESPTR put this away for next search, and get last to print 0218A DC5013F4 @ 904 CALLNP @VWRITELINE print out the line 0218B 60001C48 0 905 LD R0 MESPTR pick up the message pointer 0218C FE0E2182 906 JMP HELPNXTLIN and go for the next line 907 * --- 908 0000218D 909 HELPERR LABEL 0218D DC002A03 910 CALL PREPOUTR call to output desperation message 0218E 40002190 911 PARL HELPBUG must be bug in internal messages 0218F FE0E203B 912 JMP MC and back to main control 913 * --- 914 02190 202A2A2A 915 HELPBUG TEXTZ " *** bug in help routine ***" 916 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 32 F 0 Command: "Help" 00002198 917 COMMHELPT LABEL pointers to the help messages 02198 000021BF 918 VFD ADR HIBOOT 02199 000021DE 919 VFD ADR HICOMMAND 0219A 000021ED 920 VFD ADR HIDISK 0219B 0000220C 921 VFD ADR HIGO 922 0219C 00002224 923 VFD ADR HIHELP 0219D 0000222B 924 VFD ADR HILOAD 0219E 00002263 925 VFD ADR HIPRTERRLG 0219F 00002273 926 VFD ADR HIRUN 927 021A0 000022AA 928 VFD ADR HISLEEP 929 000021A1 930 HIGENHELP LABEL 021A1 20466F72 931 TEXTZ " For a list of valid commands, type 'Commands'. For help" 021B0 20776974 932 TEXTZ " with a specific command, type 'help '." 021BE 00000000 933 VFD 0 000021BF 934 HIBOOT LABEL 021BF 20466F72 935 TEXTZ " Format: Boot []" 021C7 20202020 936 TEXTZ " This command is used to simulate the operation of" 021D5 20626F6F 937 TEXTZ " booting from the front panel." 021DD 00000000 938 VFD 0 000021DE 939 HICOMMAND LABEL 021DE 20202020 940 TEXTZ " This command prints a list of the valid commands." 021EC 00000000 941 VFD 0 000021ED 942 HIDISK LABEL 021ED 20202020 943 TEXTZ " This command allows the operator to specify a hardware" 021FD 20646973 944 TEXTZ " disk address for use by subsequent disk operations." 0220B 00000000 945 VFD 0 0000220C 946 HIGO LABEL 0220C 20202020 947 TEXTZ " This command starts the offline program previously" 0221B 206C6F61 948 TEXTZ " loaded by the LOAD command." 02223 00000000 949 VFD 0 00002224 950 HIHELP LABEL 02224 20202020 951 TEXTZ " You do need help." 0222A 00000000 952 VFD 0 0000222B 953 HILOAD LABEL 0222B 20466F72 954 TEXTZ " Format: LOAD .:[.]" 0223A 20202020 955 TEXTZ " This command loads a copy of the specified program" 02249 20696E74 956 TEXTZ " into memory to allow patching or whatever before it is" 02257 20737461 957 TEXTZ " started. See the GO command to start it." 02262 00000000 958 VFD 0 00002263 959 HIPRTERRLG LABEL 02263 20202020 960 TEXTZ " This command prints out the resident disk error log." 02272 00000000 961 VFD 0 00002273 962 HIRUN LABEL 02273 20466F72 963 TEXTZ " Format: RUN .:[.]" 02282 20202020 964 TEXTZ " This command is used to run a specified offline" 02290 2070726F 965 TEXTZ " program. RUN is provided in case the program name" 0229D 2073686F 966 TEXTZ " should happen to conflict with a command name." 022A9 00000000 967 VFD 0 000022AA 968 HISLEEP LABEL 022AA 20202020 969 TEXTZ " This command puts 'ZZZZ's into the front panel" 022B8 20646973 970 TEXTZ " display to show completion and halts to return control" 022C6 20746F20 971 TEXTZ " to the RDU program or RITA box." 022CF 00000000 972 VFD 0 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 33 F 0 Command: "Help" 000022D0 973 HIERROR LABEL 022D0 202A2A2A 974 TEXTZ " *** no corresponding command ***" 022D9 00000000 975 VFD 0 976 BADFORM 0000217E F 0 877j 885= COMMHELPT 00002198 F 0 892 917= +COMNDTAB 000020F0 F 0 880 +COMNDTABL 0000000C F 0 878 +FETCHITEMR UUUUUUUU F 0 875 GENERAL 0000217E F 0 876j 886= HELPBUG 00002190 F 0 911a 915= HELPCOMFND 00002180 F 0 881j 891= HELPCOMLP 0000217B F 0 879= 882j HELPERR 0000218D F 0 899j 909= HELPNXTLIN 00002182 F 0 895= 906j +HELPR 00002177 F 0 868 874= HELPWPTR 00002181 F 0 888j 893= HIBOOT 000021BF F 0 918a 934= HICOMMAND 000021DE F 0 919a 939= HIDISK 000021ED F 0 920a 942= HIERROR 000022D0 F 0 973= HIGENHELP 000021A1 F 0 887a 930= HIGO 0000220C F 0 921a 946= HIHELP 00002224 F 0 923a 950= HILOAD 0000222B F 0 924a 953= HIPRTERRLG 00002263 F 0 925a 959= HIRUN 00002273 F 0 926a 962= HISLEEP 000022AA F 0 928a 968= +MC 0000203B F 0 901j 912j MESPTR 00001C48 F 0 871= 894s 903s 905 +PREPOUTR UUUUUUUU F 0 910 +PROG MACRO F 0 872 +PROGRAM! 00002177 F 0 870= 870e 872a +PSECT! 00000000 F 0 870a 870e 870a 870= 870e 872e 872e 872a 872a 872= +VARIABLES! 00001C49 F 0 870a 872= 872e +VARS MACRO F 0 870 +VWRITELINE 000013F4 F 0 904 977 END 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 34 F 0 Command: "Help" 979 980 BLOCK 981 982 ENTRY SLEEPR 983 984 ********************************************************************************** 985 * * 986 * SLEEP * 987 * This command will merely put "ZZZZZ..." into the lights * 988 * and halt. This is to provide an easy exit back to the RFP. * 989 * * 990 ********************************************************************************** 991 000022DA 992 SLEEPR LABEL 022DA DC5013E3 @ 993 CALLNP @VDISPLAY 022DB 5A5A5A5A 994 ASCII 2,ZZZZZZ.. "ZZZZZZ... " 022DD 2E200000 995 VFD ". " AND 03F3F0000 022DE 003FFFFF 996 HALT NOHALTCODE 997 * --- 998 +SLEEPR 000022DA F 0 982 992= +VDISPLAY 000013E3 F 0 993 999 END 1000 INPUT BOOT.OPSYS:OPENDISK 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 35 (OPENDISK) F 16 open disk routine 3 4 ********************************************************************************** 5 * * 6 * Revision Date * 7 * -------- ---- * 8 * 1.0 01 Apr 82 * 9 * First release as separate file. * 10 * * 11 * 1.1 26 Oct 82 * 12 * References to PFWNDOx made via OPLVECTORS * 13 * * 14 * 1.2 27 Jun 83 * 15 * WRUTYPE now WRU0TYPE. (no change in code) * 16 * * 17 * 1.3 27 Oct 83 * 18 * DCB now gets physical pack size (from pack label) * 19 * * 20 * 1.4 17 Dec 86 * 21 * Flags words in DCB now cleared. RC * 22 * * 23 * A8912 14 Dec 89 * 24 * Clear LUN and MAIMNT fields in DCB, which are defined by ONPL. CG * 25 * * 26 * A9003 14 Mar 90 * 27 * Clear NORETRY flag in DCB. CG * 28 * A9108 01 Aug 91 * 29 * Added code to clear DCBSCSIbit to indicate NOT a SCSI disk drive. * 30 * A9206 10 Jun 92 * 31 * Added code to clear the entire DCB block, fixes problem of storing * 32 * into uninitialized memory. * 33 * * 34 ********************************************************************************** 35 36 ********************************************************************************** 37 * * 38 * OPENDISK. * 39 * This routine will initialize a disk control block. * 40 * It will parse a disk name, read the pack label to set the * 41 * number of sectors per track and tracks per cylinder, and * 42 * will build the substitution list. * 43 * Call: * 44 * LD R4 pointer to disk control block * 45 * LD R0 pak6 disk name (DSKscu), or zero if DCBPFILE * 46 * and DCBUNIT are already set. * 47 * LD R1 pointer to area to use for substitution list, * 48 * or zero to use system's area. * 49 * LD R2 size of area for substitution list (only if * 50 * R1 is non-zero). * 51 * CALLNP OPENDISK * 52 * JNEZ R0 * 53 * * 54 * Return codes (in R0): * 55 * * 56 * 0 - Everything went well. * 57 * 1 - Invalid format of disk name. * 58 * 2 - Requested device is not a disk. * 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 36 (OPENDISK) F 16 open disk routine 59 * 3 - Disk is offline. * 60 * 4 - Error reading pack label. * 61 * 5 - Error reading volume label. * 62 * 6 - Error reading substitution block. * 63 * 7 - Not enough space for substitution list. * 64 * * 65 * Eats R0-R3. * 66 * stack required = 13 * 67 * 3 + READ(10) * 68 * * 69 ********************************************************************************** 70 71 BLOCK open disk routine 72 73 ENTRY OPENDISK 74 75 BEGFRAME 00178801 6 BASE 76 SUBSAREA BSS 2 saves subs list pointer and size 77 ENDFRAME 78 022DF DD5F8003 6 STAK 79 OPENDISK ENTRNP PUSH 022E0 E6578801 126 BASE 80 ST2 R1 SP,SUBSAREA remember subs list area pointer and size 81 82 * Clear out all fields in the DCB (initialize memory) 022E1 38970802 2 4 BASE 83 LEA R2 R4,DCBFILLADR address to start the fill 022E2 60440018 1 IMM 84 LD R1 DCBFILLLEN*CPW DCB fill length in bytes 022E3 DA800800 2 1 85 FILLI R2 R1 00 fill with zeroes 86 87 * Set DCBPFILE and DCBUNIT. 022E4 FA0222F6 0 88 JEQZ R0 HAVEDISK jump if already set 022E5 EC170800 4 BASE 89 STZ R4,DCBPFILE clean out the page file word 022E6 1000234D 0 90 SUB R0 DSK000 R0 = (slot * 40 + chan) * 40 + unit 022E7 58C40010 IMM 91 IORPSR PSRMODIF set funky arithmetic 022E8 62120000 010 REG 92 LD2 R0 R0 position in registers, R0 = 0 022E9 14040028 0 IMM 93 DIV R0 40 R0 = slot * 40 + chan, R1 = unit 022EA 68440008 1 IMM 94 UCPR R1 BFDUNITS test for illegal unit number 022EB FE062342 95 JGE BADNAME jump if unit out of range 022EC E4570801 1 4 BASE 96 ST R1 R4,DCBUNIT save unit in control block 022ED 62120000 010 REG 97 LD2 R0 R0 position in registers, R0 = 0 022EE 14040028 0 IMM 98 DIV R0 40 R0 = slot, R1 = channel 022EF 68440004 1 IMM 99 UCPR R1 PPUCHANS test for illegal channel number 022F0 FE062342 100 JGE BADNAME jump if channel out of range 022F1 E4493020 1 4 ZBM 101 ST R1 R4,DCBPFILE/PPUCHAN save channel in PF value 022F2 68040010 0 IMM 102 UCPR R0 NUMSLOTS test for illegal slot 022F3 FE062342 103 JGE BADNAME jump if slot out of range 022F4 E4090840 0 4 ZBM 104 ST R0 R4,DCBPFILE/PFSLOT save slot number in PF value 022F5 58840010 IMM 105 CLBPSR PSRMODIF restore normalcy to arithmetic 106 * \ / 000022F6 107 HAVEDISK LABEL 108 109 * See if we really have a disk. 022F6 60090840 0 4 ZBM 110 LD R0 R4,DCBPFILE/PFSLOT R0 = slot number 022F7 60200370 0 0 111 LD R0 IBSLOTS(R0) R0 = WRU response from slot 022F8 600A0040 0 0 CBM 112 LD R0 R0/WRU0TYPE R0 = type field of WRU0 response 022F9 64040003 0 IMM 113 CPR R0 SLTTPPU is it a PPU? 022FA FE0C2343 114 JNE BADDISK jump if not 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 37 (OPENDISK) F 16 open disk routine 022FB 60C40086 3 IMM 115 LD PFPTR PNCIX get dedicated PF address 022FC 00D70800 4 BASE 116 LDPF R4,DCBPFILE map in the controller 022FD 60001800 0 117 LD R0 CIX(PPUCABLED) get the device WRU response 022FE 600A0080 0 0 CBM 118 LD R0 R0/DWRUTYPE R0 = device type field 022FF 64040001 0 IMM 119 CPR R0 DVCTBFD is it a disk controller? 02300 FE0C2343 120 JNE BADDISK jump if not 02301 60570801 1 4 BASE 121 LD R1 R4,DCBUNIT pick up unit number for use as index 02302 60040020 0 IMM 122 LD R0 BFDFNSAFE code to clear 'not ready' latch 02303 E4221A28 0 1 123 ST R0 CIX(BFDFUNC+BFDSELECTB+R1) reset drive not safe status 02304 60001A20 0 124 LD R0 CIX(BFDSS) get the device status 02305 F62E2344 0 125 JBT R0/BFDSSRSPER OFFLINE jump if response error 02306 F2082344 0 126 JBF R0/BFDSSRDY OFFLINE jump if not ready 127 128 * Initialize fields to read pack label. 02307 EDD70802 4 BASE 129 STW R4,DCBSECPTRK set sectors per track 02308 EDD70803 4 BASE 130 STW R4,DCBTRKPCYL set tracks per cylinder 02309 EC170804 4 BASE 131 STZ R4,DCBSUBLIST indicate no subs list 0230A EDD70805 4 BASE 132 STW R4,DCBVOLSIZE set physical pack size 0230B EE170806 4 BASE 133 STZ2 R4,DCBWORD clear flags words 0230C EC090816 4 ZBM 134 STZ R4,DCBSCSI sez NOT a SCSI drive 135 136 * Read the pack label and set dimensions of the disk. 0230D DC002408 137 CALL READ 0230E 41440000 IMM 138 PARV PLDA block number 0230F 415013E8 @ 139 PARV @VPFWNDO1 where to put block 02310 4100031F 140 PAR BOOTFBIBF where to put FBI 02311 41440001 IMM 141 PARV FBITPL expected FBI type 02312 40002345 142 PARL BADPACKLBL where to go if error 143 02313 60000810 0 144 LD R0 WNDO1/PLSECPTRK 02314 E4170802 0 4 BASE 145 ST R0 R4,DCBSECPTRK set sectors per track 02315 60000811 0 146 LD R0 WNDO1/PLTRKPCYL 02316 E4170803 0 4 BASE 147 ST R0 R4,DCBTRKPCYL set tracks per cylinder 02317 60000813 0 148 LD R0 WNDO1/PLSIZE 02318 E4170805 0 4 BASE 149 ST R0 R4,DCBVOLSIZE set physical pack size 150 151 * Read the volume label. 02319 DC002408 152 CALL READ 0231A 41440001 IMM 153 PARV VOLLABELDA block number 0231B 415013E8 @ 154 PARV @VPFWNDO1 where to put it 0231C 4100031F 155 PAR BOOTFBIBF where to put FBI 0231D 41440004 IMM 156 PARV FBITVL expected FBI type 0231E 40002346 157 PARL BADVOLLBL where to go if error 158 0231F 5C000810 159 CMZ WNDO1/VLSUBSDA is there a substitution block? 02320 FE022340 160 JEQ RETURN jump if not 161 162 * Read the substitution block 02321 DC002408 163 CALL READ 02322 41400810 164 PARV WNDO1/VLSUBSDA block number 02323 415013E8 @ 165 PARV @VPFWNDO1 where to put block 02324 4100031F 166 PAR BOOTFBIBF where to put FBI 02325 41440005 IMM 167 PARV FBITSUBS expected FBI type 02326 40002347 168 PARL BADSUBBLK where to go if error 169 * \ / 170 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 38 (OPENDISK) F 16 open disk routine 171 ********************************************************************************** 172 * * 173 * Build the substitution list. * 174 * Register usage: * 175 * R0 - pointer to entry in substitution block (WNDO1) * 176 * R1 - pointer to next available word of free space * 177 * R2 - amount of free space left * 178 * R3 - pointer to previous substitution list element * 179 * * 180 ********************************************************************************** 181 182 * \ / 02327 60040800 0 IMM 183 LD R0 ADR WNDO1 => substitution list image 02328 62578801 126 BASE 184 LD2 R1 SP,SUBSAREA restore user's parms. 02329 FA4C232D 1 185 JNEZ R1 HAVEAREA jump if user supplied area 0232A 604013ED 1 186 LD R1 VMEMSPACE else load address of our area 0232B 6084178C 2 IMM 187 LD R2 ADR SUBLISTEND 0232C 10924000 2 1 REG 188 SUB R2 R1 R2 = size left in our area 0000232D 189 HAVEAREA LABEL 0232D 38D70804 3 4 BASE 190 LEA R3 R4,DCBSUBLIST initialize current list pointer 191 * \ / 192 0000232E 193 SUBSLOOP LABEL 0232E 5C160800 0 BASE 194 CMZ R0,SUBSBADDY beyond end of block? 0232F FE02233C 195 JEQ SUBSDONE jump if yes 02330 10840003 2 IMM 196 SUB R2 3 make room for our entry 02331 FA882348 2 197 JLTZ R2 NOSUBSPACE jump if out of space 02332 E456C800 1 3 BASE 198 ST R1 R3,0 link new element onto chain 02333 60D60800 3 0 BASE 199 LD R3 R0,SUBSBADDY 02334 E4D64801 3 1 BASE 200 ST R3 R1,1 save bad block number 02335 60D60801 3 0 BASE 201 LD R3 R0,SUBSSUB 02336 E4D64802 3 1 BASE 202 ST R3 R1,2 save substitute block number 02337 60D24000 3 1 REG 203 LD R3 R1 R3 -> new entry 02338 60565003 1 1 REG 204 LD R1 R1+3 R1 -> next word of free space 02339 60161002 0 0 REG 205 LD R0 R0+SUBSLNTH R0 -> next entry in block 0233A 64040C00 0 IMM 206 CPR R0 ADR WNDO1(WPP) beyond end of block? 0233B FE08232E 207 JLT SUBSLOOP jump if not 208 * \ / 0000233C 209 SUBSDONE LABEL 0233C EC16C800 3 BASE 210 STZ R3,0 terminate linked list 0233D 5C178801 6 BASE 211 CMZ SP,SUBSAREA did we use our area? 0233E FE0C2340 212 JNE NOTOURS jump if used user's area 0233F E44013ED 1 213 ST R1 VMEMSPACE else update our free space pointer 00002340 214 NOTOURS LABEL 215 * \ / 00002340 216 RETURN LABEL 02340 60040000 0 IMM 217 LD R0 0 good return code 218 * \ / 00002341 219 GOBACK LABEL 02341 5D1F8003 6 STAK 220 LEAVE POP return to user 221 * --- 222 223 * Error returns 00002342 224 ERRORRET LABEL 02342 FA282349 0 225 BADNAME JSR R0 CALCRETC 1 - invalid disk name 02343 FA282349 0 226 BADDISK JSR R0 CALCRETC 2 - device is not a disk 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 39 (OPENDISK) F 16 open disk routine 02344 FA282349 0 227 OFFLINE JSR R0 CALCRETC 3 - disk is not online 02345 FA282349 0 228 BADPACKLBL JSR R0 CALCRETC 4 - pack label is bad 02346 FA282349 0 229 BADVOLLBL JSR R0 CALCRETC 5 - volume label is bad 02347 FA282349 0 230 BADSUBBLK JSR R0 CALCRETC 6 - substitution block is bad 02348 FA282349 0 231 NOSUBSPACE JSR R0 CALCRETC 7 - insufficient space for subs list 232 * --- 233 00002349 234 CALCRETC LABEL 02349 58840010 IMM 235 CLBPSR PSRMODIF clear funny arithmetic, if in use 0234A 10042342 0 IMM 236 SUB R0 ADR ERRORRET R0 = return code 0234B EC170804 4 BASE 237 STZ R4,DCBSUBLIST make sure substitution list is empty 0234C FE0E2341 238 JMP GOBACK and return 239 * --- 240 0234D 59F45869 241 DSK000 PAK6 DSK000 base for disk name unpacker 242 BADDISK 00002343 F 16 114j 120j 226= BADNAME 00002342 F 16 95j 100j 103j 225= BADPACKLBL 00002345 F 16 142a 228= BADSUBBLK 00002347 F 16 168a 230= BADVOLLBL 00002346 F 16 157a 229= CALCRETC 00002349 F 16 225j 226j 227j 228j 229j 230j 231j 234= +DCBFILLADR 00160802 F 16 83a +DCBFILLLEN 00000006 F 16 84 +DCBPFILE 00160800 F 16 89s 101s 104s 110 116 +DCBSCSI 00080816 F 16 134s +DCBSECPTRK 00160802 F 16 129s 145s +DCBSUBLIST 00160804 F 16 131s 190a 237s +DCBTRKPCYL 00160803 F 16 130s 147s +DCBUNIT 00160801 F 16 96s 121 +DCBVOLSIZE 00160805 F 16 132s 149s +DCBWORD 00160806 F 16 133s DSK000 0000234D F 16 90 241= ERRORRET 00002342 F 16 224= 236a GOBACK 00002341 F 16 219= 238j HAVEAREA 0000232D F 16 185j 189= HAVEDISK 000022F6 F 16 88j 107= NOSUBSPACE 00002348 F 16 197j 231= NOTOURS 00002340 F 16 212j 214= OFFLINE 00002344 F 16 125j 126j 227= +OPENDISK 000022DF F 16 73 79= +READ UUUUUUUU F 16 137 152 163 RETURN 00002340 F 16 160j 216= +SUBLISTEND UUUUUUUU F 16 187a SUBSAREA 00178801 F 16 76= 80s 184 211 SUBSDONE 0000233C F 16 195j 209= SUBSLOOP 0000232E F 16 193= 207j +VMEMSPACE 000013ED F 16 186 213s +VPFWNDO1 000013E8 F 16 139 154 165 243 END of open disk routine 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 40 (OPENDISK) F 16 close disk routine 246 247 ********************************************************************************** 248 * * 249 * CLOSEDISK. * 250 * Routine to clean up a disk control block. Here, we * 251 * free up the space used by the substitution list if: * 252 * 1) It was allocated from our area, and * 253 * 2) Nothing has been allocated from our area since it was. * 254 * Call: * 255 * LD R4 pointer to disk control block * 256 * CALLNP CLOSEDISK * 257 * * 258 * Eats R0-R3. * 259 * stack required = 1 * 260 * * 261 ********************************************************************************** 262 263 BLOCK close disk routine 264 265 ENTRY CLOSEDISK 266 267 BEGFRAME 268 ENDFRAME 269 0234E DD5F8001 6 STAK 270 CLOSEDISK ENTRNP PUSH 0234F 60040000 0 IMM 271 LD R0 0 02350 38570804 1 4 BASE 272 LEA R1 R4,DCBSUBLIST pick up existing sub list pointer 02351 3C164800 0 1 BASE 273 LSRCH R0 R1,0 R1 -> last element on subs list 02352 60565003 1 1 REG 274 LD R1 R1+3 R1 -> after last element 02353 644013ED 1 275 CPR R1 VMEMSPACE does free memory start here? 02354 FE0C2357 276 JNE DONTFREE jump if not 02355 60570804 1 4 BASE 277 LD R1 R4,DCBSUBLIST use this sub list pointer as now free 02356 E44013ED 1 278 ST R1 VMEMSPACE free up the substitution list 279 * \ / 00002357 280 DONTFREE LABEL 02357 5D1F8001 6 STAK 281 LEAVE POP 282 * --- 283 +CLOSEDISK 0000234E F 16 265 270= +DCBSUBLIST 00160804 F 16 272a 277 DONTFREE 00002357 F 16 276j 280= +VMEMSPACE 000013ED F 16 275 278s 284 END of close disk routine 1001 INPUT BOOT.OPSYS:SRCHDIR 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 41 (SRCHDIR) F 17 directory searcher 3 4 ********************************************************************************** 5 * * 6 * Revision Date * 7 * -------- ---- * 8 * 1.0 1 April 82 * 9 * First release as separate file. * 10 * 1.1 11 Aug 82 * 11 * Addition of SRCHDIRSN for file serial number search. * 12 * 1.2 26 Oct 82 * 13 * references to PFWNDOx made via OPLVECTORS. * 14 * 1.3 08 Sep 84 * 15 * changes to reduce code size. * 16 * 1.4 04 Dec 84 * 17 * get time zone out of security block and save it * 18 * on IBLOCK (IZONEWORD) whenever security block is read. * 19 * * 20 ********************************************************************************** 21 22 ********************************************************************************** 23 * * 24 * SRCHDIR. Routine that searches the specified directory * 25 * for the specified file. It reads the volume label to find * 26 * the security block which is read to find the IDX which is * 27 * read to find the accounts directory which is read to find * 28 * the file. R3 is returned either zero, saying not found, or * 29 * a pointer to the directory entry. * 30 * Call: * 31 * * 32 * LD R4 => disk control block * 33 * LD R5 => file descriptor (see below) * 34 * CALLNP SRCHDIR * 35 * JZA R3 not found * 36 * * 37 * The block pointed to by R5 has the following format: * 38 * * 39 *BLOCK LABEL * 40 * PAK12 account name * 41 * PAK6 project name * 42 * VFD 0,0 (room for password) * 43 * PAK12 filename * 44 * PAK6 file extension * 45 * VFD 0,0 (room for password) * 46 * * 47 * If R3 returns zero saying not found, then R0 returns a code * 48 * saying why it wasn't. Codes are: * 49 * 1 - disk error: volume label * 50 * 2 - " " : security block * 51 * 3 - " " : IDX * 52 * 4 - " " : directory * 53 * 5 - account does not exist * 54 * 6 - file does not exist * 55 * * 56 * On return, R1 contains the address of a block describing * 57 * where the various tables that were searched are located. See * 58 * label SRCHRESULT below for the format of this block. * 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 42 (SRCHDIR) F 17 directory searcher 59 * * 60 * SRCHDIRSN. This call has the same form as for SRCHDIR but in * 61 * place of the file name in the descriptor, the file serial number * 62 * is given by the caller. Returns are the same as for SRCHDIR. * 63 * * 64 * The routine destroys R0-R3, WNDO1, WNDO2. * 65 * Stack required: 11 * 66 * 1 + max(READ(10)) * 67 * * 68 ********************************************************************************** 69 70 BLOCK directory searcher 71 72 ENTRY SRCHDIR 73 ENTRY SRCHDIRSN 74 00002358 75 SRCHRESULT LABEL info placed here by SRCHDIR 00002358 76 SRCHSECBLK BSS 1 security block number 00002359 77 SRCHIDXBKT BSS 1 IDX bucket number 0000235A 78 SRCHIDXBLK BSS 1 IDX block address 0000235B 79 SRCHIDXOFF BSS 1 offset to entry in IDX block 0000235C 80 SRCHUD1BLK BSS 1 UDIR1 block address 0000235D 81 SRCHUD1OFF BSS 1 offset to entry in UDIR1 block 0000235E 82 SRCHUD2BLK BSS 1 UDIR2 block address 0000235F 83 SRCHUD2OFF BSS 1 offset to entry in UDIR2 block 00000008 ABS 84 SRCHBLKLEN EQU DISPW SRCHRESULT size of block in words 85 * NOTE: All fields are initialized to -1. 86 * All inapplicable fields stay that way. 87 88 BEGFRAME 89 ENDFRAME 90 000BC010 7 CBM 91 SRCHTYPE EQU R7/BIT 0 flag for search type (0=name, 1=serial number) 000BC210 7 CBM 92 ENDFLAG EQU R7/BIT 1 marker for two full passes of the UDIR end 93 02360 DD5F8001 6 STAK 94 SRCHDIRSN ENTRNP PUSH 02361 EDCBC010 7 CBM 95 STW SRCHTYPE say this is serial number srch 02362 FE0E2365 96 JMP SD10 then merge right in 97 * --- 98 99 02363 DD5F8001 6 STAK 100 SRCHDIR ENTRNP PUSH 02364 EC0BC010 7 CBM 101 STZ SRCHTYPE say this is normal search 00002365 102 SD10 LABEL 02365 60440020 1 IMM 103 LD R1 SRCHBLKLEN*CPW 02366 60842358 2 IMM 104 LD R2 ADR SRCHRESULT get result block address 02367 FE5800FF 105 CFILL 0FF clear out the result block 106 * \ / 107 108 ********************************************************************************** 109 * Read the volume label. It contains the pointers that * 110 * we need to find the security block. * 111 ********************************************************************************** 112 113 * \ / 02368 DC002408 114 CALL READ get the volume label in 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 43 (SRCHDIR) F 17 directory searcher 02369 41440001 IMM 115 PARV VOLLABELDA pass address of label 0236A 415013E8 @ 116 PARV @VPFWNDO1 pass PF value for window 1 0236B 4100031F 117 PAR BOOTFBIBF pass FBI buffer address 0236C 41440004 IMM 118 PARV FBITVL indicate expected FBI type 0236D 400023FE 119 PARL VOLLBAD error addr for bad volume label 120 * \ / 121 122 ********************************************************************************** 123 * Read the security block from the system volume that * 124 * is being used. * 125 ****** should try for secondary SEC block on error ***** * 126 ********************************************************************************** 127 128 * \ / 0236E 60000812 0 129 LD R0 WNDO1(VLSECBDA) get the addr of the security block 0236F E4002358 0 130 ST R0 SRCHSECBLK save security block address 02370 DC002408 131 CALL READ get the security block in 02371 41520000 0 REG 132 PARV R0 pass its address 02372 415013E8 @ 133 PARV @VPFWNDO1 pass PF value for window 1 02373 4100031F 134 PAR BOOTFBIBF pass FBI buffer address 02374 41440006 IMM 135 PARV FBITSEC indicate expected FBI type 02375 400023FF 136 PARL SECBAD error addr for bad security block 02376 60000A26 0 137 LD R0 WNDO1(SECTZONE) get the time zone out of here 02377 E400032F 0 138 ST R0 IZONEWORD put it in the IBLOCK 139 * \ / 140 141 ********************************************************************************** 142 * Read the IDX on this volume. Search for the requested * 143 * account. Note that the hash function takes us right to the * 144 * correct IDX block. We need to move to the next IDX block only * 145 * if the one where we started is completely full (either good * 146 * entries or 'deleted' entries, indicated by -1s) indicating * 147 * that the desired entry might have been put in a subsequent * 148 * block. * 149 ********************************************************************************** 150 151 * \ / 152 * Use the macro to make the hash code 153 IDXHASH R0,R1,(R5,SYSACCT),(R5,SYSPROJ),WNDO1(SECIDXSIZ) 02378 62174800 015 BASE 153 LD2 R0 (R5,SYSACCT) get the account name into R0 and R1 02379 744A1000 1 0 CBM 153 XOR R1 R0/BITS 8:7 mix up the account number 0237A 60174802 0 5 BASE 153 LD R0 (R5,SYSPROJ) fetch up the project 0237B 744A2000 1 0 CBM 153 XOR R1 R0/BITS 16:15 mix in the project shifted 0237C 60040000 0 IMM 153 LD R0 0 initialize register for marth 0237D 58C40010 IMM 153 IORPSR PSRMODIF say that we want the remainder 0237E 14000828 0 153 DIV R0 WNDO1(SECIDXSIZ) divide by number of buckets 0237F 58840010 IMM 153 CLBPSR PSRMODIF restore normalcy 02380 EC0BC210 7 CBM 154 STZ ENDFLAG clear loop end indicator 00002381 155 INTONEXT LABEL 02381 E4402359 1 156 ST R1 SRCHIDXBKT remember bucket being searched 02382 6022082C 0 1 157 LD R0 WNDO1/SECIDXPTR(R1) get pointer to bucket 02383 FA022402 0 158 JEQZ R0 NOACCT jump if none here 02384 E400235A 0 159 ST R0 SRCHIDXBLK remember IDX block number 02385 DC002408 160 CALL READ read the bucket in 02386 41520000 0 REG 161 PARV R0 pass its address 02387 415013E9 @ 162 PARV @VPFWNDO2 pass PMV for window 2 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 44 (SRCHDIR) F 17 directory searcher 02388 4100031F 163 PAR BOOTFBIBF pass FBI buffer address 02389 41440008 IMM 164 PARV FBITIDX indicate expected FBI type 0238A 40002400 165 PARL IDXBAD error address for bad IDX 166 0238B 60C40C00 3 IMM 167 LD R3 ADR WNDO2 0238C 62174800 015 BASE 168 LD2 R0 R5,SYSACCT pick up the name ... 0238D 60974802 2 5 BASE 169 LD R2 R5,SYSPROJ ... and project that we are searching for 170 * \ / 0000238E 171 TRYNEXT LABEL 0238E 5E16C800 3 BASE 172 CMZ2 R3,IDXACNO end of this block? 0238F FE0C2392 173 JNE NOTEMPTY jump if not 02390 5C16C802 3 BASE 174 CMZ R3,IDXACNOP 02391 FE022402 175 JEQ NOACCT if yes, account does not exist 176 * \ / 00002392 177 NOTEMPTY LABEL 02392 6616C800 013 BASE 178 CPR2 R0 R3,IDXACNO is this a matching account? 02393 FE0C2396 179 JNE MOVETONEXT jump if not 02394 6496C802 2 3 BASE 180 CPR R2 R3,IDXACNOP 02395 FE0223A0 181 JEQ FOUNDACCT jump if yes 182 * \ / 00002396 183 MOVETONEXT LABEL 02396 18C40005 3 IMM 184 ADD R3 IDXLNTH move pointer to next bucket 02397 64C40FFC 3 IMM 185 CPR R3 ADR WNDO2(IDXECNT*IDXLNTH) past the end? 02398 FE08238E 186 JLT TRYNEXT jump back if entries remain 187 * \ / 188 189 * The block seems full so we move onto the next one 02399 BC402359 1 190 INCL R1 SRCHIDXBKT increment buffer pointer 0239A 64400828 1 191 CPR R1 WNDO1(SECIDXSIZ) check for wrap around 0239B FE082381 192 JLT INTONEXT jump if more buckets ahead 0239C F7C22402 7 193 JBT ENDFLAG NOACCT jump if second time around 0239D 60440000 1 IMM 194 LD R1 0 wrap around to first bucket 0239E EDCBC210 7 CBM 195 STW ENDFLAG remember that we have passed the end once 0239F FE0E2381 196 JMP INTONEXT 197 * --- 198 199 ********************************************************************************** 200 * * 201 * We have found the MS address of the indicated * 202 * account. Search the directory for the file whose name * 203 * is in NAME and NAMEEXT. * 204 * * 205 ********************************************************************************** 206 000023A0 207 FOUNDACCT LABEL 023A0 6016C803 0 3 BASE 208 LD R0 R3,IDXDIRDA get block number of directory 023A1 E400235C 0 209 ST R0 SRCHUD1BLK remember it 023A2 10C40C00 3 IMM 210 SUB R3 ADR WNDO2 R3 = offset in IDX block 023A3 E4C0235B 3 211 ST R3 SRCHIDXOFF remember that, too 023A4 DC002408 212 CALL READ request the mass storage block 023A5 41520000 0 REG 213 PARV R0 indicate directory address 023A6 415013E8 @ 214 PARV @VPFWNDO1 indicate the page map value 023A7 4100031F 215 PAR BOOTFBIBF and buffer for the FBI 023A8 41440009 IMM 216 PARV FBITUDIR1 indicate expected FBI type 023A9 40002401 217 PARL DIRBAD error address for bad directory 218 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 45 (SRCHDIR) F 17 directory searcher 023AA 60040800 0 IMM 219 LD R0 ADR WNDO1 get a pointer to the beginning 023AB 5C08001A 0 ZBM 220 CMZ R0,UDTYPE check whether small or large DIR 023AC FE0C23CD 221 JNE SRCDIRRAF jump on RAF type directory 222 023AD 60C40860 3 IMM 223 LD R3 ADR (WNDO1(UDFDLIST)) 023AE 62174805 015 BASE 224 LD2 R0 R5,NAME get name to search for 023AF F7C023C5 7 225 JBT SRCHTYPE SRCDIRSERN jump if serial number search 000023B0 226 SRCDIRENLP LABEL 023B0 5C16C800 3 BASE 227 CMZ R3,0 is this the end? 023B1 FE022403 228 JEQ NOFILE jump if not found 023B2 6A16C802 013 BASE 229 UCPR2 R0 R3,FDNAME is this the file 023B3 FE0223B9 230 JEQ SRCDIRFND jump if found 023B4 FE082403 231 JLT NOFILE not found if past sort point 000023B5 232 SRCDIRGO LABEL 023B5 18C40018 3 IMM 233 ADD R3 FDLNTH increment pointer 023B6 64C40BE8 3 IMM 234 CPR R3 ADR (WNDO1(UDLFDE)) beyond the end? 023B7 FE0A23B0 235 JLE SRCDIRENLP jump if more to continue with 023B8 FE0E2403 236 JMP NOFILE else give up 237 * --- 238 239 * File found - is this one usable? 000023B9 240 SRCDIRFND LABEL 023B9 60174807 0 5 BASE 241 LD R0 R5,NAMEEXT get this files extension 023BA 6416C804 0 3 BASE 242 CPR R0 R3,FDEXTEN does the extension match? 023BB FE0C23BE 243 JNE SRCDIRRESN jump if not, keep looking 023BC 5C08DE10 3 ZBM 244 CMZ R3,FDFBD is this file being closed? 023BD FE0223C0 245 JEQ FILEFOUND1 jump if a living file 246 * \ / 247 248 * Restore the file name in the registers and continue searching 249 * \ / 000023BE 250 SRCDIRRESN LABEL 023BE 62174805 015 BASE 251 LD2 R0 R5,NAME reload the name 023BF FE0E23B5 252 JMP SRCDIRGO ...and continue on 253 * --- 254 000023C0 255 FILEFOUND1 LABEL 023C0 6012C000 0 3 REG 256 LD R0 R3 R0 -> directory entry 023C1 10040800 0 IMM 257 SUB R0 ADR WNDO1 R0 = offset in UDIR1 block 023C2 E400235D 0 258 ST R0 SRCHUD1OFF remember it 023C3 60040000 0 IMM 259 LD R0 0 zero error code 023C4 FE0E2406 260 JMP RETURN and go home 261 * --- 262 000023C5 263 SRCDIRSERN LABEL (search for serial number) 023C5 5C16C800 3 BASE 264 CMZ R3,0 does this entry exist? 023C6 FE022403 265 JEQ NOFILE jump if not found 023C7 6A16C80A 013 BASE 266 UCPR2 R0 R3,FDSERNO is this the one we want? 023C8 FE0223C0 267 JEQ FILEFOUND1 jump if we hit pay dirt 023C9 18C40018 3 IMM 268 ADD R3 FDLNTH advance to next entry 023CA 64C40BE8 3 IMM 269 CPR R3 ADR(WNDO1(UDLFDE)) beyond the end? 023CB FE0A23C5 270 JLE SRCDIRSERN if not go check another 023CC FE0E2403 271 JMP NOFILE else return sad news 272 * --- 273 274 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 46 (SRCHDIR) F 17 directory searcher 275 ********************************************************************************** 276 * * 277 * Directory is in a RAF type format. In the interest of * 278 * minimum space in the bootstrap, we examine each UDIR2 block * 279 * in turn until we come to ( or pass ) the entry we need. * 280 * * 281 ********************************************************************************** 282 000023CD 283 SRCDIRRAF LABEL 023CD 60040060 0 IMM 284 LD R0 UDFDLIST load offset to the dir index 000023CE 285 SRCDIRRGA LABEL 023CE E400235D 0 286 ST R0 SRCHUD1OFF save the current index position 023CF 38A00800 2 0 287 LEA R2 WNDO1(R0) R2 -> index entry 023D0 60089183 0 2 ZBM 288 LD R0 R2,UDINDXADR R0 = block number of UDIR2 block 023D1 E400235E 0 289 ST R0 SRCHUD2BLK remember it 290 023D2 DC002408 291 CALL READ request the mass storage block 023D3 41520000 0 REG 292 PARV R0 indicate the MS address 023D4 415013E9 @ 293 PARV @VPFWNDO2 indicate the page map value 023D5 4100031F 294 PAR BOOTFBIBF and the address of the FBI buffer 023D6 4144000A IMM 295 PARV FBITUDIR2 indicate expected FBI type 023D7 40002401 296 PARL DIRBAD error address for bad directory 297 023D8 60C40C00 3 IMM 298 LD R3 ADR WNDO2 get the first addr to search 023D9 62174805 015 BASE 299 LD2 R0 R5,NAME pick up file name (or SERNO) 023DA F7C023EA 7 300 JBT SRCHTYPE SRCLKSERN jump if serial number search 000023DB 301 SRCDISENLP LABEL 023DB 5C16C800 3 BASE 302 CMZ R3,0 is this the end? 023DC FE0223E3 303 JEQ SRCDIRRFNF jump if not found 023DD 6A16C802 013 BASE 304 UCPR2 R0 R3,FDNAME is this the file? 023DE FE0223F2 305 JEQ SRCDISFND jump if found 023DF FE082403 306 JLT NOFILE not found if past sort point 000023E0 307 SRCDISGO LABEL 023E0 18C40018 3 IMM 308 ADD R3 FDLNTH increment pointer 023E1 64C40FE8 3 IMM 309 CPR R3 ADR (WNDO2(UDLFDE)) beyond the end? 023E2 FE0A23DB 310 JLE SRCDISENLP jump if more to continue with 311 * \ / 312 313 * Entry was not found in the last block - try next one 314 * \ / 000023E3 315 SRCDIRRFNF LABEL 023E3 6000235D 0 316 LD R0 SRCHUD1OFF get our previous position 023E4 18040005 0 IMM 317 ADD R0 UDINDXLEN advance to the next index entry 023E5 640403F8 0 IMM 318 CPR R0 UD1LINDX are we past the last index entry? 023E6 FE042403 319 JGT NOFILE jump if directory exhausted 023E7 5C200800 0 320 CMZ WNDO1(R0) check for non-existant entry 023E8 FE0C23CE 321 JNE SRCDIRRGA continue through the UDIR1 index 023E9 FE0E2403 322 JMP NOFILE jump at end of index 323 * --- 324 000023EA 325 SRCLKSERN LABEL (search by serial number) 023EA 5C16C800 3 BASE 326 CMZ R3,0 does entry exist? 023EB FE0223E3 327 JEQ SRCDIRRFNF jump if not found in this block 023EC 6A16C80A 013 BASE 328 UCPR2 R0 R3,FDSERNO else check this entry 023ED FE0223F9 329 JEQ FILEFOUND2 jump if we found it 023EE 18C40018 3 IMM 330 ADD R3 FDLNTH advance to next extry 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 47 (SRCHDIR) F 17 directory searcher 023EF 64C40FE8 3 IMM 331 CPR R3 ADR(WNDO2(UDLFDE)) beyond the end? 023F0 FE0A23EA 332 JLE SRCLKSERN if not go try another entry 023F1 FE0E23E3 333 JMP SRCDIRRFNF else see if another block 334 * --- 335 336 ********************************************************************************** 337 * We think that we have found the entry. Check the extension * 338 * to see if it matches, then check to see if we have a file * 339 * being closed. * 340 ********************************************************************************** 341 000023F2 342 SRCDISFND LABEL 023F2 60174807 0 5 BASE 343 LD R0 R5,NAMEEXT get this files extension 023F3 6416C804 0 3 BASE 344 CPR R0 R3,FDEXTEN does the extension match? 023F4 FE0C23F7 345 JNE SRCDISRESN jump if not, keep looking 023F5 5C08DE10 3 ZBM 346 CMZ R3,FDFBD is this file being closed? 023F6 FE0223F9 347 JEQ FILEFOUND2 jump if not being closed, good entry 348 * \ / 349 000023F7 350 SRCDISRESN LABEL 023F7 62174805 015 BASE 351 LD2 R0 R5,NAME reload the name 023F8 FE0E23E0 352 JMP SRCDISGO ... and continue 353 * --- 354 000023F9 355 FILEFOUND2 LABEL 023F9 6012C000 0 3 REG 356 LD R0 R3 R0 -> FDE 023FA 10040C00 0 IMM 357 SUB R0 ADR WNDO2 R0 = offset in UDIR2 023FB E400235F 0 358 ST R0 SRCHUD2OFF remember it 023FC 60040000 0 IMM 359 LD R0 0 no error code 023FD FE0E2406 360 JMP RETURN and return 361 * --- 362 363 364 ********************************************************************************** 365 * * 366 * Never trust a disk. Return error code. * 367 * * 368 ********************************************************************************** 369 000023FE 370 SDERRTAB LABEL 023FE FA282404 0 371 VOLLBAD JSR R0 CALCERRC volume label bad 023FF FA282404 0 372 SECBAD JSR R0 CALCERRC security block bad 02400 FA282404 0 373 IDXBAD JSR R0 CALCERRC account index bad 02401 FA282404 0 374 DIRBAD JSR R0 CALCERRC directory bad 02402 FA282404 0 375 NOACCT JSR R0 CALCERRC account not found 02403 FA282404 0 376 NOFILE JSR R0 CALCERRC file not found 377 00002404 378 CALCERRC LABEL 02404 100423FE 0 IMM 379 SUB R0 ADR SDERRTAB R0=error ordinal 02405 60C40000 3 IMM 380 LD R3 0 set file not found indicator 381 * \ / 00002406 382 RETURN LABEL 02406 60442358 1 IMM 383 LD R1 ADR SRCHRESULT get pointer to result area 02407 5D1F8001 6 STAK 384 LEAVE POP return to caller 385 * --- 386 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 48 (SRCHDIR) F 17 directory searcher CALCERRC 00002404 F 17 371j 372j 373j 374j 375j 376j 378= DIRBAD 00002401 F 17 217a 296a 374= ENDFLAG 000BC210 F 17 92= 154s 193j 195s FILEFOUND1 000023C0 F 17 245j 255= 267j FILEFOUND2 000023F9 F 17 329j 347j 355= FOUNDACCT 000023A0 F 17 181j 207= IDXBAD 00002400 F 17 165a 373= INTONEXT 00002381 F 17 155= 192j 196j MOVETONEXT 00002396 F 17 179j 183= +NAME 00000005 F 17 224 251 299 351 +NAMEEXT 00000007 F 17 241 343 NOACCT 00002402 F 17 158j 175j 193j 375= NOFILE 00002403 F 17 228j 231j 236j 265j 271j 306j 319j 322j 376= NOTEMPTY 00002392 F 17 173j 177= +READ UUUUUUUU F 17 114 131 160 212 291 RETURN 00002406 F 17 260j 360j 382= SD10 00002365 F 17 96j 102= SDERRTAB 000023FE F 17 370= 379a SECBAD 000023FF F 17 136a 372= SRCDIRENLP 000023B0 F 17 226= 235j SRCDIRFND 000023B9 F 17 230j 240= SRCDIRGO 000023B5 F 17 232= 252j SRCDIRRAF 000023CD F 17 221j 283= SRCDIRRESN 000023BE F 17 243j 250= SRCDIRRFNF 000023E3 F 17 303j 315= 327j 333j SRCDIRRGA 000023CE F 17 285= 321j SRCDIRSERN 000023C5 F 17 225j 263= 270j SRCDISENLP 000023DB F 17 301= 310j SRCDISFND 000023F2 F 17 305j 342= SRCDISGO 000023E0 F 17 307= 352j SRCDISRESN 000023F7 F 17 345j 350= SRCHBLKLEN 00000008 F 17 84= 103 +SRCHDIR 00002363 F 17 72 100= +SRCHDIRSN 00002360 F 17 73 94= SRCHIDXBKT 00002359 F 17 77= 156s 190s SRCHIDXBLK 0000235A F 17 78= 159s SRCHIDXOFF 0000235B F 17 79= 211s SRCHRESULT 00002358 F 17 75= 84e 104a 383a SRCHSECBLK 00002358 F 17 76= 130s SRCHTYPE 000BC010 F 17 91= 95s 101s 225j 300j SRCHUD1BLK 0000235C F 17 80= 209s SRCHUD1OFF 0000235D F 17 81= 258s 286s 316 SRCHUD2BLK 0000235E F 17 82= 289s SRCHUD2OFF 0000235F F 17 83= 358s SRCLKSERN 000023EA F 17 300j 325= 332j +SYSACCT 00000000 F 17 153 168 +SYSPROJ 00000002 F 17 153 169 TRYNEXT 0000238E F 17 171= 186j VOLLBAD 000023FE F 17 119a 371= +VPFWNDO1 000013E8 F 17 116 133 214 +VPFWNDO2 000013E9 F 17 162 293 387 END of directory searcher 1002 INPUT BOOT.OPSYS:SALON 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 49 (SALON) F 18 Off-Line Mass Storage Driver 3 4 ********************************************************************************** 5 * * 6 * Revisions Date * 7 * --------- ---- * 8 * 1.0 14 May 82 * 9 * Stack implemented. * 10 * 1.1 30 Sep 82 * 11 * Separate error code for memory parity error * 12 * during write. Minor left over removed. * 13 * 1.2 30 Jun 83 * 14 * Moved subs checking into SETUPNMAP routine (old * 15 * MAPCIX routine). * 16 * Added CLEARFAULT routine and modified logic * 17 * dealing with faults and re-zeros. * 18 * 1.3 27 Oct 83 * 19 * New field added to DISKCB, DCBVOLSIZE * 20 * 1.4 08 Sep 84 * 21 * changes to reduce code size. * 22 * new WAIT instruction used for I/O waits. * 23 * 1.5 07 Jul 86 * 24 * Where the FBI is being clobbered to ensure * 25 * that a read failure is noticed, * 26 * changed STMW R2,FBIDA to STMW R2,FBIWORDB * 27 * to prevent halts on uninitialized memory. * 28 * The corresponding change was made in the * 29 * on-line driver earlier. * 30 * 1.6 13 Aug 86 * 31 * Moved STATCHK variables onto stack. * 32 * 1.7 09 Dec 86 * 33 * Added bit to ignore substitution list, this * 34 * is so ONPL and OPL use the same mechanism to * 35 * read and write substituted blocks. * 36 * A8805 17 May 88 * 37 * Installed new TSELECT routine that will handle * 38 * controllers/drives that are slow to respond to * 39 * setting changes. * 40 * A8809 20 Sep 88 * 41 * Corrected table size symbol (TERRORLIM) in TSELECT. * 42 * A8810 01 Nov 88 * 43 * Minor space savers. RC * 44 * A8903 22 Mar 89 * 45 * Bug fix in seg correct routine to clear RO bit * 46 * from page map value. RC * 47 * A9003 14 Mar 90 * 48 * Change error retry limits from constants to variables. * 49 * Set them to 1 if NORETRY bit set in the DCB, otherwise * 50 * to their values from before. CG * 51 * * 52 ********************************************************************************** 53 54 BLOCK Off line mass storage driver 55 56 ENTRY READ do read on MS 57 ENTRY WRITE do write on MS 58 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 50 (SALON) F 18 Off-Line Mass Storage Driver 59 ********************************************************************************** 60 * * 61 * This code is set up to do reads and writes in a * 62 * non-interrupt environment. * 63 * * 64 ********************************************************************************** 65 66 DKERRLIM EQU 2*TERRORLIM limit for disk error retries 0000000A ABS 67 CHERRLIM EQU 10 limit for channel error retries 00000004 ABS 68 SKERRLIM EQU 4 limit for seek error retries 69 70 ********************************************************************************** 71 * * 72 * These are error codes returned in R0 on error address return. * 73 * They are defined in BOOT.OPSYS:DISKCB.ASSEM. * 74 * * 75 *ECDATA EQU 1 data error (checksum, etc) * 76 *ECFBI EQU 2 FBI error * 77 *ECCHAN EQU 3 channel error * 78 *ECSEEK EQU 4 error seeking * 79 *ECNOTRDY EQU 5 not ready * 80 *ECWRPROT EQU 6 write protected * 81 *ECMPE EQU 7 memory parity error on write * 82 * * 83 ********************************************************************************** 84 85 BLOCK READ, WRITE and return control 86 87 BEGFRAME 00178801 6 BASE 88 DKFBITYPE BSS 1 type of FBI expected on read 00178802 6 BASE 89 ERRAD BSS 1 callers error return address 90 ENDFRAME 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 51 (SALON) F 18 Off-Line Mass Storage Driver 92 93 ********************************************************************************** 94 * * 95 * Call for a read data transfer. The specified page is * 96 * read in as indicated. The driver attempts retries up to a * 97 * reasonable limit. If the block can not be read, control * 98 * is passed to the error address with an error code in R0. * 99 * Call: * 100 * R4 => control block (see DISKCB defn) * 101 * CALL READ call for MS read * 102 * PARV * 103 * PARV * 104 * PAR * 105 * PARV (0=no type check,-1=no check at all) * 106 * PARL * 107 * Eats R0:R3 * 108 * Stack required: 10 * 109 * 3 + max(SETUPNMAP(1), SEEK (6), TSELECT(7), * 110 * PADBILD (2), WAITSTAT(1), STATCHK(6), * 111 * LOGERROR (2), UNMAP (1) ) * 112 * * 113 ********************************************************************************** 114 115 BLOCK read section 116 117 ENTRY READ 118 02408 DD1F8003 6 STAK 119 READ ENTR PUSH 02409 C14025ED 120 STPV DKBLOCKNO save block number 0240A C14025F0 121 STPV DKPAGENO save the page number (page map value) 0240B C10025F1 122 STP FBILOC save the FBI location 0240C C1578801 6 BASE 123 STPV SP,DKFBITYPE save the expected FBI type 0240D C0178802 6 BASE 124 STPL SP,ERRAD save callers error address 0240E DC40248F 125 CALLNP SETUPNMAP check subs and do PF mapping 126 0000240F 127 SEEKOVER LABEL 0240F DC4024B8 128 CALLNP SEEK put the drive on cylinder 02410 FE0E2451 129 JMP NOTREADY jump if drive not ready 02411 FE0E2453 130 JMP SEEKERR jump if unrecoverable seek error 00002412 131 READOVER LABEL 02412 608025F1 2 132 LD R2 FBILOC R2 -> fbi 02413 D1568801 2 BASE 133 STMW R2,FBIWORDB destroy block identifier 02414 DC402583 134 CALLNP TSELECT tweak for error recovery 02415 FE0E2451 135 JMP NOTREADY quit if drive went off line 02416 FE0E240F 136 JMP SEEKOVER jump if seek error 02417 60040001 0 IMM 137 LD R0 PPUIDMAD*1 get DMA direction bit 02418 E4001803 0 138 ST R0 CIX(PPUSCSTAT) set DMA direction to input 02419 DC4025A4 139 CALLNP PADBILD get the hardware addresses 0241A EC001AB0 140 STZ CIX(BFDREAD+1*BFDINTBIT) start read and select interrupt 0241B DC40250C 141 CALLNP WAITSTAT wait for operation and fetch statuses 0241C DC002519 142 CALL STATCHK check for an acceptable status 0241D 40440002 IMM 143 PARVL ERROPREAD type of operation 0241E FE0E2454 144 JMP GIVEERROR jump if unrecoverable error (R0 = code) 0241F FE0E240F 145 JMP SEEKOVER jump if we need to re-seek 02420 FE0E2412 146 JMP READOVER jump if we need to try again 02421 FE0E2423 147 JMP FIXSEG jump if we need to correct a segment 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 52 (SALON) F 18 Off-Line Mass Storage Driver 02422 FE0E2427 148 JMP READOK jump if all went well 149 * --- 150 00002423 151 FIXSEG LABEL 02423 DC40245F 152 CALLNP SEGCORRECT correct a single segment error 02424 FE0E2412 153 JMP READOVER could not read check segment 02425 FE0E240F 154 JMP SEEKOVER status sez reseek 02426 FE0E2454 155 JMP GIVEERROR error not recoverable 156 * \ / correction done 157 00002427 158 READOK LABEL read was OK, now check FBI 02427 60578801 1 6 BASE 159 LD R1 SP,DKFBITYPE get the expected FBI type 02428 FA6C245C 1 160 JEQMW R1 GOODRETURN jump if no checking at all 02429 6003FFC0 0 IMM 161 LD R0 FBICSMASK mask for all FBI words 0242A F01025F1 0 @ 162 PRMUT R0 @FBILOC do XOR in one swell foop 0242B FA2E2433 0 163 JNEMW R0 CKSUMBAD jump for bad checksum 0242C 608025F1 2 164 LD R2 FBILOC get ptr to buffer 0242D 60089181 0 2 ZBM 165 LD R0 R2,FBIDA get the MS address from FBI 0242E 640025ED 0 166 CPR R0 DKBLOCKNO compare to our expectations 0242F FE0C2433 167 JNE BADFBI even if subbed this should match 168 * \ / 02430 FA42245C 1 169 JEQZ R1 GOODRETURN jump if type not to be checked 02431 64488080 1 2 ZBM 170 CPR R1 R2,FBITYPE check what we actually got 02432 FE02245C 171 JEQ GOODRETURN return if matching type 172 * \ / 00002433 173 BADFBI LABEL 00002433 174 CKSUMBAD LABEL 02433 60040002 0 IMM 175 LD R0 ECFBI get code for 'FBI' error 02434 FE0E2454 176 JMP GIVEERROR and go to error return 177 * --- 178 BADFBI 00002433 F 18 167j 173= CKSUMBAD 00002433 F 18 163j 174= +DKBLOCKNO UUUUUUUU F 18 120s 166 +DKFBITYPE 00178801 F 18 123s 159 +DKPAGENO UUUUUUUU F 18 121s +ECFBI 00000002 F 18 175 +ERRAD 00178802 F 18 124s +ERROPREAD 00000002 F 18 143 +FBILOC UUUUUUUU F 18 122s 132 162 164 FIXSEG 00002423 F 18 147j 151= +GIVEERROR UUUUUUUU F 18 144j 155j 176j +GOODRETURN UUUUUUUU F 18 160j 169j 171j +NOTREADY UUUUUUUU F 18 129j 135j +PADBILD UUUUUUUU F 18 139 +READ 00002408 F 18 117 119= READOK 00002427 F 18 148j 158= READOVER 00002412 F 18 131= 146j 153j +SEEK UUUUUUUU F 18 128 +SEEKERR UUUUUUUU F 18 130j SEEKOVER 0000240F F 18 127= 136j 145j 154j +SEGCORRECT UUUUUUUU F 18 152 +SETUPNMAP UUUUUUUU F 18 125 +STATCHK UUUUUUUU F 18 142 +TSELECT UUUUUUUU F 18 134 +WAITSTAT UUUUUUUU F 18 141 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 53 (SALON) F 18 Off-Line Mass Storage Driver 179 END of read section 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 54 (SALON) F 18 Off-Line Mass Storage Driver 181 182 ********************************************************************************** 183 * * 184 * Do a write to the disk. The specified page is written to * 185 * the indicated location on the disk. A reasonable number of * 186 * error retries are made. If the page cannot be written, control * 187 * passes to the error address with the error code in R0. * 188 * Call: * 189 * LD R4 => disk control block (see R4 defn above) * 190 * CALL WRITE call for MS write * 191 * PAR * 192 * PAR * 193 * PAR * 194 * PARL * 195 * Eats R0:R3 * 196 * Stack required: 10 * 197 * 3 + max(SETUPNMAP(1), SEEK (6), PADBILD(2), * 198 * WAITSTAT (1), STATCHECK(6), UNMAP (1), * 199 * LOGERROR (2) ) * 200 * * 201 ********************************************************************************** 202 203 BLOCK write section 204 205 ENTRY WRITE 206 02435 DD1F8003 6 STAK 207 WRITE ENTR PUSH 02436 C14025ED 208 STPV DKBLOCKNO save block number 02437 C14025F0 209 STPV DKPAGENO save the page number (page map value) 02438 C10025F1 210 STP FBILOC save the FBI location 02439 C0178802 6 BASE 211 STPL SP,ERRAD save callers error address 212 213 * Calculate the FBI checksum. 0243A 608025F1 2 214 LD R2 FBILOC get pointer to FBI buffer 0243B 6003FF80 0 IMM 215 LD R0 FBIGMASK mask for words included in checksum 0243C F0168800 0 2 BASE 216 PRMUT R0 R2,FBIWORDA calculate checksum for the table 0243D 7407FFFF 0 IMM 217 XOR R0 0FFFFFFFF change sense 0243E E416880A 0 2 BASE 218 ST R0 R2,FBICKSUM set the new checksum 219 0243F DC40248F 220 CALLNP SETUPNMAP check subs and do PF mapping 221 * \ / 00002440 222 DOSEEK LABEL 02440 DC4024B8 223 CALLNP SEEK position on cylinder 02441 FE0E2451 224 JMP NOTREADY jump if drive not ready 02442 FE0E2453 225 JMP SEEKERR jump if seek error 00002443 226 REWRITE LABEL 02443 60040001 0 IMM 227 LD R0 PPUIDMAD*1 get DMA direction bit 02444 E4001802 0 228 ST R0 CIX(PPUSSSTAT) set DMA direction to output 02445 DC4025A4 229 CALLNP PADBILD get the hardware addresses 02446 600025E6 0 230 LD R0 CLOCKTIME(1) get time code (right side of clock) 02447 60570801 1 4 BASE 231 LD R1 R4,DCBUNIT R1=unit number 02448 E4221AC8 0 1 232 ST R0 CIX(BFDWRITE+1*BFDINTBIT+BFDSELECTB)(R1) start write 02449 DC40250C 233 CALLNP WAITSTAT wait for operation and fetch statuses 0244A DC002519 234 CALL STATCHK check for an acceptable status 0244B 40440003 IMM 235 PARVL ERROPWRITE operation type 0244C FE0E2454 236 JMP GIVEERROR jump if unrecoverable error 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 55 (SALON) F 18 Off-Line Mass Storage Driver 0244D FE0E2440 237 JMP DOSEEK jump if need to re-do seek 0244E FE0E2443 238 JMP REWRITE jump if need to re-do write 0244F 00024024 239 HALT HALTB4024 segment error while writing 02450 FE0E245C 240 JMP GOODRETURN jump if all went well 241 * --- 242 +CLOCKTIME UUUUUUUU F 18 230 +DCBUNIT 00160801 F 18 231 +DKBLOCKNO UUUUUUUU F 18 208s +DKPAGENO UUUUUUUU F 18 209s DOSEEK 00002440 F 18 222= 237j +ERRAD 00178802 F 18 211s +ERROPWRITE 00000003 F 18 235 +FBILOC UUUUUUUU F 18 210s 214 +GIVEERROR UUUUUUUU F 18 236j +GOODRETURN UUUUUUUU F 18 240j +NOTREADY UUUUUUUU F 18 224j +PADBILD UUUUUUUU F 18 229 REWRITE 00002443 F 18 226= 238j +SEEK UUUUUUUU F 18 223 +SEEKERR UUUUUUUU F 18 225j +SETUPNMAP UUUUUUUU F 18 220 +STATCHK UUUUUUUU F 18 234 +WAITSTAT UUUUUUUU F 18 233 +WRITE 00002435 F 18 205 207= 243 END of write section 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 56 (SALON) F 18 Off-Line Mass Storage Driver 245 246 ********************************************************************************** 247 * * 248 * Labels to jump to when you want to return * 249 * to the user. * 250 * * 251 ********************************************************************************** 252 253 BLOCK returns for offline MS driver 254 255 ENTRY GOODRETURN Normal return 256 ENTRY GIVEERROR Error return, R0 = error code 257 ENTRY NOTREADY Drive not ready 258 ENTRY SEEKERR Uncorrectable seek error 259 00002451 260 NOTREADY LABEL 02451 60040005 0 IMM 261 LD R0 ECNOTRDY 02452 FE0E2454 262 JMP GIVEERROR 263 * --- 264 00002453 265 SEEKERR LABEL 02453 60040004 0 IMM 266 LD R0 ECSEEK 267 * \ / 268 00002454 269 GIVEERROR LABEL 02454 61D78802 7 6 BASE 270 LD R7 SP,ERRAD set error return address 271 * \ / 272 02455 60D20000 3 0 REG 273 LD R3 R0 make copy of error code 02456 DC0025B8 274 CALL LOGERROR log the error 02457 41440007 IMM 275 PARV ERROPRTN operation: error return 02458 41440000 IMM 276 PARV 0 PPU status: irrelevant 02459 4052C000 3 REG 277 PARVL R3 BFD status: really error code 0245A 6012C000 0 3 REG 278 LD R0 R3 restore the return code 0245B FE0E245D 279 JMP UMAPRTN unmap PF and return 280 * --- 281 0000245C 282 GOODRETURN LABEL 0245C 60040000 0 IMM 283 LD R0 0 good return code 0000245D 284 UMAPRTN LABEL 0245D DC4024B4 285 CALLNP UNMAP release the page file location 0245E 5D1F8003 6 STAK 286 LEAVE POP return to caller 287 * --- 288 +ECNOTRDY 00000005 F 18 261 +ECSEEK 00000004 F 18 266 +ERRAD 00178802 F 18 270 +ERROPRTN 00000007 F 18 275 +GIVEERROR 00002454 F 18 256 262j 269= +GOODRETURN 0000245C F 18 255 282= +LOGERROR UUUUUUUU F 18 274 +NOTREADY 00002451 F 18 257 260= +SEEKERR 00002453 F 18 258 265= UMAPRTN 0000245D F 18 279j 284= +UNMAP UUUUUUUU F 18 285 289 END of returns for offline MS driver 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 57 (SALON) F 18 Off-Line Mass Storage Driver +CLOCKTIME UUUUUUUU F 18 230 +DCBUNIT 00160801 F 18 231 +DKBLOCKNO UUUUUUUU F 18 120s 166 208s DKFBITYPE 00178801 F 18 88= 123s 159 +DKPAGENO UUUUUUUU F 18 121s 209s +ECFBI 00000002 F 18 175 +ECNOTRDY 00000005 F 18 261 +ECSEEK 00000004 F 18 266 ERRAD 00178802 F 18 89= 124s 211s 270 +ERROPREAD 00000002 F 18 143 +ERROPRTN 00000007 F 18 275 +ERROPWRITE 00000003 F 18 235 +FBILOC UUUUUUUU F 18 122s 132 162 164 210s 214 GIVEERROR 00002454 F 18 144j 155j 176j 236j 256 262j 269= GOODRETURN 0000245C F 18 160j 169j 171j 240j 255 282= +LOGERROR UUUUUUUU F 18 274 NOTREADY 00002451 F 18 129j 135j 224j 257 260= +PADBILD UUUUUUUU F 18 139 229 +READ 00002408 F 18 117 119= +SEEK UUUUUUUU F 18 128 223 SEEKERR 00002453 F 18 130j 225j 258 265= +SEGCORRECT UUUUUUUU F 18 152 +SETUPNMAP UUUUUUUU F 18 125 220 +STATCHK UUUUUUUU F 18 142 234 +TSELECT UUUUUUUU F 18 134 +UNMAP UUUUUUUU F 18 285 +WAITSTAT UUUUUUUU F 18 141 233 +WRITE 00002435 F 18 205 207= 290 END READ, WRITE and return control 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 58 (SALON) F 18 Off-Line Mass Storage Driver 292 293 ********************************************************************************** 294 * * 295 * This routine will correct a single segment error. * 296 * The bad segment number is in R3. * 297 * Call: * 298 * R3 = bad segment number * 299 * CALLNP SEGCORRECT call to do segment correction * 300 * * 301 * * 302 * * 303 * * 304 * * 305 * Eats R0:R3 destroys CIX mapping * 306 * Stack required = 8 * 307 * 2 + max(LOGERROR(2), WAITSTAT(1), STATCHK(6) ) * 308 * * 309 ********************************************************************************** 310 311 BLOCK segment correction 312 313 ENTRY SEGCORRECT 314 ENTRY SUBLISTEND 315 0000178C 316 SUBLISTEND EQU WNDO4(WPP-BFDSEGSIZE-1) end of substitution list 0000178C 317 CHKSEGBUF EQU SUBLISTEND buffer for segment correction 318 319 BEGFRAME 00178801 6 BASE 320 BADSEGPTR BSS 1 offset to end of bad segment 321 ENDFRAME 322 0245F DD5F8002 6 STAK 323 SEGCORRECT ENTRNP PUSH 02460 DC0025B8 324 CALL LOGERROR log reconstruction 02461 41440004 IMM 325 PARV ERROPSEG operation = reconstruct segment 02462 41440000 IMM 326 PARV 0 PPU status (irrelevant) 02463 4052C000 3 REG 327 PARVL R3 segment number 328 02464 64C4000A 3 IMM 329 CPR R3 0A is it the check segment? 02465 FE02248E 330 JEQ RETURN3 if so, all done 331 * \ / 02466 1CC40073 3 IMM 332 MUL R3 BFDSEGSIZE calculate offset to end of segment 02467 E4D78801 3 6 BASE 333 ST R3 SP,BADSEGPTR remember it 02468 60C40085 3 IMM 334 LD PFPTR PNWNDO4 page containing buffer for check seg 02469 80928000 2 REG 335 PFRD R2 page file for check segment 0246A 6004178C 0 IMM 336 LD R0 ADR CHKSEGBUF 0246B E48A14C0 2 0 CBM 337 ST R2 R0/FLDABSPG 0246C E40A9560 0 2 CBM 338 ST R0 R2/PAGEANDISP R2 = absolute address of buffer 0246D E4801805 2 339 ST R2 CIX(PPUADDR1) store address into PPU 0246E 600481D0 0 IMM 340 LD R0 (BFDSEGSIZE+1)*CPW+1*PPUCLAST 0246F E4001804 0 341 ST R0 CIX(PPUCNT1) set size of transfer 02470 EDC01AB0 342 STW CIX(BFDREAD+1*BFDINTBIT) start transfer of check seg 02471 DC40250C 343 CALLNP WAITSTAT wait for it to complete 02472 DC002519 344 CALL STATCHK see if all went well 02473 40440005 IMM 345 PARVL ERROPCKSEG operation type 02474 FBE02475 7 346 RETURN2 IRJ R7 RETURN1 error return, not recoverable 02475 FBE02476 7 347 RETURN1 IRJ R7 RETURN0 error return, try seek again 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 59 (SALON) F 18 Off-Line Mass Storage Driver 02476 5D1F8002 6 STAK 348 RETURN0 LEAVE POP error return, try read again 02477 00024023 349 HALT HALTB4023 segment error reading check segment 350 * \ / 351 * normal return - we got the segment 02478 60C40086 3 IMM 352 LD PFPTR PNCIX use I/O window (CIX) 02479 600025F0 0 353 LD R0 DKPAGENO fetch the page map value 0247A EC0A1A30 0 CBM 354 STZ R0/PFCNTL clear the RO bit, others for fun 0247B 00D20000 0 REG 355 LDPF R0 map the data in as CIX 0247C 6087FF8D 2 IMM 356 LD R2 -BFDSEGSIZE 0000247D 357 NEXTWORD LABEL 0247D 60569073 1 2 REG 358 LD R1 R2+BFDSEGSIZE copy the 'within segment' index 0247E 6022178C 0 1 359 LD R0 CHKSEGBUF(R1) get word from the correction segment 0247F 10440400 1 IMM 360 SUB R1 WPP make data/FBI split at zero (!) 00002480 361 DOREGWORD LABEL 02480 74221C00 0 1 362 XOR R0 CIX(WPP)(R1) get word from data area 02481 18440073 1 IMM 363 ADD R1 BFDSEGSIZE move to corresponding word in next seg 02482 FA482480 1 364 JLTZ R1 DOREGWORD jump if still in data area 02483 6444000B 1 IMM 365 CPR R1 9*BFDSEGSIZE-WPP still in FBI? 02484 FE062486 366 JGE GOTWORD jump if not 367 * \ / 02485 743225F1 0 1 @ 368 XOR R0 @FBILOC(R1) get word from FBI 00002486 369 GOTWORD LABEL 02486 60578801 1 6 BASE 370 LD R1 SP,BADSEGPTR get offset to end of bad segment 02487 18528000 1 2 REG 371 ADD R1 R2 make it point to current word 02488 10440400 1 IMM 372 SUB R1 WPP make data/FBI split at zero 02489 FA48248C 1 373 JLTZ R1 COREGWORD jump if word is in data 374 * \ / 0248A F43225F1 0 1 @ 375 XORM R0 @FBILOC(R1) else fix word in FBI 0248B FE0E248D 376 JMP THISDONE done with this word 377 * --- 378 0000248C 379 COREGWORD LABEL 0248C F4221C00 0 1 380 XORM R0 CIX(WPP)(R1) fix a data word 0000248D 381 THISDONE LABEL 0248D FAA0247D 2 382 IRJ R2 NEXTWORD do all words 383 * \ / 0248E FBE02474 7 384 RETURN3 IRJ R7 RETURN2 give normal return 385 * --- 386 BADSEGPTR 00178801 F 18 320= 333s 370 CHKSEGBUF 0000178C F 18 317= 336a 359 COREGWORD 0000248C F 18 373j 379= +DKPAGENO UUUUUUUU F 18 353 DOREGWORD 00002480 F 18 361= 364j +ERROPCKSEG 00000005 F 18 345 +ERROPSEG 00000004 F 18 325 +FBILOC UUUUUUUU F 18 368 375s GOTWORD 00002486 F 18 366j 369= +LOGERROR UUUUUUUU F 18 324 NEXTWORD 0000247D F 18 357= 382j RETURN0 00002476 F 18 347j 348= RETURN1 00002475 F 18 346j 347= RETURN2 00002474 F 18 346= 384j RETURN3 0000248E F 18 330j 384= +SEGCORRECT 0000245F F 18 313 323= +STATCHK UUUUUUUU F 18 344 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 60 (SALON) F 18 Off-Line Mass Storage Driver +SUBLISTEND 0000178C F 18 314 316= 317e THISDONE 0000248D F 18 376j 381= +WAITSTAT UUUUUUUU F 18 343 387 END segment correction routine 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 61 (SALON) F 18 Off-Line Mass Storage Driver 389 390 ********************************************************************************** 391 * * 392 * Routine to do various setup operations. We mask off the * 393 * disk address, check for substitutions, load up the page file * 394 * to point to the appropriate mass storage controller, and * 395 * select any necessary conditions there in. Before loading the * 396 * page file to point to the disk controller, we fetch the * 397 * current clock from the SSU. We accept the slight risk of * 398 * acquiring the wrong time at rollover. It is used in error * 399 * logging and for a disk write time code. * 400 * Call: * 401 * LD R4 => control block * 402 * CALLNP SETUPNMAP * 403 * * 404 * Eats R0-R3. * 405 * Stack required: 1 * 406 * * 407 ********************************************************************************** 408 409 BLOCK 410 411 ENTRY SETUPNMAP 412 413 BEGFRAME 414 ENDFRAME 415 0248F DD5F8001 6 STAK 416 SETUPNMAP ENTRNP PUSH 02490 600025ED 0 417 LD R0 DKBLOCKNO pick up the requested block number 02491 600A1180 0 0 CBM 418 LD R0 R0/MSBLKFIELD remove any extra bits 02492 E40025ED 0 419 ST R0 DKBLOCKNO save requested block number 02493 5C090016 4 ZBM 420 CMZ R4,DCBNOSUBS ignore substitution list? 02494 FE0C2499 421 JNE NOTSUBD if set, then yes 02495 60570804 1 4 BASE 422 LD R1 R4,DCBSUBLIST R4 -> substitution list 02496 3C164801 0 1 BASE 423 LSRCH R0 R1,1 see if block is substituted 02497 FE0C2499 424 JNE NOTSUBD jump if not substituted 02498 60164802 0 1 BASE 425 LD R0 R1,2 R0 = substitute block number 00002499 426 NOTSUBD LABEL 02499 E40025EE 0 427 ST R0 DKREALBLK save real block number 428 0249A 60C40086 3 IMM 429 LD PFPTR PNCIX get channel index page number 0249B 00C00310 430 LDPF SSUPF load the page file for the SSU 0249C 60401802 1 431 LD R1 CIX(SSUCLOCKL) fetch low half clock 0249D 60001801 0 432 LD R0 CIX(SSUCLOCKU) fetch high half clock 0249E E60025E5 01 433 ST2 R0 CLOCKTIME save the current time for later 0249F 00D70800 4 BASE 434 LDPF R4,DCBPFILE make page file point to this controller 024A0 EC001801 435 STZ CIX(PPUABORT) clean out channel 024A1 D1401803 436 STMW CIX(PPUSCSTAT) clear as much status as possible 024A2 EE0025E7 437 STZ2 DISKERRS initialize the error counters 024A3 EC0025E9 438 STZ CHANERRS 024A4 60040020 0 IMM 439 LD R0 BFDFNSAFE 024A5 60570801 1 4 BASE 440 LD R1 R4,DCBUNIT 024A6 E4221A28 0 1 441 ST R0 CIX(BFDFUNC+BFDSELECTB+R1) reset drive not safe status 024A7 5C090416 4 ZBM 442 CMZ R4,DCBNORETRY 024A8 FE0C24AD 443 JNE NORETRY 024A9 60040014 0 IMM 444 LD R0 DKERRLIM 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 62 (SALON) F 18 Off-Line Mass Storage Driver 024AA 6044000A 1 IMM 445 LD R1 CHERRLIM 024AB 60840004 2 IMM 446 LD R2 SKERRLIM 024AC FE0E24B0 447 JMP SETLIMITS 448 * --- 000024AD 449 NORETRY LABEL 024AD 60040001 0 IMM 450 LD R0 1 024AE 60440001 1 IMM 451 LD R1 1 024AF 60840001 2 IMM 452 LD R2 1 453 * \ / 000024B0 454 SETLIMITS LABEL 024B0 E40025EA 0 455 ST R0 DISKERRLIM 024B1 E44025EB 1 456 ST R1 CHANERRLIM 024B2 E48025EC 2 457 ST R2 SEEKERRLIM 024B3 5D1F8001 6 STAK 458 LEAVE POP 459 * --- 460 +CHANERRLIM UUUUUUUU F 18 456s +CHANERRS UUUUUUUU F 18 438s +CHERRLIM 0000000A F 18 445 +CLOCKTIME UUUUUUUU F 18 433s +DCBNORETRY 00080416 F 18 442 +DCBNOSUBS 00080016 F 18 420 +DCBPFILE 00160800 F 18 434 +DCBSUBLIST 00160804 F 18 422 +DCBUNIT 00160801 F 18 440 +DISKERRLIM UUUUUUUU F 18 455s +DISKERRS UUUUUUUU F 18 437s +DKBLOCKNO UUUUUUUU F 18 417 419s +DKERRLIM UUUUUUUU F 18 444 +DKREALBLK UUUUUUUU F 18 427s NORETRY 000024AD F 18 443j 449= NOTSUBD 00002499 F 18 421j 424j 426= +SEEKERRLIM UUUUUUUU F 18 457s SETLIMITS 000024B0 F 18 447j 454= +SETUPNMAP 0000248F F 18 411 416= +SKERRLIM 00000004 F 18 446 461 END 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 63 (SALON) F 18 Off-Line Mass Storage Driver 463 464 ********************************************************************************** 465 * * 466 * Routine to unload the page file. * 467 * Call: * 468 * CALLNP UNMAP * 469 * Eats PFPTR * 470 * Stack required: 1 * 471 * * 472 ********************************************************************************** 473 474 BLOCK 475 476 ENTRY UNMAP 477 478 BEGFRAME 479 ENDFRAME 480 024B4 DD5F8001 6 STAK 481 UNMAP ENTRNP PUSH 024B5 60C40086 3 IMM 482 LD PFPTR PNCIX get the I/O window page number 024B6 80D2C000 3 REG 483 PFRC PFPTR unmap this controller 024B7 5D1F8001 6 STAK 484 LEAVE POP return with clean PF 485 * --- 486 +UNMAP 000024B4 F 18 476 481= 487 END 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 64 (SALON) F 18 Off-Line Mass Storage Driver 489 490 ********************************************************************************** 491 * * 492 * Issue a seek to this drive. Enter here with the seek * 493 * address in DKREALBLK. Unpack the seek address and output * 494 * it to the drive. Save the unpacked seek address in DKSEEKADDR. * 495 * Call: * 496 * CALLNP SEEK * 497 * * 498 * * 499 * * 500 * Eats R0-R3 * 501 * Stack required: 6 * 502 * 1 + max(SEEKNDWAIT(5), DOZERO(2)) * 503 * * 504 ********************************************************************************** 505 506 BLOCK seek section 507 508 ENTRY SEEK 509 510 BEGFRAME 511 ENDFRAME 512 024B8 DD5F8001 6 STAK 513 SEEK ENTRNP PUSH 000024B9 514 AGAIN LABEL 024B9 62040000 01 IMM 515 LD2 R0 0 setup prototype hardware address 024BA 608025EE 2 516 LD R2 DKREALBLK fetch the block number 024BB 58C40010 IMM 517 IORPSR PSRMODIF use fancy arithmetic 024BC 14570802 1 4 BASE 518 DIV R1 R4,DCBSECPTRK separate sector from track 024BD E48A3080 2 0 CBM 519 ST R2 R0/BFDSASEC plop sector number into prototype 024BE 62524000 121 REG 520 LD2 R1 R1 swell up for DIV 024BF 14570803 1 4 BASE 521 DIV R1 R4,DCBTRKPCYL separate track from cylinder 024C0 58840010 IMM 522 CLBPSR PSRMODIF restore normal arithmetic 024C1 E48A2080 2 0 CBM 523 ST R2 R0/BFDSAHEAD put track # (head) into prototype 024C2 E44A0100 1 0 CBM 524 ST R1 R0/BFDSACYL and cylinder number 024C3 E40025EF 0 525 ST R0 DKSEEKADDR save seek address (for error report) 024C4 60570801 1 4 BASE 526 LD R1 R4,DCBUNIT R1=unit number 024C5 E4221A18 0 1 527 ST R0 CIX(BFDSEEK+BFDSELECTB)(R1) do the seek 024C6 DC0024E3 528 CALL SEEKNDWAIT wait for the seek to finish 024C7 40440000 IMM 529 PARVL ERROPSEEK operation in progress 024C8 5D1F8001 6 STAK 530 RETURN0 LEAVE POP offline, give return 0 024C9 FE0E24CB 531 JMP ERROR1 jump if seek error occurred 532 * \ / normal return (skip 2) 024CA FBE024CE 7 533 IRJ R7 RETURN1 advance return address 534 * --- 535 000024CB 536 ERROR1 LABEL seek error has occurred 024CB BC0025E8 0 537 INCL R0 SEEKERRS check and advance the error counter 024CC 640025EC 0 538 CPR R0 SEEKERRLIM are we over the limit yet? 024CD FE0824B9 539 JLT AGAIN jump if not, try again 024CE FBE024C8 7 540 RETURN1 IRJ R7 RETURN0 permanent seek error return 541 * --- 542 AGAIN 000024B9 F 18 514= 539j +DCBSECPTRK 00160802 F 18 518 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 65 (SALON) F 18 Off-Line Mass Storage Driver +DCBTRKPCYL 00160803 F 18 521 +DCBUNIT 00160801 F 18 526 +DKREALBLK UUUUUUUU F 18 516 +DKSEEKADDR UUUUUUUU F 18 525s +ERROPSEEK 00000000 F 18 529 ERROR1 000024CB F 18 531j 536= RETURN0 000024C8 F 18 530= 540j RETURN1 000024CE F 18 533j 540= +SEEK 000024B8 F 18 508 513= +SEEKERRLIM UUUUUUUU F 18 538 +SEEKERRS UUUUUUUU F 18 537s +SEEKNDWAIT UUUUUUUU F 18 528 543 END of seek section 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 66 (SALON) F 18 Off-Line Mass Storage Driver 545 546 ********************************************************************************** 547 * * 548 * Do a rezero operation. This should resuscitate a * 549 * drive after a seek error. This code will execute a stop * 550 * if we get a timeout or another seek error on the rezero. * 551 * Call: * 552 * CALLNP DOZERO * 553 * * 554 * * 555 * * 556 * Eats R0-R3. * 557 * Stack required: 2 * 558 * 1 + max(CLEARFAULT(1)) * 559 * * 560 ********************************************************************************** 561 562 BLOCK drive re-zero code 563 564 ENTRY DOZERO 565 566 BEGFRAME 567 ENDFRAME 568 024CF DD5F8001 6 STAK 569 DOZERO ENTRNP PUSH 024D0 60040012 0 IMM 570 LD R0 BFDFNZERO get the function code for re-zero 024D1 60570801 1 4 BASE 571 LD R1 R4,DCBUNIT R1=unit 024D2 E4221A28 0 1 572 ST R0 CIX(BFDFUNC+BFDSELECTB)(R1) send to the drive 573 024D3 60843A98 2 IMM 574 LD R2 DEADMAN time out counter 024D4 604025E4 1 575 LD R1 STATMASK mask for relevant status bits 000024D5 576 SEEKWLOOP LABEL 024D5 60001A20 0 577 LD R0 CIX(BFDSS) get current status 024D6 6C021000 01 IMM 578 MCPR R0 SEEKINGSTAT see if we are still seeking 024D7 FE0C24DA 579 JNE SEEKDONE jump if not still seeking 024D8 FAA224D5 2 580 DRJ R2 SEEKWLOOP continue waiting for seek to finish 581 * \ / 582 024D9 00824025 583 STOP STOPB4025 error rezeroing drive 584 * \ / 585 000024DA 586 SEEKDONE LABEL 024DA 6C021800 01 IMM 587 MCPR R0 SEEKOKSTAT compare against good status 024DB FE0224E2 588 JEQ RETURN jump if re-zero worked 024DC F62E24E1 0 589 JBT R0/BFDSSRSPER RETURN0 response error => offline 024DD F60E24E0 0 590 JBT R0/BFDSSFAULT SDFAULT jump if we have a fault 024DE F20824E1 0 591 JBF R0/BFDSSRDY RETURN0 drive not ready, give error 024DF 00824025 592 STOP STOPB4025 seek error on rezero operation 593 * \ / 594 000024E0 595 SDFAULT LABEL 024E0 DC402500 596 CALLNP CLEARFAULT clear the drive fault 024E1 5D1F8001 6 STAK 597 RETURN0 LEAVE POP return 598 * \ / 000024E2 599 RETURN LABEL 024E2 FBE024E1 7 600 IRJ R7 RETURN0 advance to normal return 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 67 (SALON) F 18 Off-Line Mass Storage Driver 601 * --- 602 +CLEARFAULT UUUUUUUU F 18 596 +DCBUNIT 00160801 F 18 571 +DEADMAN UUUUUUUU F 18 574 +DOZERO 000024CF F 18 564 569= RETURN 000024E2 F 18 588j 599= RETURN0 000024E1 F 18 589j 591j 597= 600j SDFAULT 000024E0 F 18 590j 595= SEEKDONE 000024DA F 18 579j 586= +SEEKINGSTAT UUUUUUUU F 18 578 +SEEKOKSTAT UUUUUUUU F 18 587 SEEKWLOOP 000024D5 F 18 576= 580j +STATMASK UUUUUUUU F 18 575 603 END of drive re-zero code 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 68 (SALON) F 18 Off-Line Mass Storage Driver 605 606 ********************************************************************************** 607 * * 608 * SEEKNDWAIT * 609 * Wait for the drive to say that a seek is done. We * 610 * read the current status and determine whether it was * 611 * successful. If not, we log the error. * 612 * CALL SEEKNDWAIT * 613 * PARVL operation * 614 * * 615 * * 616 * * 617 * Eats R0:R3. * 618 * Stack required: 5 * 619 * 3 + max(LOGERROR(2), DOZERO(2)) * 620 * * 621 ********************************************************************************** 622 623 BLOCK seek end wait routine 624 625 ENTRY SEEKNDWAIT 626 627 BEGFRAME 00178801 6 BASE 628 STATUS BSS 1 disk status 00178802 6 BASE 629 OPERATION BSS 1 operation that just finished 630 ENDFRAME 631 024E3 DD1F8003 6 STAK 632 SEEKNDWAIT ENTR PUSH 024E4 C0578802 6 BASE 633 STPVL SP,OPERATION save operation code 024E5 60843A98 2 IMM 634 LD R2 DEADMAN time out counter 024E6 604025E4 1 635 LD R1 STATMASK mask for relevant status bits 000024E7 636 LOOP LABEL 024E7 60001A20 0 637 LD R0 CIX(BFDSS) get current status 024E8 6C021000 01 IMM 638 MCPR R0 SEEKINGSTAT see if we are still seeking 024E9 FE0C24EC 639 JNE DONE jump if not still seeking 024EA FAA224E7 2 640 DRJ R2 LOOP continue waiting for seek to finish 641 * \ / 642 024EB 00824031 643 STOP STOPB4031 seek timed out. GO will make seek error 644 * \ / 645 000024EC 646 DONE LABEL 024EC 6C021800 01 IMM 647 MCPR R0 SEEKOKSTAT compare against good status 024ED FE0224FF 648 JEQ GOODRETURN jump if all is well 024EE E4178801 0 6 BASE 649 ST R0 SP,STATUS save the status 024EF 60D38000 3 6 REG 650 LD R3 SP make copy of stack pointer 024F0 DC0025B8 651 CALL LOGERROR log the error 024F1 4156C802 3 BASE 652 PARV R3,OPERATION operation in progress 024F2 41440000 IMM 653 PARV 0 PPU status 024F3 4056C801 3 BASE 654 PARVL R3,STATUS BFD status 024F4 60178801 0 6 BASE 655 LD R0 SP,STATUS restore status 024F5 F62E24F9 0 656 JBT R0/BFDSSRSPER OFFLINE response error => offline 024F6 F60E24FA 0 657 JBT R0/BFDSSFAULT DRVFAULT go to clear fault 024F7 F60C24FC 0 658 JBT R0/BFDSSSKERR SERROR go fix seek error 024F8 F60824FC 0 659 JBT R0/BFDSSRDY SERROR drive ready => seek error 000024F9 660 OFFLINE LABEL drive not ready (or response error) 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 69 (SALON) F 18 Off-Line Mass Storage Driver 024F9 5D1F8003 6 STAK 661 RETURN0 LEAVE POP 662 * --- 663 000024FA 664 DRVFAULT LABEL 024FA DC402500 665 CALLNP CLEARFAULT clear the drive fault 024FB FE0E24F9 666 JMP OFFLINE clear fault routine couldn't 667 * \ / otherwise, seek error 668 000024FC 669 SERROR LABEL seek error - do rezero 024FC DC4024CF 670 CALLNP DOZERO call for the rezero operation 024FD FE0E24F9 671 JMP OFFLINE jump if no good 672 * \ / 673 * seek error (or other misc bad status) 000024FE 674 RETURN1 LABEL 024FE FBE024F9 7 675 IRJ R7 RETURN0 advance return address 676 * --- 677 000024FF 678 GOODRETURN LABEL seek completed normally 024FF FBE024FE 7 679 IRJ R7 RETURN1 advance return address 680 * --- 681 +CLEARFAULT UUUUUUUU F 18 665 +DEADMAN UUUUUUUU F 18 634 DONE 000024EC F 18 639j 646= +DOZERO 000024CF F 18 670 DRVFAULT 000024FA F 18 657j 664= GOODRETURN 000024FF F 18 648j 678= +LOGERROR UUUUUUUU F 18 651 LOOP 000024E7 F 18 636= 640j OFFLINE 000024F9 F 18 656j 660= 666j 671j OPERATION 00178802 F 18 629= 633s 652 RETURN0 000024F9 F 18 661= 675j RETURN1 000024FE F 18 674= 679j +SEEKINGSTAT UUUUUUUU F 18 638 +SEEKNDWAIT 000024E3 F 18 625 632= +SEEKOKSTAT UUUUUUUU F 18 647 SERROR 000024FC F 18 658j 659j 669= +STATMASK UUUUUUUU F 18 635 STATUS 00178801 F 18 628= 649s 654 655 682 END of seek end wait routine 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 70 (SALON) F 18 Off-Line Mass Storage Driver 684 685 ********************************************************************************** 686 * * 687 * CLEARFAULT - Clear a drive fault and reset unsafe * 688 * Call: * 689 * CALLNP CLEARFAULT * 690 * * 691 * * 692 * Eats R0:R1 * 693 * * 694 ********************************************************************************** 695 696 BLOCK 697 ENTRY CLEARFAULT 698 699 BEGFRAME 700 ENDFRAME 701 02500 DD5F8001 6 STAK 702 CLEARFAULT ENTRNP PUSH 02501 60040011 0 IMM 703 LD R0 BFDFNCLFLT get command code for clear fault 02502 60570801 1 4 BASE 704 LD R1 R4,DCBUNIT get the unit number 02503 E4221AA8 0 1 705 ST R0 CIX(BFDFUNC+1*BFDINTBIT+BFDSELECTB)(R1) 02504 60443A98 1 IMM 706 LD R1 DEADMAN time out counter 00002505 707 LOOP LABEL 02505 60001A20 0 708 LD R0 CIX(BFDSS) get current status 02506 F6082509 0 709 JBT R0/BFDSSRDY DONE status looks good, exit 02507 FA622505 1 710 DRJ R1 LOOP continue waiting for drive to become ready 711 * \ / 02508 5D1F8001 6 STAK 712 RETURN0 LEAVE POP return 713 * --- 714 00002509 715 DONE LABEL 02509 60040020 0 IMM 716 LD R0 BFDFNSAFE get command code for make drive safe 0250A E4001A20 0 717 ST R0 CIX(BFDFUNC) 0250B FBE02508 7 718 IRJ R7 RETURN0 advance return address and leave 719 * --- 720 +CLEARFAULT 00002500 F 18 697 702= +DCBUNIT 00160801 F 18 704 +DEADMAN UUUUUUUU F 18 706 DONE 00002509 F 18 709j 715= LOOP 00002505 F 18 707= 710j RETURN0 00002508 F 18 712= 718j 721 END 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 71 (SALON) F 18 Off-Line Mass Storage Driver 723 724 ********************************************************************************** 725 * * 726 * Wait for completion of data transfer then * 727 * get status after data transfer operation. * 728 * Call: * 729 * CALLNP WAITSTAT * 730 * * 731 * * 732 * Eats R0. Sets R1,R2. * 733 * Stack required: 1 * 734 * * 735 ********************************************************************************** 736 737 BLOCK wait for data xfer completion 738 739 ENTRY WAITSTAT 740 741 BEGFRAME 742 ENDFRAME 743 0250C DD5F8001 6 STAK 744 WAITSTAT ENTRNP PUSH 0250D 60441388 1 IMM 745 LD R1 DEADMANL get time out value 0250E 60840000 2 IMM 746 LD R2 0 IOR status into here 0000250F 747 LOOP LABEL 0250F 7C801801 2 748 IOR R2 CIX(PPUINTSTAT) get the PPU internal status 02510 F6B82516 2 749 JBT R2/PPUIINTC DONE jump if interrupt being requested 02511 00440014 IMM 750 WAIT 20 wait here for 200 microseconds 02512 FA66250F 1 751 JDR R1 LOOP check dead man timer 02513 EC001801 752 STZ CIX(PPUABORT) clear out everything 02514 6087FFFF 2 IMM 753 LD R2 -1 get status indicating PPU status bad 754 * R1 = 0 02515 FE0E2518 755 JMP RETURN 756 * --- 757 00002516 758 DONE LABEL 02516 7884FFFF 2 IMM 759 AND R2 0FFFF mask off strange part of channel status 02517 60401802 1 760 LD R1 CIX(PPUCHANS1) get the device status 761 * \ / 00002518 762 RETURN LABEL 02518 5D1F8001 6 STAK 763 LEAVE POP return 764 * --- 765 00001388 ABS 766 DEADMANL EQU 5000 timeout counter (about 2.5 seconds) 767 DEADMANL 00001388 F 18 745 766= DONE 00002516 F 18 749j 758= LOOP 0000250F F 18 747= 751j RETURN 00002518 F 18 755j 762= +WAITSTAT 0000250C F 18 739 744= 768 END of wait for data xfer completion 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 72 (SALON) F 18 Off-Line Mass Storage Driver 770 771 ********************************************************************************** 772 * * 773 * STATCHK * 774 * Check status after data transfer operation to see * 775 * if it is acceptable to our aesthete. We check statuses * 776 * for both read and write. If anything is wrong, we log * 777 * the error. * 778 * Call: * 779 * R1 = device status * 780 * R2 = PPU status * 781 * CALL STATCHK * 782 * PARVL operation * 783 * * 784 * * 785 * * 786 * * 787 * * 788 * Eats R0-R3. * 789 * Stack required: 10 * 790 * 4 + max(LOGERROR(2), DOZERO(6)) * 791 * * 792 ********************************************************************************** 793 794 BLOCK status check routine 795 796 ENTRY STATCHK 797 798 BEGFRAME 00178801 6 BASE 799 OPERATION BSS 1 operation that was done 00178802 6 BASE 800 ERRLOGFILE BSS 2 disk error file values 00178802 6 BASE 801 DISKSTAT EQU ERRLOGFILE(0) BFD status (used as double too) 00178803 6 BASE 802 PPUSTAT EQU ERRLOGFILE(1) PPU status 803 ENDFRAME 804 02519 DD1F8004 6 STAK 805 STATCHK ENTR PUSH 0251A C0578801 6 BASE 806 STPVL SP,OPERATION save operation type 0251B E6578802 126 BASE 807 ST2 R1 SP,DISKSTAT save disk and ppu status 0251C 78402580 1 808 AND R1 BFDMASK mask off non-error bits 0251D 64421800 1 IMM 809 CPR R1 BFDOKSTAT is it good status? 0251E FE0C2521 810 JNE HARDWAY jump if not, we have a long job to do 0251F 78846540 2 IMM 811 AND R2 PPUMASK mask off non-error bits 02520 FA82257D 2 812 JEQZ R2 RETURN jump if good status, all done 813 * \ / 814 00002521 815 HARDWAY LABEL 02521 60D38000 3 6 REG 816 LD R3 SP copy the stack pointer 02522 DC0025B8 817 CALL LOGERROR log the error 02523 4156C801 3 BASE 818 PARV R3,OPERATION operation in progress 02524 4156C803 3 BASE 819 PARV R3,PPUSTAT PPU status 02525 4056C802 3 BASE 820 PARVL R3,DISKSTAT BFD status 02526 62578802 126 BASE 821 LD2 R1 SP,DISKSTAT restore statuses 822 02527 F6AA256E 2 823 JBT R2/PPUICONF CHANERROR jump if PPU is confused 02528 F6AE2574 2 824 JBT R2/PPUIMPE MPEERROR jump if memory parity error 02529 F66E256C 1 825 JBT R1/BFDSSRSPER OFFLINE jump if no disk responding 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 73 (SALON) F 18 Off-Line Mass Storage Driver 0252A F24E252E 1 826 JBF R1/BFDSSFAULT NOFAULT jump if NOT fault 0252B DC402500 827 CALLNP CLEARFAULT call to clear the fault 0252C FE0E256C 828 JMP OFFLINE jump if can't do it 0252D FE0E2562 829 JMP SEEKERROR1 and go check seek try counter 830 * --- 831 0000252E 832 NOFAULT LABEL 0252E F248256C 1 833 JBF R1/BFDSSRDY OFFLINE jump if not ready 0252F F64C2560 1 834 JBT R1/BFDSSSKERR SEEKERROR jump if seek error 02530 F24A2560 1 835 JBF R1/BFDSSONCYL SEEKERROR jump if not on cylinder 02531 600A7840 0 1 CBM 836 LD R0 R1/BFDSSERRCD get error code 02532 5C302581 0 @ 837 CMZ @PTRBDE(R0) is it B, D or E? 02533 FE0C256E 838 JNE CHANERROR jump if yes 839 02534 60178801 0 6 BASE 840 LD R0 SP,OPERATION get operation type 02535 64040003 0 IMM 841 CPR R0 ERROPWRITE is it a write? 02536 FE02255A 842 JEQ STATWRITE jump if yes 843 * \ / 844 845 * Here, we do status checking for read (and read check segment). 846 02537 F6A4256E 2 847 JBT R2/PPUIDPPE CHANERROR jump if data path parity error 02538 F6B2256E 2 848 JBT R2/PPUIBCNR CHANERROR jump if byte count not ready 02539 F6A2256E 2 849 JBT R2/PPUIXTRA CHANERROR jump if extra chars after rollover 850 0253A F668256E 1 851 JBT R1/BFDSSWCERR CHANERROR jump if word-count error 0253B F66A256E 1 852 JBT R1/BFDSSLOSTD CHANERROR jump if overrun/underrun 0253C F66C256E 1 853 JBT R1/BFDSSIFPE CHANERROR jump if interface parity error 854 0253D 5C0A7030 1 CBM 855 CMZ R1/BFDSSHDECD any header errors? 0253E FE022548 856 JEQ NOHEADERR1 jump if none 0253F 5C0025E8 857 CMZ SEEKERRS have we already redone the seek? 02540 FE022560 858 JEQ SEEKERROR jump if not 02541 608025F1 2 859 LD R2 FBILOC R2 -> file block identifier 02542 6003FFC0 0 IMM 860 LD R0 FBICSMASK mask for generating checksum 02543 F0168800 0 2 BASE 861 PRMUT R0 R2,0 generate the checksum 02544 FA2E2576 0 862 JNEMW R0 DISKERROR jump if checksum is not good 02545 60089181 0 2 ZBM 863 LD R0 R2,FBIDA get id of block read 02546 640025ED 0 864 CPR R0 DKBLOCKNO is it the right one? 02547 FE0C2576 865 JNE DISKERROR jump if wrong, else accept the block 866 * \ / 867 00002548 868 NOHEADERR1 LABEL 02548 60CA7840 3 1 CBM 869 LD R3 R1/BFDSSERRCD get the error code 02549 64C4000A 3 IMM 870 CPR R3 0A is it a single segment error? 0254A FE042576 871 JGT DISKERROR jump if not 0254B FAC4254E 3 872 JGTZ R3 SEGERROR jump if yes 0254C F276257D 1 873 JBF R1/BFDSSCEOV RETURN jump if no time-code error 0254D 60C4000A 3 IMM 874 LD R3 0A else claim error in check segment 875 * \ / time code in check segment ONLY is correctable 876 0000254E 877 SEGERROR LABEL R3 = number of bad segment 0254E 5C0025E7 878 CMZ DISKERRS any disk errors so far? 0254F FE022576 879 JEQ DISKERROR if not, retry 02550 60401A30 1 880 LD R1 CIX(BFDEF18) get first part of error file 02551 60801A40 2 881 LD R2 CIX(BFDEF9A) get last part of error file 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 74 (SALON) F 18 Off-Line Mass Storage Driver 02552 7883FE00 2 IMM 882 AND R2 0FF000000 mask off irrelevant part 02553 E6578802 126 BASE 883 ST2 R1 SP,ERRLOGFILE save it 02554 3809B841 0 6 ZBM 884 LEA R0 SP,ERRLOGFILE/BITS 0:3(-1) make pointer 02555 6044000C 1 IMM 885 LD R1 0C mask to remove crc and timecode bits 02556 F85A1C00 1 03 @R 886 ANDM R1 @R0(R3) remove bits from bad segment 02557 5E178802 6 BASE 887 CMZ2 SP,ERRLOGFILE any other errors? 02558 FE0C2576 888 JNE DISKERROR jump if yes, can't reconstruct block 889 * error return - correctable segment error 02559 FBE0257E 7 890 RETURN3 IRJ R7 RETURN2 advance return address 891 * --- 892 893 * Status checking for write operations. 894 0000255A 895 STATWRITE LABEL 0255A F646257B 1 896 JBT R1/BFDSSWPROT WRITEPROT jump if write-protected 0255B F6AE256E 2 897 JBT R2/PPUIMPE CHANERROR jump if memory parity error 0255C 5C0A7030 1 CBM 898 CMZ R1/BFDSSHDECD any header errors? 0255D FE022567 899 JEQ NOHEADERR2 jump if not 0255E 5C0025E8 900 CMZ SEEKERRS have we redone the seek yet? 0255F FE0C2579 901 JNE FATALDISK if so, it's a fatal error 902 * \ / 903 904 ********************************************************************************** 905 * * 906 * Here we have a problem that requires a re-seek. * 907 * First rezero the disk, then decide whether to retry. * 908 * * 909 ********************************************************************************** 910 911 * \ / 00002560 912 SEEKERROR LABEL 02560 DC4024CF 913 CALLNP DOZERO 02561 FE0E256C 914 JMP OFFLINE jump if drive now offline 00002562 915 SEEKERROR1 LABEL 02562 BC0025E8 0 916 INCL R0 SEEKERRS increment error count 02563 640025EC 0 917 CPR R0 SEEKERRLIM see if too many 02564 FE08257F 918 JLT RETRYSEEK jump if not - retry seek 02565 60040004 0 IMM 919 LD R0 ECSEEK else explain the error 02566 FE0E256D 920 JMP GIVEUP and give up 921 * --- 922 00002567 923 NOHEADERR2 LABEL 02567 5C0A7650 1 CBM 924 CMZ R1/(BFDSSCEOV+BFDSSERRCD) any misc errors? 02568 FE02256E 925 JEQ CHANERROR if not, must be electronic problem 02569 600025E7 0 926 LD R0 DISKERRS get count of errors so far 0256A 64040005 0 IMM 927 CPR R0 5 too many? 0256B FE082576 928 JLT DISKERROR jump if not 929 * \ / treat drive as if offline 930 931 ********************************************************************************** 932 * * 933 * Here, a drive went offline. Tell the poor user. * 934 * * 935 ********************************************************************************** 936 937 * \ / 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 75 (SALON) F 18 Off-Line Mass Storage Driver 0000256C 938 OFFLINE LABEL 0256C 60040005 0 IMM 939 LD R0 ECNOTRDY error code 0000256D 940 GIVEUP LABEL error return - abandon hope 0256D 5D1F8004 6 STAK 941 RETURN0 LEAVE POP return 942 * --- 943 944 945 946 ********************************************************************************** 947 * * 948 * Here we have a channel problem. Decide whether to retry. * 949 * * 950 ********************************************************************************** 951 0000256E 952 CHANERROR LABEL 0256E EC001801 953 STZ CIX(PPUABORT) try to make channel happier 0256F BC0025E9 0 954 INCL R0 CHANERRS increment error counter 02570 640025EB 0 955 CPR R0 CHANERRLIM see if too many 02571 FE08257E 956 JLT RETRYDATA jump if not - retry transfer 02572 60040003 0 IMM 957 LD R0 ECCHAN else load error code 02573 FE0E256D 958 JMP GIVEUP and give up 959 * --- 960 961 962 ********************************************************************************** 963 * * 964 * We arrive here if the PPU encountered a memory parity error * 965 * while accessing memory. We just return an appropriate error. * 966 * * 967 ********************************************************************************** 968 00002574 969 MPEERROR LABEL 02574 60040007 0 IMM 970 LD R0 ECMPE get the appropriate error code 02575 FE0E256D 971 JMP GIVEUP and give up fatal 972 * --- 973 974 975 ********************************************************************************** 976 * * 977 * Here, we have a disk data error. Decide whether to retry. * 978 * * 979 ********************************************************************************** 980 00002576 981 DISKERROR LABEL 02576 BC0025E7 0 982 INCL R0 DISKERRS increment error count 02577 640025EA 0 983 CPR R0 DISKERRLIM see if too many 02578 FE08257E 984 JLT RETRYDATA jump if not - retry transfer 985 * \ / 986 00002579 987 FATALDISK LABEL 02579 60040001 0 IMM 988 LD R0 ECDATA else load error code 0257A FE0E256D 989 JMP GIVEUP and give up 990 * --- 991 992 ********************************************************************************** 993 * * 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 76 (SALON) F 18 Off-Line Mass Storage Driver 994 * Here, some turkey tried to write on a write-protected * 995 * disk. Throw the book at him. * 996 * * 997 ********************************************************************************** 998 0000257B 999 WRITEPROT LABEL 0257B 60040006 0 IMM 1000 LD R0 ECWRPROT error code 0257C FE0E256D 1001 JMP GIVEUP and return 1002 * --- 1003 1004 ********************************************************************************** 1005 * * 1006 * This is where we return to the caller. * 1007 * * 1008 ********************************************************************************** 1009 0000257D 1010 RETURN LABEL normal return - transfer successful 0257D FBE02559 7 1011 IRJ R7 RETURN3 advance return address 1012 * --- 0000257E 1013 RETRYDATA LABEL error return - retry transfer 0257E FBE0257F 7 1014 RETURN2 IRJ R7 RETURN1 advance return address 1015 * --- 0000257F 1016 RETRYSEEK LABEL error return - retry seek 0257F FBE0256D 7 1017 RETURN1 IRJ R7 RETURN0 advance return address 1018 * --- 1019 1020 00006540 ABS 1021 PPUMASK EQU 1*PPUIXTRA+1*PPUIDPPE+1*PPUICONF+1*PPUIMPE+1*PPUIBCNR 1022 0F000000 ABS 1023 MASK1 EQU 1*BFDSSRDY+1*BFDSSONCYL+1*BFDSSSKERR+1*BFDSSFAULT 00000F00 ABS 1024 MASK2 EQU 1*BFDSSWCERR+1*BFDSSLOSTD+1*BFDSSIFPE+1*BFDSSRSPER 000000FF ABS 1025 MASK3 EQU 7*BFDSSHDECD+1*BFDSSCEOV+0F*BFDSSERRCD 1026 02580 0F000FFF 1027 BFDMASK VFD MASK1+MASK2+MASK3 relevant bits in bfd status 1028 0C000000 ABS 1029 BFDOKSTAT EQU 1*BFDSSRDY+1*BFDSSONCYL good disk status 1030 02581 00482582 1031 PTRBDE PTR SETBDE pointer to bit vector of 11, 13, 14 02581 00000000 1032 SETBDE VFDB 0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,0 1033 BFDMASK 00002580 F 18 808 1027= BFDOKSTAT 0C000000 F 18 809 1029= +CHANERRLIM UUUUUUUU F 18 955 CHANERROR 0000256E F 18 823j 838j 847j 848j 849j 851j 852j 853j 897j 925j 952= +CHANERRS UUUUUUUU F 18 954s +CLEARFAULT 00002500 F 18 827 +DISKERRLIM UUUUUUUU F 18 983 DISKERROR 00002576 F 18 862j 865j 871j 879j 888j 928j 981= +DISKERRS UUUUUUUU F 18 878 926 982s DISKSTAT 00178802 F 18 801= 807s 820 821 +DKBLOCKNO UUUUUUUU F 18 864 +DOZERO 000024CF F 18 913 +ECCHAN 00000003 F 18 957 +ECDATA 00000001 F 18 988 +ECMPE 00000007 F 18 970 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 77 (SALON) F 18 Off-Line Mass Storage Driver +ECNOTRDY 00000005 F 18 939 +ECSEEK 00000004 F 18 919 +ECWRPROT 00000006 F 18 1000 ERRLOGFILE 00178802 F 18 800= 801e 802e 883s 884a 887 +ERROPWRITE 00000003 F 18 841 FATALDISK 00002579 F 18 901j 987= +FBILOC UUUUUUUU F 18 859 GIVEUP 0000256D F 18 920j 940= 958j 971j 989j 1001j HARDWAY 00002521 F 18 810j 815= +LOGERROR UUUUUUUU F 18 817 MASK1 0F000000 F 18 1023= 1027x MASK2 00000F00 F 18 1024= 1027x MASK3 000000FF F 18 1025= 1027x MPEERROR 00002574 F 18 824j 969= NOFAULT 0000252E F 18 826j 832= NOHEADERR1 00002548 F 18 856j 868= NOHEADERR2 00002567 F 18 899j 923= OFFLINE 0000256C F 18 825j 828j 833j 914j 938= OPERATION 00178801 F 18 799= 806s 818 840 PPUMASK 00006540 F 18 811 1021= PPUSTAT 00178803 F 18 802= 819 PTRBDE 00002581 F 18 837 1031= RETRYDATA 0000257E F 18 956j 984j 1013= RETRYSEEK 0000257F F 18 918j 1016= RETURN 0000257D F 18 812j 873j 1010= RETURN0 0000256D F 18 941= 1017j RETURN1 0000257F F 18 1014j 1017= RETURN2 0000257E F 18 890j 1014= RETURN3 00002559 F 18 890= 1011j +SEEKERRLIM UUUUUUUU F 18 917 SEEKERROR 00002560 F 18 834j 835j 858j 912= SEEKERROR1 00002562 F 18 829j 915= +SEEKERRS UUUUUUUU F 18 857 900 916s SEGERROR 0000254E F 18 872j 877= SETBDE 00402582 F 18 1031a 1032= +STATCHK 00002519 F 18 796 805= STATWRITE 0000255A F 18 842j 895= WRITEPROT 0000257B F 18 896j 999= 1034 END of status check routine 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 78 (SALON) F 18 Off-Line Mass Storage Driver 1036 1037 ********************************************************************************** 1038 * * 1039 * TSELECT * 1040 * This routine should be called as part of the * 1041 * setup for a read. It will do any offsets if they * 1042 * are needed for error recovery. * 1043 * Call: * 1044 * CALLNP TSELECT * 1045 * * 1046 * * 1047 * * 1048 * Eats R0:R3. * 1049 * Stack required: 7 * 1050 * 2 + max(SEEKNDWAIT(5)) * 1051 * * 1052 ********************************************************************************** 1053 1054 BLOCK TSELECT routine 1055 1056 ENTRY TSELECT 1057 ENTRY TERRORLIM 1058 1059 BEGFRAME 00178801 6 BASE 1060 ACTION BSS 1 entry of choice 1061 ENDFRAME 1062 02583 DD5F8002 6 STAK 1063 TSELECT ENTRNP PUSH 02584 60570801 1 4 BASE 1064 LD R1 R4,DCBUNIT get the unit number 02585 E4401A00 1 1065 ST R1 CIX(BFDSELECT) select the drive just this once 1066 * \ / 1067 1068 * pick a trick 02586 604025E7 1 1069 LD R1 DISKERRS get the error counter 02587 FA422598 1 1070 JEQZ R1 GOODRET leave if this is the first try 02588 60040000 0 IMM 1071 LD R0 0 clear for divide 02589 58C40010 IMM 1072 IORPSR PSRMODIF turn on mod arithmetic 0258A 1404000A 0 IMM 1073 DIV R0 TERRORLIM R1 = which trick to use 0258B 58840010 IMM 1074 CLBPSR PSRMODIF back to normal math 0258C 60622599 1 1 1075 LD R1 OFSETA(R1) select a trick from our grab bag 0258D FE0E2590 1076 JMP TSWAIT wait for any un-operations to happen 1077 * --- 1078 1079 * control for function 0000258E 1080 TALOOP LABEL 0258E 600A7080 0 1 CBM 1081 LD R0 R1/CH3 extract current operation 0258F E4001A20 0 1082 ST R0 CIX(BFDFUNC) do the function 00002590 1083 TSWAIT LABEL 02590 E4578801 1 6 BASE 1084 ST R1 SP,ACTION save remaining codes 02591 00440019 IMM 1085 WAIT 25 pause to let interface work 1086 * \ / 1087 1088 * now loop until the mechanical motion is done. 02592 DC0024E3 1089 CALL SEEKNDWAIT wait ... 02593 40440006 IMM 1090 PARVL ERROPOFSET doing offset operation 02594 5D1F8002 6 STAK 1091 OFFLINE LEAVE POP exit (SEEKNDWAIT sez offline) 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 79 (SALON) F 18 Off-Line Mass Storage Driver 02595 FBE02594 7 1092 ERROR IRJ R7 OFFLINE advance exit (SEEKNDWAIT sez seekerror) 1093 * \ / 1094 1095 * look for next action 02596 60499101 1 6 ZBM 1096 LD R1 SP,ACTION/(CH1+CH2) rotate! 02597 FA4C258E 1 1097 JNEZ R1 TALOOP jump if something to do 00002598 1098 GOODRET LABEL 02598 FBE02595 7 1099 IRJ R7 ERROR make for third exit 1100 * --- 1101 00002599 1102 OFSETA LABEL 02599 00000000 1103 VFD 8:0,0,0,0 index of zero -- not used on first try 0259A 00000000 1104 VFD 8:0,0,0,0 index of one -- simply a retry, nothing fancy 0259B 00000000 1105 VFD 8:0,0,BFDFNDSE,0 try early data strobe 0259C 00000000 1106 VFD 8:0,0,BFDFNDSL,0 try late data strobe 0259D 00000000 1107 VFD 8:0,BFDFNRDS,BFDFNOFSF,0 normal strobe, offset forward 0259E 00000000 1108 VFD 8:0,BFDFNDSE,BFDFNOFSF,0 early, forward 0259F 00000000 1109 VFD 8:0,BFDFNDSL,BFDFNOFSF,0 late, forward 025A0 00000000 1110 VFD 8:0,BFDFNRDS,BFDFNOFSB,0 normal strobe, offset backward 025A1 00000000 1111 VFD 8:0,BFDFNDSE,BFDFNOFSB,0 early, backward 025A2 00000000 1112 VFD 8:0,BFDFNDSL,BFDFNOFSB,0 late, backward 0000000A DISP 1113 TERRORLIM EQU DISP OFSETA number of elements in above table 025A3 00000000 1114 VFD 8:0,0,0,0 extra do nothing element 1115 ACTION 00178801 F 18 1060= 1084s 1096 +DCBUNIT 00160801 F 18 1064 +DISKERRS UUUUUUUU F 18 1069 +ERROPOFSET 00000006 F 18 1090 ERROR 00002595 F 18 1092= 1099j GOODRET 00002598 F 18 1070j 1098= OFFLINE 00002594 F 18 1091= 1092j OFSETA 00002599 F 18 1075 1102= 1113e +SEEKNDWAIT 000024E3 F 18 1089 TALOOP 0000258E F 18 1080= 1097j +TERRORLIM 0000000A F 18 1057 1073 1113= +TSELECT 00002583 F 18 1056 1063= TSWAIT 00002590 F 18 1076j 1083= 1116 END TSELECT routine 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 80 (SALON) F 18 Off-Line Mass Storage Driver 1118 1119 ********************************************************************************** 1120 * * 1121 * Routine to construct the "system addresses" * 1122 * ( slot number and relative address ) for the FBI and * 1123 * the physical page and load up the PPU address and * 1124 * word count registers. We create the FBI address by fetching * 1125 * the page file contents for its page. Call: * 1126 * * 1127 * CALLNP PADBILD * 1128 * * 1129 * Gets R0:R2 * 1130 * Stack required: 2 * 1131 * * 1132 ********************************************************************************** 1133 1134 BLOCK PPU register load routine 1135 1136 ENTRY PADBILD 1137 1138 BEGFRAME 00178801 6 BASE 1139 R3SAVE BSS 1 save area for R3 1140 ENDFRAME 1141 025A4 DD5F8002 6 STAK 1142 PADBILD ENTRNP PUSH 025A5 E4D78801 3 6 BASE 1143 ST R3 SP,R3SAVE save this register 025A6 604025F1 1 1144 LD R1 FBILOC get address of FBI 025A7 60CA5E70 3 1 CBM 1145 LD PFPTR R1/FLDPAGE load the virtual page number 025A8 7CC40080 3 IMM 1146 IOR PFPTR MONPF we're in the monitor memory 025A9 80920000 0 REG 1147 PFRD R0 get the page file contents for the page 025AA 60D78801 3 6 BASE 1148 LD R3 SP,R3SAVE restore this register 025AB E40A54C0 0 1 CBM 1149 ST R0 R1/FLDABSPG make relative physical page 025AC E44A1560 1 0 CBM 1150 ST R1 R0/PAGEANDISP combine with slot number 025AD E4001807 0 1151 ST R0 CIX(PPUADDR2) store memory address for FBI 025AE 6004802C 0 IMM 1152 LD R0 FBILNTH*CPW+PPUCLAST*1 size of FBI, also end 025AF E4001806 0 1153 ST R0 CIX(PPUCNT2) set into PPU 1154 025B0 600025F0 0 1155 LD R0 DKPAGENO get the page location 025B1 60440000 1 IMM 1156 LD R1 0 page displacement (beginning of page) 025B2 E40A54C0 0 1 CBM 1157 ST R0 R1/FLDABSPG build the relative address 025B3 E44A1560 1 0 CBM 1158 ST R1 R0/PAGEANDISP combine with slot number 025B4 E4001805 0 1159 ST R0 CIX(PPUADDR1) store mem address for data block 025B5 60041000 0 IMM 1160 LD R0 CPP load size of page 025B6 E4001804 0 1161 ST R0 CIX(PPUCNT1) store data block byte count 1162 025B7 5D1F8002 6 STAK 1163 LEAVE POP return 1164 * --- 1165 +DKPAGENO UUUUUUUU F 18 1155 +FBILOC UUUUUUUU F 18 1144 +PADBILD 000025A4 F 18 1136 1142= R3SAVE 00178801 F 18 1139= 1143s 1148 1166 END of PPU register load routine 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 81 (SALON) F 18 Off-Line Mass Storage Driver 1168 1169 ********************************************************************************** 1170 * * 1171 * LOGERROR - Log a disk I/O error. * 1172 * See ERRLOGBLK for the format of the entries. * 1173 * Call: * 1174 * R4 = address of disk control block * 1175 * DKBLOCKNO = block number * 1176 * DKSEEKADR = seek address * 1177 * CALL LOGERROR eats R0,R2 before passing parameters * 1178 * PARV * 1179 * PARV * 1180 * PARVL * 1181 * * 1182 * Eats R0:R2 * 1183 * Stack required: 1 * 1184 * * 1185 ********************************************************************************** 1186 1187 BLOCK error log routine 1188 1189 ENTRY LOGERROR 1190 1191 BEGFRAME 1192 ENDFRAME 1193 025B8 DD9F8001 6 STAK 1194 LOGERROR ENTRS PUSH 025B9 608013EA 2 1195 LD R2 VERRLOGPTR R2 -> error log buffer 025BA FA8225DF 2 1196 JEQZ R2 LOGSKIP jump if no log buffer exists 025BB 60168800 0 2 BASE 1197 LD R0 R2,0 get first word 025BC FA2C25DE 0 1198 JEQMW R0 LOGFULL jump if log is full 1199 025BD 60090840 0 4 ZBM 1200 LD R0 R4,DCBPFILE/PFSLOT get slot number of PPU 025BE E4088843 0 2 ZBM 1201 ST R0 R2,ERRSLOT save it 025BF 60093020 0 4 ZBM 1202 LD R0 R4,DCBPFILE/PPUCHAN get channel number of BFD 025C0 E4089043 0 2 ZBM 1203 ST R0 R2,ERRCHAN save it 025C1 60170801 0 4 BASE 1204 LD R0 R4,DCBUNIT get disk unit number 025C2 E4089843 0 2 ZBM 1205 ST R0 R2,ERRUNIT save it 025C3 600025ED 0 1206 LD R0 DKBLOCKNO get block number 025C4 E4089181 0 2 ZBM 1207 ST R0 R2,ERRBLOCK save it 025C5 600025EF 0 1208 LD R0 DKSEEKADDR get seek address 025C6 E4168802 0 2 BASE 1209 ST R0 R2,ERRSEEKADR save it 1210 025C7 DCD3C000 7 REG 1211 EXPCS R7 go get parms 025C8 C1568004 2 CACH 1212 STPV R2,ERROPER save operation type 025C9 C148A103 2 ZBM 1213 STPV R2,ERRPPUSTAT save PPU status 025CA C0568804 2 BASE 1214 STPVL R2,ERRCTLSTAT save disk status 1215 025CB 38968004 2 2 CACH 1216 LEA R2 R2,ERRCOMPARE R2 -> beginning of part to compare 025CC E4961005 2 0 REG 1217 ST R2 R0+ERRLNTH R0 -> previous log entry 025CD 60440010 1 IMM 1218 LD R1 ERREND DISPC ERRCOMPARE R1 = size to compare 025CE FE540000 1219 CMS same error as previous entry? 025CF 608013EA 2 1220 LD R2 VERRLOGPTR re-fetch error log buffer pointer 025D0 FE0C25D4 1221 JNE SETTIME jump if not same error 025D1 10840005 2 IMM 1222 SUB R2 ERRLNTH make pointer to previous entry 025D2 D0168000 2 CACH 1223 INC R2,ERRCOUNT increment number of times for this error 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 82 (SALON) F 18 Off-Line Mass Storage Driver 025D3 FE0E25DD 1224 JMP LOGDONE and we're all done 1225 * --- 1226 000025D4 1227 SETTIME LABEL 025D4 620025E5 01 1228 LD2 R0 CLOCKTIME get the time last read from SSU 025D5 160403E8 01 IMM 1229 DIV2 R0 1000 convert value to seconds 025D6 58C40010 IMM 1230 IORPSR PSRMODIF 025D7 14055180 0 IMM 1231 DIV R0 86400 R1 = seconds past midnight 025D8 58840010 IMM 1232 CLBPSR PSRMODIF 025D9 E4489180 1 2 ZBM 1233 ST R1 R2,ERRTIME save time of error 025DA EDD68000 2 CACH 1234 STW R2,ERRCOUNT say error has occurred once 025DB 18840005 2 IMM 1235 ADD R2 ERRLNTH point to next entry 025DC E48013EA 2 1236 ST R2 VERRLOGPTR update pointer to error log buffer 1237 * \ / 1238 000025DD 1239 LOGDONE LABEL 025DD 5D1F8001 6 STAK 1240 LEAVE POP return 1241 * --- 1242 000025DE 1243 LOGFULL LABEL 025DE D0168801 2 BASE 1244 INC R2,1 increment number of lost errors 1245 * \ / 1246 000025DF 1247 LOGSKIP LABEL throw away the parameters 025DF DCD3C000 7 REG 1248 EXPCS R7 go get parms 025E0 C1520000 0 REG 1249 STPV R0 get operation in error 025E1 C1520000 0 REG 1250 STPV R0 get PPU status 025E2 C0520000 0 REG 1251 STPVL R0 get disk status 025E3 FE0E25DD 1252 JMP LOGDONE 1253 * --- 1254 +CLOCKTIME UUUUUUUU F 18 1228 +DCBPFILE 00160800 F 18 1200 1202 +DCBUNIT 00160801 F 18 1204 +DKBLOCKNO UUUUUUUU F 18 1206 +DKSEEKADDR UUUUUUUU F 18 1208 +ERRBLOCK 00081181 F 18 1207s +ERRCHAN 00081043 F 18 1203s +ERRCOMPARE 00160004 F 18 1216a 1218 +ERRCOUNT 00160000 F 18 1223s 1234s +ERRCTLSTAT 00160804 F 18 1214s +ERREND 00160805 F 18 1218 +ERRLNTH 00000005 F 18 1217s 1222 1235 +ERROPER 00160004 F 18 1212s +ERRPPUSTAT 00082103 F 18 1213s +ERRSEEKADR 00160802 F 18 1209s +ERRSLOT 00080843 F 18 1201s +ERRTIME 00081180 F 18 1233s +ERRUNIT 00081843 F 18 1205s LOGDONE 000025DD F 18 1224j 1239= 1252j +LOGERROR 000025B8 F 18 1189 1194= LOGFULL 000025DE F 18 1198j 1243= LOGSKIP 000025DF F 18 1196j 1247= SETTIME 000025D4 F 18 1221j 1227= +VERRLOGPTR 000013EA F 18 1195 1220 1236s 1255 END of error log routine 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 83 (SALON) F 18 Off-Line Mass Storage Driver 1257 1258 ********************************************************************************** 1259 * * 1260 * Constants for various routines. * 1261 * * 1262 ********************************************************************************** 1263 1264 00003A98 ABS 1265 DEADMAN EQU 15000 seek end timeout counter (2.5 seconds) 1266 0F000000 ABS 1267 MASK1 EQU 1*BFDSSRDY+1*BFDSSONCYL+1*BFDSSSKERR+1*BFDSSFAULT 0000030F ABS 1268 MASK2 EQU 1*BFDSSIFPE+1*BFDSSRSPER+0F*BFDSSERRCD 025E4 0F00030F 1269 STATMASK VFD MASK1+MASK2 mask of relevant bits 1270 08000000 ABS 1271 SEEKINGSTAT EQU 1*BFDSSRDY status while still seeking 0C000000 ABS 1272 SEEKOKSTAT EQU 1*BFDSSRDY+1*BFDSSONCYL status if seek successful 1273 1274 ********************************************************************************** 1275 * * 1276 * Data areas for the offline disk driver. * 1277 * * 1278 ********************************************************************************** 1279 000025E5 1280 CLOCKTIME BSS 2 time when driver was called 000025E7 1281 DISKERRS BSS 2 error control words 000025E8 1282 SEEKERRS EQU DISKERRS(1) seek error counter 000025E9 1283 CHANERRS BSS 1 channel error counter 000025EA 1284 DISKERRLIM BSS 1 max retries for a disk error 000025EB 1285 CHANERRLIM BSS 1 max retries for a ppu error 000025EC 1286 SEEKERRLIM BSS 1 max retries for a seek error 000025ED 1287 DKBLOCKNO BSS 1 hold the requested MS block number 000025EE 1288 DKREALBLK BSS 1 block number after substitution 000025EF 1289 DKSEEKADDR BSS 1 machine-formatted seek address 000025F0 1290 DKPAGENO BSS 1 holds the page map value 000025F1 1291 FBILOC BSS 1 holds the monitor memad of the FBI 1292 CHANERRLIM 000025EB F 18 456s 955 1285= CHANERRS 000025E9 F 18 438s 954s 1283= CHERRLIM 0000000A F 18 67= 445 CLEARFAULT 00002500 F 18 596 665 697 702= 827 CLOCKTIME 000025E5 F 18 230 433s 1228 1280= +DCBNORETRY 00080416 F 18 442 +DCBNOSUBS 00080016 F 18 420 +DCBPFILE 00160800 F 18 434 1200 1202 +DCBSECPTRK 00160802 F 18 518 +DCBSUBLIST 00160804 F 18 422 +DCBTRKPCYL 00160803 F 18 521 +DCBUNIT 00160801 F 18 231 440 526 571 704 1064 1204 DEADMAN 00003A98 F 18 574 634 706 1265= DISKERRLIM 000025EA F 18 455s 983 1284= DISKERRS 000025E7 F 18 437s 878 926 982s 1069 1281= 1282e DKBLOCKNO 000025ED F 18 120s 166 208s 417 419s 864 1206 1287= DKERRLIM 00000014 F 18 66= 444 DKPAGENO 000025F0 F 18 121s 209s 353 1155 1290= DKREALBLK 000025EE F 18 427s 516 1288= DKSEEKADDR 000025EF F 18 525s 1208 1289= 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 84 (SALON) F 18 Off-Line Mass Storage Driver DOZERO 000024CF F 18 564 569= 670 913 +ECCHAN 00000003 F 18 957 +ECDATA 00000001 F 18 988 +ECFBI 00000002 F 18 175 +ECMPE 00000007 F 18 970 +ECNOTRDY 00000005 F 18 261 939 +ECSEEK 00000004 F 18 266 919 +ECWRPROT 00000006 F 18 1000 +ERRBLOCK 00081181 F 18 1207s +ERRCHAN 00081043 F 18 1203s +ERRCOMPARE 00160004 F 18 1216a 1218 +ERRCOUNT 00160000 F 18 1223s 1234s +ERRCTLSTAT 00160804 F 18 1214s +ERREND 00160805 F 18 1218 +ERRLNTH 00000005 F 18 1217s 1222 1235 +ERROPCKSEG 00000005 F 18 345 +ERROPER 00160004 F 18 1212s +ERROPOFSET 00000006 F 18 1090 +ERROPREAD 00000002 F 18 143 +ERROPRTN 00000007 F 18 275 +ERROPSEEK 00000000 F 18 529 +ERROPSEG 00000004 F 18 325 +ERROPWRITE 00000003 F 18 235 841 +ERRPPUSTAT 00082103 F 18 1213s +ERRSEEKADR 00160802 F 18 1209s +ERRSLOT 00080843 F 18 1201s +ERRTIME 00081180 F 18 1233s +ERRUNIT 00081843 F 18 1205s FBILOC 000025F1 F 18 122s 132 162 164 210s 214 368 375s 859 1144 1291= LOGERROR 000025B8 F 18 274 324 651 817 1189 1194= MASK1 0F000000 F 18 1267= 1269x MASK2 0000030F F 18 1268= 1269x PADBILD 000025A4 F 18 139 229 1136 1142= +READ 00002408 F 18 56 117 119= SEEK 000024B8 F 18 128 223 508 513= SEEKERRLIM 000025EC F 18 457s 538 917 1286= SEEKERRS 000025E8 F 18 537s 857 900 916s 1282= SEEKINGSTAT 08000000 F 18 578 638 1271= SEEKNDWAIT 000024E3 F 18 528 625 632= 1089 SEEKOKSTAT 0C000000 F 18 587 647 1272= SEGCORRECT 0000245F F 18 152 313 323= SETUPNMAP 0000248F F 18 125 220 411 416= SKERRLIM 00000004 F 18 68= 446 STATCHK 00002519 F 18 142 234 344 796 805= STATMASK 000025E4 F 18 575 635 1269= +SUBLISTEND 0000178C F 18 314 316= 317e TERRORLIM 0000000A F 18 66e 1057 1073 1113= TSELECT 00002583 F 18 134 1056 1063= UNMAP 000024B4 F 18 285 476 481= +VERRLOGPTR 000013EA F 18 1195 1220 1236s WAITSTAT 0000250C F 18 141 233 343 739 744= +WRITE 00002435 F 18 57 205 207= 1293 END of off line mass storage driver 1003 INPUT OPLCOMM get the offline comm driver 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 85 (OPLCOMM) F 19 Off-line Communication Driver 3 4 COMMOUTER BLOCK outer block for offline comm driver 5 6 ENTRY INITCIA 7 ENTRY READCHARR 8 ENTRY WRITECHARR 9 ENTRY READLINER 10 ENTRY DOCRLF 11 ENTRY WRITELINER 12 13 VARS 00001C49 14 PF4COMM BSS 1 PF to communicate with CIA 00001C4A 15 PORTNUM BSS 1 number of port being run by CIA driver 00000050 ABS 16 INBUFFLEN EQU 80 maximum length of input line 00001C4B 17 COMMINBUFFW BSS 0 word address for input buffer 02001C4B 18 COMMINBUFF BSSC INBUFFLEN buffer for input line 00001C5F 19 TMPBUFFPTR BSS 1 pointer into buffer 00001C60 20 ABSADDRESS BSS 1 absolute address for CIA buffer 00001C61 21 NUMLFTOVR BSS 1 count for chars. left from last transfer 22 23 PROG 24 25 COMMINIT BLOCK comm initialization block 26 27 ENTRY INITCIA 28 29 ********************************************************************************** 30 * * 31 * This routine does all the initializing of the comm. so * 32 * that when we have been booted from the control panel we can * 33 * eventually talk to a chosen port on the comm. * 34 * Call: * 35 * CALLNP INITCIA * 36 * Eats R0:R5 * 37 * * 38 ********************************************************************************** 39 40 VARS 00001C62 41 INITCIARS BSS 1 return address 42 PROG 43 025F2 DD401C62 44 INITCIA ENTRNP INITCIARS entry point 025F3 60440000 1 IMM 45 LD R1 0 index for slot number 025F4 60220370 0 1 46 CHECKSLOT LD R0 IBSLOTS(R1) get WRU response for slot 025F5 600A0040 0 0 CBM 47 LD R0 R0/WRU0TYPE who is in this slot? 025F6 64040003 0 IMM 48 CPR R0 SLTTPPU is it a PPU? 025F7 FE0C2607 49 JNE NEXTSLOT jump if not, try next slot for PPU 50 * \ / 025F8 EC120000 0 REG 51 STZ R0 clear register 025F9 E44A0840 1 0 CBM 52 ST R1 R0/PFSLOT slot the PPU is hiding in 025FA 60840000 2 IMM 53 LD R2 0 index for channel number 000025FB 54 NEXTCHANL LABEL 025FB E48A3020 2 0 CBM 55 ST R2 R0/PPUCHAN store channel number 025FC 60C40086 3 IMM 56 LD R3 PNCIX page # for communication 025FD 00D20000 0 REG 57 LDPF R0 set to communicate with device 025FE 61001800 4 58 LD R4 CIX(PPUCABLED) ask who is on this channel 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 86 (OPLCOMM) F 19 Off-line Communication Driver 025FF 614B0080 5 4 CBM 59 LD R5 R4/DWRUTYPE get type of device 02600 65440008 5 IMM 60 CPR R5 DVCTCOMM is it a comm? 02601 FE02260B 61 JEQ FOUNDCOMM jump if so 62 * \ / 02602 18840001 2 IMM 63 ADD R2 1 advance to next channel 02603 64840004 2 IMM 64 CPR R2 PPUCHANS have all channels been checked? 02604 FE022607 65 JEQ NEXTSLOT if not, go to next slot 66 * \ / 02605 80920000 0 REG 67 PFRD R0 load CIX PF 02606 FE0E25FB 68 JMP NEXTCHANL go try next channel 69 * --- 70 00002607 71 NEXTSLOT LABEL 02607 18440001 1 IMM 72 ADD R1 1 advance to next slot 02608 64440010 1 IMM 73 CPR R1 NUMSLOTS all slots checked? 02609 FE0C25F4 74 JNE CHECKSLOT if not check next one 75 * \ / 0260A 00025000 76 HALT HALTB5000 no PPU with CIA found 77 * --- 78 79 ********************************************************************************** 80 * * 81 * Scan the CIA that we found. We generate the port * 82 * number for the topmost port on the first port board that we * 83 * find and save it in PORTNUM. We use it for all subsequent * 84 * terminal I/O. This way we can use a CIA with a broken * 85 * connector which prevents using the lowest numbered port * 86 * board. We send an initializing command to all ports on * 87 * each port board. When we have done that, we send an * 88 * enabling command to the port that we decided to use. * 89 * * 90 ********************************************************************************** 91 0000260B 92 FOUNDCOMM LABEL 0260B 60440050 1 IMM 93 LD R1 INBUFFLEN fetch input buffer length 0260C 60841C4B 2 IMM 94 LD R2 ADR COMMINBUFFW and address 0260D DA800800 2 1 95 FILLI R2 R1 000 clear to prevent parity errors 0260E D1401C4A 96 STMW PORTNUM indicate that we haven't found a port board 0260F E4001C49 0 97 ST R0 PF4COMM remember PF info. on comm. 02610 60040000 0 IMM 98 LD R0 0 start at port number 0 02611 60402632 1 99 LD R1 INITILCMND flush buffers etc. 02612 61440007 5 IMM 100 LD R5 CIABOARDS-1 counter for boards on CIA 00002613 101 MOREINITIL LABEL 02613 F72E2616 4 102 JBT R4/BIT 23 BOARDHERE is there a board here? 02614 18040008 0 IMM 103 ADD R0 CIAPPBRD no, skip these ports 02615 FE0E261D 104 JMP NEXTBOARD go check for next board 105 * --- 106 00002616 107 BOARDHERE LABEL 02616 5C001C4A 108 CMZ PORTNUM have we found a port board yet? 02617 FE062619 109 JGE INITILBRD jump if we have 02618 E4001C4A 0 110 ST R0 PORTNUM otherwise, save active port number 00002619 111 INITILBRD LABEL 02619 60C40007 3 IMM 112 LD R3 CIAPPBRD-1 counter for ports per board 0000261A 113 INITILOOP LABEL 0261A E4601A80 1 0 114 ST R1 CIX(CIAPORT+R0) flush buffers etc. on port 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 87 (OPLCOMM) F 19 Off-line Communication Driver 0261B 18040001 0 IMM 115 ADD R0 1 point to next port 0261C FAE6261A 3 116 JDR R3 INITILOOP all ports on board done 117 * \ / 0000261D 118 NEXTBOARD LABEL 0261D 610B20F0 4 4 CBM 119 LD R4 R4/BITS 16:30 shift board location bit map 0261E FB662613 5 120 JDR R5 MOREINITIL continue for all boards 121 * \ / 0261F 60401C4A 1 122 LD R1 PORTNUM fetch port number that we are using 02620 FA6C2630 1 123 JEQMW R1 NOPORTBRDS jump if we didn't find any ports 02621 60002631 0 124 LD R0 ENABLCMND command to enable input 02622 E4221A80 0 1 125 ST R0 CIX(CIAPORT)(R1) enable input from chosen port 02623 EC001A09 126 STZ CIX(CIAMODE) normal mode for port 02624 D1401A01 127 STMW CIX(CIAINTACK) acknowledge all interrupts 02625 60040004 0 IMM 128 LD R0 1*CIAEOP mask for EOP interrupt 02626 E4001A02 0 129 ST R0 CIX(CIAINTMASK) store mask into CIA 130 131 * Make an absolute address for input buffer (used in I/O routines) 132 02627 60041C4B 0 IMM 133 LD R0 ADR COMMINBUFFW virtual address of buffer 02628 7C020004 0 IMM 134 IOR R0 1*MONBIT*FLDABSPG say its in monitor memory 02629 60CA1C80 3 0 CBM 135 LD R3 R0/PAGEFIELD what page is it in 0262A 80924000 1 REG 136 PFRD R1 PF contents for page 0262B E44A14C0 1 0 CBM 137 ST R1 R0/FLDABSPG make into absolute address 0262C 604A4840 1 1 CBM 138 LD R1 R1/PFSLOT get slot page is in 0262D E44A0840 1 0 CBM 139 ST R1 R0/PFSLOT put slot in absolute address 0262E E4001C60 0 140 ST R0 ABSADDRESS remember absolute address 0262F 5D001C62 141 LEAVE INITCIARS 142 * --- 143 00002630 144 NOPORTBRDS LABEL 02630 00025001 145 HALT HALTB5001 no port boards on COMM 146 * --- 147 02631 7B1C0000 148 ENABLCMND VFD 07B1C0000 command to enable input from port 02632 001FFFE8 149 INITILCMND VFD 0001FFFE8 command to flush buffers, set rate, etc. 150 +ABSADDRESS 00001C60 F 19 140s BOARDHERE 00002616 F 19 102j 107= CHECKSLOT 000025F4 F 19 46= 74j +COMMINBUFFW 00001C4B F 19 94a 133a ENABLCMND 00002631 F 19 124 148= FOUNDCOMM 0000260B F 19 61j 92= +INBUFFLEN 00000050 F 19 93 +INITCIA 000025F2 F 19 27 44= INITCIARS 00001C62 F 19 41= 44s 141 INITILBRD 00002619 F 19 109j 111= INITILCMND 00002632 F 19 99 149= INITILOOP 0000261A F 19 113= 116j MOREINITIL 00002613 F 19 101= 120j NEXTBOARD 0000261D F 19 104j 118= NEXTCHANL 000025FB F 19 54= 68j NEXTSLOT 00002607 F 19 49j 65j 71= NOPORTBRDS 00002630 F 19 123j 144= +PF4COMM 00001C49 F 19 97s +PORTNUM 00001C4A F 19 96s 108 110s 122 +PROG MACRO F 19 42 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 88 (OPLCOMM) F 19 Off-line Communication Driver +PROGRAM! 000025F2 F 19 40e 40= 42a +PSECT! 00000000 F 19 40a 40e 40e 40a 40= 42= 42a 42e 42a 42e +VARIABLES! 00001C63 F 19 40a 42= 42e +VARS MACRO F 19 40 151 END COMMINIT of comm initialization 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 89 (OPLCOMM) F 19 Off-line Communication Driver 153 154 COMMRDCHAR BLOCK read character routine 155 156 ENTRY READCHARR 157 158 ********************************************************************************** 159 * * 160 * READCHAR. Routine that will read one character from * 161 * the input device. * 162 * Call: * 163 * CALLNP @VREADCHAR * 164 * ST R0 the character * 165 * Sets R0 * 166 * * 167 * The character is returned in R0 with the high order * 168 * bit masked off. No other registers are changed. * 169 * * 170 ********************************************************************************** 171 172 VARS 00001C63 173 READCHARRS BSS 1 return address save 00001C64 174 RDCHARR1 BSS 1 save for R1 00001C65 175 RDCHARR3 BSS 1 save for R3 176 177 PROG 02633 DD401C63 178 READCHARR ENTRNP READCHARRS 02634 E4401C64 1 179 ST R1 RDCHARR1 save this register 02635 E4C01C65 3 180 ST R3 RDCHARR3 save this register 02636 60C01C45 3 181 LD R3 OPLTYPE where were we booted from 02637 FACC263D 3 182 JNEZ R3 FPBOOT jump if not RFP boot 183 * \ / 184 185 ********************************************************************************** 186 * This part handles input if booted from RFP. * 187 ********************************************************************************** 188 02638 60C40086 3 IMM 189 LD R3 PNCIX 02639 00D013E5 @ 190 LDPF @VPF4SSU get access to the SSU 0000263A 191 WAIT4RDCH LABEL 0263A 6000180D 0 192 LD R0 CIX(SSUCHARIN) get the character 0263B FA06263A 0 193 JGEZ R0 WAIT4RDCH wait for the read character 194 * \ / 0263C FE0E266E 195 JMP ECHONRETRN go echo the character and return 196 * --- 197 198 ********************************************************************************** 199 * This part handles input if booted from FP. * 200 ********************************************************************************** 201 0000263D 202 FPBOOT LABEL 0263D 60001C61 0 203 LD R0 NUMLFTOVR were there any left over chars? 0263E FA022644 0 204 JEQZ R0 NONELFTOVR jump if no characters from last time 205 * \ / 206 * Use the left over characters from the last transfer 0263F 10040001 0 IMM 207 SUB R0 1 one less character remains 02640 E4001C61 0 208 ST R0 NUMLFTOVR remember how many more 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 90 (OPLCOMM) F 19 Off-line Communication Driver 02641 D0801C5F 209 INCP TMPBUFFPTR point to the current character 02642 60101C5F 0 @ 210 LD R0 @TMPBUFFPTR get it 02643 FE0E266E 211 JMP ECHONRETRN go echo it 212 * --- 213 214 * Request transfers from comm. until characters input and 215 * use first one. 216 00002644 217 NONELFTOVR LABEL 02644 60C40086 3 IMM 218 LD R3 PNCIX page # of CIX 02645 00C01C49 219 LDPF PF4COMM PF to talk to comm. 00002646 220 LOOKLOOP LABEL 02646 60001A01 0 221 LD R0 CIX(CIAWHYINT) 02647 600A0100 0 0 CBM 222 LD R0 R0/CIACHARS number of chars. CIA has received 02648 FA022646 0 223 JEQZ R0 LOOKLOOP if no chars. keep looking 224 * \ / 02649 60040001 0 IMM 225 LD R0 1*PPUIDMAD 0264A E4001803 0 226 ST R0 CIX(PPUSCSTAT) DMA direction dev. to mem. 0264B 60001C60 0 227 LD R0 ABSADDRESS absolute address for comm. buffer 0264C E4001805 0 228 ST R0 CIX(PPUADDR1) transfer address for comm. 0264D 60040050 0 IMM 229 LD R0 INBUFFLEN max. chars. that can be input 0264E 7C048000 0 IMM 230 IOR R0 1*PPUCLAST say last char. count 0264F E4001804 0 231 ST R0 CIX(PPUCNT1) count of chars. 02650 60040050 0 IMM 232 LD R0 INBUFFLEN 02651 E4001A04 0 233 ST R0 CIX(CIASREAD) start read transfer 02652 604400FF 1 IMM 234 LD R1 0FF delay time 00002653 235 LOOP LABEL 02653 60001801 0 236 LD R0 CIX(PPUINTSTAT) is there an EOP? 02654 F6202657 0 237 JBT R0/PPUIBTR FOUNDEOP jump if there was an EOP 02655 FA662653 1 238 JDR R1 LOOP no, keep looking 239 * \ / 02656 00025002 240 HALT HALTB5002 nothing came back from read request 241 * --- 242 00002657 243 FOUNDEOP LABEL 02657 D1401A01 244 STMW CIX(CIAINTACK) acknowledge interrupt 02658 60002673 0 245 LD R0 BUFFERPTR address for input buffer 02659 E4001C5F 0 246 ST R0 TMPBUFFPTR temporary pointer to transfer data 0000265A 247 KEEPCHKING LABEL 0265A 60101C5F 0 @ 248 LD R0 @TMPBUFFPTR get input buffer char. 0265B 640400FE 0 IMM 249 CPR R0 0FE check for end marker 0265C FE022646 250 JEQ LOOKLOOP if so, go get more from comm. 251 * \ / 0265D 604A3460 1 0 CBM 252 LD R1 R0/BITS 26:31 extract port # 0265E D0801C5F 253 INCP TMPBUFFPTR skip over outcount 0265F D0801C5F 254 INCP TMPBUFFPTR point to char. count if no status 02660 F2322662 0 255 JBF R0/PORTSTAT NOSTATUS jump if no status with transfer 256 * \ / 02661 D0801C5F 257 INCP TMPBUFFPTR otherwise skip over status 00002662 258 NOSTATUS LABEL 02662 64401C4A 1 259 CPR R1 PORTNUM is this our port? 02663 FE022669 260 JEQ RIGHTPORT jump if it is 261 * \ / 02664 60101C5F 0 @ 262 LD R0 @TMPBUFFPTR get number of characters from this port 02665 18040001 0 IMM 263 ADD R0 1 add one for CC byte 02666 38301C5F 0 0 @ 264 LEA R0 @TMPBUFFPTR(R0) produce next port address 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 91 (OPLCOMM) F 19 Off-line Communication Driver 02667 E4001C5F 0 265 ST R0 TMPBUFFPTR and save updated address 02668 FE0E265A 266 JMP KEEPCHKING check next port 267 * --- 268 00002669 269 RIGHTPORT LABEL 02669 60101C5F 0 @ 270 LD R0 @TMPBUFFPTR get incount 0266A 10040001 0 IMM 271 SUB R0 1 one less chars. left 0266B E4001C61 0 272 ST R0 NUMLFTOVR remaining chars. from port 0266C D0801C5F 273 INCP TMPBUFFPTR point to first input char. 0266D 60101C5F 0 @ 274 LD R0 @TMPBUFFPTR get first char. from buffer 275 * \ / 0000266E 276 ECHONRETRN LABEL 0266E DC5013F2 @ 277 CALLNP @VWRITECHAR echo the character 0266F 7804007F 0 IMM 278 AND R0 07F remove the funny bit 02670 60401C64 1 279 LD R1 RDCHARR1 restore R1 02671 60C01C65 3 280 LD R3 RDCHARR3 restore the register 02672 5D001C63 281 LEAVE READCHARRS return 282 * --- 283 02673 020C1C4B 284 BUFFERPTR PTR COMMINBUFF character pointer to buffer 285 +ABSADDRESS 00001C60 F 19 227 BUFFERPTR 00002673 F 19 245 284= +COMMINBUFF 02001C4B F 19 284a ECHONRETRN 0000266E F 19 195j 211j 276= FOUNDEOP 00002657 F 19 237j 243= FPBOOT 0000263D F 19 182j 202= +INBUFFLEN 00000050 F 19 229 232 KEEPCHKING 0000265A F 19 247= 266j LOOKLOOP 00002646 F 19 220= 223j 250j LOOP 00002653 F 19 235= 238j NONELFTOVR 00002644 F 19 204j 217= NOSTATUS 00002662 F 19 255j 258= +NUMLFTOVR 00001C61 F 19 203 208s 272s +OPLTYPE 00001C45 F 19 181 +PF4COMM 00001C49 F 19 219 +PORTNUM 00001C4A F 19 259 +PROG MACRO F 19 177 +PROGRAM! 00002633 F 19 172= 172e 177a +PSECT! 00000000 F 19 172a 172e 172= 172a 172e 177e 177a 177= 177a 177e RDCHARR1 00001C64 F 19 174= 179s 279 RDCHARR3 00001C65 F 19 175= 180s 280 +READCHARR 00002633 F 19 156 178= READCHARRS 00001C63 F 19 173= 178s 281 RIGHTPORT 00002669 F 19 260j 269= +TMPBUFFPTR 00001C5F F 19 209s 210 246s 248 253s 254s 257s 262 264a 265s 270 273s 274 +VARIABLES! 00001C66 F 19 172a 177e 177= +VARS MACRO F 19 172 +VPF4SSU 000013E5 F 19 190 +VWRITECHAR 000013F2 F 19 277 WAIT4RDCH 0000263A F 19 191= 193j 286 END COMMRDCHAR of readcharr 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 92 (OPLCOMM) F 19 Off-line Communication Driver 288 289 COMMWRCHAR BLOCK write character routine 290 291 ENTRY WRITECHARR 292 293 ********************************************************************************** 294 * * 295 * WRITECHAR. Routine to write one character to the * 296 * output device. * 297 * Call: * 298 * LD R0 the character * 299 * CALLNP @VWRITECHAR * 300 * * 301 * The character is written out as given. No registers * 302 * are changed. * 303 * * 304 ********************************************************************************** 305 306 VARS 00001C66 307 WRITECHARS BSS 1 return address save 00001C67 308 WRCHARR0 BSS 1 save for R1 00001C68 309 WRCHARR1 BSS 1 save for R1 00001C69 310 WRCHARR3 BSS 1 save for R3 311 312 PROG 02674 DD401C66 313 WRITECHARR ENTRNP WRITECHARS 02675 E4001C67 0 314 ST R0 WRCHARR0 save this register 02676 E4401C68 1 315 ST R1 WRCHARR1 save this register 02677 E4C01C69 3 316 ST R3 WRCHARR3 save this register 02678 60C01C45 3 317 LD R3 OPLTYPE flag for where booted from 02679 FACC2680 3 318 JNEZ R3 COMMWRITE if from FP use comm. for output 319 * \ / 320 321 ********************************************************************************** 322 * This part handles outputting the character if * 323 * operating from RFP. * 324 ********************************************************************************** 325 0267A 60C40086 3 IMM 326 LD R3 PNCIX 0267B 00D013E5 @ 327 LDPF @VPF4SSU point to the SSU 0000267C 328 WAIT4WRCH LABEL 0267C 60C01808 3 329 LD R3 CIX(SSUCHAROUT) get the output flag 0267D FAC6267C 3 330 JGEZ R3 WAIT4WRCH wait if busy outputting 0267E E4001808 0 331 ST R0 CIX(SSUCHAROUT) output the character 0267F FE0E2696 332 JMP EXITPOINT go restore registers and return 333 * --- 334 335 ********************************************************************************** 336 * This part handles the outputting of the character if * 337 * FP boot. * 338 * The output buffer format is: * 339 * CH0 - * 340 * CH1 - * 341 * CH2 - * 342 ********************************************************************************** 343 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 93 (OPLCOMM) F 19 Off-line Communication Driver 00002680 344 COMMWRITE LABEL 02680 60C40086 3 IMM 345 LD R3 PNCIX page number for CIX 02681 00C01C49 346 LDPF PF4COMM set up to talk to comm. 02682 E40A2080 0 0 CBM 347 ST R0 R0/CH2 shift character 02683 60401C4A 1 348 LD R1 PORTNUM get the port number that we chose 02684 E44A0080 1 0 CBM 349 ST R1 R0/CH0 put port number into buffer 02685 EDCA1080 0 CBM 350 STW R0/CH1 and indicate we have one character 02686 E4001C4B 0 351 ST R0 COMMINBUFFW buffer for transfer 02687 60040001 0 IMM 352 LD R0 1*PPUIDMAD DMA direction from memory 02688 E4001802 0 353 ST R0 CIX(PPUSSSTAT) tell it direction 02689 60001C60 0 354 LD R0 ABSADDRESS address of buffer for transfer 0268A E4001805 0 355 ST R0 CIX(PPUADDR1) tell PPU address 0268B 60040003 0 IMM 356 LD R0 3 bytes in transfer 0268C 7C048000 0 IMM 357 IOR R0 1*PPUCLAST tell it last byte count 0268D E4001804 0 358 ST R0 CIX(PPUCNT1) tell PPU character count 0268E 60040003 0 IMM 359 LD R0 3 0268F E4001A05 0 360 ST R0 CIX(CIASWRITE) start transfer 02690 604400FF 1 IMM 361 LD R1 0FF delay time 00002691 362 LOOP LABEL 02691 60001801 0 363 LD R0 CIX(PPUINTSTAT) interrupt bits in PPU 02692 F6202695 0 364 JBT R0/PPUIBTR SUCESSFUL was there an EOP? 02693 FA662691 1 365 JDR R1 LOOP no, keep checking 366 * \ / 02694 00025003 367 HALT HALTB5003 CIA not responding to output 368 * --- 369 00002695 370 SUCESSFUL LABEL 02695 D1401A01 371 STMW CIX(CIAINTACK) acknowledge interrupt 00002696 372 EXITPOINT LABEL 02696 60C01C69 3 373 LD R3 WRCHARR3 restore R3 02697 60401C68 1 374 LD R1 WRCHARR1 restore R1 02698 60001C67 0 375 LD R0 WRCHARR0 restore R0 02699 5D001C66 376 LEAVE WRITECHARS 377 * --- 378 +ABSADDRESS 00001C60 F 19 354 +COMMINBUFFW 00001C4B F 19 351s COMMWRITE 00002680 F 19 318j 344= EXITPOINT 00002696 F 19 332j 372= LOOP 00002691 F 19 362= 365j +OPLTYPE 00001C45 F 19 317 +PF4COMM 00001C49 F 19 346 +PORTNUM 00001C4A F 19 348 +PROG MACRO F 19 312 +PROGRAM! 00002674 F 19 306e 306= 312a +PSECT! 00000000 F 19 306a 306a 306e 306= 306e 312= 312a 312a 312e 312e SUCESSFUL 00002695 F 19 364j 370= +VARIABLES! 00001C6A F 19 306a 312= 312e +VARS MACRO F 19 306 +VPF4SSU 000013E5 F 19 327 WAIT4WRCH 0000267C F 19 328= 330j WRCHARR0 00001C67 F 19 308= 314s 375 WRCHARR1 00001C68 F 19 309= 315s 374 WRCHARR3 00001C69 F 19 310= 316s 373 +WRITECHARR 00002674 F 19 291 313= 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 94 (OPLCOMM) F 19 Off-line Communication Driver WRITECHARS 00001C66 F 19 307= 313s 376 379 END COMMWRCHAR of WRITECHAR 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 95 (OPLCOMM) F 19 Off-line Communication Driver 381 382 COMMRDL BLOCK Read Line routine 383 384 ENTRY READLINER 385 386 ********************************************************************************** 387 * * 388 * READLINE. Routine to read one line from the input * 389 * device. One line of input consists of the characters typed * 390 * up to a terminating carriage return (which is not included * 391 * as part of the record). * 392 * Call: * 393 * LD R1 length of the buffer * 394 * LD R2 buffer address * 395 * CALLNP @VREADLINE * 396 * JLTZ R0 read error * 397 * ST R1 buffer remaining * 398 * ST R2 the terminating character * 399 * * 400 ********************************************************************************** 401 402 VARS 00001C6A 403 READLINES BSS 1 return address save 00001C6B 404 BUFFSIZE BSS 1 passed size of the buffer 405 406 PROG 0269A DD401C6A 407 READLINER ENTRNP READLINES 0269B E4401C6B 1 408 ST R1 BUFFSIZE remember the size of the buffer 0000269C 409 RDLRESET LABEL 0269C 60440000 1 IMM 410 LD R1 0 the first is character zero 0269D EC001C61 411 STZ NUMLFTOVR discard old characters 0000269E 412 NEXTCHAR LABEL 0269E DC5013F1 @ 413 CALLNP @VREADCHAR read in a character 0269F 64040008 0 IMM 414 CPR R0 BS is it a backspace? 026A0 FE0226AC 415 JEQ DOBKSP jump if so 026A1 64040018 0 IMM 416 CPR R0 CAN is it the line kill character? 026A2 FE0226AE 417 JEQ DOLKILL jump if so 026A3 6404000D 0 IMM 418 CPR R0 CR is it the terminating CR? 026A4 FE0226B2 419 JEQ DOEND jump if so 026A5 6404000A 0 IMM 420 CPR R0 LF is it a terminating line feed? 026A6 FE0226B8 421 JEQ DOENDLF terminate if so 026A7 64401C6B 1 422 CPR R1 BUFFSIZE beyond end of the buffer? 026A8 FE0626AA 423 JGE MOVEUP don't store the char if so 026A9 E41A8800 0 21 CACH 424 ST R0 CACH R2,0(R1) place the character in the buffer 000026AA 425 MOVEUP LABEL 026AA FA60269E 1 426 IRJ R1 NEXTCHAR move in the buffer and loop 026AB 00025006 427 HALT HALTB5006 (never trust hardware) 428 * --- 429 430 * Process a backspace 000026AC 431 DOBKSP LABEL 026AC FA66269E 1 432 JDR R1 NEXTCHAR back up the character pointer 026AD FE0E269E 433 JMP NEXTCHAR it was already at 0 434 * --- 435 436 * Process a line kill 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 96 (OPLCOMM) F 19 Off-line Communication Driver 000026AE 437 DOLKILL LABEL 026AE 6004005C 0 IMM 438 LD R0 "\" 026AF DC5013F2 @ 439 CALLNP @VWRITECHAR 026B0 DC4026D3 440 CALLNP DOCRLF 026B1 FE0E269C 441 JMP RDLRESET begin again 442 * --- 443 444 * Process the terminating carriage return 000026B2 445 DOEND LABEL 026B2 6004000A 0 IMM 446 LD R0 LF LF 026B3 DC5013F2 @ 447 CALLNP @VWRITECHAR 026B4 6084000D 2 IMM 448 LD R2 CR return the terminating CR 000026B5 449 DOENDX LABEL 026B5 30401C6B 1 450 RSB R1 BUFFSIZE calculate buffer remaining 026B6 60040000 0 IMM 451 LD R0 0 return success 026B7 5D001C6A 452 LEAVE READLINES return 453 * --- 454 455 * Process a terminating line feed. 000026B8 456 DOENDLF LABEL 026B8 6004000D 0 IMM 457 LD R0 CR CR 026B9 DC5013F2 @ 458 CALLNP @VWRITECHAR 026BA 6084000A 2 IMM 459 LD R2 LF return the terminating line feed 026BB FE0E26B5 460 JMP DOENDX 461 * --- 462 +BS 00000008 F 19 414 BUFFSIZE 00001C6B F 19 404= 408s 422 450 +CAN 00000018 F 19 416 +CR 0000000D F 19 418 448 457 DOBKSP 000026AC F 19 415j 431= +DOCRLF UUUUUUUU F 19 440 DOEND 000026B2 F 19 419j 445= DOENDLF 000026B8 F 19 421j 456= DOENDX 000026B5 F 19 449= 460j DOLKILL 000026AE F 19 417j 437= +LF 0000000A F 19 420 446 459 MOVEUP 000026AA F 19 423j 425= NEXTCHAR 0000269E F 19 412= 426j 432j 433j +NUMLFTOVR 00001C61 F 19 411s +PROG MACRO F 19 406 +PROGRAM! 0000269A F 19 402e 402= 406a +PSECT! 00000000 F 19 402e 402= 402e 402a 402a 406e 406e 406= 406a 406a RDLRESET 0000269C F 19 409= 441j +READLINER 0000269A F 19 384 407= READLINES 00001C6A F 19 403= 407s 452 +VARIABLES! 00001C6C F 19 402a 406= 406e +VARS MACRO F 19 402 +VREADCHAR 000013F1 F 19 413 +VWRITECHAR 000013F2 F 19 439 447 458 463 END COMMRDL of READLINE 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 97 (OPLCOMM) F 19 Off-line Communication Driver 465 466 COMMWRL BLOCK write line routine 467 468 ENTRY DOCRLF 469 ENTRY WRITELINER 470 471 ********************************************************************************** 472 * * 473 * WRITELINE. Routine to write the specified line out to * 474 * the interactive output device. * 475 * Call: * 476 * LD R1 length of record in characters * 477 * LD R2 pointer to first character of the record * 478 * CALLNP @VWRITELINE * 479 * JLTZ R0 write error * 480 * * 481 * Besides returning R0, this routine mangles R1 and R2. * 482 * The first character of the record is taken as a * 483 * "forms" character. The only recognized forms characters * 484 * are: * 485 * * 486 * character action * 487 * --------- ------ * 488 * blank the line is followed by a CRLF * 489 * * no characters are appended to the line * 490 * 0 output CRLF before and after the line (double space) * 491 * * 492 ********************************************************************************** 493 494 VARS 00001C6C 495 WRITELINES BSS 1 return address 00001C6D 496 CARRCHAR BSS 1 the carriage control character 497 498 PROG 026BC DD401C6C 499 WRITELINER ENTRNP WRITELINES 026BD 60040020 0 IMM 500 LD R0 " " 026BE FA4226C2 1 501 JEQZ R1 NOLINE jump if nothing to output 026BF 60168000 0 2 CACH 502 LD R0 CACH R2,0 get the leading character 026C0 10440001 1 IMM 503 SUB R1 1 count the used character 026C1 D00A9F30 2 CBM 504 INC R2/FLDCHARS move pointer over the control char 000026C2 505 NOLINE LABEL 026C2 7804007F 0 IMM 506 AND R0 07F remove the garbage bit 026C3 E4001C6D 0 507 ST R0 CARRCHAR save the carriage control char 026C4 64040030 0 IMM 508 CPR R0 "0" is it double space? 026C5 FE0C26C7 509 JNE NOTDOUBLE jump if not 026C6 DC4026D3 510 CALLNP DOCRLF output a CRLF first 000026C7 511 NOTDOUBLE LABEL 026C7 FA4226CD 1 512 JEQZ R1 NOCHARS jump if no characters to output 026C8 984A9F30 1 2 CBM 513 ADDM R1 R2/FLDCHARS point to the last character 026C9 70524000 1 1 REG 514 LDN R1 R1 000026CA 515 OTPTLOOP LABEL 026CA 601A8800 0 21 CACH 516 LD R0 CACH R2,0(R1) get a character 026CB DC5013F2 @ 517 CALLNP @VWRITECHAR output the character 026CC FA6026CA 1 518 IRJ R1 OTPTLOOP output them all 000026CD 519 NOCHARS LABEL 026CD 60001C6D 0 520 LD R0 CARRCHAR get the carriage control character 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 98 (OPLCOMM) F 19 Off-line Communication Driver 026CE 6404002A 0 IMM 521 CPR R0 "*" is it he who gets no end chars? 026CF FE0226D1 522 JEQ NOENDCHAR jump if not to give 026D0 DC4026D3 523 CALLNP DOCRLF output the ending characters 000026D1 524 NOENDCHAR LABEL 026D1 60040000 0 IMM 525 LD R0 0 return success 026D2 5D001C6C 526 LEAVE WRITELINES 527 * --- 528 529 * Output a carriage return and a line feed 530 531 VARS 00001C6E 532 DOCRLFS BSS 1 return address save 533 534 PROG 026D3 DD401C6E 535 DOCRLF ENTRNP DOCRLFS 026D4 6004000D 0 IMM 536 LD R0 CR 026D5 DC5013F2 @ 537 CALLNP @VWRITECHAR 026D6 6004000A 0 IMM 538 LD R0 LF 026D7 DC5013F2 @ 539 CALLNP @VWRITECHAR 026D8 5D001C6E 540 LEAVE DOCRLFS 541 * --- 542 CARRCHAR 00001C6D F 19 496= 507s 520 +CR 0000000D F 19 536 +DOCRLF 000026D3 F 19 468 510 523 535= DOCRLFS 00001C6E F 19 532= 535s 540 +LF 0000000A F 19 538 NOCHARS 000026CD F 19 512j 519= NOENDCHAR 000026D1 F 19 522j 524= NOLINE 000026C2 F 19 501j 505= NOTDOUBLE 000026C7 F 19 509j 511= OTPTLOOP 000026CA F 19 515= 518j +PROG MACRO F 19 498 534 +PROGRAM! 000026D3 F 19 494e 494= 498a 531= 531e 534a +PSECT! 00000000 F 19 494e 494a 494a 494= 494e 498a 498e 498a 498= 498e 531e 531e 531a 531= 531a 534e 534e 534a 534a 534= +VARIABLES! 00001C6F F 19 494a 498= 498e 531a 534= 534e +VARS MACRO F 19 494 531 +VWRITECHAR 000013F2 F 19 517 537 539 +WRITELINER 000026BC F 19 469 499= WRITELINES 00001C6C F 19 495= 499s 526 543 END COMMWRL of WRITELINE 544 ABSADDRESS 00001C60 F 19 20= 140s 227 354 +BS 00000008 F 19 414 +CAN 00000018 F 19 416 COMMINBUFF 02001C4B F 19 18= 284a COMMINBUFFW 00001C4B F 19 17= 94a 133a 351s COMMINIT F 19 25= 151 COMMRDCHAR F 19 154= 286 COMMRDL F 19 382= 463 COMMWRCHAR F 19 289= 379 COMMWRL F 19 466= 543 +CR 0000000D F 19 418 448 457 536 +DOCRLF 000026D3 F 19 10 440 468 510 523 535= INBUFFLEN 00000050 F 19 16= 18 93 229 232 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 99 (OPLCOMM) F 19 Off-line Communication Driver +INITCIA 000025F2 F 19 6 27 44= +LF 0000000A F 19 420 446 459 538 NUMLFTOVR 00001C61 F 19 21= 203 208s 272s 411s +OPLTYPE 00001C45 F 19 181 317 PF4COMM 00001C49 F 19 14= 97s 219 346 PORTNUM 00001C4A F 19 15= 96s 108 110s 122 259 348 +PROG MACRO F 19 23 42 177 312 406 498 534 +PROGRAM! 000026D3 F 19 13e 13= 23a 40e 40= 42a 172= 172e 177a 306e 306= 312a 402= 402e 406a 494e 494= 498a 531e 531= 534a +PSECT! 00000000 F 19 13e 13e 13a 13= 13a 23e 23e 23= 23a 23a 40a 40e 40e 40= 40a 42e 42= 42a 42a 42e 172e 172a 172= 172e 172a 177e 177a 177= 177a 177e 306e 306= 306e 306a 306a 312e 312e 312a 312a 312= 402a 402a 402e 402= 402e 406a 406a 406= 406e 406e 494a 494a 494e 494= 494e 498e 498= 498a 498a 498e 531a 531e 531= 531a 531e 534= 534a 534a 534e 534e +READCHARR 00002633 F 19 7 156 178= +READLINER 0000269A F 19 9 384 407= TMPBUFFPTR 00001C5F F 19 19= 209s 210 246s 248 253s 254s 257s 262 264a 265s 270 273s 274 +VARIABLES! 00001C6F F 19 13a 23= 23e 40a 42e 42= 172a 177e 177= 306a 312= 312e 402a 406e 406= 494a 498e 498= 531a 534= 534e +VARS MACRO F 19 13 40 172 306 402 494 531 +VPF4SSU 000013E5 F 19 190 327 +VREADCHAR 000013F1 F 19 413 +VWRITECHAR 000013F2 F 19 277 439 447 458 517 537 539 +WRITECHARR 00002674 F 19 8 291 313= +WRITELINER 000026BC F 19 11 469 499= 545 END COMMOUTER of offline comm driver 1004 INPUT OPLDATES get in the date fetcher 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 100 (OPLDATES) F 20 DATE fetcher 3 4 ********************************************************************************** 5 * * 6 * DATE gets the current date and time. * 7 * Call: * 8 * CALLNP GETDATE * 9 * Returns R0 = error code ( < 0 indicates error happened) * 10 * R1 = time zone (chars 0:2 = abbr. char 3 = offset) * 11 * R2,R3 = raw time * 12 * Uses R0:R3 * 13 * Restores page map. * 14 * * 15 ********************************************************************************** 16 17 BLOCK 18 19 ENTRY GETDATE 20 21 VARS 00001C6F 22 DATES BSS 1 23 24 PROG 026D9 DD401C6F 25 GETDATE ENTRNP DATES 026DA 60C40086 3 IMM 26 LD PFPTR PNCIX page number reserved for I/O 026DB 80920000 0 REG 27 PFRD R0 get present page map value 026DC 00D013E5 @ 28 LDPF @VPF4SSU map SSU into CIX 026DD 60801801 2 29 LD R2 CIX(SSUCLOCKU) get upper 12 bits of the clock 026DE 60401802 1 30 LD R1 CIX(SSUCLOCKL) put lower 32 bits in a safe register 026DF 00D20000 0 REG 31 LDPF R0 restore original page map value 026E0 60D24000 3 1 REG 32 LD R3 R1 need to return lower part in R3 026E1 6040032F 1 33 LD R1 IZONEWORD get the time zone info 026E2 60040000 0 IMM 34 LD R0 0 indicate all went well 026E3 5D001C6F 35 LEAVE DATES 36 * --- 37 DATES 00001C6F F 20 22= 25s 35 +GETDATE 000026D9 F 20 19 25= +PROG MACRO F 20 24 +PROGRAM! 000026D9 F 20 21= 21e 24a +PSECT! 00000000 F 20 21= 21e 21a 21e 21a 24= 24a 24a 24e 24e +VARIABLES! 00001C70 F 20 21a 24e 24= +VARS MACRO F 20 21 +VPF4SSU 000013E5 F 20 28 38 END of DATE 1005 INPUT OPLFI get in the item fetchers 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 101 (OPLFI) F 21 Input Preparation Routine 3 4 BLOCK 5 6 ENTRY FETCHFNMR fetch a filename 7 ENTRY FETCHITEMR fetch an input item 8 ENTRY FTCHITEMHR fetchitem assuming hex radix 9 ENTRY SCANOVERR skip over leading stuff 10 11 ********************************************************************************** 12 * * 13 * The following table is for determining type of each of * 14 * the 128 ASCII characters (after stripping parity). Each * 15 * entry corresponds to one character. After converting the * 16 * character to a type, the type may be used to index on the * 17 * FETCHITEM control tables. * 18 * * 19 ********************************************************************************** 20 00000000 ABS 21 CEL EQU 0 end-of-line 00000001 ABS 22 CAL EQU 1 alphabetic 00000002 ABS 23 CDL EQU 2 delimiters 00000003 ABS 24 CNM EQU 3 numbers 00000004 ABS 25 CBL EQU 4 blank 00000005 ABS 26 CMS EQU 5 minus sign 00000006 ABS 27 CSS EQU 6 special symbol character 00000007 ABS 28 CSF EQU 7 filename punctuation character 29 026E4 00000002 30 CODETAB VFD 4:CEL,CDL,CDL,CDL,CDL,CDL,CDL,CDL 00-07 026E5 00000002 31 VFDB 4:CDL,CDL,CEL,CDL,CDL,CEL,CDL,CDL 08-0F 026E6 00000002 32 VFDB 4:CDL,CDL,CDL,CDL,CDL,CDL,CDL,CDL 10-17 026E7 00000002 33 VFDB 4:CDL,CDL,CDL,CDL,CDL,CDL,CDL,CDL 18-1F 026E8 00000002 34 VFDB 4:CBL,CSS,CDL,CDL,CSF,CDL,CSS,CDL " !"#$%&'" 026E9 00000002 35 VFDB 4:CSF,CSF,CDL,CSF,CDL,CMS,CSF,CDL "()*+,-./" 026EA 00000003 36 VFDB 4:CNM,CNM,CNM,CNM,CNM,CNM,CNM,CNM "01234567" 026EB 00000002 37 VFDB 4:CNM,CNM,CSF,CDL,CDL,CDL,CDL,CDL "89: <=>?" 026EC 00000001 38 VFDB 4:CDL,CAL,CAL,CAL,CAL,CAL,CAL,CAL "@ABCDEFG" 026ED 00000001 39 VFDB 4:CAL,CAL,CAL,CAL,CAL,CAL,CAL,CAL "HIJKLMNO" 026EE 00000001 40 VFDB 4:CAL,CAL,CAL,CAL,CAL,CAL,CAL,CAL "PQRSTUVW" 026EF 00000006 41 VFDB 4:CAL,CAL,CAL,CDL,CDL,CDL,CDL,CSS "XYZ[\]^_" 026F0 00000001 42 VFDB 4:CDL,CAL,CAL,CAL,CAL,CAL,CAL,CAL "`abcdefg" 026F1 00000001 43 VFDB 4:CAL,CAL,CAL,CAL,CAL,CAL,CAL,CAL "hijklmno" 026F2 00000001 44 VFDB 4:CAL,CAL,CAL,CAL,CAL,CAL,CAL,CAL "pqrstuvw" 026F3 00000002 45 VFDB 4:CAL,CAL,CAL,CDL,CDL,CDL,CDL,CDL "xyz{|}~ " 026F4 010826E4 46 CODES PTR CODETAB 47 00000061 ABS 48 LOWCASE EQU 061 lower case characters 0000007A ABS 49 LOWTOP EQU 07A last lower case character 00000020 ABS 50 LOWBIAS EQU "a"-"A" change lower to upper 00000030 ABS 51 NUMBIAS EQU 030 change ASCII to binary 00000007 ABS 52 LETTERNUM EQU "A"-"9"-1 change letter into number range 0000007F ABS 53 GASMASK EQU 07F parity mask 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 102 (OPLFI) F 21 Input Preparation Routine 55 56 ********************************************************************************** 57 * * 58 * FETCHITEMR. This routine scans the input buffer until * 59 * end of line or a packable item and packs it. * 60 * Call: * 61 * LD R4 => character to start with * 62 * CALLNP FETCHITEMR * 63 * ST R0 terminating character * 64 * ST R1 code for the item packed * 65 * if num ST R2 packed number * 66 * if sym ST2 R2 packed symbol * 67 * * 68 * FTCHITEMHR is identical to FETCHITEMR except that if a number * 69 * is packed the radix is assumed to be hex. * 70 * Returns R0 thru R3 and updates R4 (points at term char). * 71 * * 72 ********************************************************************************** 73 74 VARS 00001C70 75 FISIGN BSS 1 sign of the packed number 00001C71 76 FIRADIX BSS 1 radix of the number being packed 00001C72 77 FISTART BSS 1 one less that first char addr 00001C73 78 FETCHITEMS BSS 1 return address save 79 80 PROG 026F5 DD401C73 81 FTCHITEMHR ENTRNP FETCHITEMS 026F6 60840010 2 IMM 82 LD R2 16 default radix is hex 026F7 FE0E26FA 83 JMP FISHARE 84 * --- 85 026F8 DD401C73 86 FETCHITEMR ENTRNP FETCHITEMS 026F9 6084000A 2 IMM 87 LD R2 10 default radix is decimal 000026FA 88 FISHARE LABEL 026FA E4801C71 2 89 ST R2 FIRADIX 026FB 62840000 23 IMM 90 LD2 R2 0 initial value 026FC D04B1F30 4 CBM 91 DEC R4/FLDCHARS undo the effect of GETCHAR 000026FD 92 FISK LABEL 026FD E5001C72 4 93 ST R4 FISTART save starting location 026FE DC402756 94 CALLNP GETCHAR get the first char 026FF 5CA22700 1 95 LDPC FIJTI(R1) operate on the first char 96 * --- 97 00002700 98 FIJTI LABEL jump table for the initial char 02700 00002708 99 VFD ADR FICR 0 - end-of-line 02701 0000270C 100 VFD ADR FIPN 1 - alpha 02702 000026FD 101 VFD ADR FISK 2 - delimiter 02703 0000270C 102 VFD ADR FIPN 3 - number 02704 000026FD 103 VFD ADR FISK 4 - blank 02705 0000270A 104 VFD ADR FIMS 5 - minus 02706 00002754 105 VFD ADR FI90 6 - symbol special char 02707 00002754 106 VFD ADR FI90 7 - filename punctuation 107 * --- 108 00002708 109 FICR LABEL end-of-line 02708 60440008 1 IMM 110 LD R1 1*TEOL 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 103 (OPLFI) F 21 Input Preparation Routine 02709 FE0E2753 111 JMP FIEX 112 * --- 113 0000270A 114 FIMS LABEL leading minus sign 0270A D1401C70 115 STMW FISIGN the sign is now minus 0270B FE0E271A 116 JMP FICNX pack the number 117 * --- 118 0000270C 119 FIPN LABEL pack a number 0270C 64040030 0 IMM 120 CPR R0 "0" leading zero? 0270D FE0C2711 121 JNE NOTHEX 0270E 60040010 0 IMM 122 LD R0 16 assume hex radix if so 0270F E4001C71 0 123 ST R0 FIRADIX 02710 60040030 0 IMM 124 LD R0 "0" restore R0 00002711 125 NOTHEX LABEL 02711 EDC01C70 126 STW FISIGN implicit plus 00002712 127 FICN LABEL 02712 10040030 0 IMM 128 SUB R0 NUMBIAS remove the ASCII stuff 02713 64040009 0 IMM 129 CPR R0 9 is it a digit? 02714 FE0A2716 130 JLE DIGITOK jump if yes 02715 10040007 0 IMM 131 SUB R0 LETTERNUM else adjust it 00002716 132 DIGITOK LABEL 02716 64001C71 0 133 CPR R0 FIRADIX is the digit within? 02717 FE062727 134 JGE FIPA if not, try to pack as symbol 02718 1C801C71 2 135 MUL R2 FIRADIX enlarge the number 02719 18920000 2 0 REG 136 ADD R2 R0 add in the new digit 0000271A 137 FICNX LABEL 0271A DC402756 138 CALLNP GETCHAR 0271B 5CA2271C 1 139 LDPC FIJTN(R1) state is in a number 140 * --- 141 0000271C 142 FIJTN LABEL jump table for number packing 0271C 00002724 143 VFD ADR FIEN 0 - end-of-line 0271D 00002712 144 VFD ADR FICN 1 - alpha 0271E 00002724 145 VFD ADR FIEN 2 - delimiter 0271F 00002712 146 VFD ADR FICN 3 - number 02720 00002724 147 VFD ADR FIEN 4 - blank 02721 00002754 148 VFD ADR FI90 5 - minus sign 02722 00002727 149 VFD ADR FIPA 6 - symbol special char 02723 00002724 150 VFD ADR FIEN 7 - filename punctuation 151 * --- 152 00002724 153 FIEN LABEL end of number 02724 1C801C70 2 154 MUL R2 FISIGN place the sign in the value 02725 60440001 1 IMM 155 LD R1 1*TNUM the item type code 02726 FE0E2753 156 JMP FIEX exit this routine 157 * --- 158 00002727 159 FIPA LABEL process alpha 02727 6044000D 1 IMM 160 LD R1 13 number of chars in symbol 02728 E4401C70 1 161 ST R1 FISIGN 02729 62840000 23 IMM 162 LD2 R2 0 set initial value to zero 0272A 61001C72 4 163 LD R4 FISTART restore beginning pointer 0000272B 164 FICAX LABEL 0272B DC402756 165 CALLNP GETCHAR get the next char 0272C 5CA2272D 1 166 LDPC FIJTP(R1) state is in symbol 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 104 (OPLFI) F 21 Input Preparation Routine 167 * --- 168 0000272D 169 FIJTP LABEL pack a symbol 0272D 0000274D 170 VFD ADR FIPF 0 - end-of-line 0272E 00002735 171 VFD ADR FICA 1 - alpha 0272F 0000274D 172 VFD ADR FIPF 2 - delimiter 02730 00002735 173 VFD ADR FICA 3 - number 02731 0000274D 174 VFD ADR FIPF 4 - blank 02732 0000274D 175 VFD ADR FIPF 5 - minus sign 02733 00002735 176 VFD ADR FICA 6 - special symbol char 02734 0000274D 177 VFD ADR FIPF 7 - filename puctuation 178 * --- 179 00002735 180 FICA LABEL 02735 D0401C70 181 DEC FISIGN count the character 02736 FE08272B 182 JLT FICAX jump if 12 packed already 00002737 183 FICAY LABEL 02737 60401C70 1 184 LD R1 FISIGN get the current char count 02738 64440006 1 IMM 185 CPR R1 6 past the middle? 02739 FE0A273D 186 JLE FIPK2 if so, pack the other half 0273A 1C840028 2 IMM 187 MUL R2 40 move up the previous sym 0273B 18B0274C 2 0 @ 188 ADD R2 @RADCODEP(R0) add in the new symbol 0273C FE0E272B 189 JMP FICAX 190 * --- 191 0000273D 192 FIPK2 LABEL 0273D 1CC40028 3 IMM 193 MUL R3 40 0273E 18F0274C 3 0 @ 194 ADD R3 @RADCODEP(R0) 0273F FE0E272B 195 JMP FICAX 196 * --- 197 02740 00000000 198 RADCODET VFD 6:00,37,00,00,00,00,38,00 " !"#$%&'" 02742 00000000 199 VFDB 6:00,00,00,00,00,00,00,00 "()*+,-./" 02743 00000008 200 VFDB 6:01,02,03,04,05,06,07,08 "01234567" 02745 00000000 201 VFDB 6:09,10,00,00,00,00,00,00 "89: <=>?" 02746 00000011 202 VFDB 6:00,11,12,13,14,15,16,17 "@ABCDEFG" 02748 00000019 203 VFDB 6:18,19,20,21,22,23,24,25 "HIJKLMNO" 02749 00000021 204 VFDB 6:26,27,28,29,30,31,32,33 "PQRSTUVW" 0274B 00000027 205 VFDB 6:34,35,36,00,00,00,00,39 "XYZ[\]^_" 0274C 0188273A 206 RADCODEP PTR RADCODET(-020) 207 0000274D 208 FIPF LABEL blank filling symbol 0274D D0401C70 209 DEC FISIGN count the fill char 0274E FE0A2752 210 JLE FIEA if all filled, exit 0274F 60040020 0 IMM 211 LD R0 " " assume a space 02750 D04B1F30 4 CBM 212 DEC R4/FLDCHARS undo the effects of GETCHAR 02751 FE0E2737 213 JMP FICAY 214 * --- 215 00002752 216 FIEA LABEL end of symbol packing 02752 60440002 1 IMM 217 LD R1 1*TALPH code for symbol 218 * \ / 219 00002753 220 FIEX LABEL exit for routine 02753 5D001C73 221 LEAVE FETCHITEMS 222 * --- 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 105 (OPLFI) F 21 Input Preparation Routine 223 00002754 224 FI90 LABEL very error 02754 60440000 1 IMM 225 LD R1 1*TERR 02755 FE0E2753 226 JMP FIEX 227 * --- 228 229 ********************************************************************************** 230 * * 231 * GETCHAR. Routine to get the next char. * 232 * Call: * 233 * LD R4 => the char minus one (pointer bumped first) * 234 * CALLNP GETCHAR * 235 * ST R0 upperfied character * 236 * ST R1 code for the char * 237 * * 238 * Returns R0 and R1, R4 points to the char, and other regs * 239 * unchanged. * 240 * * 241 ********************************************************************************** 242 243 VARS 00001C74 244 GETCHARS BSS 1 return address save 245 246 PROG 02756 DD401C74 247 GETCHAR ENTRNP GETCHARS 02757 D00B1F30 4 CBM 248 INC R4/FLDCHARS advance character pointer 02758 60170000 0 4 CACH 249 LD R0 CACH R4,0 get the char 02759 7804007F 0 IMM 250 AND R0 GASMASK remove the parity bit 0275A 64040061 0 IMM 251 CPR R0 LOWCASE a lower case char? 0275B FE08275F 252 JLT GC30 jump if not 0275C 6404007A 0 IMM 253 CPR R0 LOWTOP out of the lower range? 0275D FE04275F 254 JGT GC30 if so, don't upperfy 0275E 10040020 0 IMM 255 SUB R0 LOWBIAS convert to upper case 0000275F 256 GC30 LABEL 0275F 607026F4 1 0 @ 257 LD R1 @CODES(R0) get the char group code 02760 5D001C74 258 LEAVE GETCHARS 259 * --- 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 106 (OPLFI) F 21 Input Preparation Routine 261 262 ********************************************************************************** 263 * * 264 * FETCHFNMR. Routine to fetch a filename and pack it. * 265 * The filename is scanned for and then packed. The default * 266 * extension is inserted if none was specified and the account * 267 * project is zeroed if none was specified. Nothing is done * 268 * with the system name. * 269 * Call: * 270 * LD R4 => character to start with * 271 * LD R5 => 15 word block for the packed name * 272 * LD R3 default file extension * 273 * CALLNP FETCHFNMR * 274 * JLTZ R0 packing error (r0=error code) * 275 * ST R4 => terminating character * 276 * * 277 * Gets R0 thru R3 and updates R4. * 278 * * 279 ********************************************************************************** 280 281 VARS 00001C75 282 FETCHFNMRS BSS 1 return address save 00001C76 283 FETCHFNMRE BSS 1 save for default extension 284 285 PROG 02761 DD401C75 286 FETCHFNMR ENTRNP FETCHFNMRS 02762 E4C01C76 3 287 ST R3 FETCHFNMRE save the default extension 02763 60934000 2 5 REG 288 LD R2 R5 02764 6044003C 1 IMM 289 LD R1 15*CPW 02765 DA800800 2 1 290 FILLI R2 R1 000 initialize block to empty 02766 D1574802 5 BASE 291 STMW R5,EQSYSTEM 02767 D1574807 5 BASE 292 STMW R5,EQACCTPROJ 02768 D157480C 5 BASE 293 STMW R5,EQFILEEXT 02769 D04B1F30 4 CBM 294 DEC R4/FLDCHARS undo the effect of GETCHAR 0000276A 295 FFNMSK LABEL skip leading chars 0276A DC402756 296 CALLNP GETCHAR 0276B 5CA2276C 1 297 LDPC FFNMJTI(R1) 298 * --- 299 0000276C 300 FFNMJTI LABEL initial character skip 0276C 00002775 301 VFD ADR FFNMNONE 0 - end of line 0276D 00002776 302 VFD ADR FFNMPK 1 - alpha 0276E 0000276A 303 VFD ADR FFNMSK 2 - delimiter 0276F 00002774 304 VFD ADR FFNM90 3 - number 02770 0000276A 305 VFD ADR FFNMSK 4 - blank 02771 0000276A 306 VFD ADR FFNMSK 5 - minus sign 02772 00002774 307 VFD ADR FFNM90 6 - special symbol char 02773 00002776 308 VFD ADR FFNMPK 7 - filename punctuation 309 00002774 310 FFNM90 LABEL bad punctuation 02774 6007FFFF 0 IMM 311 LD R0 -1 00002775 312 FFNMNONE LABEL 02775 5D001C75 313 LEAVE FETCHFNMRS 314 * --- 315 00002776 316 FFNMPK LABEL found filename, pack it 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 107 (OPLFI) F 21 Input Preparation Routine 02776 DC402805 317 CALLNP PACKITEM get the first name part 02777 FE0E2774 318 JMP FFNM90 jump if error 02778 64840029 2 IMM 319 CPR R2 PCCOLON was the terminator a colon? 02779 FE0C277E 320 JNE FFNMPKED if not, the name is packed 0277A DC40283C 321 CALLNP PACKITEMI pack the next part 0277B FE0E2774 322 JMP FFNM90 error 0277C 64840029 2 IMM 323 CPR R2 PCCOLON was this term a colon? 0277D FE022774 324 JEQ FFNM90 error if he tried 3 parts 0000277E 325 FFNMPKED LABEL 0277E 6017480C 0 5 BASE 326 LD R0 R5,EQFILEEXT get filename extension 0277F FA2E2782 0 327 JNEMW R0 FFNMNOEXT jump if no default extension 02780 60C01C76 3 328 LD R3 FETCHFNMRE get the default extension 02781 E4D7480C 3 5 BASE 329 ST R3 R5,EQFILEEXT default the extension 00002782 330 FFNMNOEXT LABEL 02782 DC4027A2 331 CALLNP FIXEXTEN clean up the extensions 02783 60040000 0 IMM 332 LD R0 0 good return code 02784 5D001C75 333 LEAVE FETCHFNMRS 334 * --- 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 108 (OPLFI) F 21 Input Preparation Routine 336 337 ********************************************************************************** 338 * * 339 * SCANOVERR. Routine that scans over leading spaces and * 340 * such. * 341 * Call: * 342 * LD R4 => first char to scan over * 343 * CALLNP SCANOVERR * 344 * JEQZ R1 end_of_line * 345 * ST R4 pointer to first good char * 346 * * 347 * Gets R0 and R1 and updates R4. * 348 * * 349 ********************************************************************************** 350 351 VARS 00001C77 352 SCANOVERRS BSS 1 return address save 353 354 PROG 02785 DD401C77 355 SCANOVERR ENTRNP SCANOVERRS 02786 D04B1F30 4 CBM 356 DEC R4/FLDCHARS undo the effects of GETCHAR 00002787 357 SOSK LABEL 02787 DC402756 358 CALLNP GETCHAR 02788 5CA22789 1 359 LDPC SOJTI(R1) operate on its type 360 * --- 361 00002789 362 SOJTI LABEL 02789 00002791 363 VFD ADR SOEX 0 - end of line 0278A 00002791 364 VFD ADR SOEX 1 - alpha 0278B 00002787 365 VFD ADR SOSK 2 - delimiter 0278C 00002791 366 VFD ADR SOEX 3 - number 0278D 00002787 367 VFD ADR SOSK 4 - blank 0278E 00002791 368 VFD ADR SOEX 5 - minus sign 0278F 00002791 369 VFD ADR SOEX 6 - special symbol character 02790 00002791 370 VFD ADR SOEX 7 - filename punctuation 371 00002791 372 SOEX LABEL exit pointing ar the item 02791 5D001C77 373 LEAVE SCANOVERRS 374 * --- 375 CAL 00000001 F 21 22= 38x 38x 38x 38x 38x 38x 38x 39x 39x 39x 39x 39x 39x 39x 39x 40x 40x 40x 40x 40x 40x 40x 40x 41x 41x 41x 42x 42x 42x 42x 42x 42x 42x 43x 43x 43x 43x 43x 43x 43x 43x 44x 44x 44x 44x 44x 44x 44x 44x 45x 45x 45x CBL 00000004 F 21 25= 34x CDL 00000002 F 21 23= 30x 30x 30x 30x 30x 30x 30x 31x 31x 31x 31x 31x 31x 32x 32x 32x 32x 32x 32x 32x 32x 33x 33x 33x 33x 33x 33x 33x 33x 34x 34x 34x 34x 35x 35x 35x 37x 37x 37x 37x 37x 38x 41x 41x 41x 41x 42x 45x 45x 45x 45x 45x CEL 00000000 F 21 21= 30x 31x 31x CMS 00000005 F 21 26= 35x CNM 00000003 F 21 24= 36x 36x 36x 36x 36x 36x 36x 36x 37x 37x CODES 000026F4 F 21 46= 257 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 109 (OPLFI) F 21 Input Preparation Routine CODETAB 010026E4 F 21 30= 46a CSF 00000007 F 21 28= 34x 35x 35x 35x 35x 37x CSS 00000006 F 21 27= 34x 34x 41x DIGITOK 00002716 F 21 130j 132= +EQACCTPROJ UUUUUUUU F 21 292s +EQFILEEXT UUUUUUUU F 21 293s 326 329s +EQSYSTEM UUUUUUUU F 21 291s +FETCHFNMR 00002761 F 21 6 286= FETCHFNMRE 00001C76 F 21 283= 287s 328 FETCHFNMRS 00001C75 F 21 282= 286s 313 333 +FETCHITEMR 000026F8 F 21 7 86= FETCHITEMS 00001C73 F 21 78= 81s 86s 221 FFNM90 00002774 F 21 304a 307a 310= 318j 322j 324j FFNMJTI 0000276C F 21 297 300= FFNMNOEXT 00002782 F 21 327j 330= FFNMNONE 00002775 F 21 301a 312= FFNMPK 00002776 F 21 302a 308a 316= FFNMPKED 0000277E F 21 320j 325= FFNMSK 0000276A F 21 295= 303a 305a 306a FI90 00002754 F 21 105a 106a 148a 224= FICA 00002735 F 21 171a 173a 176a 180= FICAX 0000272B F 21 164= 182j 189j 195j FICAY 00002737 F 21 183= 213j FICN 00002712 F 21 127= 144a 146a FICNX 0000271A F 21 116j 137= FICR 00002708 F 21 99a 109= FIEA 00002752 F 21 210j 216= FIEN 00002724 F 21 143a 145a 147a 150a 153= FIEX 00002753 F 21 111j 156j 220= 226j FIJTI 00002700 F 21 95 98= FIJTN 0000271C F 21 139 142= FIJTP 0000272D F 21 166 169= FIMS 0000270A F 21 104a 114= FIPA 00002727 F 21 134j 149a 159= FIPF 0000274D F 21 170a 172a 174a 175a 177a 208= FIPK2 0000273D F 21 186j 192= FIPN 0000270C F 21 100a 102a 119= FIRADIX 00001C71 F 21 76= 89s 123s 133 135 FISHARE 000026FA F 21 83j 88= FISIGN 00001C70 F 21 75= 115s 126s 154 161s 181s 184 209s FISK 000026FD F 21 92= 101a 103a FISTART 00001C72 F 21 77= 93s 163 +FIXEXTEN UUUUUUUU F 21 331 +FTCHITEMHR 000026F5 F 21 8 81= GASMASK 0000007F F 21 53= 250 GC30 0000275F F 21 252j 254j 256= GETCHAR 00002756 F 21 94 138 165 247= 296 358 GETCHARS 00001C74 F 21 244= 247s 258 LETTERNUM 00000007 F 21 52= 131 LOWBIAS 00000020 F 21 50= 255 LOWCASE 00000061 F 21 48= 251 LOWTOP 0000007A F 21 49= 253 NOTHEX 00002711 F 21 121j 125= NUMBIAS 00000030 F 21 51= 128 +PACKITEM UUUUUUUU F 21 317 +PACKITEMI UUUUUUUU F 21 321 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 110 (OPLFI) F 21 Input Preparation Routine +PCCOLON UUUUUUUU F 21 319 323 +PROG MACRO F 21 80 246 285 354 +PROGRAM! 00002785 F 21 74e 74= 80a 243e 243= 246a 281= 281e 285a 351= 351e 354a +PSECT! 00000000 F 21 74= 74a 74e 74a 74e 80e 80a 80e 80= 80a 243e 243e 243a 243a 243= 246a 246e 246a 246e 246= 281= 281a 281a 281e 281e 285= 285a 285a 285e 285e 351= 351a 351a 351e 351e 354e 354= 354a 354a 354e RADCODEP 0000274C F 21 188 194 206= RADCODET 01802740 F 21 198= 206a +SCANOVERR 00002785 F 21 9 355= SCANOVERRS 00001C77 F 21 352= 355s 373 SOEX 00002791 F 21 363a 364a 366a 368a 369a 370a 372= SOJTI 00002789 F 21 359 362= SOSK 00002787 F 21 357= 365a 367a +TALPH 00003C10 F 21 217 +TEOL 00003810 F 21 110 +TERR 00000000 F 21 225 +TNUM 00003E10 F 21 155 +VARIABLES! 00001C78 F 21 74a 80e 80= 243a 246= 246e 281a 285= 285e 351a 354e 354= +VARS MACRO F 21 74 243 281 351 376 END of PREPIN 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 111 (OPLFI) F 21 String Parameter Packers 379 380 ********************************************************************************** 381 * * 382 * Temporary area used in the processing of the parameters. * 383 * * 384 ********************************************************************************** 385 00134000 5 REG 386 EQT EQU R5 00002792 387 EQTEMPPROT BASE EQT 00174800 5 BASE 388 EQVOLUME BSS2 1 volume name 00174802 5 BASE 389 EQSYSTEM BSS 1 system name 00174803 5 BASE 390 EQVOLPW BSS2 1 password (not used as yet) 00000005 ABS 391 EQELSIZE EQU DISPW EQVOLUME words in each part 00174805 5 BASE 392 EQACCT BSS2 1 account name 00174807 5 BASE 393 EQACCTPROJ BSS 1 account project 00174808 5 BASE 394 EQACCTPW BSS2 1 account directory password 0017480A 5 BASE 395 EQFILENM BSS2 1 filename 0017480C 5 BASE 396 EQFILEEXT BSS 1 file name extension 0017480D 5 BASE 397 EQFILEPW BSS2 1 file access password 398 DRCT 399 ORG EQTEMPPROT 400 401 ********************************************************************************** 402 * * 403 * Symbols are packed using a base 40 multiply packing * 404 * format. See an above definition section for details. The * 405 * following definition of extensions has been made to aid * 406 * packers by signifying terminators. * 407 * * 408 ********************************************************************************** 409 00000000 ABS 410 PCSPACE EQU 0 code for space (a terminator) 0000000B ABS 411 PCAAA EQU 11 code for an A 00000024 ABS 412 PCZZZ EQU 36 code for a Z 00000028 ABS 413 PCRAD EQU 40 radix base 00000028 ABS 414 PCDOT EQU 40 a period 00000029 ABS 415 PCCOLON EQU 41 a colon 0000002A ABS 416 PCLPAREN EQU 42 a left paren. 0000002B ABS 417 PCRPAREN EQU 43 a right paren. 0000002C ABS 418 PCSLASH EQU 44 a slash 0000002D ABS 419 PCPLUS EQU 45 a plus sign 0000002E ABS 420 PCDOLLAR EQU 46 a dollar sign 0000002F ABS 421 PCLSQUAR EQU 47 a left square bracket 00000030 ABS 422 PCRSQUAR EQU 48 a right square bracket 00000031 ABS 423 PCDELIM EQU 49 a delimiter 00000032 ABS 424 PCO EQU 50 all other characters 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 112 (OPLFI) F 21 String Parameter Packers 426 427 BLOCK symbol packer routines 428 429 ENTRY FIXEXTEN fixes up defaults 430 ENTRY PACKITEM pack a specifyier group 431 ENTRY PACKITEMI incre pntr then PACKITEM 432 ENTRY PACKNAME pack a single name 433 ENTRY SFTUPPKTMP shift up contents of temp block 434 0000008F ABS 435 XREQERBFN EQU 08F "Bad filename" error 02792 B6740200 436 DOTSYS PAK6 SYS System owner's project 02793 E79DF200 437 DOTBTI PAK6 !!! Manufacturer's project 438 439 ********************************************************************************** 440 * * 441 * Routine to shift up the separate parts in the temp block. * 442 * * 443 * LD EQT =>temp block * 444 * CALLNP SFTUPPKTMP * 445 * returns with: R0-R1 mangled * 446 * rest unchanged * 447 * * 448 ********************************************************************************** 449 450 VARS 00001C78 451 SFTUPS BSS 1 return address save 452 453 PROG 02794 DD401C78 454 SFTUPPKTMP ENTRNP SFTUPS 02795 6217480A 015 BASE 455 LD2 R0 EQT,EQFILENM 02796 E2174805 015 BASE 456 EXCH2 R0 EQT,EQACCT 02797 E6174800 015 BASE 457 ST2 R0 EQT,EQVOLUME 02798 6017480C 0 5 BASE 458 LD R0 EQT,EQFILEEXT 02799 E0174807 0 5 BASE 459 EXCH R0 EQT,EQACCTPROJ 0279A E4174802 0 5 BASE 460 ST R0 EQT,EQSYSTEM 0279B 6217480D 015 BASE 461 LD2 R0 EQT,EQFILEPW 0279C E2174808 015 BASE 462 EXCH2 R0 EQT,EQACCTPW 0279D E6174803 015 BASE 463 ST2 R0 EQT,EQVOLPW 0279E EE17480A 5 BASE 464 STZ2 EQT,EQFILENM 0279F EE17480D 5 BASE 465 STZ2 EQT,EQFILEPW 027A0 D157480C 5 BASE 466 STMW EQT,EQFILEEXT 027A1 5D001C78 467 LEAVE SFTUPS 468 * --- 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 113 (OPLFI) F 21 String Parameter Packers 470 471 ********************************************************************************** 472 * * 473 * This routine examines all of the extensions in the * 474 * packed block ( .SYSTEM, .PROJECT, and .EXT ) and converts * 475 * "unspecified" (all ones) to null (all zeros). This * 476 * routine is called after the caller has resolved all of * 477 * its own defaults and just before the block is used. * 478 * Call: * 479 * LD EQT => temp block * 480 * CALLNP FIXEXTEN * 481 * * 482 * mangles R0, rest unchanged * 483 * * 484 ********************************************************************************** 485 486 VARS 00001C79 487 FIXEXTENS BSS 1 return address save 488 489 PROG 027A2 DD401C79 490 FIXEXTEN ENTRNP FIXEXTENS 027A3 60174802 0 5 BASE 491 LD R0 EQT,EQSYSTEM check the system name 027A4 FA2E27A6 0 492 JNEMW R0 FIXEXTEN1 jump if it has been specified 027A5 EC174802 5 BASE 493 STZ EQT,EQSYSTEM otherwise, set it null 000027A6 494 FIXEXTEN1 LABEL 027A6 60174807 0 5 BASE 495 LD R0 EQT,EQACCTPROJ check the project 027A7 FA2E27A9 0 496 JNEMW R0 FIXEXTEN2 jump if it has been specified 027A8 EC174807 5 BASE 497 STZ EQT,EQACCTPROJ otherwise, set it null 000027A9 498 FIXEXTEN2 LABEL 027A9 6017480C 0 5 BASE 499 LD R0 EQT,EQFILEEXT get the file extension 027AA FA2E27AC 0 500 JNEMW R0 FIXEXTEN3 jump if it has been specified 027AB EC17480C 5 BASE 501 STZ EQT,EQFILEEXT otherwise, set it to null 000027AC 502 FIXEXTEN3 LABEL 027AC 5D001C79 503 LEAVE FIXEXTENS return 504 * --- 505 506 507 VARS 00001C7A 508 GETCHARS BSS 1 return address save 509 510 PROG 027AD DD401C7A 511 GETCHAR ENTRNP GETCHARS 027AE 60970000 2 4 CACH 512 LD R2 CACH R4,0 get the character 027AF 60B427CB 2 2 @ 513 LD R2 CONVTAB(R2) get the code for the character 027B0 64840028 2 IMM 514 CPR R2 PCDOT compare with the first terminator 027B1 D80BDA20 7 CBM 515 STPSR R7/BITS 13:14 return compare result to caller 027B2 5D001C7A 516 LEAVE GETCHARS 517 * --- 518 519 * conversion table - converts 7 bit ASCII to multiply pack code 000027B3 520 CONVT LABEL 027B3 00000032 521 VFD 6:PCO,PCO,PCO,PCO,PCO,PCO,PCO,PCO NUL-BEL 027B5 00000032 522 VFDB 6:PCO,PCDELIM,PCO,PCO,PCO,PCO,PCO,PCO BS-SI 027B6 00000032 523 VFDB 6:PCO,PCO,PCO,PCO,PCO,PCO,PCO,PCO DLE-ETB 027B8 00000032 524 VFDB 6:PCO,PCO,PCO,PCO,PCO,PCO,PCO,PCO CAN-US 027B9 00000032 525 VFDB 6:PCDELIM,37,PCO,PCO,PCDOLLAR,PCO,38,PCO !"#$%&' 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 114 (OPLFI) F 21 String Parameter Packers 027BA 0000002D 526 VFDB 6:PCLPAREN,PCRPAREN,PCO,PCPLUS ()*+ 027BB 0000002C 527 VFDB 6:PCDELIM,PCO,PCDOT,PCSLASH ,-./ 027BC 00000008 528 VFDB 6:1,2,3,4,5,6,7,8 01234567 027BE 00000032 529 VFDB 6:9,10,PCCOLON,PCO,PCO,PCO,PCO,PCO 89: <=>? 027BF 00000011 530 VFDB 6:PCO,11,12,13,14,15,16,17 @ABCDEFG 027C1 00000019 531 VFDB 6:18,19,20,21,22,23,24,25 HIJKLMNO 027C2 00000021 532 VFDB 6:26,27,28,29,30,31,32,33 PQRSTUVW 027C4 00000027 533 VFDB 6:34,35,36,PCLSQUAR,PCO,PCRSQUAR,PCO,39 XYZ[\]^_ 027C5 00000011 534 VFDB 6:PCO,11,12,13,14,15,16,17 `abcdefg 027C7 00000019 535 VFDB 6:18,19,20,21,22,23,24,25 hijklmno 027C8 00000021 536 VFDB 6:26,27,28,29,30,31,32,33 pqrstuvw 027CA 00000032 537 VFDB 6:34,35,36,PCO,PCO,PCO,PCO,PCO xyz{|}~ 538 BSS 0 539 027CB 018827B3 540 CONVTP PTR CONVT/BITS 0:5 001027CB @ 541 CONVTAB EQU @CONVTP 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 115 (OPLFI) F 21 String Parameter Packers 543 544 ********************************************************************************** 545 * * 546 * Routine to pack name or number. The number packed is * 547 * decimal unless the first digit is a zero in which case it * 548 * is packed as hex. * 549 * * 550 * LD R4 => character * 551 * CALLNP PACKNAME * 552 * return1: error in format: R0 = BFN - bad first char * 553 * BFN - memory wrap around * 554 * return2: R0-R1 = symbol or number * 555 * R2 = code for terminating char * 556 * R3 = item type (0=nothing, 1=symbol, 2=number) * 557 * R4 => terminating char * 558 * R5-R7 unchanged * 559 * * 560 ********************************************************************************** 561 562 VARS 00001C7B 563 PACKNAMET BSS 1 temp 00001C7C 564 PACKNAMES BSS 1 return address save 565 566 PROG 027CC DD401C7C 567 PACKNAME ENTRNP PACKNAMES 027CD 62040000 01 IMM 568 LD2 R0 0 embryo number or name 027CE DC4027AD 569 CALLNP GETCHAR get the first char 027CF FE0627E1 570 JGE NULLITEM term already - null name 027D0 6484000B 2 IMM 571 CPR R2 PCAAA could this be a number? 027D1 FE0827E4 572 JLT PACKNUM jump if number to pack 027D2 64840024 2 IMM 573 CPR R2 PCZZZ 027D3 FE0A27D6 574 JLE PACKLOOP jump if acceptable first char 027D4 6004008F 0 IMM 575 LD R0 XREQERBFN error = bad first character 027D5 5D001C7C 576 LEAVE PACKNAMES 577 * --- 578 579 * Name packing loop 000027D6 580 PACKLOOP LABEL 027D6 DC4027F6 581 CALLNP PACKEXTP pack up 6 characters 027D7 E4001C7B 0 582 ST R0 PACKNAMET save the packed word 027D8 DC4027F6 583 CALLNP PACKEXTP pack up another 6 characters 027D9 60520000 1 0 REG 584 LD R1 R0 move the second 6 027DA 60001C7B 0 585 LD R0 PACKNAMET retrieve the first 6 586 * \ / 587 588 * Ignore characters after the end of the filename -- search for term 027DB 60C40001 3 IMM 589 LD R3 1 symbol packed 000027DC 590 IGNORXTRA LABEL 027DC DC4027AD 591 CALLNP GETCHAR 027DD FE0627F4 592 JGE PACKEXIT search for term 027DE D00B1F30 4 CBM 593 INC R4/FLDCHARS move to next char 027DF FB3027F2 4 594 JZA R4 TOOLONG check for wrap around 027E0 FE0E27DC 595 JMP IGNORXTRA 596 * --- 597 598 * terminator first found - return nothing 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 116 (OPLFI) F 21 String Parameter Packers 599 000027E1 600 NULLITEM LABEL 027E1 62040000 01 IMM 601 LD2 R0 0 item is not here 027E2 60C40000 3 IMM 602 LD R3 0 type is 'nothing' 027E3 FE0E27F4 603 JMP PACKEXIT return 604 * --- 605 606 * Number to pack 000027E4 607 PACKNUM LABEL 027E4 60C4000A 3 IMM 608 LD R3 10 default radix... 027E5 64840001 2 IMM 609 CPR R2 1 ...unless first char... 027E6 FE0C27E8 610 JNE PACKDIG 027E7 60C40010 3 IMM 611 LD R3 16 ...is a zero 000027E8 612 PACKDIG LABEL 027E8 1E12C000 013 REG 613 MUL2 R0 R3 027E9 10840001 2 IMM 614 SUB R2 1 027EA 1A128000 012 REG 615 ADD2 R0 R2 merge in new digit 027EB D00B1F30 4 CBM 616 INC R4/FLDCHARS move over packed char 027EC DC4027AD 617 CALLNP GETCHAR get the next char 027ED FE0627F0 618 JGE PACKDONE jump if OK pack 027EE 6492C000 2 3 REG 619 CPR R2 R3 is char within radix? 027EF FE0A27E8 620 JLE PACKDIG jump if so -- pack it in 000027F0 621 PACKDONE LABEL 027F0 60C40002 3 IMM 622 LD R3 2 indicate that a number was packed 027F1 FE0E27F4 623 JMP PACKEXIT we're done 624 * --- 625 626 * Error -- memory wrapped around when ignoring trailer chars 000027F2 627 TOOLONG LABEL 027F2 6004008F 0 IMM 628 LD R0 XREQERBFN error=gross FUBAR 027F3 5D001C7C 629 LEAVE PACKNAMES 630 * --- 631 632 * Normal exit -- make a return two 000027F4 633 PACKEXIT LABEL 027F4 19C40001 7 IMM 634 ADD R7 1 make a skip return 027F5 5D001C7C 635 LEAVE PACKNAMES 636 * --- 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 117 (OPLFI) F 21 String Parameter Packers 638 639 ********************************************************************************** 640 * * 641 * Routine to pack the extension -- packs 6 chars * 642 * * 643 * LD R4 => first char * 644 * CALLNP PACKEXTP * 645 * returns: R0 = packed thing * 646 * R1, R3 mangled * 647 * R4 => char after last packed (or to term) * 648 * rest unchanged * 649 * * 650 * * 651 ********************************************************************************** 652 653 VARS 00001C7D 654 PACKEXTPS BSS 1 return address save 655 656 PROG 027F6 DD401C7D 657 PACKEXTP ENTRNP PACKEXTPS 027F7 60040000 0 IMM 658 LD R0 0 027F8 60C7FFFA 3 IMM 659 LD R3 -6 chars to pack 000027F9 660 PKEXTLOOP LABEL 027F9 DC4027AD 661 CALLNP GETCHAR get a char 027FA FE0627FD 662 JGE PKEXTFILL jump if term -- pad spaces 027FB D00B1F30 4 CBM 663 INC R4/FLDCHARS move pntr past good char 027FC FE0E27FE 664 JMP PKEXTOK 665 * --- 666 000027FD 667 PKEXTFILL LABEL 027FD 60840000 2 IMM 668 LD R2 PCSPACE pad with spaces 000027FE 669 PKEXTOK LABEL 670 * note that carry is cleared on entry 671 * and nothing will set it (ADD or INC) 027FE 58C40010 IMM 672 IORPSR PSRMODIF turn on unsigned arithmetic 027FF 1C040028 0 IMM 673 MUL R0 PCRAD pack up by radix base 02800 18528000 1 2 REG 674 ADD R1 R2 merge in new char 675 * use MODIF in case this char makes result negative 02801 58840010 IMM 676 CLBPSR PSRMODIF restore normal arithmetic 02802 60124000 0 1 REG 677 LD R0 R1 get right half of product 02803 FAE027F9 3 678 IRJ R3 PKEXTLOOP loop until 6 packed 02804 5D001C7D 679 LEAVE PACKEXTPS 680 * --- 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 118 (OPLFI) F 21 String Parameter Packers 682 683 ********************************************************************************** 684 * * 685 * Routine to pack specifying items of the form: * 686 * * 687 * * 688 * or * 689 * * 690 * where is a decimal or hexidecimal (the latter if * 691 * the first char is a zero) number * 692 * is a zero to twelve character symbol beginning * 693 * with an alphabetic char and terminated by a * 694 * char outside the 40 char multiply pack set * 695 * (except that a space is a terminator too). * 696 * Lower case chars are converted to upper * 697 * case to use. * 698 * is either the char dot (".") followed by zero * 699 * to six char symbol made up of chars from the 40 * 700 * char multiply pack set (except space is a term). * 701 * The following other extensions cannot be * 702 * followed by a . * 703 * They have the form: * 704 * symbol same as writing * 705 * ------ --------------- * 706 * + .!!!: * 707 * $$$ .SYS: * 708 * $$ .ddd: ("ddd" is division) * 709 * $ .dddppp: (project) * 710 * if of the form "()" except that control * 711 * chars are not terminators but are converted to * 712 * alphabetic chars (040 is added). * 713 * * 714 * LD R4 => first char to pack * 715 * LD EQT => pack temp area * 716 * CALLNP PACKITEM * 717 * rtn1 - R0 = error code: BFN - bad first name char * 718 * WPT - closing paren. missing on password* 719 * BFN - memory wrap around when scanning * 720 * rtn2 - R0-R3 mangled * 721 * R4 => terminating char * 722 * rest unchanged * 723 * contents of the temp block have been shifted up * 724 * once and the packed item is at the bottom. * 725 * * 726 ********************************************************************************** 727 728 VARS 00001C7E 729 PACKITEMS BSS 1 return address save 730 731 PROG 02805 DD401C7E 732 PACKITEM ENTRNP PACKITEMS 00002806 733 PKITMSHAR LABEL 02806 DC402794 734 CALLNP SFTUPPKTMP shift up the last packing 02807 DC4027CC 735 CALLNP PACKNAME get the first part 02808 FE0E2837 736 JMP PKITMERR jump if not good 02809 E617480A 015 BASE 737 ST2 R0 EQT,EQFILENM store packed name 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 119 (OPLFI) F 21 String Parameter Packers 0280A 64840028 2 IMM 738 CPR R2 PCDOT a dot extension? 0280B FE02281C 739 JEQ PIDOTEXT jump if so 0280C 6484002D 2 IMM 740 CPR R2 PCPLUS system extension? 0280D FE022824 741 JEQ PIPLUSEXT 0280E 6484002E 2 IMM 742 CPR R2 PCDOLLAR project relative extension? 0280F FE022828 743 JEQ PIDOLEXT 744 * \ / 745 746 * try to pack the password -- check for the leading paren. 00002810 747 PITRYPW LABEL 02810 6484002A 2 IMM 748 CPR R2 PCLPAREN maybe password then? 02811 FE0C281A 749 JNE PIOKEXIT jump if not 02812 D00B1F30 4 CBM 750 INC R4/FLDCHARS move to next good char 02813 DC4027CC 751 CALLNP PACKNAME get the password 02814 FE0E2837 752 JMP PKITMERR jump if it didn't work 02815 E617480D 015 BASE 753 ST2 R0 EQT,EQFILEPW store the password 02816 6484002B 2 IMM 754 CPR R2 PCRPAREN proper term paren? 02817 FE0C2838 755 JNE PKITMPWER jump if bad format 02818 D00B1F30 4 CBM 756 INC R4/FLDCHARS move over that term 02819 DC4027AD 757 CALLNP GETCHAR get the char after 0000281A 758 PIOKEXIT LABEL 0281A 19C40001 7 IMM 759 ADD R7 1 success does a skip return 0281B 5D001C7E 760 LEAVE PACKITEMS 761 * --- 762 763 ********************************************************************************** 764 * * 765 * A dot followed the main name item. Pack the extension * 766 * thereafter. * 767 * * 768 ********************************************************************************** 769 0000281C 770 PIDOTEXT LABEL 0281C D00B1F30 4 CBM 771 INC R4/FLDCHARS move past the dot 0281D DC4027F6 772 CALLNP PACKEXTP get the extension 0281E E417480C 0 5 BASE 773 ST R0 EQT,EQFILEEXT store the packed extension 0000281F 774 IGNORXEXT LABEL 0281F DC4027AD 775 CALLNP GETCHAR get the term char 02820 FE062810 776 JGE PITRYPW if term try for the password 02821 D00B1F30 4 CBM 777 INC R4/FLDCHARS move off the non-term 02822 FB30283A 4 778 JZA R4 PKITMWRAP jump if memory wrap around 02823 FE0E281F 779 JMP IGNORXEXT loop til terminator 780 * --- 781 782 ********************************************************************************** 783 * * 784 * Plus sign extension. Assume ".!!!:" * 785 * * 786 ********************************************************************************** 787 00002824 788 PIPLUSEXT LABEL 02824 60002793 0 789 LD R0 DOTBTI ".!!!" 00002825 790 PISTOREXT LABEL 02825 E417480C 0 5 BASE 791 ST R0 EQT,EQFILEEXT use this as our extension 02826 60840029 2 IMM 792 LD R2 PCCOLON fake like terminator was colon 02827 FE0E281A 793 JMP PIOKEXIT 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 120 (OPLFI) F 21 String Parameter Packers 794 * --- 795 796 ********************************************************************************** 797 * * 798 * Dollar sign extension. Count the number of dollar * 799 * signs and pick up the proper extension. * 800 * * 801 ********************************************************************************** 802 00002828 803 PIDOLEXT LABEL 02828 60040000 0 IMM 804 LD R0 0 one dollar sez own 02829 60530000 1 4 REG 805 LD R1 R4 save pointer to this terminator 0282A D00B1F30 4 CBM 806 INC R4/FLDCHARS move to next char 0282B DC4027AD 807 CALLNP GETCHAR get it 0282C 6484002E 2 IMM 808 CPR R2 PCDOLLAR is it also a dollar sign? 0282D FE0C2835 809 JNE PIDOLBKUP no -- go back to the last char 0282E 60530000 1 4 REG 810 LD R1 R4 save the position of this dollar 0282F D00B1F30 4 CBM 811 INC R4/FLDCHARS try the char after 02830 DC4027AD 812 CALLNP GETCHAR 02831 6484002E 2 IMM 813 CPR R2 PCDOLLAR a third dollar sign? 02832 FE0C2835 814 JNE PIDOLBKUP no -- back up to the last 02833 60002792 0 815 LD R0 DOTSYS three dollar sez public 02834 FE0E2825 816 JMP PISTOREXT 817 * --- 818 819 ********************************************************************************** 820 * * 821 * The next character is not a dollar sign. Back up to * 822 * the last dollar sign and use the current extension. * 823 * * 824 ********************************************************************************** 825 00002835 826 PIDOLBKUP LABEL 02835 E4530000 1 4 REG 827 ST R1 R4 back up 02836 FE0E2825 828 JMP PISTOREXT R0 = extension so far 829 * --- 830 831 ********************************************************************************** 832 * * 833 * An error -- code is in R0 so do a return 1. * 834 * * 835 ********************************************************************************** 836 00002837 837 PKITMERR LABEL 02837 5D001C7E 838 LEAVE PACKITEMS return one 839 * --- 840 841 * Password does not have the terminating paren. 00002838 842 PKITMPWER LABEL 02838 6004008F 0 IMM 843 LD R0 XREQERBFN the code for the error 02839 FE0E2837 844 JMP PKITMERR 845 * --- 846 847 * When searching for end of symbol memory wrapped around 0000283A 848 PKITMWRAP LABEL 0283A 6004008F 0 IMM 849 LD R0 XREQERBFN the code for wrapping around 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 121 (OPLFI) F 21 String Parameter Packers 0283B FE0E2837 850 JMP PKITMERR 851 * --- 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 122 (OPLFI) F 21 String Parameter Packers 853 854 ********************************************************************************** 855 * * 856 * A call to the pack item routine that increments the * 857 * character position pointer before packing. * 858 * * 859 ********************************************************************************** 860 0283C DD401C7E 861 PACKITEMI ENTRNP PACKITEMS 0283D D00B1F30 4 CBM 862 INC R4/FLDCHARS increment the pointer 0283E FE0E2806 863 JMP PKITMSHAR share the rest of the code 864 * --- 865 CONVT 000027B3 F 21 520= 540a CONVTAB 001027CB F 21 513 541= CONVTP 000027CB F 21 540= 541e DOTBTI 00002793 F 21 437= 789 DOTSYS 00002792 F 21 436= 815 +EQACCT 00174805 F 21 456s +EQACCTPROJ 00174807 F 21 459s 495 497s +EQACCTPW 00174808 F 21 462s +EQFILEEXT 0017480C F 21 458 466s 499 501s 773s 791s +EQFILENM 0017480A F 21 455 464s 737s +EQFILEPW 0017480D F 21 461 465s 753s +EQSYSTEM 00174802 F 21 460s 491 493s +EQT 00134000 F 21 455 456s 457s 458 459s 460s 461 462s 463s 464s 465s 466s 491 493s 495 497s 499 501s 737s 753s 773s 791s +EQVOLPW 00174803 F 21 463s +EQVOLUME 00174800 F 21 457s +FIXEXTEN 000027A2 F 21 429 490= FIXEXTEN1 000027A6 F 21 492j 494= FIXEXTEN2 000027A9 F 21 496j 498= FIXEXTEN3 000027AC F 21 500j 502= FIXEXTENS 00001C79 F 21 487= 490s 503 GETCHAR 000027AD F 21 511= 569 591 617 661 757 775 807 812 GETCHARS 00001C7A F 21 508= 511s 516 IGNORXEXT 0000281F F 21 774= 779j IGNORXTRA 000027DC F 21 590= 595j NULLITEM 000027E1 F 21 570j 600= PACKDIG 000027E8 F 21 610j 612= 620j PACKDONE 000027F0 F 21 618j 621= PACKEXIT 000027F4 F 21 592j 603j 623j 633= PACKEXTP 000027F6 F 21 581 583 657= 772 PACKEXTPS 00001C7D F 21 654= 657s 679 +PACKITEM 00002805 F 21 430 732= +PACKITEMI 0000283C F 21 431 861= PACKITEMS 00001C7E F 21 729= 732s 760 838 861s PACKLOOP 000027D6 F 21 574j 580= +PACKNAME 000027CC F 21 432 567= 735 751 PACKNAMES 00001C7C F 21 564= 567s 576 629 635 PACKNAMET 00001C7B F 21 563= 582s 585 PACKNUM 000027E4 F 21 572j 607= +PCAAA 0000000B F 21 571 +PCCOLON 00000029 F 21 529x 792 +PCDELIM 00000031 F 21 522x 525x 527x +PCDOLLAR 0000002E F 21 525x 742 808 813 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 123 (OPLFI) F 21 String Parameter Packers +PCDOT 00000028 F 21 514 527x 738 +PCLPAREN 0000002A F 21 526x 748 +PCLSQUAR 0000002F F 21 533x +PCO 00000032 F 21 521x 521x 521x 521x 521x 521x 521x 521x 522x 522x 522x 522x 522x 522x 522x 523x 523x 523x 523x 523x 523x 523x 523x 524x 524x 524x 524x 524x 524x 524x 524x 525x 525x 525x 525x 526x 527x 529x 529x 529x 529x 529x 530x 533x 533x 534x 537x 537x 537x 537x 537x +PCPLUS 0000002D F 21 526x 740 +PCRAD 00000028 F 21 673 +PCRPAREN 0000002B F 21 526x 754 +PCRSQUAR 00000030 F 21 533x +PCSLASH 0000002C F 21 527x +PCSPACE 00000000 F 21 668 +PCZZZ 00000024 F 21 573 PIDOLBKUP 00002835 F 21 809j 814j 826= PIDOLEXT 00002828 F 21 743j 803= PIDOTEXT 0000281C F 21 739j 770= PIOKEXIT 0000281A F 21 749j 758= 793j PIPLUSEXT 00002824 F 21 741j 788= PISTOREXT 00002825 F 21 790= 816j 828j PITRYPW 00002810 F 21 747= 776j PKEXTFILL 000027FD F 21 662j 667= PKEXTLOOP 000027F9 F 21 660= 678j PKEXTOK 000027FE F 21 664j 669= PKITMERR 00002837 F 21 736j 752j 837= 844j 850j PKITMPWER 00002838 F 21 755j 842= PKITMSHAR 00002806 F 21 733= 863j PKITMWRAP 0000283A F 21 778j 848= +PROG MACRO F 21 453 489 510 566 656 731 +PROGRAM! 00002805 F 21 450e 450= 453a 486= 486e 489a 507= 507e 510a 562= 562e 566a 653= 653e 656a 728e 728= 731a +PSECT! 00000000 F 21 450a 450a 450= 450e 450e 453= 453a 453a 453e 453e 486a 486e 486a 486= 486e 489a 489= 489a 489e 489e 507a 507= 507e 507a 507e 510= 510e 510a 510a 510e 562= 562a 562e 562a 562e 566a 566e 566e 566a 566= 653= 653e 653e 653a 653a 656= 656a 656e 656a 656e 728a 728a 728= 728e 728e 731e 731= 731a 731a 731e +SFTUPPKTMP 00002794 F 21 433 454= 734 SFTUPS 00001C78 F 21 451= 454s 467 TOOLONG 000027F2 F 21 594j 627= +VARIABLES! 00001C7F F 21 450a 453e 453= 486a 489e 489= 507a 510= 510e 562a 566e 566= 653a 656e 656= 728a 731e 731= +VARS MACRO F 21 450 486 507 562 653 728 XREQERBFN 0000008F F 21 435= 575 628 843 849 866 END of the symbol packers 1007 1008 VARS 00000064 ABS 1009 LOGENTRIES EQU 100 1010 00001C7F 1011 LOGBUFFER BSS LOGENTRIES*ERRLNTH+2 1012 1013 PROG 1014 1015 1017 PREPOUTM PURE,OFFLINE,R 1017 * Generating PREPOUT, variables=PURE, output=OFFLINE, name=PREPOUTR, charm= 1017 NOLIST CREF 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 124 F 0 Miscellaneous Areas, End of Program 1017 NOLIST MAP 1017 INPUT .SYS:PO!PURE1INE,R 1 * PO!PURE1.ASSEM, included by PREPOUTM macro when pure code is wanted. 2 3 BLOCK 4 ENTRY PREPOUT!!! 5 VARS 00001E75 ABS 6 VARS!1 EQU DISPW MA 0 7 PROG 0000283F ABS 8 PROG!1 EQU DISPW MA 0 9 BLOCK 10 EXT BEGFRAME 11 EXT ENDFRAME 12 EXT SP 13 EXT PROG 14 EXT VARS 15 EXT INITPSECT 16 EXT PROG!1 17 EXT VARS!1 18 ENTRY PROG!2 19 ENTRY VARS!2 20 INITPSECT PROG!1,VARS!1,PROGRAM 1017 INPUT .SYS:PO!OFFLINEARS!1,PROGRAM 1 * PO!OFFLINE.ASSEM, included by PREPOUTM macro when offline output is wanted. 2 3 PO!WRITEM MACRO 4 EXT VWRITELINE 5 CALLNP @VWRITELINE 6 EMAC 1017 INPUT .SYS:PO!CHARMuded by PREPOUTM macro when offline output is wanted. 1 * File PO!CHARM, included by PREPOUTM macro when program does not already 2 * include the CHARM macro. 3 4 EXT CHARM 5 CHARM 85 * Generating CharStuff Version A8703. 1017 INPUT .SYS:PO!PREPOUTrStuff 2 ENTRY PREPOUT!!! 3 4 ********************************************************************************** 5 * * 6 * This routine accepts a string with special escape sequences * 7 * in it and creates an output string that contains unpacked items * 8 * and writes it out. * 9 * Call: * 10 * CALL PREPOUT * 11 * PAR value 1 * 12 * PAR value 2 * 13 * ... * 14 * PAR value n * 15 * PARL message string * 16 * * 17 * The routine destroys R0:R1. * 18 * * 19 * The string pointed to must be terminated by a null. The * 20 * escape sequence consists of specification characters delimited * 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 125 (PO!PREPOUT) F 26 PREPOUT - Flexible Output Routine 21 * by backslashes. Two consecutive backslashes is equal to one * 22 * backslash. The backslashs and the specification characters * 23 * are replaced by the unpacked item. * 24 * * 25 * The specification is of the form "Cnum,[pnum]" where "C" is * 26 * the type of item to unpack, "num" is the number of the value * 27 * (starting with 1) to unpack, and "pnum" is optional and denotes * 28 * the width of the field into which the value should be unpacked. * 29 * The unpackings that can be done are: * 30 * * 31 * code letter thing unpacked * 32 * ----------- -------------- * 33 * A account specification -- the parameter is a * 34 * buffer that just specifies the volume and * 35 * the account. If "pnum", then acctspec is * 36 * left justified in a field of that size. * 37 * C character string -- the parameter is the first * 38 * character of a zero-terminated string, which * 39 * is placed into the output. If "pnum", then * 40 * the string will be left justified in a field * 41 * of the specified width. * 42 * D decimal number -- parameter is a signed integer * 43 * which will be unpacked variable lengthily. * 44 * If "pnum" is specified, the decimal number * 45 * will be right justified in a field of that * 46 * width. * 47 * E error text -- parameter is an error code and * 48 * the message of the error is placed in * 49 * the output. If "pnum" is specified then * 50 * the message will be left justified in a * 51 * field of that width. * 52 * F file specification -- the parameter is a * 53 * buffer in the EQUIP format. If passwords * 54 * occur in the buffer then they are output * 55 * as just their enclosing parens. If "pnum", * 56 * then the filespec is left justified in a * 57 * field of that size. * 58 * H hexadecimal number -- parameter is an unsigned * 59 * integer, whose low-order "pnum" hexadecimal * 60 * digits are unpacked. If "pnum" is omitted, * 61 * eight digits are unpacked. * 62 * R short symbol -- the parameter is a single * 63 * word RAD packed symbol which is unpacked * 64 * variable lengthily. If "pnum", then the * 65 * symbol will be left justified in a field * 66 * of the specified width. * 67 * S symbol -- the parameter is a double word * 68 * RAD packed symbol which is unpacked * 69 * variable lengthily. If "pnum", then the * 70 * symbol will be left justified in a field * 71 * of the specified width. * 72 * T double word time -- the parameter is the first * 73 * word of a double word (44-bit) system time * 74 * followed by a single word specifying the * 75 * time zone. The time is unpacked and * 76 * converted to the given time zone, then * 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 126 (PO!PREPOUT) F 26 PREPOUT - Flexible Output Routine 77 * displayed as: * 78 * Weekday date-Month-year time timezone abbr. * 79 * The time zone must be stored in the word * 80 * immediately following the time, in the * 81 * standard system format. * 82 * (Bits 0:23 = time zone abbreviation * 83 * Bits 24:31 = time zone offset) * 84 * Z single word time -- the parameter is a 32-bit system * 85 * time followed immediately by a word specifying * 86 * the timezone. The time is unpacked, converted * 87 * to the given time zone, and displayed the same * 88 * as the double word time, except seconds are * 89 * ommitted. * 90 * * 91 * For all substitutions except "H", if the actual value * 92 * requires more space than the given field width, the field * 93 * width will be ignored and the entire value will be output. * 94 * For "H" specifications, only the specified number of low-order * 95 * digits will be output. * 96 * * 97 * If two consecutive back-slashes occur in the message * 98 * prototype, a single back-slash will be output. * 99 * * 100 * Kills R0:R1. * 101 * * 102 ********************************************************************************** 103 00000028 ABS 104 URERRORGET EQU 0028 UREQ to get error message 00000010 ABS 105 PSRMODIF EQU 010 modified arithmetic in PSR 00000004 ABS 106 PSRCARRY EQU 1*BIT 29 carry bit from last op 00001F30 BYTE 107 FLDCHARS EQU BITS 15:1 character address field 000003E8 ABS 108 MSECSS EQU 1000 ms per second 0036EE80 ABS 109 MSECSH EQU MSECSS*3600 ms per hour 110 111 VARS 00001E75 112 PREPOUTS BSS 1 return link area 00001E76 113 PREPOUTR23 BSS 2 save area for R2,R3 00001E78 114 PREPOUTR45 BSS 2 save area for R4,R5 00001E7A 115 PREPOUTR6 BSS 1 save area for R6 00001E7B 116 NEXTPARM BSS 1 ptr to next in PARMVECTOR during parms 00001E7C 117 PARMCOUNT BSS 1 count of values to format 00001E7D 118 PARMVECTOR BSS 20 pointers to values 00001E91 119 BACKUPPT BSS 1 where to back up to on input error 00001E92 120 NUMBER BSS 5 buffer for input item 00000014 ABS 121 NUMLEN EQU DISPC NUMBER size of above 00001E97 122 PARMPTR BSS 1 pointer to current parm while unpacking 00001E98 123 UNPAKRTN BSS 1 ptr to routine to do unpacking 00001E99 124 FIELDLEN BSS 1 length fo field 00001E9A 125 FIELDBEGIN BSS 1 beginning of field 00001E9B 126 OUTBUF BSS 64 output line buffer 127 BSS 64 stack 00001F1B 128 STACK LABEL label on top of stack 129 130 PROG 02A03 DD801E75 131 PREPOUT!!! ENTRS PREPOUTS 02A04 E4801E76 2 132 ST R2 PREPOUTR23 save a register 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 127 (PO!PREPOUT) F 26 PREPOUT - Flexible Output Routine 02A05 38801E7D 2 133 LEA R2 PARMVECTOR 02A06 E4801E7B 2 134 ST R2 NEXTPARM initialize NEXTPARM 02A07 EC001E7C 135 STZ PARMCOUNT initialize PARMCOUNT 02A08 60801E76 2 136 LD R2 PREPOUTR23 restore a register 02A09 DCD3C000 7 REG 137 EXPCS R7 go get the parms 138 * \ / 00002A0A 139 GETPARM LABEL 02A0A F3C82A0F 7 140 JBF R7/BIT 4 LASTPARM jump if this is the last parm 02A0B D0001E7C 141 INC PARMCOUNT count the parms 02A0C D0801E7B 142 INCP NEXTPARM set where to put it 02A0D C1101E7B @ 143 STP @NEXTPARM store the parm (and get next) 02A0E FE0E2A0A 144 JMP GETPARM 145 * --- 00002A0F 146 LASTPARM LABEL 02A0F E6801E76 23 147 ST2 R2 PREPOUTR23 save R2,R3 02A10 E7001E78 45 148 ST2 R4 PREPOUTR45 save R4,R5 02A11 E5801E7A 6 149 ST R6 PREPOUTR6 save R6 02A12 C0134000 5 REG 150 STPL R5 input string pointed to by R5 02A13 61841F1B 6 IMM 151 LD SP ADR STACK get a stack pointer 152 * \ / 153 02A14 61041E9B 4 IMM 154 LD R4 ADR OUTBUF R4 points to output buffer 00002A15 155 NEXTCHAR LABEL move next character 02A15 60174000 0 5 CACH 156 LD R0 CACH R5,0 get an input character 02A16 FA022A1D 0 157 JEQZ R0 PREPDONE jump if no end of string (nul) 02A17 6404005C 0 IMM 158 CPR R0 "\" is it the escape character? 02A18 FE022A25 159 JEQ INSERT if so, insert an unpacked item 00002A19 160 PLACECHAR LABEL 02A19 E4170000 0 4 CACH 161 ST R0 CACH R4,0 put char into output buffer 02A1A 39170001 4 4 CACH 162 LEA R4 CACH R4,1 advance output pointer 00002A1B 163 INSDONE LABEL 02A1B 39574001 5 5 CACH 164 LEA R5 CACH R5,1 advance input pointer 02A1C FE0E2A15 165 JMP NEXTCHAR 166 * --- 167 168 * Line preparation finished -- write out the line 00002A1D 169 PREPDONE LABEL 02A1D 60841E9B 2 IMM 170 LD R2 ADR OUTBUF R2 => output buffer 02A1E 604A9F30 1 2 CBM 171 LD R1 R2/FLDCHARS 02A1F 304B1F30 1 4 CBM 172 RSB R1 R4/FLDCHARS R1 = characters in output 173 PO!WRITEM write the stuff to the terminal 173 EXT VWRITELINE 02A20 DC5013F4 @ 173 CALLNP @VWRITELINE 174 02A21 62801E76 23 175 LD2 R2 PREPOUTR23 restore R2,R3 02A22 63001E78 45 176 LD2 R4 PREPOUTR45 restore R4,R5 02A23 61801E7A 6 177 LD R6 PREPOUTR6 restore R6 02A24 5D001E75 178 LEAVE PREPOUTS 179 * --- 180 181 * Insertion control character -- decode operation 00002A25 182 INSERT LABEL 02A25 E5401E91 5 183 ST R5 BACKUPPT save position to back up to 02A26 39574001 5 5 CACH 184 LEA R5 CACH R5,1 02A27 60174000 0 5 CACH 185 LD R0 CACH R5,0 get control character 02A28 6404005C 0 IMM 186 CPR R0 "\" two backslashes mean one 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 128 (PO!PREPOUT) F 26 PREPOUT - Flexible Output Routine 02A29 FE022A19 187 JEQ PLACECHAR 188 * \ / 02A2A 60C40009 3 IMM 189 LD R3 COMCNT-1 02A2B 7804005F 0 IMM 190 AND R0 05F a cheap upperfication 00002A2C 191 TRYCOM LABEL 02A2C 60662A33 1 3 192 LD R1 COMTAB(R3) 02A2D 640A4080 0 1 CBM 193 CPR R0 R1/COMCHAR is this our command? 02A2E FE022A3D 194 JEQ COMFOUND jump if so 02A2F FAE62A2C 3 195 JDR R3 TRYCOM jump if more to look 196 * \ / 197 * Unknown command - copy it out for all to see 198 00002A30 199 BADCMD LABEL 02A30 61401E91 5 200 LD R5 BACKUPPT back up the input pointer 02A31 6004005C 0 IMM 201 LD R0 "\" put expected value into R0 02A32 FE0E2A19 202 JMP PLACECHAR 203 * --- 204 00000080 BYTE 205 COMCHAR EQU BITS 0:7 00002A33 206 COMTAB LABEL 02A33 41002A6D 207 VFD "A"*COMCHAR+ADR INSACCT account name 02A34 43002A93 208 VFD "C"*COMCHAR+ADR INSCHAR character string 02A35 44002A99 209 VFD "D"*COMCHAR+ADR INSDEC decimal number 02A36 45002AA2 210 VFD "E"*COMCHAR+ADR INSERRM error message 02A37 46002A70 211 VFD "F"*COMCHAR+ADR INSFILE filename 02A38 48002AAB 212 VFD "H"*COMCHAR+ADR INSHEX hexadeciaml number 02A39 52002AB4 213 VFD "R"*COMCHAR+ADR INSRAD short symbol 02A3A 53002ABA 214 VFD "S"*COMCHAR+ADR INSSYM symbol 02A3B 54002B37 215 VFD "T"*COMCHAR+ADR INTIME double word time 02A3C 5A002B2D 216 VFD "Z"*COMCHAR+ADR INSTIME single word time 0000000A ABS 217 COMCNT EQU DISPW COMTAB 218 219 220 * Command is legal - pack parameter number 00002A3D 221 COMFOUND LABEL 02A3D 38564800 1 1 BASE 222 LEA R1 R1,0 clear high bits 02A3E E4401E98 1 223 ST R1 UNPAKRTN save pointer to unpacking routine 02A3F 39574001 5 5 CACH 224 LEA R5 CACH R5,1 02A40 DC00284A 225 CALL GETITEM get parameter number to unpack 02A41 41174000 5 CACH 226 PAR CACH R5,0 02A42 4144005C IMM 227 PARV "\" 02A43 41001E92 228 PAR NUMBER 02A44 40440014 IMM 229 PARVL NUMLEN 02A45 FA0C2A30 0 230 JNEZ R0 BADCMD jump if couldn't get an item 02A46 61524000 5 1 REG 231 LD R5 R1 point past end of item 02A47 DC0028FB 232 CALL CHARTOINT convert the item 02A48 40001E92 233 PARL NUMBER 02A49 FA0C2A30 0 234 JNEZ R0 BADCMD jump if we can't convert it 02A4A 68401E7C 1 235 UCPR R1 PARMCOUNT is the number reasonable? 02A4B FE042A30 236 JGT BADCMD jump if not 02A4C 60221E7D 0 1 237 LD R0 PARMVECTOR(R1) R1 -> data to convert 02A4D E4001E97 0 238 ST R0 PARMPTR save it 02A4E 6047FFFF 1 IMM 239 LD R1 -1 default field size 02A4F 60174000 0 5 CACH 240 LD R0 CACH R5,0 get terminating character of first num 02A50 6404002C 0 IMM 241 CPR R0 "," is there a field size? 02A51 FE0C2A5C 242 JNE NOSIZE jump if not 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 129 (PO!PREPOUT) F 26 PREPOUT - Flexible Output Routine 02A52 DC00284A 243 CALL GETITEM get next item 02A53 41174000 5 CACH 244 PAR CACH R5,0 02A54 4144005C IMM 245 PARV "\" 02A55 41001E92 246 PAR NUMBER 02A56 40440014 IMM 247 PARVL NUMLEN 02A57 FA0C2A30 0 248 JNEZ R0 BADCMD jump if couldn't get it 02A58 61524000 5 1 REG 249 LD R5 R1 copy input pointer 02A59 DC0028FB 250 CALL CHARTOINT convert it to integer 02A5A 40001E92 251 PARL NUMBER 02A5B FA0C2A30 0 252 JNEZ R0 BADCMD jump if wouldn't convert 00002A5C 253 NOSIZE LABEL 02A5C E4401E99 1 254 ST R1 FIELDLEN save field size 02A5D 60174000 0 5 CACH 255 LD R0 CACH R5,0 get next character 02A5E 6404005C 0 IMM 256 CPR R0 "\" is it end of spec? 02A5F FE0C2A30 257 JNE BADCMD if not, something is rotten 02A60 E5001E9A 4 258 ST R4 FIELDBEGIN save for length calculation 02A61 E1401E97 5 259 EXCH R5 PARMPTR R5 -> value to convert 02A62 DC501E98 @ 260 CALLNP @UNPAKRTN unpack the item 02A63 61401E97 5 261 LD R5 PARMPTR R5 -> input string 02A64 604B1F30 1 4 CBM 262 LD R1 R4/FLDCHARS get character addr of next char 02A65 60001E9A 0 263 LD R0 FIELDBEGIN 02A66 104A1F30 1 0 CBM 264 SUB R1 R0/FLDCHARS R1 = number of chars generated for item 02A67 30401E99 1 265 RSB R1 FIELDLEN R1 = size required 02A68 FA4A2A6C 1 266 JLEZ R1 NOFILL jump if no fill required 02A69 60930000 2 4 REG 267 LD R2 R4 02A6A FE580020 268 CFILL " " fill out field with blanks 02A6B 39168000 4 2 CACH 269 LEA R4 CACH R2,0 R4 -> new output location 00002A6C 270 NOFILL LABEL 02A6C FE0E2A1B 271 JMP INSDONE all done inserting 272 * --- 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 130 (PO!PREPOUT) F 26 PREPOUT - Flexible Output Routine 274 275 ********************************************************************************** 276 * * 277 * Unpack an account name (INSACCT) or a file name (INSFILE). * 278 * LD R5 address of source block * 279 * LD R4 address of destination * 280 * CALLNP INSACCT or INSFILE * 281 * ST R4 address of char after end of result * 282 * * 283 ********************************************************************************** 284 285 INSACCT BLOCK INSACCT and INSFILE subroutines 286 ENTRY INSACCT 287 ENTRY INSFILE 288 00002A6D 289 FRAME BASE SP stack frame 290 BSS 1 return link 00178801 6 BASE 291 ITEMNUM BSS 1 number of items left to do 292 DRCT 00000002 ABS 293 FRAMELEN EQU DISPW FRAME size of stack frame 294 ORG FRAME 295 02A6D DD5F8002 6 STAK 296 INSACCT ENTRNP STAK SP,FRAMELEN 02A6E 60040002 0 IMM 297 LD R0 2 number of groups to do 02A6F FE0E2A72 298 JMP COMMON 299 * --- 300 02A70 DD5F8002 6 STAK 301 INSFILE ENTRNP STAK SP,FRAMELEN 02A71 60040003 0 IMM 302 LD R0 3 number of groups to do 303 * \ / 304 00002A72 305 COMMON LABEL 02A72 E4178801 0 6 BASE 306 ST R0 ITEMNUM save the count 00002A73 307 ITEMLOOP LABEL 02A73 60174800 0 5 BASE 308 LD R0 R5,0 get first half of name 02A74 FA0C2A78 0 309 JNEZ R0 DOITEM jump if name specified 02A75 60174802 0 5 BASE 310 LD R0 R5,2 get extension 02A76 FA022A89 0 311 JEQZ R0 SKIPITEM jump if neither specified 02A77 FA2C2A89 0 312 JEQMW R0 SKIPITEM ditto 00002A78 313 DOITEM LABEL 314 02A78 DC00296E 315 CALL P12TOCHAR unpack the name 02A79 43574800 5 BASE 316 PARV2 R5,0 02A7A 40170000 4 CACH 317 PARL CACH R4,0 02A7B 61124000 4 1 REG 318 LD R4 R1 02A7C 60174802 0 5 BASE 319 LD R0 R5,2 get extension 02A7D FA2C2A84 0 320 JEQMW R0 NOEXT jump if extension defaulted 02A7E 6004002E 0 IMM 321 LD R0 "." 02A7F E4170000 0 4 CACH 322 ST R0 CACH R4,0 place dot 02A80 DC00293D 323 CALL P6TOCHAR unpack the extension 02A81 41574802 5 BASE 324 PARV R5,2 02A82 40170001 4 CACH 325 PARL CACH R4,1 02A83 61124000 4 1 REG 326 LD R4 R1 00002A84 327 NOEXT LABEL 02A84 5C174803 5 BASE 328 CMZ R5,3 is password specified? 02A85 FE022A89 329 JEQ NOPASSW jump if not 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 131 (PO!PREPOUT) F 26 PREPOUT - Flexible Output Routine 02A86 60042829 0 IMM 330 LD R0 "()" 02A87 E4090100 0 4 ZBM 331 ST R0 R4,0/BITS 0:15 place symbol for password 02A88 39170002 4 4 CACH 332 LEA R4 CACH R4,2 bump output pointer 00002A89 333 NOPASSW LABEL 00002A89 334 SKIPITEM LABEL 02A89 39574805 5 5 BASE 335 LEA R5 R5,5 point at next item to unpack 02A8A D0578801 6 BASE 336 DEC ITEMNUM one fewer to do 02A8B FE0A2A92 337 JLE DONE jump if all done 02A8C 65001E9A 4 338 CPR R4 FIELDBEGIN have we output anything yet? 02A8D FE022A73 339 JEQ ITEMLOOP if not, don't need a colon 02A8E 6004003A 0 IMM 340 LD R0 ":" 02A8F E4170000 0 4 CACH 341 ST R0 CACH R4,0 place separator between items 02A90 39170001 4 4 CACH 342 LEA R4 CACH R4,1 bump output pointer 02A91 FE0E2A73 343 JMP ITEMLOOP go do next item 344 * --- 345 00002A92 346 DONE LABEL 02A92 5D1F8002 6 STAK 347 LEAVE STAK SP,FRAMELEN return, all done 348 * --- 349 350 END INSACCT and INSFILE subroutines 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 132 (PO!PREPOUT) F 26 PREPOUT - Flexible Output Routine 352 353 ********************************************************************************** 354 * * 355 * Output a character string. * 356 * * 357 ********************************************************************************** 358 02A93 DD5F8001 6 STAK 359 INSCHAR ENTRNP STAK SP,1 02A94 DC0029D8 360 CALL MOVE move the string to output 02A95 41174000 5 CACH 361 PAR CACH R5,0 source location 02A96 40170000 4 CACH 362 PARL CACH R4,0 destination location 02A97 61124000 4 1 REG 363 LD R4 R1 bump output pointer 02A98 5D1F8001 6 STAK 364 LEAVE STAK SP,1 365 * --- 366 367 368 ********************************************************************************** 369 * * 370 * Unpack an integer. * 371 * * 372 ********************************************************************************** 373 374 INSDEC BLOCK INSDEC subroutine 375 ENTRY INSDEC 376 02A99 DD5F8001 6 STAK 377 INSDEC ENTRNP STAK SP,1 02A9A DC00298B 378 CALL INTTOCHAR 02A9B 41574400 5 @R 379 PARV @R5 02A9C 60001E99 0 380 LD R0 FIELDLEN 02A9D FA0A2A9F 0 381 JLEZ R0 NOLEN 02A9E 41401E99 382 PARV FIELDLEN 00002A9F 383 NOLEN LABEL 02A9F 40170000 4 CACH 384 PARL CACH R4,0 02AA0 61124000 4 1 REG 385 LD R4 R1 02AA1 5D1F8001 6 STAK 386 LEAVE STAK SP,1 387 * --- 388 389 END INSDEC subroutine 390 391 392 ********************************************************************************** 393 * * 394 * Unpack an error code. * 395 * * 396 ********************************************************************************** 397 02AA2 DD5F8001 6 STAK 398 INSERRM ENTRNP STAK SP,1 02AA3 60974400 2 5 @R 399 LD R2 @R5 get error code 02AA4 60040028 0 IMM 400 LD R0 URERRORGET 02AA5 60530000 1 4 REG 401 LD R1 R4 where to put it 02AA6 09040064 IMM 402 UREQ 100 get error code 02AA7 FA082AAA 0 403 JLTZ R0 BADERRCODE jump if erroneous error code 02AA8 30440064 1 IMM 404 RSB R1 100 02AA9 391B0800 4 41 CACH 405 LEA R4 CACH R4,0(R1) point after end of string 00002AAA 406 BADERRCODE LABEL 02AAA 5D1F8001 6 STAK 407 LEAVE STAK SP,1 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 133 (PO!PREPOUT) F 26 PREPOUT - Flexible Output Routine 408 * --- 409 410 411 ********************************************************************************** 412 * * 413 * Unpack a hex number. * 414 * * 415 ********************************************************************************** 416 417 INSHEX BLOCK INSHEX subroutine 418 ENTRY INSHEX 419 02AAB DD5F8001 6 STAK 420 INSHEX ENTRNP STAK SP,1 02AAC DC0029B6 421 CALL HEXTOCHAR 02AAD 41574400 5 @R 422 PARV @R5 02AAE 60001E99 0 423 LD R0 FIELDLEN 02AAF FA0A2AB1 0 424 JLEZ R0 NOLEN jump if no field specified 02AB0 41401E99 425 PARV FIELDLEN 00002AB1 426 NOLEN LABEL 02AB1 40170000 4 CACH 427 PARL CACH R4,0 02AB2 61124000 4 1 REG 428 LD R4 R1 02AB3 5D1F8001 6 STAK 429 LEAVE STAK SP,1 430 * --- 431 432 END INSHEX subroutine 433 434 435 ********************************************************************************** 436 * * 437 * Output a PAK6 symbol. * 438 * * 439 ********************************************************************************** 440 02AB4 DD5F8001 6 STAK 441 INSRAD ENTRNP STAK SP,1 02AB5 DC00293D 442 CALL P6TOCHAR 02AB6 41574400 5 @R 443 PARV @R5 02AB7 40170000 4 CACH 444 PARL CACH R4,0 02AB8 61124000 4 1 REG 445 LD R4 R1 02AB9 5D1F8001 6 STAK 446 LEAVE STAK SP,1 447 * --- 448 449 450 ********************************************************************************** 451 * * 452 * Output a PAK12 symbol. * 453 * * 454 ********************************************************************************** 455 02ABA DD5F8001 6 STAK 456 INSSYM ENTRNP STAK SP,1 02ABB DC00296E 457 CALL P12TOCHAR 02ABC 43574400 5 @R 458 PARV2 @R5 02ABD 40170000 4 CACH 459 PARL CACH R4,0 02ABE 61124000 4 1 REG 460 LD R4 R1 02ABF 5D1F8001 6 STAK 461 LEAVE STAK SP,1 462 * --- 463 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 134 (PO!PREPOUT) F 26 PREPOUT - Flexible Output Routine 464 ********************************************************************************** 465 * INTIME subroutine receives a a double word date and time zone, * 466 * converts the time to the time zone given, unpacks the time into time, * 467 * date, month, year, and day of the week, and then places it into a buf- * 468 * fer pointed to by R4. It also includes the time zone abbreviation. * 469 * The raw time's address is in R5 and is a double word. The time * 470 * zone info is in the word following the raw time. * 471 * INTIME leaves R4 pointing to the next character position beyond * 472 * the last character placed in the output buffer. * 473 * INSTIME does the same except it only receives a single word time * 474 * and does not print seconds. * 475 * In order to get the field length stuff right, we must put * 476 * a -1 into field length while we call some of the conversion * 477 * routines. We restore it before going back. * 478 * * 479 * Destroys R0:R5 * 480 ********************************************************************************** 481 482 PDATE BLOCK INSTIME and INTIME subroutines 483 ENTRY INSTIME 484 ENTRY INTIME 485 489 00002B2D 490 OURFRAME BASE SP 00178800 6 BASE 491 TOP BSS 1 caller's R7 00098041 6 ZBM 492 MONTH BSSB 4 store month 000988C1 6 ZBM 493 YEAR BSSB 12 store year 0009A031 6 ZBM 494 WEEKDAY BSSB 3 store number indicating weekday 0009A651 6 ZBM 495 DATE BSSB 5 store day of month 0009B051 6 ZBM 496 HOURS BSSB 5 store hours 497 BSS 0 force word boundary 00098062 6 ZBM 498 SECONDS BSSB 6 store seconds 00098C62 6 ZBM 499 MINUTES BSSB 6 store minutes 00178803 6 BASE 500 XFIELDLEN BSS 1 store specified field length 00178804 6 BASE 501 TIME BSS 1 store time in ms 00178805 6 BASE 502 RAWTIME BSS 2 time to convert 00178807 6 BASE 503 TIMEZONE BSS 1 3-char zone name and 8-bit offset 504 DRCT 00000008 ABS 505 STACKFRAME EQU DISPW OURFRAME 506 ORG OURFRAME 507 00000010 BYTE 508 SINGLE EQU BIT 0 bit in R7 saying whether single word time 509 02B2D DD5F8008 6 STAK 510 INSTIME ENTRNP STAK SP,STACKFRAME subroutine starts here 02B2E EE178805 6 BASE 511 STZ2 SP,RAWTIME zero out rawtime 02B2F 60574400 1 5 @R 512 LD R1 @R5 get time 02B30 E449A805 1 6 ZBM 513 ST R1 SP,RAWTIME/BITS 20:51 store in double word format 02B31 62002BA7 01 514 LD2 R0 MINRND get rounding factor 02B32 9A178805 016 BASE 515 ADD2M R0 SP,RAWTIME add in rounding factor 02B33 60174801 0 5 BASE 516 LD R0 R5,1 get time zone stuff 02B34 E4178807 0 6 BASE 517 ST R0 SP,TIMEZONE 02B35 EDCBC010 7 CBM 518 STW R7/SINGLE set flag to indicate single word 02B36 FE0E2B3E 519 JMP CONVERT skip over double word entry 520 * --- 521 02B37 DD5F8008 6 STAK 522 INTIME ENTRNP STAK SP,STACKFRAME subroutine starts here 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 135 (PO!PREPOUT) F 26 System date packers and unpackers 02B38 62174400 015 @R 523 LD2 R0 @R5 get raw time 02B39 1A002BA9 01 524 ADD2 R0 SECRND add in rounding factor 02B3A E6178805 016 BASE 525 ST2 R0 SP,RAWTIME 02B3B 60174802 0 5 BASE 526 LD R0 R5,2 get time zone stuff 02B3C E4178807 0 6 BASE 527 ST R0 SP,TIMEZONE 02B3D EC0BC010 7 CBM 528 STZ R7/SINGLE say it's not one word 529 530 * convert to local time (TIMEZONE) 531 * \ / 00002B3E 532 CONVERT LABEL 02B3E 60001E99 0 533 LD R0 FIELDLEN pick up the user specified length 02B3F E4178803 0 6 BASE 534 ST R0 XFIELDLEN and save it 02B40 D1401E99 535 STMW FIELDLEN set the default so our SRs work properly 02B41 62978805 236 BASE 536 LD2 R2 SP,RAWTIME 02B42 EC0A8140 2 CBM 537 STZ R2/BITS 0:19 get rid of unnecessary stuff 02B43 60578807 1 6 BASE 538 LD R1 SP,TIMEZONE get timezone info 02B44 700A7010 0 1 CBM 539 LDN R0 R1/BIT 24 get sign bit of 4th byte 02B45 E40A4180 0 1 CBM 540 ST R0 R1/BITS 0:23 sign extend the number 02B46 1E002BA3 01 541 MUL2 R0 ONEHOUR2 make time zone differences into ms 02B47 1A940000 2301 PAIR 542 ADD2 R2 PAIR R0 adjust time 543 544 * unpack the raw time into time, date, month, year, and weekday 02B48 61538000 5 6 REG 545 LD R5 SP going to need the stack pointer safe 02B49 DC002AC0 546 CALL UnPackDate breaks time into time/date/month/year 02B4A 43548000 23 PAIR 547 PARV2 PAIR R2 rawtime adjusted for time zone 02B4B 41174804 5 BASE 548 PAR R5,TIME ms since midnight gets put here 02B4C 41096651 5 ZBM 549 PAR R5,DATE date in month gets put here 02B4D 41094041 5 ZBM 550 PAR R5,MONTH month goes here (Jan = 1) 02B4E 410948C1 5 ZBM 551 PAR R5,YEAR year goes here 02B4F 40096031 5 ZBM 552 PARL R5,WEEKDAY yes, the weekday goes here (Sun = 0) 553 554 * is year in 20th century? if so remove first 2 digits 02B50 600988C1 0 6 ZBM 555 LD R0 SP,YEAR need year to work with 02B51 64002BA5 0 556 CPR R0 MID19 is year < 1950 02B52 FE082B57 557 JLT DIFCENT year is not after 1950 02B53 64002BA6 0 558 CPR R0 CENT20 is year > 1999 02B54 FE062B57 559 JGE DIFCENT year is after 20th century 02B55 1004076C 0 IMM 560 SUB R0 1900 just want last 2 digits of year 02B56 E40988C1 0 6 ZBM 561 ST R0 SP,YEAR 00002B57 562 DIFCENT LABEL 563 564 * compute time of day 02B57 60978804 2 6 BASE 565 LD R2 SP,TIME get the time 02B58 148403E8 2 IMM 566 DIV R2 MSECSS get rid of milliseconds 02B59 58C40010 IMM 567 IORPSR PSRMODIF set modified arithmetic bit 02B5A EC124000 1 REG 568 STZ R1 02B5B 1444003C 1 IMM 569 DIV R1 60 separate seconds and minutes 02B5C E4898062 2 6 ZBM 570 ST R2 SP,SECONDS remainder is seconds 02B5D EC120000 0 REG 571 STZ R0 02B5E 1404003C 0 IMM 572 DIV R0 60 separate minutes and hours 02B5F E4498C62 1 6 ZBM 573 ST R1 SP,MINUTES remainder is minutes 02B60 E409B051 0 6 ZBM 574 ST R0 SP,HOURS result is hours 02B61 58840010 IMM 575 CLBPSR PSRMODIF unset modified arithmetic 576 577 * fill output string 02B62 60C9A031 3 6 ZBM 578 LD R3 SP,WEEKDAY index into daytab 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 136 (PO!PREPOUT) F 26 System date packers and unpackers 02B63 38262BB7 0 3 579 LEA R0 DAYTAB(R3) 02B64 60440003 1 IMM 580 LD R1 3 3 chars to move 02B65 60930000 2 4 REG 581 LD R2 R4 address of output 02B66 FE400000 582 CMOVE put day into string 583 02B67 60440002 1 IMM 584 LD R1 2 02B68 FE580020 585 CFILL " " put 2 blanks into output string 02B69 61128000 4 2 REG 586 LD R4 R2 put buffer pointer back 02B6A 6149A651 5 6 ZBM 587 LD R5 SP,DATE get the date (day of month) 02B6B DC00298B 588 CALL INTTOCHAR 02B6C 41534000 5 REG 589 PARV R5 02B6D 41440002 IMM 590 PARV 2 make date fit into 2 characters 02B6E 40170000 4 CACH 591 PARL CACH R4,0 02B6F 61124000 4 1 REG 592 LD R4 R1 593 02B70 6004002D 0 IMM 594 LD R0 "-" dash for date separator 02B71 E4170400 0 4 @R 595 ST R0 @R4 into string 02B72 38970001 2 4 CACH 596 LEA R2 CACH R4,1 move bp and put in R2 for CMOVE 02B73 60498041 1 6 ZBM 597 LD R1 SP,MONTH index into month table 02B74 38222BAA 0 1 598 LEA R0 MNTHTAB(R1-1) get month's address 02B75 60440003 1 IMM 599 LD R1 3 3 chars to go into output 02B76 FE400000 600 CMOVE put month name into output string 02B77 6004002D 0 IMM 601 LD R0 "-" dash for date separator 02B78 E4168400 0 2 @R 602 ST R0 @R2 R2 still points to output buffer 02B79 39168001 4 2 CACH 603 LEA R4 CACH R2,1 move bp and return to R4 604 02B7A 394988C1 5 6 ZBM 605 LEA R5 SP,YEAR year comes next 02B7B DC402A99 606 CALLNP INSDEC inserts year into buffer 607 02B7C 60930000 2 4 REG 608 LD R2 R4 need address of buf 02B7D 60440002 1 IMM 609 LD R1 2 02B7E FE580020 610 CFILL " " blanks to separate date from time 611 02B7F 61128000 4 2 REG 612 LD R4 R2 return address 02B80 3949B051 5 6 ZBM 613 LEA R5 SP,HOURS 02B81 DC402A99 614 CALLNP INSDEC put hour into output string 615 02B82 6004003A 0 IMM 616 LD R0 ":" to separate hours:minutes 02B83 E4170400 0 4 @R 617 ST R0 @R4 into string 02B84 39170001 4 4 CACH 618 LEA R4 CACH R4,1 move up buffer pointer 02B85 60098C62 0 6 ZBM 619 LD R0 SP,MINUTES get minutes 02B86 6404000A 0 IMM 620 CPR R0 10 02B87 FE062B8B 621 JGE MIN minutes go in as is 02B88 60040030 0 IMM 622 LD R0 "0" need leading 0 for minutes 02B89 E4170400 0 4 @R 623 ST R0 @R4 into string 02B8A 39170001 4 4 CACH 624 LEA R4 CACH R4,1 move up bp 00002B8B 625 MIN LABEL 02B8B 39498C62 5 6 ZBM 626 LEA R5 SP,MINUTES minutes come next 02B8C DC402A99 627 CALLNP INSDEC put hour into output string 628 02B8D F7C02B99 7 629 JBT R7/SINGLE ZONE skip seconds if single word 02B8E 6004003A 0 IMM 630 LD R0 ":" to separate minutes:seconds 02B8F E4170400 0 4 @R 631 ST R0 @R4 into string 02B90 39170001 4 4 CACH 632 LEA R4 CACH R4,1 move up buffer pointer 02B91 60098062 0 6 ZBM 633 LD R0 SP,SECONDS get seconds 02B92 6404000A 0 IMM 634 CPR R0 10 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 137 (PO!PREPOUT) F 26 System date packers and unpackers 02B93 FE062B97 635 JGE SEC seconds go in as is 02B94 60040030 0 IMM 636 LD R0 "0" need leading 0 for seconds 02B95 E4170400 0 4 @R 637 ST R0 @R4 into string 02B96 39170001 4 4 CACH 638 LEA R4 CACH R4,1 move up bp 00002B97 639 SEC LABEL 02B97 39498062 5 6 ZBM 640 LEA R5 SP,SECONDS thats right!! seconds next 02B98 DC402A99 641 CALLNP INSDEC seconds go into string 642 00002B99 643 ZONE LABEL 02B99 60440002 1 IMM 644 LD R1 2 02B9A 60930000 2 4 REG 645 LD R2 R4 02B9B FE580020 646 CFILL " " yep you guessed it, 2 blanks into string 647 648 * pick out timezone characters 02B9C 38178807 0 6 BASE 649 LEA R0 SP,TIMEZONE address of timezone 02B9D 60440003 1 IMM 650 LD R1 3 just need 3 characters 02B9E FE400000 651 CMOVE put time zone char into string 02B9F 61128000 4 2 REG 652 LD R4 R2 return address 653 02BA0 60178803 0 6 BASE 654 LD R0 XFIELDLEN pick up the callers field length 02BA1 E4001E99 0 655 ST R0 FIELDLEN and restore it 656 02BA2 5D1F8008 6 STAK 657 LEAVE STAK SP,STACKFRAME subroutine ends here 658 * --- 659 02BA4 0036EE80 660 ONEHOUR2 VFD 0,MSECSH ms in one hour 02BA5 0000079E 661 MID19 VFD 1950 middle of 20th century 02BA6 000007D0 662 CENT20 VFD 2000 beginning of 21st century 02BA8 00007530 663 MINRND VFD 0,30000 add into time for proper minute rounding 02BAA 000001F4 664 SECRND VFD 0,500 add into time for proper seconds rounding 665 00002BAB 666 MNTHTAB LABEL Table of months to be indexed into 02BAB 4A616E00 667 TEXTZ "Jan" 02BAC 46656200 668 TEXTZ "Feb" 02BAD 4D617200 669 TEXTZ "Mar" 02BAE 41707200 670 TEXTZ "Apr" 02BAF 4D617900 671 TEXTZ "May" 02BB0 4A756E00 672 TEXTZ "Jun" 02BB1 4A756C00 673 TEXTZ "Jul" 02BB2 41756700 674 TEXTZ "Aug" 02BB3 53657000 675 TEXTZ "Sep" 02BB4 4F637400 676 TEXTZ "Oct" 02BB5 4E6F7600 677 TEXTZ "Nov" 02BB6 44656300 678 TEXTZ "Dec" 679 00002BB7 680 DAYTAB LABEL table of day of week 02BB7 53756E00 681 TEXTZ "Sun" 02BB8 4D6F6E00 682 TEXTZ "Mon" 02BB9 54756500 683 TEXTZ "Tue" 02BBA 57656400 684 TEXTZ "Wed" 02BBB 54687500 685 TEXTZ "Thu" 02BBC 46726900 686 TEXTZ "Fri" 02BBD 53617400 687 TEXTZ "Sat" 688 689 END PDATE INSTIME and INTIME subroutines 1017 INPUT .SYS:PO!PURE2nd INTIME subroutines 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 138 (PO!PURE2) F 28 System date packers and unpackers 1 * PO!PURE2.ASSEM, included by PREPOUTM macro when pure code is wanted. 2 3 VARS 00001F1B ABS 4 VARS!2 EQU DISPW MA 0 5 PROG 00002BBE ABS 6 PROG!2 EQU DISPW MA 0 +CHARM MACRO F 24 4 5 +INITPSECT MACRO F 22 15 20 +PROG MACRO F 22 13 F 26 130 F 28 5 +VARS MACRO F 22 14 F 26 111 F 28 3 +VWRITELINE 000013F4 F 26 173 173 7 END 8 INITPSECT PROG!2,VARS!2,PROGRAM +CHARM MACRO F 24 4 5 +INITPSECT MACRO F 22 15 20 F 28 8 +PROG MACRO F 22 7 13 F 26 130 F 28 5 +PROGRAM! 00002BBE F 22 5e 5= 7a F 28 8= 8a 8e 8e +PSECT! 00000000 F 22 5e 5a 5e 5a 5= 7e 7a 7e 7a 7= F 28 8= +VARIABLES! 00001F1B F 22 5a 7= 7e F 28 8= +VARS MACRO F 22 5 14 F 26 111 F 28 3 +VWRITELINE 000013F4 F 26 173 173 9 END 1017 LIST MAP 1017 LIST CREF 00002A03 1017 PREPOUTR EQU PREPOUT!!! 1019 1020 1021 1022 VARS 01F1B 00000000 1023 VARPATCH VFD 0 beginning of variable patch area 1024 1025 PROG 02BBE 00000000 1026 PROGPATCH VFD 0 beginning of program patch area 1027 1028 ********************************************************************************** 1029 * * 1030 * Notes to maintainers: * 1031 * * 1032 * 1. The only impure page must be at 1C00. This is * 1033 * because TAPEBOOT protects all higher pages when * 1034 * it loads them. * 1035 * 2. The pure pages may be from 2000 to 2FFF. * 1036 * 3. TapeBootMake or DiskToTape is responsible for * 1037 * constructing the tapes containing these files. * 1038 * * 1039 ********************************************************************************** 1040 1041 BADFILE 0000207B F 0 359j 403= BADFILEM 00002083 F 0 414a 419= 420e BADFILEML 0000001C F 0 413 420= BADFILEOFF 0000208A F 0 408j 430= BEGINNING 0000201B F 0 89a 124j 174= BOOTR 0000211C F 0 657a 730 744= BS 00000008 F 0 158= F 19 414 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 139 F 0 System date packers and unpackers BUFL 00000050 F 0 143= 144 300 304 CAN 00000018 F 0 161= F 19 416 CHARM MACRO F 14 298= F 24 4 5 CLOSEDISK 0000234E F 0 560a F 16 265 270= COMMANDSR 0000215B F 0 658a 832 834= COMMOUTER F 19 4= 545 COMNDJMP 00002108 F 0 338 656= COMNDTAB 000020F0 F 0 336 639= 654e 836a 837a 838a 839a 842a 843a 844a 845a 848a 849a 850a 851a 880 COMNDTABL 0000000C F 0 334 654= 878 CR 0000000D F 0 160= F 19 418 448 457 536 CUSTSWTCOK 00002043 F 0 263j 280= DCB 00001C27 F 0 147= 556a 802a DCBBTRAX 00081187 F 9 27= DCBFILLADR 00160802 F 9 15= 28e F 16 83a DCBFILLLEN 00000006 F 9 28= F 16 84 DCBLEN 00000008 F 0 147 F 9 30= DCBLUN 0016001C F 9 26= DCBMAIMNT 00080216 F 9 22= DCBNORETRY 00080416 F 9 23= F 18 442 DCBNOSUBS 00080016 F 9 21= F 18 420 DCBPFILE 00160800 F 9 13= F 16 89s 101s 104s 110 116 F 18 434 1200 1202 DCBSCSI 00080816 F 9 25= F 16 134s DCBSECPTRK 00160802 F 9 16= F 16 129s 145s F 18 518 DCBSUBLIST 00160804 F 9 18= F 16 131s 190a 237s 272a 277 F 18 422 DCBTRKPCYL 00160803 F 9 17= F 16 130s 147s F 18 521 DCBUNIT 00160801 F 9 14= F 16 96s 121 F 18 231 440 526 571 704 1064 1204 DCBVERIFY 00080616 F 9 24= DCBVOLSIZE 00160805 F 9 19= F 16 132s 149s DCBWORD 00160806 F 9 20= 21e 22e 23e 24e 25e F 16 133s DISKCTLBLK 00000400 F 9 12= 30e 31a DISKR 0000213B F 0 659a 788= 789 795= 821 DOCRLF 000026D3 F 19 10 440 468 510 523 535= DONEEXITR 00002020 F 0 193= 585a 758j 771j DOPROG 0000202B F 0 205j 221= ECBLKREUS 0000000D F 9 74= ECCHAN 00000003 F 9 64= F 18 957 ECDA 0000000C F 9 73= ECDATA 00000001 F 9 62= F 18 988 ECFBI 00000002 F 9 63= F 18 175 ECFBIACCT 00000009 F 9 70= ECFBIBDAT 00000019 F 9 86= ECFBIBLNE 00000011 F 9 78= ECFBIBLNK 0000000B F 9 72= ECFBIFDAT 00000013 F 9 80= ECFBIFLAG 0000000F F 9 76= ECFBIFLNK 0000000E F 9 75= ECFBIFSN 0000000A F 9 71= ECFBINBAN 00000015 F 9 82= ECFBINBFS 00000018 F 9 85= ECFBINBPJ 00000016 F 9 83= ECFBIODAT 00000012 F 9 79= ECFBIPROJ 00000017 F 9 84= ECFBIRBN 00000014 F 9 81= 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 140 F 0 System date packers and unpackers ECFBISUB 00000010 F 9 77= ECFBITYPE 00000008 F 9 69= ECMPE 00000007 F 9 68= F 18 970 ECNOCODE 00000000 F 9 61= ECNOTRDY 00000005 F 9 66= F 18 261 939 ECRECBAD 0000001D F 9 90= ECSAFBAD 0000001C F 9 89= ECSEEK 00000004 F 9 65= F 18 266 919 ECSUBENT 0000001B F 9 88= ECUDIRORD 0000001A F 9 87= ECWRPROT 00000006 F 9 67= F 18 1000 ENTRYPT 00001C02 F 0 141= 387s 390a 723 EQACCT 00174805 F 21 392= 456s EQACCTPROJ 00174807 F 21 292s 393= 459s 495 497s EQACCTPW 00174808 F 21 394= 462s EQELSIZE 00000005 F 21 391= EQFILEEXT 0017480C F 21 293s 326 329s 396= 458 466s 499 501s 773s 791s EQFILENM 0017480A F 21 395= 455 464s 737s EQFILEPW 0017480D F 21 397= 461 465s 753s EQSYSTEM 00174802 F 21 291s 389= 460s 491 493s EQT 00134000 F 21 386= 387 455 456s 457s 458 459s 460s 461 462s 463s 464s 465s 466s 491 493s 495 497s 499 501s 737s 753s 773s 791s EQTEMPPROT 00002792 F 21 387= 399a EQVOLPW 00174803 F 21 390= 463s EQVOLUME 00174800 F 21 388= 391e 457s ERRBLOCK 00081181 F 13 53= F 18 1207s ERRCHAN 00081043 F 13 60= F 18 1203s ERRCNT 00001C44 F 0 152= 236s 239a ERRCOMPARE 00160004 F 13 23= F 18 1216a 1218 ERRCOUNT 00160000 F 13 20= F 18 1223s 1234s ERRCTLSTAT 00160804 F 13 64= F 18 1214s ERRDEVICE 000808C3 F 13 58= ERREND 00160805 F 13 65= F 18 1218 ERRLNTH 00000005 F 0 229 568 570s 1011 F 13 67= F 18 1217s 1222 1235 ERRLOGBLK 00000400 F 13 19= 67e 68a ERRMSG 00002010 F 0 136= 240a ERROPCKSEG 00000005 F 13 32= F 18 345 ERROPER 00160004 F 13 25= F 18 1212s ERROPFMT 0000000C F 13 40= ERROPINQ 00000008 F 13 36= ERROPMS 0000000A F 13 38= ERROPMSN 0000000B F 13 39= ERROPOFSET 00000006 F 13 33= F 18 1090 ERROPRDC 0000000D F 13 41= ERROPREAD 00000002 F 13 29= F 18 143 ERROPRES 00000009 F 13 37= ERROPRS 0000000E F 13 42= ERROPRTN 00000007 F 13 34= F 18 275 ERROPSEEK 00000000 F 13 27= F 18 529 ERROPSEG 00000004 F 13 31= F 18 325 ERROPWRITE 00000003 F 13 30= F 18 235 841 ERROPZERO 00000001 F 13 28= ERRPPUSTAT 00082103 F 13 62= F 18 1213s 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 141 F 0 System date packers and unpackers ERRSEEKADR 00160802 F 13 55= F 18 1209s ERRSLOT 00080843 F 13 59= F 18 1201s ERRTIME 00081180 F 13 21= F 18 1233s ERRUNIT 00081843 F 13 61= F 18 1205s ERTOPBKSP 00000010 F 13 44= ERTOPGAP 00000016 F 13 50= ERTOPREAD 00000012 F 13 46= ERTOPREW 00000011 F 13 45= ERTOPSEFB 00000017 F 13 51= ERTOPSEFF 00000015 F 13 49= ERTOPWFM 00000014 F 13 48= ERTOPWRITE 00000013 F 13 47= FBIBUFF 00001C2F F 0 148= 358a FETCHFNMR 00002761 F 0 591a F 21 6 286= FETCHITEMR 000026F8 F 0 318 590a 706 796 875 F 21 7 86= FILENAME 00001C18 F 0 145= 389a 704a FINDCOMND 00002059 F 0 335= 341j FIXEXTEN 000027A2 F 21 331 429 490= FNAMBLKLEN 0000000A F 9 100= FNBLKPROT 00000400 F 9 92= 100e 101a FNF 0000208F F 0 412j 444= FTCHITEMHR 000026F5 F 0 593a 745 F 21 8 81= GETDATE 000026D9 F 0 596a F 20 19 25= GOR 0000211B F 0 660a 676 722= HELPR 00002177 F 0 662a 868 874= INITCIA 000025F2 F 0 578 F 19 6 27 44= INITIALIZE 000020B2 F 0 176 535= 537 543= 600 INITPSECT MACRO F 0 87 F 14 63= 72 F 22 15 20 F 28 8 INTRPTCA 00001C3A F 0 150= 195a ITSLOADED 0000206C F 0 373j 386= LF 0000000A F 0 159= F 19 420 446 459 538 LOADEDM 00002072 F 0 391a 395= LOADPF 000020A5 F 0 200 485= 487 489= 502 515 LOADR 00002114 F 0 663a 674 688= LOGBUFFER 00001C7F F 0 228a 566a 570s 595a 1011= LOGENTRIES 00000064 F 0 568 570s 1009= 1011 MAXOFFSYS 0000000F F 0 256 625= MC 0000203B F 0 251= 303j 305j 319j 392j 416j 448j 464j 804j 809j 815j 853j 901j 912j MC1 00002049 F 0 253j 297= MCHKLO 00002040 F 0 257j 261= MULTICPUS 000020AF F 0 90a 514= MULTILOOP 000020B0 F 0 198a 516= 597a MYTITLE 00002003 F 0 129= 179a NAME 00000005 F 9 96= F 17 224 251 299 351 NAMEEXT 00000007 F 9 97= F 17 241 343 NOFILEM 00002093 F 0 446a 451= 452e NOFILEML 00000018 F 0 445 452= NOTCOMND 0000205D F 0 286j 353= 664a 709j NOTFULL 00002036 F 0 232j 234= NOTTHISCMD 0000205C F 0 337j 340= ODBADNAME 00000001 F 9 41= ODBADPL 00000004 F 9 44= ODBADSB 00000006 F 9 46= ODBADVL 00000005 F 9 45= ODISYR 0000000B F 9 51= 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 142 F 0 System date packers and unpackers ODNOTDISK 00000002 F 9 42= ODOFFLINE 00000003 F 9 43= ODOOPS 00000008 F 9 48= ODPFM 0000000A F 9 50= ODSUBBIG 00000007 F 9 47= ODVIU 00000009 F 9 49= OFFNAMES 000020D0 F 0 282 615= 625e OFFNAMTAB 000020E0 F 0 614= 615e OPENDISK 000022DF F 0 558a F 16 73 79= OPLTYPE 00001C45 F 0 153= 204 252 281s 407 573s 577s F 19 181 317 OPLVECTPC! 00000400 F 12 10= 54a PACKBAD 00002099 F 0 320j 460= 707j PACKBADM 0000209D F 0 462a 467= 468e PACKBADML 00000020 F 0 461 468= PACKITEM 00002805 F 21 317 430 732= PACKITEMI 0000283C F 21 321 431 861= PACKNAME 000027CC F 21 432 567= 735 751 PARAMM MACRO F 14 280= PCAAA 0000000B F 21 411= 571 PCCOLON 00000029 F 21 319 323 415= 529x 792 PCDELIM 00000031 F 21 423= 522x 525x 527x PCDOLLAR 0000002E F 21 420= 525x 742 808 813 PCDOT 00000028 F 21 414= 514 527x 738 PCLPAREN 0000002A F 21 416= 526x 748 PCLSQUAR 0000002F F 21 421= 533x PCO 00000032 F 21 424= 521x 521x 521x 521x 521x 521x 521x 521x 522x 522x 522x 522x 522x 522x 522x 523x 523x 523x 523x 523x 523x 523x 523x 524x 524x 524x 524x 524x 524x 524x 524x 525x 525x 525x 525x 526x 527x 529x 529x 529x 529x 529x 530x 533x 533x 534x 537x 537x 537x 537x 537x PCPLUS 0000002D F 21 419= 526x 740 PCRAD 00000028 F 21 413= 673 PCRPAREN 0000002B F 21 417= 526x 754 PCRSQUAR 00000030 F 21 422= 533x PCSLASH 0000002C F 21 418= 527x PCSPACE 00000000 F 21 410= 668 PCZZZ 00000024 F 21 412= 573 PNPROGAREA 0000008C F 0 133= 490 PREPOUTM MACRO F 0 1017 F 14 251= PREPOUTR 00002A03 F 0 177 238 298 388 594a 756 769 806 813 835 841 847 910 1017= PROG MACRO F 0 163 541 793 872 1013 1025 F 14 82= F 19 23 42 177 312 406 498 534 F 20 24 F 21 80 246 285 354 453 489 510 566 656 731 F 22 7 13 F 26 130 F 28 5 PROGAREA 00003000 F 0 132= 133e 357 371 PROGPATCH 00002BBE F 0 1026= PROGRAM! 00002BBE F 0 87= 87a 87e 87e 138e 138= 163a 539e 539= 541a 791e 791= 793a 870= 870e 872a 1008e 1008= 1013a 1022e 1022= 1025a F 14 72e 72a 72= 72e F 19 13= 13e 23a 40e 40= 42a 172e 172= 177a 306e 306= 312a 402= 402e 406a 494= 494e 498a 531= 531e 534a F 20 21= 21e 24a F 21 74e 74= 80a 243e 243= 246a 281= 281e 285a 351e 351= 354a 450= 450e 453a 486e 486= 489a 507= 507e 510a 562= 562e 566a 653e 653= 656a 728= 728e 731a F 22 5= 5e 7a F 28 8e 8e 8a 8= PROMPT 0000200C F 0 130= 299a PSECT! 00000000 F 0 87= 138e 138a 138= 138a 138e 163a 163e 163e 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 143 F 0 System date packers and unpackers 163a 163= 539= 539a 539e 539e 539a 541e 541a 541a 541e 541= 791e 791a 791e 791a 791= 793= 793a 793a 793e 793e 870a 870e 870a 870= 870e 872e 872e 872a 872a 872= 1008a 1008a 1008= 1008e 1008e 1013a 1013e 1013e 1013= 1013a 1022a 1022e 1022e 1022= 1022a 1025= 1025a 1025a 1025e 1025e F 14 72= F 19 13a 13e 13a 13e 13= 23a 23a 23= 23e 23e 40= 40a 40e 40e 40a 42a 42a 42e 42= 42e 172a 172e 172= 172e 172a 177= 177a 177e 177e 177a 306e 306e 306= 306a 306a 312a 312e 312e 312a 312= 402e 402a 402a 402= 402e 406e 406a 406e 406= 406a 494e 494= 494e 494a 494a 498a 498e 498a 498e 498= 531e 531a 531= 531e 531a 534e 534e 534a 534a 534= F 20 21a 21e 21a 21= 21e 24a 24e 24e 24= 24a F 21 74e 74a 74e 74a 74= 80e 80a 80e 80= 80a 243e 243e 243a 243a 243= 246a 246e 246a 246e 246= 281= 281a 281a 281e 281e 285= 285a 285a 285e 285e 351= 351a 351a 351e 351e 354e 354a 354a 354= 354e 450a 450a 450= 450e 450e 453= 453a 453a 453e 453e 486a 486e 486e 486= 486a 489a 489e 489e 489= 489a 507a 507e 507e 507= 507a 510a 510e 510a 510= 510e 562e 562a 562= 562a 562e 566a 566e 566= 566e 566a 653= 653a 653a 653e 653e 656= 656a 656e 656a 656e 728a 728e 728a 728e 728= 731a 731a 731e 731= 731e F 22 5= 5a 5e 5a 5e 7= 7a 7e 7a 7e F 28 8= RADCODE 0000200E F 0 131= 705 READ 00002408 F 0 550a F 16 137 152 163 F 17 114 131 160 212 291 F 18 56 117 119= READCHARR 00002633 F 0 586a F 19 7 156 178= READLINER 0000269A F 0 588a F 19 9 384 407= RUNFLAG 00001C01 F 0 140= 307s 372 689s RUNR 00002115 F 0 665a 675 703= SCANOVERR 00002785 F 0 592a F 21 9 355= SFTUPPKTMP 00002794 F 21 433 454= 734 SKIPMSG 0000203B F 0 235j 241= SLEEPR 000022DA F 0 667a 668a 669a 670a 982 992= SPACEINW4 00001C03 F 0 142= 201 565s SRCHDIR 00002363 F 0 554a F 17 72 100= SRCHDIRSN 00002360 F 0 562a F 17 73 94= SUBLISTEND 0000178C F 16 187a F 18 314 316= 317e SYSACCT 00000000 F 9 93= F 17 153 168 SYSPROJ 00000002 F 9 94= F 17 153 169 TALPH 00003C10 F 0 320j 797j F 12 48= F 21 217 TAPECTLBLK 00000400 F 10 14= 26e 27a TBLNK 00003610 F 12 51= TDELM 00003A10 F 12 49= TEOL 00003810 F 0 319j 746j F 12 50= F 21 110 TERMBUF 02001C04 F 0 135a 144= TERMBUFP 0000200F F 0 135= 283 301 306s 317 TERMPOS 00001C00 F 0 139= 284s 321s 370 708s TERR 00000000 F 12 52= F 21 225 TERRBCN 00000002 F 10 36= TERRBSN 00000003 F 10 37= TERRBUN 00000001 F 10 35= TERRDCS 0000000B F 10 45= TERRDNR 00000006 F 10 40= TERRDNT 00000004 F 10 38= TERREOF 00000008 F 10 42= TERRFNF 00000009 F 0 411 F 10 43= TERRHCS 0000000A F 10 44= TERRITE 00000007 F 10 41= TERRNBT 0000000D F 10 47= TERRNOL 00000005 F 10 39= 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 144 F 0 System date packers and unpackers TERRWPRT 0000000C F 10 46= TNUM 00003E10 F 0 747j F 12 47= F 21 155 TOPLCODES 00000008 F 0 156= 262 615e TPCBDENSE 00160803 F 10 20= TPCBLEN 00000008 F 10 26= TPCBPFILE 00160800 F 10 15= TPCBTRACK 00160802 F 10 17= TPCBUNIT 00160801 F 10 16= TPEVECTPC! 00000400 F 11 10= 31a VARIABLES! 00001F1C F 0 87= 138a 163e 163= 539a 541e 541= 791a 793e 793= 870a 872= 872e 1008a 1013= 1013e 1022a 1025= 1025e F 14 72= F 19 13a 23e 23= 40a 42e 42= 172a 177e 177= 306a 312e 312= 402a 406e 406= 494a 498e 498= 531a 534e 534= F 20 21a 24= 24e F 21 74a 80= 80e 243a 246e 246= 281a 285= 285e 351a 354e 354= 450a 453e 453= 486a 489= 489e 507a 510e 510= 562a 566e 566= 653a 656e 656= 728a 731e 731= F 22 5a 7= 7e F 28 8= VARPATCH 00001F1B F 0 1023= VARS MACRO F 0 138 539 791 870 1008 1022 F 14 74= F 19 13 40 172 306 402 494 531 F 20 21 F 21 74 243 281 351 450 486 507 562 653 728 F 22 5 14 F 26 111 F 28 3 VCHECKDATA 000013DB F 11 25= VCHECKHDR 000013DA F 11 24= VCLOSEDISK 000013EC F 0 561s F 12 26= VDISKCB 000013E4 F 0 557s F 12 18= VDISPLAY 000013E3 F 0 222 374 431 993 F 12 17= VDISPTERR 000013DE F 11 28= VDONEEXIT 000013F0 F 0 546a F 12 32= VERRLOGPT1 000013FA F 12 42= VERRLOGPTR 000013EA F 0 227 230 567s F 12 24= F 18 1195 1220 1236s VERSION 00002001 F 0 127= 178a VEXTRACPUS 000013FC F 0 199s 518 F 12 44= VFETCHFNM 000013F6 F 12 38= VFETCHITEM 000013F5 F 12 37= VFETCHITMH 000013F8 F 12 40= VGETDATE 000013FB F 12 43= VMEMPF 000013E6 F 0 491 F 12 20= VMEMSPACE 000013ED F 0 202s 564 F 12 27= F 16 186 213s 275 278s VOPENDISK 000013EB F 0 559s 803 F 12 25= VOPENTAPE 000013D1 F 11 15= VPF4SSU 000013E5 F 0 750 F 12 19= F 19 190 327 F 20 28 VPFWNDO1 000013E8 F 12 22= F 16 139 154 165 F 17 116 133 214 VPFWNDO2 000013E9 F 12 23= F 17 162 293 VPPUIWAIT 000013D9 F 11 23= VPREPOUT 000013F9 F 12 41= VREAD 000013E0 F 0 551s F 12 14= VREADCHAR 000013F1 F 12 33= F 19 413 VREADLINE 000013F3 F 0 302 F 12 35= VREADTAPE 000013D3 F 11 17= VREWIND 000013D4 F 11 18= VSCANOVER 000013F7 F 12 39= VSEFB 000013D6 F 11 20= VSEFF 000013D5 F 11 19= VSETTAPE 000013D8 F 11 22= VSLOTWRU 000013E7 F 12 21= VSRCHDIR 000013E2 F 0 555s F 12 16= VSRCHDIRSN 000013EE F 0 563s F 12 28= 1 Assembler C9208 Tape offline program loader A9306 28-Jun-93 10:45 PAGE 145 F 0 System date packers and unpackers VTAPECB 000013D0 F 0 354 F 11 14= VTAPEFUNC 000013D7 F 11 21= VTAPELOAD 000013D2 F 0 355 F 11 16= VWRITE 000013E1 F 0 553s F 12 15= VWRITECHAR 000013F2 F 12 34= F 19 277 439 447 458 517 537 539 VWRITEFM 000013DD F 11 27= VWRITELINE 000013F4 F 0 415 447 463 904 F 12 36= F 26 173 173 VWRITETAPE 000013DC F 11 26= WRITE 00002435 F 0 552a F 18 57 205 207= WRITECHARR 00002674 F 0 587a F 19 8 291 313= WRITELINER 000026BC F 0 589a F 19 11 469 499= 1042 END