1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 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 * OOO PPPP L 7 * O O P P L 8 * O O P P L 9 * O O PPPP L 10 * O O P L 11 * O O P L 12 * OOO P LLLLL 13 14 15 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 2 F 0 17 18 ********************************************************************************** 19 * * 20 * revision date * 21 * -------- ---- * 22 * * 23 * A7909 Initial release. RA * 24 * A8004 Addition of commands. Disk error log. * 25 * A8012 Addition of front panel invocation ability. * 26 * A8102 Removal of emulated instructions. * 27 * A8105 Volume revision 10000000. SLEEP command. JL * 28 * 1.0 Addition of driver, and supporting logic to * 29 * communicate with CIA port 1 when doing a * 30 * local FP boot. BB * 31 * 1.1 01 Mar 82 Fix CIA single port driver to assert CD, DSR, etc. * 32 * and to talk through first available port. * 33 * Other misc. cleanups. RC * 34 * 1.2 29 Sep 82 Help added. Misc. cleanups. RC * 35 * 1.3 08 Oct 82 Bug in Load fixed. RC * 36 * 1.4 28 Feb 83 Bug in parameter pointer for FP boot fixed. RC * 37 * 1.5 19 Jan 84 Change to VFETCHITEMR. Now OK to have a ':' * 38 * terminate a number. DH * 39 * 1.6 12 Mar 84 Bug fix. DH * 40 * 1.7 14 Jun 84 Fix to comm driver to correctly ignore * 41 * input from unselected ports. RC * 42 * 1.8 02 Jul 84 Changes to PREPOUT to print dates. MH * 43 * A8407 16 Oct 84 Just change to date version code. * 44 * A8412 04 Dec 84 Add GETDATE routine to OPL and OPLVECTORS. MH * 45 * A8501 08 Jan 85 Add EXTRACPUS vector to OPLVECTORS to * 46 * allow additional CPUs to be used offline. MH * 47 * A8501a 15 Jan 85 Have extra CPUs load their page files before * 48 * spinning on wait. MH * 49 * A8506 27 Jun 85 Add DISKTOTAPE to OFFNAMES table as boot 5. MH * 50 * A8608 26 Aug 86 Misc changes to match TOPL code. RC * 51 * A8610 03 Oct 86 Fixes to allow running from front panel, OPLTYPE * 52 * was being check incorrectly. * 53 * A8610a 07 Oct 86 Reset stack pointer, enables multiple runs. JB. * 54 * A8611 26 Nov 86 Fix parameters to DISPLAY to prevent unwanted * 55 * alarm horn or light. RC * 56 * A8612 18 Dec 86 Modified to share common routines with TOPL. * 57 * Misc bugs fixed in the process. RC * 58 * A8703 31 Mar 87 Modified includes etc. RC * 59 * A8805 17 May 88 Added DISKINIT as permanent feature in customer * 60 * boot table. DH * 61 * A8811 03 Nov 88 Misc minor changes. RC * 62 * * 63 ********************************************************************************** 64 65 BLOCK 66 67 NOLIST CREF 68 INPUT SOURCE.OPSYS:MACHDEFS 69 INPUT SOURCE.OPSYS:IODEFS 70 INPUT SOURCE.OPSYS:HALTDEFS 71 INPUT SOURCE.OPSYS:DISKDEFS 72 INPUT SOURCE.OPSYS:PAGEDEFS 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 3 (IBLOCK) F 8 73 INPUT SOURCE.OPSYS:IBLOCK 74 LIST CREF 75 INPUT BOOT.OPSYS:OPLVECTORS 76 INPUT BOOT.OPSYS:ERRLOGBLK 77 INPUT .SYS:MACROS 1 * Including MACROS.ASSEM Version A8607. 78 79 INITPSECT 02000,01C00,PROGRAM 80 81 START BEGINNING 82 START2 MULTICPUS 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 4 F 0 84 85 ********************************************************************************** 86 * * 87 * Offline Program Loader * 88 * This program is loaded onto the machine by the disk * 89 * booter when selected by one of the front panel switch * 90 * combinations. This program communicates to the operator * 91 * via the SSU terminal, or through the first available port * 92 * on the CIA, depending on whether the machine was booted * 93 * from the operators CP or the RFP, and provides for the * 94 * loading of offline utility routines. This also provides * 95 * output routines for the utility programs. * 96 * If the boot operation was from the operators control * 97 * panel, we go directly to the indicated program. This * 98 * prevents customers from getting to magic stuff like * 99 * PEEK&POKE, etc. See the table of OFFNAMES to find out what * 100 * will be run. * 101 * * 102 * To invoke an offline routine, the name of the CODE * 103 * file is just typed. If no account is specified, * 104 * OFFLINE.!!! is assumed. The disk searched is the boot disk * 105 * unless the location DISKCB is changed. * 106 * The programs to be loaded must all reside above * 107 * ma 03000. The secondary transfer address is the program * 108 * beginning point (the primary transfer address is reserved * 109 * for on-line startups). * 110 * * 111 ********************************************************************************** 112 113 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 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 5 (OPLDOC) F 12 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 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 6 (OPLDOC) F 12 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 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 7 (OPLDOC) F 12 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 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 8 (OPLDOC) F 12 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 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 9 (OPLDOC) F 12 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 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 10 F 0 115 02000 41383831 116 VERSION TEXTZ "A8811" 117 02002 204F6666 118 MYTITLE TEXTZ " Offline Program Loader \C1\." 0200A 2A4F504C 119 PROMPT TEXTZ "*OPL>" 0200C 9B17AC90 120 DFLTACCT PAK12 OFFLINE default account for program loading 0200E E79DF200 121 DFLTPROJ PAK6 !!! 0200F 533719C0 122 RADCODE PAK6 CODE 00003000 ABS 123 PROGAREA EQU 03000 beginning of area for loading programs 0000008C ABS 124 PNPROGAREA EQU MONPF+PROGAREA/FLDPAGE 125 02010 020C1C04 126 TERMBUFP PTR TERMBUF 02011 20546865 127 ERRMSG TEXTZ " The I/O error log contains \D1\ entries." 128 129 VARS 00001C00 130 TERMPOS BSS 1 holds invocation terminator position 00001C01 131 RUNFLAG BSS 1 sez whether to run loaded file 00001C02 132 ENTRYPT BSS 1 entry point of loaded file 00001C03 133 SPACEINW4 BSS 1 space in window 4 00000050 ABS 134 BUFL EQU 80 02001C04 135 TERMBUF BSSC BUFL general terminal input buffer 00001C18 136 FILENAME BSS 15 00001C27 137 DISKADDR BSS 1 disk address for read file 00001C28 138 FBIBUFF BSS FBILNTH buffer for FBI during disk reads 139 00001C33 140 INTRPTCA BSS 10 console area for us 141 00001C3D 142 ERRCNT BSS 1 number of entries in error buffer 00001C3E 143 OPLTYPE BSS 1 -1 => program already run for customer (just halt) 144 * 0 => booted by RFP, accept commands 145 * >0 => Customer did boot, just run indicated program 146 00000008 ABS 147 BS EQU 08 back space 0000000A ABS 148 LF EQU 0A ascii line feed 0000000D ABS 149 CR EQU 0D ascii carriage return 00000018 ABS 150 CAN EQU 018 line kill (^X) 151 152 PROG 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 11 F 0 154 155 ********************************************************************************** 156 * * 157 * Main entry. Perform miscellaneous initialization. * 158 * The stack pointer should be properly set from PromBoot * 159 * and DiskBoot, but we reset it as added assurance. * 160 * * 161 ********************************************************************************** 162 0000201C 163 BEGINNING LABEL 0201C 61840360 6 IMM 164 LD SP ADR IBSTACK load stack pointer 0201D DC4020F5 165 CALLNP INITIALIZE initialize vectors and error log 0201E DC0026CD 166 CALL PREPOUTR output my name and version 0201F 41002000 167 PAR VERSION 02020 40002002 168 PARL MYTITLE 169 * \ / 170 171 ********************************************************************************** 172 * * 173 * Re-entry point. When offline programs finish up they * 174 * come back to this point. We recapture any CPUs that might * 175 * have been in use, restore our page file, and issue another * 176 * prompt to the operator or halt with the message left in the * 177 * lights. * 178 * * 179 ********************************************************************************** 180 181 * \ / 00002021 182 DONEEXITR LABEL 02021 5904E1F0 IMM 183 LDMSR MONMSRIOFF interrupts off 02022 01441C33 IMM 184 LDCAR ADR INTRPTCA point at our console area 02023 61840360 6 IMM 185 LD SP ADR IBSTACK reset stack pointer 186 * \ / 02024 600420F3 0 IMM 187 LD R0 ADR MULTILOOP where multiple CPUs should loop 02025 E40013FC 0 188 ST R0 VEXTRACPUS put it in the vectors 02026 DC4020E8 189 CALLNP LOADPF map in memory for this CPU 02027 60001C03 0 190 LD R0 SPACEINW4 02028 E41013ED 0 @ 191 ST R0 @VMEMSPACE undo old substitution lists 192 02029 60001C3E 0 193 LD R0 OPLTYPE 0202A FA2E202C 0 194 JNEMW R0 DOPROG jump if not returning from prog. 195 * \ / 196 197 ********************************************************************************** 198 * * 199 * We get here if we have returned from a program that we * 200 * ran for a customer. We wish to just halt without changing * 201 * the message in the lights (in case the program that just * 202 * terminated left something meaningful there). * 203 * * 204 ********************************************************************************** 205 206 * \ / called from CP and program done 0202B 003FFFFF 207 HALT NOHALTCODE completion of offline program run by customer 208 * --- 209 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 12 F 0 0000202C 210 DOPROG LABEL 0202C DC5013E3 @ 211 CALLNP @VDISPLAY tell the world we're here 0202D 4F504C20 212 ASCII 2,OPL "OPL " 0202F 20200000 213 VFD " " AND 03F3F0000 214 * \ / 02030 600013EA 0 215 LD R0 VERRLOGPTR R0 -> place for next log entry 02031 10041C77 0 IMM 216 SUB R0 ADR LOGBUFFER R0 = number of words of log info 02032 14040005 0 IMM 217 DIV R0 ERRLNTH R0 = number of entries in buffer 02033 604013EA 1 218 LD R1 VERRLOGPTR R1 -> place for next entry 02034 60964800 2 1 BASE 219 LD R2 R1,0 see if buffer is full 02035 FAAE2037 2 220 JNEMW R2 NOTFULL jump if not full 02036 18164801 0 1 BASE 221 ADD R0 R1,1 else add number of overflowed entries 00002037 222 NOTFULL LABEL 02037 FA02203C 0 223 JEQZ R0 SKIPMSG if no errors, don't tell user 02038 E4001C3D 0 224 ST R0 ERRCNT save number of errors 225 * \ / 226 02039 DC0026CD 227 CALL PREPOUTR tell field service about them 0203A 41001C3D 228 PAR ERRCNT 0203B 40002011 229 PARL ERRMSG 0000203C 230 SKIPMSG LABEL 231 * \ / 232 233 ********************************************************************************** 234 * * 235 * See if we're running from remote front panel * 236 * * 237 ********************************************************************************** 238 239 * \ / 0000203C 240 MC LABEL 0203C 60001C3E 0 241 LD R0 OPLTYPE get type of boot 0203D FA02204D 0 242 JEQZ R0 MC1 jump if field service 243 * \ / 244 0203E 68040007 0 IMM 245 UCPR R0 MAXOFFSYS is this allowed to this offline loader? 0203F FE0A2041 246 JLE MCHKLO jump if we'll attempt it 02040 00025004 247 HALT HALTB5004 switches too high for this loader 248 * --- 249 00002041 250 MCHKLO LABEL 02041 68040002 0 IMM 251 UCPR R0 2 codes 0, 1, and 2 are reserved 02042 FE042044 252 JGT CUSTSWTCOK and should never get here 02043 00025005 253 HALT HALTB5005 switches were 0, 1, or 2. Should not 254 * --- have gotten to OPL 255 256 ********************************************************************************** 257 * * 258 * The customer supplied switches are within the range * 259 * that we allow him to use. To find what he actually runs, * 260 * we look up the program name in a table and go process by * 261 * loading the command from disk and executing it. * 262 * Since this was a boot from the control panel, we don't * 263 * have any invocation parameters to pass to the called * 264 * program. We must, therefore, indicate that the buffer is * 265 * empty. * 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 13 F 0 266 * * 267 ********************************************************************************** 268 00002044 269 CUSTSWTCOK LABEL 02044 D1401C3E 270 STMW OPLTYPE Say we've been this way before 02045 6220210F 01 0 271 LD2 R0 OFFNAMES(R0) load the pre-determined name 02046 E6001C22 01 272 ST2 R0 FILENAME/EQFILENM 02047 6000200F 0 273 LD R0 RADCODE of course it's a code file 02048 E4001C24 0 274 ST R0 FILENAME/EQFILEEXT 275 276 * How 'bout that? All done, fall on through to lookup 277 02049 61002010 4 278 LD R4 TERMBUFP get pointer to the buffer 0204A E5001C00 4 279 ST R4 TERMPOS set the terminator position 0204B EC170400 4 @R 280 STZ @R4 and indicate no parameters supplied on customer boot 0204C FE0E206C 281 JMP NOTCOMND go process program name 282 * --- 283 284 ********************************************************************************** 285 * * 286 * We have been booted by the RFP or RITA. Prompt the * 287 * operator and execute his input as a command or implicit * 288 * RUN. * 289 * * 290 ********************************************************************************** 291 0000204D 292 MC1 LABEL 0204D DC0026CD 293 CALL PREPOUTR give prompt 0204E 4000200A 294 PARL PROMPT 0204F 60440050 1 IMM 295 LD R1 BUFL get limiting buffer length 02050 60802010 2 296 LD R2 TERMBUFP get the buffer pointer 02051 DC5013F3 @ 297 CALLNP @VREADLINE get the input 02052 FA48203C 1 298 JLTZ R1 MC ignore a line too long 02053 30440050 1 IMM 299 RSB R1 BUFL make R1=length of record 02054 FA42203C 1 300 JEQZ R1 MC ignore empty line 02055 EC322010 1 @ 301 STZ @TERMBUFP(R1) terminate line with a null 02056 EC001C01 302 STZ RUNFLAG assume running the program 303 * \ / 304 305 ********************************************************************************** 306 * * 307 * Line has been read. Try to fetch a filename. * 308 * * 309 ********************************************************************************** 310 311 * \ / 02057 61441C18 5 IMM 312 LD R5 ADR FILENAME place to pack the name 02058 61002010 4 313 LD R4 TERMBUFP get the buffer pointer 02059 60C0200F 3 314 LD R3 RADCODE default file extension 0205A DC40242B 315 CALLNP FETCHFNMR pack up the filename 0205B FA0820DC 0 316 JLTZ R0 PACKBAD it didn't pack 0205C E5001C00 4 317 ST R4 TERMPOS save the location of the terminator 318 * \ / 319 320 ********************************************************************************** 321 * * 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 14 F 0 322 * We now have a filename in the filename buffer. Check * 323 * to see if it conforms to a format that means it could be a * 324 * command as well as a program name. * 325 * * 326 ********************************************************************************** 327 0205D 5E001C1D 328 CMZ2 FILENAME/EQACCT was an account specified? 0205E FE0C2074 329 JNE ACCTSPEC skip directly to file search 0205F 5C001C1F 330 CMZ FILENAME/EQACCTPROJ was a project specified? 02060 FE0C2074 331 JNE ACCTSPEC skip directly to file search 02061 5E001C25 332 CMZ2 FILENAME/EQFILEPW is there a file password? 02062 FE0C206C 333 JNE NOTCOMND jump if so, cannot be command 02063 60001C24 0 334 LD R0 FILENAME/EQFILEEXT pick up the file name extension 02064 6400200F 0 335 CPR R0 RADCODE is it "CODE"? 02065 FE0C206C 336 JNE NOTCOMND if specified cannot be command 337 * \ / 338 339 ********************************************************************************** 340 * * 341 * Commands are processed here. If the invoked filename * 342 * looks like it might be just a symbol, we here look through * 343 * the command table to see if its one of our commands. If it * 344 * is, we jump to the proper routine and if not, we try to * 345 * load the name as a file. * 346 * * 347 ********************************************************************************** 348 349 * \ / 02066 62001C22 01 350 LD2 R0 FILENAME/EQFILENM get the specified name 02067 60840007 2 IMM 351 LD R2 COMNDTABL-1 00002068 352 FINDCOMND LABEL 02068 6624211F 01 2 353 CPR2 R0 COMNDTAB(R2) is it this command? 02069 FE0C206B 354 JNE NOTTHISCMD jump if not this one 0206A 5CA4212F 2 355 LDPC COMNDJMP(R2) goto the processing routine 356 * --- 0000206B 357 NOTTHISCMD LABEL 0206B FAA62068 2 358 JDR R2 FINDCOMND otherwise, try the next one 359 * \ / 360 361 ********************************************************************************** 362 * * 363 * The file name is packed and in the FILENAME buffer. * 364 * We check to see if an account was specified. * 365 * * 366 ********************************************************************************** 367 368 * \ / 0000206C 369 NOTCOMND LABEL 0206C 5E001C1D 370 CMZ2 FILENAME/EQACCT was an account specified? 0206D FE0C2074 371 JNE ACCTSPEC jump if so 0206E 5C001C1F 372 CMZ FILENAME/EQACCTPROJ was a project specified? 0206F FE0C2074 373 JNE ACCTSPEC jump if so -- no default 374 * \ / 02070 6200200C 01 375 LD2 R0 DFLTACCT 02071 E6001C1D 01 376 ST2 R0 FILENAME/EQACCT default the account 02072 6000200E 0 377 LD R0 DFLTPROJ 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 15 F 0 02073 E4001C1F 0 378 ST R0 FILENAME/EQACCTPROJ default the project 00002074 379 ACCTSPEC LABEL 380 * \ / 381 382 ********************************************************************************** 383 * * 384 * Search for the file in the directory. * 385 * * 386 ********************************************************************************** 387 388 * \ / 02074 611013E4 4 @ 389 LD R4 @VDISKCB R4=disk control block pointer 02075 61441C1D 5 IMM 390 LD R5 ADR FILENAME/EQACCT R5=>filename block 02076 DC5013E2 @ 391 CALLNP @VSRCHDIR search for the file 02077 FAF020D2 3 392 JZA R3 NOFILE jump if the file doesn't exist 02078 6008EA60 0 3 ZBM 393 LD R0 R3,FDET get the device type of the file 02079 64040003 0 IMM 394 CPR R0 HTYPECODE it must be a code file 0207A FE0C20D2 395 JNE NOFILE file not there if wrong type 396 * \ / 397 398 ********************************************************************************** 399 * * 400 * The file is found. Read in the index block. * 401 * * 402 ********************************************************************************** 403 404 * \ / 0207B 6008D185 0 3 ZBM 405 LD R0 R3,FDDA get the disk address of index block 0207C E4001C27 0 406 ST R0 DISKADDR save disk address 0207D 611013E4 4 @ 407 LD R4 @VDISKCB point to disk control block 0207E DC1013E0 @ 408 CALL @VREAD read in the index block 0207F 41001C27 409 PAR DISKADDR pass disk address 02080 415013E8 @ 410 PARV @VPFWNDO1 02081 41001C28 411 PAR FBIBUFF pass address of FBI buffer 02082 41440013 IMM 412 PARV FBITCCB pass expected FBI type 02083 400020C0 413 PARL BADFILE where to go if perm disk error 414 * \ / 415 416 ********************************************************************************** 417 * * 418 * The index block is read into WNDO1. Scan through it * 419 * and read data blocks. * 420 * * 421 ********************************************************************************** 422 423 * \ / 02084 61C4000C 7 IMM 424 LD R7 PROGAREA/FLDPAGE R7=first page to read 00002085 425 NEXTPAGE LABEL 02085 616E0800 5 7 426 LD R5 WNDO1(R7) get the block address of a page 02086 614B5180 5 5 CBM 427 LD R5 R5/MSBLKFIELD reduce to just the disk addr 02087 FB422091 5 428 JEQZ R5 NONEHERE no page here 02088 E5401C27 5 429 ST R5 DISKADDR save disk address 02089 615013E6 5 @ 430 LD R5 @VMEMPF get a page file for some page 0208A E5CB68C0 7 5 CBM 431 ST R7 R5/PFPAGENUM make for this page 0208B DC1013E0 @ 432 CALL @VREAD read in the data page 0208C 41001C27 433 PAR DISKADDR pass disk address 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 16 F 0 0208D 41534000 5 REG 434 PARV R5 page file to read into 0208E 41001C28 435 PAR FBIBUFF pass address of FBI buffer 0208F 41440014 IMM 436 PARV FBITCODED pass expected FBI type 02090 400020C0 437 PARL BADFILE where to go if perm disk error 438 * \ / 439 00002091 440 NONEHERE LABEL 02091 19C40001 7 IMM 441 ADD R7 1 advance one page 02092 65C40080 7 IMM 442 CPR R7 NPS beyond the end? 02093 FE082085 443 JLT NEXTPAGE loop if more to go 444 * \ / 445 446 ********************************************************************************** 447 * * 448 * The program is read into real memory. Jump at him. * 449 * * 450 ********************************************************************************** 451 452 * \ / 02094 61001C00 4 453 LD R4 TERMPOS point R4 to the terminator 02095 609020A0 2 @ 454 LD R2 @TRANS2P get the transfer addr 02096 E4801C02 2 455 ST R2 ENTRYPT save transfer point 02097 68843000 2 IMM 456 UCPR R2 PROGAREA is it above base of program? 02098 FE0820AF 457 JLT BADSTART if not, give him an error 02099 5C001C01 458 CMZ RUNFLAG am I to run the program? 0209A FE0C20A1 459 JNE ITSLOADED jump if not, say loaded 0209B DC5013E3 @ 460 CALLNP @VDISPLAY remove writing on the display 0209C 20202020 461 ASCII 2, 0209E 20200000 462 VFD " " AND 03F3F0000 0209F 5C928000 2 REG 463 LDPC R2 goto the program 464 * --- 465 020A0 00000BF2 466 TRANS2P PTR WNDO1(CCBINFO)/CCB2TRANS 467 468 ********************************************************************************** 469 * * 470 * The file was just to be loaded. Tell him so. * 471 * * 472 ********************************************************************************** 473 000020A1 474 ITSLOADED LABEL 020A1 DC0026CD 475 CALL PREPOUTR print the informative message 020A2 41001C18 476 PAR FILENAME 020A3 41001C02 477 PAR ENTRYPT 020A4 400020A6 478 PARL LOADEDM 020A5 FE0E203C 479 JMP MC before going back for another command 480 * --- 481 020A6 2046696C 482 LOADEDM TEXTZ " File \F1\ loaded, start = \H2,5\." 483 484 ********************************************************************************** 485 * * 486 * The starting address is below the base of the program. * 487 * This is to catch old programs using the old program base of * 488 * 02000. * 489 * * 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 17 F 0 490 ********************************************************************************** 491 000020AF 492 BADSTART LABEL 020AF DC0026CD 493 CALL PREPOUTR 020B0 41001C02 494 PAR ENTRYPT 020B1 400020B3 495 PARL BADSTARTM 020B2 FE0E203C 496 JMP MC 497 * --- 498 020B3 20537461 499 BADSTARTM TEXTZ " Starting addr below base of program. SA = \H1,5\." 500 501 ********************************************************************************** 502 * * 503 * The data file wouldn't read. Error message output. * 504 * * 505 ********************************************************************************** 506 000020C0 507 BADFILE LABEL 508 509 * See if we're running from remote front panel 510 020C0 60001C3E 0 511 LD R0 OPLTYPE Get magic flag 020C1 FA0C20CD 0 512 JNEZ R0 BADFILEOFF jump if local FP, display and halt 513 * \ / 514 020C2 6044001C 1 IMM 515 LD R1 BADFILEML 020C3 608420C6 2 IMM 516 LD R2 ADR BADFILEM 020C4 DC5013F4 @ 517 CALLNP @VWRITELINE output error message 020C5 FE0E203C 518 JMP MC 519 * --- 520 020C6 20446973 521 BADFILEM TEXT " Disk error reading file." 0000001C ABS 522 BADFILEML EQU DISPC BADFILEM 523 524 ********************************************************************************** 525 * * 526 * We're running from the front panel and the file * 527 * wouldn't read. Panic, then put something meaningful * 528 * in the lights and wait for the user to do something. * 529 * * 530 ********************************************************************************** 531 000020CD 532 BADFILEOFF LABEL 020CD DC5013E3 @ 533 CALLNP @VDISPLAY 020CE 42414420 534 ASCII 2,BAD FILE "BAD FILE " 020D0 20200000 535 VFD " " AND 03F3F0000 020D1 003FFFFF 536 HALT NOHALTCODE Wait for something to happen 537 * --- 538 539 540 ********************************************************************************** 541 * * 542 * The file doesn't seem to exist. Error message output. * 543 * * 544 ********************************************************************************** 545 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 18 F 0 000020D2 546 NOFILE LABEL 020D2 60440018 1 IMM 547 LD R1 NOFILEML 020D3 608420D6 2 IMM 548 LD R2 ADR NOFILEM 020D4 DC5013F4 @ 549 CALLNP @VWRITELINE output error message 020D5 FE0E203C 550 JMP MC 551 * --- 552 020D6 2046696C 553 NOFILEM TEXT " File does not exist." 00000018 ABS 554 NOFILEML EQU DISPC NOFILEM 555 556 ********************************************************************************** 557 * * 558 * Filename not in proper format. * 559 * * 560 ********************************************************************************** 561 000020DC 562 PACKBAD LABEL 020DC 60440020 1 IMM 563 LD R1 PACKBADML 020DD 608420E0 2 IMM 564 LD R2 ADR PACKBADM 020DE DC5013F4 @ 565 CALLNP @VWRITELINE output the error message 020DF FE0E203C 566 JMP MC give another prompt 567 * --- 568 020E0 2046696C 569 PACKBADM TEXT " Filename not in proper format." 00000020 ABS 570 PACKBADML EQU DISPC PACKBADM 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 19 F 0 572 573 ********************************************************************************** 574 * * 575 * LOADPF. Routine to load the page file locations, * 576 * starting with virtual page 3000 in monitor memory and going * 577 * through the end of the page file, with the matching * 578 * physical pages from the MCU that DISKBOOT used when loading * 579 * us. * 580 * e.g. PF location 08C gets physical page 0C mapped * 581 * into it. * 582 * Call: * 583 * CALLNP LOADPF * 584 * Eats R0:R1, R3 * 585 * * 586 ********************************************************************************** 587 588 BLOCK 589 590 ENTRY LOADPF 591 020E8 DD524000 1 REG 592 LOADPF ENTRNP R1 020E9 60C4008C 3 IMM 593 LD PFPTR PNPROGAREA page number for beginning of program 020EA 601013E6 0 @ 594 LD R0 @VMEMPF page file for this memory box 000020EB 595 RESTOREPF LABEL 020EB E4CA28C0 3 0 CBM 596 ST PFPTR R0/PFPAGENUM make page file for that page 020EC EC0A3010 0 CBM 597 STZ R0/PFPAGENUM/MONBIT remove the monitor bit 020ED 00D20000 0 REG 598 LDPF R0 map memory one-to-one 020EE 18C40001 3 IMM 599 ADD PFPTR 1 move to next page file location 020EF 64C40100 3 IMM 600 CPR PFPTR PFSIZE check for off end 020F0 FE0820EB 601 JLT RESTOREPF jump if more pages to do 020F1 5D124000 1 REG 602 LEAVE R1 603 * --- 604 +LOADPF 000020E8 F 0 590 592= +PNPROGAREA 0000008C F 0 593 RESTOREPF 000020EB F 0 595= 601j +VMEMPF 000013E6 F 0 594 605 END 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 20 F 0 607 608 ********************************************************************************** 609 * * 610 * If there are other CPUs, they will come here, load * 611 * their page files, and stop. They can be brought into use * 612 * by an offline program by storing a starting address into * 613 * VEXTRACPUS. * 614 * * 615 ********************************************************************************** 616 000020F2 617 MULTICPUS LABEL 020F2 DC4020E8 618 CALLNP LOADPF load the page file 000020F3 619 MULTILOOP LABEL 020F3 00420008 IMM 620 WAIT WAITCOUNT wait here a bit 020F4 5C8013FC 621 LDPC VEXTRACPUS loop to where the vectors want us 622 * --- 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 21 F 0 624 625 ********************************************************************************** 626 * * 627 * This is the INITIALIZE section. It sets up the * 628 * vectors for use by other off-line programs and clears the * 629 * error log. If booted from the front panel, it initializes * 630 * the comm. * 631 * * 632 * Call: * 633 * CALLNP INITIALIZE * 634 * * 635 * Eats: R0:R5 * 636 * * 637 ********************************************************************************** 638 639 INITIALIZE BLOCK 640 641 ENTRY INITIALIZE 642 643 VARS 00001C3F 644 INITRS BSS 1 return info 645 PROG 646 020F5 DD401C3F 647 INITIALIZE ENTRNP INITRS 020F6 60042108 0 IMM 648 LD R0 ADR VECTORS set up source address... 020F7 60440034 1 IMM 649 LD R1 VECTORL*CPW ... length... 020F8 608413F0 2 IMM 650 LD R2 ADR VDONEEXIT ... and destination address 020F9 FE400000 651 CMOVE copy my vectors into table 020FA 601013ED 0 @ 652 LD R0 @VMEMSPACE 020FB E4001C03 0 653 ST R0 SPACEINW4 save end of substitution list 654 020FC 60841C77 2 IMM 655 LD R2 ADR LOGBUFFER get address of error log buffer 020FD E48013EA 2 656 ST R2 VERRLOGPTR tell DISKBOOT about it 020FE 604407D8 1 IMM 657 LD R1 (LOGENTRIES*ERRLNTH+2)*CPW get buffer length 020FF DA800800 2 1 658 FILLI R2 R1 000 clear the error log buffer 659 * \ / 02100 D1401E6B 660 STMW LOGBUFFER(LOGENTRIES*ERRLNTH) flag end of buffer 661 02101 60000313 0 662 LD R0 FPSWITCHX get front panel switches 02102 EC001C3E 663 STZ OPLTYPE guess RFP boot 02103 F6002107 0 664 JBT R0/SSURFP SKPCIAINIT skip CIA initialize if RFP 665 * \ / customer boot, process accordingly 02104 604A3840 1 0 CBM 666 LD R1 R0/SSUSWITCH Get meaningful bits 02105 E4401C3E 1 667 ST R1 OPLTYPE indicate actually customer boot 02106 DC4022BC 668 CALLNP INITCIA find CIA and initialize it 00002107 669 SKPCIAINIT LABEL 02107 5D001C3F 670 LEAVE INITRS then return to main line 671 * --- 672 673 * Vectors copied into diskboot vector area 00002108 674 VECTORS LABEL 02108 00002021 675 VFD ADR DONEEXITR exit on program completion 02109 000022FD 676 VFD ADR READCHARR read one character 0210A 0000233E 677 VFD ADR WRITECHARR write one character 0210B 00002364 678 VFD ADR READLINER read one line 0210C 00002386 679 VFD ADR WRITELINER write one line 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 22 F 0 0210D 000023C2 680 VFD ADR FETCHITEMR fetch an item 0210E 0000242B 681 VFD ADR FETCHFNMR fetch (pack) a filename 0210F 0000244F 682 VFD ADR SCANOVERR scan over non-item characters 02110 000023BF 683 VFD ADR FTCHITEMHR fetchitem with hex numbers 02111 000026CD 684 VFD ADR PREPOUTR output formatter 02112 00001C77 685 VFD ADR LOGBUFFER beginning of error log buffer 02113 000023A3 686 VFD ADR GETDATE get the system time and date 02114 000020F3 687 VFD ADR MULTILOOP where multiple CPUs should go 0000000D ABS 688 VECTORL EQU DISPW VECTORS 689 +DONEEXITR 00002021 F 0 675a +ERRLNTH 00000005 F 0 657 660s +FETCHFNMR UUUUUUUU F 0 681a +FETCHITEMR UUUUUUUU F 0 680a +FTCHITEMHR UUUUUUUU F 0 683a +GETDATE UUUUUUUU F 0 686a +INITCIA UUUUUUUU F 0 668 +INITIALIZE 000020F5 F 0 641 647= INITRS 00001C3F F 0 644= 647s 670 +LOGBUFFER UUUUUUUU F 0 655a 660s 685a +LOGENTRIES UUUUUUUU F 0 657 660s +MULTILOOP 000020F3 F 0 687a +OPLTYPE 00001C3E F 0 663s 667s +PREPOUTR UUUUUUUU F 0 684a +PROG MACRO F 0 645 +PROGRAM! 000020F5 F 0 643= 643e 645a +PSECT! 00000000 F 0 643a 643a 643e 643= 643e 645a 645e 645= 645a 645e +READCHARR UUUUUUUU F 0 676a +READLINER UUUUUUUU F 0 678a +SCANOVERR UUUUUUUU F 0 682a SKPCIAINIT 00002107 F 0 664j 669= +SPACEINW4 00001C03 F 0 653s +VARIABLES! 00001C40 F 0 643a 645e 645= +VARS MACRO F 0 643 +VDONEEXIT 000013F0 F 0 650a VECTORL 0000000D F 0 649 688= VECTORS 00002108 F 0 648a 674= 688e +VERRLOGPTR 000013EA F 0 656s +VMEMSPACE 000013ED F 0 652 +WRITECHARR UUUUUUUU F 0 677a +WRITELINER UUUUUUUU F 0 679a 690 END INITIALIZE 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 23 F 0 692 693 ********************************************************************************** 694 * * 695 * Known offline programs callable from the local front * 696 * panel. * 697 * * 698 * The programs currently available to customers are... * 699 * Boot 3 => DISKCOPY * 700 * Boot 4 => DISKINIT * 701 * Boot 5 => DISKTOTAPE * 702 * * 703 ********************************************************************************** 704 00002115 705 OFFNAMTAB LABEL 0000210F 706 OFFNAMES EQU OFFNAMTAB(-3*2) codes 0, 1, and 2 are reserved 02115 58760761 707 PAK12 DISKCOPY boot switches = 3 => disk backup 02117 58760850 708 PAK12 DISKINIT boot switches = 4 => disk format 02119 58760A09 709 PAK12 DISKTOTAPE boot switches = 5 => disk to tape backup 0211B E79EDF2D 710 PAK12 !!!!!!!!!!!! boot switches = 6 => not assigned 0211D E79EDF2D 711 PAK12 !!!!!!!!!!!! boot switches = 7 => not assigned 712 00000007 ABS 713 MAXOFFSYS EQU ((DISPW OFFNAMES)/2)-1 Max legal 714 715 ********************************************************************************** 716 * * 717 * Note that the COMMANDS command relies on this table * 718 * having a multiple of four entries in it. The extra entries * 719 * beyond the last used are blanks and they will print as * 720 * blanks on the last output line. * 721 * Note that the help routine has a table with the same * 722 * index for finding the help info. * 723 * * 724 ********************************************************************************** 725 0000211F 726 COMNDTAB LABEL 0211F 4D27B580 727 PAK12 BOOT 02121 53401790 728 PAK12 COMMANDS 02123 6B931000 729 PAK12 GO 02125 703D0E80 730 PAK12 HELP 731 02127 8A22A580 732 PAK12 LOAD 02129 A3146E3C 733 PAK12 PRTERRLOG 0212B AFB86000 734 PAK12 RUN 0212D B46AE7D0 735 PAK12 SLEEP 00000008 ABS 736 COMNDTABL EQU (DISPW COMNDTAB)/2 number of entries in table 737 0000212F 738 COMNDJMP LABEL 0212F 0000213F 739 VFD ADR BOOTR 02130 0000215E 740 VFD ADR COMMANDSR 02131 0000213E 741 VFD ADR GOR 02132 00002174 742 VFD ADR HELPR 743 02133 00002137 744 VFD ADR LOADR 02134 0000206C 745 VFD ADR NOTCOMND 02135 00002138 746 VFD ADR RUNR 02136 000022B7 747 VFD ADR SLEEPR 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 24 F 0 Commands: "Load", "Run", and "Go" 750 751 BLOCK 752 ENTRY LOADR 753 ENTRY RUNR 754 ENTRY GOR 755 756 ********************************************************************************** 757 * * 758 * LOAD filename * 759 * * 760 * This command loads the specified file but does not run * 761 * it. This allows the program to be modified or started at * 762 * some funny location for diagnostic work. * 763 * * 764 ********************************************************************************** 765 00002137 766 LOADR LABEL 02137 EDC01C01 767 STW RUNFLAG say to only load it 768 * \ / 769 770 ********************************************************************************** 771 * * 772 * RUN filename * 773 * * 774 * This command loads and runs the specified file. This * 775 * only exists because there may be a program named LOAD or * 776 * RUN or any of the other OPL commands. * 777 * * 778 ********************************************************************************** 779 780 * \ / 00002138 781 RUNR LABEL 02138 61441C18 5 IMM 782 LD R5 ADR FILENAME 02139 60C0200F 3 783 LD R3 RADCODE get the default extension 0213A DC40242B 784 CALLNP FETCHFNMR get the filename 0213B FA0820DC 0 785 JLTZ R0 PACKBAD bad format 0213C E5001C00 4 786 ST R4 TERMPOS remember where the parameters begin 0213D FE0E206C 787 JMP NOTCOMND load the file 788 * --- 789 790 ********************************************************************************** 791 * * 792 * GO [parameters] * 793 * * 794 * This command will transfer control to a previously * 795 * loaded program. You may optionally specify parameters for * 796 * that program. * 797 * * 798 ********************************************************************************** 799 0000213E 800 GOR LABEL 0213E 5C801C02 801 LDPC ENTRYPT go do it 802 * --- 803 +ENTRYPT 00001C02 F 0 801 +FETCHFNMR UUUUUUUU F 0 784 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 25 F 0 Commands: "Load", "Run", and "Go" +FILENAME 00001C18 F 0 782a +GOR 0000213E F 0 754 800= +LOADR 00002137 F 0 752 766= +NOTCOMND 0000206C F 0 787j +PACKBAD 000020DC F 0 785j +RADCODE 0000200F F 0 783 +RUNFLAG 00001C01 F 0 767s +RUNR 00002138 F 0 753 781= +TERMPOS 00001C00 F 0 786s 804 END 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 26 F 0 Command: "Boot" 807 808 BLOCK 809 ENTRY BOOTR 810 811 ********************************************************************************** 812 * * 813 * BOOT [number] * 814 * * 815 * This command commands the SSU to boot the system with * 816 * the specified switch setting. The number is a hexadecimal * 817 * number that corresponds to the four front panel switches. * 818 * If the number is not specified, then zero (the operating * 819 * system) is assumed. * 820 * * 821 ********************************************************************************** 822 0000213F 823 BOOTR LABEL 0213F DC4023BF 824 CALLNP FTCHITEMHR pick up the number 02140 F6782150 1 825 JBT R1/TEOL BOOT0 if eol, assume zero 02141 F27E2152 1 826 JBF R1/TNUM BADFORM only numbers are allowed 00002142 827 BOOT0X LABEL 02142 60C40086 3 IMM 828 LD PFPTR PNCIX 02143 00D013E5 @ 829 LDPF @VPF4SSU make a window to the SSU 02144 E4801810 2 830 ST R2 CIX(SSUBOOTFP) tell him to boot 831 * \ / 832 02145 00420008 IMM 833 WAIT WAITCOUNT wait for the boot to happen 834 * !!! should boot before fall through 02146 DC0026CD 835 CALL PREPOUTR say if it didn't work 02147 40002149 836 PARL NOBOOTM 02148 FE0E2021 837 JMP DONEEXITR re-initialize 838 * --- 839 02149 20546865 840 NOBOOTM TEXTZ " The SSU will not boot us." 841 00002150 842 BOOT0 LABEL 02150 60840000 2 IMM 843 LD R2 0 use zero for default boot switches 02151 FE0E2142 844 JMP BOOT0X 845 * --- 846 00002152 847 BADFORM LABEL bad format of parameter 02152 DC0026CD 848 CALL PREPOUTR 02153 40002155 849 PARL BADFORMMSG 02154 FE0E2021 850 JMP DONEEXITR re-initialize 851 * --- 852 02155 20426164 853 BADFORMMSG TEXTZ " Bad format for boot switch value." 854 BADFORM 00002152 F 0 826j 847= BADFORMMSG 00002155 F 0 849a 853= BOOT0 00002150 F 0 825j 842= BOOT0X 00002142 F 0 827= 844j +BOOTR 0000213F F 0 809 823= +DONEEXITR 00002021 F 0 837j 850j +FTCHITEMHR UUUUUUUU F 0 824 NOBOOTM 00002149 F 0 836a 840= 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 27 F 0 Command: "Boot" +PREPOUTR UUUUUUUU F 0 835 848 +TEOL 00003810 F 0 825j +TNUM 00003E10 F 0 826j +VPF4SSU 000013E5 F 0 829 855 END 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 28 F 0 Command: "Commands" 858 859 BLOCK 860 ENTRY COMMANDSR 861 862 ********************************************************************************** 863 * * 864 * COMMANDS * 865 * * 866 * This command lists the names of the legal commands. * 867 * * 868 ********************************************************************************** 869 0000215E 870 COMMANDSR LABEL 0215E DC0026CD 871 CALL PREPOUTR 0215F 4100211F 872 PAR COMNDTAB(0) 02160 41002121 873 PAR COMNDTAB(2) 02161 41002123 874 PAR COMNDTAB(4) 02162 41002125 875 PAR COMNDTAB(6) 02163 4000216B 876 PARL COMNDRM 02164 DC0026CD 877 CALL PREPOUTR 02165 41002127 878 PAR COMNDTAB(8) 02166 41002129 879 PAR COMNDTAB(10) 02167 4100212B 880 PAR COMNDTAB(12) 02168 4100212D 881 PAR COMNDTAB(14) 02169 4000216B 882 PARL COMNDRM 0216A FE0E203C 883 JMP MC 884 * --- 885 0216B 205C7331 886 COMNDRM TEXTZ " \s1,10\ \s2,10\ \s3,10\ \s4,10\" 887 +COMMANDSR 0000215E F 0 860 870= COMNDRM 0000216B F 0 876a 882a 886= +COMNDTAB 0000211F F 0 872a 873a 874a 875a 878a 879a 880a 881a +MC 0000203C F 0 883j +PREPOUTR UUUUUUUU F 0 871 877 888 END 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 29 F 0 Command: "Help" 891 892 ********************************************************************************** 893 * The HELP command is used to give brief descriptions of * 894 * each of the commands. * 895 ********************************************************************************** 896 897 BLOCK 898 899 ENTRY HELPR HELP command 900 901 VARS 00001C40 902 MESPTR BSS 1 holds pointer to current line of help output 903 PROG 904 00002174 905 HELPR LABEL 02174 DC4023C2 906 CALLNP FETCHITEMR fetch the next item (command name) 02175 F678217B 1 907 JBT R1/BIT 28 GENERAL give general help if no command name 02176 F27C217B 1 908 JBF R1/BIT 30 BADFORM must be symbol 02177 61440007 5 IMM 909 LD R5 COMNDTABL-1 get number of commands in table 00002178 910 HELPCOMLP LABEL 02178 66AA211F 23 5 911 CPR2 R2 COMNDTAB(R5) look for this command 02179 FE02217D 912 JEQ HELPCOMFND jump if found 0217A FB662178 5 913 JDR R5 HELPCOMLP go back until done 914 * \ / sorry, no such command 915 0000217B 916 BADFORM LABEL 0000217B 917 GENERAL LABEL 0217B 6004219D 0 IMM 918 LD R0 ADR HIGENHELP get pointer to general help 0217C FE0E217E 919 JMP HELPWPTR and go to general printer 920 * --- 921 0000217D 922 HELPCOMFND LABEL 0217D 602A2195 0 5 923 LD R0 COMMHELPT(R5) get pointer to the appropriate text 0000217E 924 HELPWPTR LABEL 0217E E4001C40 0 925 ST R0 MESPTR and save for following code 0000217F 926 HELPNXTLIN LABEL 0217F 60001C40 0 927 LD R0 MESPTR pick up the message pointer 02180 60440064 1 IMM 928 LD R1 100 all lines are shorter than this 02181 60840000 2 IMM 929 LD R2 0 we will look for the terminator (null) 02182 FE560000 930 CSRCH look for its end 02183 FE0C218A 931 JNE HELPERR must find terminator 02184 30440064 1 IMM 932 RSB R1 100 make line length 02185 FA42203C 1 933 JEQZ R1 MC if another null, done with help 02186 38960801 2 0 BASE 934 LEA R2 R0,1 make word address of next word 02187 E0801C40 2 935 EXCH R2 MESPTR put this away for next search, and get last to print 02188 DC5013F4 @ 936 CALLNP @VWRITELINE print out the line 02189 FE0E217F 937 JMP HELPNXTLIN and go for the next line 938 * --- 939 0000218A 940 HELPERR LABEL 0218A DC0026CD 941 CALL PREPOUTR call to output desperation message 0218B 4000218D 942 PARL HELPBUG must be bug in internal messages 0218C FE0E203C 943 JMP MC and back to main control 944 * --- 945 0218D 202A2A2A 946 HELPBUG TEXTZ " *** bug in help routine ***" 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 30 F 0 Command: "Help" 947 00002195 948 COMMHELPT LABEL pointers to the help messages 02195 000021BB 949 VFD ADR HIBOOT 02196 000021DA 950 VFD ADR HICOMMAND 02197 000021E9 951 VFD ADR HIGO 02198 00002201 952 VFD ADR HIHELP 953 02199 00002208 954 VFD ADR HILOAD 0219A 00002240 955 VFD ADR HIPRTERRLG 0219B 00002250 956 VFD ADR HIRUN 0219C 00002287 957 VFD ADR HISLEEP 958 0000219D 959 HIGENHELP LABEL 0219D 20466F72 960 TEXTZ " For a list of valid commands, type 'Commands'. For help" 021AC 20776974 961 TEXTZ " with a specific command, type 'help '." 021BA 00000000 962 VFD 0 000021BB 963 HIBOOT LABEL 021BB 20466F72 964 TEXTZ " Format: Boot []" 021C3 20202020 965 TEXTZ " This command is used to simulate the operation of" 021D1 20626F6F 966 TEXTZ " booting from the front panel." 021D9 00000000 967 VFD 0 000021DA 968 HICOMMAND LABEL 021DA 20202020 969 TEXTZ " This command prints a list of the valid commands." 021E8 00000000 970 VFD 0 000021E9 971 HIGO LABEL 021E9 20202020 972 TEXTZ " This command starts the offline program previously" 021F8 206C6F61 973 TEXTZ " loaded by the LOAD command." 02200 00000000 974 VFD 0 00002201 975 HIHELP LABEL 02201 20202020 976 TEXTZ " You do need help." 02207 00000000 977 VFD 0 00002208 978 HILOAD LABEL 02208 20466F72 979 TEXTZ " Format: LOAD .:[.]" 02217 20202020 980 TEXTZ " This command loads a copy of the specified program" 02226 20696E74 981 TEXTZ " into memory to allow patching or whatever before it is" 02234 20737461 982 TEXTZ " started. See the GO command to start it." 0223F 00000000 983 VFD 0 00002240 984 HIPRTERRLG LABEL 02240 20202020 985 TEXTZ " This command prints out the resident disk error log." 0224F 00000000 986 VFD 0 00002250 987 HIRUN LABEL 02250 20466F72 988 TEXTZ " Format: RUN .:[.]" 0225F 20202020 989 TEXTZ " This command is used to run a specified offline" 0226D 2070726F 990 TEXTZ " program. RUN is provided in case the program name" 0227A 2073686F 991 TEXTZ " should happen to conflict with a command name." 02286 00000000 992 VFD 0 00002287 993 HISLEEP LABEL 02287 20202020 994 TEXTZ " This command puts 'ZZZZ's into the front panel" 02295 20646973 995 TEXTZ " display to show completion and halts to return control" 022A3 20746F20 996 TEXTZ " to the RDU program or RITA box." 022AC 00000000 997 VFD 0 000022AD 998 HIERROR LABEL 022AD 202A2A2A 999 TEXTZ " *** no corresponding command ***" 022B6 00000000 1000 VFD 0 1001 BADFORM 0000217B F 0 908j 916= 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 31 F 0 Command: "Help" COMMHELPT 00002195 F 0 923 948= +COMNDTAB 0000211F F 0 911 +COMNDTABL 00000008 F 0 909 +FETCHITEMR UUUUUUUU F 0 906 GENERAL 0000217B F 0 907j 917= HELPBUG 0000218D F 0 942a 946= HELPCOMFND 0000217D F 0 912j 922= HELPCOMLP 00002178 F 0 910= 913j HELPERR 0000218A F 0 931j 940= HELPNXTLIN 0000217F F 0 926= 937j +HELPR 00002174 F 0 899 905= HELPWPTR 0000217E F 0 919j 924= HIBOOT 000021BB F 0 949a 963= HICOMMAND 000021DA F 0 950a 968= HIERROR 000022AD F 0 998= HIGENHELP 0000219D F 0 918a 959= HIGO 000021E9 F 0 951a 971= HIHELP 00002201 F 0 952a 975= HILOAD 00002208 F 0 954a 978= HIPRTERRLG 00002240 F 0 955a 984= HIRUN 00002250 F 0 956a 987= HISLEEP 00002287 F 0 957a 993= +MC 0000203C F 0 933j 943j MESPTR 00001C40 F 0 902= 925s 927 935s +PREPOUTR UUUUUUUU F 0 941 +PROG MACRO F 0 903 +PROGRAM! 00002174 F 0 901= 901e 903a +PSECT! 00000000 F 0 901= 901a 901a 901e 901e 903e 903e 903a 903a 903= +VARIABLES! 00001C41 F 0 901a 903= 903e +VARS MACRO F 0 901 +VWRITELINE 000013F4 F 0 936 1002 END 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 32 F 0 Command: "Sleep" 1005 1006 BLOCK 1007 1008 ENTRY SLEEPR 1009 1010 ********************************************************************************** 1011 * * 1012 * SLEEP * 1013 * * 1014 * This command will merely put "ZZZZZ..." into the * 1015 * lights and halt. This provides a clean exit so that a * 1016 * customer knows what state the system is in. It also gets * 1017 * the operator back to RDU or RITA easily. * 1018 * * 1019 ********************************************************************************** 1020 000022B7 1021 SLEEPR LABEL 022B7 DC5013E3 @ 1022 CALLNP @VDISPLAY 022B8 5A5A5A5A 1023 ASCII 2,ZZZZZZ.. "ZZZZZZ... " 022BA 2E200000 1024 VFD ". " AND 03F3F0000 022BB 003FFFFF 1025 HALT NOHALTCODE 1026 * --- 1027 +SLEEPR 000022B7 F 0 1008 1021= +VDISPLAY 000013E3 F 0 1022 1028 END 1029 INPUT OPLCOMM include the comm driver 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 33 (OPLCOMM) F 13 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 00001C41 14 PF4COMM BSS 1 PF to communicate with CIA 00001C42 15 PORTNUM BSS 1 number of port being run by CIA driver 00000050 ABS 16 INBUFFLEN EQU 80 maximum length of input line 00001C43 17 COMMINBUFFW BSS 0 word address for input buffer 02001C43 18 COMMINBUFF BSSC INBUFFLEN buffer for input line 00001C57 19 TMPBUFFPTR BSS 1 pointer into buffer 00001C58 20 ABSADDRESS BSS 1 absolute address for CIA buffer 00001C59 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 00001C5A 41 INITCIARS BSS 1 return address 42 PROG 43 022BC DD401C5A 44 INITCIA ENTRNP INITCIARS entry point 022BD 60440000 1 IMM 45 LD R1 0 index for slot number 022BE 60220370 0 1 46 CHECKSLOT LD R0 IBSLOTS(R1) get WRU response for slot 022BF 600A0040 0 0 CBM 47 LD R0 R0/WRU0TYPE who is in this slot? 022C0 64040003 0 IMM 48 CPR R0 SLTTPPU is it a PPU? 022C1 FE0C22D1 49 JNE NEXTSLOT jump if not, try next slot for PPU 50 * \ / 022C2 EC120000 0 REG 51 STZ R0 clear register 022C3 E44A0840 1 0 CBM 52 ST R1 R0/PFSLOT slot the PPU is hiding in 022C4 60840000 2 IMM 53 LD R2 0 index for channel number 000022C5 54 NEXTCHANL LABEL 022C5 E48A3020 2 0 CBM 55 ST R2 R0/PPUCHAN store channel number 022C6 60C40086 3 IMM 56 LD R3 PNCIX page # for communication 022C7 00D20000 0 REG 57 LDPF R0 set to communicate with device 022C8 61001800 4 58 LD R4 CIX(PPUCABLED) ask who is on this channel 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 34 (OPLCOMM) F 13 Off-line Communication Driver 022C9 614B0080 5 4 CBM 59 LD R5 R4/DWRUTYPE get type of device 022CA 65440008 5 IMM 60 CPR R5 DVCTCOMM is it a comm? 022CB FE0222D5 61 JEQ FOUNDCOMM jump if so 62 * \ / 022CC 18840001 2 IMM 63 ADD R2 1 advance to next channel 022CD 64840004 2 IMM 64 CPR R2 PPUCHANS have all channels been checked? 022CE FE0222D1 65 JEQ NEXTSLOT if not, go to next slot 66 * \ / 022CF 80920000 0 REG 67 PFRD R0 load CIX PF 022D0 FE0E22C5 68 JMP NEXTCHANL go try next channel 69 * --- 70 000022D1 71 NEXTSLOT LABEL 022D1 18440001 1 IMM 72 ADD R1 1 advance to next slot 022D2 64440010 1 IMM 73 CPR R1 NUMSLOTS all slots checked? 022D3 FE0C22BE 74 JNE CHECKSLOT if not check next one 75 * \ / 022D4 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 000022D5 92 FOUNDCOMM LABEL 022D5 60440050 1 IMM 93 LD R1 INBUFFLEN fetch input buffer length 022D6 60841C43 2 IMM 94 LD R2 ADR COMMINBUFFW and address 022D7 DA800800 2 1 95 FILLI R2 R1 000 clear to prevent parity errors 022D8 D1401C42 96 STMW PORTNUM indicate that we haven't found a port board 022D9 E4001C41 0 97 ST R0 PF4COMM remember PF info. on comm. 022DA 60040000 0 IMM 98 LD R0 0 start at port number 0 022DB 604022FC 1 99 LD R1 INITILCMND flush buffers etc. 022DC 61440007 5 IMM 100 LD R5 CIABOARDS-1 counter for boards on CIA 000022DD 101 MOREINITIL LABEL 022DD F72E22E0 4 102 JBT R4/BIT 23 BOARDHERE is there a board here? 022DE 18040008 0 IMM 103 ADD R0 CIAPPBRD no, skip these ports 022DF FE0E22E7 104 JMP NEXTBOARD go check for next board 105 * --- 106 000022E0 107 BOARDHERE LABEL 022E0 5C001C42 108 CMZ PORTNUM have we found a port board yet? 022E1 FE0622E3 109 JGE INITILBRD jump if we have 022E2 E4001C42 0 110 ST R0 PORTNUM otherwise, save active port number 000022E3 111 INITILBRD LABEL 022E3 60C40007 3 IMM 112 LD R3 CIAPPBRD-1 counter for ports per board 000022E4 113 INITILOOP LABEL 022E4 E4601A80 1 0 114 ST R1 CIX(CIAPORT+R0) flush buffers etc. on port 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 35 (OPLCOMM) F 13 Off-line Communication Driver 022E5 18040001 0 IMM 115 ADD R0 1 point to next port 022E6 FAE622E4 3 116 JDR R3 INITILOOP all ports on board done 117 * \ / 000022E7 118 NEXTBOARD LABEL 022E7 610B20F0 4 4 CBM 119 LD R4 R4/BITS 16:30 shift board location bit map 022E8 FB6622DD 5 120 JDR R5 MOREINITIL continue for all boards 121 * \ / 022E9 60401C42 1 122 LD R1 PORTNUM fetch port number that we are using 022EA FA6C22FA 1 123 JEQMW R1 NOPORTBRDS jump if we didn't find any ports 022EB 600022FB 0 124 LD R0 ENABLCMND command to enable input 022EC E4221A80 0 1 125 ST R0 CIX(CIAPORT)(R1) enable input from chosen port 022ED EC001A09 126 STZ CIX(CIAMODE) normal mode for port 022EE D1401A01 127 STMW CIX(CIAINTACK) acknowledge all interrupts 022EF 60040004 0 IMM 128 LD R0 1*CIAEOP mask for EOP interrupt 022F0 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 022F1 60041C43 0 IMM 133 LD R0 ADR COMMINBUFFW virtual address of buffer 022F2 7C020004 0 IMM 134 IOR R0 1*MONBIT*FLDABSPG say its in monitor memory 022F3 60CA1C80 3 0 CBM 135 LD R3 R0/PAGEFIELD what page is it in 022F4 80924000 1 REG 136 PFRD R1 PF contents for page 022F5 E44A14C0 1 0 CBM 137 ST R1 R0/FLDABSPG make into absolute address 022F6 604A4840 1 1 CBM 138 LD R1 R1/PFSLOT get slot page is in 022F7 E44A0840 1 0 CBM 139 ST R1 R0/PFSLOT put slot in absolute address 022F8 E4001C58 0 140 ST R0 ABSADDRESS remember absolute address 022F9 5D001C5A 141 LEAVE INITCIARS 142 * --- 143 000022FA 144 NOPORTBRDS LABEL 022FA 00025001 145 HALT HALTB5001 no port boards on COMM 146 * --- 147 022FB 7B1C0000 148 ENABLCMND VFD 07B1C0000 command to enable input from port 022FC 001FFFE8 149 INITILCMND VFD 0001FFFE8 command to flush buffers, set rate, etc. 150 +ABSADDRESS 00001C58 F 13 140s BOARDHERE 000022E0 F 13 102j 107= CHECKSLOT 000022BE F 13 46= 74j +COMMINBUFFW 00001C43 F 13 94a 133a ENABLCMND 000022FB F 13 124 148= FOUNDCOMM 000022D5 F 13 61j 92= +INBUFFLEN 00000050 F 13 93 +INITCIA 000022BC F 13 27 44= INITCIARS 00001C5A F 13 41= 44s 141 INITILBRD 000022E3 F 13 109j 111= INITILCMND 000022FC F 13 99 149= INITILOOP 000022E4 F 13 113= 116j MOREINITIL 000022DD F 13 101= 120j NEXTBOARD 000022E7 F 13 104j 118= NEXTCHANL 000022C5 F 13 54= 68j NEXTSLOT 000022D1 F 13 49j 65j 71= NOPORTBRDS 000022FA F 13 123j 144= +PF4COMM 00001C41 F 13 97s +PORTNUM 00001C42 F 13 96s 108 110s 122 +PROG MACRO F 13 42 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 36 (OPLCOMM) F 13 Off-line Communication Driver +PROGRAM! 000022BC F 13 40e 40= 42a +PSECT! 00000000 F 13 40a 40e 40e 40a 40= 42= 42a 42e 42a 42e +VARIABLES! 00001C5B F 13 40a 42= 42e +VARS MACRO F 13 40 151 END COMMINIT of comm initialization 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 37 (OPLCOMM) F 13 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 00001C5B 173 READCHARRS BSS 1 return address save 00001C5C 174 RDCHARR1 BSS 1 save for R1 00001C5D 175 RDCHARR3 BSS 1 save for R3 176 177 PROG 022FD DD401C5B 178 READCHARR ENTRNP READCHARRS 022FE E4401C5C 1 179 ST R1 RDCHARR1 save this register 022FF E4C01C5D 3 180 ST R3 RDCHARR3 save this register 02300 60C01C3E 3 181 LD R3 OPLTYPE where were we booted from 02301 FACC2307 3 182 JNEZ R3 FPBOOT jump if not RFP boot 183 * \ / 184 185 ********************************************************************************** 186 * This part handles input if booted from RFP. * 187 ********************************************************************************** 188 02302 60C40086 3 IMM 189 LD R3 PNCIX 02303 00D013E5 @ 190 LDPF @VPF4SSU get access to the SSU 00002304 191 WAIT4RDCH LABEL 02304 6000180D 0 192 LD R0 CIX(SSUCHARIN) get the character 02305 FA062304 0 193 JGEZ R0 WAIT4RDCH wait for the read character 194 * \ / 02306 FE0E2338 195 JMP ECHONRETRN go echo the character and return 196 * --- 197 198 ********************************************************************************** 199 * This part handles input if booted from FP. * 200 ********************************************************************************** 201 00002307 202 FPBOOT LABEL 02307 60001C59 0 203 LD R0 NUMLFTOVR were there any left over chars? 02308 FA02230E 0 204 JEQZ R0 NONELFTOVR jump if no characters from last time 205 * \ / 206 * Use the left over characters from the last transfer 02309 10040001 0 IMM 207 SUB R0 1 one less character remains 0230A E4001C59 0 208 ST R0 NUMLFTOVR remember how many more 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 38 (OPLCOMM) F 13 Off-line Communication Driver 0230B D0801C57 209 INCP TMPBUFFPTR point to the current character 0230C 60101C57 0 @ 210 LD R0 @TMPBUFFPTR get it 0230D FE0E2338 211 JMP ECHONRETRN go echo it 212 * --- 213 214 * Request transfers from comm. until characters input and 215 * use first one. 216 0000230E 217 NONELFTOVR LABEL 0230E 60C40086 3 IMM 218 LD R3 PNCIX page # of CIX 0230F 00C01C41 219 LDPF PF4COMM PF to talk to comm. 00002310 220 LOOKLOOP LABEL 02310 60001A01 0 221 LD R0 CIX(CIAWHYINT) 02311 600A0100 0 0 CBM 222 LD R0 R0/CIACHARS number of chars. CIA has received 02312 FA022310 0 223 JEQZ R0 LOOKLOOP if no chars. keep looking 224 * \ / 02313 60040001 0 IMM 225 LD R0 1*PPUIDMAD 02314 E4001803 0 226 ST R0 CIX(PPUSCSTAT) DMA direction dev. to mem. 02315 60001C58 0 227 LD R0 ABSADDRESS absolute address for comm. buffer 02316 E4001805 0 228 ST R0 CIX(PPUADDR1) transfer address for comm. 02317 60040050 0 IMM 229 LD R0 INBUFFLEN max. chars. that can be input 02318 7C048000 0 IMM 230 IOR R0 1*PPUCLAST say last char. count 02319 E4001804 0 231 ST R0 CIX(PPUCNT1) count of chars. 0231A 60040050 0 IMM 232 LD R0 INBUFFLEN 0231B E4001A04 0 233 ST R0 CIX(CIASREAD) start read transfer 0231C 604400FF 1 IMM 234 LD R1 0FF delay time 0000231D 235 LOOP LABEL 0231D 60001801 0 236 LD R0 CIX(PPUINTSTAT) is there an EOP? 0231E F6202321 0 237 JBT R0/PPUIBTR FOUNDEOP jump if there was an EOP 0231F FA66231D 1 238 JDR R1 LOOP no, keep looking 239 * \ / 02320 00025002 240 HALT HALTB5002 nothing came back from read request 241 * --- 242 00002321 243 FOUNDEOP LABEL 02321 D1401A01 244 STMW CIX(CIAINTACK) acknowledge interrupt 02322 6000233D 0 245 LD R0 BUFFERPTR address for input buffer 02323 E4001C57 0 246 ST R0 TMPBUFFPTR temporary pointer to transfer data 00002324 247 KEEPCHKING LABEL 02324 60101C57 0 @ 248 LD R0 @TMPBUFFPTR get input buffer char. 02325 640400FE 0 IMM 249 CPR R0 0FE check for end marker 02326 FE022310 250 JEQ LOOKLOOP if so, go get more from comm. 251 * \ / 02327 604A3460 1 0 CBM 252 LD R1 R0/BITS 26:31 extract port # 02328 D0801C57 253 INCP TMPBUFFPTR skip over outcount 02329 D0801C57 254 INCP TMPBUFFPTR point to char. count if no status 0232A F232232C 0 255 JBF R0/PORTSTAT NOSTATUS jump if no status with transfer 256 * \ / 0232B D0801C57 257 INCP TMPBUFFPTR otherwise skip over status 0000232C 258 NOSTATUS LABEL 0232C 64401C42 1 259 CPR R1 PORTNUM is this our port? 0232D FE022333 260 JEQ RIGHTPORT jump if it is 261 * \ / 0232E 60101C57 0 @ 262 LD R0 @TMPBUFFPTR get number of characters from this port 0232F 18040001 0 IMM 263 ADD R0 1 add one for CC byte 02330 38301C57 0 0 @ 264 LEA R0 @TMPBUFFPTR(R0) produce next port address 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 39 (OPLCOMM) F 13 Off-line Communication Driver 02331 E4001C57 0 265 ST R0 TMPBUFFPTR and save updated address 02332 FE0E2324 266 JMP KEEPCHKING check next port 267 * --- 268 00002333 269 RIGHTPORT LABEL 02333 60101C57 0 @ 270 LD R0 @TMPBUFFPTR get incount 02334 10040001 0 IMM 271 SUB R0 1 one less chars. left 02335 E4001C59 0 272 ST R0 NUMLFTOVR remaining chars. from port 02336 D0801C57 273 INCP TMPBUFFPTR point to first input char. 02337 60101C57 0 @ 274 LD R0 @TMPBUFFPTR get first char. from buffer 275 * \ / 00002338 276 ECHONRETRN LABEL 02338 DC5013F2 @ 277 CALLNP @VWRITECHAR echo the character 02339 7804007F 0 IMM 278 AND R0 07F remove the funny bit 0233A 60401C5C 1 279 LD R1 RDCHARR1 restore R1 0233B 60C01C5D 3 280 LD R3 RDCHARR3 restore the register 0233C 5D001C5B 281 LEAVE READCHARRS return 282 * --- 283 0233D 020C1C43 284 BUFFERPTR PTR COMMINBUFF character pointer to buffer 285 +ABSADDRESS 00001C58 F 13 227 BUFFERPTR 0000233D F 13 245 284= +COMMINBUFF 02001C43 F 13 284a ECHONRETRN 00002338 F 13 195j 211j 276= FOUNDEOP 00002321 F 13 237j 243= FPBOOT 00002307 F 13 182j 202= +INBUFFLEN 00000050 F 13 229 232 KEEPCHKING 00002324 F 13 247= 266j LOOKLOOP 00002310 F 13 220= 223j 250j LOOP 0000231D F 13 235= 238j NONELFTOVR 0000230E F 13 204j 217= NOSTATUS 0000232C F 13 255j 258= +NUMLFTOVR 00001C59 F 13 203 208s 272s +OPLTYPE 00001C3E F 13 181 +PF4COMM 00001C41 F 13 219 +PORTNUM 00001C42 F 13 259 +PROG MACRO F 13 177 +PROGRAM! 000022FD F 13 172= 172e 177a +PSECT! 00000000 F 13 172a 172e 172= 172a 172e 177e 177a 177= 177a 177e RDCHARR1 00001C5C F 13 174= 179s 279 RDCHARR3 00001C5D F 13 175= 180s 280 +READCHARR 000022FD F 13 156 178= READCHARRS 00001C5B F 13 173= 178s 281 RIGHTPORT 00002333 F 13 260j 269= +TMPBUFFPTR 00001C57 F 13 209s 210 246s 248 253s 254s 257s 262 264a 265s 270 273s 274 +VARIABLES! 00001C5E F 13 172a 177e 177= +VARS MACRO F 13 172 +VPF4SSU 000013E5 F 13 190 +VWRITECHAR 000013F2 F 13 277 WAIT4RDCH 00002304 F 13 191= 193j 286 END COMMRDCHAR of readcharr 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 40 (OPLCOMM) F 13 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 00001C5E 307 WRITECHARS BSS 1 return address save 00001C5F 308 WRCHARR0 BSS 1 save for R1 00001C60 309 WRCHARR1 BSS 1 save for R1 00001C61 310 WRCHARR3 BSS 1 save for R3 311 312 PROG 0233E DD401C5E 313 WRITECHARR ENTRNP WRITECHARS 0233F E4001C5F 0 314 ST R0 WRCHARR0 save this register 02340 E4401C60 1 315 ST R1 WRCHARR1 save this register 02341 E4C01C61 3 316 ST R3 WRCHARR3 save this register 02342 60C01C3E 3 317 LD R3 OPLTYPE flag for where booted from 02343 FACC234A 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 02344 60C40086 3 IMM 326 LD R3 PNCIX 02345 00D013E5 @ 327 LDPF @VPF4SSU point to the SSU 00002346 328 WAIT4WRCH LABEL 02346 60C01808 3 329 LD R3 CIX(SSUCHAROUT) get the output flag 02347 FAC62346 3 330 JGEZ R3 WAIT4WRCH wait if busy outputting 02348 E4001808 0 331 ST R0 CIX(SSUCHAROUT) output the character 02349 FE0E2360 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 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 41 (OPLCOMM) F 13 Off-line Communication Driver 0000234A 344 COMMWRITE LABEL 0234A 60C40086 3 IMM 345 LD R3 PNCIX page number for CIX 0234B 00C01C41 346 LDPF PF4COMM set up to talk to comm. 0234C E40A2080 0 0 CBM 347 ST R0 R0/CH2 shift character 0234D 60401C42 1 348 LD R1 PORTNUM get the port number that we chose 0234E E44A0080 1 0 CBM 349 ST R1 R0/CH0 put port number into buffer 0234F EDCA1080 0 CBM 350 STW R0/CH1 and indicate we have one character 02350 E4001C43 0 351 ST R0 COMMINBUFFW buffer for transfer 02351 60040001 0 IMM 352 LD R0 1*PPUIDMAD DMA direction from memory 02352 E4001802 0 353 ST R0 CIX(PPUSSSTAT) tell it direction 02353 60001C58 0 354 LD R0 ABSADDRESS address of buffer for transfer 02354 E4001805 0 355 ST R0 CIX(PPUADDR1) tell PPU address 02355 60040003 0 IMM 356 LD R0 3 bytes in transfer 02356 7C048000 0 IMM 357 IOR R0 1*PPUCLAST tell it last byte count 02357 E4001804 0 358 ST R0 CIX(PPUCNT1) tell PPU character count 02358 60040003 0 IMM 359 LD R0 3 02359 E4001A05 0 360 ST R0 CIX(CIASWRITE) start transfer 0235A 604400FF 1 IMM 361 LD R1 0FF delay time 0000235B 362 LOOP LABEL 0235B 60001801 0 363 LD R0 CIX(PPUINTSTAT) interrupt bits in PPU 0235C F620235F 0 364 JBT R0/PPUIBTR SUCESSFUL was there an EOP? 0235D FA66235B 1 365 JDR R1 LOOP no, keep checking 366 * \ / 0235E 00025003 367 HALT HALTB5003 CIA not responding to output 368 * --- 369 0000235F 370 SUCESSFUL LABEL 0235F D1401A01 371 STMW CIX(CIAINTACK) acknowledge interrupt 00002360 372 EXITPOINT LABEL 02360 60C01C61 3 373 LD R3 WRCHARR3 restore R3 02361 60401C60 1 374 LD R1 WRCHARR1 restore R1 02362 60001C5F 0 375 LD R0 WRCHARR0 restore R0 02363 5D001C5E 376 LEAVE WRITECHARS 377 * --- 378 +ABSADDRESS 00001C58 F 13 354 +COMMINBUFFW 00001C43 F 13 351s COMMWRITE 0000234A F 13 318j 344= EXITPOINT 00002360 F 13 332j 372= LOOP 0000235B F 13 362= 365j +OPLTYPE 00001C3E F 13 317 +PF4COMM 00001C41 F 13 346 +PORTNUM 00001C42 F 13 348 +PROG MACRO F 13 312 +PROGRAM! 0000233E F 13 306e 306= 312a +PSECT! 00000000 F 13 306e 306a 306e 306a 306= 312= 312a 312a 312e 312e SUCESSFUL 0000235F F 13 364j 370= +VARIABLES! 00001C62 F 13 306a 312e 312= +VARS MACRO F 13 306 +VPF4SSU 000013E5 F 13 327 WAIT4WRCH 00002346 F 13 328= 330j WRCHARR0 00001C5F F 13 308= 314s 375 WRCHARR1 00001C60 F 13 309= 315s 374 WRCHARR3 00001C61 F 13 310= 316s 373 +WRITECHARR 0000233E F 13 291 313= 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 42 (OPLCOMM) F 13 Off-line Communication Driver WRITECHARS 00001C5E F 13 307= 313s 376 379 END COMMWRCHAR of WRITECHAR 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 43 (OPLCOMM) F 13 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 00001C62 403 READLINES BSS 1 return address save 00001C63 404 BUFFSIZE BSS 1 passed size of the buffer 405 406 PROG 02364 DD401C62 407 READLINER ENTRNP READLINES 02365 E4401C63 1 408 ST R1 BUFFSIZE remember the size of the buffer 00002366 409 RDLRESET LABEL 02366 60440000 1 IMM 410 LD R1 0 the first is character zero 02367 EC001C59 411 STZ NUMLFTOVR discard old characters 00002368 412 NEXTCHAR LABEL 02368 DC5013F1 @ 413 CALLNP @VREADCHAR read in a character 02369 64040008 0 IMM 414 CPR R0 BS is it a backspace? 0236A FE022376 415 JEQ DOBKSP jump if so 0236B 64040018 0 IMM 416 CPR R0 CAN is it the line kill character? 0236C FE022378 417 JEQ DOLKILL jump if so 0236D 6404000D 0 IMM 418 CPR R0 CR is it the terminating CR? 0236E FE02237C 419 JEQ DOEND jump if so 0236F 6404000A 0 IMM 420 CPR R0 LF is it a terminating line feed? 02370 FE022382 421 JEQ DOENDLF terminate if so 02371 64401C63 1 422 CPR R1 BUFFSIZE beyond end of the buffer? 02372 FE062374 423 JGE MOVEUP don't store the char if so 02373 E41A8800 0 21 CACH 424 ST R0 CACH R2,0(R1) place the character in the buffer 00002374 425 MOVEUP LABEL 02374 FA602368 1 426 IRJ R1 NEXTCHAR move in the buffer and loop 02375 00025006 427 HALT HALTB5006 (never trust hardware) 428 * --- 429 430 * Process a backspace 00002376 431 DOBKSP LABEL 02376 FA662368 1 432 JDR R1 NEXTCHAR back up the character pointer 02377 FE0E2368 433 JMP NEXTCHAR it was already at 0 434 * --- 435 436 * Process a line kill 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 44 (OPLCOMM) F 13 Off-line Communication Driver 00002378 437 DOLKILL LABEL 02378 6004005C 0 IMM 438 LD R0 "\" 02379 DC5013F2 @ 439 CALLNP @VWRITECHAR 0237A DC40239D 440 CALLNP DOCRLF 0237B FE0E2366 441 JMP RDLRESET begin again 442 * --- 443 444 * Process the terminating carriage return 0000237C 445 DOEND LABEL 0237C 6004000A 0 IMM 446 LD R0 LF LF 0237D DC5013F2 @ 447 CALLNP @VWRITECHAR 0237E 6084000D 2 IMM 448 LD R2 CR return the terminating CR 0000237F 449 DOENDX LABEL 0237F 30401C63 1 450 RSB R1 BUFFSIZE calculate buffer remaining 02380 60040000 0 IMM 451 LD R0 0 return success 02381 5D001C62 452 LEAVE READLINES return 453 * --- 454 455 * Process a terminating line feed. 00002382 456 DOENDLF LABEL 02382 6004000D 0 IMM 457 LD R0 CR CR 02383 DC5013F2 @ 458 CALLNP @VWRITECHAR 02384 6084000A 2 IMM 459 LD R2 LF return the terminating line feed 02385 FE0E237F 460 JMP DOENDX 461 * --- 462 +BS 00000008 F 13 414 BUFFSIZE 00001C63 F 13 404= 408s 422 450 +CAN 00000018 F 13 416 +CR 0000000D F 13 418 448 457 DOBKSP 00002376 F 13 415j 431= +DOCRLF UUUUUUUU F 13 440 DOEND 0000237C F 13 419j 445= DOENDLF 00002382 F 13 421j 456= DOENDX 0000237F F 13 449= 460j DOLKILL 00002378 F 13 417j 437= +LF 0000000A F 13 420 446 459 MOVEUP 00002374 F 13 423j 425= NEXTCHAR 00002368 F 13 412= 426j 432j 433j +NUMLFTOVR 00001C59 F 13 411s +PROG MACRO F 13 406 +PROGRAM! 00002364 F 13 402= 402e 406a +PSECT! 00000000 F 13 402e 402e 402a 402a 402= 406e 406e 406a 406a 406= RDLRESET 00002366 F 13 409= 441j +READLINER 00002364 F 13 384 407= READLINES 00001C62 F 13 403= 407s 452 +VARIABLES! 00001C64 F 13 402a 406= 406e +VARS MACRO F 13 402 +VREADCHAR 000013F1 F 13 413 +VWRITECHAR 000013F2 F 13 439 447 458 463 END COMMRDL of READLINE 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 45 (OPLCOMM) F 13 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 00001C64 495 WRITELINES BSS 1 return address 00001C65 496 CARRCHAR BSS 1 the carriage control character 497 498 PROG 02386 DD401C64 499 WRITELINER ENTRNP WRITELINES 02387 60040020 0 IMM 500 LD R0 " " 02388 FA42238C 1 501 JEQZ R1 NOLINE jump if nothing to output 02389 60168000 0 2 CACH 502 LD R0 CACH R2,0 get the leading character 0238A 10440001 1 IMM 503 SUB R1 1 count the used character 0238B D00A9F30 2 CBM 504 INC R2/FLDCHARS move pointer over the control char 0000238C 505 NOLINE LABEL 0238C 7804007F 0 IMM 506 AND R0 07F remove the garbage bit 0238D E4001C65 0 507 ST R0 CARRCHAR save the carriage control char 0238E 64040030 0 IMM 508 CPR R0 "0" is it double space? 0238F FE0C2391 509 JNE NOTDOUBLE jump if not 02390 DC40239D 510 CALLNP DOCRLF output a CRLF first 00002391 511 NOTDOUBLE LABEL 02391 FA422397 1 512 JEQZ R1 NOCHARS jump if no characters to output 02392 984A9F30 1 2 CBM 513 ADDM R1 R2/FLDCHARS point to the last character 02393 70524000 1 1 REG 514 LDN R1 R1 00002394 515 OTPTLOOP LABEL 02394 601A8800 0 21 CACH 516 LD R0 CACH R2,0(R1) get a character 02395 DC5013F2 @ 517 CALLNP @VWRITECHAR output the character 02396 FA602394 1 518 IRJ R1 OTPTLOOP output them all 00002397 519 NOCHARS LABEL 02397 60001C65 0 520 LD R0 CARRCHAR get the carriage control character 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 46 (OPLCOMM) F 13 Off-line Communication Driver 02398 6404002A 0 IMM 521 CPR R0 "*" is it he who gets no end chars? 02399 FE02239B 522 JEQ NOENDCHAR jump if not to give 0239A DC40239D 523 CALLNP DOCRLF output the ending characters 0000239B 524 NOENDCHAR LABEL 0239B 60040000 0 IMM 525 LD R0 0 return success 0239C 5D001C64 526 LEAVE WRITELINES 527 * --- 528 529 * Output a carriage return and a line feed 530 531 VARS 00001C66 532 DOCRLFS BSS 1 return address save 533 534 PROG 0239D DD401C66 535 DOCRLF ENTRNP DOCRLFS 0239E 6004000D 0 IMM 536 LD R0 CR 0239F DC5013F2 @ 537 CALLNP @VWRITECHAR 023A0 6004000A 0 IMM 538 LD R0 LF 023A1 DC5013F2 @ 539 CALLNP @VWRITECHAR 023A2 5D001C66 540 LEAVE DOCRLFS 541 * --- 542 CARRCHAR 00001C65 F 13 496= 507s 520 +CR 0000000D F 13 536 +DOCRLF 0000239D F 13 468 510 523 535= DOCRLFS 00001C66 F 13 532= 535s 540 +LF 0000000A F 13 538 NOCHARS 00002397 F 13 512j 519= NOENDCHAR 0000239B F 13 522j 524= NOLINE 0000238C F 13 501j 505= NOTDOUBLE 00002391 F 13 509j 511= OTPTLOOP 00002394 F 13 515= 518j +PROG MACRO F 13 498 534 +PROGRAM! 0000239D F 13 494e 494= 498a 531= 531e 534a +PSECT! 00000000 F 13 494e 494a 494a 494= 494e 498a 498e 498a 498= 498e 531e 531e 531a 531= 531a 534e 534e 534a 534a 534= +VARIABLES! 00001C67 F 13 494a 498= 498e 531a 534= 534e +VARS MACRO F 13 494 531 +VWRITECHAR 000013F2 F 13 517 537 539 +WRITELINER 00002386 F 13 469 499= WRITELINES 00001C64 F 13 495= 499s 526 543 END COMMWRL of WRITELINE 544 ABSADDRESS 00001C58 F 13 20= 140s 227 354 +BS 00000008 F 13 414 +CAN 00000018 F 13 416 COMMINBUFF 02001C43 F 13 18= 284a COMMINBUFFW 00001C43 F 13 17= 94a 133a 351s COMMINIT F 13 25= 151 COMMRDCHAR F 13 154= 286 COMMRDL F 13 382= 463 COMMWRCHAR F 13 289= 379 COMMWRL F 13 466= 543 +CR 0000000D F 13 418 448 457 536 +DOCRLF 0000239D F 13 10 440 468 510 523 535= INBUFFLEN 00000050 F 13 16= 18 93 229 232 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 47 (OPLCOMM) F 13 Off-line Communication Driver +INITCIA 000022BC F 13 6 27 44= +LF 0000000A F 13 420 446 459 538 NUMLFTOVR 00001C59 F 13 21= 203 208s 272s 411s +OPLTYPE 00001C3E F 13 181 317 PF4COMM 00001C41 F 13 14= 97s 219 346 PORTNUM 00001C42 F 13 15= 96s 108 110s 122 259 348 +PROG MACRO F 13 23 42 177 312 406 498 534 +PROGRAM! 0000239D F 13 13e 13= 23a 40= 40e 42a 172= 172e 177a 306= 306e 312a 402e 402= 406a 494e 494= 498a 531= 531e 534a +PSECT! 00000000 F 13 13a 13= 13a 13e 13e 23e 23a 23a 23e 23= 40a 40e 40e 40a 40= 42e 42a 42e 42a 42= 172a 172e 172= 172a 172e 177e 177a 177= 177a 177e 306= 306a 306e 306a 306e 312e 312e 312a 312a 312= 402= 402a 402a 402e 402e 406a 406e 406e 406= 406a 494e 494a 494a 494= 494e 498a 498e 498a 498= 498e 531e 531e 531a 531= 531a 534a 534= 534a 534e 534e +READCHARR 000022FD F 13 7 156 178= +READLINER 00002364 F 13 9 384 407= TMPBUFFPTR 00001C57 F 13 19= 209s 210 246s 248 253s 254s 257s 262 264a 265s 270 273s 274 +VARIABLES! 00001C67 F 13 13a 23e 23= 40a 42= 42e 172a 177= 177e 306a 312e 312= 402a 406e 406= 494a 498= 498e 531a 534= 534e +VARS MACRO F 13 13 40 172 306 402 494 531 +VPF4SSU 000013E5 F 13 190 327 +VREADCHAR 000013F1 F 13 413 +VWRITECHAR 000013F2 F 13 277 439 447 458 517 537 539 +WRITECHARR 0000233E F 13 8 291 313= +WRITELINER 00002386 F 13 11 469 499= 545 END COMMOUTER of offline comm driver 1030 INPUT OPLDATES include the date fetcher 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 48 (OPLDATES) F 14 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 00001C67 22 DATES BSS 1 23 24 PROG 023A3 DD401C67 25 GETDATE ENTRNP DATES 023A4 60C40086 3 IMM 26 LD PFPTR PNCIX page number reserved for I/O 023A5 80920000 0 REG 27 PFRD R0 get present page map value 023A6 00D013E5 @ 28 LDPF @VPF4SSU map SSU into CIX 023A7 60801801 2 29 LD R2 CIX(SSUCLOCKU) get upper 12 bits of the clock 023A8 60401802 1 30 LD R1 CIX(SSUCLOCKL) put lower 32 bits in a safe register 023A9 00D20000 0 REG 31 LDPF R0 restore original page map value 023AA 60D24000 3 1 REG 32 LD R3 R1 need to return lower part in R3 023AB 6040032F 1 33 LD R1 IZONEWORD get the time zone info 023AC 60040000 0 IMM 34 LD R0 0 indicate all went well 023AD 5D001C67 35 LEAVE DATES 36 * --- 37 DATES 00001C67 F 14 22= 25s 35 +GETDATE 000023A3 F 14 19 25= +PROG MACRO F 14 24 +PROGRAM! 000023A3 F 14 21= 21e 24a +PSECT! 00000000 F 14 21= 21e 21a 21e 21a 24= 24a 24a 24e 24e +VARIABLES! 00001C68 F 14 21a 24e 24= +VARS MACRO F 14 21 +VPF4SSU 000013E5 F 14 28 38 END of DATE 1031 INPUT OPLFI include the fetch item routine 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 49 (OPLFI) F 15 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 023AE 00000002 30 CODETAB VFD 4:CEL,CDL,CDL,CDL,CDL,CDL,CDL,CDL 00-07 023AF 00000002 31 VFDB 4:CDL,CDL,CEL,CDL,CDL,CEL,CDL,CDL 08-0F 023B0 00000002 32 VFDB 4:CDL,CDL,CDL,CDL,CDL,CDL,CDL,CDL 10-17 023B1 00000002 33 VFDB 4:CDL,CDL,CDL,CDL,CDL,CDL,CDL,CDL 18-1F 023B2 00000002 34 VFDB 4:CBL,CSS,CDL,CDL,CSF,CDL,CSS,CDL " !"#$%&'" 023B3 00000002 35 VFDB 4:CSF,CSF,CDL,CSF,CDL,CMS,CSF,CDL "()*+,-./" 023B4 00000003 36 VFDB 4:CNM,CNM,CNM,CNM,CNM,CNM,CNM,CNM "01234567" 023B5 00000002 37 VFDB 4:CNM,CNM,CSF,CDL,CDL,CDL,CDL,CDL "89: <=>?" 023B6 00000001 38 VFDB 4:CDL,CAL,CAL,CAL,CAL,CAL,CAL,CAL "@ABCDEFG" 023B7 00000001 39 VFDB 4:CAL,CAL,CAL,CAL,CAL,CAL,CAL,CAL "HIJKLMNO" 023B8 00000001 40 VFDB 4:CAL,CAL,CAL,CAL,CAL,CAL,CAL,CAL "PQRSTUVW" 023B9 00000006 41 VFDB 4:CAL,CAL,CAL,CDL,CDL,CDL,CDL,CSS "XYZ[\]^_" 023BA 00000001 42 VFDB 4:CDL,CAL,CAL,CAL,CAL,CAL,CAL,CAL "`abcdefg" 023BB 00000001 43 VFDB 4:CAL,CAL,CAL,CAL,CAL,CAL,CAL,CAL "hijklmno" 023BC 00000001 44 VFDB 4:CAL,CAL,CAL,CAL,CAL,CAL,CAL,CAL "pqrstuvw" 023BD 00000002 45 VFDB 4:CAL,CAL,CAL,CDL,CDL,CDL,CDL,CDL "xyz{|}~ " 023BE 010823AE 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 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 50 (OPLFI) F 15 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 00001C68 75 FISIGN BSS 1 sign of the packed number 00001C69 76 FIRADIX BSS 1 radix of the number being packed 00001C6A 77 FISTART BSS 1 one less that first char addr 00001C6B 78 FETCHITEMS BSS 1 return address save 79 80 PROG 023BF DD401C6B 81 FTCHITEMHR ENTRNP FETCHITEMS 023C0 60840010 2 IMM 82 LD R2 16 default radix is hex 023C1 FE0E23C4 83 JMP FISHARE 84 * --- 85 023C2 DD401C6B 86 FETCHITEMR ENTRNP FETCHITEMS 023C3 6084000A 2 IMM 87 LD R2 10 default radix is decimal 000023C4 88 FISHARE LABEL 023C4 E4801C69 2 89 ST R2 FIRADIX 023C5 62840000 23 IMM 90 LD2 R2 0 initial value 023C6 D04B1F30 4 CBM 91 DEC R4/FLDCHARS undo the effect of GETCHAR 000023C7 92 FISK LABEL 023C7 E5001C6A 4 93 ST R4 FISTART save starting location 023C8 DC402420 94 CALLNP GETCHAR get the first char 023C9 5CA223CA 1 95 LDPC FIJTI(R1) operate on the first char 96 * --- 97 000023CA 98 FIJTI LABEL jump table for the initial char 023CA 000023D2 99 VFD ADR FICR 0 - end-of-line 023CB 000023D6 100 VFD ADR FIPN 1 - alpha 023CC 000023C7 101 VFD ADR FISK 2 - delimiter 023CD 000023D6 102 VFD ADR FIPN 3 - number 023CE 000023C7 103 VFD ADR FISK 4 - blank 023CF 000023D4 104 VFD ADR FIMS 5 - minus 023D0 0000241E 105 VFD ADR FI90 6 - symbol special char 023D1 0000241E 106 VFD ADR FI90 7 - filename punctuation 107 * --- 108 000023D2 109 FICR LABEL end-of-line 023D2 60440008 1 IMM 110 LD R1 1*TEOL 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 51 (OPLFI) F 15 Input Preparation Routine 023D3 FE0E241D 111 JMP FIEX 112 * --- 113 000023D4 114 FIMS LABEL leading minus sign 023D4 D1401C68 115 STMW FISIGN the sign is now minus 023D5 FE0E23E4 116 JMP FICNX pack the number 117 * --- 118 000023D6 119 FIPN LABEL pack a number 023D6 64040030 0 IMM 120 CPR R0 "0" leading zero? 023D7 FE0C23DB 121 JNE NOTHEX 023D8 60040010 0 IMM 122 LD R0 16 assume hex radix if so 023D9 E4001C69 0 123 ST R0 FIRADIX 023DA 60040030 0 IMM 124 LD R0 "0" restore R0 000023DB 125 NOTHEX LABEL 023DB EDC01C68 126 STW FISIGN implicit plus 000023DC 127 FICN LABEL 023DC 10040030 0 IMM 128 SUB R0 NUMBIAS remove the ASCII stuff 023DD 64040009 0 IMM 129 CPR R0 9 is it a digit? 023DE FE0A23E0 130 JLE DIGITOK jump if yes 023DF 10040007 0 IMM 131 SUB R0 LETTERNUM else adjust it 000023E0 132 DIGITOK LABEL 023E0 64001C69 0 133 CPR R0 FIRADIX is the digit within? 023E1 FE0623F1 134 JGE FIPA if not, try to pack as symbol 023E2 1C801C69 2 135 MUL R2 FIRADIX enlarge the number 023E3 18920000 2 0 REG 136 ADD R2 R0 add in the new digit 000023E4 137 FICNX LABEL 023E4 DC402420 138 CALLNP GETCHAR 023E5 5CA223E6 1 139 LDPC FIJTN(R1) state is in a number 140 * --- 141 000023E6 142 FIJTN LABEL jump table for number packing 023E6 000023EE 143 VFD ADR FIEN 0 - end-of-line 023E7 000023DC 144 VFD ADR FICN 1 - alpha 023E8 000023EE 145 VFD ADR FIEN 2 - delimiter 023E9 000023DC 146 VFD ADR FICN 3 - number 023EA 000023EE 147 VFD ADR FIEN 4 - blank 023EB 0000241E 148 VFD ADR FI90 5 - minus sign 023EC 000023F1 149 VFD ADR FIPA 6 - symbol special char 023ED 000023EE 150 VFD ADR FIEN 7 - filename punctuation 151 * --- 152 000023EE 153 FIEN LABEL end of number 023EE 1C801C68 2 154 MUL R2 FISIGN place the sign in the value 023EF 60440001 1 IMM 155 LD R1 1*TNUM the item type code 023F0 FE0E241D 156 JMP FIEX exit this routine 157 * --- 158 000023F1 159 FIPA LABEL process alpha 023F1 6044000D 1 IMM 160 LD R1 13 number of chars in symbol 023F2 E4401C68 1 161 ST R1 FISIGN 023F3 62840000 23 IMM 162 LD2 R2 0 set initial value to zero 023F4 61001C6A 4 163 LD R4 FISTART restore beginning pointer 000023F5 164 FICAX LABEL 023F5 DC402420 165 CALLNP GETCHAR get the next char 023F6 5CA223F7 1 166 LDPC FIJTP(R1) state is in symbol 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 52 (OPLFI) F 15 Input Preparation Routine 167 * --- 168 000023F7 169 FIJTP LABEL pack a symbol 023F7 00002417 170 VFD ADR FIPF 0 - end-of-line 023F8 000023FF 171 VFD ADR FICA 1 - alpha 023F9 00002417 172 VFD ADR FIPF 2 - delimiter 023FA 000023FF 173 VFD ADR FICA 3 - number 023FB 00002417 174 VFD ADR FIPF 4 - blank 023FC 00002417 175 VFD ADR FIPF 5 - minus sign 023FD 000023FF 176 VFD ADR FICA 6 - special symbol char 023FE 00002417 177 VFD ADR FIPF 7 - filename puctuation 178 * --- 179 000023FF 180 FICA LABEL 023FF D0401C68 181 DEC FISIGN count the character 02400 FE0823F5 182 JLT FICAX jump if 12 packed already 00002401 183 FICAY LABEL 02401 60401C68 1 184 LD R1 FISIGN get the current char count 02402 64440006 1 IMM 185 CPR R1 6 past the middle? 02403 FE0A2407 186 JLE FIPK2 if so, pack the other half 02404 1C840028 2 IMM 187 MUL R2 40 move up the previous sym 02405 18B02416 2 0 @ 188 ADD R2 @RADCODEP(R0) add in the new symbol 02406 FE0E23F5 189 JMP FICAX 190 * --- 191 00002407 192 FIPK2 LABEL 02407 1CC40028 3 IMM 193 MUL R3 40 02408 18F02416 3 0 @ 194 ADD R3 @RADCODEP(R0) 02409 FE0E23F5 195 JMP FICAX 196 * --- 197 0240A 00000000 198 RADCODET VFD 6:00,37,00,00,00,00,38,00 " !"#$%&'" 0240C 00000000 199 VFDB 6:00,00,00,00,00,00,00,00 "()*+,-./" 0240D 00000008 200 VFDB 6:01,02,03,04,05,06,07,08 "01234567" 0240F 00000000 201 VFDB 6:09,10,00,00,00,00,00,00 "89: <=>?" 02410 00000011 202 VFDB 6:00,11,12,13,14,15,16,17 "@ABCDEFG" 02412 00000019 203 VFDB 6:18,19,20,21,22,23,24,25 "HIJKLMNO" 02413 00000021 204 VFDB 6:26,27,28,29,30,31,32,33 "PQRSTUVW" 02415 00000027 205 VFDB 6:34,35,36,00,00,00,00,39 "XYZ[\]^_" 02416 01882404 206 RADCODEP PTR RADCODET(-020) 207 00002417 208 FIPF LABEL blank filling symbol 02417 D0401C68 209 DEC FISIGN count the fill char 02418 FE0A241C 210 JLE FIEA if all filled, exit 02419 60040020 0 IMM 211 LD R0 " " assume a space 0241A D04B1F30 4 CBM 212 DEC R4/FLDCHARS undo the effects of GETCHAR 0241B FE0E2401 213 JMP FICAY 214 * --- 215 0000241C 216 FIEA LABEL end of symbol packing 0241C 60440002 1 IMM 217 LD R1 1*TALPH code for symbol 218 * \ / 219 0000241D 220 FIEX LABEL exit for routine 0241D 5D001C6B 221 LEAVE FETCHITEMS 222 * --- 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 53 (OPLFI) F 15 Input Preparation Routine 223 0000241E 224 FI90 LABEL very error 0241E 60440000 1 IMM 225 LD R1 1*TERR 0241F FE0E241D 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 00001C6C 244 GETCHARS BSS 1 return address save 245 246 PROG 02420 DD401C6C 247 GETCHAR ENTRNP GETCHARS 02421 D00B1F30 4 CBM 248 INC R4/FLDCHARS advance character pointer 02422 60170000 0 4 CACH 249 LD R0 CACH R4,0 get the char 02423 7804007F 0 IMM 250 AND R0 GASMASK remove the parity bit 02424 64040061 0 IMM 251 CPR R0 LOWCASE a lower case char? 02425 FE082429 252 JLT GC30 jump if not 02426 6404007A 0 IMM 253 CPR R0 LOWTOP out of the lower range? 02427 FE042429 254 JGT GC30 if so, don't upperfy 02428 10040020 0 IMM 255 SUB R0 LOWBIAS convert to upper case 00002429 256 GC30 LABEL 02429 607023BE 1 0 @ 257 LD R1 @CODES(R0) get the char group code 0242A 5D001C6C 258 LEAVE GETCHARS 259 * --- 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 54 (OPLFI) F 15 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 00001C6D 282 FETCHFNMRS BSS 1 return address save 00001C6E 283 FETCHFNMRE BSS 1 save for default extension 284 285 PROG 0242B DD401C6D 286 FETCHFNMR ENTRNP FETCHFNMRS 0242C E4C01C6E 3 287 ST R3 FETCHFNMRE save the default extension 0242D 60934000 2 5 REG 288 LD R2 R5 0242E 6044003C 1 IMM 289 LD R1 15*CPW 0242F DA800800 2 1 290 FILLI R2 R1 000 initialize block to empty 02430 D1574802 5 BASE 291 STMW R5,EQSYSTEM 02431 D1574807 5 BASE 292 STMW R5,EQACCTPROJ 02432 D157480C 5 BASE 293 STMW R5,EQFILEEXT 02433 D04B1F30 4 CBM 294 DEC R4/FLDCHARS undo the effect of GETCHAR 00002434 295 FFNMSK LABEL skip leading chars 02434 DC402420 296 CALLNP GETCHAR 02435 5CA22436 1 297 LDPC FFNMJTI(R1) 298 * --- 299 00002436 300 FFNMJTI LABEL initial character skip 02436 0000243F 301 VFD ADR FFNMNONE 0 - end of line 02437 00002440 302 VFD ADR FFNMPK 1 - alpha 02438 00002434 303 VFD ADR FFNMSK 2 - delimiter 02439 0000243E 304 VFD ADR FFNM90 3 - number 0243A 00002434 305 VFD ADR FFNMSK 4 - blank 0243B 00002434 306 VFD ADR FFNMSK 5 - minus sign 0243C 0000243E 307 VFD ADR FFNM90 6 - special symbol char 0243D 00002440 308 VFD ADR FFNMPK 7 - filename punctuation 309 0000243E 310 FFNM90 LABEL bad punctuation 0243E 6007FFFF 0 IMM 311 LD R0 -1 0000243F 312 FFNMNONE LABEL 0243F 5D001C6D 313 LEAVE FETCHFNMRS 314 * --- 315 00002440 316 FFNMPK LABEL found filename, pack it 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 55 (OPLFI) F 15 Input Preparation Routine 02440 DC4024CF 317 CALLNP PACKITEM get the first name part 02441 FE0E243E 318 JMP FFNM90 jump if error 02442 64840029 2 IMM 319 CPR R2 PCCOLON was the terminator a colon? 02443 FE0C2448 320 JNE FFNMPKED if not, the name is packed 02444 DC402506 321 CALLNP PACKITEMI pack the next part 02445 FE0E243E 322 JMP FFNM90 error 02446 64840029 2 IMM 323 CPR R2 PCCOLON was this term a colon? 02447 FE02243E 324 JEQ FFNM90 error if he tried 3 parts 00002448 325 FFNMPKED LABEL 02448 6017480C 0 5 BASE 326 LD R0 R5,EQFILEEXT get filename extension 02449 FA2E244C 0 327 JNEMW R0 FFNMNOEXT jump if no default extension 0244A 60C01C6E 3 328 LD R3 FETCHFNMRE get the default extension 0244B E4D7480C 3 5 BASE 329 ST R3 R5,EQFILEEXT default the extension 0000244C 330 FFNMNOEXT LABEL 0244C DC40246C 331 CALLNP FIXEXTEN clean up the extensions 0244D 60040000 0 IMM 332 LD R0 0 good return code 0244E 5D001C6D 333 LEAVE FETCHFNMRS 334 * --- 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 56 (OPLFI) F 15 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 00001C6F 352 SCANOVERRS BSS 1 return address save 353 354 PROG 0244F DD401C6F 355 SCANOVERR ENTRNP SCANOVERRS 02450 D04B1F30 4 CBM 356 DEC R4/FLDCHARS undo the effects of GETCHAR 00002451 357 SOSK LABEL 02451 DC402420 358 CALLNP GETCHAR 02452 5CA22453 1 359 LDPC SOJTI(R1) operate on its type 360 * --- 361 00002453 362 SOJTI LABEL 02453 0000245B 363 VFD ADR SOEX 0 - end of line 02454 0000245B 364 VFD ADR SOEX 1 - alpha 02455 00002451 365 VFD ADR SOSK 2 - delimiter 02456 0000245B 366 VFD ADR SOEX 3 - number 02457 00002451 367 VFD ADR SOSK 4 - blank 02458 0000245B 368 VFD ADR SOEX 5 - minus sign 02459 0000245B 369 VFD ADR SOEX 6 - special symbol character 0245A 0000245B 370 VFD ADR SOEX 7 - filename punctuation 371 0000245B 372 SOEX LABEL exit pointing ar the item 0245B 5D001C6F 373 LEAVE SCANOVERRS 374 * --- 375 CAL 00000001 F 15 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 15 25= 34x CDL 00000002 F 15 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 15 21= 30x 31x 31x CMS 00000005 F 15 26= 35x CNM 00000003 F 15 24= 36x 36x 36x 36x 36x 36x 36x 36x 37x 37x CODES 000023BE F 15 46= 257 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 57 (OPLFI) F 15 Input Preparation Routine CODETAB 010023AE F 15 30= 46a CSF 00000007 F 15 28= 34x 35x 35x 35x 35x 37x CSS 00000006 F 15 27= 34x 34x 41x DIGITOK 000023E0 F 15 130j 132= +EQACCTPROJ UUUUUUUU F 15 292s +EQFILEEXT UUUUUUUU F 15 293s 326 329s +EQSYSTEM UUUUUUUU F 15 291s +FETCHFNMR 0000242B F 15 6 286= FETCHFNMRE 00001C6E F 15 283= 287s 328 FETCHFNMRS 00001C6D F 15 282= 286s 313 333 +FETCHITEMR 000023C2 F 15 7 86= FETCHITEMS 00001C6B F 15 78= 81s 86s 221 FFNM90 0000243E F 15 304a 307a 310= 318j 322j 324j FFNMJTI 00002436 F 15 297 300= FFNMNOEXT 0000244C F 15 327j 330= FFNMNONE 0000243F F 15 301a 312= FFNMPK 00002440 F 15 302a 308a 316= FFNMPKED 00002448 F 15 320j 325= FFNMSK 00002434 F 15 295= 303a 305a 306a FI90 0000241E F 15 105a 106a 148a 224= FICA 000023FF F 15 171a 173a 176a 180= FICAX 000023F5 F 15 164= 182j 189j 195j FICAY 00002401 F 15 183= 213j FICN 000023DC F 15 127= 144a 146a FICNX 000023E4 F 15 116j 137= FICR 000023D2 F 15 99a 109= FIEA 0000241C F 15 210j 216= FIEN 000023EE F 15 143a 145a 147a 150a 153= FIEX 0000241D F 15 111j 156j 220= 226j FIJTI 000023CA F 15 95 98= FIJTN 000023E6 F 15 139 142= FIJTP 000023F7 F 15 166 169= FIMS 000023D4 F 15 104a 114= FIPA 000023F1 F 15 134j 149a 159= FIPF 00002417 F 15 170a 172a 174a 175a 177a 208= FIPK2 00002407 F 15 186j 192= FIPN 000023D6 F 15 100a 102a 119= FIRADIX 00001C69 F 15 76= 89s 123s 133 135 FISHARE 000023C4 F 15 83j 88= FISIGN 00001C68 F 15 75= 115s 126s 154 161s 181s 184 209s FISK 000023C7 F 15 92= 101a 103a FISTART 00001C6A F 15 77= 93s 163 +FIXEXTEN UUUUUUUU F 15 331 +FTCHITEMHR 000023BF F 15 8 81= GASMASK 0000007F F 15 53= 250 GC30 00002429 F 15 252j 254j 256= GETCHAR 00002420 F 15 94 138 165 247= 296 358 GETCHARS 00001C6C F 15 244= 247s 258 LETTERNUM 00000007 F 15 52= 131 LOWBIAS 00000020 F 15 50= 255 LOWCASE 00000061 F 15 48= 251 LOWTOP 0000007A F 15 49= 253 NOTHEX 000023DB F 15 121j 125= NUMBIAS 00000030 F 15 51= 128 +PACKITEM UUUUUUUU F 15 317 +PACKITEMI UUUUUUUU F 15 321 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 58 (OPLFI) F 15 Input Preparation Routine +PCCOLON UUUUUUUU F 15 319 323 +PROG MACRO F 15 80 246 285 354 +PROGRAM! 0000244F F 15 74e 74= 80a 243= 243e 246a 281e 281= 285a 351e 351= 354a +PSECT! 00000000 F 15 74= 74a 74a 74e 74e 80= 80e 80a 80e 80a 243e 243e 243a 243a 243= 246e 246e 246a 246a 246= 281= 281a 281e 281e 281a 285a 285= 285e 285e 285a 351a 351= 351e 351e 351a 354a 354e 354a 354= 354e RADCODEP 00002416 F 15 188 194 206= RADCODET 0180240A F 15 198= 206a +SCANOVERR 0000244F F 15 9 355= SCANOVERRS 00001C6F F 15 352= 355s 373 SOEX 0000245B F 15 363a 364a 366a 368a 369a 370a 372= SOJTI 00002453 F 15 359 362= SOSK 00002451 F 15 357= 365a 367a +TALPH 00003C10 F 15 217 +TEOL 00003810 F 15 110 +TERR 00000000 F 15 225 +TNUM 00003E10 F 15 155 +VARIABLES! 00001C70 F 15 74a 80= 80e 243a 246e 246= 281a 285= 285e 351a 354= 354e +VARS MACRO F 15 74 243 281 351 376 END of PREPIN 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 59 (OPLFI) F 15 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 0000245C 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 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 60 (OPLFI) F 15 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 0245C B6740200 436 DOTSYS PAK6 SYS System owner's project 0245D 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 00001C70 451 SFTUPS BSS 1 return address save 452 453 PROG 0245E DD401C70 454 SFTUPPKTMP ENTRNP SFTUPS 0245F 6217480A 015 BASE 455 LD2 R0 EQT,EQFILENM 02460 E2174805 015 BASE 456 EXCH2 R0 EQT,EQACCT 02461 E6174800 015 BASE 457 ST2 R0 EQT,EQVOLUME 02462 6017480C 0 5 BASE 458 LD R0 EQT,EQFILEEXT 02463 E0174807 0 5 BASE 459 EXCH R0 EQT,EQACCTPROJ 02464 E4174802 0 5 BASE 460 ST R0 EQT,EQSYSTEM 02465 6217480D 015 BASE 461 LD2 R0 EQT,EQFILEPW 02466 E2174808 015 BASE 462 EXCH2 R0 EQT,EQACCTPW 02467 E6174803 015 BASE 463 ST2 R0 EQT,EQVOLPW 02468 EE17480A 5 BASE 464 STZ2 EQT,EQFILENM 02469 EE17480D 5 BASE 465 STZ2 EQT,EQFILEPW 0246A D157480C 5 BASE 466 STMW EQT,EQFILEEXT 0246B 5D001C70 467 LEAVE SFTUPS 468 * --- 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 61 (OPLFI) F 15 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 00001C71 487 FIXEXTENS BSS 1 return address save 488 489 PROG 0246C DD401C71 490 FIXEXTEN ENTRNP FIXEXTENS 0246D 60174802 0 5 BASE 491 LD R0 EQT,EQSYSTEM check the system name 0246E FA2E2470 0 492 JNEMW R0 FIXEXTEN1 jump if it has been specified 0246F EC174802 5 BASE 493 STZ EQT,EQSYSTEM otherwise, set it null 00002470 494 FIXEXTEN1 LABEL 02470 60174807 0 5 BASE 495 LD R0 EQT,EQACCTPROJ check the project 02471 FA2E2473 0 496 JNEMW R0 FIXEXTEN2 jump if it has been specified 02472 EC174807 5 BASE 497 STZ EQT,EQACCTPROJ otherwise, set it null 00002473 498 FIXEXTEN2 LABEL 02473 6017480C 0 5 BASE 499 LD R0 EQT,EQFILEEXT get the file extension 02474 FA2E2476 0 500 JNEMW R0 FIXEXTEN3 jump if it has been specified 02475 EC17480C 5 BASE 501 STZ EQT,EQFILEEXT otherwise, set it to null 00002476 502 FIXEXTEN3 LABEL 02476 5D001C71 503 LEAVE FIXEXTENS return 504 * --- 505 506 507 VARS 00001C72 508 GETCHARS BSS 1 return address save 509 510 PROG 02477 DD401C72 511 GETCHAR ENTRNP GETCHARS 02478 60970000 2 4 CACH 512 LD R2 CACH R4,0 get the character 02479 60B42495 2 2 @ 513 LD R2 CONVTAB(R2) get the code for the character 0247A 64840028 2 IMM 514 CPR R2 PCDOT compare with the first terminator 0247B D80BDA20 7 CBM 515 STPSR R7/BITS 13:14 return compare result to caller 0247C 5D001C72 516 LEAVE GETCHARS 517 * --- 518 519 * conversion table - converts 7 bit ASCII to multiply pack code 0000247D 520 CONVT LABEL 0247D 00000032 521 VFD 6:PCO,PCO,PCO,PCO,PCO,PCO,PCO,PCO NUL-BEL 0247F 00000032 522 VFDB 6:PCO,PCDELIM,PCO,PCO,PCO,PCO,PCO,PCO BS-SI 02480 00000032 523 VFDB 6:PCO,PCO,PCO,PCO,PCO,PCO,PCO,PCO DLE-ETB 02482 00000032 524 VFDB 6:PCO,PCO,PCO,PCO,PCO,PCO,PCO,PCO CAN-US 02483 00000032 525 VFDB 6:PCDELIM,37,PCO,PCO,PCDOLLAR,PCO,38,PCO !"#$%&' 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 62 (OPLFI) F 15 String Parameter Packers 02484 0000002D 526 VFDB 6:PCLPAREN,PCRPAREN,PCO,PCPLUS ()*+ 02485 0000002C 527 VFDB 6:PCDELIM,PCO,PCDOT,PCSLASH ,-./ 02486 00000008 528 VFDB 6:1,2,3,4,5,6,7,8 01234567 02488 00000032 529 VFDB 6:9,10,PCCOLON,PCO,PCO,PCO,PCO,PCO 89: <=>? 02489 00000011 530 VFDB 6:PCO,11,12,13,14,15,16,17 @ABCDEFG 0248B 00000019 531 VFDB 6:18,19,20,21,22,23,24,25 HIJKLMNO 0248C 00000021 532 VFDB 6:26,27,28,29,30,31,32,33 PQRSTUVW 0248E 00000027 533 VFDB 6:34,35,36,PCLSQUAR,PCO,PCRSQUAR,PCO,39 XYZ[\]^_ 0248F 00000011 534 VFDB 6:PCO,11,12,13,14,15,16,17 `abcdefg 02491 00000019 535 VFDB 6:18,19,20,21,22,23,24,25 hijklmno 02492 00000021 536 VFDB 6:26,27,28,29,30,31,32,33 pqrstuvw 02494 00000032 537 VFDB 6:34,35,36,PCO,PCO,PCO,PCO,PCO xyz{|}~ 538 BSS 0 539 02495 0188247D 540 CONVTP PTR CONVT/BITS 0:5 00102495 @ 541 CONVTAB EQU @CONVTP 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 63 (OPLFI) F 15 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 00001C73 563 PACKNAMET BSS 1 temp 00001C74 564 PACKNAMES BSS 1 return address save 565 566 PROG 02496 DD401C74 567 PACKNAME ENTRNP PACKNAMES 02497 62040000 01 IMM 568 LD2 R0 0 embryo number or name 02498 DC402477 569 CALLNP GETCHAR get the first char 02499 FE0624AB 570 JGE NULLITEM term already - null name 0249A 6484000B 2 IMM 571 CPR R2 PCAAA could this be a number? 0249B FE0824AE 572 JLT PACKNUM jump if number to pack 0249C 64840024 2 IMM 573 CPR R2 PCZZZ 0249D FE0A24A0 574 JLE PACKLOOP jump if acceptable first char 0249E 6004008F 0 IMM 575 LD R0 XREQERBFN error = bad first character 0249F 5D001C74 576 LEAVE PACKNAMES 577 * --- 578 579 * Name packing loop 000024A0 580 PACKLOOP LABEL 024A0 DC4024C0 581 CALLNP PACKEXTP pack up 6 characters 024A1 E4001C73 0 582 ST R0 PACKNAMET save the packed word 024A2 DC4024C0 583 CALLNP PACKEXTP pack up another 6 characters 024A3 60520000 1 0 REG 584 LD R1 R0 move the second 6 024A4 60001C73 0 585 LD R0 PACKNAMET retrieve the first 6 586 * \ / 587 588 * Ignore characters after the end of the filename -- search for term 024A5 60C40001 3 IMM 589 LD R3 1 symbol packed 000024A6 590 IGNORXTRA LABEL 024A6 DC402477 591 CALLNP GETCHAR 024A7 FE0624BE 592 JGE PACKEXIT search for term 024A8 D00B1F30 4 CBM 593 INC R4/FLDCHARS move to next char 024A9 FB3024BC 4 594 JZA R4 TOOLONG check for wrap around 024AA FE0E24A6 595 JMP IGNORXTRA 596 * --- 597 598 * terminator first found - return nothing 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 64 (OPLFI) F 15 String Parameter Packers 599 000024AB 600 NULLITEM LABEL 024AB 62040000 01 IMM 601 LD2 R0 0 item is not here 024AC 60C40000 3 IMM 602 LD R3 0 type is 'nothing' 024AD FE0E24BE 603 JMP PACKEXIT return 604 * --- 605 606 * Number to pack 000024AE 607 PACKNUM LABEL 024AE 60C4000A 3 IMM 608 LD R3 10 default radix... 024AF 64840001 2 IMM 609 CPR R2 1 ...unless first char... 024B0 FE0C24B2 610 JNE PACKDIG 024B1 60C40010 3 IMM 611 LD R3 16 ...is a zero 000024B2 612 PACKDIG LABEL 024B2 1E12C000 013 REG 613 MUL2 R0 R3 024B3 10840001 2 IMM 614 SUB R2 1 024B4 1A128000 012 REG 615 ADD2 R0 R2 merge in new digit 024B5 D00B1F30 4 CBM 616 INC R4/FLDCHARS move over packed char 024B6 DC402477 617 CALLNP GETCHAR get the next char 024B7 FE0624BA 618 JGE PACKDONE jump if OK pack 024B8 6492C000 2 3 REG 619 CPR R2 R3 is char within radix? 024B9 FE0A24B2 620 JLE PACKDIG jump if so -- pack it in 000024BA 621 PACKDONE LABEL 024BA 60C40002 3 IMM 622 LD R3 2 indicate that a number was packed 024BB FE0E24BE 623 JMP PACKEXIT we're done 624 * --- 625 626 * Error -- memory wrapped around when ignoring trailer chars 000024BC 627 TOOLONG LABEL 024BC 6004008F 0 IMM 628 LD R0 XREQERBFN error=gross FUBAR 024BD 5D001C74 629 LEAVE PACKNAMES 630 * --- 631 632 * Normal exit -- make a return two 000024BE 633 PACKEXIT LABEL 024BE 19C40001 7 IMM 634 ADD R7 1 make a skip return 024BF 5D001C74 635 LEAVE PACKNAMES 636 * --- 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 65 (OPLFI) F 15 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 00001C75 654 PACKEXTPS BSS 1 return address save 655 656 PROG 024C0 DD401C75 657 PACKEXTP ENTRNP PACKEXTPS 024C1 60040000 0 IMM 658 LD R0 0 024C2 60C7FFFA 3 IMM 659 LD R3 -6 chars to pack 000024C3 660 PKEXTLOOP LABEL 024C3 DC402477 661 CALLNP GETCHAR get a char 024C4 FE0624C7 662 JGE PKEXTFILL jump if term -- pad spaces 024C5 D00B1F30 4 CBM 663 INC R4/FLDCHARS move pntr past good char 024C6 FE0E24C8 664 JMP PKEXTOK 665 * --- 666 000024C7 667 PKEXTFILL LABEL 024C7 60840000 2 IMM 668 LD R2 PCSPACE pad with spaces 000024C8 669 PKEXTOK LABEL 670 * note that carry is cleared on entry 671 * and nothing will set it (ADD or INC) 024C8 58C40010 IMM 672 IORPSR PSRMODIF turn on unsigned arithmetic 024C9 1C040028 0 IMM 673 MUL R0 PCRAD pack up by radix base 024CA 18528000 1 2 REG 674 ADD R1 R2 merge in new char 675 * use MODIF in case this char makes result negative 024CB 58840010 IMM 676 CLBPSR PSRMODIF restore normal arithmetic 024CC 60124000 0 1 REG 677 LD R0 R1 get right half of product 024CD FAE024C3 3 678 IRJ R3 PKEXTLOOP loop until 6 packed 024CE 5D001C75 679 LEAVE PACKEXTPS 680 * --- 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 66 (OPLFI) F 15 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 00001C76 729 PACKITEMS BSS 1 return address save 730 731 PROG 024CF DD401C76 732 PACKITEM ENTRNP PACKITEMS 000024D0 733 PKITMSHAR LABEL 024D0 DC40245E 734 CALLNP SFTUPPKTMP shift up the last packing 024D1 DC402496 735 CALLNP PACKNAME get the first part 024D2 FE0E2501 736 JMP PKITMERR jump if not good 024D3 E617480A 015 BASE 737 ST2 R0 EQT,EQFILENM store packed name 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 67 (OPLFI) F 15 String Parameter Packers 024D4 64840028 2 IMM 738 CPR R2 PCDOT a dot extension? 024D5 FE0224E6 739 JEQ PIDOTEXT jump if so 024D6 6484002D 2 IMM 740 CPR R2 PCPLUS system extension? 024D7 FE0224EE 741 JEQ PIPLUSEXT 024D8 6484002E 2 IMM 742 CPR R2 PCDOLLAR project relative extension? 024D9 FE0224F2 743 JEQ PIDOLEXT 744 * \ / 745 746 * try to pack the password -- check for the leading paren. 000024DA 747 PITRYPW LABEL 024DA 6484002A 2 IMM 748 CPR R2 PCLPAREN maybe password then? 024DB FE0C24E4 749 JNE PIOKEXIT jump if not 024DC D00B1F30 4 CBM 750 INC R4/FLDCHARS move to next good char 024DD DC402496 751 CALLNP PACKNAME get the password 024DE FE0E2501 752 JMP PKITMERR jump if it didn't work 024DF E617480D 015 BASE 753 ST2 R0 EQT,EQFILEPW store the password 024E0 6484002B 2 IMM 754 CPR R2 PCRPAREN proper term paren? 024E1 FE0C2502 755 JNE PKITMPWER jump if bad format 024E2 D00B1F30 4 CBM 756 INC R4/FLDCHARS move over that term 024E3 DC402477 757 CALLNP GETCHAR get the char after 000024E4 758 PIOKEXIT LABEL 024E4 19C40001 7 IMM 759 ADD R7 1 success does a skip return 024E5 5D001C76 760 LEAVE PACKITEMS 761 * --- 762 763 ********************************************************************************** 764 * * 765 * A dot followed the main name item. Pack the extension * 766 * thereafter. * 767 * * 768 ********************************************************************************** 769 000024E6 770 PIDOTEXT LABEL 024E6 D00B1F30 4 CBM 771 INC R4/FLDCHARS move past the dot 024E7 DC4024C0 772 CALLNP PACKEXTP get the extension 024E8 E417480C 0 5 BASE 773 ST R0 EQT,EQFILEEXT store the packed extension 000024E9 774 IGNORXEXT LABEL 024E9 DC402477 775 CALLNP GETCHAR get the term char 024EA FE0624DA 776 JGE PITRYPW if term try for the password 024EB D00B1F30 4 CBM 777 INC R4/FLDCHARS move off the non-term 024EC FB302504 4 778 JZA R4 PKITMWRAP jump if memory wrap around 024ED FE0E24E9 779 JMP IGNORXEXT loop til terminator 780 * --- 781 782 ********************************************************************************** 783 * * 784 * Plus sign extension. Assume ".!!!:" * 785 * * 786 ********************************************************************************** 787 000024EE 788 PIPLUSEXT LABEL 024EE 6000245D 0 789 LD R0 DOTBTI ".!!!" 000024EF 790 PISTOREXT LABEL 024EF E417480C 0 5 BASE 791 ST R0 EQT,EQFILEEXT use this as our extension 024F0 60840029 2 IMM 792 LD R2 PCCOLON fake like terminator was colon 024F1 FE0E24E4 793 JMP PIOKEXIT 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 68 (OPLFI) F 15 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 000024F2 803 PIDOLEXT LABEL 024F2 60040000 0 IMM 804 LD R0 0 one dollar sez own 024F3 60530000 1 4 REG 805 LD R1 R4 save pointer to this terminator 024F4 D00B1F30 4 CBM 806 INC R4/FLDCHARS move to next char 024F5 DC402477 807 CALLNP GETCHAR get it 024F6 6484002E 2 IMM 808 CPR R2 PCDOLLAR is it also a dollar sign? 024F7 FE0C24FF 809 JNE PIDOLBKUP no -- go back to the last char 024F8 60530000 1 4 REG 810 LD R1 R4 save the position of this dollar 024F9 D00B1F30 4 CBM 811 INC R4/FLDCHARS try the char after 024FA DC402477 812 CALLNP GETCHAR 024FB 6484002E 2 IMM 813 CPR R2 PCDOLLAR a third dollar sign? 024FC FE0C24FF 814 JNE PIDOLBKUP no -- back up to the last 024FD 6000245C 0 815 LD R0 DOTSYS three dollar sez public 024FE FE0E24EF 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 000024FF 826 PIDOLBKUP LABEL 024FF E4530000 1 4 REG 827 ST R1 R4 back up 02500 FE0E24EF 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 00002501 837 PKITMERR LABEL 02501 5D001C76 838 LEAVE PACKITEMS return one 839 * --- 840 841 * Password does not have the terminating paren. 00002502 842 PKITMPWER LABEL 02502 6004008F 0 IMM 843 LD R0 XREQERBFN the code for the error 02503 FE0E2501 844 JMP PKITMERR 845 * --- 846 847 * When searching for end of symbol memory wrapped around 00002504 848 PKITMWRAP LABEL 02504 6004008F 0 IMM 849 LD R0 XREQERBFN the code for wrapping around 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 69 (OPLFI) F 15 String Parameter Packers 02505 FE0E2501 850 JMP PKITMERR 851 * --- 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 70 (OPLFI) F 15 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 02506 DD401C76 861 PACKITEMI ENTRNP PACKITEMS 02507 D00B1F30 4 CBM 862 INC R4/FLDCHARS increment the pointer 02508 FE0E24D0 863 JMP PKITMSHAR share the rest of the code 864 * --- 865 CONVT 0000247D F 15 520= 540a CONVTAB 00102495 F 15 513 541= CONVTP 00002495 F 15 540= 541e DOTBTI 0000245D F 15 437= 789 DOTSYS 0000245C F 15 436= 815 +EQACCT 00174805 F 15 456s +EQACCTPROJ 00174807 F 15 459s 495 497s +EQACCTPW 00174808 F 15 462s +EQFILEEXT 0017480C F 15 458 466s 499 501s 773s 791s +EQFILENM 0017480A F 15 455 464s 737s +EQFILEPW 0017480D F 15 461 465s 753s +EQSYSTEM 00174802 F 15 460s 491 493s +EQT 00134000 F 15 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 15 463s +EQVOLUME 00174800 F 15 457s +FIXEXTEN 0000246C F 15 429 490= FIXEXTEN1 00002470 F 15 492j 494= FIXEXTEN2 00002473 F 15 496j 498= FIXEXTEN3 00002476 F 15 500j 502= FIXEXTENS 00001C71 F 15 487= 490s 503 GETCHAR 00002477 F 15 511= 569 591 617 661 757 775 807 812 GETCHARS 00001C72 F 15 508= 511s 516 IGNORXEXT 000024E9 F 15 774= 779j IGNORXTRA 000024A6 F 15 590= 595j NULLITEM 000024AB F 15 570j 600= PACKDIG 000024B2 F 15 610j 612= 620j PACKDONE 000024BA F 15 618j 621= PACKEXIT 000024BE F 15 592j 603j 623j 633= PACKEXTP 000024C0 F 15 581 583 657= 772 PACKEXTPS 00001C75 F 15 654= 657s 679 +PACKITEM 000024CF F 15 430 732= +PACKITEMI 00002506 F 15 431 861= PACKITEMS 00001C76 F 15 729= 732s 760 838 861s PACKLOOP 000024A0 F 15 574j 580= +PACKNAME 00002496 F 15 432 567= 735 751 PACKNAMES 00001C74 F 15 564= 567s 576 629 635 PACKNAMET 00001C73 F 15 563= 582s 585 PACKNUM 000024AE F 15 572j 607= +PCAAA 0000000B F 15 571 +PCCOLON 00000029 F 15 529x 792 +PCDELIM 00000031 F 15 522x 525x 527x +PCDOLLAR 0000002E F 15 525x 742 808 813 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 71 (OPLFI) F 15 String Parameter Packers +PCDOT 00000028 F 15 514 527x 738 +PCLPAREN 0000002A F 15 526x 748 +PCLSQUAR 0000002F F 15 533x +PCO 00000032 F 15 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 15 526x 740 +PCRAD 00000028 F 15 673 +PCRPAREN 0000002B F 15 526x 754 +PCRSQUAR 00000030 F 15 533x +PCSLASH 0000002C F 15 527x +PCSPACE 00000000 F 15 668 +PCZZZ 00000024 F 15 573 PIDOLBKUP 000024FF F 15 809j 814j 826= PIDOLEXT 000024F2 F 15 743j 803= PIDOTEXT 000024E6 F 15 739j 770= PIOKEXIT 000024E4 F 15 749j 758= 793j PIPLUSEXT 000024EE F 15 741j 788= PISTOREXT 000024EF F 15 790= 816j 828j PITRYPW 000024DA F 15 747= 776j PKEXTFILL 000024C7 F 15 662j 667= PKEXTLOOP 000024C3 F 15 660= 678j PKEXTOK 000024C8 F 15 664j 669= PKITMERR 00002501 F 15 736j 752j 837= 844j 850j PKITMPWER 00002502 F 15 755j 842= PKITMSHAR 000024D0 F 15 733= 863j PKITMWRAP 00002504 F 15 778j 848= +PROG MACRO F 15 453 489 510 566 656 731 +PROGRAM! 000024CF F 15 450e 450= 453a 486e 486= 489a 507e 507= 510a 562= 562e 566a 653e 653= 656a 728= 728e 731a +PSECT! 00000000 F 15 450a 450= 450e 450e 450a 453e 453e 453= 453a 453a 486= 486a 486e 486a 486e 489e 489= 489a 489e 489a 507a 507a 507e 507= 507e 510e 510a 510a 510= 510e 562e 562a 562e 562a 562= 566= 566a 566a 566e 566e 653a 653a 653= 653e 653e 656e 656e 656a 656a 656= 728e 728e 728a 728a 728= 731e 731e 731a 731a 731= +SFTUPPKTMP 0000245E F 15 433 454= 734 SFTUPS 00001C70 F 15 451= 454s 467 TOOLONG 000024BC F 15 594j 627= +VARIABLES! 00001C77 F 15 450a 453e 453= 486a 489= 489e 507a 510e 510= 562a 566e 566= 653a 656= 656e 728a 731e 731= +VARS MACRO F 15 450 486 507 562 653 728 XREQERBFN 0000008F F 15 435= 575 628 843 849 866 END of the symbol packers 1033 1034 VARS 00000064 ABS 1035 LOGENTRIES EQU 100 1036 00001C77 1037 LOGBUFFER BSS LOGENTRIES*ERRLNTH+2 1038 1039 PROG 1040 1041 1042 INPUT .SYS:CHARSTUFF 2 3 ********************************************************************************** 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 72 (CHARSTUFF) F 16 CHARSTUFF - Routines to manipulate character str 4 * * 5 * Input processing routines. * 6 * * 7 * General information. * 8 * All of these routines assume that R6 is a stack pointer. All of these * 9 * routines may destroy R0-R3, but if they use R4-R7 they will save and * 10 * restore them. All strings used here are terminated by NUL (#00). All * 11 * lengths are in numbers of characters. * 12 * * 13 * Routine descriptions. * 14 * * 15 * Get one item. An item is any sequence of characters between * 16 * commas and/or white-space characters (spaces, tabs, CR, LF, FF). * 17 * However, parentheses, brackets and quotes must be balanced * 18 * i.e., FOO.DATA[TEST VER="This is a test"] is one item. * 19 * The caller may optionally specify other delimiters. Leading * 20 * delimiters are ignored. * 21 * CALL GETITEM * 22 * PAR source starting character address * 23 *0 or more: PARV additional delimiter character * 24 * PAR result starting character address * 25 * PARVL maximum result size * 26 * * 27 * R0 = error code (-1 = end of source, * 28 * 0 = all OK, * 29 * 1 = mismatched parentheses or quote * 30 * 2 = result is too long. ) * 31 * R1 = character addr of first character in source after item * 32 * * 33 * * 34 * Convert a character string to internal format: * 35 * (Will convert to PAK6, PAK12, integer, or hex) * 36 * CALL CHARTOP6, CHARTOP12, CHARTOINT, CHARTOHEX * 37 * PAR source starting character address * 38 * ST R0 error code * 39 * ST[2] R1 internal value * 40 * error codes: 0 = all ok * 41 * 1 = invalid character in item * 42 * 2 = string is too long * 43 * * 44 * * 45 * Convert an internal format to a character string * 46 * (Will convert PAK6, PAK12, integer, or hex): * 47 * CALL P6TOCHAR, P12TOCHAR, INTTOCHAR, HEXTOCHAR * 48 * PARV[2] value to convert * 49 *optional: PARV size of field to use * 50 * PARL where to put it * 51 * ST R0 error code (0 = all ok) * 52 * ST R1 address of character after last character of result. * 53 * Note: If the value does not fit in the number of characters * 54 * specified, we will use a larger field. * 55 * * 56 * * 57 * Get the length of a string. * 58 * CALL LENGTH * 59 * PARL source string * 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 73 (CHARSTUFF) F 16 CHARSTUFF - Routines to manipulate character str 60 * ST R0 number of characters in the string * 61 * ST R1 pointer to final NUL * 62 * * 63 * * 64 * Move a string: * 65 * CALL MOVE * 66 * PAR source string * 67 * PARL destination location * 68 * ST R1 pointer to final NUL in result * 69 * * 70 * Convert a string to upper case: * 71 * CALL UPPERFY * 72 * PARL string * 73 * * 74 * Compare two strings: * 75 * CALL COMPARE * 76 * PAR string one * 77 * PARL string two * 78 * JLTZ R0 string one less than string two * 79 * JEQZ R0 string one equals string two * 80 * JGTZ R0 string one greater than string two * 81 * * 82 ********************************************************************************** 83 85 * Generating CharStuff Version A8703. 87 88 CHARSTUFF BLOCK 89 ENTRY GETITEM extract one item from a string 90 ENTRY CHARTOP6 convert string to PAK6 item 91 ENTRY CHARTOP12 convert string to PAK12 item 92 ENTRY CHARTOINT convert string to integer 93 ENTRY CHARTOHEX convert string (base 16) to integer 94 ENTRY P6TOCHAR convert PAK6 value to string 95 ENTRY P12TOCHAR convert PAK12 value to string 96 ENTRY INTTOCHAR convert integer to string (decimal) 97 ENTRY HEXTOCHAR convert integer to string (base 16) 98 ENTRY LENGTH return the length of a string 99 ENTRY MOVE move a string 100 ENTRY UPPERFY convert a string to upper case 101 ENTRY COMPARE compare two strings 102 02509 41383730 103 CSVERSION TEXTZ "A8703" version number 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 74 (CHARSTUFF) F 16 CHARSTUFF - Routines to manipulate character str 105 106 ********************************************************************************** 107 * * 108 * GETITEM. Get one item from a string. Call: * 109 * CALL GETITEM * 110 * PAR source string location * 111 *0 or more: PARV additional delimiter character * 112 * PAR destination location * 113 * PARVL max destination size * 114 * R0 = error code ( -1 = end of source string, * 115 * 0 = all ok, * 116 * 1 = mismatched quote or parenthesis * 117 * 2 = string too long for destination * 118 * R1 = address of first char of source after the item. * 119 * * 120 * This routine will skip leading delimiters (comma and white space), * 121 * then return all characters up to the next delimiter. However, if a * 122 * quote is found, we return all characters (without inspection) until * 123 * the next quote, and from there to the next delimiter. If a "(" or * 124 * "[" is found, we return all characters (inspecting for quotes), up * 125 * to the next ")" or "]", and from there to the next delimiter. Thus, * 126 * quotes and parentheses must be properly balanced, but parentheses * 127 * occurring inside quotes need not be balanced. * 128 * * 129 ********************************************************************************** 130 131 BLOCK 132 133 ENTRY GETITEM the routine 134 135 ENTRY ASCIIPTR ascii character type table pointer 136 ENTRY NOR a normal character 137 ENTRY DLM a delimiter 138 ENTRY EOL end of line character 139 ENTRY PAR parenthesizing character 140 141 * Table of characters and their types: 00000000 ABS 142 NOR EQU 0 normal character 00000001 ABS 143 DLM EQU 1 delimiter 00000002 ABS 144 EOL EQU 2 end of line 00000003 ABS 145 PAR EQU 3 parenthesis or quote 146 0250B 0088250C 147 ASCIIPTR PTR ASCIITAB for referencing the following 148 0080250C 149 ASCIITAB BSSB 2:0 label for beginning of table 0250B 00000001 150 VFDB 2:EOL,DLM,DLM,DLM,DLM,DLM,DLM,DLM 00-07 (NUL-BEL) 0250C 00000001 151 VFDB 2:DLM,DLM,DLM,DLM,DLM,DLM,DLM,DLM 08-0F (BS-SI) 0250C 00000001 152 VFDB 2:DLM,DLM,DLM,DLM,DLM,DLM,DLM,DLM 10-17 (DLE-ETB) 0250D 00000001 153 VFDB 2:DLM,DLM,DLM,DLM,DLM,DLM,DLM,DLM 18-1F (CAN-US) 0250D 00000000 154 VFDB 2:DLM,NOR,PAR,NOR,NOR,NOR,NOR,NOR 20-27 ( !"#$%&') 0250E 00000000 155 VFDB 2:PAR,PAR,NOR,NOR,DLM,NOR,NOR,NOR 28-2F (()*+,-./) 0250E 00000000 156 VFDB 2:NOR,NOR,NOR,NOR,NOR,NOR,NOR,NOR 30-37 (01234567) 0250F 00000000 157 VFDB 2:NOR,NOR,NOR,NOR,PAR,NOR,PAR,NOR 38-3F (89:s<=>?) 0250F 00000000 158 VFDB 2:NOR,NOR,NOR,NOR,NOR,NOR,NOR,NOR 40-47 (@ABCDEFG) 02510 00000000 159 VFDB 2:NOR,NOR,NOR,NOR,NOR,NOR,NOR,NOR 48-4F (HIJKLMNO) 02510 00000000 160 VFDB 2:NOR,NOR,NOR,NOR,NOR,NOR,NOR,NOR 50-57 (PQRSTUVW) 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 75 (CHARSTUFF) F 16 CHARSTUFF - Routines to manipulate character str 02511 00000000 161 VFDB 2:NOR,NOR,NOR,PAR,NOR,PAR,NOR,NOR 58-5F (XYZ[\]^_) 02511 00000000 162 VFDB 2:NOR,NOR,NOR,NOR,NOR,NOR,NOR,NOR 60-67 (`abcdefg) 02512 00000000 163 VFDB 2:NOR,NOR,NOR,NOR,NOR,NOR,NOR,NOR 68-6F (hijklmno) 02512 00000000 164 VFDB 2:NOR,NOR,NOR,NOR,NOR,NOR,NOR,NOR 70-77 (pqrstuvw) 02513 00000001 165 VFDB 2:NOR,NOR,NOR,PAR,NOR,PAR,NOR,DLM 78-7F (xyz{|}~r) 166 167 BEGFRAME 00098021 6 ZBM 168 ASCIITAB2 BSSB 2:128 local copy of the ascii table 00178809 6 BASE 169 ASCII2PTR BSS 1 pointer to above word 0017880A 6 BASE 170 TEMP BSS 3 various temporaries - redefined below 0017880A 6 BASE 171 DESTLEN EQU TEMP(0) max size of destination 0017880B 6 BASE 172 SOURCEPTR EQU TEMP(1) source location 0017880C 6 BASE 173 DESTPTR EQU TEMP(2) destination location 174 ENDFRAME 175 02514 DD1F800D 6 STAK 176 GETITEM ENTR PUSH 02515 E617880A 016 BASE 177 ST2 R0 TEMP save registers while passing parms 02516 E497880C 2 6 BASE 178 ST R2 TEMP(2) 02517 6004250C 0 IMM 179 LD R0 ADR ASCIITAB copy our ascii table 02518 60440020 1 IMM 180 LD R1 2*128/8 size of table 02519 38898021 2 6 ZBM 181 LEA R2 ASCIITAB2 where to move to 0251A E4978809 2 6 BASE 182 ST R2 ASCII2PTR 0251B FE400000 183 CMOVE move it 0251C 6217880A 016 BASE 184 LD2 R0 TEMP 0251D 6097880C 2 6 BASE 185 LD R2 TEMP(2) restore registers 0251E C117880B 6 BASE 186 STP SOURCEPTR save source string pointer 0000251F 187 DLMLOOP LABEL 0251F F3CA2523 7 188 JBF R7/BIT 5 ENDDLMS jump if not PARV 02520 EDDD8409 60 FPVR 189 STW @ASCII2PTR(R0) set delimiter character in ASCIITAB2 02521 C1520000 0 REG 190 STPV R0 consume parm, get next one 02522 FE0E251F 191 JMP DLMLOOP and inspect it 192 * --- 00002523 193 ENDDLMS LABEL 02523 C117880C 6 BASE 194 STP DESTPTR save destination pointer 02524 C057880A 6 BASE 195 STPVL DESTLEN save destination length 196 197 * Now that we have passed the parms, we save R3-R5 and 198 * set them up as R3 = remaining length in destination, 199 * R4 = running source pointer, R5 = running dest pointer. 200 02525 E2D7880A 346 BASE 201 EXCH2 R3 SP,TEMP 02526 E157880C 5 6 BASE 202 EXCH R5 SP,TEMP(2) 203 204 * Skip leading delimiter characters. 205 00002527 206 SKIPLEADER LABEL 02527 60170000 0 4 CACH 207 LD R0 CACH R4,0 get character value 02528 601D8409 0 60 FPVR 208 LD R0 @(SP,ASCII2PTR)(R0) get character type 02529 64040001 0 IMM 209 CPR R0 DLM 0252A FE0C252D 210 JNE ENDLEADER jump if not a delimiter 0252B 39170001 4 4 CACH 211 LEA R4 CACH R4,1 point to next character 0252C FE0E2527 212 JMP SKIPLEADER and try again 213 * --- 214 0000252D 215 ENDLEADER LABEL 0252D 64040002 0 IMM 216 CPR R0 EOL 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 76 (CHARSTUFF) F 16 CHARSTUFF - Routines to manipulate character str 0252E FE02253F 217 JEQ NOITEM jump if nothing left in input buffer 0252F 10C40001 3 IMM 218 SUB R3 1 adjust the size for final NUL 219 220 * This is the main copy loop. Normal characters just get 221 * copied, and parenthesis characters get special treatment. 222 * Anything else stops the loop. 223 00002530 224 COPYLOOP LABEL 02530 60170000 0 4 CACH 225 LD R0 CACH R4,0 get a character 02531 605D8409 1 60 FPVR 226 LD R1 @(SP,ASCII2PTR)(R0) get character type 02532 64440000 1 IMM 227 CPR R1 NOR 02533 FE0C253A 228 JNE NOTNORMAL jump if this character is not normal 02534 E4174000 0 5 CACH 229 ST R0 CACH R5,0 save in output buffer 02535 39574001 5 5 CACH 230 LEA R5 CACH R5,1 bump the output pointer 02536 39170001 4 4 CACH 231 LEA R4 CACH R4,1 bump the input pointer 02537 FAE22530 3 232 DRJ R3 COPYLOOP jump while room left in output buffer 02538 60040002 0 IMM 233 LD R0 2 error code: buffer full 02539 FE0E2542 234 JMP ERROR and go report the error 235 * --- 236 0000253A 237 NOTNORMAL LABEL not a normal character 0253A 64440003 1 IMM 238 CPR R1 PAR 0253B FE0C2541 239 JNE DONE jump if not a parenthesis 0253C DC402547 240 CALLNP COPYPAREN copy parenthesized string 0253D FA022530 0 241 JEQZ R0 COPYLOOP and do more if that went well 0253E FE0E2542 242 JMP ERROR else it was an error 243 * --- 244 0000253F 245 NOITEM LABEL no item in source buffer 0253F 6007FFFF 0 IMM 246 LD R0 -1 load return code 02540 FE0E2542 247 JMP ERROR and give the error 248 * --- 249 00002541 250 DONE LABEL ended normally 02541 60040000 0 IMM 251 LD R0 0 load good return code 252 00002542 253 ERROR LABEL ended abnormally - R0 = return code 02542 EC174000 5 CACH 254 STZ CACH R5,0 put NUL at end of new item 02543 60530000 1 4 REG 255 LD R1 R4 put character pointer into R1 02544 62D7880A 346 BASE 256 LD2 R3 SP,TEMP restore these registers 02545 6157880C 5 6 BASE 257 LD R5 SP,TEMP(2) 02546 5D1F800D 6 STAK 258 LEAVE POP 259 * --- 260 ASCII2PTR 00178809 F 16 169= 182s 189s 208 226 +ASCIIPTR 0000250B F 16 135 147= ASCIITAB 0080250C F 16 147a 149= 179a ASCIITAB2 00098021 F 16 168= 181a COPYLOOP 00002530 F 16 224= 232j 241j +COPYPAREN UUUUUUUU F 16 240 DESTLEN 0017880A F 16 171= 195s DESTPTR 0017880C F 16 173= 194s +DLM 00000001 F 16 137 143= 150x 150x 150x 150x 150x 150x 150x 151x 151x 151x 151x 151x 151x 151x 151x 152x 152x 152x 152x 152x 152x 152x 152x 153x 153x 153x 153x 153x 153x 153x 153x 154x 155x 165x 209 DLMLOOP 0000251F F 16 187= 191j 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 77 (CHARSTUFF) F 16 CHARSTUFF - Routines to manipulate character str DONE 00002541 F 16 239j 250= ENDDLMS 00002523 F 16 188j 193= ENDLEADER 0000252D F 16 210j 215= +EOL 00000002 F 16 138 144= 150x 216 ERROR 00002542 F 16 234j 242j 247j 253= +GETITEM 00002514 F 16 133 176= NOITEM 0000253F F 16 217j 245= +NOR 00000000 F 16 136 142= 154x 154x 154x 154x 154x 154x 155x 155x 155x 155x 155x 156x 156x 156x 156x 156x 156x 156x 156x 157x 157x 157x 157x 157x 157x 158x 158x 158x 158x 158x 158x 158x 158x 159x 159x 159x 159x 159x 159x 159x 159x 160x 160x 160x 160x 160x 160x 160x 160x 161x 161x 161x 161x 161x 161x 162x 162x 162x 162x 162x 162x 162x 162x 163x 163x 163x 163x 163x 163x 163x 163x 164x 164x 164x 164x 164x 164x 164x 164x 165x 165x 165x 165x 165x 227 NOTNORMAL 0000253A F 16 228j 237= +PAR 00000003 F 16 139 145= 154x 155x 155x 157x 157x 161x 161x 165x 165x 238 SKIPLEADER 00002527 F 16 206= 212j SOURCEPTR 0017880B F 16 172= 186s TEMP 0017880A F 16 170= 171e 172e 173e 177s 178s 184 185 201s 202s 256 257 261 END 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 78 (CHARSTUFF) F 16 CHARSTUFF - Routines to manipulate character str 263 264 ********************************************************************************** 265 * * 266 * COPYPAREN - Internal to GETITEM. This routine will copy a * 267 * parenthesized or quoted string. Call: * 268 * LD R0 first character of string * 269 * LD R3 remaining destination length * 270 * LD R4 running source pointer * 271 * LD R5 running destination pointer * 272 * CALLNP COPYPAREN * 273 * ST R0 error code (0 = ok) * 274 * R3,R4,R5 are updated * 275 * R0,R1 are changed. * 276 * * 277 ********************************************************************************** 278 279 BLOCK 280 281 ENTRY COPYPAREN 282 283 BEGFRAME 00178801 6 BASE 284 ENDCHAR BSS 1 ending character 285 ENDFRAME 286 02547 DD5F8002 6 STAK 287 COPYPAREN ENTRNP PUSH 02548 64040028 0 IMM 288 CPR R0 "(" 02549 FE022553 289 JEQ PAREN jump if left "(" 0254A 6404005B 0 IMM 290 CPR R0 "[" 0254B FE022555 291 JEQ BRACKET jump if "[" 0254C 6404007B 0 IMM 292 CPR R0 "{" 0254D FE022557 293 JEQ BRACE jump if "{" 0254E 6404003C 0 IMM 294 CPR R0 "<" 0254F FE022559 295 JEQ ANGLE jump if "<" 02550 64040022 0 IMM 296 CPR R0 """" 02551 FE02255A 297 JEQ GOTCHAR jump if quote 02552 FE0E2577 298 JMP MISMATCH anything else is a mismatched paren 299 * --- 300 02553 60040029 0 IMM 301 PAREN LD R0 ")" 02554 FE0E255A 302 JMP GOTCHAR 303 * --- 304 02555 6004005D 0 IMM 305 BRACKET LD R0 "]" 02556 FE0E255A 306 JMP GOTCHAR 307 * --- 308 02557 6004007D 0 IMM 309 BRACE LD R0 "}" 02558 FE0E255A 310 JMP GOTCHAR 311 * --- 312 02559 6004003E 0 IMM 313 ANGLE LD R0 ">" 314 * \ / 315 0255A E4178801 0 6 BASE 316 GOTCHAR ST R0 SP,ENDCHAR save terminating character 317 0255B 60170000 0 4 CACH 318 LD R0 CACH R4,0 copy the first character 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 79 (CHARSTUFF) F 16 CHARSTUFF - Routines to manipulate character str 0255C E4174000 0 5 CACH 319 ST R0 CACH R5,0 0255D 39170001 4 4 CACH 320 LEA R4 CACH R4,1 0255E 39574001 5 5 CACH 321 LEA R5 CACH R5,1 0255F FAE62561 3 322 JDR R3 COPYLOOP then start the loop 02560 FE0E2579 323 JMP BUFFULL fall through if buffer is full 324 * --- 325 00002561 326 COPYLOOP LABEL 02561 60170000 0 4 CACH 327 LD R0 CACH R4,0 get a character 02562 FA022577 0 328 JEQZ R0 MISMATCH if end of source then mismatched 02563 E4174000 0 5 CACH 329 ST R0 CACH R5,0 copy the character 02564 39170001 4 4 CACH 330 LEA R4 CACH R4,1 02565 39574001 5 5 CACH 331 LEA R5 CACH R5,1 02566 10C40001 3 IMM 332 SUB R3 1 02567 FACA2579 3 333 JLEZ R3 BUFFULL jump if buffer is full 02568 64178801 0 6 BASE 334 CPR R0 SP,ENDCHAR is this the right ending character? 02569 FE02257B 335 JEQ DONE jump if so 0256A 6070250B 1 0 @ 336 LD R1 @ASCIIPTR(R0) get character type 0256B 64440003 1 IMM 337 CPR R1 PAR 0256C FE0C2561 338 JNE COPYLOOP jump if not another parenthesis 0256D 60578801 1 6 BASE 339 LD R1 SP,ENDCHAR get our terminating character 0256E 64440022 1 IMM 340 CPR R1 """" is it a quote? 0256F FE022561 341 JEQ COPYLOOP if so, no special processing 02570 6047FFFF 1 IMM 342 LD R1 -1 02571 391B0800 4 41 CACH 343 LEA R4 CACH R4,0(R1) back up to parenthesizing character 02572 395B4800 5 51 CACH 344 LEA R5 CACH R5,0(R1) ditto 02573 60D6D001 3 3 REG 345 LD R3 R3+1 ditto 02574 DC402547 346 CALLNP COPYPAREN else copy nested parenthesized string 02575 FA022561 0 347 JEQZ R0 COPYLOOP if that worked, continue copying 02576 FE0E257C 348 JMP ERROR else we have an error 349 * --- 350 00002577 351 MISMATCH LABEL mismatched parentheses 02577 60040001 0 IMM 352 LD R0 1 load error code 02578 FE0E257C 353 JMP ERROR 354 * --- 355 00002579 356 BUFFULL LABEL destination buffer is full 02579 60040002 0 IMM 357 LD R0 2 load error code 0257A FE0E257C 358 JMP ERROR 359 * --- 360 0000257B 361 DONE LABEL normal return 0257B 60040000 0 IMM 362 LD R0 0 load error code 363 * \ / 364 0000257C 365 ERROR LABEL 0257C 5D1F8002 6 STAK 366 LEAVE POP 367 * --- 368 ANGLE 00002559 F 16 295j 313= +ASCIIPTR 0000250B F 16 336 BRACE 00002557 F 16 293j 309= BRACKET 00002555 F 16 291j 305= BUFFULL 00002579 F 16 323j 333j 356= COPYLOOP 00002561 F 16 322j 326= 338j 341j 347j 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 80 (CHARSTUFF) F 16 CHARSTUFF - Routines to manipulate character str +COPYPAREN 00002547 F 16 281 287= 346 DONE 0000257B F 16 335j 361= ENDCHAR 00178801 F 16 284= 316s 334 339 ERROR 0000257C F 16 348j 353j 358j 365= GOTCHAR 0000255A F 16 297j 302j 306j 310j 316= MISMATCH 00002577 F 16 298j 328j 351= +PAR 00000003 F 16 337 PAREN 00002553 F 16 289j 301= 369 END 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 81 (CHARSTUFF) F 16 CHARSTUFF - Routines to manipulate character str 371 372 ********************************************************************************** 373 * * 374 * CHARTOP6. Convert a character string to PAK6 value. * 375 * CALL CHARTOP6 * 376 * PARL buffer * 377 * ST R0 error code (-1 = empty, 0 = ok, 1 = bad character, * 378 * 2 = too long) * 379 * ST R1 packed value * 380 * ST R3 advanced source pointer * 381 * * 382 ********************************************************************************** 383 384 BLOCK 385 386 ENTRY CHARTOP6 387 388 BEGFRAME 389 ENDFRAME 390 0257D 020C257E 391 CHARTABPTR PTR CHARTAB pointer to character table 0200257E 392 CHARTAB BSSC 0 values of pak characters 0257F 00000063 393 VFDC 00,99,99,99,99,99,99,99 00-07 (NUL-BEL) 02581 00000063 394 VFDC 99,99,99,99,99,99,99,99 08-0F (BS-SI) 02583 00000063 395 VFDC 99,99,99,99,99,99,99,99 10-17 (DLE-ETB) 02585 00000063 396 VFDC 99,99,99,99,99,99,99,99 18-1F (CAN-US) 02587 00000063 397 VFDC 00,37,99,99,99,99,38,99 20-27 ( !"#$%&') 02589 00000063 398 VFDC 99,99,99,99,99,99,99,99 28-2F (()*+,-./) 0258B 00000008 399 VFDC 01,02,03,04,05,06,07,08 30-37 (01234567) 0258D 00000063 400 VFDC 09,10,99,99,99,99,99,99 38-3F (89:s<=>?) 0258F 00000011 401 VFDC 99,11,12,13,14,15,16,17 40-47 (@ABCDEFG) 02591 00000019 402 VFDC 18,19,20,21,22,23,24,25 48-4F (HIJKLMNO) 02593 00000021 403 VFDC 26,27,28,29,30,31,32,33 50-57 (PQRSTUVW) 02595 00000027 404 VFDC 34,35,36,99,99,99,99,39 58-5F (XYZ[\]^_) 02597 00000011 405 VFDC 99,11,12,13,14,15,16,17 60-67 (`abcdefg) 02599 00000019 406 VFDC 18,19,20,21,22,23,24,25 68-6F (hijklmno) 0259B 00000021 407 VFDC 26,27,28,29,30,31,32,33 70-77 (pqrstuvw) 0259D 00000063 408 VFDC 34,35,36,99,99,99,99,99 78-7F (xyz{|}~r) 409 0259E DD1F8001 6 STAK 410 CHARTOP6 ENTR PUSH 0259F C012C000 3 REG 411 STPL R3 025A0 60840006 2 IMM 412 LD R2 6 six characters to pack 025A1 60440000 1 IMM 413 LD R1 0 accumulate value here 025A2 5C16C000 3 CACH 414 CMZ CACH R3,0 anything in item? 025A3 FE0225B2 415 JEQ EMPTY jump if not 000025A4 416 LOOP LABEL 025A4 1C440028 1 IMM 417 MUL R1 40 accumulate the character 025A5 6016C000 0 3 CACH 418 LD R0 CACH R3,0 get new character 025A6 6030257D 0 0 @ 419 LD R0 @CHARTABPTR(R0) get translated value 025A7 64040028 0 IMM 420 CPR R0 40 is it reasonable? 025A8 FE0625B4 421 JGE BADCHAR jump if not 025A9 18520000 1 0 REG 422 ADD R1 R0 accumulate it in 025AA 5C16C000 3 CACH 423 CMZ CACH R3,0 at end of buffer? 025AB FE0225AD 424 JEQ NOINCR if so, don't increment counter 025AC 38D6C001 3 3 CACH 425 LEA R3 CACH R3,1 else point to next character 000025AD 426 NOINCR LABEL 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 82 (CHARSTUFF) F 16 CHARSTUFF - Routines to manipulate character str 025AD FAA225A4 2 427 DRJ R2 LOOP loop six times 025AE 5C16C000 3 CACH 428 CMZ CACH R3,0 more left in item? 025AF FE0C25B6 429 JNE TOOBIG jump if so 025B0 60040000 0 IMM 430 LD R0 0 else load good return code 025B1 FE0E25B7 431 JMP RETURN and return 432 * --- 433 000025B2 434 EMPTY LABEL 025B2 6007FFFF 0 IMM 435 LD R0 -1 error code: empty item 025B3 FE0E25B7 436 JMP RETURN 437 * --- 438 000025B4 439 BADCHAR LABEL 025B4 60040001 0 IMM 440 LD R0 1 error code: bad character 025B5 FE0E25B7 441 JMP RETURN 442 * --- 443 000025B6 444 TOOBIG LABEL 025B6 60040002 0 IMM 445 LD R0 2 error code: more than 6 characters 446 * \ / 447 000025B7 448 RETURN LABEL 025B7 5D1F8001 6 STAK 449 LEAVE POP 450 * --- 451 BADCHAR 000025B4 F 16 421j 439= CHARTAB 0200257E F 16 391a 392= CHARTABPTR 0000257D F 16 391= 419 +CHARTOP6 0000259E F 16 386 410= EMPTY 000025B2 F 16 415j 434= LOOP 000025A4 F 16 416= 427j NOINCR 000025AD F 16 424j 426= RETURN 000025B7 F 16 431j 436j 441j 448= TOOBIG 000025B6 F 16 429j 444= 452 END 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 83 (CHARSTUFF) F 16 CHARSTUFF - Routines to manipulate character str 454 455 ********************************************************************************** 456 * * 457 * CHARTOP12. Convert character string to pak12 item. * 458 * CALL CHARTOP12 * 459 * PARL buffer pointer * 460 * ST R0 error code (0 = ok, 1 = invalid char, 2 = too long) * 461 * ST2 R1 result value * 462 * * 463 ********************************************************************************** 464 465 BLOCK 466 467 ENTRY CHARTOP12 468 469 BEGFRAME 00178801 6 BASE 470 HALF BSS 1 first half of result 471 ENDFRAME 472 025B8 DD1F8002 6 STAK 473 CHARTOP12 ENTR PUSH 025B9 C012C000 3 REG 474 STPL R3 025BA DC00259E 475 CALL CHARTOP6 pack first half 025BB 4016C000 3 CACH 476 PARL CACH R3,0 025BC 60840000 2 IMM 477 LD R2 0 clear second half of result 025BD 64040002 0 IMM 478 CPR R0 2 is there more? 025BE FE0C25C4 479 JNE RETURN jump if not 025BF E4578801 1 6 BASE 480 ST R1 SP,HALF save first half of result 025C0 DC00259E 481 CALL CHARTOP6 pack second half 025C1 4016C000 3 CACH 482 PARL CACH R3,0 025C2 60924000 2 1 REG 483 LD R2 R1 copy second half 025C3 60578801 1 6 BASE 484 LD R1 SP,HALF get first half 485 * \ / 486 000025C4 487 RETURN LABEL 025C4 5D1F8002 6 STAK 488 LEAVE POP 489 * --- 490 +CHARTOP12 000025B8 F 16 467 473= +CHARTOP6 0000259E F 16 475 481 HALF 00178801 F 16 470= 480s 484 RETURN 000025C4 F 16 479j 487= 491 END 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 84 (CHARSTUFF) F 16 CHARSTUFF - Routines to manipulate character str 493 494 ********************************************************************************** 495 * * 496 * CHARTOINT. Convert character string (decimal digits) to integer. * 497 * The string can optionally have a leading sign. * 498 * CALL CHARTOINT * 499 * PARL buffer pointer * 500 * ST R0 error code (0 = ok, 1 = bad character) * 501 * ST R1 result * 502 * * 503 ********************************************************************************** 504 505 BLOCK 506 507 ENTRY CHARTOINT 508 509 BEGFRAME 00178801 6 BASE 510 SIGN BSS 1 sign: +1 or -1 511 ENDFRAME 512 025C5 DD1F8002 6 STAK 513 CHARTOINT ENTR PUSH 025C6 C012C000 3 REG 514 STPL R3 025C7 EDD78801 6 BASE 515 STW SP,SIGN set sign to positive 025C8 6016C000 0 3 CACH 516 LD R0 CACH R3,0 get first character 025C9 FA0225DA 0 517 JEQZ R0 EMPTY jump if string is empty 025CA 6404002B 0 IMM 518 CPR R0 "+" 025CB FE0225CF 519 JEQ POSITIVE jump if plus sign 025CC 6404002D 0 IMM 520 CPR R0 "-" 025CD FE0C25D0 521 JNE NOTNEG jump if not negative 025CE D1578801 6 BASE 522 STMW SP,SIGN 000025CF 523 POSITIVE LABEL 025CF 38D6C001 3 3 CACH 524 LEA R3 CACH R3,1 skip sign character 000025D0 525 NOTNEG LABEL 526 025D0 60440000 1 IMM 527 LD R1 0 initialize result 000025D1 528 LOOP LABEL 025D1 6016C000 0 3 CACH 529 LD R0 CACH R3,0 get a character 025D2 FA0225DE 0 530 JEQZ R0 DONE jump if end of string 025D3 10040030 0 IMM 531 SUB R0 "0" subtrace off bias 025D4 68040009 0 IMM 532 UCPR R0 9 025D5 FE0425DC 533 JGT BADCHAR jump if nonnumeric character 025D6 1C44000A 1 IMM 534 MUL R1 10 025D7 18520000 1 0 REG 535 ADD R1 R0 accumulate the character 025D8 38D6C001 3 3 CACH 536 LEA R3 CACH R3,1 increment character pointer 025D9 FE0E25D1 537 JMP LOOP 538 * --- 539 000025DA 540 EMPTY LABEL 025DA 6007FFFF 0 IMM 541 LD R0 -1 error code: string is empty 025DB FE0E25E0 542 JMP RETURN 543 * --- 544 000025DC 545 BADCHAR LABEL 025DC 60040001 0 IMM 546 LD R0 1 error code: bad character 025DD FE0E25E0 547 JMP RETURN 548 * --- 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 85 (CHARSTUFF) F 16 CHARSTUFF - Routines to manipulate character str 549 000025DE 550 DONE LABEL 025DE 1C578801 1 6 BASE 551 MUL R1 SP,SIGN correct the sign 025DF 60040000 0 IMM 552 LD R0 0 error code: all is well 553 * \ / 554 000025E0 555 RETURN LABEL 025E0 5D1F8002 6 STAK 556 LEAVE POP 557 * --- 558 BADCHAR 000025DC F 16 533j 545= +CHARTOINT 000025C5 F 16 507 513= DONE 000025DE F 16 530j 550= EMPTY 000025DA F 16 517j 540= LOOP 000025D1 F 16 528= 537j NOTNEG 000025D0 F 16 521j 525= POSITIVE 000025CF F 16 519j 523= RETURN 000025E0 F 16 542j 547j 555= SIGN 00178801 F 16 510= 515s 522s 551 559 END 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 86 (CHARSTUFF) F 16 CHARSTUFF - Routines to manipulate character str 561 562 ********************************************************************************** 563 * * 564 * CHARTOHEX. Convert character string (hex digits) to integer. * 565 * CALL CHARTOHEX * 566 * PARL buffer pointer * 567 * ST R0 error code (0 = ok, 1 = bad character) * 568 * ST R1 value * 569 * * 570 ********************************************************************************** 571 572 BLOCK 573 574 ENTRY CHARTOHEX 575 576 BEGFRAME 577 ENDFRAME 578 025E1 DD1F8001 6 STAK 579 CHARTOHEX ENTR PUSH 025E2 C012C000 3 REG 580 STPL R3 025E3 5C16C000 3 CACH 581 CMZ CACH R3,0 is item empty? 025E4 FE0225F6 582 JEQ EMPTY jump if yes 025E5 60440000 1 IMM 583 LD R1 0 build result here 000025E6 584 LOOP LABEL 025E6 6016C000 0 3 CACH 585 LD R0 CACH R3,0 get a character 025E7 FA0225FA 0 586 JEQZ R0 DONE jump if end of buffer 025E8 10040030 0 IMM 587 SUB R0 "0" 025E9 68040009 0 IMM 588 UCPR R0 9 is it a digit? 025EA FE0A25F2 589 JLE ADDIN jump if yes 025EB 10040011 0 IMM 590 SUB R0 "A"-"0" 025EC 68040005 0 IMM 591 UCPR R0 5 is it "A".."F"? 025ED FE0A25F1 592 JLE ADD10 jump if yes 025EE 10040020 0 IMM 593 SUB R0 "a"-"A" 025EF 68040005 0 IMM 594 UCPR R0 5 is it "a".."f"? 025F0 FE0425F8 595 JGT BADCHAR jump if not 596 * \ / 000025F1 597 ADD10 LABEL 025F1 6016100A 0 0 REG 598 LD R0 R0+10 convert letter to hex digit 000025F2 599 ADDIN LABEL 025F2 E44A41C0 1 1 CBM 600 ST R1 R1/BITS 0:27 shift R1 left 4 bits 025F3 E40A7840 0 1 CBM 601 ST R0 R1/BITS 28:31 and put this char in 025F4 38D6C001 3 3 CACH 602 LEA R3 CACH R3,1 point at next character 025F5 FE0E25E6 603 JMP LOOP and try again 604 * --- 605 000025F6 606 EMPTY LABEL 025F6 6007FFFF 0 IMM 607 LD R0 -1 error code: string is empty 025F7 FE0E25FB 608 JMP RETURN 609 * --- 610 000025F8 611 BADCHAR LABEL 025F8 60040001 0 IMM 612 LD R0 1 error code: bad character 025F9 FE0E25FB 613 JMP RETURN 614 * --- 615 000025FA 616 DONE LABEL 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 87 (CHARSTUFF) F 16 CHARSTUFF - Routines to manipulate character str 025FA 60040000 0 IMM 617 LD R0 0 error code: all is ok 618 * \ / 619 000025FB 620 RETURN LABEL 025FB 5D1F8001 6 STAK 621 LEAVE POP 622 * --- 623 ADD10 000025F1 F 16 592j 597= ADDIN 000025F2 F 16 589j 599= BADCHAR 000025F8 F 16 595j 611= +CHARTOHEX 000025E1 F 16 574 579= DONE 000025FA F 16 586j 616= EMPTY 000025F6 F 16 582j 606= LOOP 000025E6 F 16 584= 603j RETURN 000025FB F 16 608j 613j 620= 624 END 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 88 (CHARSTUFF) F 16 CHARSTUFF - Routines to manipulate character str 626 627 ********************************************************************************** 628 * * 629 * P6TOCHAR. Convert PAK6 item to character string. * 630 * CALL P6TOCHAR * 631 * PARV pak6 item to convert * 632 *optional: PARV field size * 633 * PARL result buffer address * 634 * ST R0 error code (0 = ok) * 635 * ST R1 address of NUL at end of result * 636 * * 637 *Eats R0:R3 (at least) * 638 ********************************************************************************** 639 640 BLOCK 641 642 ENTRY P6TOCHAR 643 644 BEGFRAME 00178801 6 BASE 645 VALUE BSS 1 value to convert 00178802 6 BASE 646 RESULTLEN BSS 1 length of result 647 ENDFRAME 648 025FC 020C25FD 649 P6PTR PTR P6STRING 020025FD 650 P6STRING BSSC 0 025FD 00000032 651 VFDC 000,"0","1","2" 025FE 33343536 652 TEXT "3456789ABCDEFGHIJKLMNOPQRSTUVWXYZ!&_" 653 02607 DD1F8003 6 STAK 654 P6TOCHAR ENTR PUSH 02608 C1578801 6 BASE 655 STPV SP,VALUE save value to convert 02609 D1578802 6 BASE 656 STMW SP,RESULTLEN else say result not specified 0260A F3CA260C 7 657 JBF R7/BIT 5 NOLEN jump if length parm not specified 0260B C1578802 6 BASE 658 STPV SP,RESULTLEN else save result length 0000260C 659 NOLEN LABEL 0260C C012C000 3 REG 660 STPL R3 result buffer pointer 661 0260D EC16C006 3 CACH 662 STZ CACH R3,6 put NUL beyond longest possible string 0260E 60840005 2 IMM 663 LD R2 5 to convert six characters 0260F 60178801 0 6 BASE 664 LD R0 SP,VALUE value to convert 02610 58C40010 IMM 665 IORPSR 010 turn on modified arithmetic 666 00002611 667 LOOP LABEL 02611 62120000 010 REG 668 LD2 R0 R0 swell up for divide 02612 14040028 0 IMM 669 DIV R0 40 R0 = quotient, R1 = remainder 02613 607225FC 1 1 @ 670 LD R1 @P6PTR(R1) get character 02614 E45AD000 1 32 CACH 671 ST R1 CACH R3,0(R2) save it 02615 FAA62611 2 672 JDR R2 LOOP do all characters 02616 58840010 IMM 673 CLBPSR 010 turn off modified arithmetic 674 675 * Now, scan from left to right, and make any letters 676 * that are preceeded by a letter be lower case. 677 02617 EC0BC010 7 CBM 678 STZ R7/BIT 0 say previous is not a letter 02618 6047FFFF 1 IMM 679 LD R1 -1 starting index (to look at previous letter) 00002619 680 LOWERLOOP LABEL 02619 601AC800 0 31 CACH 681 LD R0 CACH R3,0(R1) get a character 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 89 (CHARSTUFF) F 16 CHARSTUFF - Routines to manipulate character str 0261A FA022628 0 682 JEQZ R0 LOWERDONE jump if all done 0261B 28040020 0 IMM 683 BSUB R0 "a"-"A" make sure this is upper case 0261C 64040041 0 IMM 684 CPR R0 "A" 0261D FE082625 685 JLT NOTLETTER jump if not a letter 0261E 6404005A 0 IMM 686 CPR R0 "Z" 0261F FE042625 687 JGT NOTLETTER jump if not a letter 02620 F3C02623 7 688 JBF R7/BIT 0 NOLOWER jump if previous was not a letter 02621 18040020 0 IMM 689 ADD R0 "a"-"A" convert to lower case 02622 E41AC800 0 31 CACH 690 ST R0 CACH R3,0(R1) and save it 00002623 691 NOLOWER LABEL 02623 EDCBC010 7 CBM 692 STW R7/BIT 0 remember that this is a letter 02624 FE0E2626 693 JMP NEXTLOOP 694 * --- 695 00002625 696 NOTLETTER LABEL 02625 EC0BC010 7 CBM 697 STZ R7/BIT 0 remember that this is not a letter 698 * \ / 699 00002626 700 NEXTLOOP LABEL 02626 60565001 1 1 REG 701 LD R1 R1+1 move to next char 02627 FE0E2619 702 JMP LOWERLOOP and do it all again 703 * --- 704 00002628 705 LOWERDONE LABEL 706 02628 6012C000 0 3 REG 707 LD R0 R3 R0 -> destination 02629 60578802 1 6 BASE 708 LD R1 SP,RESULTLEN requested length 0262A 60840000 2 IMM 709 LD R2 0 0262B FA4A2633 1 710 JLEZ R1 NOLEN2 jump if no length specified 0262C FE560000 711 CSRCH find current end of string 0262D FE0C2633 712 JNE NOLEN2 jump if longer than requested 0262E 60920000 2 0 REG 713 LD R2 R0 R2 -> last char so far 0262F FE580020 714 CFILL " " fill remaining characters with spaces 02630 EC168000 2 CACH 715 STZ CACH R2,0 then put NUL at end 02631 38568000 1 2 CACH 716 LEA R1 CACH R2,0 point to end of string 02632 FE0E2636 717 JMP DONE 718 * --- 719 00002633 720 NOLEN2 LABEL 02633 60440063 1 IMM 721 LD R1 99 much longer than possible 02634 FE560000 722 CSRCH find end of string 02635 38560000 1 0 CACH 723 LEA R1 CACH R0,0 R1 -> NUL at end of string 724 * \ / 725 00002636 726 DONE LABEL 02636 60040000 0 IMM 727 LD R0 0 error code: all good 02637 5D1F8003 6 STAK 728 LEAVE POP 729 * --- 730 DONE 00002636 F 16 717j 726= LOOP 00002611 F 16 667= 672j LOWERDONE 00002628 F 16 682j 705= LOWERLOOP 00002619 F 16 680= 702j NEXTLOOP 00002626 F 16 693j 700= NOLEN 0000260C F 16 657j 659= NOLEN2 00002633 F 16 710j 712j 720= 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 90 (CHARSTUFF) F 16 CHARSTUFF - Routines to manipulate character str NOLOWER 00002623 F 16 688j 691= NOTLETTER 00002625 F 16 685j 687j 696= P6PTR 000025FC F 16 649= 670 P6STRING 020025FD F 16 649a 650= +P6TOCHAR 00002607 F 16 642 654= RESULTLEN 00178802 F 16 646= 656s 658s 708 VALUE 00178801 F 16 645= 655s 664 731 END 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 91 (CHARSTUFF) F 16 CHARSTUFF - Routines to manipulate character str 733 734 ********************************************************************************** 735 * * 736 * P12TOCHAR. Convert PAK12 item to character string. * 737 * CALL P12TOCHAR * 738 * PARV2 value to convert * 739 *optional: PARV result size * 740 * PARL result buffer pointer * 741 * ST R0 error code * 742 * ST R1 address of NUL at end of string * 743 * * 744 ********************************************************************************** 745 746 BLOCK 747 748 ENTRY P12TOCHAR 749 750 BEGFRAME 00178801 6 BASE 751 VALUE BSS 2 value to convert 00178803 6 BASE 752 RESULTPTR BSS 1 where to put result 00178804 6 BASE 753 RESULTLEN BSS 1 length for result 754 ENDFRAME 755 02638 DD1F8005 6 STAK 756 P12TOCHAR ENTR PUSH 02639 C3578801 6 BASE 757 STPV2 SP,VALUE value to convert 0263A D1578804 6 BASE 758 STMW SP,RESULTLEN 0263B F3CA263D 7 759 JBF R7/BIT 5 NOLEN jump if length not specified 0263C C1578804 6 BASE 760 STPV SP,RESULTLEN save length for result 0000263D 761 NOLEN LABEL 0263D C0178803 6 BASE 762 STPL SP,RESULTPTR save result pointer 0263E 60D38000 3 6 REG 763 LD R3 SP save copy of stack pointer 764 0263F 5C178802 6 BASE 765 CMZ VALUE(1) does second half exist? 02640 FE02264F 766 JEQ ONEWORD jump if only one word 02641 DC002607 767 CALL P6TOCHAR convert first half 02642 4156C801 3 BASE 768 PARV R3,VALUE pass value to convert 02643 41440006 IMM 769 PARV 6 length for value 02644 6056C803 1 3 BASE 770 LD R1 R3,RESULTPTR 02645 40164000 1 CACH 771 PARL CACH R1,0 pass result pointer 02646 60D38000 3 6 REG 772 LD R3 SP copy stack pointer 02647 DC002607 773 CALL P6TOCHAR convert second half 02648 4156C802 3 BASE 774 PARV R3,VALUE(1) pass second half of value 02649 6016C804 0 3 BASE 775 LD R0 R3,RESULTLEN 0264A 10040006 0 IMM 776 SUB R0 6 0264B 5407FFFF 0 IMM 777 MAX R0 -1 0264C 41520000 0 REG 778 PARV R0 pass length for result 0264D 40164000 1 CACH 779 PARL CACH R1,0 pass result address 0264E FE0E2654 780 JMP DONE 781 * --- 782 0000264F 783 ONEWORD LABEL only one word to convert 0264F DC002607 784 CALL P6TOCHAR convert it 02650 4156C801 3 BASE 785 PARV R3,VALUE 02651 4156C804 3 BASE 786 PARV R3,RESULTLEN 02652 6016C803 0 3 BASE 787 LD R0 R3,RESULTPTR 02653 40160000 0 CACH 788 PARL CACH R0,0 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 92 (CHARSTUFF) F 16 CHARSTUFF - Routines to manipulate character str 789 * \ / 790 00002654 791 DONE LABEL 02654 5D1F8005 6 STAK 792 LEAVE POP 793 * --- 794 DONE 00002654 F 16 780j 791= NOLEN 0000263D F 16 759j 761= ONEWORD 0000264F F 16 766j 783= +P12TOCHAR 00002638 F 16 748 756= +P6TOCHAR 00002607 F 16 767 773 784 RESULTLEN 00178804 F 16 753= 758s 760s 775 786 RESULTPTR 00178803 F 16 752= 762s 770 787 VALUE 00178801 F 16 751= 757s 765 768 774 785 795 END 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 93 (CHARSTUFF) F 16 CHARSTUFF - Routines to manipulate character str 797 798 ********************************************************************************** 799 * * 800 * INTTOCHAR. Convert integer to character string (decimal). * 801 * CALL INTTOCHAR * 802 * PARV value to convert * 803 *optional PARV length of result * 804 * PARL result buffer * 805 * * 806 ********************************************************************************** 807 808 BLOCK 809 810 ENTRY INTTOCHAR 811 812 BEGFRAME 00178801 6 BASE 813 VALUE BSS 1 value to convert 00178802 6 BASE 814 RESULTLEN BSS 1 length for result 0017800C 6 CACH 815 BUFFER BSSC 12 temporary buffer 816 ENDFRAME 817 02655 DD1F8006 6 STAK 818 INTTOCHAR ENTR PUSH 02656 C1578801 6 BASE 819 STPV SP,VALUE save value to convert 02657 D1578802 6 BASE 820 STMW SP,RESULTLEN 02658 F3CA265A 7 821 JBF R7/BIT 5 NOLEN jump if length not specified 02659 C1578802 6 BASE 822 STPV SP,RESULTLEN save result length 0000265A 823 NOLEN LABEL 0265A C012C000 3 REG 824 STPL R3 save result pointer 0265B EC0BC010 7 CBM 825 STZ R7/BIT 0 clear negative flag 0265C 60178801 0 6 BASE 826 LD R0 SP,VALUE get value to convert 0265D FA062660 0 827 JGEZ R0 NOTNEG jump if not negative 0265E EDCBC010 7 CBM 828 STW R7/BIT 0 set negaive flag 0265F 70120000 0 0 REG 829 LDN R0 R0 make value positive 00002660 830 NOTNEG LABEL 02660 6084000B 2 IMM 831 LD R2 11 index into buffer for last char 02661 58C40010 IMM 832 IORPSR 010 set funky arithmetic 833 00002662 834 LOOP LABEL 02662 62120000 010 REG 835 LD2 R0 R0 02663 1404000A 0 IMM 836 DIV R0 10 R0 = quotient, R1 = remainder 02664 60565030 1 1 REG 837 LD R1 R1+"0" convert to printable 02665 E45B900C 1 62 CACH 838 ST R1 SP,BUFFER(R2) save it 02666 E4969001 2 2 REG 839 ST R2 R2+1 decrement index 02667 FA042662 0 840 JGTZ R0 LOOP jump if more to convert 841 02668 58840010 IMM 842 CLBPSR 010 clear modified arithmetic 02669 F3C0266D 7 843 JBF R7/BIT 0 NOTNEG2 jump if number was not negative 0266A 6004002D 0 IMM 844 LD R0 "-" 0266B E41B900C 0 62 CACH 845 ST R0 SP,BUFFER(R2) else put "-" in front of number 0266C E4969001 2 2 REG 846 ST R2 R2+1 decrement index 0000266D 847 NOTNEG2 LABEL 848 0266D E092C000 2 3 REG 849 EXCH R2 R3 swap result ptr & index into BUFFER 0266E 60578802 1 6 BASE 850 LD R1 SP,RESULTLEN get desired result length 0266F 1852C000 1 3 REG 851 ADD R1 R3 02670 1044000B 1 IMM 852 SUB R1 11 R1 = number of characters of padding 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 94 (CHARSTUFF) F 16 CHARSTUFF - Routines to manipulate character str 02671 FA4A2673 1 853 JLEZ R1 NOPAD jump if no padding needed 02672 FE580020 854 CFILL " " put in necessary padding 00002673 855 NOPAD LABEL 02673 381B980D 0 63 CACH 856 LEA R0 SP,BUFFER(R3+1) R0 -> converted string in BUFFER 02674 6044000B 1 IMM 857 LD R1 11 02675 1052C000 1 3 REG 858 SUB R1 R3 R1 = length of converted string 02676 FE400000 859 CMOVE copy into result buffer 02677 38568000 1 2 CACH 860 LEA R1 CACH R2,0 R1 => NUL at end of string 02678 EC164000 1 CACH 861 STZ CACH R1,0 put in the NUL 02679 60040000 0 IMM 862 LD R0 0 error code: all ok 0267A 5D1F8006 6 STAK 863 LEAVE POP 864 * --- 865 BUFFER 0017800C F 16 815= 838s 845s 856a +INTTOCHAR 00002655 F 16 810 818= LOOP 00002662 F 16 834= 840j NOLEN 0000265A F 16 821j 823= NOPAD 00002673 F 16 853j 855= NOTNEG 00002660 F 16 827j 830= NOTNEG2 0000266D F 16 843j 847= RESULTLEN 00178802 F 16 814= 820s 822s 850 VALUE 00178801 F 16 813= 819s 826 866 END 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 95 (CHARSTUFF) F 16 CHARSTUFF - Routines to manipulate character str 868 869 ********************************************************************************** 870 * * 871 * HEXTOCHAR. Convert integer to character string (in hex). * 872 * CALL HEXTOCHAR * 873 * PARV value to convert * 874 *optional: PARV result size * 875 * PARL result buffer * 876 * ST R0 error code * 877 * ST R1 address of NUL at end of result * 878 * * 879 ********************************************************************************** 880 881 BLOCK 882 883 ENTRY HEXTOCHAR 884 885 BEGFRAME 00178801 6 BASE 886 VALUE BSS 1 value to convert 00178802 6 BASE 887 VALUEPTR BSS 1 pointer to one digit in value 00178803 6 BASE 888 RESULTLEN BSS 1 length of result 889 ENDFRAME 890 0267B 020C267C 891 CHARPTR PTR CHARSTRING 0200267C 892 CHARSTRING BSSC 0 0267C 30313233 893 TEXT "0123456789ABCDEF" 894 02680 DD1F8004 6 STAK 895 HEXTOCHAR ENTR PUSH 02681 C1578801 6 BASE 896 STPV SP,VALUE save value to convert 02682 E4178803 0 6 BASE 897 ST R0 SP,RESULTLEN 02683 60040008 0 IMM 898 LD R0 8 02684 E0178803 0 6 BASE 899 EXCH R0 SP,RESULTLEN default result length to 8 02685 F3CA2687 7 900 JBF R7/BIT 5 NOLEN jump if length not given 02686 C1578803 6 BASE 901 STPV SP,RESULTLEN save result length 00002687 902 NOLEN LABEL 02687 C0128000 2 REG 903 STPL R2 set result buffer pointer 904 02688 60578803 1 6 BASE 905 LD R1 SP,RESULTLEN 02689 10440008 1 IMM 906 SUB R1 8 amount of padding needed 0268A FA4A268C 1 907 JLEZ R1 NOPAD jump if no padding 0268B FE580020 908 CFILL " " put in the padding 0000268C 909 NOPAD LABEL 910 0268C 60578803 1 6 BASE 911 LD R1 SP,RESULTLEN 0268D 50440008 1 IMM 912 MIN R1 8 number of digits wanted 0268E 389A8800 2 21 CACH 913 LEA R2 CACH R2,0(R1) point to end of result 0268F 70524000 1 1 REG 914 LDN R1 R1 make negative 02690 38098042 0 6 ZBM 915 LEA R0 VALUE/BITS 0:3(8) pointer after last digit wanted 02691 E4178802 0 6 BASE 916 ST R0 SP,VALUEPTR save it 917 00002692 918 LOOP LABEL 02692 601D8C02 0 61 FPVR 919 LD R0 @(SP,VALUEPTR)(R1) get a digit 02693 6030267B 0 0 @ 920 LD R0 @CHARPTR(R0) convert to printable 02694 E41A8800 0 21 CACH 921 ST R0 CACH R2,0(R1) save it 02695 FA602692 1 922 IRJ R1 LOOP and loop till all done 923 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 96 (CHARSTUFF) F 16 CHARSTUFF - Routines to manipulate character str 02696 60528000 1 2 REG 924 LD R1 R2 point to end of buffer 02697 EC164000 1 CACH 925 STZ CACH R1,0 put NUL at end 02698 60040000 0 IMM 926 LD R0 0 error code: good return 02699 5D1F8004 6 STAK 927 LEAVE POP 928 * --- 929 CHARPTR 0000267B F 16 891= 920 CHARSTRING 0200267C F 16 891a 892= +HEXTOCHAR 00002680 F 16 883 895= LOOP 00002692 F 16 918= 922j NOLEN 00002687 F 16 900j 902= NOPAD 0000268C F 16 907j 909= RESULTLEN 00178803 F 16 888= 897s 899s 901s 905 911 VALUE 00178801 F 16 886= 896s 915a VALUEPTR 00178802 F 16 887= 916s 919 930 END 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 97 (CHARSTUFF) F 16 CHARSTUFF - Routines to manipulate character str 932 933 ********************************************************************************** 934 * * 935 * LENGTH. Compute the length of a string. * 936 * CALL LENGTH * 937 * PARL string * 938 * ST R0 length, in characters * 939 * ST R1 pointer to final NUL * 940 * * 941 ********************************************************************************** 942 943 BLOCK 944 945 ENTRY LENGTH 946 947 BEGFRAME 948 ENDFRAME 949 0269A DD1F8001 6 STAK 950 LENGTH ENTR PUSH 0269B C0120000 0 REG 951 STPL R0 R0 -> string 0269C 604403E7 1 IMM 952 LD R1 999 big number 0269D 60840000 2 IMM 953 LD R2 0 0269E FE560000 954 CSRCH find 0 at end of string 0269F 304403E7 1 IMM 955 RSB R1 999 R1 = size of string, R0 -> NUL 026A0 E0124000 0 1 REG 956 EXCH R0 R1 R0 = length, R1 -> end 026A1 5D1F8001 6 STAK 957 LEAVE POP 958 * --- 959 +LENGTH 0000269A F 16 945 950= 960 END 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 98 (CHARSTUFF) F 16 CHARSTUFF - Routines to manipulate character str 962 963 ********************************************************************************** 964 * * 965 * MOVE. Move a string. * 966 * CALL MOVE * 967 * PAR source string * 968 * PARL destination location * 969 * ST R1 address of final NUL at end of result * 970 * * 971 ********************************************************************************** 972 973 BLOCK 974 975 ENTRY MOVE 976 977 BEGFRAME 00178801 6 BASE 978 STRING1 BSS 1 pointer to first string 00178802 6 BASE 979 STRING2 BSS 1 pointer to second string 980 ENDFRAME 981 026A2 DD1F8003 6 STAK 982 MOVE ENTR PUSH 026A3 C1178801 6 BASE 983 STP SP,STRING1 save address of first string 026A4 C0178802 6 BASE 984 STPL SP,STRING2 save address of second string 985 026A5 60178801 0 6 BASE 986 LD R0 SP,STRING1 get pointer to first string 026A6 DC00269A 987 CALL LENGTH 026A7 40160000 0 CACH 988 PARL CACH R0,0 get end of first string 026A8 60520000 1 0 REG 989 LD R1 R0 R1 = length of source string 026A9 60178801 0 6 BASE 990 LD R0 SP,STRING1 R0 -> source string 026AA 60978802 2 6 BASE 991 LD R2 SP,STRING2 R2 -> destination 026AB FE400000 992 CMOVE copy second string 026AC 38568000 1 2 CACH 993 LEA R1 CACH R2,0 point to end of second string 026AD EC164000 1 CACH 994 STZ CACH R1,0 put a NUL at end of it 026AE 60040000 0 IMM 995 LD R0 0 error code: good return 026AF 5D1F8003 6 STAK 996 LEAVE POP 997 * --- 998 +LENGTH 0000269A F 16 987 +MOVE 000026A2 F 16 975 982= STRING1 00178801 F 16 978= 983s 986 990 STRING2 00178802 F 16 979= 984s 991 999 END 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 99 (CHARSTUFF) F 16 CHARSTUFF - Routines to manipulate character str 1001 1002 ********************************************************************************** 1003 * * 1004 * Convert a string to upper case. * 1005 * * 1006 * This routine will convert every lower-case letter in * 1007 * a string to the corresponding upper-case letter. * 1008 * * 1009 * CALL UPPERFY * 1010 * PARL string * 1011 * * 1012 ********************************************************************************** 1013 1014 BLOCK 1015 1016 ENTRY UPPERFY 1017 1018 BEGFRAME 1019 ENDFRAME 1020 026B0 DD1F8001 6 STAK 1021 UPPERFY ENTR PUSH 026B1 C0124000 1 REG 1022 STPL R1 R1 -> string 1023 000026B2 1024 LOOP LABEL 026B2 60164000 0 1 CACH 1025 LD R0 CACH R1,0 get a character 026B3 FA0226BC 0 1026 JEQZ R0 RETURN jump if end of string 026B4 64040061 0 IMM 1027 CPR R0 "a" 026B5 FE0826BA 1028 JLT NEXT 026B6 6404007A 0 IMM 1029 CPR R0 "z" 026B7 FE0426BA 1030 JGT NEXT 026B8 1807FFE0 0 IMM 1031 ADD R0 "A"-"a" convert lower case to upper case 026B9 E4164000 0 1 CACH 1032 ST R0 CACH R1,0 replace the character 000026BA 1033 NEXT LABEL 026BA 38564001 1 1 CACH 1034 LEA R1 CACH R1,1 point to next character 026BB FE0E26B2 1035 JMP LOOP and do it all again 1036 * --- 1037 000026BC 1038 RETURN LABEL 026BC 5D1F8001 6 STAK 1039 LEAVE POP 1040 * --- 1041 LOOP 000026B2 F 16 1024= 1035j NEXT 000026BA F 16 1028j 1030j 1033= RETURN 000026BC F 16 1026j 1038= +UPPERFY 000026B0 F 16 1016 1021= 1042 END 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 100 (CHARSTUFF) F 16 CHARSTUFF - Routines to manipulate character str 1044 1045 ********************************************************************************** 1046 * * 1047 * COMPARE - Compare two strings * 1048 * * 1049 * This routine will compare two strings, returning an * 1050 * indication of whether they compare less than, equal to, * 1051 * or greater than. If one string is a left prefix of the * 1052 * other, than that string compares less than. (i.e., * 1053 * "ABC" < "ABCDE"). * 1054 * * 1055 * CALL COMPARE * 1056 * PAR string one * 1057 * PARL string two * 1058 * JLTZ R0 string one < string two * 1059 * JEQZ R0 string one = string two * 1060 * JGTZ R0 string one > string two * 1061 * * 1062 ********************************************************************************** 1063 1064 BLOCK 1065 1066 ENTRY COMPARE 1067 1068 BEGFRAME 00178801 6 BASE 1069 STRING1 BSS 1 address of first string 00178802 6 BASE 1070 STRING2 BSS 1 address of second string 1071 ENDFRAME 1072 026BD DD1F8003 6 STAK 1073 COMPARE ENTR PUSH 026BE C1178801 6 BASE 1074 STP SP,STRING1 026BF C0178802 6 BASE 1075 STPL SP,STRING2 1076 026C0 60178801 0 6 BASE 1077 LD R0 SP,STRING1 026C1 DC00269A 1078 CALL LENGTH get length of first string 026C2 40160000 0 CACH 1079 PARL CACH R0,0 1080 026C3 60561001 1 0 REG 1081 LD R1 R0+1 R1 = length + 1 of first string 026C4 60178801 0 6 BASE 1082 LD R0 SP,STRING1 R0 -> first string 026C5 60978802 2 6 BASE 1083 LD R2 SP,STRING2 R2 -> second string 026C6 FE540000 1084 CMS compare the strings 1085 026C7 6007FFFF 0 IMM 1086 LD R0 -1 026C8 FE0826CC 1087 JLT RETURN jump if string1 < string2 026C9 60040000 0 IMM 1088 LD R0 0 026CA FE0226CC 1089 JEQ RETURN jump if string1 = string2 026CB 60040001 0 IMM 1090 LD R0 1 1091 * \ / 1092 000026CC 1093 RETURN LABEL 026CC 5D1F8003 6 STAK 1094 LEAVE POP 1095 * --- 1096 +COMPARE 000026BD F 16 1066 1073= +LENGTH 0000269A F 16 1078 RETURN 000026CC F 16 1087j 1089j 1093= 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 101 (CHARSTUFF) F 16 CHARSTUFF - Routines to manipulate character str STRING1 00178801 F 16 1069= 1074s 1077 1082 STRING2 00178802 F 16 1070= 1075s 1083 1097 END 1098 ASCIIPTR 0000250B F 16 135 147= 336 +CHARTOHEX 000025E1 F 16 93 574 579= +CHARTOINT 000025C5 F 16 92 507 513= +CHARTOP12 000025B8 F 16 91 467 473= +CHARTOP6 0000259E F 16 90 386 410= 475 481 +COMPARE 000026BD F 16 101 1066 1073= COPYPAREN 00002547 F 16 240 281 287= 346 CSVERSION 00002509 F 16 103= DLM 00000001 F 16 137 143= 150x 150x 150x 150x 150x 150x 150x 151x 151x 151x 151x 151x 151x 151x 151x 152x 152x 152x 152x 152x 152x 152x 152x 153x 153x 153x 153x 153x 153x 153x 153x 154x 155x 165x 209 EOL 00000002 F 16 138 144= 150x 216 +GETITEM 00002514 F 16 89 133 176= +HEXTOCHAR 00002680 F 16 97 883 895= +INTTOCHAR 00002655 F 16 96 810 818= +LENGTH 0000269A F 16 98 945 950= 987 1078 +MOVE 000026A2 F 16 99 975 982= NOR 00000000 F 16 136 142= 154x 154x 154x 154x 154x 154x 155x 155x 155x 155x 155x 156x 156x 156x 156x 156x 156x 156x 156x 157x 157x 157x 157x 157x 157x 158x 158x 158x 158x 158x 158x 158x 158x 159x 159x 159x 159x 159x 159x 159x 159x 160x 160x 160x 160x 160x 160x 160x 160x 161x 161x 161x 161x 161x 161x 162x 162x 162x 162x 162x 162x 162x 162x 163x 163x 163x 163x 163x 163x 163x 163x 164x 164x 164x 164x 164x 164x 164x 164x 165x 165x 165x 165x 165x 227 +P12TOCHAR 00002638 F 16 95 748 756= +P6TOCHAR 00002607 F 16 94 642 654= 767 773 784 PAR 00000003 F 16 139 145= 154x 155x 155x 157x 157x 161x 161x 165x 165x 238 337 +UPPERFY 000026B0 F 16 100 1016 1021= 1099 END final end of charStuff 1044 PREPOUTM PURE,OFFLINE,R,YES 1044 * Generating PREPOUT, variables=PURE, output=OFFLINE, name=PREPOUTR, charm=YES 1044 NOLIST CREF 1044 NOLIST MAP 1044 INPUT .SYS:PO!PURE1INE,R,YES 1 * PO!PURE1.ASSEM, included by PREPOUTM macro when pure code is wanted. 2 3 BLOCK 4 ENTRY PREPOUT!!! 5 VARS 00001E6D ABS 6 VARS!1 EQU DISPW MA 0 7 PROG 000026CD 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 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 102 (PO!PURE1) F 17 CHARSTUFF - Routines to manipulate character str 18 ENTRY PROG!2 19 ENTRY VARS!2 20 INITPSECT PROG!1,VARS!1,PROGRAM 1044 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 1044 INPUT .SYS:PO!CHARMYESuded by PREPOUTM macro when offline output is wanted. 1 * File PO!CHARMYES, included by PREPOUTM macro when program already 2 * includes the CHARM macro. 3 4 EXT GETITEM extract one item from a string 5 EXT CHARTOP6 convert string to PAK6 item 6 EXT CHARTOP12 convert string to PAK12 item 7 EXT CHARTOINT convert string to integer 8 EXT CHARTOHEX convert string (base 16) to integer 9 EXT P6TOCHAR convert PAK6 value to string 10 EXT P12TOCHAR convert PAK12 value to string 11 EXT INTTOCHAR convert integer to string (decimal) 12 EXT HEXTOCHAR convert integer to string (base 16) 13 EXT LENGTH return the length of a string 14 EXT MOVE move a string 15 EXT UPPERFY convert a string to upper case 16 EXT COMPARE compare two strings 1044 INPUT .SYS:PO!PREPOUTwo strings 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 * 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: * 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 103 (PO!PREPOUT) F 20 PREPOUT - Flexible Output Routine 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 * 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 * 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 104 (PO!PREPOUT) F 20 PREPOUT - Flexible Output Routine 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 00001E6D 112 PREPOUTS BSS 1 return link area 00001E6E 113 PREPOUTR23 BSS 2 save area for R2,R3 00001E70 114 PREPOUTR45 BSS 2 save area for R4,R5 00001E72 115 PREPOUTR6 BSS 1 save area for R6 00001E73 116 NEXTPARM BSS 1 ptr to next in PARMVECTOR during parms 00001E74 117 PARMCOUNT BSS 1 count of values to format 00001E75 118 PARMVECTOR BSS 20 pointers to values 00001E89 119 BACKUPPT BSS 1 where to back up to on input error 00001E8A 120 NUMBER BSS 5 buffer for input item 00000014 ABS 121 NUMLEN EQU DISPC NUMBER size of above 00001E8F 122 PARMPTR BSS 1 pointer to current parm while unpacking 00001E90 123 UNPAKRTN BSS 1 ptr to routine to do unpacking 00001E91 124 FIELDLEN BSS 1 length fo field 00001E92 125 FIELDBEGIN BSS 1 beginning of field 00001E93 126 OUTBUF BSS 64 output line buffer 127 BSS 64 stack 00001F13 128 STACK LABEL label on top of stack 129 130 PROG 026CD DD801E6D 131 PREPOUT!!! ENTRS PREPOUTS 026CE E4801E6E 2 132 ST R2 PREPOUTR23 save a register 026CF 38801E75 2 133 LEA R2 PARMVECTOR 026D0 E4801E73 2 134 ST R2 NEXTPARM initialize NEXTPARM 026D1 EC001E74 135 STZ PARMCOUNT initialize PARMCOUNT 026D2 60801E6E 2 136 LD R2 PREPOUTR23 restore a register 026D3 DCD3C000 7 REG 137 EXPCS R7 go get the parms 138 * \ / 000026D4 139 GETPARM LABEL 026D4 F3C826D9 7 140 JBF R7/BIT 4 LASTPARM jump if this is the last parm 026D5 D0001E74 141 INC PARMCOUNT count the parms 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 105 (PO!PREPOUT) F 20 PREPOUT - Flexible Output Routine 026D6 D0801E73 142 INCP NEXTPARM set where to put it 026D7 C1101E73 @ 143 STP @NEXTPARM store the parm (and get next) 026D8 FE0E26D4 144 JMP GETPARM 145 * --- 000026D9 146 LASTPARM LABEL 026D9 E6801E6E 23 147 ST2 R2 PREPOUTR23 save R2,R3 026DA E7001E70 45 148 ST2 R4 PREPOUTR45 save R4,R5 026DB E5801E72 6 149 ST R6 PREPOUTR6 save R6 026DC C0134000 5 REG 150 STPL R5 input string pointed to by R5 026DD 61841F13 6 IMM 151 LD SP ADR STACK get a stack pointer 152 * \ / 153 026DE 61041E93 4 IMM 154 LD R4 ADR OUTBUF R4 points to output buffer 000026DF 155 NEXTCHAR LABEL move next character 026DF 60174000 0 5 CACH 156 LD R0 CACH R5,0 get an input character 026E0 FA0226E7 0 157 JEQZ R0 PREPDONE jump if no end of string (nul) 026E1 6404005C 0 IMM 158 CPR R0 "\" is it the escape character? 026E2 FE0226EF 159 JEQ INSERT if so, insert an unpacked item 000026E3 160 PLACECHAR LABEL 026E3 E4170000 0 4 CACH 161 ST R0 CACH R4,0 put char into output buffer 026E4 39170001 4 4 CACH 162 LEA R4 CACH R4,1 advance output pointer 000026E5 163 INSDONE LABEL 026E5 39574001 5 5 CACH 164 LEA R5 CACH R5,1 advance input pointer 026E6 FE0E26DF 165 JMP NEXTCHAR 166 * --- 167 168 * Line preparation finished -- write out the line 000026E7 169 PREPDONE LABEL 026E7 60841E93 2 IMM 170 LD R2 ADR OUTBUF R2 => output buffer 026E8 604A9F30 1 2 CBM 171 LD R1 R2/FLDCHARS 026E9 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 026EA DC5013F4 @ 173 CALLNP @VWRITELINE 174 026EB 62801E6E 23 175 LD2 R2 PREPOUTR23 restore R2,R3 026EC 63001E70 45 176 LD2 R4 PREPOUTR45 restore R4,R5 026ED 61801E72 6 177 LD R6 PREPOUTR6 restore R6 026EE 5D001E6D 178 LEAVE PREPOUTS 179 * --- 180 181 * Insertion control character -- decode operation 000026EF 182 INSERT LABEL 026EF E5401E89 5 183 ST R5 BACKUPPT save position to back up to 026F0 39574001 5 5 CACH 184 LEA R5 CACH R5,1 026F1 60174000 0 5 CACH 185 LD R0 CACH R5,0 get control character 026F2 6404005C 0 IMM 186 CPR R0 "\" two backslashes mean one 026F3 FE0226E3 187 JEQ PLACECHAR 188 * \ / 026F4 60C40009 3 IMM 189 LD R3 COMCNT-1 026F5 7804005F 0 IMM 190 AND R0 05F a cheap upperfication 000026F6 191 TRYCOM LABEL 026F6 606626FD 1 3 192 LD R1 COMTAB(R3) 026F7 640A4080 0 1 CBM 193 CPR R0 R1/COMCHAR is this our command? 026F8 FE022707 194 JEQ COMFOUND jump if so 026F9 FAE626F6 3 195 JDR R3 TRYCOM jump if more to look 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 106 (PO!PREPOUT) F 20 PREPOUT - Flexible Output Routine 196 * \ / 197 * Unknown command - copy it out for all to see 198 000026FA 199 BADCMD LABEL 026FA 61401E89 5 200 LD R5 BACKUPPT back up the input pointer 026FB 6004005C 0 IMM 201 LD R0 "\" put expected value into R0 026FC FE0E26E3 202 JMP PLACECHAR 203 * --- 204 00000080 BYTE 205 COMCHAR EQU BITS 0:7 000026FD 206 COMTAB LABEL 026FD 41002737 207 VFD "A"*COMCHAR+ADR INSACCT account name 026FE 4300275D 208 VFD "C"*COMCHAR+ADR INSCHAR character string 026FF 44002763 209 VFD "D"*COMCHAR+ADR INSDEC decimal number 02700 4500276C 210 VFD "E"*COMCHAR+ADR INSERRM error message 02701 4600273A 211 VFD "F"*COMCHAR+ADR INSFILE filename 02702 48002775 212 VFD "H"*COMCHAR+ADR INSHEX hexadeciaml number 02703 5200277E 213 VFD "R"*COMCHAR+ADR INSRAD short symbol 02704 53002784 214 VFD "S"*COMCHAR+ADR INSSYM symbol 02705 54002801 215 VFD "T"*COMCHAR+ADR INTIME double word time 02706 5A0027F7 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 00002707 221 COMFOUND LABEL 02707 38564800 1 1 BASE 222 LEA R1 R1,0 clear high bits 02708 E4401E90 1 223 ST R1 UNPAKRTN save pointer to unpacking routine 02709 39574001 5 5 CACH 224 LEA R5 CACH R5,1 0270A DC002514 225 CALL GETITEM get parameter number to unpack 0270B 41174000 5 CACH 226 PAR CACH R5,0 0270C 4144005C IMM 227 PARV "\" 0270D 41001E8A 228 PAR NUMBER 0270E 40440014 IMM 229 PARVL NUMLEN 0270F FA0C26FA 0 230 JNEZ R0 BADCMD jump if couldn't get an item 02710 61524000 5 1 REG 231 LD R5 R1 point past end of item 02711 DC0025C5 232 CALL CHARTOINT convert the item 02712 40001E8A 233 PARL NUMBER 02713 FA0C26FA 0 234 JNEZ R0 BADCMD jump if we can't convert it 02714 68401E74 1 235 UCPR R1 PARMCOUNT is the number reasonable? 02715 FE0426FA 236 JGT BADCMD jump if not 02716 60221E75 0 1 237 LD R0 PARMVECTOR(R1) R1 -> data to convert 02717 E4001E8F 0 238 ST R0 PARMPTR save it 02718 6047FFFF 1 IMM 239 LD R1 -1 default field size 02719 60174000 0 5 CACH 240 LD R0 CACH R5,0 get terminating character of first num 0271A 6404002C 0 IMM 241 CPR R0 "," is there a field size? 0271B FE0C2726 242 JNE NOSIZE jump if not 0271C DC002514 243 CALL GETITEM get next item 0271D 41174000 5 CACH 244 PAR CACH R5,0 0271E 4144005C IMM 245 PARV "\" 0271F 41001E8A 246 PAR NUMBER 02720 40440014 IMM 247 PARVL NUMLEN 02721 FA0C26FA 0 248 JNEZ R0 BADCMD jump if couldn't get it 02722 61524000 5 1 REG 249 LD R5 R1 copy input pointer 02723 DC0025C5 250 CALL CHARTOINT convert it to integer 02724 40001E8A 251 PARL NUMBER 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 107 (PO!PREPOUT) F 20 PREPOUT - Flexible Output Routine 02725 FA0C26FA 0 252 JNEZ R0 BADCMD jump if wouldn't convert 00002726 253 NOSIZE LABEL 02726 E4401E91 1 254 ST R1 FIELDLEN save field size 02727 60174000 0 5 CACH 255 LD R0 CACH R5,0 get next character 02728 6404005C 0 IMM 256 CPR R0 "\" is it end of spec? 02729 FE0C26FA 257 JNE BADCMD if not, something is rotten 0272A E5001E92 4 258 ST R4 FIELDBEGIN save for length calculation 0272B E1401E8F 5 259 EXCH R5 PARMPTR R5 -> value to convert 0272C DC501E90 @ 260 CALLNP @UNPAKRTN unpack the item 0272D 61401E8F 5 261 LD R5 PARMPTR R5 -> input string 0272E 604B1F30 1 4 CBM 262 LD R1 R4/FLDCHARS get character addr of next char 0272F 60001E92 0 263 LD R0 FIELDBEGIN 02730 104A1F30 1 0 CBM 264 SUB R1 R0/FLDCHARS R1 = number of chars generated for item 02731 30401E91 1 265 RSB R1 FIELDLEN R1 = size required 02732 FA4A2736 1 266 JLEZ R1 NOFILL jump if no fill required 02733 60930000 2 4 REG 267 LD R2 R4 02734 FE580020 268 CFILL " " fill out field with blanks 02735 39168000 4 2 CACH 269 LEA R4 CACH R2,0 R4 -> new output location 00002736 270 NOFILL LABEL 02736 FE0E26E5 271 JMP INSDONE all done inserting 272 * --- 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 108 (PO!PREPOUT) F 20 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 00002737 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 02737 DD5F8002 6 STAK 296 INSACCT ENTRNP STAK SP,FRAMELEN 02738 60040002 0 IMM 297 LD R0 2 number of groups to do 02739 FE0E273C 298 JMP COMMON 299 * --- 300 0273A DD5F8002 6 STAK 301 INSFILE ENTRNP STAK SP,FRAMELEN 0273B 60040003 0 IMM 302 LD R0 3 number of groups to do 303 * \ / 304 0000273C 305 COMMON LABEL 0273C E4178801 0 6 BASE 306 ST R0 ITEMNUM save the count 0000273D 307 ITEMLOOP LABEL 0273D 60174800 0 5 BASE 308 LD R0 R5,0 get first half of name 0273E FA0C2742 0 309 JNEZ R0 DOITEM jump if name specified 0273F 60174802 0 5 BASE 310 LD R0 R5,2 get extension 02740 FA022753 0 311 JEQZ R0 SKIPITEM jump if neither specified 02741 FA2C2753 0 312 JEQMW R0 SKIPITEM ditto 00002742 313 DOITEM LABEL 314 02742 DC002638 315 CALL P12TOCHAR unpack the name 02743 43574800 5 BASE 316 PARV2 R5,0 02744 40170000 4 CACH 317 PARL CACH R4,0 02745 61124000 4 1 REG 318 LD R4 R1 02746 60174802 0 5 BASE 319 LD R0 R5,2 get extension 02747 FA2C274E 0 320 JEQMW R0 NOEXT jump if extension defaulted 02748 6004002E 0 IMM 321 LD R0 "." 02749 E4170000 0 4 CACH 322 ST R0 CACH R4,0 place dot 0274A DC002607 323 CALL P6TOCHAR unpack the extension 0274B 41574802 5 BASE 324 PARV R5,2 0274C 40170001 4 CACH 325 PARL CACH R4,1 0274D 61124000 4 1 REG 326 LD R4 R1 0000274E 327 NOEXT LABEL 0274E 5C174803 5 BASE 328 CMZ R5,3 is password specified? 0274F FE022753 329 JEQ NOPASSW jump if not 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 109 (PO!PREPOUT) F 20 PREPOUT - Flexible Output Routine 02750 60042829 0 IMM 330 LD R0 "()" 02751 E4090100 0 4 ZBM 331 ST R0 R4,0/BITS 0:15 place symbol for password 02752 39170002 4 4 CACH 332 LEA R4 CACH R4,2 bump output pointer 00002753 333 NOPASSW LABEL 00002753 334 SKIPITEM LABEL 02753 39574805 5 5 BASE 335 LEA R5 R5,5 point at next item to unpack 02754 D0578801 6 BASE 336 DEC ITEMNUM one fewer to do 02755 FE0A275C 337 JLE DONE jump if all done 02756 65001E92 4 338 CPR R4 FIELDBEGIN have we output anything yet? 02757 FE02273D 339 JEQ ITEMLOOP if not, don't need a colon 02758 6004003A 0 IMM 340 LD R0 ":" 02759 E4170000 0 4 CACH 341 ST R0 CACH R4,0 place separator between items 0275A 39170001 4 4 CACH 342 LEA R4 CACH R4,1 bump output pointer 0275B FE0E273D 343 JMP ITEMLOOP go do next item 344 * --- 345 0000275C 346 DONE LABEL 0275C 5D1F8002 6 STAK 347 LEAVE STAK SP,FRAMELEN return, all done 348 * --- 349 +P12TOCHAR 00002638 F 20 315 +P6TOCHAR 00002607 F 20 323 350 END INSACCT and INSFILE subroutines 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 110 (PO!PREPOUT) F 20 PREPOUT - Flexible Output Routine 352 353 ********************************************************************************** 354 * * 355 * Output a character string. * 356 * * 357 ********************************************************************************** 358 0275D DD5F8001 6 STAK 359 INSCHAR ENTRNP STAK SP,1 0275E DC0026A2 360 CALL MOVE move the string to output 0275F 41174000 5 CACH 361 PAR CACH R5,0 source location 02760 40170000 4 CACH 362 PARL CACH R4,0 destination location 02761 61124000 4 1 REG 363 LD R4 R1 bump output pointer 02762 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 02763 DD5F8001 6 STAK 377 INSDEC ENTRNP STAK SP,1 02764 DC002655 378 CALL INTTOCHAR 02765 41574400 5 @R 379 PARV @R5 02766 60001E91 0 380 LD R0 FIELDLEN 02767 FA0A2769 0 381 JLEZ R0 NOLEN 02768 41401E91 382 PARV FIELDLEN 00002769 383 NOLEN LABEL 02769 40170000 4 CACH 384 PARL CACH R4,0 0276A 61124000 4 1 REG 385 LD R4 R1 0276B 5D1F8001 6 STAK 386 LEAVE STAK SP,1 387 * --- 388 +INTTOCHAR 00002655 F 20 378 389 END INSDEC subroutine 390 391 392 ********************************************************************************** 393 * * 394 * Unpack an error code. * 395 * * 396 ********************************************************************************** 397 0276C DD5F8001 6 STAK 398 INSERRM ENTRNP STAK SP,1 0276D 60974400 2 5 @R 399 LD R2 @R5 get error code 0276E 60040028 0 IMM 400 LD R0 URERRORGET 0276F 60530000 1 4 REG 401 LD R1 R4 where to put it 02770 09040064 IMM 402 UREQ 100 get error code 02771 FA082774 0 403 JLTZ R0 BADERRCODE jump if erroneous error code 02772 30440064 1 IMM 404 RSB R1 100 02773 391B0800 4 41 CACH 405 LEA R4 CACH R4,0(R1) point after end of string 00002774 406 BADERRCODE LABEL 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 111 (PO!PREPOUT) F 20 PREPOUT - Flexible Output Routine 02774 5D1F8001 6 STAK 407 LEAVE STAK SP,1 408 * --- 409 410 411 ********************************************************************************** 412 * * 413 * Unpack a hex number. * 414 * * 415 ********************************************************************************** 416 417 INSHEX BLOCK INSHEX subroutine 418 ENTRY INSHEX 419 02775 DD5F8001 6 STAK 420 INSHEX ENTRNP STAK SP,1 02776 DC002680 421 CALL HEXTOCHAR 02777 41574400 5 @R 422 PARV @R5 02778 60001E91 0 423 LD R0 FIELDLEN 02779 FA0A277B 0 424 JLEZ R0 NOLEN jump if no field specified 0277A 41401E91 425 PARV FIELDLEN 0000277B 426 NOLEN LABEL 0277B 40170000 4 CACH 427 PARL CACH R4,0 0277C 61124000 4 1 REG 428 LD R4 R1 0277D 5D1F8001 6 STAK 429 LEAVE STAK SP,1 430 * --- 431 +HEXTOCHAR 00002680 F 20 421 432 END INSHEX subroutine 433 434 435 ********************************************************************************** 436 * * 437 * Output a PAK6 symbol. * 438 * * 439 ********************************************************************************** 440 0277E DD5F8001 6 STAK 441 INSRAD ENTRNP STAK SP,1 0277F DC002607 442 CALL P6TOCHAR 02780 41574400 5 @R 443 PARV @R5 02781 40170000 4 CACH 444 PARL CACH R4,0 02782 61124000 4 1 REG 445 LD R4 R1 02783 5D1F8001 6 STAK 446 LEAVE STAK SP,1 447 * --- 448 449 450 ********************************************************************************** 451 * * 452 * Output a PAK12 symbol. * 453 * * 454 ********************************************************************************** 455 02784 DD5F8001 6 STAK 456 INSSYM ENTRNP STAK SP,1 02785 DC002638 457 CALL P12TOCHAR 02786 43574400 5 @R 458 PARV2 @R5 02787 40170000 4 CACH 459 PARL CACH R4,0 02788 61124000 4 1 REG 460 LD R4 R1 02789 5D1F8001 6 STAK 461 LEAVE STAK SP,1 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 112 (PO!PREPOUT) F 20 PREPOUT - Flexible Output Routine 462 * --- 463 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 000027F7 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 027F7 DD5F8008 6 STAK 510 INSTIME ENTRNP STAK SP,STACKFRAME subroutine starts here 027F8 EE178805 6 BASE 511 STZ2 SP,RAWTIME zero out rawtime 027F9 60574400 1 5 @R 512 LD R1 @R5 get time 027FA E449A805 1 6 ZBM 513 ST R1 SP,RAWTIME/BITS 20:51 store in double word format 027FB 62002871 01 514 LD2 R0 MINRND get rounding factor 027FC 9A178805 016 BASE 515 ADD2M R0 SP,RAWTIME add in rounding factor 027FD 60174801 0 5 BASE 516 LD R0 R5,1 get time zone stuff 027FE E4178807 0 6 BASE 517 ST R0 SP,TIMEZONE 027FF EDCBC010 7 CBM 518 STW R7/SINGLE set flag to indicate single word 02800 FE0E2808 519 JMP CONVERT skip over double word entry 520 * --- 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 113 (PO!PREPOUT) F 20 System date packers and unpackers 521 02801 DD5F8008 6 STAK 522 INTIME ENTRNP STAK SP,STACKFRAME subroutine starts here 02802 62174400 015 @R 523 LD2 R0 @R5 get raw time 02803 1A002873 01 524 ADD2 R0 SECRND add in rounding factor 02804 E6178805 016 BASE 525 ST2 R0 SP,RAWTIME 02805 60174802 0 5 BASE 526 LD R0 R5,2 get time zone stuff 02806 E4178807 0 6 BASE 527 ST R0 SP,TIMEZONE 02807 EC0BC010 7 CBM 528 STZ R7/SINGLE say it's not one word 529 530 * convert to local time (TIMEZONE) 531 * \ / 00002808 532 CONVERT LABEL 02808 60001E91 0 533 LD R0 FIELDLEN pick up the user specified length 02809 E4178803 0 6 BASE 534 ST R0 XFIELDLEN and save it 0280A D1401E91 535 STMW FIELDLEN set the default so our SRs work properly 0280B 62978805 236 BASE 536 LD2 R2 SP,RAWTIME 0280C EC0A8140 2 CBM 537 STZ R2/BITS 0:19 get rid of unnecessary stuff 0280D 60578807 1 6 BASE 538 LD R1 SP,TIMEZONE get timezone info 0280E 700A7010 0 1 CBM 539 LDN R0 R1/BIT 24 get sign bit of 4th byte 0280F E40A4180 0 1 CBM 540 ST R0 R1/BITS 0:23 sign extend the number 02810 1E00286D 01 541 MUL2 R0 ONEHOUR2 make time zone differences into ms 02811 1A940000 2301 PAIR 542 ADD2 R2 PAIR R0 adjust time 543 544 * unpack the raw time into time, date, month, year, and weekday 02812 61538000 5 6 REG 545 LD R5 SP going to need the stack pointer safe 02813 DC00278A 546 CALL UnPackDate breaks time into time/date/month/year 02814 43548000 23 PAIR 547 PARV2 PAIR R2 rawtime adjusted for time zone 02815 41174804 5 BASE 548 PAR R5,TIME ms since midnight gets put here 02816 41096651 5 ZBM 549 PAR R5,DATE date in month gets put here 02817 41094041 5 ZBM 550 PAR R5,MONTH month goes here (Jan = 1) 02818 410948C1 5 ZBM 551 PAR R5,YEAR year goes here 02819 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 0281A 600988C1 0 6 ZBM 555 LD R0 SP,YEAR need year to work with 0281B 6400286F 0 556 CPR R0 MID19 is year < 1950 0281C FE082821 557 JLT DIFCENT year is not after 1950 0281D 64002870 0 558 CPR R0 CENT20 is year > 1999 0281E FE062821 559 JGE DIFCENT year is after 20th century 0281F 1004076C 0 IMM 560 SUB R0 1900 just want last 2 digits of year 02820 E40988C1 0 6 ZBM 561 ST R0 SP,YEAR 00002821 562 DIFCENT LABEL 563 564 * compute time of day 02821 60978804 2 6 BASE 565 LD R2 SP,TIME get the time 02822 148403E8 2 IMM 566 DIV R2 MSECSS get rid of milliseconds 02823 58C40010 IMM 567 IORPSR PSRMODIF set modified arithmetic bit 02824 EC124000 1 REG 568 STZ R1 02825 1444003C 1 IMM 569 DIV R1 60 separate seconds and minutes 02826 E4898062 2 6 ZBM 570 ST R2 SP,SECONDS remainder is seconds 02827 EC120000 0 REG 571 STZ R0 02828 1404003C 0 IMM 572 DIV R0 60 separate minutes and hours 02829 E4498C62 1 6 ZBM 573 ST R1 SP,MINUTES remainder is minutes 0282A E409B051 0 6 ZBM 574 ST R0 SP,HOURS result is hours 0282B 58840010 IMM 575 CLBPSR PSRMODIF unset modified arithmetic 576 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 114 (PO!PREPOUT) F 20 System date packers and unpackers 577 * fill output string 0282C 60C9A031 3 6 ZBM 578 LD R3 SP,WEEKDAY index into daytab 0282D 38262881 0 3 579 LEA R0 DAYTAB(R3) 0282E 60440003 1 IMM 580 LD R1 3 3 chars to move 0282F 60930000 2 4 REG 581 LD R2 R4 address of output 02830 FE400000 582 CMOVE put day into string 583 02831 60440002 1 IMM 584 LD R1 2 02832 FE580020 585 CFILL " " put 2 blanks into output string 02833 61128000 4 2 REG 586 LD R4 R2 put buffer pointer back 02834 6149A651 5 6 ZBM 587 LD R5 SP,DATE get the date (day of month) 02835 DC002655 588 CALL INTTOCHAR 02836 41534000 5 REG 589 PARV R5 02837 41440002 IMM 590 PARV 2 make date fit into 2 characters 02838 40170000 4 CACH 591 PARL CACH R4,0 02839 61124000 4 1 REG 592 LD R4 R1 593 0283A 6004002D 0 IMM 594 LD R0 "-" dash for date separator 0283B E4170400 0 4 @R 595 ST R0 @R4 into string 0283C 38970001 2 4 CACH 596 LEA R2 CACH R4,1 move bp and put in R2 for CMOVE 0283D 60498041 1 6 ZBM 597 LD R1 SP,MONTH index into month table 0283E 38222874 0 1 598 LEA R0 MNTHTAB(R1-1) get month's address 0283F 60440003 1 IMM 599 LD R1 3 3 chars to go into output 02840 FE400000 600 CMOVE put month name into output string 02841 6004002D 0 IMM 601 LD R0 "-" dash for date separator 02842 E4168400 0 2 @R 602 ST R0 @R2 R2 still points to output buffer 02843 39168001 4 2 CACH 603 LEA R4 CACH R2,1 move bp and return to R4 604 02844 394988C1 5 6 ZBM 605 LEA R5 SP,YEAR year comes next 02845 DC402763 606 CALLNP INSDEC inserts year into buffer 607 02846 60930000 2 4 REG 608 LD R2 R4 need address of buf 02847 60440002 1 IMM 609 LD R1 2 02848 FE580020 610 CFILL " " blanks to separate date from time 611 02849 61128000 4 2 REG 612 LD R4 R2 return address 0284A 3949B051 5 6 ZBM 613 LEA R5 SP,HOURS 0284B DC402763 614 CALLNP INSDEC put hour into output string 615 0284C 6004003A 0 IMM 616 LD R0 ":" to separate hours:minutes 0284D E4170400 0 4 @R 617 ST R0 @R4 into string 0284E 39170001 4 4 CACH 618 LEA R4 CACH R4,1 move up buffer pointer 0284F 60098C62 0 6 ZBM 619 LD R0 SP,MINUTES get minutes 02850 6404000A 0 IMM 620 CPR R0 10 02851 FE062855 621 JGE MIN minutes go in as is 02852 60040030 0 IMM 622 LD R0 "0" need leading 0 for minutes 02853 E4170400 0 4 @R 623 ST R0 @R4 into string 02854 39170001 4 4 CACH 624 LEA R4 CACH R4,1 move up bp 00002855 625 MIN LABEL 02855 39498C62 5 6 ZBM 626 LEA R5 SP,MINUTES minutes come next 02856 DC402763 627 CALLNP INSDEC put hour into output string 628 02857 F7C02863 7 629 JBT R7/SINGLE ZONE skip seconds if single word 02858 6004003A 0 IMM 630 LD R0 ":" to separate minutes:seconds 02859 E4170400 0 4 @R 631 ST R0 @R4 into string 0285A 39170001 4 4 CACH 632 LEA R4 CACH R4,1 move up buffer pointer 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 115 (PO!PREPOUT) F 20 System date packers and unpackers 0285B 60098062 0 6 ZBM 633 LD R0 SP,SECONDS get seconds 0285C 6404000A 0 IMM 634 CPR R0 10 0285D FE062861 635 JGE SEC seconds go in as is 0285E 60040030 0 IMM 636 LD R0 "0" need leading 0 for seconds 0285F E4170400 0 4 @R 637 ST R0 @R4 into string 02860 39170001 4 4 CACH 638 LEA R4 CACH R4,1 move up bp 00002861 639 SEC LABEL 02861 39498062 5 6 ZBM 640 LEA R5 SP,SECONDS thats right!! seconds next 02862 DC402763 641 CALLNP INSDEC seconds go into string 642 00002863 643 ZONE LABEL 02863 60440002 1 IMM 644 LD R1 2 02864 60930000 2 4 REG 645 LD R2 R4 02865 FE580020 646 CFILL " " yep you guessed it, 2 blanks into string 647 648 * pick out timezone characters 02866 38178807 0 6 BASE 649 LEA R0 SP,TIMEZONE address of timezone 02867 60440003 1 IMM 650 LD R1 3 just need 3 characters 02868 FE400000 651 CMOVE put time zone char into string 02869 61128000 4 2 REG 652 LD R4 R2 return address 653 0286A 60178803 0 6 BASE 654 LD R0 XFIELDLEN pick up the callers field length 0286B E4001E91 0 655 ST R0 FIELDLEN and restore it 656 0286C 5D1F8008 6 STAK 657 LEAVE STAK SP,STACKFRAME subroutine ends here 658 * --- 659 0286E 0036EE80 660 ONEHOUR2 VFD 0,MSECSH ms in one hour 0286F 0000079E 661 MID19 VFD 1950 middle of 20th century 02870 000007D0 662 CENT20 VFD 2000 beginning of 21st century 02872 00007530 663 MINRND VFD 0,30000 add into time for proper minute rounding 02874 000001F4 664 SECRND VFD 0,500 add into time for proper seconds rounding 665 00002875 666 MNTHTAB LABEL Table of months to be indexed into 02875 4A616E00 667 TEXTZ "Jan" 02876 46656200 668 TEXTZ "Feb" 02877 4D617200 669 TEXTZ "Mar" 02878 41707200 670 TEXTZ "Apr" 02879 4D617900 671 TEXTZ "May" 0287A 4A756E00 672 TEXTZ "Jun" 0287B 4A756C00 673 TEXTZ "Jul" 0287C 41756700 674 TEXTZ "Aug" 0287D 53657000 675 TEXTZ "Sep" 0287E 4F637400 676 TEXTZ "Oct" 0287F 4E6F7600 677 TEXTZ "Nov" 02880 44656300 678 TEXTZ "Dec" 679 00002881 680 DAYTAB LABEL table of day of week 02881 53756E00 681 TEXTZ "Sun" 02882 4D6F6E00 682 TEXTZ "Mon" 02883 54756500 683 TEXTZ "Tue" 02884 57656400 684 TEXTZ "Wed" 02885 54687500 685 TEXTZ "Thu" 02886 46726900 686 TEXTZ "Fri" 02887 53617400 687 TEXTZ "Sat" 688 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 116 (PO!PREPOUT) F 20 System date packers and unpackers +INTTOCHAR 00002655 F 20 588 689 END PDATE INSTIME and INTIME subroutines 1044 INPUT .SYS:PO!PURE2nd INTIME subroutines 1 * PO!PURE2.ASSEM, included by PREPOUTM macro when pure code is wanted. 2 3 VARS 00001F13 ABS 4 VARS!2 EQU DISPW MA 0 5 PROG 00002888 ABS 6 PROG!2 EQU DISPW MA 0 +CHARTOHEX 000025E1 F 19 8 +CHARTOINT 000025C5 F 19 7 F 20 232 250 +CHARTOP12 000025B8 F 19 6 +CHARTOP6 0000259E F 19 5 +COMPARE 000026BD F 19 16 +GETITEM 00002514 F 19 4 F 20 225 243 +HEXTOCHAR 00002680 F 19 12 F 20 421 +INITPSECT MACRO F 17 15 20 +INTTOCHAR 00002655 F 19 11 F 20 378 588 +LENGTH 0000269A F 19 13 +MOVE 000026A2 F 19 14 F 20 360 +P12TOCHAR 00002638 F 19 10 F 20 315 457 +P6TOCHAR 00002607 F 19 9 F 20 323 442 +PROG MACRO F 17 13 F 20 130 F 22 5 +UPPERFY 000026B0 F 19 15 +VARS MACRO F 17 14 F 20 111 F 22 3 +VWRITELINE 000013F4 F 20 173 173 7 END 8 INITPSECT PROG!2,VARS!2,PROGRAM +CHARTOHEX 000025E1 F 19 8 +CHARTOINT 000025C5 F 19 7 F 20 232 250 +CHARTOP12 000025B8 F 19 6 +CHARTOP6 0000259E F 19 5 +COMPARE 000026BD F 19 16 +GETITEM 00002514 F 19 4 F 20 225 243 +HEXTOCHAR 00002680 F 19 12 F 20 421 +INITPSECT MACRO F 17 15 20 F 22 8 +INTTOCHAR 00002655 F 19 11 F 20 378 588 +LENGTH 0000269A F 19 13 +MOVE 000026A2 F 19 14 F 20 360 +P12TOCHAR 00002638 F 19 10 F 20 315 457 +P6TOCHAR 00002607 F 19 9 F 20 323 442 +PROG MACRO F 17 7 13 F 20 130 F 22 5 +PROGRAM! 00002888 F 17 5= 5e 7a F 22 8e 8= 8e 8a +PSECT! 00000000 F 17 5e 5a 5= 5a 5e 7e 7e 7a 7a 7= F 22 8= +UPPERFY 000026B0 F 19 15 +VARIABLES! 00001F13 F 17 5a 7e 7= F 22 8= +VARS MACRO F 17 5 14 F 20 111 F 22 3 +VWRITELINE 000013F4 F 20 173 173 9 END 1044 LIST MAP 1044 LIST CREF 000026CD 1044 PREPOUTR EQU PREPOUT!!! 1046 1047 1048 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 117 F 0 System date packers and unpackers 1049 VARS 01F13 00000000 1050 VARPATCH VFD 0 beginning of variable patch area 1051 1052 PROG 02888 00000000 1053 PROGPATCH VFD 0 beginning of program patch area 1054 1055 ********************************************************************************** 1056 * * 1057 * Notes to maintainers: * 1058 * * 1059 * 1. The only impure page must be at 1C00. This is * 1060 * because DISKBOOT protects all higher pages when * 1061 * it loads them. * 1062 * 2. The pure pages may be from 2000 to 2FFF. * 1063 * 3. All of these pages (even the impure one) must be * 1064 * flagged as protected, or DISKBOOT won't load them. * 1065 * You can do this by: * 1066 * >run $$$writeProtect code=opl page=7/for=5 * 1067 * * 1068 ********************************************************************************** 1069 1070 ACCTSPEC 00002074 F 0 329j 331j 371j 373j 379= BADFILE 000020C0 F 0 413a 437a 507= BADFILEM 000020C6 F 0 516a 521= 522e BADFILEML 0000001C F 0 515 522= BADFILEOFF 000020CD F 0 512j 532= BADSTART 000020AF F 0 457j 492= BADSTARTM 000020B3 F 0 495a 499= BEGINNING 0000201C F 0 81a 163= BOOTR 0000213F F 0 739a 809 823= BS 00000008 F 0 147= F 13 414 BUFL 00000050 F 0 134= 135 295 299 CAN 00000018 F 0 150= F 13 416 CHARM MACRO F 11 298= CHARSTUFF F 16 88= CHARTOHEX 000025E1 F 16 93 574 579= F 19 8 CHARTOINT 000025C5 F 16 92 507 513= F 19 7 F 20 232 250 CHARTOP12 000025B8 F 16 91 467 473= F 19 6 CHARTOP6 0000259E F 16 90 386 410= 475 481 F 19 5 COMMANDSR 0000215E F 0 740a 860 870= COMMOUTER F 13 4= 545 COMNDJMP 0000212F F 0 355 738= COMNDTAB 0000211F F 0 353 726= 736e 872a 873a 874a 875a 878a 879a 880a 881a 911 COMNDTABL 00000008 F 0 351 736= 909 COMPARE 000026BD F 16 101 1066 1073= F 19 16 CR 0000000D F 0 149= F 13 418 448 457 536 CUSTSWTCOK 00002044 F 0 252j 269= DFLTACCT 0000200C F 0 120= 375 DFLTPROJ 0000200E F 0 121= 377 DISKADDR 00001C27 F 0 137= 406s 409a 429s 433a DOCRLF 0000239D F 13 10 440 468 510 523 535= DONEEXITR 00002021 F 0 182= 675a 837j 850j DOPROG 0000202C F 0 194j 210= ENTRYPT 00001C02 F 0 132= 455s 477a 494a 801 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 118 F 0 System date packers and unpackers EQACCT 00174805 F 0 328 370 376s 390a F 15 392= 456s EQACCTPROJ 00174807 F 0 330 372 378s F 15 292s 393= 459s 495 497s EQACCTPW 00174808 F 15 394= 462s EQELSIZE 00000005 F 15 391= EQFILEEXT 0017480C F 0 274s 334 F 15 293s 326 329s 396= 458 466s 499 501s 773s 791s EQFILENM 0017480A F 0 272s 350 F 15 395= 455 464s 737s EQFILEPW 0017480D F 0 332 F 15 397= 461 465s 753s EQSYSTEM 00174802 F 15 291s 389= 460s 491 493s EQT 00134000 F 15 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 0000245C F 15 387= 399a EQVOLPW 00174803 F 15 390= 463s EQVOLUME 00174800 F 15 388= 391e 457s ERRBLOCK 00081181 F 10 53= ERRCHAN 00081043 F 10 60= ERRCNT 00001C3D F 0 142= 224s 228a ERRCOMPARE 00160004 F 10 23= ERRCOUNT 00160000 F 10 20= ERRCTLSTAT 00160804 F 10 64= ERRDEVICE 000808C3 F 10 58= ERREND 00160805 F 10 65= ERRLNTH 00000005 F 0 217 657 660s 1037 F 10 67= ERRLOGBLK 00000400 F 10 19= 67e 68a ERRMSG 00002011 F 0 127= 229a ERROPCKSEG 00000005 F 10 32= ERROPER 00160004 F 10 25= ERROPFMT 0000000C F 10 40= ERROPINQ 00000008 F 10 36= ERROPMS 0000000A F 10 38= ERROPMSN 0000000B F 10 39= ERROPOFSET 00000006 F 10 33= ERROPRDC 0000000D F 10 41= ERROPREAD 00000002 F 10 29= ERROPRES 00000009 F 10 37= ERROPRS 0000000E F 10 42= ERROPRTN 00000007 F 10 34= ERROPSEEK 00000000 F 10 27= ERROPSEG 00000004 F 10 31= ERROPWRITE 00000003 F 10 30= ERROPZERO 00000001 F 10 28= ERRPPUSTAT 00082103 F 10 62= ERRSEEKADR 00160802 F 10 55= ERRSLOT 00080843 F 10 59= ERRTIME 00081180 F 10 21= ERRUNIT 00081843 F 10 61= ERTOPBKSP 00000010 F 10 44= ERTOPGAP 00000016 F 10 50= ERTOPREAD 00000012 F 10 46= ERTOPREW 00000011 F 10 45= ERTOPSEFB 00000017 F 10 51= ERTOPSEFF 00000015 F 10 49= ERTOPWFM 00000014 F 10 48= ERTOPWRITE 00000013 F 10 47= FBIBUFF 00001C28 F 0 138= 411a 435a 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 119 F 0 System date packers and unpackers FETCHFNMR 0000242B F 0 315 681a 784 F 15 6 286= FETCHITEMR 000023C2 F 0 680a 906 F 15 7 86= FILENAME 00001C18 F 0 136= 272s 274s 312a 328 330 332 334 350 370 372 376s 378s 390a 476a 782a FINDCOMND 00002068 F 0 352= 358j FIXEXTEN 0000246C F 15 331 429 490= FTCHITEMHR 000023BF F 0 683a 824 F 15 8 81= GETDATE 000023A3 F 0 686a F 14 19 25= GETITEM 00002514 F 16 89 133 176= F 19 4 F 20 225 243 GOR 0000213E F 0 741a 754 800= HELPR 00002174 F 0 742a 899 905= HEXTOCHAR 00002680 F 16 97 883 895= F 19 12 F 20 421 INITCIA 000022BC F 0 668 F 13 6 27 44= INITIALIZE 000020F5 F 0 165 639= 641 647= 690 INITPSECT MACRO F 0 79 F 11 63= 72 F 17 15 20 F 22 8 INTRPTCA 00001C33 F 0 140= 184a INTTOCHAR 00002655 F 16 96 810 818= F 19 11 F 20 378 588 ITSLOADED 000020A1 F 0 459j 474= LENGTH 0000269A F 16 98 945 950= 987 1078 F 19 13 LF 0000000A F 0 148= F 13 420 446 459 538 LOADEDM 000020A6 F 0 478a 482= LOADPF 000020E8 F 0 189 590 592= 618 LOADR 00002137 F 0 744a 752 766= LOGBUFFER 00001C77 F 0 216a 655a 660s 685a 1037= LOGENTRIES 00000064 F 0 657 660s 1035= 1037 MAXOFFSYS 00000007 F 0 245 713= MC 0000203C F 0 240= 298j 300j 479j 496j 518j 550j 566j 883j 933j 943j MC1 0000204D F 0 242j 292= MCHKLO 00002041 F 0 246j 250= MOVE 000026A2 F 16 99 975 982= F 19 14 F 20 360 MULTICPUS 000020F2 F 0 82a 617= MULTILOOP 000020F3 F 0 187a 619= 687a MYTITLE 00002002 F 0 118= 168a NEXTPAGE 00002085 F 0 425= 443j NOFILE 000020D2 F 0 392j 395j 546= NOFILEM 000020D6 F 0 548a 553= 554e NOFILEML 00000018 F 0 547 554= NONEHERE 00002091 F 0 428j 440= NOTCOMND 0000206C F 0 281j 333j 336j 369= 745a 787j NOTFULL 00002037 F 0 220j 222= NOTTHISCMD 0000206B F 0 354j 357= OFFNAMES 0000210F F 0 271 706= 713e OFFNAMTAB 00002115 F 0 705= 706e OPLTYPE 00001C3E F 0 143= 193 241 270s 511 663s 667s F 13 181 317 OPLVECTPC! 00000400 F 9 10= 54a P12TOCHAR 00002638 F 16 95 748 756= F 19 10 F 20 315 457 P6TOCHAR 00002607 F 16 94 642 654= 767 773 784 F 19 9 F 20 323 442 PACKBAD 000020DC F 0 316j 562= 785j PACKBADM 000020E0 F 0 564a 569= 570e PACKBADML 00000020 F 0 563 570= PACKITEM 000024CF F 15 317 430 732= PACKITEMI 00002506 F 15 321 431 861= PACKNAME 00002496 F 15 432 567= 735 751 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 120 F 0 System date packers and unpackers PARAMM MACRO F 11 280= PCAAA 0000000B F 15 411= 571 PCCOLON 00000029 F 15 319 323 415= 529x 792 PCDELIM 00000031 F 15 423= 522x 525x 527x PCDOLLAR 0000002E F 15 420= 525x 742 808 813 PCDOT 00000028 F 15 414= 514 527x 738 PCLPAREN 0000002A F 15 416= 526x 748 PCLSQUAR 0000002F F 15 421= 533x PCO 00000032 F 15 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 15 419= 526x 740 PCRAD 00000028 F 15 413= 673 PCRPAREN 0000002B F 15 417= 526x 754 PCRSQUAR 00000030 F 15 422= 533x PCSLASH 0000002C F 15 418= 527x PCSPACE 00000000 F 15 410= 668 PCZZZ 00000024 F 15 412= 573 PNPROGAREA 0000008C F 0 124= 593 PREPOUTM MACRO F 0 1044 F 11 251= PREPOUTR 000026CD F 0 166 227 293 475 493 684a 835 848 871 877 941 1044= PROG MACRO F 0 152 645 903 1039 1052 F 11 82= F 13 23 42 177 312 406 498 534 F 14 24 F 15 80 246 285 354 453 489 510 566 656 731 F 17 7 13 F 20 130 F 22 5 PROGAREA 00003000 F 0 123= 124e 424 456 PROGPATCH 00002888 F 0 1053= PROGRAM! 00002888 F 0 79e 79e 79a 79= 129e 129= 152a 643= 643e 645a 901e 901= 903a 1034e 1034= 1039a 1049e 1049= 1052a F 11 72e 72= 72a 72e F 13 13= 13e 23a 40= 40e 42a 172e 172= 177a 306e 306= 312a 402e 402= 406a 494e 494= 498a 531= 531e 534a F 14 21e 21= 24a F 15 74= 74e 80a 243e 243= 246a 281e 281= 285a 351e 351= 354a 450= 450e 453a 486= 486e 489a 507e 507= 510a 562= 562e 566a 653e 653= 656a 728= 728e 731a F 17 5= 5e 7a F 22 8e 8a 8= 8e PROMPT 0000200A F 0 119= 294a PSECT! 00000000 F 0 79= 129e 129a 129a 129= 129e 152e 152a 152a 152= 152e 643a 643a 643e 643= 643e 645a 645e 645= 645e 645a 901e 901e 901a 901= 901a 903a 903a 903e 903= 903e 1034e 1034a 1034a 1034= 1034e 1039e 1039a 1039= 1039e 1039a 1049= 1049a 1049e 1049e 1049a 1052= 1052a 1052a 1052e 1052e F 11 72= F 13 13e 13= 13e 13a 13a 23e 23a 23= 23e 23a 40a 40= 40a 40e 40e 42a 42a 42= 42e 42e 172e 172a 172= 172e 172a 177e 177a 177= 177a 177e 306e 306a 306e 306a 306= 312e 312= 312a 312a 312e 402= 402a 402a 402e 402e 406a 406= 406e 406e 406a 494e 494= 494a 494a 494e 498a 498e 498a 498= 498e 531e 531e 531a 531= 531a 534a 534= 534a 534e 534e F 14 21= 21a 21e 21a 21e 24= 24a 24a 24e 24e F 15 74e 74e 74a 74a 74= 80a 80e 80a 80e 80= 243= 243a 243a 243e 243e 246e 246e 246a 246a 246= 281a 281e 281e 281a 281= 285a 285e 285e 285= 285a 351a 351= 351e 351e 351a 354e 354= 354a 354e 354a 450a 450e 450e 450= 450a 453e 453e 453= 453a 453a 486= 486a 486e 486a 486e 489e 489= 489a 489e 489a 507a 507a 507e 507= 507e 510e 510a 510a 510= 510e 562= 562a 562e 562a 562e 566e 566e 566a 566a 566= 653e 653e 653= 653a 653a 656e 656e 656a 656a 656= 728e 728e 728a 728a 728= 731= 731a 731a 731e 731e F 17 5a 5e 5= 5a 5e 7a 7e 7e 7a 7= F 22 8= 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 121 F 0 System date packers and unpackers RADCODE 0000200F F 0 122= 273 314 335 783 READCHARR 000022FD F 0 676a F 13 7 156 178= READLINER 00002364 F 0 678a F 13 9 384 407= RUNFLAG 00001C01 F 0 131= 302s 458 767s RUNR 00002138 F 0 746a 753 781= SCANOVERR 0000244F F 0 682a F 15 9 355= SFTUPPKTMP 0000245E F 15 433 454= 734 SKIPMSG 0000203C F 0 223j 230= SLEEPR 000022B7 F 0 747a 1008 1021= SPACEINW4 00001C03 F 0 133= 190 653s TALPH 00003C10 F 9 48= F 15 217 TBLNK 00003610 F 9 51= TDELM 00003A10 F 9 49= TEOL 00003810 F 0 825j F 9 50= F 15 110 TERMBUF 02001C04 F 0 126a 135= TERMBUFP 00002010 F 0 126= 278 296 301s 313 TERMPOS 00001C00 F 0 130= 279s 317s 453 786s TERR 00000000 F 9 52= F 15 225 TNUM 00003E10 F 0 826j F 9 47= F 15 155 TRANS2P 000020A0 F 0 454 466= UPPERFY 000026B0 F 16 100 1016 1021= F 19 15 VARIABLES! 00001F14 F 0 79= 129a 152e 152= 643a 645= 645e 901a 903= 903e 1034a 1039= 1039e 1049a 1052e 1052= F 11 72= F 13 13a 23= 23e 40a 42= 42e 172a 177= 177e 306a 312e 312= 402a 406= 406e 494a 498e 498= 531a 534e 534= F 14 21a 24= 24e F 15 74a 80e 80= 243a 246= 246e 281a 285= 285e 351a 354= 354e 450a 453e 453= 486a 489= 489e 507a 510= 510e 562a 566= 566e 653a 656e 656= 728a 731= 731e F 17 5a 7= 7e F 22 8= VARPATCH 00001F13 F 0 1050= VARS MACRO F 0 129 643 901 1034 1049 F 11 74= F 13 13 40 172 306 402 494 531 F 14 21 F 15 74 243 281 351 450 486 507 562 653 728 F 17 5 14 F 20 111 F 22 3 VCLOSEDISK 000013EC F 9 26= VDISKCB 000013E4 F 0 389 407 F 9 18= VDISPLAY 000013E3 F 0 211 460 533 1022 F 9 17= VDONEEXIT 000013F0 F 0 650a F 9 32= VERRLOGPT1 000013FA F 9 42= VERRLOGPTR 000013EA F 0 215 218 656s F 9 24= VERSION 00002000 F 0 116= 167a VEXTRACPUS 000013FC F 0 188s 621 F 9 44= VFETCHFNM 000013F6 F 9 38= VFETCHITEM 000013F5 F 9 37= VFETCHITMH 000013F8 F 9 40= VGETDATE 000013FB F 9 43= VMEMPF 000013E6 F 0 430 594 F 9 20= VMEMSPACE 000013ED F 0 191s 652 F 9 27= VOPENDISK 000013EB F 9 25= VPF4SSU 000013E5 F 0 829 F 9 19= F 13 190 327 F 14 28 VPFWNDO1 000013E8 F 0 410 F 9 22= VPFWNDO2 000013E9 F 9 23= VPREPOUT 000013F9 F 9 41= VREAD 000013E0 F 0 408 432 F 9 14= VREADCHAR 000013F1 F 9 33= F 13 413 VREADLINE 000013F3 F 0 297 F 9 35= VSCANOVER 000013F7 F 9 39= VSLOTWRU 000013E7 F 9 21= 1 Assembler C9208 Offline Program Loader A8811 28-Jun-93 9:12 PAGE 122 F 0 System date packers and unpackers VSRCHDIR 000013E2 F 0 391 F 9 16= VSRCHDIRSN 000013EE F 9 28= VWRITE 000013E1 F 9 15= VWRITECHAR 000013F2 F 9 34= F 13 277 439 447 458 517 537 539 VWRITELINE 000013F4 F 0 517 549 565 936 F 9 36= F 20 173 173 WRITECHARR 0000233E F 0 677a F 13 8 291 313= WRITELINER 00002386 F 0 679a F 13 11 469 499= 1071 END