1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 1 (RDUDOFILE) F 28 Receive String Checker The following are from F= 28 L 343 RECFOUND LABEL ***** LINES WITH ERRORS = 1 ***** ***** LINES WITH ERRORS = 1 ***** ***** LINES WITH ERRORS = 1 ***** 1 INPUT $$$LOGO. 1 2 3 4 5 6 7 8 9 10 * ......... BBBBBBBBBBBBBBBBBB TTTTTTTTTTTTTTTTTTTTTTTT IIIIIIIIIIII 11 * ................. BBBBBBBBBBBBBBBBBBBBB TTTTTTTTTTTTTTTTTTTTTTTT IIIIIIIIIIII 12 * ..........##......... BBBBBBBBBBBBBBBBBBBBBB TTTTTTTTTTTTTTTTTTTTTTTT IIIIIIIIIIII 13 * ............##........... BBBBBB BBBBBB TTTTTT TTTTTT TTTTTT IIIIII 14 * .............##............ BBBBBB BBBBBB TTTTT TTTTTT TTTTT IIIIII 15 * .............##............ BBBBBB BBBBBBB TTTT TTTTTT TTTT IIIIII 16 * ..............##............. BBBBBBBBBBBBBBBBBBB TTTTTT IIIIII 17 * ..............##............. BBBBBBBBBBBBBBBBB TTTTTT IIIIII 18 * ..............##............. BBBBBBBBBBBBBBBBBBB TTTTTT IIIIII 19 * .............##.............. BBBBBB BBBBBB TTTTTT IIIIII 20 * ...........##.............. BBBBBB BBBBBB TTTTTT IIIIII 21 * ..........##............... BBBBBB BBBBBB TTTTTT IIIIII 22 * ........##............... BBBBBB BBBBBBB TTTTTT IIIIII 23 * .....##.............. BBBBBBBBBBBBBBBBBBBBBBBB TTTTTTTTTTTT IIIIIIIIIIII 24 * ................. BBBBBBBBBBBBBBBBBBBBBBB TTTTTTTTTTTT IIIIIIIIIIII 25 * ......... BBBBBBBBBBBBBBBBBBBB TTTTTTTTTTTT IIIIIIIIIIII 26 * 27 * 28 * ****** Copyright 1982, 1983, 1984, 1985, 1986, 1987, 1988, 29 * 1989, 1990, 1991 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 2 3 4 * RRRRRRRR DDDDDD UU UU 5 * RR RR DD DD UU UU 6 * RR RR DD DD UU UU 7 * RR RR DD DD UU UU 8 * RRRRRRRR DD DD UU UU 9 * RR RR DD DD UU UU 10 * RR RR DD DD UU UU 11 * RR RR DD DD UU UU 12 * RR RR DDDDDD UUU 1 Assembler C9101 24-Jul-92 15:15 PAGE 2 F 0 14 15 RDUP BLOCK 16 17 INPUT $$$VIRTDEFS 18 INPUT $$$XREQINFOMACS 19 INPUT $$$MACROS 1 * Including MACROS.ASSEM Version A8607. 20 INPUT REVISIONS 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 3 (REVISIONS) F 6 3 4 ********************************************************************************** 5 * * 6 * Revision Date * 7 * -------- ---- * 8 * 2.12 28 Nov 83 * 9 * More revisions to session logger. * 10 * Hardware Note: Rev 12 of the SSU will clear its UART * 11 * input buffer when it sends a NAK. * 12 * 2.13 03 Aug 84 * 13 * 1. Addition of display options T and Z for * 14 * double and single word time displays. * 15 * 2. Changes to log routines to make them * 16 * compatible with line printers. * 17 * 3. EXITNP command added to allow exiting * 18 * without the log file being printed. * 19 * 4. Changed DL command to not skip lines * 20 * between output. * 21 * 5. Added time and date stamp to session log. * 22 * 6. Display command allows for type change, accepts * 23 * some changes in memory locations to be in same * 24 * type as displayed (hex, decimal, ascii, PAK6, * 25 * and time). * 26 * 7. Changes to trace calls. * 27 * 8. Bus error messages corrected. * 28 * 9. Timer calls removed from character gathering loop. * 29 * 10. Added help and ? commands. * 30 * 2.14 28 Aug 84 * 31 * Added breakpoint commands (BPI, CLEARBPI, CLEARBPIS), * 32 * and changed STEP command to merge in with breakpoints. MH * 33 * Added NOLOG parameter to RDU call, and EXITP command. * 34 * A8408 29 Aug 84 * 35 * Changed version format to date code. * 36 * A8408a 31 Aug 84 * 37 * Change breakpoint set and restore routines to check MSR * 38 * for CPU being in OS code. * 39 * A8409 04 Sep 84 * 40 * Fix step command to remove steps from table. Interactive * 41 * command sets breakpoints, GO singlesteps over breakpoints. * 42 * A8409a 04 Sep 84 * 43 * Change RESPCHEK subroutine, and WRU command to catch * 44 * bad bus error message caused by DSUB opcode. * 45 * A8409b 05 Sep 84 * 46 * Change dial command to facilitate tandem dialing. * 47 * A8409c 06 Sep 84 * 48 * Changes in dialer routines to add phone line class * 49 * code to SITEFILE and DIALFILE and lengthen modem * 50 * address to allow a predial phone number. * 51 * A8409d 07 Sep 84 * 52 * Change Hangup, Powerreset, and Dial commands to check * 53 * LOGFLAG to determine if log file should be printed. * 54 * Changed the previous 3 and all Exit commands to see if * 55 * transmission errors occurred and if so print the number. * 56 * RDULOST prints number of transmission errors and checks * 57 * LOGFLAG to see if log file should be printed. * 58 * A8409e 10 Sep 84 * 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 4 (REVISIONS) F 6 59 * Fix bug in logdate routine. * 60 * A8409f 11 Sep 84 * 61 * Fix bug in FAILPRINT. * 62 * A8409g 20 Sep 84 * 63 * Fix bug in LOGLOOP (was weirding out on long (>96) lines) * 64 * A8409h 26 Sep 84 * 65 * Clear BPITABLE before a boot. * 66 * A8410 01 Oct 84 * 67 * Store MASPTR in memory display command. Fix LEAVE * 68 * in IN subroutine to preserve stack. * 69 * A8410a 03 Oct 84 * 70 * Change CLOSEM to check LOGPRINT before closing * 71 * BATCHLUN, and then call CLOSEM everywhere a new * 72 * session log might be started. * 73 * Miscellaneous fixes in user interface. * 74 * A8410b 09 Oct 84 * 75 * Change dialfile and sitefile to .TEXT. * 76 * A8410c 26 Oct 84 * 77 * Check for and report errors on changing displayed fields. * 78 * Additional parameter to the interactive command * 79 * to set the exit character. Clear time interrupts * 80 * when a bad password error is returned. Log exitchar * 81 * when terminating an interactive session. * 82 * A8411 01 Nov 84 * 83 * Add SYNECOUNT to FAILCOUNT. Don't put in STEP * 84 * breakpoint if breakpoint is already set. * 85 * Add Break and Dwell receiving features. * 86 * Added NSCAN to MCU commands. Send single-step * 87 * before GO on interactive command. Print modem * 88 * and dialer port names when used by DIAL. * 89 * Turn on symbols when BPI is hit. * 90 * A8411a 11 Nov 84 * 91 * Use circular buffer to keep track of pointers followed. * 92 * A8411b 16 Nov 84 * 93 * Get modem name from MODNAME instead of PORTNAME. * 94 * Move version number to RDUMESS and first word past start. * 95 * A8411c 26 Nov 84 * 96 * Change to dwell and break receiving for PORTZERO * 97 * data to correspond with the new SSU. * 98 * A8412 03 Dec 84 * 99 * Move TELLMODEM to before call to DIALIT. * 100 * A8412a 13 Dec 84 * 101 * Put KLUDGE in CHEKRESP for SSU returning dwell * 102 * and break count either right or left justified. * 103 * A8501 15 Jan 85 * 104 * Increased dialer buffer length to 34 and put in * 105 * check for overflow in DIALCHR. * 106 * A8503 08 Mar 85 * 107 * Clear breakpoints before doing a bootcopy. * 108 * Call RELOCATE before displaying instruction. * 109 * A8504 26 Apr 85 * 110 * New command WRUALL. Lots of internal cleanup. * 111 * A8505 14 May 85 * 112 * Added DO file processing. Increased the delay for * 113 * waiting for selftest reponse. CHeck for SMU when * 114 * setting SLOTTYPES and add new device type code for SMU. * 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 5 (REVISIONS) F 6 115 * Add WRU 1 analysis to WRU display. * 116 * Change session log name to date code. * 117 * Add ability to enter negative decimal numbers. * 118 * New STATUS command for entire system status. * 119 * Changed old STATUS command to C STATUS. * 120 * Added S STATUS and P STATUS commands. * 121 * A8505a 16 May 85 * 122 * Change SSUSTAT to pick up words individually * 123 * from SSU (no more block reading). * 124 * Bug fix in RESTART command causing wrong PPU * 125 * slot number to be listed when PPU fails selftest. * 126 * A8505b 29 May 85 * 127 * Patch to RDU to only send 2 characters at a time * 128 * of interactive data. * 129 * A8505c 30 May 85 * 130 * Bug fix in concurrent process. * 131 * A8506 05 Jun 85 * 132 * Changes to concurrent process handling. * 133 * Addition of concurrent process sending RDU commands. * 134 * Changes to timeout values. Bug fix in REPORTCLOCK. * 135 * Bug fix in SEND(*) commands. * 136 * Added check for breaks in send and waits commands. * 137 * Changes to TRACE to put entries in session log. * 138 * TRACE command to turn on tracing. * 139 * New subroutine HEXTOCHAR provides more * 140 * flexibility than HEXOUT. * 141 * A8506a 12 Jun 85 * 142 * Addition of C SCAN and C NSCAN commands. * 143 * A8506b 14 Jun 85 * 144 * Changed SHINTO, LINTO, EMPTYTO, and NAKTO from * 145 * EQU to VFD to make them easier to patch. * 146 * Put a tilde (~) at the beginning of TRACEBUFF. * 147 * A8506c 25 Jun 85 * 148 * Fix CPUSTAT to display correct first instruction's * 149 * address when listing current instructions. * 150 * A8507 20 Jul 85 * 151 * Changed MCUTYPEB to the correct bit. * 152 * Bug fix in LOGLUNOPEN. * 153 * A8508 09 Aug 85 * 154 * Cleanups to the breakpoint code. * 155 * WRUALL complains if no map has been done. * 156 * WRU to an empty slot reports an error message. * 157 * Decode SSU's WRU(1) on bus error. * 158 * Report contents of SSU message buffers * 159 * on initial map. * 160 * A8508a 20 Aug 85 * 161 * Increased size of M scan and fill commands * 162 * address to 21 digits (for new 8 mb SMU). * 163 * Modified wait time calculations for these. * 164 * A8508b 20 Aug 85 * 165 * Broke the memory scans and fill into * 166 * chunks of about 20 seconds. Added break * 167 * processing to this. Added a delay to * 168 * the SYSINIT command (also used by BOOT) * 169 * to prevent timing out (the SSU is too * 170 * busy to talk to us). * 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 6 (REVISIONS) F 6 171 * Made class and bcm codes symbolic. * 172 * A8509 20 Sep 85 * 173 * SENDFILE command added. * 174 * Help messages moved from RDUMESS into RDUHELP. * 175 * Removed PREPOUT and calls to it from log routines. * 176 * Split up RDUMAIN1, RDUMAIN2, RDUMAIN3, * 177 * RDUUSUB, RDUOSUB,RDUISUB. * 178 * A8509a 23 Sep 85 * 179 * RECEIVEFILE command added. * 180 * A8509b 24 Sep 85 * 181 * Massive reorganization of the memory display code. * 182 * - Changed D command to allow changing contents * 183 * without first displaying the location. * 184 * - DL command allows changing display type. * 185 * - DL command does not issue block read * 186 * when the necessary data is still around * 187 * from the previous block read. * 188 * - ZL command added. * 189 * - Register display commands have same * 190 * display format as memory display. * 191 * - Display commands that don't allow write to * 192 * their locations do not require CR terminator. * 193 * - Colon not required when changing data in a * 194 * displayed location iff the data is numeric. * 195 * - When a dot is used as a memory location * 196 * specifier a blank does not need to * 197 * separate it from the command. * 198 * - After displaying absolute address we can * 199 * redisplay current address. * 200 * A8509c 25 Sep 85 * 201 * Moved call to INITLOGLUN to before call to dial up * 202 * remote system. This way a trace of the dialup can * 203 * be kept in the session log. If dialup failed, * 204 * the log file is closed but not printed. * 205 * * 206 * A8510 13 Oct 85 * 207 * Modified RDU program to process the new * 208 * symbol information format. Het. * 209 * A8512 04 Dec 85 * 210 * Fix PERCENTDONE routine in file transfer to not die if * 211 * file size is not set yet. Moved POWERRESET command * 212 * to proper location in command table. * 213 * Added kludge to RESTART command to make up for a * 214 * hardware problem with the MCU (issues WRU4 to each * 215 * one, so MCU restores register wiped out by CLEARALL). * 216 * A8512a 16 Dec 85 * 217 * Changed IN subroutine to use BUFPT instead of IBPT. * 218 * This allowed concurrent process commands to work. * 219 * Removed restriction on WRU that requires a bus * 220 * device to be in the indicated slot. * 221 * Fixed MAPPER to set indicator in SLOTs that memory * 222 * has been found when an SMU has been found. * 223 * Added comma separator between PE1 and F2 on WRU1 * 224 * decode line. * 225 * Added four commands to be used for manipulating * 226 * the SMU error log and error file (EF,EL,CEF,CEL). * 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 7 (REVISIONS) F 6 227 * Added flag to indicate if there is an open session * 228 * log. Use this flag instead of STATE to decide if * 229 * an entry should be written to the log. * 230 * A8512b 17 Dec 85 * 231 * Bug fix in SPECSAVE (was causing interactive data * 232 * to be logged twice). * 233 * A8601 21 Jan 86 * 234 * Removed KLUDGE in CHEKRESP for dwell and break count * 235 * being in the left most byte instead of the right byte. * 236 * Bug fix in DO file receive processing. * 237 * Lengthened timeout value for file transfer. * 238 * Fixed error message for file not found in RDUTRANSFER. * 239 * A8602 24 Feb 86 * 240 * Fix to prevent pretty session log header from wrapping * 241 * around. * 242 * Don't call CLOSEM until after dialup error message has * 243 * been reported (ensures that it appears in session log). * 244 * Moved status command to proper location in command list. * 245 * A8603 13 Mar 86 * 246 * Bug fix in DO file processing. * 247 * A8603a 26 Mar 86 * 248 * Changes in TRACE handling. * 249 * A8604 08 Apr 86 * 250 * Block structure added. * 251 * SHIPCOMxx and SHIPDATA subroutines changed to return * 252 * to an error address if an error is detected. * 253 * RESPERROR added as a generic system wide place which * 254 * handles SHIPCOMxx and SHIPDATA errors. * 255 * Added better error handling to breakpoint commands. * 256 * Added new MCU status command (also added to STATUS). * 257 * Removed the calls to turn off terminating characters * 258 * before calls to SSU/RDU protocol routines. * 259 * A8604a 09 Apr 86 * 260 * Addition of the PFL command. * 261 * A8604b 09 Apr 86 * 262 * Use the URFREELUN request to get a unit to open * 263 * the session log and batch file on. * 264 * A8604c 14 Apr 86 * 265 * Changes to more processing while dealing with * 266 * concurrent processes. * 267 * A8604d 22 Apr 86 * 268 * Fix STEP command so it will work with the changes done * 269 * to the breakpoint command. Added BPITO (breakpoint * 270 * timeout value). This is a shorter time out value * 271 * used for when breakpoints are in a running system. * 272 * A8605 06 May 86 * 273 * Bug fix in reporting dialer errors. * 274 * A8611 03 Nov 86 * 275 * Misc. corrections in the help messages. STATUS command * 276 * traps 'bus error' and 'command error' (excluded page) * 277 * in BCMBLKREAD of PC area. Allows STATUS to go on to * 278 * other modules. Prints a message if it was a bus error, * 279 * to distinguish from 'real' bus error ("FS confused"). * 280 * Passes remainder of RUN command line to concurrent * 281 * process as first communication. * 282 * A8611a 18 Nov 86 * 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 8 (REVISIONS) F 6 283 * Now passes SLOTS table of "current" bus slots to * 284 * concurrent process as first communication (params are 2nd). * 285 * A8612 11 Dec 86 * 286 * Misc minor cleanups. * 287 * A8701 07 Jan 87 * 288 * Added FREELUN call at DIAL99 in DIAL command * 289 * to ensure SITEFILE is closed on dialing probs. * 290 * A8701a 09 Jan 87 * 291 * Changed handling of SLOTS so: slots scanned once rather * 292 * than three times, system SSU (rather than lowest slotted * 293 * SSU) is used, doing a MAP command doesn't reset slot * 294 * selections (but does fix up uninitialized ones). * 295 * A8705a 20 May 87 * 296 * All files now opened on local units. * 297 * A8706a 05 Jun 87 * 298 * ERRORFILE routine (EF command) display fixed * 299 * so line-feed term doesn't cause double spacing. * 300 * A8706b 10 Jun 87 * 301 * ERRORLOG routine (EL command) now decodes the * 302 * SMU error status on the screen. * 303 * A8706c xx Jun 87 * 304 * PATHMAKE fixed to get unit numbers right. Got * 305 * screwed up in A8705a. * 306 * A8707a xx Jul 87 * 307 * Fixed ERRORLOG so line is not garbled at end. * 308 * Changed ERRORLOG so line feed does same a ".". * 309 * A8709 17 Sep 87 * 310 * Fixed IODIAL and IODONTDIAL to not check remote * 311 * clock if more than one break was needed to get * 312 * link established (DIAL command). * 313 * A8709a 18 Sep 87 * 314 * Fixed so @0000 halts are reported. * 315 * A8802 08 Feb 88 * 316 * Added message if IODIAL opts not to check remote clock * 317 * because multiple breaks were sent (clearer to user). * 318 * Tidied TRACECOM. * 319 * A8804 12 Apr 88 * 320 * Changed EQTALKLUN of DIAL command to FRTCLRXOFF and disable * 321 * XON/XOFF processing. This cleans up the output buffer and * 322 * prevents hangs. * 323 * Changed FAILPRINT to zap error counts to prevent dup messages. * 324 * Subroutinized the MCU bug fix from RESTART command (each MCU * 325 * needs WRU4 to resuscitate it after CLEARALL, WRU0, etc). Now * 326 * called by commands that result in BCMGO (sub is FIXUPMCUS). * 327 * Made URDELAY time for PPU selftest symbolic (PPUSTWAIT), and * 328 * upped it to 6 from 5 because URDELAY UREQ is imprecise. * 329 * A8806 22 Jun 88 * 330 * Fixed LOGCHAR to make char 7-bit. Among other things, this * 331 * makes control char quoting easy and correct. * 332 * A8807 10 Jul 88 * 333 * Fixed READLINE to ensure new TIMER interrupt set up each * 334 * time the routine is entered. Was resulting in lost link * 335 * following HALTLOOK if user typed nothing for 1.5 minutes. * 336 * A8807a 27 Jul 88 * 337 * Fixed INITLOGLUN to cleanup so the first prompt after would use * 338 * the correct forms control (was using leftover char "U"). * 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 9 (REVISIONS) F 6 339 * A8809 29 Sep 88 * 340 * Minor clean ups to XFERDEFS definitions. * 341 * A8810 27 Oct 88 * 342 * Changed NVM command to allow larger addresses on newer SSUs. * 343 * A8811 04 Nov 88 * 344 * Fixed P CA command to include controller BASEADDR in bus * 345 * command to store new value. * 346 * A8811a 07 Nov 88 * 347 * Cleaned up the MEMORY routine. * 348 * A8811b 09 Nov 88 * 349 * Fixed SLOTDISP routine to not try decode when slot number unknown * 350 * (e.g. on WRULIST1 of SSU bus error before SSUSLOT is known). * 351 * A8812 xx Dec 88 * 352 * Added ICURESP to trace entry. * 353 * A8901 xx Jan 89 * 354 * Fixed PPCOMTAB to use CAMEM for PPU Z command. This adds the * 355 * selected channel number to the pseudoaddress. * 356 * A8903 03 Mar 89 * 357 * Added 4 second delay right after RELDIALER in IODIAL to * 358 * give the phone line time to settle down. Helps to reduce * 359 * the number of (**can't check remote clock**) errors. RC * 360 * A8903a 03 Mar 89 * 361 * Fix to NVM size check code. RC. * 362 * A8903b 06 Mar 89 * 363 * Controller type B added to table as "video tape controller". RC * 364 * A8908 29 Aug 89 * 365 * Added ability to dial out through Hayes compatable type modem. If * 366 * the dialer name is HAYES then the modem will do the dialing. JB * 367 * A8909 18 Sep 89 * 368 * Changed EMPTYBUF routine to use the input buffer flush request * 369 * rather that read w/no suspend. Also move the set slow baud * 370 * rate into the SENDBREAK routine. This allows the Hayes * 371 * compatable modem to connect at highest possible baud rate. * 372 * A8911 17 Nov 89 * 373 * Change to allow a numeric rate in the baud rate flag in both * 374 * the SITEFILE and DIALFILE. The numeric rate indicates that the * 375 * RDU communication will always be at that rate. The SSU * 376 * microcode needs to be upgraded before this will work with * 377 * rates above 300. * 378 * A8911a 29 Nov 89 * 379 * Change to allow the RDU to dial with a Racal Vadic 3451 * 380 * auto-dial modem. The special dialer name is VADIC3451 * 381 * which is put into the dial file. * 382 * A8912 04 Dec 89 * 383 * Added delay of four seconds after connection with HAYES * 384 * or VADIC 3451 to allow the line to clear up. * 385 * A8912a 12 Dec 89 * 386 * Added delay after setting transmitter options so that any * 387 * upcoming buffer flushes do NOT flush any CIA commands as well. * 388 * A9001 24 Jan 90 * 389 * Added EXITNPD command. CG * 390 * A9001a 26 Jan 90 * 391 * Removed EXITNPD command (waaaaah). CG * 392 * A9009 28 Sep 90 * 393 * Changed LOGWRITETF to not print text with forms record * 394 * if the first character is a blank. * 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 10 (REVISIONS) F 6 395 * A9104 18 Apr 91 * 396 * Addition of the type SCSI Disk Controller to the PPU STATUS * 397 * command. * 398 * A9201 17 Jan 92 * 399 * Modification of the Line protocol routines to allow for * 400 * multiple outstanding messages. Modified SHIPNOP to send * 401 * multiple NOPs iff SSU microcode rev is 16 or greater. * 402 * Added extra time to SelfTest. * 403 * A9202 04 Feb 92 * 404 * Modification of the initial callup code (IODIAL and IODONTDIAL * 405 * and associated SRs) to do the initial callup at a specified * 406 * baud rate and indicate to the SSU by the break length which * 407 * baud rate is being used. Will still work the old way for LOW * 408 * or HIGH specifiers in the dial file, otherwise, requires SSU * 409 * microcode version 16. * 410 * RESTART command modified to allow delay after issuing CLEARALL. * 411 * Modified Interactive mode to work harder at getting back * 412 * output characters from the remote machine. * 413 * DIALVADIC changed to force 1200 baud rate to keep the modem * 414 * as happy as possible. * 415 * A9202a 28 Feb 92 * 416 * Misc mods to the initial BREAK production. * 417 * OpCode WAIT changed to MEMAD type. DIAL command changed to * 418 * WAIT after hanging up from a previous call. * 419 * A9203 09 Mar 92 * 420 * Number of modem descriptions increased. Since each may now * 421 * have multiple rate entries, the original allowance became * 422 * too small. Mods to the HAYES response code packer. * 423 * More changes to baud rate stuff. * 424 * A9203a 18 Mar 92 * 425 * More changes to baud rate stuff. * 426 * A9203b 20 Mar 92 * 427 * DIALFILE and SITEFILE may now have comment records starting * 428 * with a "*". * 429 * A9207 14 Jul 92 * 430 * Sendfile fixed to properly send protected status of a * 431 * code file page. Symbol table initialized correctly. * 432 * A9207a 24 Jul 92 * 433 * Receive and Receive* changed to compare with all characters * 434 * received from the last Send or Send*. * 435 * * 436 *** Don't forget to change the TITLE at the beginning of this file!! ** * 437 * * 438 ********************************************************************************** 439 41393230 ABS 440 VERSIONHI EQU "A920" change number in title, too 37612020 ABS 441 VERSIONLO EQU "7a " 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 11 (REVISIONS) F 6 443 444 ********************************************************************************** 445 * * 446 * The program RDU has been modified to allow it to debug * 447 * code files that contain the symbol information format supported * 448 * by the new assembler and linker. The decision on which format * 449 * to use is resolved by looking at location 4 (the fifth word) on * 450 * page 128 of the code file. If this word is equal to 1 then the * 451 * new format is assumed. If the word is not equal to 1 then the * 452 * old format is assumed. Throughout the source code, any comment * 453 * referring to the OLD format means the format that RDU originally * 454 * accepted and references to the OLD assembler are to the FLAME * 455 * non-relocating assembler. Any references to the NEW format means * 456 * the format that DEBUG supports and is generated by the newer * 457 * assembler and the linker. Modifications were made to OLDDEBUG * 458 * as a test vehicle for placing them into the RDU program. The * 459 * RDU essentially contains a subset of the OLDDEBUG code and placing * 460 * the changes into OLDDEBUG first was considered an easier way to * 461 * debug the new code. * 462 * * 463 * When the new subprogram trees are mapped into memory they are * 464 * represented in the RDU with the following logical structure. * 465 * * 466 * ------------------------ * 467 * Created by | subprogram level 0 | * 468 * RDU | |=========> register symbols * 469 * | range 0 - 1FFFF | * 470 * ------------------------ * 471 * | * 472 * | * 473 * Logical top ------------------------ * 474 * of tree | subprogram logical | * 475 * in .CODE | level 0 | * 476 * file ------------------------ * 477 * | * 478 * | * 479 * ------------------------ * 480 * | subprogram logical | * 481 * | level 1 | * 482 * ------------------------ * 483 * * 484 * The subprogram descriptor at physical level 0 is created in the * 485 * RDU. Its main purpose is to point to the register symbols to * 486 * allow the debugger to recognize R0-R7, PC, PSR, IMR and IAD as * 487 * valid symbols. The RDU program won't support these symbols at this * 488 * point in time. The block is linked to the top of the subprogram * 489 * block at logical level 0 via a son pointer and linked back to via a * 490 * father pointer. The logical level 0 subprogram block is the top * 491 * of the .CODE file's subprogram tree. The logical level 1 subprogram * 492 * block is the one that contains the .DEBUG text file if any exists. * 493 * It also controls the listing of this text for all of its children. * 494 * A logical level 1 block is defined as a block whose grandfather is * 495 * the tree head, the physical level 0 block. The RDU program does * 496 * not support the listing of source text. * 497 * * 498 ********************************************************************************** 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 12 (XDEFS) F 7 21 INPUT XDEFS 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 13 (XDEFS) F 7 2 3 ********************************************************************************** 4 * * 5 * This file lists the definitions for SSU communication. Details * 6 * of SSU communication and protocol are available in the Remote * 7 * Front Panel manual. * 8 * * 9 ********************************************************************************** 10 11 ********************************************************************************** 12 * * 13 * Transmitted messages classes * 14 * The following definitions are for the placement of the * 15 * various fields within the double word message to the SSU. * 16 * * 17 ********************************************************************************** 18 00001040 BYTE 19 XMSGCLASS EQU BITS 8:11 location for message class 20 * transmitted classes 21 * ----------- ------- 00000000 ABS 22 KLAS0 EQU 0 direct commands to specified slot 23 * BCM = bus command, see defs below 00000001 ABS 24 KLAS1 EQU 1 command word sent as specified by VIRTUAL address 25 * BCM = bus command, see defs below 00000002 ABS 26 KLAS2 EQU 2 block mode commands 27 * BCM = specific command, see defs below 00000003 ABS 28 KLAS3 EQU 3 block mode commands, using VIRTUAL addresses 29 * BCM = specific command, see defs below 00000004 ABS 30 KLAS4 EQU 4 direct commands to the SSU 31 * BCM = bus command, see defs below 00000005 ABS 32 KLAS5 EQU 5 control signal to VRA bus 33 * BCM = specific command, see defs below 00000006 ABS 34 KLAS6 EQU 6 control of RFP interface 35 * BCM = specific command, see defs below 00000007 ABS 36 KLAS7 EQU 7 load data word operations (ACC0:ACC2) 37 * SLOT specifies which accumulator. These 38 * three words may be loaded into the SSU for 39 * subsequent use as operands to commands. 00000000 ABS 40 ACC0 EQU 0 accumulator 0 number 00000001 ABS 41 ACC1 EQU 1 accumulator 1 number 00000002 ABS 42 ACC2 EQU 2 accumulator 2 number 43 * only these three are defined by the SSU. 00000008 ABS 44 KLAS8 EQU 8 characters to the operating system 45 * slot specifies number of characters/nop/break/dwell 46 00001840 BYTE 47 XMSGSLOT EQU BITS 12:15 slot number field 48 * (following refer to second word) 00000040 BYTE 49 XMSGBCM EQU BITS 0:3 bus command field (or sub-op) 50 51 52 ********************************************************************************** 53 * * 54 * Bus Command (BCM) codes * 55 * The BCM field holds actual bus command values for * 56 * KLAS0, KLAS1, and KLAS4 operations. For KLAS2 and KLAS3 * 57 * operations, it contains the request code for the SSU * 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 14 (XDEFS) F 7 58 * action. For KLAS5, it contains a request code for a * 59 * major SSU function. For KLAS6, it contains a request * 60 * code for an RFP function. For Klas7, it contains an * 61 * accumulator number. For Klas8, it contains a character * 62 * count or control field. * 63 * * 64 ********************************************************************************** 65 66 * The following are KLAS0, KLAS1, and KLAS4 BCM definitions. 00000000 ABS 67 BCMWRITE EQU 0 write to a bus device 00000002 ABS 68 BCMREAD EQU 2 read from a bus device 00000004 ABS 69 BCMWRU EQU 4 WRU (address indicates WRU #) 00000005 ABS 70 BCMSLFTST EQU 5 self test 00000006 ABS 71 BCMIPOLL EQU 6 interrupt poll 72 73 * The following are BCM values for block mode commands (KLAS2 and KLAS3) 00000000 ABS 74 BCMSTATUS EQU 00 status (returns CPU R0:R7,PC,MSR,CAR,IM) 00000002 ABS 75 BCMMAP EQU 02 map of system modules 00000003 ABS 76 BCMBLKREAD EQU 03 block read (MAXRESPS words) 00000004 ABS 77 BCMABSCAN EQU 04 abnormal data scan 00000005 ABS 78 BCMSCAN EQU 05 data scan 00000006 ABS 79 BCMSCANM EQU 06 masked scan 00000007 ABS 80 BCMFILL EQU 07 fill 00000008 ABS 81 BCMERRBLK EQU 08 get error block 00000009 ABS 82 BCMNSCAN EQU 09 negative scan 0000000A ABS 83 BCMNSCANM EQU 0A masked negative scan 84 85 * KLAS5 BCM defintions 00000000 ABS 86 BCMSTOP EQU 0 assert pause 00000001 ABS 87 BCMGO EQU 01 GO 00000003 ABS 88 BCMCALL EQU 03 clearall 00000004 ABS 89 BCMBOOTCOP EQU 04 boot copy 00000005 ABS 90 BCMPWRRST EQU 05 power reset 00000006 ABS 91 BCMSSTEP EQU 06 single step a CPU 00000007 ABS 92 BCMSINIT EQU 07 system initialization 93 94 * KLAS6 BCM defintions 00000000 ABS 95 BCM6VAL EQU 00 validate 00000001 ABS 96 BCM6NOP EQU 01 NOP 00000002 ABS 97 BCM6RATE EQU 02 set baud rate. 98 * Allowable modem rates are 150, 300, 1200, and 2400 99 * Allowable direct rates are 2400, 4800, 9600, and 19200. 00000003 ABS 100 BCM6TERM EQU 03 terminate session 101 102 * KLAS7 BCM defintions 00000000 ABS 103 BCM7NOP EQU 0 send 0 characters (nop, normally used for poll) 00000001 ABS 104 BCM7ONE EQU 1 send 1 character (CH0) 00000002 ABS 105 BCM7TWO EQU 2 send 2 characters (CH0,CH1) 00000003 ABS 106 BCM7THREE EQU 3 send 3 characters (CH0,CH1,CH2) 00000004 ABS 107 BCM7FOUR EQU 4 send 4 characters (CH0,CH1,CH2,CH3) 00000004 ABS 108 MAXOCHAR EQU 4 maximum number of output characters to remote 00000005 ABS 109 BCM7BREAK EQU 5 send a break to the operating system 00000006 ABS 110 BCM7DWELL EQU 6 send a dwell to the operating system 111 * data = duration 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 15 (XDEFS) F 7 113 114 ********************************************************************************** 115 * * 116 * Received message classes. * 117 * Response message format. The response message class * 118 * field (XMSGCLASS) is bit-encoded as follows, producing * 119 * RKLASes 0, 2, 4, 6, 7, 8, 9, and 0A. * 120 * * 121 ********************************************************************************** 122 00001010 BYTE 123 XRERR EQU BIT 8 whether bits 9:11 is error class code 00001230 BYTE 124 XRERRCODE EQU BITS 9:11 error class code 00001210 BYTE 125 XRLST EQU BIT 9 sez last item 00001410 BYTE 126 XRACK EQU BIT 10 ack response 00001610 BYTE 127 XRIOK EQU BIT 11 sez input okay 128 129 * received classes 130 * -------- ------- 00000000 ABS 131 RKLAS0 EQU 0 data w/ more to come (XMSGSLOT = word number 132 in multiple word response) 00000010 ABS 133 MAXRESPS EQU 16 the maximum number of returns 00000002 ABS 134 RKLAS2 EQU 2 ack w/ more to come 135 * XMSGSLOT field (RKLAS2, RKLAS6, RKLAS7) is coded 136 * EQU 00 acknowledge, the data word is 00000080 BYTE 137 SFP EQU BITS 0:7 control panel indicators 00001010 BYTE 138 STF EQU BIT 8 on if timer fence not updated in last 65 seconds 00001210 BYTE 139 SERR EQU BIT 9 on if HALT, STOP, or ERROR has occurred 00001410 BYTE 140 SNIT EQU BIT 10 on if SSU didn't complete system initialization 00001A10 BYTE 141 SBSE EQU BIT 13 the state of the BSE line 00001C10 BYTE 142 SPAU EQU BIT 14 the state of the PAUSE line 00001E10 BYTE 143 SINT EQU BIT 15 the state of the interrupt line 144 * EQU 01 one byte sent by OS is in data CH0 145 * EQU 02 two bytes sent by OS are in data CH0, CH1 146 * EQU 03 three bytes sent by OS are in data CH0, CH1, CH2 147 * EQU 04 four bytes sent by OS are in data CH0, CH1, CH2, CH3 00000005 ABS 148 REMBREAK EQU 05 (reserved for transmission of break from port 0) 149 * data = length to delay, in character times 00000006 ABS 150 REMDWELL EQU 06 (reserved for transmission of dwell from port 0) 151 * data = length to dwell, in character times 00000004 ABS 152 RKLAS4 EQU 4 data, last item 00000006 ABS 153 RKLAS6 EQU 6 ack, last item (see RKLAS2 XMSGSLOT) 00000007 ABS 154 RKLAS7 EQU 7 ack, last item, input okay (see RKLAS2 XMSGSLOT) 00000008 ABS 155 RKLAS8 EQU 8 error, bad command - data = code 156 * EQU 00 error in SSU's command processor 157 * EQU 01 class invalid 158 * EQU 02 BCM invalid 159 * EQU 03 address relocation invalid for this BCM 00000004 ABS 160 BADRELOC EQU 04 unsuccessful address relocation 161 * EQU 05 system not paused 162 * EQU 06 reserved 163 * EQU 07 port 0 input overflow 00000009 ABS 164 RKLAS9 EQU 9 error, no response - data = SSU WRU1 0000000A ABS 165 RKLASA EQU 0A error, bus error 22 23 NOLIST CREF 00138000 6 REG 24 SP EQU R6 define stack pointer 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 16 F 0 25 LIST CREF 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 17 F 0 27 28 RDU BLOCK RDU control section 29 30 ENTRY BLANK 31 ENTRY BLANKOUT 32 ENTRY BLANKOUTW 33 ENTRY BUFPT 34 ENTRY CBPT 35 ENTRY CNTLE 36 ENTRY CPI 37 ENTRY CPO 38 ENTRY CPW 39 ENTRY CR 40 ENTRY DECOUT 41 ENTRY DIALMESS 42 ENTRY TYPEMESS 43 ENTRY EQEXT 44 ENTRY EQNAME 45 ENTRY ERM500 46 ENTRY ERM502 47 ENTRY ERM503 48 ENTRY ERM505 49 ENTRY EVENTLEN 50 ENTRY FETCHAP 51 ENTRY FETCHDN 52 ENTRY FETCHNP 53 ENTRY FETCHITMF 54 ENTRY FILEGET 55 ENTRY HEXTOCHAR 56 ENTRY LOGIT 57 ENTRY LOGWRITETF 58 ENTRY MESCR 59 ENTRY MESSMOVE 60 ENTRY MESSMOVEZ 61 ENTRY MODMESS 62 ENTRY MSECSS 63 ENTRY NXTCHAR 64 ENTRY NULL 65 ENTRY OBPT 66 ENTRY OBUFF 67 ENTRY ONOFFGET 68 ENTRY OUT 69 ENTRY OUTCRLF 70 ENTRY OUTO 71 ENTRY PACKER 72 ENTRY PAK6OUT 73 ENTRY PAK12OUT 74 ENTRY PDFLAG 75 ENTRY RDU 76 ENTRY RDUERR 77 ENTRY RDUOK 78 ENTRY READFILE 79 ENTRY READLINE 80 ENTRY RECTYPE 81 ENTRY RTEOD 82 ENTRY RTTEXT 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 18 F 0 83 ENTRY RTTEXTF 84 ENTRY RFPBREAK 85 ENTRY SAVEEVENT 86 ENTRY SBCHARL 87 ENTRY SBUFFW 88 ENTRY SHIPBPT 89 ENTRY SHIPNOP 90 ENTRY STAR 91 ENTRY TALPH 92 ENTRY TEOL 93 ENTRY TERMEVENT 94 ENTRY TNUM 95 ENTRY TOFLAG 96 ENTRY TRACEFLAG 97 ENTRY TSTR 98 ENTRY UBREAK 99 ENTRY VALUE 100 ENTRY WPP 101 ENTRY XFERFLAG 102 ENTRY XFERPAGE 103 104 START RDU 105 106 ********************************************************************************** 107 * * 108 * This is the MOUSE Remote Diagnostic Utility program. If it looks * 109 * familiar to you, perhaps a little like the High Level Language * 110 * Debugger, that's because only the name is changed. Actually, * 111 * it is quite a bit different but the RDU program was developed * 112 * from the Debugger. Plagiarism is such fun!!! * 113 * * 114 ********************************************************************************** 115 116 INPUT RDUHEAD 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 19 (RDUHEAD) F 8 Variable definitions, storage allocation 3 4 ********************************************************************************** 5 * * 6 * Symbol definitions, page size, misc. crud * 7 * * 8 ********************************************************************************** 9 00000000 ABS 10 XREQ EQU 0 flag for executive requests 00000010 ABS 11 PSRMODIF EQU 1*BIT 27 modify arithmetic 00000004 ABS 12 PSRCARRY EQU 1*bit 29 00000010 ABS 13 MODIFBIT EQU 1*BIT 27 modified arithmetic 00400000 ABS 14 PATHBIT EQU 1*BIT 9 path data present 00000400 ABS 15 WPP EQU 0400 number of words per page 0001FFFF ABS 16 MAXADR EQU 01FFFF highest possible address 0001FC00 ABS 17 TOPPAGE EQU MAXADR+1-WPP last page of memory 0001AC00 ABS 18 PUREPAGE EQU TOPPAGE-WPP*20 need some pure-code pages 0001A800 ABS 19 IMPAGE EQU PUREPAGE-WPP and some impure area 00018400 ABS 20 XFERPAGE EQU IMPAGE-9*WPP pages for sendfile/receivefile buffers 00000061 ABS 21 BOTTOM EQU XFERPAGE/WPP bottom of our memory 00000080 ABS 22 DBDSKPAGE EQU 128 first page of debug data 00000004 ABS 23 NCPW EQU 4 number of characters per word 00000004 ABS 24 CPW EQU 4 number of characters per word 00000003 ABS 25 ROUNDCPW EQU 3 used to round up to nearest word 00000008 ABS 26 NBPC EQU 8 number of bits per character 00000020 ABS 27 NBPW EQU NCPW*NBPC number of bits per word 0000000C ABS 28 NCPR EQU 12 number of CPU registers 00000008 ABS 29 NPPR EQU 8 number of PPU registers 00000008 ABS 30 INITDELAY EQU 8 number of seconds to delay on a sysinit 00000005 ABS 31 CLEARDELAY EQU 5 number of seconds to delay on a clearall 00000005 ABS 32 SLFTDELAY EQU 5 number of seconds to delay on a selftest 33 34 TCNORM MACRO 35 LD R0 FRTSETTCS set terminating characters 36 LD R1 ADR(TCTABN) normal table 37 ST R1 TCGROUP remember the group we used 38 FREQ LUNAIN+XREQ for command level inputs 39 EMAC 40 41 TCDISP MACRO 42 LD R0 FRTSETTCS set terminating characters 43 LD R1 ADR(TCTABD) display input table 44 ST R1 TCGROUP remember group for restoration 45 FREQ LUNAIN+XREQ for inputting after display 46 EMAC 47 48 TCZERO MACRO 49 LD R0 FRTSETTCS set terminating characters 50 LD R1 ADR(TCTABZ) port zero table 51 ST R1 TCGROUP save group address 52 FREQ LUNAIN+XREQ for input from port zero 53 EMAC 54 55 TCNONE MACRO 56 LD R0 FRTSETTCS set terminating characters 57 LD R1 ADR(TCTABX) no terminators at all 58 FREQ LUNAIN+XREQ then make the change 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 20 (RDUHEAD) F 8 Variable definitions, storage allocation 59 EMAC 60 61 TCPROC MACRO 62 LD R0 FRTSETTCS set terminating characters 63 LD R1 ADR(TCTABP) just CR and CNTL-A 64 FREQ LUNAIN+XREQ make the switch 65 EMAC 66 67 TCRESTORE MACRO 68 LD R0 FRTSETTCS request to change characters 69 LD R1 TCGROUP get last group we used 70 FREQ LUNAIN+XREQ restore original terminators 71 EMAC 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 21 (RDUHEAD) F 8 Variable definitions, storage allocation 73 74 ********************************************************************************** 75 * * 76 * Register definitions * 77 * * 78 ********************************************************************************** 79 00134000 5 REG 80 OP EQU R5 op-code table pointer 00134000 5 REG 81 COM EQU R5 command table pointer 0012C000 3 REG 82 OBP EQU R3 output buffer pointer 00130000 4 REG 83 SYM EQU R4 symbol block pointer 00134000 5 REG 84 SUB EQU R5 subprogram block pointer 00130000 4 REG 85 SRC EQU R4 source block pointer 00130000 4 REG 86 BRK EQU R4 breakpoint table pointer 87 88 ********************************************************************************** 89 * * 90 * Lun dynamic status returned from Xreq's * 91 * * 92 ********************************************************************************** 93 94 *ERROR EQU BIT 0 sez Xreq error 95 *LUNFIELD EQU BITS 4:11 logical unit number 00002040 BYTE 96 RECTYPE EQU BITS 16:19 record type field 97 *RTSP EQU BIT 16 sez special (non-data) record 00000000 ABS 98 RTTEXT EQU 0 text record 00000001 ABS 99 RTTEXTF EQU 1 text with forms 00000002 ABS 100 RTBIN EQU 2 binary record 00000008 ABS 101 RTEOF EQU 8 file mark 00000009 ABS 102 RTEOD EQU 9 end of data 103 *ECFIELD EQU BITS 21:31 error code field 104 105 106 ********************************************************************************** 107 * * 108 * Terminating character control codes * 109 * * 110 ********************************************************************************** 111 00000000 ABS 112 TC EQU 0 CR, space 00000001 ABS 113 TD EQU 1 ., CR 00000002 ABS 114 TU EQU 2 ^, ., CR, LF 00000003 ABS 115 TR EQU 3 ., >, CR 00000004 ABS 116 TG EQU 4 >, <, ., ^, LF, CR 00000005 ABS 117 TA EQU 5 @, >, <, ^, ., LF, CR 00000006 ABS 118 TV EQU 6 ^, ., >, CR, LF 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 22 (RDUHEAD) F 8 Variable definitions, storage allocation 120 121 ********************************************************************************** 122 * * 123 * Module codes * 124 * * 125 ********************************************************************************** 126 00000001 ABS 127 DEVMCU EQU 1 device type code for MCU 00000002 ABS 128 DEVCPU EQU 2 device type code for CPU 00000003 ABS 129 DEVPPU EQU 3 device type code for PPU 00000004 ABS 130 DEVSSU EQU 4 device type code for SSU 00000005 ABS 131 DEVSMU EQU 5 device type code for SMU 132 00000040 BYTE 133 DEVTYPEB EQU BITS 0:3 bits in WRU 0 indicating device type 00001610 BYTE 134 MCUTYPEB EQU BIT 11 bit indicating new MCU (SMU) 00003080 BYTE 135 DEVREV EQU BITS 24:31 WRU 0 field indicating ucode revision 0000000F ABS 136 WRUMAX EQU 0F maximum number of WRUs 137 00002040 BYTE 138 WRUMEMINC EQU BITS 16:19 says the number of words of memory 139 * described by each bit of the WRU4 response: 140 * 0 => 32K words, 1 => 64K words, 141 * 2 => 128K words, 3 => 256K words, etc. 142 00000000 ABS 143 CORESIZE EQU 0 size of core chunks of memory 144 * EQU 2 size of chunks for PEBX memory 00002E10 BYTE 145 WRUMEMNO0 EQU BIT 23 1 if memory address zero not installed 146 * on this memory controller. 147 148 ********************************************************************************** 149 * Format of the WRU 4 response from a MCU. In the * 150 * following description, "n" means 2 POWER (15+WRUMEMINC). * 151 ********************************************************************************** 152 00002C10 BYTE 153 WRUMEMNONE EQU BIT 22 no memory is attached to this MCU 00002E10 BYTE 154 WRUMEMBAD EQU BIT 23 memory is improperly attached 00003080 BYTE 155 WRUMEMHERE EQU BITS 24:31 bits describing what memory is attached: 156 * bit 31 => words 0.. n-1 are useable 157 * bit 30 => words n..2*n-1 are useable 158 * bit 29 => words 2*n..3*n-1 are useable 159 * ... 160 * bit 24 => words 7*n..8*n-1 are useable 161 00000001 ABS 162 SMC EQU DEVMCU slot code for MCU 00000002 ABS 163 SCP EQU DEVCPU slot code for CPU 00000003 ABS 164 SPP EQU DEVPPU slot code for PPU 00000004 ABS 165 SSS EQU DEVSSU slot code for SSU 166 167 0000000F ABS 168 MAXSLOT EQU 0F maximum slot address 00000003 ABS 169 MAXPORT EQU 3 maximum port number 170 00001C10 BYTE 171 BANKBIT EQU BIT 14 top bit of memory addresses 00003610 BYTE 172 RELOBIT EQU BIT 27 MSR user/monitor relocation 173 00010000 ABS 174 CPPF EQU 010000 CPU page file address 00000008 ABS 175 CPPC EQU 000008 CPU program counter 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 23 (RDUHEAD) F 8 Variable definitions, storage allocation 00000009 ABS 176 CPMSR EQU 000009 CPU monitor state register 177 00000E10 BYTE 178 THEBIT EQU BIT 7 bit in SSU WRU 0: 179 * 1 if NOT the master SSU 00000 020DF401 180 SSUREVPTR PTR ICURUCR SSU ucode revision 00100000 @ 181 SSUREV EQU @SSUREVPTR 00000010 ABS 182 SSUREVMM EQU 16 lowest rev that can do multiple messages 183 00000080 BYTE 184 ERF1 EQU BITS 0:7 error word field 1 00001010 BYTE 185 ERF2 EQU BIT 8 error word field 2 00001560 BYTE 186 ERF3 EQU BITS 10:31 error word field 3, error code 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 24 (RDUHEAD) F 8 Variable definitions, storage allocation 188 189 ********************************************************************************** 190 * * 191 * Various useful characters * 192 * * 193 ********************************************************************************** 194 00000001 ABS 195 CNTLA EQU 001 control-A 00000005 ABS 196 CNTLE EQU 005 control-E 197 *BS EQU 008 backspace 0000000A ABS 198 LF EQU 00A line feed 0000000D ABS 199 CR EQU 00D carriage return 0000003B ABS 200 SEMI EQU 03B semi-colon (single-step) 0000007F ABS 201 DEL EQU 127 delete key 0000003A ABS 202 COLON EQU ":" sub/sym delimiter 00000000 ABS 203 NULL EQU 000 nothing 0000002C ABS 204 COMMA EQU "," comma 00000020 ABS 205 BLANK EQU " " blank 0000002B ABS 206 PLUS EQU "+" add 0000002D ABS 207 MINUS EQU "-" subtract 0000002A ABS 208 STAR EQU "*" multiply 0000002F ABS 209 SLASH EQU "/" divide 0000002E ABS 210 DOT EQU "." period 00000040 ABS 211 ATSIGN EQU "@" bull's eye 00000028 ABS 212 LPAREN EQU "(" open 00000029 ABS 213 RPAREN EQU ")" close 0000003D ABS 214 EQUAL EQU "=" equal sign 0000003C ABS 215 LESS EQU "<" less than 0000003E ABS 216 GREATER EQU ">" greater than 00000027 ABS 217 QUOTE EQU "'" single quote 00000022 ABS 218 QUOTES EQU 022 double-quote marks 0000007E ABS 219 TILDE EQU "~" last printing character 0000005E ABS 220 UPARROW EQU "^" up arrow 0000005E ABS 221 CARAT EQU UPARROW also called a carat 0000003F ABS 222 QUESTION EQU "?" handy special character 00000023 ABS 223 HATCH EQU "#" tic-tac-toe board 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 25 (RDUHEAD) F 8 Variable definitions, storage allocation 225 226 ********************************************************************************** 227 * * 228 * Under-program register definitions * 229 * * 230 ********************************************************************************** 231 00000000 ABS 232 UPR0 EQU 00 R0 00000001 ABS 233 UPR1 EQU 01 R1 00000002 ABS 234 UPR2 EQU 02 R2 00000003 ABS 235 UPR3 EQU 03 R3 00000004 ABS 236 UPR4 EQU 04 R4 00000005 ABS 237 UPR5 EQU 05 R5 00000006 ABS 238 UPR6 EQU 06 R6 00000007 ABS 239 UPR7 EQU 07 R7 00000008 ABS 240 UPPC EQU 08 PC 00000009 ABS 241 UPPSR EQU 09 PSR 0000000A ABS 242 UPIMR EQU 0A IMR 0000000B ABS 243 UPIAD EQU 0B IAD 244 245 ********************************************************************************** 246 * * 247 * Symbol types (found in Symbol blocks base SYM) * 248 * * 249 ********************************************************************************** 250 251 * EQU 0 undefined 252 * EQU 1 constant 00000002 ABS 253 SYMTYPEREG EQU 2 register (PC,IMR,IAD,PSR) 254 * EQU 4 BYTE (BITS x:y) 00000005 ABS 255 SYMTYPEGD EQU 5 22-bit goodie word 256 257 258 ********************************************************************************** 259 * * 260 * Symbol mode types for 22-bit goodie words * 261 * * 262 ********************************************************************************** 263 264 *MODEMA EQU 0 direct memory address 265 *MODEIMLZ EQU 1 immediate LJZF 266 *MODEIMRZ EQU 2 immediate RJZF 267 *MODEIMRW EQU 3 immediate RJWF 268 *MODEZBM EQU 4 zig-zag byte mode 00000005 ABS 269 MODECBM EQU 5 circular byte mode 270 *MODEIND EQU 8 indirect 00000009 ABS 271 MODEREG EQU 9 register 272 *MODEPAIR EQU 0A register pair 273 *MODESRO EQU 0B single register offset 274 *MODEDRO EQU 0D double register offset 275 *MODEDROE EQU 0E double register offset 276 *MODESTAK EQU 0F stack mode 277 *MODEID EQU 010 indexed-direct 278 *MODEII EQU 018 indexed-indirect 279 280 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 26 (RDUHEAD) F 8 Variable definitions, storage allocation 281 ********************************************************************************** 282 * * 283 * Symbol display types * 284 * * 285 ********************************************************************************** 286 00000000 ABS 287 DISTYPEDEF EQU 00 use default 288 *DISTYPEI EQU 01 instruction (op-code) 289 *DISTYPED EQU 02 decimal integer 290 *DISTYPED2 EQU 03 double-precision decimal 291 *DISTYPEF EQU 04 floating point 292 *DISTYPEF2 EQU 05 double-precision f.p. 293 *DISTYPEP6 EQU 06 PACK-6 294 *DISTYPEP12 EQU 07 PACK-12 295 *DISTYPEA EQU 08 ASCII 296 *DISTYPEA2 EQU 09 2-word ASCII 0000000A ABS 297 DISTYPEH EQU 0A hexadecimal 298 *DISTYPEO EQU 0B octal 299 *DISTYPEADR EQU 0C 17-bit address 300 *DISTYPEOPN EQU 0D operand (22-bit) 301 *DISTYPEPTR EQU 0E pointer word 302 *DISTYPEN EQU 010 numeric (COBOL/RPG) 303 *DISTYPES EQU 011 string 304 *DISTYPESC EQU 012 scaler 00000013 ABS 305 DISTYPEPC EQU 013 program counter special 306 *DISTYPEHC EQU 014 hexadecimal constant 307 *DISTYPESDF EQU 015 definition of symbol 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 27 (RDUHEAD) F 8 Variable definitions, storage allocation 309 310 ********************************************************************************** 311 * * 312 * The following are the templates for the various block * 313 * structures used within the Debugger. These blocks * 314 * are read in from the .CODE file, pointers are adjusted * 315 * as necessary, and linked into various structures for * 316 * Debugger use. * 317 * * 318 * The first template is the Subprogram ident block definition * 319 * * 320 * ** NOTE: Any changes here must be reflected in "Syms". * 321 * * 322 ********************************************************************************** 323 324 BASE SUB Subprogram block 00174800 5 BASE 325 SUBFPTR BSS 1 "father" pointer 00174801 5 BASE 326 SUBBPTR BSS 1 "brother" pointer 00174802 5 BASE 327 SUBSPTR BSS 1 "son" pointer 0017400C 5 CACH 328 SUBLEVEL BSSB 8 level number 329 BSSB 7 source language 00095F13 5 ZBM 330 SUBBASE BSSB 17 base address 00094014 5 ZBM 331 SUBDBSRC BSSB 1 sez debug source exists 00094214 5 ZBM 332 SUBSRCLST BSSB 1 sez to list source text 00094414 5 ZBM 333 SUBSYMS BSSB 1 sez symbols exist 334 BSSB 5 (open) 335 BSSB 4 source file pointer 00095834 5 ZBM 336 SUBNAMEL BSSB 3 length of name field 00095F14 5 ZBM 337 SUBHIGH BSSB 17 high core address 338 BSSB 16 low source ident block 339 BSSB 16 high source ident block 00174806 5 BASE 340 SUBNAME BSS 1 subprogram name 00174807 5 BASE 341 SUBSBLK BSS 0 small block length 342 BSS2 1 date and time of compilation 343 BSS2 1 debug source file name 0017480B 5 BASE 344 SUBBLK BSS 0 block length 345 DRCT 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 28 (RDUHEAD) F 8 Variable definitions, storage allocation 347 348 ********************************************************************************** 349 * * 350 * Symbol block definition * 351 * * 352 ********************************************************************************** 353 354 BASE SYM Symbol block 355 BSSB 1 sez trailer word present 356 BSSB 1 (open) 00090410 4 ZBM 357 SYMKILLED BSSB 1 sez symbol was killed 00090630 4 ZBM 358 SYMNAMEL BSSB 3 length of symbol name-1 00090C40 4 ZBM 359 SYMTYPE BSSB 4 symbol type 360 BSSB 5 symbol display type 00091F10 4 ZBM 361 SYMPTR BSSB 17 pointer to next block 00091F10 4 ZBM 362 SYMLEN EQU SYMPTR length of symbol block 00170801 4 BASE 363 SYMVALUE BSS 1 symbol value 00170802 4 BASE 364 SYMNAME BSS 1 symbol name (up to 8 words) 365 BSSB 1 sez same name exists 366 BSSB 4 (open) 367 BSSB 5 field length 368 BSSB 5 decimal point position 369 BSSB 17 group pointer, etc. 370 DRCT 371 372 373 ********************************************************************************** 374 * * 375 * Source statement ident block definition * 376 * * 377 ********************************************************************************** 378 00000010 379 SRCBLOCK BASE SRC Source Ident block 00170800 4 BASE 380 SRCINFO BSS 1 various information 381 *SRCLABEL EQU SRCINFO/BIT 0 sez statement has a label 382 *SRCJUMP EQU SRCINFO/BIT 1 sez statement may transfer 383 *SRCTYPE EQU SRCINFO/BITS 4:14 statement type 384 *SRCADDR EQU SRCINFO/BITS 15:31 statement address 00170004 4 CACH 385 SRCLEN BSSB 8 source text length on .RAF 00091181 4 ZBM 386 SRCRAFADR BSSB 24 source text .RAF address 387 DRCT 388 389 390 ********************************************************************************** 391 * * 392 * This defines the Concurrent Process command prototype * 393 * * 394 ********************************************************************************** 395 00000012 396 CPCOMMAND BASE R0 command from concurrent proc 00160000 0 CACH 397 CPDEST BSSC 1 destination of command 00160001 0 CACH 398 CPTIME BSSC 1 extra delay time 00160002 0 CACH 399 CPCLASS BSSC 1 command class 00160003 0 CACH 400 CPSLOT BSSC 1 slot number 00160801 0 BASE 401 CPDATA BSS 1 data for remote system 402 DRCT 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 29 (RDUHEAD) F 8 Variable definitions, storage allocation 403 404 ********************************************************************************** 405 * * 406 * Definition of the breakpoint table blocks. * 407 * * 408 ********************************************************************************** 409 00000014 410 BPIBLOCK BASE BRK 00090010 4 ZBM 411 BPIUSED BSSB 1 on if this breakpoint location is used 00090210 4 ZBM 412 BPIIN BSSB 1 on if breakpoint is in remote machine 413 BSSB 12 unused 00091D20 4 ZBM 414 BPIADDR BSSB 18 address of breakpoint 00170801 4 BASE 415 BPIINSTR BSS 1 instruction at breakpoint 416 DRCT 00000002 ABS 417 BPIBLKLEN EQU DISPW BPIBLOCK 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 30 (RDUHEAD) F 8 Variable definitions, storage allocation 419 420 ********************************************************************************** 421 * * 422 * Impure area allocation * 423 * * 424 ********************************************************************************** 425 426 ORG IMPAGE define impure storage 00000060 ABS 427 OKLEN EQU 96 use a 96 character line 0001A800 428 IBUFFW LABEL 0201A800 429 IBUFF BSSC OKLEN input buffer 0001A818 430 OBUFFW LABEL 0201A818 431 OBUFF BSSC OKLEN output buffer 00000060 ABS 432 SBMAXL EQU OKLEN maximum symbol length 0001A830 433 SBUFFW LABEL 0201A830 434 SBUFF BSSC SBMAXL symbol buffer 00000078 ABS 435 CBLEN EQU 120 max input buffering room 0201A848 436 LBUFF BSSC CBLEN log buffer 437 * RFP communications buffer 0201A866 438 CBUFF BSSC CBLEN plenty of buffering ability 439 0001A884 440 SHIPBPT BSS 1 buffer pointer for SHIPNOP to use 441 0201A885 442 RECBUFF BSSC OKLEN receive string buffer 0001A89D 443 RECENDPTR BSS 1 to end of string in RECBUFF 444 00000083 ABS 445 DOBUFLEN EQU OKLEN+35 want some extra room 0201A89E 446 DOBUFF BSSC DOBUFLEN buffer for remote machine reponses 0001A8BF 447 DOBUFBEG BSS 1 beginning index for DOBUFF 0001A8C0 448 DOBUFEND BSS 1 ending index for DOBUFF 0001A8C1 449 RECVACTIVE BSS 1 flag to indicate we might need these 450 * characters for a RECEIVE or RECEIVE* 451 00000009 ABS 452 BPIMAX EQU 9 maximum number of breakpoints 0001A8C2 453 BPITABLE BSS (BPIMAX+1)*BPIBLKLEN breakpoint table 0001A8D6 454 BPITABTOP LABEL end of the table 455 456 * 457 * Control information for old format, page 128 of code file. 458 * 459 SRCSTRT EQU NEWTREETOP start of source stmnt info 460 SRCTOP EQU NEWARRAYPT top of source stmnt info 461 SYMSTRT EQU NEWSYMFLAG start of sub/sym info 462 SYMTOP EQU NEWUNUSED top of sub/sym info 463 0001A8D6 464 STATE BSS 1 RDU state FFFFFFFF ABS 465 STATENDIAL EQU -1 not dialed in 00000000 ABS 466 STATEPORTZ EQU 0 sez port zero mode 00000001 ABS 467 STATESTOP EQU 1 sez RDU mode, system stopped 00000002 ABS 468 STATERUN EQU 2 sez RDU mode, system running 469 0001A8D7 470 CPSTATE BSS 1 concurrent procesing state 471 * -1 sez Local mode 472 * 0 sez RDU modes 473 * 1 sez C.P. operator/remote 474 * 2 sez C.P. concurrent/remote 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 31 (RDUHEAD) F 8 Variable definitions, storage allocation 475 1A8D8 00000000 476 MOREPROC VFD 0 one sez we are in more processing 477 0001A8D9 478 XFERFLAG BSS 1 file transfer is in progress 479 0001A8DA 480 DOFLAG BSS 1 flag says we are processing from a DO file 0001A8DB 481 DOLIST BSS 1 says we are listing do file commands 0001A8DC 482 DOSUPP BSS 1 says we are suppressing data display 0001A8DD 483 DOUNIT BSS 1 logical unit do file is opened on 484 0001A8DE 485 SYSSTAT BSS 1 remote system status 0001A8DF 486 MAPPED BSS 1 sez remote map recorded 0001A8E0 487 UBREAK BSS 1 user break flag 0001A8E1 488 IOK BSS 1 sez input ok from port zero 0001A8E2 489 INTFLAGS BSS 1 interrupt flags 0001A8E3 490 ORIGIN BSS 1 origin of last bus command 0001A8E4 491 CPZDATA BSS 1 character data from port zero 0001A8E5 492 BUFPT BSS 1 input buffer pointer 0001A8E6 493 LBUFPT BSS 1 last input buffer pointer 0001A8E7 494 TERMCHAR BSS 1 terminating character 0001A8E8 495 TIMETEMP BSS 2 place to keep parts of time 0001A8EA 496 TCGROUP BSS 1 terminating character group 0001A8EB 497 SBL BSS 1 symbol length in SBUFF (w-1) 0001A8EC 498 SBCHARL BSS 1 symbol length (in chars) in SBUFF 0001A8ED 499 VALUE BSS 2 value being looked for 0001A8EF 500 EXITCHAR BSS 1 exit character, initialize as cntl-A 0001A8F0 501 CONVAL BSS 1 constant value 0001A8F1 502 REGVAL BSS 1 register value 0001A8F2 503 TYPE BSS 1 symbol type 0001A8F3 504 DISPTYPE BSS 1 display type of memory display 0001A8F4 505 CALLCLASS BSS 1 class of phone call to use 0001A8F5 506 PHONERATE BSS 1 phone rate value 0001A8F6 507 PASSWORD BSS 2 password for remote site 0001A8F8 508 PHONEFLAG BSS 1 sez phone or port 0001A8F9 509 PHONE BSS SBMAXL/NCPW phone number or port number 0001A911 510 CPI BSS 1 input pointer 0001A912 511 CPO BSS 1 output pointer 0001A913 512 WAITTIME BSS 1 time to wait for I/O happening 0001A914 513 LINEMAX BSS 1 max output lines to terminal 0001A915 514 LINECNT BSS 1 current output line count 0001A916 515 ECHOMODE BSS 1 normal echo mode for RDU 0001A917 516 INLUN BSS 1 lun to use 0001A918 517 OUTLUN BSS 1 output lun to use 1A919 00000000 518 AUXLUN VFD 0 another lun word 0001A91A 519 EQUIPTYPE BSS 1 sez if AUXLUN was linked by RDU or user 0001A91B 520 PATHS BSS 2 input and output path units 0001A91D 521 PROC BSS 1 process number of concurrent 0001A91E 522 UNEQFLAG BSS 1 flag sez to unequip when done 0001A91F 523 ADDRESS BSS 1 address of memory location 0001A920 524 ENDADDRESS BSS 1 end address for scan 0001A921 525 REALADDR BSS 1 biased address of location 0001A922 526 BASEADDR BSS 1 base address for memory refs 0001A923 527 DATALOC BSS 1 location in DATA buffer 0001A924 528 SLOT BSS 1 slot number in use 0001A925 529 NEWSLOT BSS 1 new slot when changing slots 0001A926 530 NEWWRU BSS 1 WRU for new slot 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 32 (RDUHEAD) F 8 Variable definitions, storage allocation 0001A927 531 BANK BSS 1 bank select for memory address 0001A928 532 SUBPC BSS 1 sub pointer for current pc 0001A929 533 SUBADR BSS 1 sub pointer from last relocate 0001A92A 534 SYMSFLAG BSS 1 sez symbols being substituted 0001A92B 535 SYMBIAS BSS 1 bias for symbol output 0001A92C 536 LOCFLAG BSS 1 determines location listing 1A92D 00000000 537 TRACEFLAG VFD 0 1 sez to record trace events in session log 0001A92E 538 LOGFLAG BSS 1 sez whether to print log 0001A92F 539 BPINUM BSS 1 number of breakpoints set 0001A930 540 STEPSET BSS 1 flag if step is in 0001A931 541 BPISIN BSS 1 flag says breakpoint is in 0001A932 542 XCLASS BSS 1 message class 0001A933 543 XSLOT BSS 1 message slot 0001A934 544 XDATA BSS 1 message data 545 DATA EQU RESPBUFFER data area for ssu response 546 DATAW EQU DATA(1) for tricks 547 RTNCOUNT EQU RESPBINDX response item count 548 DATAHEAD EQU RESPBUFFH head of buffer (for send to CP) 0001A935 549 MAPDATA BSS 16*2 place for map data 1A955 00020000 550 MSROFFSET VFD 020000 bias for non-resident code 0001A956 551 MSRBIAS BSS 1 where to store current bias 552 0001A957 553 EQBUF LABEL file equip buffer 554 BSS 2 network 555 BSS 1 system 556 BSS 2 password 557 BSS 2 account 558 BSS 1 project 559 BSS 2 password 0001A961 560 EQNAME BSS 2 file name 0001A963 561 EQEXT BSS 1 extension 562 BSS 2 password 563 BSS 5 other junk 564 0001A96B 565 SLOTTYPE BSS 16 device type for each slot 0001A97B 566 SLOTS LABEL (ordered by device code) 1A97B 00000000 567 VFD 0 always zero 0001A97C 568 MCUSLOT BSS 1 slot number of MCU 0001A97D 569 CPUSLOT BSS 1 slot number of CPU 0001A97E 570 PPUSLOT BSS 1 slot number of PPU 0001A97F 571 SSUSLOT BSS 1 slot number of SSU 00000005 DISP 572 SLOTSNUM EQU DISP SLOTS size of table w/real devices 0001A980 573 PPUPORT BSS 1 port number of PPU 00001840 BYTE 574 PORTSPOT EQU BITS 12:15 place for port in address 0001A981 575 THESSU BSS 1 slot of THE SSU 0000001C ABS 576 SLOTSLEN EQU DISPC SLOTS byte length of table 577 578 * table giving max NVM addresses, defaults to small size 0000000D ABS 579 SSUNVMREV EQU 0D last SSU rev with 128 byte NVM 0001A982 580 SSUNVMMAX LABEL 1A982 0000007F 581 VFD 07F SSUNVMREV and older use this max address 1A983 000007FF 582 VFD 07FF after SSUNVMREV use this max address 1A984 00000000 583 SSUNVMIDX VFD 0 bit map indexed by slot# for SSUNVMMAX index 1A985 0049A984 584 SSUNVMIDXP PTR SSUNVMIDX/BIT 0 pointer to bit map 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 33 (RDUHEAD) F 8 Variable definitions, storage allocation 586 587 ********************************************************************************** 588 * * 589 * The following block definitions are for the predefined * 590 * symbols which are always recognized. The subprogram block * 591 * does not contain brother or son pointers, but is pointed * 592 * to by the global symbol block from the loader when that * 593 * block is loaded by the Debugger. The location TREETOP is * 594 * the very top of the symbol tree, and contains the symbols * 595 * which we have pre-defined. * 596 * The symbols included in TREETOP are the eight general * 597 * registers and the associated hardware registers for status * 598 * and interrupt control. * 599 * * 600 * ** Note: The subprogram and symbol blocks must be * 601 * built in accordance to the templates defined * 602 * previously for SUB and SYM blocks. * 603 * * 604 ********************************************************************************** 605 606 REGDEF MACRO 607 VFDB 1:0,1:0,1:0,3:0,4:SYMTYPEGD 608 VFDB 5:$(2),17:$(3) 609 VFD 10:0,5:MODEREG,3:UP$(1),14:0 610 ASCII 1,$(1) 611 EMAC 612 613 REGDEFSP MACRO 614 VFDB 1:0,1:0,1:0,3:0,4:SYMTYPEREG 615 VFDB 5:$(2),17:$(3) 616 VFD UP$(1) 617 ASCII 1,$(1) 618 EMAC 619 0001A986 620 TREETOP LABEL 1A986 00000000 621 VFD 0 father 1A987 00000000 622 VFD 0 brother 1A988 00000000 623 VFD 0 son 1A989 00000000 624 VFD 8:0,7:0,17:0 level,lang,base 1A98A 0001FFFF 625 VFDB 1:0,1:0,1:1,5:0,4:0,3:0,17:MAXADR 1A98B 00000000 626 VFDB 16:0,16:0 source ident stuff 1A98C 00000000 627 VFD 0 name (blank) 1A98E 00000000 628 VFD 0,0 date and time 1A990 00000000 629 VFD 0,0 debug source file 630 0001A991 631 SYMR0 LABEL 632 REGDEF R0,DISTYPEDEF,ADR SYMR1 1A990 00000005 632 VFDB 1:0,1:0,1:0,3:0,4:SYMTYPEGD 1A991 0141A994 632 VFDB 5:DISTYPEDEF,17:ADR SYMR1 1A992 00000000 632 VFD 10:0,5:MODEREG,3:UPR0,14:0 1A993 52302020 632 ASCII 1,R0 0001A994 633 SYMR1 LABEL 634 REGDEF R1,DISTYPEDEF,ADR SYMR2 1A993 00000005 634 VFDB 1:0,1:0,1:0,3:0,4:SYMTYPEGD 1A994 0141A997 634 VFDB 5:DISTYPEDEF,17:ADR SYMR2 1A995 00000000 634 VFD 10:0,5:MODEREG,3:UPR1,14:0 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 34 (RDUHEAD) F 8 Variable definitions, storage allocation 1A996 52312020 634 ASCII 1,R1 0001A997 635 SYMR2 LABEL 636 REGDEF R2,DISTYPEDEF,ADR SYMR3 1A996 00000005 636 VFDB 1:0,1:0,1:0,3:0,4:SYMTYPEGD 1A997 0141A99A 636 VFDB 5:DISTYPEDEF,17:ADR SYMR3 1A998 00000000 636 VFD 10:0,5:MODEREG,3:UPR2,14:0 1A999 52322020 636 ASCII 1,R2 0001A99A 637 SYMR3 LABEL 638 REGDEF R3,DISTYPEDEF,ADR SYMR4 1A999 00000005 638 VFDB 1:0,1:0,1:0,3:0,4:SYMTYPEGD 1A99A 0141A99D 638 VFDB 5:DISTYPEDEF,17:ADR SYMR4 1A99B 00000000 638 VFD 10:0,5:MODEREG,3:UPR3,14:0 1A99C 52332020 638 ASCII 1,R3 0001A99D 639 SYMR4 LABEL 640 REGDEF R4,DISTYPEDEF,ADR SYMR5 1A99C 00000005 640 VFDB 1:0,1:0,1:0,3:0,4:SYMTYPEGD 1A99D 0141A9A0 640 VFDB 5:DISTYPEDEF,17:ADR SYMR5 1A99E 00000000 640 VFD 10:0,5:MODEREG,3:UPR4,14:0 1A99F 52342020 640 ASCII 1,R4 0001A9A0 641 SYMR5 LABEL 642 REGDEF R5,DISTYPEDEF,ADR SYMR6 1A99F 00000005 642 VFDB 1:0,1:0,1:0,3:0,4:SYMTYPEGD 1A9A0 0141A9A3 642 VFDB 5:DISTYPEDEF,17:ADR SYMR6 1A9A1 00000000 642 VFD 10:0,5:MODEREG,3:UPR5,14:0 1A9A2 52352020 642 ASCII 1,R5 0001A9A3 643 SYMR6 LABEL 644 REGDEF R6,DISTYPEDEF,ADR SYMR7 1A9A2 00000005 644 VFDB 1:0,1:0,1:0,3:0,4:SYMTYPEGD 1A9A3 0141A9A6 644 VFDB 5:DISTYPEDEF,17:ADR SYMR7 1A9A4 00000000 644 VFD 10:0,5:MODEREG,3:UPR6,14:0 1A9A5 52362020 644 ASCII 1,R6 0001A9A6 645 SYMR7 LABEL 646 REGDEF R7,DISTYPEDEF,ADR SYMPC 1A9A5 00000005 646 VFDB 1:0,1:0,1:0,3:0,4:SYMTYPEGD 1A9A6 0141A9A9 646 VFDB 5:DISTYPEDEF,17:ADR SYMPC 1A9A7 00000000 646 VFD 10:0,5:MODEREG,3:UPR7,14:0 1A9A8 52372020 646 ASCII 1,R7 0001A9A9 647 SYMPC LABEL 648 REGDEFSP PC,DISTYPEPC,ADR SYMPSR 1A9A8 00000002 648 VFDB 1:0,1:0,1:0,3:0,4:SYMTYPEREG 1A9A9 00A7A9AC 648 VFDB 5:DISTYPEPC,17:ADR SYMPSR 1A9AA 00000008 648 VFD UPPC 1A9AB 50432020 648 ASCII 1,PC 0001A9AC 649 SYMPSR LABEL 650 REGDEFSP PSR,DISTYPEH,ADR SYMIMR 1A9AB 00000002 650 VFDB 1:0,1:0,1:0,3:0,4:SYMTYPEREG 1A9AC 0095A9AF 650 VFDB 5:DISTYPEH,17:ADR SYMIMR 1A9AD 00000009 650 VFD UPPSR 1A9AE 50535220 650 ASCII 1,PSR 0001A9AF 651 SYMIMR LABEL 652 REGDEFSP IMR,DISTYPEH,ADR SYMIAD 1A9AE 00000002 652 VFDB 1:0,1:0,1:0,3:0,4:SYMTYPEREG 1A9AF 0095A9B2 652 VFDB 5:DISTYPEH,17:ADR SYMIAD 1A9B0 0000000A 652 VFD UPIMR 1A9B1 494D5220 652 ASCII 1,IMR 0001A9B2 653 SYMIAD LABEL 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 35 (RDUHEAD) F 8 Variable definitions, storage allocation 654 REGDEFSP IAD,DISTYPEH,0 1A9B1 00000002 654 VFDB 1:0,1:0,1:0,3:0,4:SYMTYPEREG 1A9B2 00000000 654 VFDB 5:DISTYPEH,17:0 1A9B3 0000000B 654 VFD UPIAD 1A9B4 49414420 654 ASCII 1,IAD 655 656 0001A9B5 657 MASTOP LABEL end of memory address stack 658 BSS 40 seems like a good number 0001A9DD 659 MASTACK LABEL memory address pointer stack 1A9DD FFFFFFFF 660 VFD -1 catch for stack underflows 0001A9DE 661 MASPTR BSS 1 place to keep stack pointer 0001A9DF 662 LASTADRPTR BSS 1 pointer to last address in buffer 0001A9E0 663 CIRCLEFLAG BSS 1 sez buffer has circled around 0001A9E1 664 DONEBUF BSS 1 0 if more in buffer to list 665 * 1 if buffer has all been listed 666 667 BSS 100 allocate enough stack 0001AA46 668 STACK LABEL stack area 117 118 INPUT RDULDEFS 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 36 (RDULDEFS) F 9 Variable definitions, storage allocation 2 3 ********************************************************************************** 4 * * 5 * The definitions and variables are used for the session log routines. * 6 * * 7 ********************************************************************************** 8 0001AA46 9 LOBP BSS 1 position in LBUFF 0001AA47 10 CRFLAG BSS 1 flag a CR 0001AA48 11 LBUFFUL BSS 1 flag an empty buffer 0001AA49 12 HDRLEN BSS 1 0001AA4A 13 HDRINFOLEN BSS 1 0001AA4B 14 EVENTLEN BSS 1 the length in chars of event 0001AA4C 15 EVENTADDR BSS 1 a Pointer to where the chars are 0001AA4D 16 EVENTTYPE BSS 1 XREQ code for Write 1AA4E 00000001 17 LOGSESSION VFD 1 set sez to log the session. 0001AA4F 18 FILEERROR BSS 1 set sez problems with Batch or Log File 1AA50 00000000 19 LOGFILOPEN VFD 0 set sez log file is open 00000050 ABS 20 LINEWIDTH EQU 80 how wide we expect to print 0001AA51 21 SYSNUM BSS 1 remote system number 22 1AA52 2A442020 23 INITMESS1 TEXTZ "*D RDU v" 1AA56 20205379 24 INITMESS2 TEXTZ " System " 1AA59 20202054 25 INITMESS3 TEXTZ " Taken By " 26 1AA5D 94408988 27 NAMEBANG PAK12 NAME! the session variable that holds initials 1AA5F 5244553A 28 LOGPRMPT TEXT "RDU:" 29 0001AA60 30 LOGLUN BSS 1 The unit we link session file to 0001AA61 31 BATCHLUN BSS 1 The unit we build the batch Job on 32 1AA62 420DAA71 33 EXTPTR PTR EXTEND Ptr to the File Extend 0001AA63 34 EXTLEN BSS 1 35 1AA64 3E436F70 36 BATCHLINE TEXT ">Copy O=.LP I= " Print command 0000000D ABS 37 FNLEN EQU 13 length of file name including . 0201AA6E 38 FILENAME BSSC FNLEN where to put the file name 00000035 ABS 39 BLLEN EQU DISPC BATCHLINE 4201AA71 40 EXTEND BSSC 6 1AA73 C20DAA70 41 FNMINPTR PTR FILENAME(11) where the low order digit of the minutes 42 * will reside in the file name 1AA74 820DAA70 43 FNMINHPTR PTR FILENAME(10) where the high order digit of minutes lies 44 1AA75 3C424154 45 DOTBATCH TEXT "" 00000011 ABS 46 BATCHLEN EQU 17 length of batch name 00000006 ABS 47 MAXDIGGIES EQU 6 48 0201AA7A 49 INITIALS BSSC 10 0000000A ABS 50 ILEN EQU DISPC INITIALS 1AA7D 020DAA7A 51 INITPTR PTR INITIALS 119 120 INPUT NEWSYMIMPR 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 37 (NEWSYMIMPR) F 10 Variable definitions, storage allocation 2 3 ********************************************************************************** 4 * * 5 * Here is a template for the subprogram descriptor using * 6 * the newest symbol information. These blocks are linked * 7 * in a tree structure using a father pointer, a brother * 8 * pointer, and a son pointer. Each block defines a subprogram * 9 * and points to lists of its associated symbols and source * 10 * statements. * 11 * * 12 * Labels that take the form DBONLY are bits that * 13 * were unused by the ASSEMBLER, LINK, DEBUG, etc. and are * 14 * used internally by this debugger. * 15 * * 16 ********************************************************************************** 17 18 BASE SUB 00174800 5 BASE 19 PTRBLOCK LABEL 00174800 5 BASE 20 NEWDADPTR BSS 1 father pointer 00174801 5 BASE 21 NEWBROPTR BSS 1 brother pointer 00174802 5 BASE 22 NEWSONPTR BSS 1 son pointer 00174803 5 BASE 23 NEWSYMPTR BSS 1 pointer to head of symbol list for this subprogram 00174804 5 BASE 24 NEWSRCPTR BSS 1 pointer to head of source list for this subprogram 00000005 ABS 25 PTRBLOKLEN EQU DISPW PTRBLOCK 00174014 5 CACH 26 NEWCOMPID BSSB 8 the compiler id code 00095185 5 ZBM 27 NEWSYMWRDS BSSB 24 number of words in the entire symbol list 00174018 5 CACH 28 NEWFCHARLN BSSB 8 number of chracters in the .DEBUG file name 00095186 5 ZBM 29 NEWSRCWRDS BSSB 24 number of words in the entire source list 000940C7 5 ZBM 30 NEWOVLAYID BSSB 12 overlay id 00095817 5 ZBM 31 NEWLONGBLK BSSB 1 1 sez option information is tacked on to the end 00095A17 5 ZBM 32 NEWNOCODE BSSB 1 1 sez no executable code within this subprogram 00095C17 5 ZBM 33 NEWTEXTYES BSSB 1 1 sez text for source statements exists 00095F17 5 ZBM 34 NEWLOWADDR BSSB 17 base address of this subprogram 00094038 5 ZBM 35 NEWNAMELEN BSSB 3 words in the subprogram name field 00094618 5 ZBM 36 NEWALLCODE BSSB 1 1 sez ALL executable code resides within this subprogram 00094848 5 ZBM 37 SRCFLDBONLY BSSB 4 used to link subprograms to source text files 00095018 5 ZBM 38 SBLSTDBONLY BSSB 1 1 sez list out source statements 39 BSSB 6 unused 00095F18 5 ZBM 40 NEWHIGHADR BSSB 17 high address of this subprogram 00000009 ABS 41 SHORTNONAM EQU DISPW NEWDADPTR 00094019 5 ZBM 42 NEWSUBCASE BSS 1:32 first word of name sez case of corresponding letter 0009406A 5 ZBM 43 NEWSUBNAME BSS 6:1 first packed character of the name 44 * 45 * Optional information that may follow 46 * 0017480B 5 BASE 47 NEWDATE BSS 2 date of compilation 00000002 ABS 48 OPTIONLEN EQU DISPW NEWDATE 0017480D 5 BASE 49 NEWDEBNAME BSS 1 first word of .DEBUG file name with source text in it 50 DRCT 51 52 ********************************************************************************** 53 * * 54 * Possible values for the various subprogram descriptor fields. * 55 * * 56 ********************************************************************************** 57 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 38 (NEWSYMIMPR) F 10 Variable definitions, storage allocation 58 * 59 * Compiler IDs 60 * 61 ********************************************************************************** 62 *NEWASS EQU 0 assembler * 63 *NEWDRAGON EQU 1 DRAGON * 64 *NEWPASCAL EQU 2 PASCAL * 65 *NEWFORTRAN EQU 3 FORTRAN * 66 *NEWCOBOL EQU 4 COBOL * 67 *NEWBASIC EQU 5 BASIC * 68 ********************************************************************************** 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 39 (NEWSYMIMPR) F 10 Variable definitions, storage allocation 70 71 ********************************************************************************** 72 * * 73 * Here is a template for the symbol block descriptor using * 74 * the newest symbol information. These blocks are linked * 75 * together using a relative forward pointer. * 76 * * 77 ********************************************************************************** 78 79 BASE SYM 00090040 4 ZBM 80 NEWSYMTYPE BSSB 4 type of the symbol 00090860 4 ZBM 81 NEWDSPTYPE BSSB 6 display type of symbol 00091420 4 ZBM 82 NEWINDTYPE BSSB 2 defines if symbol is really a memory pointer 00091810 4 ZBM 83 NEWSYMXTRA BSSB 1 1 sez an optional block is tacked on to this block 00091A10 4 ZBM 84 SKILLDBONLY BSSB 1 1 sez symbol is killed, used within debugger only 85 BSSB 1 unused 00091F10 4 ZBM 86 NEWNEXTSYM BSSB 17 relative pointer to next block 00090061 4 ZBM 87 NEWSYMNAMEL BSSB 6 length in words of the symbol name 00090C11 4 ZBM 88 NEWINDEX1 BSSB 1 1 sez array idices start at 1 instead of 0 00090E31 4 ZBM 89 NEWSYMREG BSSB 3 register associated with symbol 00091561 4 ZBM 90 NEWELEMS BSSB 22 number of elements if symbol is an array 00170802 4 BASE 91 NEWSYMVALU BSS 1 value of the symbol 00090013 4 ZBM 92 NEWSYMCASE BSS 1:32 first word of name sez case of corresponding letter 00090064 4 ZBM 93 NEWSYMNAME BSS 6:1 first packed character of the name 94 DRCT 95 96 ********************************************************************************** 97 * * 98 * Possible values for the various symbol block descriptor fields. * 99 * * 100 ********************************************************************************** 101 102 * 103 * Symbol types 104 * 00000000 ABS 105 NEWREG EQU 0 register 00000001 ABS 106 NEWMEM EQU 1 virtual memory 107 ********************************************************************************** 108 *NEWCON1 EQU 2 one word constant * 109 *NEWCON2 EQU 3 two word constant * 110 *NEWFIELDDF EQU 4 field definition relative to unspecified starting point* 111 *NEWREGFLD EQU 5 field definition relative to a base register* 112 *NEWUNDEF1 EQU 6 symbol was never defined * 113 *NEWUNDEF2 EQU 7 symbol cannot be defined * 114 *NEWNOVAL EQU 8 symbol has no data value of its own * 115 *NEWRECORD EQU 9 record type * 116 *NEWSYMENUM EQU 10 symbol defines an enumerated type * 117 ********************************************************************************** 118 * 119 * Display types 120 * 00000000 ABS 121 NEWDEFAULT EQU 0 the default 122 ********************************************************************************** 123 *NEWINST EQU 1 an instruction * 124 *NEWDEC EQU 2 a decimal number * 125 *NEWDPDEC EQU 3 a double-precision decimal number * 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 40 (NEWSYMIMPR) F 10 Variable definitions, storage allocation 126 *NEWFLOAT EQU 4 a floating point number * 127 *NEWDPFP EQU 5 a double-precision floating point number * 128 *NEWPAK6 EQU 6 one word of PAK 6 * 129 *NEWASCII EQU 7 one ASCII word * 130 *NEWCOBOLSW EQU 8 COBOL switch, ON or OFF * 131 *NEWBOOL EQU 9 a boolean, TRUE or FALSE * 132 ********************************************************************************** 0000000A ABS 133 NEWHEX EQU 10 a hex number 134 ********************************************************************************** 135 *NEWOCT EQU 11 an octal number * 136 *NEWPACKD EQU 12 a packed decimal number * 137 *NEWNUMUNS EQU 13 unsigned numeric * 138 *NEWNUMCOM EQU 14 numeric with leading combined sign * 139 *NEWNUMSEP EQU 15 numeric with leading separate sign * 140 *NEWNUMCOMT EQU 16 numeric with trailing combined sign * 141 *NEWNUMSEPT EQU 17 numeric with trailing separate sign * 142 *NEWTEXT EQU 18 a text string * 143 *NEWPSTRNG EQU 19 a PASCAL string * 144 *NEWDRAGSTR EQU 20 a DRAGON string (string ptr.) * 145 *NEWPDD EQU 21 a packed decimal descriptor * 146 *NEWCOBDOPE EQU 22 a COBOL dope vector * 147 *NEWSCALAR EQU 23 a scalar * 148 *NEWPASCREC EQU 24 a PASCAL record * 149 *NEWUSEOTHR EQU 25 use another symbol for display type * 150 *NEWADDR32 EQU 26 a 32-bit address * 151 *NEWOPRND22 EQU 27 a 22-bit operand * 152 *NEWHARDPTR EQU 28 hardware pointer * 153 *NEWDEFSYM EQU 29 definition of a symbol * 154 ********************************************************************************** 155 * 156 * Not generated by the assembler 157 * 158 ********************************************************************************** 159 *NEWPAK12 EQU 30 PAK12 * 160 *NEWASCII2 EQU 31 double-word ASCII * 161 *NEWTIME2 EQU 32 double-word time * 162 *NEWTIME1 EQU 33 single-word time * 163 *NEWHEXCON EQU 34 hex constant * 164 ********************************************************************************** 00000023 ABS 165 NEWPC EQU 35 PC special 166 ********************************************************************************** 167 *NEWMAXDTYP EQU 35 the max display type this version of the debugger knows* 168 ********************************************************************************** 169 * 170 * Indirect types 171 * 00000000 ABS 172 NEWNOIND EQU 0 no indirection 173 ********************************************************************************** 174 *NEWINDHARD EQU 1 indirection through a hardware pointer * 175 *NEWINDPTR EQU 2 indirection through a 17-bit address * 176 ********************************************************************************** 177 * 178 * Conversion codes for the packed symbol names 179 * 00000000 ABS 180 SYMNONE EQU 0 no symbol associated with a zero 00000001 ABS 181 SYMA EQU 1 A 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 41 (NEWSYMIMPR) F 10 Variable definitions, storage allocation 00000002 ABS 182 SYMB EQU 2 B 00000003 ABS 183 SYMC EQU 3 C 00000004 ABS 184 SYMD EQU 4 D 00000005 ABS 185 SYME EQU 5 E 00000006 ABS 186 SYMF EQU 6 F 00000007 ABS 187 SYMG EQU 7 G 00000008 ABS 188 SYMH EQU 8 H 00000009 ABS 189 SYMI EQU 9 I 0000000A ABS 190 SYMJ EQU 10 J 0000000B ABS 191 SYMK EQU 11 K 0000000C ABS 192 SYML EQU 12 L 0000000D ABS 193 SYMM EQU 13 M 0000000E ABS 194 SYMN EQU 14 N 0000000F ABS 195 SYMO EQU 15 O 00000010 ABS 196 SYMP EQU 16 P 00000011 ABS 197 SYMQ EQU 17 Q 00000012 ABS 198 SYMR EQU 18 R 00000013 ABS 199 SYMS EQU 19 S 00000014 ABS 200 SYMT EQU 20 T 00000015 ABS 201 SYMU EQU 21 U 00000016 ABS 202 SYMV EQU 22 V 00000017 ABS 203 SYMW EQU 23 W 00000018 ABS 204 SYMX EQU 24 X 00000019 ABS 205 SYMY EQU 25 Y 0000001A ABS 206 SYMZ EQU 26 Z 0000001B ABS 207 SYM0 EQU 27 0 0000001C ABS 208 SYM1 EQU 28 1 0000001D ABS 209 SYM2 EQU 29 2 0000001E ABS 210 SYM3 EQU 30 3 0000001F ABS 211 SYM4 EQU 31 4 00000020 ABS 212 SYM5 EQU 32 5 00000021 ABS 213 SYM6 EQU 33 6 00000022 ABS 214 SYM7 EQU 34 7 00000023 ABS 215 SYM8 EQU 35 8 00000024 ABS 216 SYM9 EQU 36 9 00000025 ABS 217 SYMBANG EQU 37 ! 00000026 ABS 218 SYMAMPER EQU 38 & 00000027 ABS 219 SYMUNDER EQU 39 _ 00000027 ABS 220 SYMDASH EQU 39 - (same as SYMUNDER) 00000027 ABS 221 MAXPAKDCHR EQU 39 the biggest packed character at this time 00000006 ABS 222 PAKCHRBITS EQU 6 number of bits to hold a packed character 223 * 224 * Values of the registers 225 * 00000000 ABS 226 VALUEOFR0 EQU 0 R0 00000001 ABS 227 VALUEOFR1 EQU 1 R1 00000002 ABS 228 VALUEOFR2 EQU 2 R2 00000003 ABS 229 VALUEOFR3 EQU 3 R3 00000004 ABS 230 VALUEOFR4 EQU 4 R4 00000005 ABS 231 VALUEOFR5 EQU 5 R5 00000006 ABS 232 VALUEOFR6 EQU 6 R6 00000007 ABS 233 VALUEOFR7 EQU 7 R7 00000008 ABS 234 VALUEOFPC EQU 8 PC 00000009 ABS 235 VALUEOFPSR EQU 9 PSR 0000000A ABS 236 VALUEOFIMR EQU 10 IMR 0000000B ABS 237 VALUEOFIAD EQU 11 IAD 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 42 (NEWSYMIMPR) F 10 Variable definitions, storage allocation 239 240 ********************************************************************************** 241 * * 242 * Buffers, pointers, and counters for converting ASCII characters * 243 * to packed characters for searching and for converting packed * 244 * characters to ASCII for printing. * 245 * * 246 ********************************************************************************** 247 00000008 ABS 248 MAXSYMWRDS EQU 8 maximum number of words in a name 00000020 ABS 249 MAXSYMCHRS EQU 32 maximum number of characters in a name 250 * 251 * This is the buffer that is used to hold a converted ASCII 252 * character string. The first bit array holds the case flag 253 * associated with the corresponding letter. The second array 254 * is MAXSYMCHARS long with each entry being PAKCHRBITS long. 255 * Note that these two buffers MUST be consecutive. 256 * 0041AA91 257 SRCHCASEBF BSSB 1:MAXSYMCHRS an upper/lower case bit for each entry 0181AA92 258 SRCHBUFF BSSB PAKCHRBITS:MAXSYMCHRS enough to hold the max 259 BSS 0 force a word boundary 0000001C ABS 260 LENTOZERO EQU DISPC SRCHCASEBF used to zero both buffers 261 0001AA98 262 SRCHBUFLN BSS 1 holds the length in packed chars 1AA99 0049AA91 263 SRCHCASEPT PTR SRCHCASEBF pointer to the bit array 1AA9A 0189AA92 264 SRCHBUFFPT PTR SRCHBUFF pointer to the packed item array 265 * 266 * This buffer holds a maximum of MAXSYMWRDS*CPW ASCII 267 * characters that have been converted from a packed 268 * character string. 269 * 0001AA9B 270 ASCIIBUFF BSS MAXSYMWRDS buffer for output 271 0001AAA3 272 ASCIIBUFLN BSS 1 holds the length of the buffer 1AAA4 020DAA9B 273 ASCIIBUFPT PTR ASCIIBUFF/BITS 0:7 character pointer 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 43 (NEWSYMIMPR) F 10 Variable definitions, storage allocation 275 276 ********************************************************************************** 277 * * 278 * Here is a template for the source block descriptor using * 279 * the newest symbol information. These blocks are arranged * 280 * in ascending address order starting at the memory location * 281 * pointed to by NEWSRCTOP and continuing on for NEWSRCLEN * 282 * words. * 283 * * 284 ********************************************************************************** 285 286 BASE SRC 00170800 4 BASE 287 NEWSRCADDR BSS 1 character address in file of source text record 000901B1 4 ZBM 288 NEWSTATNUM BSSB 27 statement number 00093611 4 ZBM 289 NEWLABLFLG BSSB 1 statement has a label 00093811 4 ZBM 290 NEWXFERFLG BSSB 1 statement can be transferer to 291 BSSB 3 space holders 00170008 4 CACH 292 NEWSRCTYPR BSSB 8 type of source statement 293 BSSB 7 more space holders 00091F12 4 ZBM 294 NEWSRCBASE BSSB 17 base address of statement code 0017000C 4 CACH 295 NEWTXTRECS BSSB 8 count of source statement text records 296 BSSB 7 more space holders 00091F13 4 ZBM 297 NEWSRCINST BSSB 17 number of instructions making up the source statement 00000004 ABS 298 NEWSRCBLEN EQU DISPW NEWSRCADDR word length of a source block 299 DRCT 300 301 ********************************************************************************** 302 * * 303 * Possible values for the various source block descriptor fields. * 304 * * 305 ********************************************************************************** 306 307 * 308 * source types, PASCAL 309 * 310 ********************************************************************************** 311 *NEWPUNKNWN EQU 0 undefined for PASCAL * 312 *NEWPASASS EQU 1 assignment * 313 *NEWPASGOTO EQU 2 GOTO * 314 *NEWPASIF EQU 3 IF * 315 *NEWPASCASE EQU 4 CASE * 316 *NEWPASWHIL EQU 5 WHILE * 317 *NEWPASUNTL EQU 6 UNTIL * 318 *NEWPASFOR EQU 7 FOR * 319 *NEWPASWITH EQU 8 WITH * 320 *NEWPASLEND EQU 9 LOOP END * 321 *NEWPASRETN EQU 10 RETURN * 322 *NEWPASECSE EQU 11 END of CASE * 323 *NEWPASON EQU 12 ON * 324 *NEWPASEFOR EQU 13 END of FOR * 325 *NEWPASWHEN EQU 14 WHEN within a LOOP * 326 *NEWPASEWEN EQU 15 WHEN to EXIT a LOOP * 327 *NEWPASENTR EQU 16 procedure entry point * 328 *NEWPASPCAL EQU 17 a procedure call * 329 *NEWPASEWIL EQU 18 END of WHILE * 330 *NEWPASESUB EQU 19 END of a subcase within a CASE * 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 44 (NEWSYMIMPR) F 10 Variable definitions, storage allocation 331 *NEWPASSYS EQU 20 a system call * 332 ********************************************************************************** 333 * 334 * source types, FORTRAN 335 * 336 ********************************************************************************** 337 *NEWFUNKNWN EQU 0 unknown in FORTRAN * 338 *NEWFORASS EQU 1 assignment * 339 *NEWFORGOTO EQU 2 GOTO * 340 *NEWASSGOTO EQU 3 assigned GOTO * 341 *NEWCOMGOTO EQU 4 computed GOTO * 342 *NEWFORARIF EQU 5 arithmetic IF * 343 *NEWFORLGIF EQU 6 logical IF * 344 *NEWFORBKIF EQU 7 IF with block * 345 *NEWFORIFEL EQU 8 ELSE associated with IF * 346 *NEWFOREIF EQU 9 END of an IF * 347 *NEWFORELSE EQU 10 ELSE * 348 *NEWFORCONT EQU 11 CONTINUE * 349 *NEWFORDO EQU 12 DO * 350 *NEWFORSTOP EQU 13 STOP * 351 *NEWFORPAUS EQU 14 PAUSE * 352 *NEWFORREAD EQU 15 READ * 353 *NEWFORWRIT EQU 16 WRITE * 354 *NEWFORPRIN EQU 17 PRINT * 355 *NEWFORRWND EQU 18 REWIND * 356 *NEWFORBKSP EQU 19 backspace a file one record * 357 *NEWFORWEOF EQU 20 WRITE EOF to file * 358 *NEWFOROPEN EQU 21 OPEN * 359 *NEWFORCLOS EQU 22 CLOSE * 360 *NEWFORINFO EQU 23 retrieve infomation about a file * 361 *NEWFORSFUN EQU 24 statement function statement * 362 *NEWFORCALL EQU 25 subroutine CALL * 363 *NEWFORSUBR EQU 26 subroutine RETURN * 364 *NEWFOREND EQU 27 END * 365 *NEWFORNONE EQU 28 nothing here right now * 366 *NEWFORTRNS EQU 29 begining of a transaction * 367 *NEWFORETRN EQU 30 end of a transaction * 368 ********************************************************************************** 369 * 370 * source types, COBOL 371 * 372 ********************************************************************************** 373 *NEWCOBEXIT EQU 0 EXIT * 374 *NEWCOBIF EQU 1 IF * 375 *NEWCOBGOTO EQU 2 GOTO * 376 *NEWCOBACPT EQU 3 ACCEPT * 377 *NEWCOBADD EQU 4 ADD * 378 *NEWCOBALTR EQU 5 ALTER * 379 *NEWCOBTRAN EQU 6 beginning of a transaction * 380 *NEWCOBCALL EQU 7 CALL * 381 *NEWCOBCNCL EQU 8 CANCEL * 382 *NEWCOBCLOS EQU 9 CLOSE * 383 *NEWCOBCMPT EQU 10 COMPUTE * 384 *NEWCOBDEL EQU 11 DELETE * 385 *NEWCOBDISP EQU 12 DISPLAY * 386 *NEWCOBDIV EQU 13 DIVIDE * 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 45 (NEWSYMIMPR) F 10 Variable definitions, storage allocation 387 *NEWCOBETRN EQU 14 end of a transaction * 388 *NEWCOBENTR EQU 15 ENTER * 389 *NEWCOBINSP EQU 16 INSPECT * 390 *NEWCOBMRGE EQU 17 MERGE * 391 *NEWCOBMOVE EQU 18 MOVE * 392 *NEWCOBMULT EQU 19 MULTIPLY * 393 *NEWCOBOPEN EQU 20 OPEN * 394 *NEWCOBPERF EQU 21 PERFORM * 395 *NEWCOBREAD EQU 22 READ * 396 *NEWCOBRLSE EQU 23 RELEASE * 397 *NEWCOBRTRN EQU 24 RETURN * 398 *NEWCOBREWR EQU 25 REWRITE * 399 *NEWCOBSRCH EQU 26 SEARCH * 400 *NEWCOBSET EQU 27 SET * 401 *NEWCOBSORT EQU 28 SORT * 402 *NEWCOBSTRT EQU 29 START * 403 *NEWCOBSTOP EQU 30 STOP * 404 *NEWCOBSTRG EQU 31 STRING * 405 *NEWCOBSUB EQU 32 SUBTRACT * 406 *NEWCOBSYS EQU 33 SYSTEM * 407 *NEWCOBUNLK EQU 34 UNLOCK * 408 *NEWCOBUNST EQU 35 UNSTRING * 409 *NEWCOBWRTE EQU 36 WRITE * 410 ********************************************************************************** 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 46 (NEWSYMIMPR) F 10 Variable definitions, storage allocation 412 413 ********************************************************************************** 414 * * 415 * The control block for the new symbol format (page 128 of file). * 416 * * 417 ********************************************************************************** 418 0001AAA9 419 NEWCONTROL LABEL here it is 0001AAA9 420 NEWTREETOP BSS 1 pointer to the first subprogram descriptor 0001AAAA 421 NEWARRAYPT BSS 1 address of an array of overlay pointers 0001AAAB 422 NEWSYMFLAG BSS 1 non-zero sez that symbols really do exists Virginia 0001AAAC 423 NEWUNUSED BSS 1 unused 0001AAAD 424 NEWFORMAT BSS 1 format of the debugger symbol info 0001AAAE 425 NEWSUBTOP BSS 1 pointer to top of subprogram descriptor area 0001AAAF 426 NEWSUBLEN BSS 1 length in words of subprogram descriptor area 0001AAB0 427 NEWSYMTOP BSS 1 pointer to top of symbol block descriptor area 0001AAB1 428 NEWSYMLEN BSS 1 length in words of symbol block descriptor area 0001AAB2 429 NEWSRCTOP BSS 1 pointer to top of source block descriptor area 0001AAB3 430 NEWSRCLEN BSS 1 length in words of source block descriptor area 0001AAB4 431 NEWTEXTTOP BSS 1 pointer to top of text record area 0001AAB5 432 NEWTEXTLEN BSS 1 length in words of text record area 433 BSS 10 overlay shit 00000017 ABS 434 NEWCNTRLLN EQU DISPW NEWCONTROL length of the control area for the new format 00000001 ABS 435 NEWFORMCOD EQU 1 in NEWFORMAT field this signifies the NEW symbol format 436 437 ********************************************************************************** 438 * * 439 * Other control variables for the new symbol format. * 440 * * 441 ********************************************************************************** 442 0001AAC0 443 USINGNEW BSS 1 1 sez new format, 0 sez old format 0001AAC1 444 HIGHADDR BSS 1 high memory address used by symbol info 0001AAC2 445 HIGHPAGE BSS 1 high page number used by symbol info 0201AAC3 446 ASCFILENAM BSSC 12 buffer to hold ASCII name for PAK12ing 0001AAC6 447 PAK12FNAME BSS2 1 PAK12 result of above buffer 448 *GLBLDSPCOD VFD 0 anything but FIELDCODE to start (see Display) 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 47 (NEWSYMIMPR) F 10 Variable definitions, storage allocation 450 451 ********************************************************************************** 452 * * 453 * Here is the top of the tree for the new symbol format. It is * 454 * basically an empty entry that will have and son pointer to the * 455 * top of the real tree. It also points to a symbol list that * 456 * contains the registers. * 457 * * 458 ********************************************************************************** 459 00000005 ABS 460 REGSYMSIZE EQU 5 size of a register symbol block 0000000C ABS 461 NUREG EQU 12 the number of registers we know about 00000000 ABS 462 NILPTR EQU 0 the end of a list 463 1AAC8 00000000 464 NEWTREEHED VFD 0 no daddy 1AAC9 00000000 465 VFD 0 no bro' 1AACA 00000000 466 VFD 0 no kids for now 1AACB 0001AD18 467 ADR NEWREGSYMS top of register symbols list 1AACC 00000000 468 VFD 0 no source statements here 1AACD 0000003C 469 VFD 8:0,24:REGSYMSIZE*NUREG 1AACE 00000000 470 VFD 8:0,24:0 1AACF 00000000 471 VFD 12:0,1:1,1:0,1:0,17:0 1AAD0 0001FFFF 472 VFD 3:1,1:1,11:0,17:01FFFF 1AAD1 00000000 473 VFD 0 1AAD3 00000000 474 VFD 0,0 place for the date 1AAD5 00000000 475 VFD 0,0 no debug file 121 122 INPUT RDUPURE 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 48 (RDUPURE) F 11 Variable definitions, storage allocation 2 3 ********************************************************************************** 4 * * 5 * Now for the pure-code area definitions * 6 * * 7 ********************************************************************************** 8 9 ORG PUREPAGE relocate correctly 10 00001F30 BYTE 11 NXTCHAR EQU BITS 15:1 buffer address increment 1AC00 020DA800 12 IBPT PTR IBUFF input buffer pointer 1AC01 020DA818 13 OBPT PTR OBUFF output buffer pointer 1AC02 020DA830 14 SBPT PTR SBUFF symbol buffer pointer 1AC03 020DA866 15 CBPT PTR CBUFF comm buffer pointer 1AC04 020DA848 16 LBPT PTR LBUFF log buffer pointer 1AC05 420DA848 17 LBPT1 PTR LBUFF(1) pointer to second character 1AC06 020DA885 18 RECPT PTR RECBUFF pointer to receive string buffer 1AC07 020DA89E 19 DOBFPT PTR DOBUFF pointer to do file response buffer 1AC08 0049A8E2 20 TOFLAG PTR INTFLAGS/BIT 0 sez timeout occurred 1AC09 0849A8E2 21 PDFLAG PTR INTFLAGS/BIT 1 sez path data present 1AC0A 0109A934 22 XBCM PTR XDATA/BITS 0:3 message bcm field 1AC0B F849A8D6 23 STOPPED PTR STATE/BIT 31 sez remote machine stopped 1AC0C 2709A934 24 XADDR PTR XDATA/BITS 4:31 message address field 1AC0D 0000003A 25 PROMPT VFDC STAR,"R","D","U",COLON prompt sequence 00000005 ABS 26 PROMPTLEN EQU DISPC PROMPT prompt sequence length 1AC0F 48494748 27 HIGHCHARS ASCII 1,HIGH 1AC10 4C4F5720 28 LOWCHARS ASCII 1,LOW 1AC11 20202020 29 BLANKS ASCII 2, 1AC13 533719C0 30 EXTCODE PAK6 CODE .CODE extension 1AC14 59439000 31 EXTDO PAK6 DO .DO extension 1AC15 4C495354 32 ASCILIST ASCII 1,LIST list do file commands 1AC16 53555050 33 ASCISUPP ASCII 1,SUPP suppress do file commands 1AC17 52454D4F 34 SITEFILE TEXT "REMOTE.RFP:SITEFILE.TEXT " 1AC1F 00000000 35 VFD 0,0 space to expand name if needed 1AC20 003FFFFF 36 ERF3MASK VFD -1/ERF3 bits, bits, bits 1AC22 0036EE80 37 ONEHOUR2 VFD 0,1000*60*60 double word msecs per hour 1AC23 000003E8 38 MSECSS VFD 1000 msecs per second 39 1AC24 02000000 40 DLYBRKMASK VFD 1*BIT 6 mask for breaks interrupting delays 1AC25 00800000 41 TERMEVENT VFD 1*BIT 8 non-empty terminal value for URDELAY 42 43 * PPU needs 5 seconds to do selftest, URDELAY is may reduce 44 * wait by 1 second (timer is imprecise) 1AC26 00000006 45 PPUSTWAIT VFD 6 #seconds to wait to get PPU selftest result 46 1AC27 4E4F4C4F 47 NOLOG ASCII 1,NOLO nolog check 1AC28 A07A5067 48 PARAMBANG PAK12 PARAMETERS! 49 00000080 BYTE 50 ENTROBITS EQU BITS 0:7 ENTR opcode bits 000000DD ABS 51 ENTROPS EQU 0DD ENTR opcode value 00000010 ABS 52 PAROPS EQU 040/4 PAR op-code family 1AC2A 0000BAB0 53 BPIVALUE VFD 0000BAB0 special halt for BPI's 1AC2B 0000BAB9 54 BPIMAXVAL VFD 0000BAB9 maximum BPI halt code 55 1AC2C 00030003 56 CPSTEP VFD 030003 single-step address 0000140A ABS 57 MB1ADR EQU 0140A address of message buffer 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 49 (RDUPURE) F 11 Variable definitions, storage allocation 00001413 ABS 58 MB2ADR EQU 01413 address of message buffer 59 1AC2D 45584954 60 EXITCOM ASCII 1,EXIT exit command text 61 0001AC2E 62 ONOFFTAB LABEL ON/OFF table 1AC2E 4F464620 63 ASCII 1,OFF 1AC2F 4E4F2020 64 ASCII 1,NO 1AC30 4E202020 65 ASCII 1,N 00000003 ABS 66 ONSYMS EQU DISPW ONOFFTAB 1AC31 4F4E2020 67 ASCII 1,ON 1AC32 59455320 68 ASCII 1,YES 1AC33 59202020 69 ASCII 1,Y 00000006 ABS 70 OOTLEN EQU DISPW ONOFFTAB 71 1AC39 000186A0 72 TENTAB VFD 1,10,100,1000,10000,100000 1AC3D 3B9ACA00 73 VFD 1000000,10000000,100000000,1000000000 00000009 ABS 74 NDIGSD EQU 10-1 ten digits max 75 1AC3E 30313233 76 HEXTAB TEXT "0123456789ABCDEF" 1AC42 020DAC3E 77 HEXC PTR HEXTAB/BITS 0:7 hex decode table 78 1AC43 FEC00000 79 HEXSHIFT NOP 0 0 digits 1AC44 600A3800 0 0 CBM 80 LD R0 R0/BITS 28:27 1 digit 1AC45 600A3000 0 0 CBM 81 LD R0 R0/BITS 24:23 2 digits 1AC46 600A2800 0 0 CBM 82 LD R0 R0/BITS 20:19 3 digits 1AC47 600A2000 0 0 CBM 83 LD R0 R0/BITS 16:15 4 digits 1AC48 600A1800 0 0 CBM 84 LD R0 R0/BITS 12:11 5 digits 1AC49 600A1000 0 0 CBM 85 LD R0 R0/BITS 8:7 6 digits 1AC4A 600A0800 0 0 CBM 86 LD R0 R0/BITS 4:3 7 digits 1AC4B FEC00000 87 NOP 0 8 digits 88 1AC4C 20303132 89 P6TAB TEXT " 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ!&_" 1AC56 020DAC4C 90 P6CHARS PTR P6TAB/BITS 0:7 pack-6 decode table 91 1AC57 00000001 92 FORTYTAB VFD 40 POWER 0 powers of 40 1AC58 00000028 93 VFD 40 POWER 1 1AC59 00000640 94 VFD 40 POWER 2 1AC5A 0000FA00 95 VFD 40 POWER 3 1AC5B 00271000 96 VFD 40 POWER 4 1AC5C 061A8000 97 VFD 40 POWER 5 98 1AC5D 00040000 99 TCTABN VFD 000040000 terminating character table 1AC5E 00000010 100 VFD 000000010 1AC5F 00000000 101 VFD 000000000 1AC60 00000000 102 VFD 000000000 1AC61 00040000 103 VFD 000040000 1AC62 00000010 104 VFD 000000010 1AC63 00000000 105 VFD 000000000 1AC64 00000000 106 VFD 000000000 107 1AC65 00240000 108 TCTABD VFD 000240000 t.c. table during display 1AC66 0002000A 109 VFD 00002000A 1AC67 80000002 110 VFD 080000002 1AC68 00000000 111 VFD 000000000 1AC69 00240000 112 VFD 000240000 1AC6A 0002000A 113 VFD 00002000A 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 50 (RDUPURE) F 11 Variable definitions, storage allocation 1AC6B 80000002 114 VFD 080000002 1AC6C 00000000 115 VFD 000000000 116 1AC6D FFFFFFFF 117 TCTABZ VFD 0FFFFFFFF t.c. tab for port zero input 1AC6E FFFFFFFF 118 VFD 0FFFFFFFF 1AC6F FFFFFFFF 119 VFD 0FFFFFFFF 1AC70 FFFFFFFF 120 VFD 0FFFFFFFF 1AC71 FFFFFFFF 121 VFD 0FFFFFFFF 1AC72 FFFFFFFF 122 VFD 0FFFFFFFF 1AC73 FFFFFFFF 123 VFD 0FFFFFFFF 1AC74 FFFFFFFF 124 VFD 0FFFFFFFF 125 1AC75 40040000 126 TCTABP VFD 040040000 t.c. table for concurrent proc 1AC76 00000000 127 VFD 000000000 1AC77 00000000 128 VFD 000000000 1AC78 00000000 129 VFD 000000000 1AC79 40040000 130 VFD 040040000 1AC7A 00000000 131 VFD 000000000 1AC7B 00000000 132 VFD 000000000 1AC7C 00000000 133 VFD 000000000 134 135 *TCTABX VFD 000000000 t.c. table for no terminators 136 * VFD 000000000 137 * VFD 000000000 138 * VFD 000000001 139 * VFD 000000000 140 * VFD 000000000 141 * VFD 000000000 142 * VFD 000000001 143 1AC7D 00000301 144 TCCODES VFD 1*TEOL+1*TNUM+1*TALPH 1AC7E 00000303 145 VFD 1*TEOL+1*TDOT+1*TNUM+1*TALPH 1AC7F 0000030F 146 VFD 1*TEOL+1*TDOT+1*TLFD+1*TUPA+1*TNUM+1*TALPH 1AC80 00000313 147 VFD 1*TEOL+1*TDOT+1*TPTR+1*TNUM+1*TALPH 1AC81 0000033F 148 VFD 1*TEOL+1*TDOT+1*TLFD+1*TUPA+1*TPTR+1*TBPT+1*TNUM+1*TALPH 1AC82 0000037F 149 VFD 1*TEOL+1*TDOT+1*TLFD+1*TUPA+1*TPTR+1*TBPT+1*TATS+1*TNUM+1*TALPH 1AC83 0000031F 150 VFD 1*TEOL+1*TDOT+1*TLFD+1*TUPA+1*TPTR+1*TNUM+1*TALPH 1AC84 00000000 151 VFD 0 152 0001AC85 153 ADRMASK LABEL Address mask table 1AC85 0000000F 154 VFD 00000000F 4-bit 1AC86 0000001F 155 VFD 00000001F 5-bit 1AC87 0000007F 156 VFD 00000007F 7-bit 1AC88 000000FF 157 VFD 0000000FF 8-bit 1AC89 000001FF 158 VFD 0000001FF 9-bit 1AC8A 000003FF 159 VFD 0000003FF 10-bit 1AC8B 000007FF 160 VFD 0000007FF 11-bit 1AC8C 0003FFFF 161 VFD 00003FFFF 18-bit 1AC8D 001FFFFF 162 VFD 0001FFFFF 21-bit 1AC8E 003FFFFF 163 VFD 0003FFFFF 22-bit 1AC8F 0FFFFFFF 164 VFD 00FFFFFFF 28-bit 1AC90 FFFFFFFF 165 VFD 0FFFFFFFF 32-bit 166 1AC9C 00000008 167 ADDRDIGS VFD 1,2,2,2,3,3,3,5,6,6,7,8 # digits of address 1ACA0 00000008 168 DATADIGS VFD 0,1,2,8 # digits of data 169 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 51 (RDUPURE) F 11 Variable definitions, storage allocation 00000009 ABS 170 FILLPPS EQU 9 pages per second that can be filled 00000003 ABS 171 SCANPPS EQU 3 pages per second that can be scanned 00000014 ABS 172 SCANTIME EQU 20 number of seconds to spend scanning 1ACA1 0000EFFF 173 MAXSCAN VFD SCANPPS*SCANTIME*WPP-1 maximum words in a scan minus 1 1ACA2 0002CFFF 174 MAXFILL VFD FILLPPS*SCANTIME*WPP-1 maximum words in a fill minus 1 175 1ACA3 48202020 176 DTTAB ASCII 1,H hex 1ACA4 44202020 177 ASCII 1,D decimal 1ACA5 50202020 178 ASCII 1,P packed 1ACA6 50362020 179 ASCII 1,P6 packed 1ACA7 41202020 180 ASCII 1,A ascii 1ACA8 49202020 181 ASCII 1,I instruction dis-assembly 1ACA9 54202020 182 ASCII 1,T double word time 1ACAA 5A202020 183 ASCII 1,Z single word time 00000008 ABS 184 DTTABL EQU DISPW DTTAB 185 1ACAB DC41B5FB 186 DISPTAB CALLNP HEXOUTN hex display 1ACAC DC41B62D 187 CALLNP DECOUT decimal display 1ACAD DC41B653 188 CALLNP PAK6OUT packed display 1ACAE DC41B653 189 CALLNP PAK6OUT packed display 1ACAF DC41B643 190 CALLNP ASCOUT ascii display 1ACB0 DC41B686 191 CALLNP OPOUT op-code display 1ACB1 DC41B7BD 192 CALLNP TIMEOUT double word time display 1ACB2 DC41B7DA 193 CALLNP TIMEOUTS single word time display 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 52 (RDUPURE) F 11 Variable definitions, storage allocation 195 196 ********************************************************************************** 197 * * 198 * The following tables control the disassembly of machine * 199 * words into user-readable instructions. The first table is * 200 * a conversion table from address modes into control classes. * 201 * The second table is the action control table which determines * 202 * how each class is to be displayed. There is one entry of * 203 * action codes for each class. The third table is the action * 204 * table which contains instructions which are executed as * 205 * requested to produce the output. * 206 * * 207 ********************************************************************************** 208 1ACB3 0149ACB4 209 MODETAB PTR OPOMODE 1ACB4 00000000 210 OPOMODE VFD 5:1,4,5,6,8,7,0,0 modes 0-7 1ACB5 00000016 211 VFDB 5:2,3,9,10,0,18,20,22 modes 8-F 1ACB6 00000017 212 VFDB 5:23,23,23,23,23,23,23,23 modes 10-17 1ACB8 00000018 213 VFDB 5:24,24,24,24,24,24,24,24 modes 18-1F 214 215 00000000 ABS 216 OOO EQU 0 error,filler 00000001 ABS 217 OMA EQU 1 memory address 00000002 ABS 218 ORG EQU 2 register 00000003 ABS 219 OCO EQU 3 constant 00000004 ABS 220 OBY EQU 4 byte 00000005 ABS 221 ODX EQU 5 subscripted register 00000006 ABS 222 OGD EQU 6 "goodie" word 00000007 ABS 223 OCM EQU 7 comma 00000008 ABS 224 OAT EQU 8 at-sign 00000009 ABS 225 OPA EQU 9 PAIR 0000000A ABS 226 OCH EQU 10 CACH 0000000B ABS 227 OLP EQU 11 left-paren 0000000C ABS 228 ORP EQU 12 right-paren 0000000D ABS 229 OPL EQU 13 plus 0000000E ABS 230 OI1 EQU 14 INT1 0000000F ABS 231 OF1 EQU 15 FLT1 00000010 ABS 232 OF2 EQU 16 FLT2 00000011 ABS 233 OST EQU 17 STAK 00000012 ABS 234 OLZ EQU 18 LJZF 00000013 ABS 235 ORZ EQU 19 RJZF 00000014 ABS 236 ORW EQU 20 RJWF 00000015 ABS 237 OCA EQU 21 constant(28:31) 00000016 ABS 238 OCB EQU 22 constant(18:31) 00000017 ABS 239 OCC EQU 23 constant(22:31) 00000018 ABS 240 ORA EQU 24 register(15:17) 00000019 ABS 241 ORB EQU 25 register(18:20) 0000001A ABS 242 ORC EQU 26 register(12:14) 0000001B ABS 243 OS1 EQU 27 state change(18:21) 0000001C ABS 244 OS2 EQU 28 state change(21) 0000001D ABS 245 OHX EQU 29 hex output 0000001E ABS 246 OEX EQU 30 exit (done!!) 0000001F ABS 247 OGR EQU 31 goodie with register masked off 248 249 0000000C ABS 250 NAPC EQU 12 12 actions per entry 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 53 (RDUPURE) F 11 Variable definitions, storage allocation 1ACB9 0149ACBA 251 ACTTAB PTR OPOACT/BITS 0:4 0001ACBA 252 OPOACT LABEL (action control table) 1ACBA 00000000 253 VFDB 5:OHX,OEX,OOO,OOO,OOO,OOO,OOO,OOO,OOO,OOO,OOO,OOO 1ACBC 00000000 254 VFDB 5:OMA,OEX,OOO,OOO,OOO,OOO,OOO,OOO,OOO,OOO,OOO,OOO 1ACBE 00000000 255 VFDB 5:OGD,OAT,OMA,OEX,OOO,OOO,OOO,OOO,OOO,OOO,OOO,OOO 1ACC0 00000000 256 VFDB 5:ORG,OEX,OOO,OOO,OOO,OOO,OOO,OOO,OOO,OOO,OOO,OOO 1ACC2 00000000 257 VFDB 5:OLZ,OCO,OEX,OOO,OOO,OOO,OOO,OOO,OOO,OOO,OOO,OOO 1ACC4 00000000 258 VFDB 5:ORZ,OCO,OEX,OOO,OOO,OOO,OOO,OOO,OOO,OOO,OOO,OOO 1ACC6 00000000 259 VFDB 5:ORW,OCO,OEX,OOO,OOO,OOO,OOO,OOO,OOO,OOO,OOO,OOO 1ACC8 00000000 260 VFDB 5:OGD,ORG,OCB,OBY,OEX,OOO,OOO,OOO,OOO,OOO,OOO,OOO 1ACC9 00000000 261 VFDB 5:OGD,ORG,OCM,OGR,OCA,OCO,OCB,OBY,OEX,OOO,OOO,OOO 1ACCB 00000000 262 VFDB 5:OGD,OPA,ORG,OEX,OOO,OOO,OOO,OOO,OOO,OOO,OOO,OOO 1ACCD 00000000 263 VFDB 5:OGD,OS1,OCH,ORG,OCC,OCM,OCO,OEX,OOO,OOO,OOO,OOO 1ACCF 00000000 264 VFDB 5:OOO,OOO,OAT,ORG,OCC,OLP,OCO,ORP,OEX,OOO,OOO,OOO 1ACD1 00000000 265 VFDB 5:OOO,OOO,ORG,OCM,OGR,OCC,OCO,OEX,OOO,OOO,OOO,OOO 1ACD3 00000000 266 VFDB 5:OOO,OOO,OAT,OLP,ORG,OCC,OCM,OCO,ORP,OEX,OOO,OOO 1ACD5 00000000 267 VFDB 5:OOO,OOO,ORG,OCC,OPL,OCO,OEX,OOO,OOO,OOO,OOO,OOO 1ACD7 00000000 268 VFDB 5:OOO,OOO,OI1,ORG,OEX,OOO,OOO,OOO,OOO,OOO,OOO,OOO 1ACD8 00000000 269 VFDB 5:OOO,OOO,OF1,ORG,OEX,OOO,OOO,OOO,OOO,OOO,OOO,OOO 1ACDA 00000000 270 VFDB 5:OOO,OOO,OF2,ORG,OEX,OOO,OOO,OOO,OOO,OOO,OOO,OOO 1ACDC 00000000 271 VFDB 5:OGD,OS2,OCH,ORG,OCC,OCM,OCO,ORB,ODX,OEX,OOO,OOO 1ACDE 0000001E 272 VFDB 5:OOO,OOO,OAT,ORG,ORB,OCC,OLP,ORG,OPL,OCO,ORP,OEX 1ACE0 00000000 273 VFDB 5:OGD,OS2,ORG,OCC,OCM,OCO,ORB,ODX,OEX,OOO,OOO,OOO 1ACE2 0000001E 274 VFDB 5:OOO,OOO,OAT,OLP,ORG,OCC,OCM,OCO,ORP,ORB,ODX,OEX 1ACE4 00000000 275 VFDB 5:OGD,OST,ORG,OCC,OCM,OCO,OEX,OOO,OOO,OOO,OOO,OOO 1ACE6 00000000 276 VFDB 5:OGD,ORC,OMA,ODX,OEX,OOO,OOO,OOO,OOO,OOO,OOO,OOO 1ACE7 00000000 277 VFDB 5:OGD,ORC,OAT,OMA,ODX,OEX,OOO,OOO,OOO,OOO,OOO,OOO 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 54 (RDUPURE) F 11 Variable definitions, storage allocation 279 280 ********************************************************************************** 281 * * 282 * The following macro is just like BEGFRAME except that it does * 283 * NOT generate a BSS 1 for the return link word. * 284 * * 285 ********************************************************************************** 286 287 BEGFRAME2 MACRO 288 NOLIST 289 NOLIST CREF 290 FRAME! BASE SP beginning of stack frame 291 LIST CREF 292 LIST 293 EMAC 123 124 INPUT NEWSYMPURE 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 55 (NEWSYMPURE) F 12 Variable definitions, storage allocation 2 3 ********************************************************************************** 4 * * 5 * Here are the tables used for the conversion of packed characters * 6 * into ASCII characters and vice-versa. * 7 * * 8 ********************************************************************************** 9 * 10 * This table is indexed with a packed character and yields an 11 * ASCII character. This table yields upper case letters. 12 * 1ACE9 20414243 13 PK2UPCHAR TEXTZ / ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!&_/ 14 * 15 * This table is indexed with a packed character and yields an 16 * ASCII character. This table yields lower case letters. 17 * 1ACF4 20616263 18 PK2LOWCHR TEXTZ / abcdefghijklmnopqrstuvwxyz0123456789!&_/ 19 * 20 * This table is indexed with an ( ASCII character ) - ( the starting 21 * offset ) and yields a packed character value. The bit UPLOWBIT 22 * sez upper case if 0 and lower case if 1. 23 * 00003010 BYTE 24 UPLOWBIT EQU BIT 24 bit 8 of a char that is in a register 00000080 ABS 25 LOWRCASE EQU 1*UPLOWBIT 1 in bit 8 of character sez lower case 00000021 ABS 26 LOWBOUND EQU 33 the lowest ASCII a packed character can represent 27 1ACFF 020DAD00 28 ASC2PAKPT PTR ASC2PACKD character pointer into the conversion table 1ACFF 00000025 29 ASC2PACKD VFDC SYMBANG 1AD00 00000000 30 VFDC SYMNONE,SYMNONE,SYMNONE,SYMNONE 1AD00 00000026 31 VFDC SYMAMPER 1AD02 00000000 32 VFDC SYMNONE,SYMNONE,SYMNONE,SYMNONE,SYMNONE,SYMNONE 1AD02 00000027 33 VFDC SYMDASH 1AD02 00000000 34 VFDC SYMNONE,SYMNONE 1AD05 00000024 35 VFDC SYM0,SYM1,SYM2,SYM3,SYM4,SYM5,SYM6,SYM7,SYM8,SYM9 1AD07 00000000 36 VFDC SYMNONE,SYMNONE,SYMNONE,SYMNONE,SYMNONE,SYMNONE,SYMNONE 1AD0A 0000000D 37 VFDC SYMA,SYMB,SYMC,SYMD,SYME,SYMF,SYMG,SYMH,SYMI,SYMJ,SYMK,SYML,SYMM 1AD0D 0000001A 38 VFDC SYMN,SYMO,SYMP,SYMQ,SYMR,SYMS,SYMT,SYMU,SYMV,SYMW,SYMX,SYMY,SYMZ 1AD0E 00000000 39 VFDC SYMNONE,SYMNONE,SYMNONE,SYMNONE 1AD0E 00000027 40 VFDC SYMUNDER 1AD0F 00000000 41 VFDC SYMNONE 1AD10 00000084 42 VFDC SYMA+LOWRCASE,SYMB+LOWRCASE,SYMC+LOWRCASE,SYMD+LOWRCASE 1AD11 00000088 43 VFDC SYME+LOWRCASE,SYMF+LOWRCASE,SYMG+LOWRCASE,SYMH+LOWRCASE 1AD12 0000008D 44 VFDC SYMI+LOWRCASE,SYMJ+LOWRCASE,SYMK+LOWRCASE,SYML+LOWRCASE,SYMM+LOWRCASE 1AD13 00000091 45 VFDC SYMN+LOWRCASE,SYMO+LOWRCASE,SYMP+LOWRCASE,SYMQ+LOWRCASE 1AD14 00000095 46 VFDC SYMR+LOWRCASE,SYMS+LOWRCASE,SYMT+LOWRCASE,SYMU+LOWRCASE 1AD15 0000009A 47 VFDC SYMV+LOWRCASE,SYMW+LOWRCASE,SYMX+LOWRCASE,SYMY+LOWRCASE,SYMZ+LOWRCASE 1AD16 00000000 48 VFDC SYMNONE,SYMNONE,SYMNONE,SYMNONE,SYMNONE 49 50 ********************************************************************************** 51 * * 52 * The actual list of the register symbols. * 53 * * 54 ********************************************************************************** 55 1AD18 00000006 56 NEWREGSYMS VFD 4:NEWREG,6:NEWDEFAULT,2:NEWNOIND,1:0,2:0,17:REGSYMSIZE*1+1 1AD19 00000000 57 VFD 6:2,1:0,3:0,22:0 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 56 (NEWSYMPURE) F 12 Variable definitions, storage allocation 1AD1A 00000000 58 VFD VALUEOFR0 1AD1B 00000000 59 VFD 0 all upper case 1AD1C 00000000 60 VFD 6:SYMR,6:SYM0,20:0 61 1AD1D 0000000B 62 VFD 4:NEWREG,6:NEWDEFAULT,2:NEWNOIND,1:0,2:0,17:REGSYMSIZE*2+1 1AD1E 00000000 63 VFD 6:2,1:0,3:0,22:0 1AD1F 00000001 64 VFD VALUEOFR1 1AD20 00000000 65 VFD 0 all upper case 1AD21 00000000 66 VFD 6:SYMR,6:SYM1,20:0 67 1AD22 00000010 68 VFD 4:NEWREG,6:NEWDEFAULT,2:NEWNOIND,1:0,2:0,17:REGSYMSIZE*3+1 1AD23 00000000 69 VFD 6:2,1:0,3:0,22:0 1AD24 00000002 70 VFD VALUEOFR2 1AD25 00000000 71 VFD 0 all upper case 1AD26 00000000 72 VFD 6:SYMR,6:SYM2,20:0 73 1AD27 00000015 74 VFD 4:NEWREG,6:NEWDEFAULT,2:NEWNOIND,1:0,2:0,17:REGSYMSIZE*4+1 1AD28 00000000 75 VFD 6:2,1:0,3:0,22:0 1AD29 00000003 76 VFD VALUEOFR3 1AD2A 00000000 77 VFD 0 all upper case 1AD2B 00000000 78 VFD 6:SYMR,6:SYM3,20:0 79 1AD2C 0000001A 80 VFD 4:NEWREG,6:NEWDEFAULT,2:NEWNOIND,1:0,2:0,17:REGSYMSIZE*5+1 1AD2D 00000000 81 VFD 6:2,1:0,3:0,22:0 1AD2E 00000004 82 VFD VALUEOFR4 1AD2F 00000000 83 VFD 0 all upper case 1AD30 00000000 84 VFD 6:SYMR,6:SYM4,20:0 85 1AD31 0000001F 86 VFD 4:NEWREG,6:NEWDEFAULT,2:NEWNOIND,1:0,2:0,17:REGSYMSIZE*6+1 1AD32 00000000 87 VFD 6:2,1:0,3:0,22:0 1AD33 00000005 88 VFD VALUEOFR5 1AD34 00000000 89 VFD 0 all upper case 1AD35 00000000 90 VFD 6:SYMR,6:SYM5,20:0 91 1AD36 00000024 92 VFD 4:NEWREG,6:NEWDEFAULT,2:NEWNOIND,1:0,2:0,17:REGSYMSIZE*7+1 1AD37 00000000 93 VFD 6:2,1:0,3:0,22:0 1AD38 00000006 94 VFD VALUEOFR6 1AD39 00000000 95 VFD 0 all upper case 1AD3A 00000000 96 VFD 6:SYMR,6:SYM6,20:0 97 1AD3B 00000029 98 VFD 4:NEWREG,6:NEWDEFAULT,2:NEWNOIND,1:0,2:0,17:REGSYMSIZE*8+1 1AD3C 00000000 99 VFD 6:2,1:0,3:0,22:0 1AD3D 00000007 100 VFD VALUEOFR7 1AD3E 00000000 101 VFD 0 all upper case 1AD3F 00000000 102 VFD 6:SYMR,6:SYM7,20:0 103 1AD40 0000002E 104 VFD 4:NEWREG,6:NEWPC,2:NEWNOIND,1:0,2:0,17:REGSYMSIZE*9+1 1AD41 00000000 105 VFD 6:2,1:0,3:0,22:0 1AD42 00000008 106 VFD VALUEOFPC 1AD43 00000000 107 VFD 0 all upper case 1AD44 00000000 108 VFD 6:SYMP,6:SYMC,20:0 109 1AD45 00000033 110 VFD 4:NEWREG,6:NEWHEX,2:NEWNOIND,1:0,2:0,17:REGSYMSIZE*10+1 1AD46 00000000 111 VFD 6:2,1:0,3:0,22:0 1AD47 00000009 112 VFD VALUEOFPSR 1AD48 00000000 113 VFD 0 all upper case 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 57 (NEWSYMPURE) F 12 Variable definitions, storage allocation 1AD49 00000000 114 VFD 6:SYMP,6:SYMS,6:SYMR,14:0 115 1AD4A 00000038 116 VFD 4:NEWREG,6:NEWHEX,2:NEWNOIND,1:0,2:0,17:REGSYMSIZE*11+1 1AD4B 00000000 117 VFD 6:2,1:0,3:0,22:0 1AD4C 0000000A 118 VFD VALUEOFIMR 1AD4D 00000000 119 VFD 0 all upper case 1AD4E 00000000 120 VFD 6:SYMI,6:SYMM,6:SYMR,14:0 121 1AD4F 00000000 122 VFD 4:NEWREG,6:NEWHEX,2:NEWNOIND,1:0,2:0,17:NILPTR 1AD50 00000000 123 VFD 6:2,1:0,3:0,22:0 1AD51 0000000B 124 VFD VALUEOFIAD 1AD52 00000000 125 VFD 0 all upper case 1AD53 00000000 126 VFD 6:SYMI,6:SYMA,6:SYMD,14:0 125 126 INPUT RDUOPS 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 58 (RDUOPS) F 13 Op-codes for BTI 8000 3 4 ********************************************************************************** 5 * * 6 * The following is a list of valid op-codes for the * 7 * BTI 8000. The table is used for opcode assembly/dis- * 8 * assembly when processing in Assembly mode. * 9 * * 10 ********************************************************************************** 11 00000070 BYTE 12 OPBITS EQU BITS 0:6 op-code category 00000060 BYTE 13 PAROPBITS EQU BITS 0:5 PAR op-code bits 00000A10 BYTE 14 STPVALUE EQU BIT 5 bit in R7 for values PAR/STP 00000100 BYTE 15 MAXOPBITS EQU BITS 0:15 op-code maximum bits 00001450 BYTE 16 MODEBITS EQU BITS 10:14 operand mode field 00001E30 BYTE 17 REGBITS EQU BITS 15:17 register specifier bits 00001F10 BYTE 18 ADRBITS EQU BITS 15:31 address portion of instruction 00002450 BYTE 19 BYTESB EQU BITS 18:22 byte start bit 00002E50 BYTE 20 BYTELEN EQU BITS 23:27 byte length bits 00003840 BYTE 21 BYTEDISP EQU BITS 28:31 byte displacement 00003960 BYTE 22 BYTEXTRA EQU BITS 28:17 stuff that gets in the way 00002440 BYTE 23 S1BITS EQU BITS 18:21 sub-class(1) bits 00002A10 BYTE 24 S2BITS EQU BIT 21 sub-class(2) bits 00001E30 BYTE 25 REGBITSA EQU REGBITS register field(a) 00002430 BYTE 26 REGBITSB EQU BITS 18:20 register field(b) 00001830 BYTE 27 REGBITSC EQU BITS 12:14 register field(c) 00003840 BYTE 28 CONBITSA EQU BITS 28:31 constant field(a) 000024E0 BYTE 29 CONBITSB EQU BITS 18:31 constant field(b) 00002CA0 BYTE 30 CONBITSC EQU BITS 22:31 constant field(c) 00000000 ABS 31 PLAIN EQU 00 no register, no operand 00000001 ABS 32 ABSAD EQU 01 no register, absolute address 00000002 ABS 33 JMPAD EQU 02 no register, jump address 00000003 ABS 34 MEMAD EQU 03 no register, memory address 00000006 ABS 35 RJMPA EQU 06 register, jump address 00000007 ABS 36 RMEMA EQU 07 register, memory address 0000000A ABS 37 RBJMP EQU 0A register/bit, jump address 38 0001AD54 39 OPPROTO BASE OP op-code table prototype 00174800 5 BASE 40 OPSTUFF BSS 1 00094100 5 ZBM 41 OPCODE EQU OPSTUFF/BITS 0:15 op-code 42 * EQU OPSTUFF/BITS 28:31 op-code class 00097820 5 ZBM 43 OPMT EQU OPSTUFF/BITS 28:29 op-code modifier type 00097C20 5 ZBM 44 OPOT EQU OPSTUFF/BITS 30:31 op-code operand type 00174801 5 BASE 45 OPNAME BSS 1 mnemonic 46 DRCT 00000002 ABS 47 OPSIZE EQU DISPW OPPROTO 48 ORG OPPROTO 49 50 OPC MACRO 51 VFD 16:$(2),12:0,4:$(1) 52 PAK6 $(3) 53 EMAC 54 0001AD54 55 OPTABLE LABEL 0001AEF8 268 OPTABTOP LABEL 000000D2 ABS 269 NUMOPS EQU (DISPW OPTABLE)/OPSIZE 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 59 (RDUOPS) F 13 Op-codes for BTI 8000 271 272 ********************************************************************************** 273 * * 274 * The following table is for determining how much of the * 275 * op-code to mask off (and which part) prior to searching * 276 * the op-code table for a match. The PREOP table is indexed * 277 * by the leftmost 7 bits of the op-code, and a mask is then * 278 * selected according to which major class corresponds to the * 279 * particular op-code. Entries exist in this table even for * 280 * op-codes which do not exist. * 281 * * 282 ********************************************************************************** 283 00000000 ABS 284 OCRM EQU 0 register and mode 00000001 ABS 285 OCMO EQU 1 mode only 00000002 ABS 286 OCRJ EQU 2 register jump 00000003 ABS 287 OCSP EQU 3 special (op-code only) 00000003 ABS 288 OCXX EQU OCSP open codes 289 0001AEF8 290 OCMASKTAB LABEL table of masks by class 1AEF8 0000FE00 291 VFD -1/BITS 16:22*BITS 16:22 1AEF9 0000FFC0 292 VFD -1/BITS 16:25*BITS 16:25 1AEFA 0000FE3E 293 VFD -1/BITS 16:22*BITS 16:22 OR -1/BITS 26:30*BITS 26:30 1AEFB 0000FFFE 294 VFD -1/BITS 16:30*BITS 16:30 295 1AEFC 0089AEFD 296 PREOP PTR OPCLASS 1AEFC 00000000 297 OPCLASS VFD 2:OCMO,OCRM,OCXX,OCRM,OCMO,OCRM,OCMO,OCRM 1AEFD 00000000 298 VFDB 2:OCRM,OCRM,OCRM,OCRM,OCRM,OCRM,OCRM,OCRM 1AEFD 00000000 299 VFDB 2:OCXX,OCRM,OCRM,OCRM,OCRM,OCRM,OCRM,OCRM 1AEFE 00000000 300 VFDB 2:OCRM,OCRM,OCRM,OCRM,OCRM,OCRM,OCRM,OCRM 1AEFE 00000000 301 VFDB 2:OCMO,OCMO,OCXX,OCXX,OCRM,OCRM,OCRM,OCRM 1AEFF 00000001 302 VFDB 2:OCRM,OCRM,OCRM,OCRM,OCMO,OCXX,OCMO,OCMO 1AEFF 00000003 303 VFDB 2:OCRM,OCRM,OCRM,OCRM,OCRM,OCRM,OCRM,OCXX 1AF00 00000000 304 VFDB 2:OCRM,OCRM,OCRM,OCRM,OCRM,OCRM,OCRM,OCRM 1AF00 00000000 305 VFDB 2:OCMO,OCRM,OCXX,OCRM,OCXX,OCRM,OCXX,OCRM 1AF01 00000000 306 VFDB 2:OCRM,OCRM,OCRM,OCRM,OCRM,OCRM,OCRM,OCRM 1AF01 00000000 307 VFDB 2:OCXX,OCRM,OCXX,OCRM,OCRM,OCRM,OCXX,OCRM 1AF02 00000000 308 VFDB 2:OCRM,OCRM,OCRM,OCRM,OCRM,OCRM,OCRM,OCRM 1AF02 00000003 309 VFDB 2:OCMO,OCMO,OCXX,OCXX,OCXX,OCXX,OCXX,OCXX 1AF03 00000003 310 VFDB 2:OCMO,OCMO,OCXX,OCXX,OCMO,OCXX,OCMO,OCXX 1AF03 00000001 311 VFDB 2:OCRM,OCRM,OCRM,OCRM,OCXX,OCXX,OCMO,OCMO 1AF04 00000003 312 VFDB 2:OCRM,OCRM,OCRM,OCRM,OCRM,OCRJ,OCRM,OCSP 127 128 INPUT RDUCOMS 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 60 (RDUCOMS) F 14 Command Tables 3 ********************************************************************************** 4 * * 5 * The following symbols define the various bits used within * 6 * command elements to indicate type of command, type and size * 7 * of parameter(s), address size, data size, and type of valid * 8 * terminators. All are folded into single-word command entries. * 9 * * 10 ********************************************************************************** 11 0000000C ABS 12 CNL EQU 12 12 character max name length 00000003 ABS 13 CNLW EQU CNL/NCPW word length of name 14 0001AF05 15 COMBLOCK BASE COM command entry definition 00174800 5 BASE 16 COMNAME BSS CNLW name of command 00174803 5 BASE 17 COMCNTL BSS 1 processing control 00174804 5 BASE 18 COMEX1 BSS 1 group-dependent data 00174805 5 BASE 19 COMEX2 BSS 1 group-dependent data 00174806 5 BASE 20 COMHELP BSS 1 command help message address 21 DRCT 00000007 ABS 22 COMBLKLEN EQU DISPW COMBLOCK 23 ORG COMBLOCK 24 00000030 BYTE 25 CLS EQU BITS 0:2 Class of transfer 00000630 BYTE 26 SLT EQU BITS 3:5 Slot code of transfer 00000C30 BYTE 27 BCM EQU BITS 6:8 BCM field 00001210 BYTE 28 DF EQU BIT 9 Data flag (1=SBUFFW, 0=TMA) 00001560 BYTE 29 TMA EQU BITS 10:31 transfer address 00094034 5 ZBM 30 GCNCLS EQU COMEX1/CLS class code 00094634 5 ZBM 31 GCNSLOT EQU COMEX1/SLT slot number 00094C34 5 ZBM 32 GCNBCM EQU COMEX1/BCM BCM field 00095214 5 ZBM 33 GCNDF EQU COMEX1/DF data origin flag 00095564 5 ZBM 34 GCNTMA EQU COMEX1/TMA memory address for transfer 00174805 5 BASE 35 GCNPDSP EQU COMEX2 processing address for display 36 00000C10 BYTE 37 MWR EQU BIT 6 write flag 00000E10 BYTE 38 MMS EQU BIT 7 flag for relocation thru MSR 00001560 BYTE 39 MBS EQU BITS 10:31 base address 00094034 5 ZBM 40 GMMCLS EQU COMEX1/CLS class code for transfer 00094634 5 ZBM 41 GMMSLOT EQU COMEX1/SLT slot type code (0-4) 00094C14 5 ZBM 42 GMMWRITE EQU COMEX1/MWR flag for write allowed 00094E14 5 ZBM 43 GMMMSR EQU COMEX1/MMS sez MSR relocation needed 00095564 5 ZBM 44 GMMBASE EQU COMEX1/MBS base address of data 00174805 5 BASE 45 GMMNAM EQU COMEX2 pointer to location name 00000040 BYTE 46 DSL EQU BITS 0:3 bit field for display size length 00094045 5 ZBM 47 COMDSL EQU COMEX2/DSL number of words to display 48 00001560 BYTE 49 PAD EQU MBS address of transfer 00095564 5 ZBM 50 GPPADDR EQU GMMBASE PPU R/W address for data 51 00000030 BYTE 52 CTERM EQU BITS 0:2 terminator control flag 00094033 5 ZBM 53 COMTERM EQU COMCNTL/CTERM terminator control 00000000 ABS 54 TCR EQU TC*CTERM CR 20000000 ABS 55 TDT EQU TD*CTERM CR, dot 40000000 ABS 56 TUP EQU TU*CTERM CR, dot, LF, ^ 60000000 ABS 57 TRP EQU TR*CTERM CR, dot, > 80000000 ABS 58 TPT EQU TG*CTERM CR, dot, LF, ^, >, < 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 61 (RDUCOMS) F 14 Command Tables A0000000 ABS 59 TAT EQU TA*CTERM CR, dot, LF, ^, >, <, @ C0000000 ABS 60 TVP EQU TV*CTERM CR, dot, LF, ^, > 61 00000630 BYTE 62 CPARAM EQU BITS 3:5 parameter control field 00094633 5 ZBM 63 COMPARAM EQU COMCNTL/CPARAM base-mode param def 00000000 ABS 64 PNO EQU 0*CPARAM no parameters allowed 04000000 ABS 65 PNOD EQU 1*CPARAM no params but display type 08000000 ABS 66 PRQC EQU 2*CPARAM parameter required code 0C000000 ABS 67 PSPC EQU 3*CPARAM special - no check 10000000 ABS 68 PRQA EQU 4*CPARAM required address 14000000 ABS 69 POPA EQU 5*CPARAM optional address 00000006 ABS 70 RQAD EQU 6 required addr, opt display 18000000 ABS 71 PRQAD EQU RQAD*CPARAM required address, display type 1C000000 ABS 72 PRQADS EQU 7*CPARAM rqd addr (symbolic), display 73 00000C40 BYTE 74 CADDR EQU BITS 6:9 address control field 00094C43 5 ZBM 75 COMADDR EQU COMCNTL/CADDR base-mode of address 00000000 ABS 76 A4 EQU 0*CADDR 4-bit address 00400000 ABS 77 A5 EQU 1*CADDR 5-bit address 00800000 ABS 78 A7 EQU 2*CADDR 7-bit address 00C00000 ABS 79 A8 EQU 3*CADDR 8-bit addres 01000000 ABS 80 A9 EQU 4*CADDR 9-bit address 01400000 ABS 81 A10 EQU 5*CADDR 10-bit address 01800000 ABS 82 A11 EQU 6*CADDR 11-bit address 01C00000 ABS 83 A18 EQU 7*CADDR 18-bit address 02000000 ABS 84 A21 EQU 8*CADDR 21-bit address 02400000 ABS 85 A22 EQU 9*CADDR 22-bit address 02800000 ABS 86 A28 EQU 10*CADDR 28-bit address 02C00000 ABS 87 A32 EQU 11*CADDR 32-bit "address" 88 00000C40 BYTE 89 CCODE EQU CADDR code control field 00094C43 5 ZBM 90 COMCODE EQU COMCNTL/CCODE group-dependent codes 00000000 ABS 91 COO EQU 0*CADDR ON/OFF 00400000 ABS 92 CALL EQU 1*CADDR ALL 00800000 ABS 93 CFILE EQU 2*CADDR file specifier 94 00001420 BYTE 95 CDATA EQU BITS 10:11 data control field 00095423 5 ZBM 96 COMDATA EQU COMCNTL/CDATA base-mode data control 00000000 ABS 97 DNO EQU 0*CDATA no data 00100000 ABS 98 D4 EQU 1*CDATA 4-bit data 00200000 ABS 99 D8 EQU 2*CDATA 8-bit data 00300000 ABS 100 D32 EQU 3*CDATA 32-bit data 101 00001810 BYTE 102 COKDO EQU BIT 12 ok only when processing DO file 00001A10 BYTE 103 COKND EQU BIT 13 ok when not dialed in 00001C10 BYTE 104 COKNS EQU BIT 14 ok when system not stopped 00095813 5 ZBM 105 COMOKDO EQU COMCNTL/COKDO 00095A13 5 ZBM 106 COMOKND EQU COMCNTL/COKND controls command legality 00095C13 5 ZBM 107 COMOKNS EQU COMCNTL/COKNS ditto 108 00001F10 BYTE 109 CPROC EQU BITS 15:31 processing address 00095F13 5 ZBM 110 COMPROC EQU COMCNTL/CPROC processing address 00174804 5 BASE 111 COMSLOT EQU COMEX1 use first extra for slot 00174805 5 BASE 112 COMDEV EQU COMEX2 use second for device type 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 62 (RDUCOMS) F 14 Command Tables 114 115 ********************************************************************************** 116 * * 117 * The following tables contain an entry for each command * 118 * recognized by the Remote Diagnostic Utility. The command name * 119 * is listed along with the various control parameters which * 120 * describe the command's primary (and optionally secondary) * 121 * processing address, address size, data size, parameter types, * 122 * and terminators. Definitions for the codes appear on the * 123 * preceeding pages. * 124 * This first table contains the general purpose commands, * 125 * and the following tables contain the commands for specific * 126 * device types (PPU, CPU, SSU, MCU). * 127 * Note that these entries all must fit the COMBLOCK as defined * 128 * previously. * 129 * * 130 ********************************************************************************** 131 0001AF05 132 COMTAB LABEL command table 1AF05 424F4F54 133 ASCII CNLW,BOOT 1AF08 1001BFA4 134 VFD PRQA+A4+ADR(SYSINIT) 1AF0A 00000000 135 VFD (ADR BOOTER),0 1AF0B 0001D3E9 136 VFD ADR HLPMBOOT 137 1AF0C 424F4F54 138 ASCII CNLW,BOOTCOPY 1AF0F 1001BF75 139 VFD PRQA+A4+ADR(BOOTCOPY) 1AF11 0001BDC8 140 VFD 5*CLS+0*SLT+4*BCM+1*DF,ADR(RDUOK) 1AF12 0001D41A 141 VFD ADR HLPMBTCPY 142 1AF13 42504920 143 ASCII CNLW,BPI 1AF16 1DF1C9FD 144 VFD PRQADS+A18+D32+TCR+ADR(BPI) 1AF18 00000000 145 VFD 1*CLS+SCP*SLT+1*MWR+1*MMS+0*MBS,0 1AF19 0001D440 146 VFD ADR HLPMBPI 147 1AF1A 4250494C 148 ASCII CNLW,BPILIST 1AF1D 0007CB19 149 VFD 1*COKND+1*COKNS+(ADR BPILIST) 1AF1F 00000000 150 VFD 0,0 1AF20 0001D488 151 VFD ADR HLPMBPIL 152 1AF21 42524541 153 ASCII CNLW,BREAK 1AF24 0C03BE4D 154 VFD PSPC+1*COKNS+ADR(BREAK) 1AF26 00000000 155 VFD 0,0 1AF27 0001DA37 156 VFD ADR HLPMBRK 157 1AF28 43202020 158 ASCII CNLW,C 1AF2B 2C01C61A 159 VFD PSPC+TDT+ADR(PROCCPU) 1AF2D 00000002 160 VFD ADR(CPUSLOT),DEVCPU 1AF2E 0001D49A 161 VFD ADR HLPMC 162 1AF2F 434C4541 163 ASCII CNLW,CLEARALL 1AF32 0001BF9C 164 VFD ADR(CLEARALL) 1AF34 00000000 165 VFD 0,0 1AF35 0001D50C 166 VFD ADR HLPMCLALL 167 1AF36 434C4541 168 ASCII CNLW,CLEARBPI 1AF39 1DF1CABE 169 VFD PRQADS+A18+D32+TCR+ADR(CLEARBPI) 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 63 (RDUCOMS) F 14 Command Tables 1AF3B 00000000 170 VFD 1*MWR+1*MMS+0*MBS,0 1AF3C 0001D525 171 VFD ADR HLPMCBPI 172 1AF3D 434C4541 173 ASCII CNLW,CLEARBPIS 1AF40 0001CACB 174 VFD ADR CLEARBPIS 1AF42 00000000 175 VFD 1*MWR+1*MMS+0*MBS,0 1AF43 0001D538 176 VFD ADR HLPMCBPIS 177 1AF44 434C4541 178 ASCII CNLW,CLEARSSU 1AF47 0001BF79 179 VFD ADR(CONTROL) 1AF49 0001BDC8 180 VFD 5*CLS+0*SLT+2*BCM+0*DF,ADR(RDUOK) 1AF4A 0001D546 181 VFD ADR HLPMCLSSU 182 1AF4B 434F4D4D 183 ASCII CNLW,COMMANDS 1AF4E 0007C2F8 184 VFD 1*COKND+1*COKNS+ADR(COMMANDS) 1AF50 00000000 185 VFD 0,0 1AF51 0001D555 186 VFD ADR HLPMCMND 187 0001AF52 188 DCOM LABEL 1AF52 44202020 189 ASCII CNLW,D 1AF55 BDF1C6CE 190 VFD PRQADS+A18+D32+TAT+ADR(MEMORY) 1AF57 10000000 191 VFD 1*CLS+SCP*SLT+1*MWR+1*MMS+0*MBS,1*DSL 1AF58 0001D582 192 VFD ADR HLPMD 193 0001AF59 194 DLCOM LABEL 1AF59 444C2020 195 ASCII CNLW,DL 1AF5C BDF1C6CE 196 VFD PRQADS+A18+D32+TAT+ADR(MEMORY) 1AF5E 80000000 197 VFD 3*CLS+SCP*SLT+1*MMS+0*MBS,8*DSL 1AF5F 0001D6C2 198 VFD ADR HLPMDL 199 1AF60 4449414C 200 ASCII CNLW,DIAL 1AF63 0C07C341 201 VFD PSPC+1*COKND+1*COKNS+ADR(DIAL) 1AF65 00000000 202 VFD 0,0 1AF66 0001D7A8 203 VFD ADR HLPMDIAL 204 1AF67 444F2020 205 ASCII CNLW,DO 1AF6A 0C87C90E 206 VFD PSPC+CFILE+1*COKND+1*COKNS+(ADR DO) 1AF6C 00000000 207 VFD 0,0 1AF6D 0001D83D 208 VFD ADR HLPMDO 209 1AF6E 44524F50 210 ASCII CNLW,DROP 1AF71 0003C46E 211 VFD 1*COKNS+ADR(DROP) 1AF73 00000000 212 VFD 0,0 1AF74 0001D8EB 213 VFD ADR HLPMDROP 214 1AF75 45584954 215 ASCII CNLW,EXIT 1AF78 0007C400 216 VFD 1*COKND+1*COKNS+ADR(EXIT) 1AF7A 00000000 217 VFD 0,0 1AF7B 0001D8FD 218 VFD ADR HLPMEXIT 219 1AF7C 45584954 220 ASCII CNLW,EXITNP 1AF7F 0007C40B 221 VFD 1*COKND+1*COKNS+ADR(EXITNP) 1AF81 00000000 222 VFD 0,0 1AF82 0001D92A 223 VFD ADR HLPMEXTNP 224 1AF83 45584954 225 ASCII CNLW,EXITP 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 64 (RDUCOMS) F 14 Command Tables 1AF86 0007C402 226 VFD 1*COKND+1*COKNS+ADR(EXITP) 1AF88 00000000 227 VFD 0,0 1AF89 0001D950 228 VFD ADR HLPMEXTP 229 0001AF8A 230 GOCOM LABEL 1AF8A 474F2020 231 ASCII CNLW,GO 1AF8D 0003BF8F 232 VFD 1*COKNS+ADR(GO) 1AF8F 0001BF85 233 VFD 5*CLS+0*SLT+1*BCM+0*DF,ADR(GOING) 1AF90 0001D978 234 VFD ADR HLPMGO 235 1AF91 48414E47 236 ASCII CNLW,HANGUP 1AF94 0003C422 237 VFD 1*COKNS+ADR(HANGUP) 1AF96 00000000 238 VFD 0,0 1AF97 0001D98B 239 VFD ADR HLPMHNGU 240 1AF98 48454C50 241 ASCII CNLW,HELP 1AF9B 0C07C27F 242 VFD PSPC+1*COKND+1*COKNS+ADR(HELP) 1AF9D 00000000 243 VFD 0,0 1AF9E 0001D9AB 244 VFD ADR HLPMHELP 245 1AF9F 49202020 246 ASCII CNLW,I 1AFA2 0C03C30C 247 VFD PSPC+1*COKNS+ADR(PORTZERO) 1AFA4 0001BDC8 248 VFD 0,(ADR RDUOK) 1AFA5 0001D9DB 249 VFD ADR HLPMI 250 1AFA6 49504F4C 251 ASCII CNLW,IPOLL 1AFA9 1001BF5A 252 VFD PRQA+A4+ADR(SEND) 1AFAB 0001BF61 253 VFD 0*CLS+6*BCM,ADR(DISPLAY) 1AFAC 0001DA6C 254 VFD ADR HLPMIPLL 255 1AFAD 4C4F4341 256 ASCII CNLW,LOCAL 1AFB0 0887C44A 257 VFD PRQC+CFILE+1*COKND+1*COKNS+ADR(LOCAL) 1AFB2 00000000 258 VFD 0,0 1AFB3 0001DA91 259 VFD ADR HLPMLOCL 260 1AFB4 4D202020 261 ASCII CNLW,M 1AFB7 2C01C627 262 VFD PSPC+TDT+ADR(PROCMCU) 1AFB9 00000001 263 VFD ADR(MCUSLOT),DEVMCU 1AFBA 0001DAD9 264 VFD ADR HLPMM 265 1AFBB 4D415020 266 ASCII CNLW,MAP 1AFBE 0001BF79 267 VFD ADR(CONTROL) 1AFC0 0001BFF7 268 VFD 2*CLS+0*SLT+2*BCM+1*DF,ADR(DISPMAP) 1AFC1 0001DB21 269 VFD ADR HLPMMAP 270 1AFC2 50202020 271 ASCII CNLW,P 1AFC5 2C01C634 272 VFD PSPC+TDT+ADR(PROCPPU) 1AFC7 00000003 273 VFD ADR(PPUSLOT),DEVPPU 1AFC8 0001DB38 274 VFD ADR HLPMP 275 1AFC9 50415448 276 ASCII CNLW,PATH 1AFCC 0003C45E 277 VFD 1*COKNS+ADR(PATH) 1AFCE 00000000 278 VFD 0,0 1AFCF 0001DB85 279 VFD ADR HLPMPATH 280 1AFD0 504F5745 281 ASCII CNLW,POWERRESET 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 65 (RDUCOMS) F 14 Command Tables 1AFD3 0001BFB8 282 VFD ADR(RESET) 1AFD5 00000000 283 VFD 0,0 1AFD6 0001DBC9 284 VFD ADR HLPMPWRR 285 1AFD7 5052494E 286 ASCII CNLW,PRINT 1AFDA 0003C3F8 287 VFD 1*COKNS+ADR(PRINT) 1AFDC 00000000 288 VFD 0,0 1AFDD 0001DBB4 289 VFD ADR HLPMPRNT 290 0001AFDE 291 RECEIVECOM LABEL 1AFDE 52454345 292 ASCII CNLW,RECEIVE 1AFE1 0C0BC946 293 VFD PSPC+1*COKNS+1*COKDO+(ADR RECEIVE) 1AFE3 00000000 294 VFD 0,0 1AFE4 0001DBED 295 VFD ADR HLPMRECV 296 1AFE5 52454345 297 ASCII CNLW,RECEIVE* 1AFE8 0C0BC946 298 VFD PSPC+1*COKNS+1*COKDO+(ADR RECEIVE) 1AFEA 00000000 299 VFD 0,0 1AFEB 0001DBED 300 VFD ADR HLPMRECV 301 1AFEC 52454345 302 ASCII CNLW,RECEIVEFILE 1AFEF 0C03EED2 303 VFD PSPC+1*COKNS+(ADR RECEIVEFILE) 1AFF1 00000000 304 VFD 0,0 1AFF2 0001DC80 305 VFD ADR HLPMRCVFI 306 1AFF3 52455354 307 ASCII CNLW,RESTART 1AFF6 0001BFC3 308 VFD ADR(RESTART) 1AFF8 00000000 309 VFD 0,0 1AFF9 0001DCCB 310 VFD ADR HLPMRSTRT 311 1AFFA 52554E20 312 ASCII CNLW,RUN 1AFFD 0C01C436 313 VFD PSPC+ADR(RUN) 1AFFF 00000000 314 VFD 0,0 1B000 0001DCFF 315 VFD ADR HLPMRUN 316 1B001 53202020 317 ASCII CNLW,S 1B004 2C01C647 318 VFD PSPC+TDT+ADR(PROCSSU) 1B006 00000004 319 VFD ADR(SSUSLOT),DEVSSU 1B007 0001DD33 320 VFD ADR HLPMS 321 1B008 53454C46 322 ASCII CNLW,SELFTEST 1B00B 1001BF5A 323 VFD PRQA+A4+ADR(SEND) 1B00D 0001BF67 324 VFD 0*CLS+5*BCM,ADR(SELFTEST) 1B00E 0001DD7A 325 VFD ADR HLPMSLFT 326 0001B00F 327 SENDCOM LABEL 1B00F 53454E44 328 ASCII CNLW,SEND 1B012 0C03C932 329 VFD PSPC+1*COKNS+(ADR SENDSTR) 1B014 00000000 330 VFD 0,0 1B015 0001DD9B 331 VFD ADR HLPMSEND 332 1B016 53454E44 333 ASCII CNLW,SEND* 1B019 0C03C932 334 VFD PSPC+1*COKNS+(ADR SENDSTR) 1B01B 00000000 335 VFD 0,0 1B01C 0001DD9B 336 VFD ADR HLPMSEND 337 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 66 (RDUCOMS) F 14 Command Tables 1B01D 53454E44 338 ASCII CNLW,SENDFILE 1B020 0C03EE76 339 VFD PSPC+1*COKNS+(ADR SENDFILE) 1B022 00000000 340 VFD 0,0 1B023 0001DDE8 341 VFD ADR HLPMSENDFI 342 0001B024 343 SYSSTATCOM LABEL 1B024 53544154 344 ASCII CNLW,STATUS 1B027 0041C170 345 VFD A5+(ADR STATUS) 1B029 00000000 346 VFD 2*CLS+1*BCM,0 1B02A 0001DE38 347 VFD ADR HLPMSTAT 348 1B02B 53544F50 349 ASCII CNLW,STOP 1B02E 0003BF79 350 VFD 1*COKNS+ADR(CONTROL) 1B030 0001BF89 351 VFD 5*CLS+0*SLT+0*BCM+0*DF,ADR(STOPPING) 1B031 0001DEC6 352 VFD ADR HLPMSTOP 353 1B032 53594D42 354 ASCII CNLW,SYMBOLS 1B035 0887C475 355 VFD PRQC+CFILE+1*COKND+1*COKNS+ADR(SYMBOLS) 1B037 00000000 356 VFD 0,0 1B038 0001DED9 357 VFD ADR HLPMSYMB 358 1B039 53595349 359 ASCII CNLW,SYSINIT 1B03C 0001BFA4 360 VFD ADR(SYSINIT) 1B03E 00000000 361 VFD ADR(RDUOK),0 1B03F 0001DF02 362 VFD ADR HLPMSYSI 363 1B040 54524143 364 ASCII CNLW,TRACE 1B043 0C07C489 365 VFD PSPC+1*COKND+1*COKNS+(ADR TRACECOM) 1B045 00000000 366 VFD 0,0 1B046 0001DF3B 367 VFD ADR HLPMTRACE 368 1B047 57414954 369 ASCII CNLW,WAIT 1B04A 12CBC9E7 370 VFD PRQA+A32+1*COKNS+1*COKDO+(ADR WAIT) 1B04C 00000000 371 VFD 0,0 1B04D 0001DF54 372 VFD ADR HLPMWAIT 373 1B04E 57525520 374 ASCII CNLW,WRU 1B051 1001C051 375 VFD PRQA+A4+ADR(DISPWRU) 1B053 00000000 376 VFD 2*CLS+1*BCM,0 1B054 0001DF8B 377 VFD ADR HLPMWRU 378 1B055 57525541 379 ASCII CNLW,WRUALL 1B058 0001C053 380 VFD PNO+ADR(WRUALL) 1B05A 00000000 381 VFD 2*CLS+1*BCM,0 1B05B 0001DFA5 382 VFD ADR HLPMWRUA 1B05C 00000020 383 VFDC SEMI,BLANK,BLANK,BLANK 1B05D 20202020 384 ASCII CNLW-1, 1B05F 00000000 385 VFD 0 1B061 00000000 386 VFD 0,0 1B062 00000000 387 VFD 0 0001B063 388 COMTABTOP LABEL 1B063 0001CED6 389 VFD ADR(ERM100) 1B064 0001CD7F 390 VFD ADR(MSGENCOMS) 391 BSS COMBLKLEN-DISPW COMTABTOP 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 67 (RDUCOMS) F 14 Command Tables 393 394 ********************************************************************************** 395 * * 396 * Here are the MCU commands * 397 * * 398 ********************************************************************************** 399 0001B06A 400 MCCOMTAB LABEL 1B06A 43454620 401 ASCII CNLW,CEF 1B06D 0D81C54A 402 VFD PSPC+A11+ADR(SMUERROR) 1B06F 0001C5BE 403 VFD ADR(SMUERRFILE),ADR(CLRERRFILE) 1B070 0001DFC2 404 VFD ADR HLPMCEF 405 1B071 43454C20 406 ASCII CNLW,CEL 1B074 0001C54A 407 VFD PNO+ADR(SMUERROR) 1B076 00000000 408 VFD ADR(CLEARERR),0 1B077 0001DFE4 409 VFD ADR HLPMCLRERR 410 1B078 434F4D4D 411 ASCII CNLW,COMMANDS 1B07B 0001C308 412 VFD ADR(COMLISTER) 1B07D 0001B0BE 413 VFD ADR(MCCOMTAB),ADR(MCCTTOP) 1B07E 0001E006 414 VFD ADR HLPMMCMND 415 1B07F 45462020 416 ASCII CNLW,EF 1B082 0D81C54A 417 VFD PSPC+A11+ADR(SMUERROR) 1B084 0001C56F 418 VFD ADR(SMUERRFILE),ADR(ERRORFILE) 1B085 0001E03B 419 VFD ADR HLPMERRFIL 420 1B086 454C2020 421 ASCII CNLW,EL 1B089 0001C54A 422 VFD PNO+ADR(SMUERROR) 1B08B 00000000 423 VFD ADR(ERRORLOG),0 1B08C 0001E0D9 424 VFD ADR HLPMERRLOG 425 1B08D 46494C4C 426 ASCII CNLW,FILL 1B090 0E41C493 427 VFD PSPC+A22+ADR(MCPROC) 1B092 0001C499 428 VFD SMC*SLT+2*CLS,ADR(MCPFILL) 1B093 0001E121 429 VFD ADR HLPMFILL 430 1B094 48454C50 431 ASCII CNLW,HELP 1B097 0C07C29E 432 VFD PSPC+1*COKND+1*COKNS+ADR(HELPMCU) 1B099 00000000 433 VFD 0,0 1B09A 0001D9AB 434 VFD ADR HLPMHELP 435 1B09B 4E534341 436 ASCII CNLW,NSCAN 1B09E 0E41C493 437 VFD PSPC+A22+ADR(MCPROC) 1B0A0 0001C4A5 438 VFD SMC*SLT+2*CLS,ADR(MCPNSCAN) 1B0A1 0001E154 439 VFD ADR HLPMNSCAN 440 1B0A2 5343414E 441 ASCII CNLW,SCAN 1B0A5 0E41C493 442 VFD PSPC+A22+ADR(MCPROC) 1B0A7 0001C4B7 443 VFD SMC*SLT+2*CLS,ADR(MCPSCAN) 1B0A8 0001E1BD 444 VFD ADR HLPMSCAN 445 1B0A9 53544154 446 ASCII CNLW,STATUS 1B0AC 0041C187 447 VFD A5+(ADR MSTATUS) 1B0AE 00000000 448 VFD 2*CLS+1*BCM,0 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 68 (RDUCOMS) F 14 Command Tables 1B0AF 0001E224 449 VFD ADR HLPMMSTAT 450 1B0B0 5A202020 451 ASCII CNLW,Z 1B0B3 9AB1C6CE 452 VFD PRQAD+A28+D32+TPT+ADR(MEMORY) 1B0B5 10000000 453 VFD 0*CLS+SMC*SLT+1*MWR+0*MBS,1*DSL 1B0B6 0001E23F 454 VFD ADR HLPMMZ 455 1B0B7 5A4C2020 456 ASCII CNLW,ZL 1B0BA 9AB1C6CE 457 VFD PRQAD+A28+D32+TPT+ADR(MEMORY) 1B0BC 80000000 458 VFD 2*CLS+SMC*SLT+0*MWR+0*MBS,8*DSL 1B0BD 0001E2BE 459 VFD ADR HLPMMZL 460 0001B0BE 461 MCCTTOP LABEL 1B0BE 0001CF86 462 VFD ADR(ERM121) 1B0BF 0001CD8D 463 VFD ADR(MSMCCOMS) 464 BSS COMBLKLEN-DISPW MCCTTOP 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 69 (RDUCOMS) F 14 Command Tables 466 467 ********************************************************************************** 468 * * 469 * This list is the CPU commands * 470 * * 471 ********************************************************************************** 472 0001B0C5 473 CPCOMTAB LABEL 1B0C5 43415220 474 ASCII CNLW,CAR 1B0C8 6431C69B 475 VFD D32+TRP+PNOD+ADR(DEVDISP) 1B0CA 0001CE38 476 VFD KLAS0*CLS+SCP*SLT+1*MWR+00000A*MBS,ADR(MGCCA) 1B0CB 0001E2FE 477 VFD ADR HLPMCAR 478 1B0CC 434F4D4D 479 ASCII CNLW,COMMANDS 1B0CF 0001C308 480 VFD ADR(COMLISTER) 1B0D1 0001B189 481 VFD ADR(CPCOMTAB),ADR(CPCTTOP) 1B0D2 0001E32B 482 VFD ADR HLPMCCMND 483 1B0D3 474F2020 484 ASCII CNLW,GO 1B0D6 0001C720 485 VFD ADR(MEMSEND) 1B0D8 00000000 486 VFD KLAS0*CLS+SCP*SLT+030000,0 1B0D9 0001E360 487 VFD ADR HLPMCGO 488 1B0DA 48454C50 489 ASCII CNLW,HELP 1B0DD 0C07C2A4 490 VFD PSPC+1*COKND+1*COKNS+ADR(HELPCPU) 1B0DF 00000000 491 VFD 0,0 1B0E0 0001D9AB 492 VFD ADR HLPMHELP 493 1B0E1 494D5220 494 ASCII CNLW,IMR 1B0E4 2431C69B 495 VFD D32+TDT+PNOD+ADR(DEVDISP) 1B0E6 0001CE3A 496 VFD KLAS0*CLS+SCP*SLT+1*MWR+00000B*MBS,ADR(MGCIM) 1B0E7 0001E375 497 VFD ADR HLPMIMR 498 1B0E8 49522020 499 ASCII CNLW,IR 1B0EB 6431C69B 500 VFD D32+TRP+PNOD+ADR(DEVDISP) 1B0ED 0001CE43 501 VFD KLAS0*CLS+SCP*SLT+1*MWR+020001*MBS,ADR(MGCIR) 1B0EE 0001E3A5 502 VFD ADR HLPMIR 503 1B0EF 49532020 504 ASCII CNLW,IS 1B0F2 0431C69B 505 VFD D32+PNOD+ADR(DEVDISP) 1B0F4 0001CE3C 506 VFD KLAS0*CLS+SCP*SLT+020002*MBS,ADR(MGCIS) 1B0F5 0001E3D2 507 VFD ADR HLPMIS 508 1B0F6 4D535220 509 ASCII CNLW,MSR 1B0F9 2431C69B 510 VFD D32+TDT+PNOD+ADR(DEVDISP) 1B0FB 0001CE36 511 VFD KLAS0*CLS+SCP*SLT+1*MWR+000009*MBS,ADR(MGCMS) 1B0FC 0001E3E9 512 VFD ADR HLPMMSR 513 1B0FD 4E534341 514 ASCII CNLW,NSCAN 1B100 0DC1C493 515 VFD PSPC+A18+ADR(MCPROC) 1B102 0001C4A5 516 VFD SCP*SLT+3*CLS,ADR(MCPNSCAN) 1B103 0001E418 517 VFD ADR HLPMCNSCAN 518 1B104 50432020 519 ASCII CNLW,PC 1B107 6431C69B 520 VFD D32+TRP+PNOD+ADR(DEVDISP) 1B109 0001CE34 521 VFD KLAS0*CLS+SCP*SLT+1*MWR+000008*MBS,ADR(MGCPC) 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 70 (RDUCOMS) F 14 Command Tables 1B10A 0001E48E 522 VFD ADR HLPMPC 523 1B10B 50462020 524 ASCII CNLW,PF 1B10E 58F1C6CE 525 VFD PRQAD+A8+D32+TUP+ADR(MEMORY) 1B110 10000000 526 VFD 0*CLS+SCP*SLT+1*MWR+010000*MBS,1*DSL 1B111 0001E4BA 527 VFD ADR HLPMPF 528 1B112 50464C20 529 ASCII CNLW,PFL 1B115 58F1C6CE 530 VFD PRQAD+A8+D32+TUP+ADR(MEMORY) 1B117 80000000 531 VFD 2*CLS+SCP*SLT+0*MWR+010000*MBS,8*DSL 1B118 0001E4F1 532 VFD ADR HLPMPFL 533 1B119 50535220 534 ASCII CNLW,PSR 1B11C 2431C69B 535 VFD D32+TDT+PNOD+ADR(DEVDISP) 1B11E 0001CE41 536 VFD KLAS0*CLS+SCP*SLT+1*MWR+020000*MBS,ADR(MGCPS) 1B11F 0001E526 537 VFD ADR HLPMPSR 538 1B120 52202020 539 ASCII CNLW,R 1B123 D471C888 540 VFD POPA+A5+D32+TVP+ADR(CPUREGDISP) 1B125 10000000 541 VFD 0*CLS+SCP*SLT+1*MWR+0*MBS,1*DSL 1B126 0001E556 542 VFD ADR HLPMR 543 1B127 52302020 544 ASCII CNLW,R0 1B12A C431C69B 545 VFD D32+TVP+PNOD+ADR(DEVDISP) 1B12C 0001CE24 546 VFD KLAS0*CLS+SCP*SLT+1*MWR+00*MBS,ADR(MGCR0) 1B12D 0001E5D8 547 VFD ADR HLPMRS 548 1B12E 52312020 549 ASCII CNLW,R1 1B131 C431C69B 550 VFD D32+TVP+PNOD+ADR(DEVDISP) 1B133 0001CE26 551 VFD KLAS0*CLS+SCP*SLT+1*MWR+01*MBS,ADR(MGCR1) 1B134 0001E5D8 552 VFD ADR HLPMRS 553 1B135 52322020 554 ASCII CNLW,R2 1B138 C431C69B 555 VFD D32+TVP+PNOD+ADR(DEVDISP) 1B13A 0001CE28 556 VFD KLAS0*CLS+SCP*SLT+1*MWR+02*MBS,ADR(MGCR2) 1B13B 0001E5D8 557 VFD ADR HLPMRS 558 1B13C 52332020 559 ASCII CNLW,R3 1B13F C431C69B 560 VFD D32+TVP+PNOD+ADR(DEVDISP) 1B141 0001CE2A 561 VFD KLAS0*CLS+SCP*SLT+1*MWR+03*MBS,ADR(MGCR3) 1B142 0001E5D8 562 VFD ADR HLPMRS 563 1B143 52342020 564 ASCII CNLW,R4 1B146 C431C69B 565 VFD D32+TVP+PNOD+ADR(DEVDISP) 1B148 0001CE2C 566 VFD KLAS0*CLS+SCP*SLT+1*MWR+04*MBS,ADR(MGCR4) 1B149 0001E5D8 567 VFD ADR HLPMRS 568 1B14A 52352020 569 ASCII CNLW,R5 1B14D C431C69B 570 VFD D32+TVP+PNOD+ADR(DEVDISP) 1B14F 0001CE2E 571 VFD KLAS0*CLS+SCP*SLT+1*MWR+05*MBS,ADR(MGCR5) 1B150 0001E5D8 572 VFD ADR HLPMRS 573 1B151 52362020 574 ASCII CNLW,R6 1B154 C431C69B 575 VFD D32+TVP+PNOD+ADR(DEVDISP) 1B156 0001CE30 576 VFD KLAS0*CLS+SCP*SLT+1*MWR+06*MBS,ADR(MGCR6) 1B157 0001E5D8 577 VFD ADR HLPMRS 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 71 (RDUCOMS) F 14 Command Tables 578 1B158 52372020 579 ASCII CNLW,R7 1B15B C431C69B 580 VFD D32+TVP+PNOD+ADR(DEVDISP) 1B15D 0001CE32 581 VFD KLAS0*CLS+SCP*SLT+1*MWR+07*MBS,ADR(MGCR7) 1B15E 0001E5D8 582 VFD ADR HLPMRS 583 1B15F 5343414E 584 ASCII CNLW,SCAN 1B162 0DC1C493 585 VFD PSPC+A18+ADR(MCPROC) 1B164 0001C4B7 586 VFD SCP*SLT+3*CLS,ADR(MCPSCAN) 1B165 0001E60E 587 VFD ADR HLPMCSCAN 588 1B166 53544154 589 ASCII CNLW,STATUS 1B169 0001C0E0 590 VFD ADR CSTATUS 1B16B 00000000 591 VFD 0,0 1B16C 0001E6AB 592 VFD ADR HLPMCSTAT 593 1B16D 53544550 594 ASCII CNLW,STEP 1B170 0001BF79 595 VFD ADR(CONTROL) 1B172 0001BF3F 596 VFD 0*CLS+SCP*SLT+2*BCM+0*DF+000008*MBS,ADR(STEP) 1B173 0001E6EC 597 VFD ADR HLPMSTEP 598 1B174 53544F50 599 ASCII CNLW,STOP 1B177 0001C720 600 VFD ADR(MEMSEND) 1B179 00000000 601 VFD KLAS0*CLS+SCP*SLT+030001,0 1B17A 0001E716 602 VFD ADR HLPMCSTOP 603 1B17B 54414B45 604 ASCII CNLW,TAKEINT 1B17E 0001C720 605 VFD ADR(MEMSEND) 1B180 00000000 606 VFD KLAS0*CLS+SCP*SLT+030002,0 1B181 0001E729 607 VFD ADR HLPMTAKE 608 1B182 5A202020 609 ASCII CNLW,Z 1B185 9A71C6CE 610 VFD PRQAD+A22+D32+TPT+ADR(MEMORY) 1B187 10000000 611 VFD 0*CLS+SCP*SLT+1*MWR+0*MBS,1*DSL 1B188 0001E745 612 VFD ADR HLPMCZ 613 0001B189 614 CPCTTOP LABEL 1B189 0001CF80 615 VFD ADR(ERM120) 1B18A 0001CD85 616 VFD ADR(MSCPCOMS) 617 BSS COMBLKLEN-DISPW CPCTTOP 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 72 (RDUCOMS) F 14 Command Tables 619 620 ********************************************************************************** 621 * * 622 * Now for the PPU commands * 623 * * 624 ********************************************************************************** 625 0001B190 626 PPCOMTAB LABEL 1B190 42433120 627 ASCII CNLW,BC1 1B193 2431C6C0 628 VFD D32+TDT+PNOD+ADR(PPDISP) 1B195 0001CE51 629 VFD KLAS0*CLS+SPP*SLT+1*MWR+000004*PAD,ADR(MGPC1) 1B196 0001E7C2 630 VFD ADR HLPMBC1 631 1B197 42433220 632 ASCII CNLW,BC2 1B19A 2431C6C0 633 VFD D32+TDT+PNOD+ADR(PPDISP) 1B19C 0001CE55 634 VFD KLAS0*CLS+SPP*SLT+1*MWR+000006*PAD,ADR(MGPC2) 1B19D 0001E7EF 635 VFD ADR HLPMBC2 636 1B19E 43412020 637 ASCII CNLW,CA 1B1A1 58F1C6CA 638 VFD PRQAD+A8+D32+TUP+ADR(CAMEM) 1B1A3 10000000 639 VFD 0*CLS+SPP*SLT+1*MWR+00200*MBS,1*DSL 1B1A4 0001E81B 640 VFD ADR HLPMCA 641 1B1A5 4341424F 642 ASCII CNLW,CABORT 1B1A8 0001C6C5 643 VFD ADR(PPSEND) 1B1AA 00000000 644 VFD KLAS0*CLS+SPP*SLT+000001*PAD,0 1B1AB 0001E86A 645 VFD ADR HLPMCABO 646 1B1AC 434C4541 647 ASCII CNLW,CLEAR 1B1AF 12C1C6C5 648 VFD PRQA+A32+ADR(PPSEND) 1B1B1 00000000 649 VFD KLAS0*CLS+SPP*SLT+000003*PAD,0 1B1B2 0001E88E 650 VFD ADR HLPMCLR 651 1B1B3 434F4D4D 652 ASCII CNLW,COMMANDS 1B1B6 0001C308 653 VFD ADR(COMLISTER) 1B1B8 0001B20E 654 VFD ADR(PPCOMTAB),ADR(PPCTTOP) 1B1B9 0001E8BA 655 VFD ADR HLPMPCMND 656 1B1BA 43533120 657 ASCII CNLW,CS1 1B1BD 0431C6C0 658 VFD D32+PNOD+ADR(PPDISP) 1B1BF 0001CE4D 659 VFD KLAS0*CLS+SPP*SLT+000002*PAD,ADR(MGPS1) 1B1C0 0001E8EC 660 VFD ADR HLPMCS1 661 1B1C1 43533220 662 ASCII CNLW,CS2 1B1C4 0431C6C0 663 VFD D32+PNOD+ADR(PPDISP) 1B1C6 0001CE4F 664 VFD KLAS0*CLS+SPP*SLT+000003*PAD,ADR(MGPS2) 1B1C7 0001E917 665 VFD ADR HLPMCS2 666 1B1C8 43544553 667 ASCII CNLW,CTEST 1B1CB 0001C6C5 668 VFD ADR(PPSEND) 1B1CD 00000000 669 VFD KLAS0*CLS+SPP*SLT,0 1B1CE 0001E942 670 VFD ADR HLPMCTST 671 1B1CF 44494420 672 ASCII CNLW,DID 1B1D2 0431C6C0 673 VFD D32+PNOD+ADR(PPDISP) 1B1D4 0001CE49 674 VFD KLAS0*CLS+SPP*SLT+000000*PAD,ADR(MGPDI) 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 73 (RDUCOMS) F 14 Command Tables 1B1D5 0001E965 675 VFD ADR HLPMDID 676 1B1D6 48454C50 677 ASCII CNLW,HELP 1B1D9 0C07C2AA 678 VFD PSPC+1*COKND+1*COKNS+ADR(HELPPPU) 1B1DB 00000000 679 VFD 0,0 1B1DC 0001D9AB 680 VFD ADR HLPMHELP 681 1B1DD 49532020 682 ASCII CNLW,IS 1B1E0 0431C6C0 683 VFD D32+PNOD+ADR(PPDISP) 1B1E2 0001CE4B 684 VFD KLAS0*CLS+SPP*SLT+000001*PAD,ADR(MGPIS) 1B1E3 0001E98A 685 VFD ADR HLPMPIS 686 1B1E4 4D413120 687 ASCII CNLW,MA1 1B1E7 2431C6C0 688 VFD D32+TDT+PNOD+ADR(PPDISP) 1B1E9 0001CE53 689 VFD KLAS0*CLS+SPP*SLT+1*MWR+000005*PAD,ADR(MGPA1) 1B1EA 0001E9A7 690 VFD ADR HLPMMA1 691 1B1EB 4D413220 692 ASCII CNLW,MA2 1B1EE 2431C6C0 693 VFD D32+TDT+PNOD+ADR(PPDISP) 1B1F0 0001CE57 694 VFD KLAS0*CLS+SPP*SLT+1*MWR+000007*PAD,ADR(MGPA2) 1B1F1 0001E9D2 695 VFD ADR HLPMMA2 696 1B1F2 52202020 697 ASCII CNLW,R 1B1F7 00000000 698 VFD ADR(PPR),0,0 1B1F8 0001E9FD 699 VFD ADR HLPMPR 700 1B1F9 53455420 701 ASCII CNLW,SET 1B1FC 12C1C6C5 702 VFD PRQA+A32+ADR(PPSEND) 1B1FE 00000000 703 VFD KLAS0*CLS+SPP*SLT+000002*PAD,0 1B1FF 0001EA2C 704 VFD ADR HLPMSET 705 1B200 53544154 706 ASCII CNLW,STATUS 1B203 0001C181 707 VFD ADR PSTATUS 1B205 00000000 708 VFD 0,0 1B206 0001EA55 709 VFD ADR HLPMPSTAT 710 1B207 5A202020 711 ASCII CNLW,Z 1B20A 9A71C6CA 712 VFD PRQAD+A22+D32+TPT+ADR(CAMEM) 1B20C 10000000 713 VFD 0*CLS+SPP*SLT+1*MWR+0*MBS,1*DSL 1B20D 0001EA77 714 VFD ADR HLPMPZ 715 0001B20E 716 PPCTTOP LABEL 1B20E 0001CF8C 717 VFD ADR(ERM122) 1B20F 0001CD95 718 VFD ADR(MSPPCOMS) 719 BSS COMBLKLEN-DISPW PPCTTOP 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 74 (RDUCOMS) F 14 Command Tables 721 722 ********************************************************************************** 723 * * 724 * And at last, the SSU commands * 725 * * 726 ********************************************************************************** 727 0001B215 728 SSCOMTAB LABEL 1B215 4250524F 729 ASCII CNLW,BPROM 1B218 5931C6CE 730 VFD PRQAD+A9+D32+TUP+ADR(MEMORY) 1B21A 10000000 731 VFD 0*CLS+SSS*SLT+01000*MBS,1*DSL 1B21B 0001EB13 732 VFD ADR HLPMBPRM 733 0001B21C 734 BSWITCHCOM LABEL 1B21C 42535749 735 ASCII CNLW,BSWITCH 1B21F 0411C69B 736 VFD D4+PNOD+ADR(DEVDISP) 1B221 0001CE59 737 VFD KLAS0*CLS+SSS*SLT+001410*MBS,ADR(MGSBS) 1B222 0001EB47 738 VFD ADR HLPMBSWT 739 0001B223 740 CLOCKCOM LABEL 1B223 434C4F43 741 ASCII CNLW,CLOCK 1B226 2431C69B 742 VFD D32+TDT+PNOD+ADR(DEVDISP) 1B228 0001CE5D 743 VFD KLAS0*CLS+SSS*SLT+1*MWR+001416*MBS,ADR(MGSCL) 1B229 0001EB68 744 VFD ADR HLPMCLCK 745 1B22A 434F4D4D 746 ASCII CNLW,COMMANDS 1B22D 0001C308 747 VFD ADR(COMLISTER) 1B22F 0001B29A 748 VFD ADR(SSCOMTAB),ADR(SSCTTOP) 1B230 0001EB8C 749 VFD ADR HLPMSCMND 750 0001B231 751 ERRLOGCOM LABEL 1B231 4552524C 752 ASCII CNLW,ERRLOG 1B234 2431C69B 753 VFD D32+TDT+PNOD+ADR(DEVDISP) 1B236 0001CE5F 754 VFD KLAS0*CLS+SSS*SLT+1*MWR+001412*MBS,ADR(MGSER) 1B237 0001EBBE 755 VFD ADR HLPMERRL 756 1B238 48454C50 757 ASCII CNLW,HELP 1B23B 0C07C2B0 758 VFD PSPC+1*COKND+1*COKNS+ADR(HELPSSU) 1B23D 00000000 759 VFD 0,0 1B23E 0001D9AB 760 VFD ADR HLPMHELP 761 0001B23F 762 ICHARCOM LABEL 1B23F 49434841 763 ASCII CNLW,ICHAR 1B242 0431C69B 764 VFD D32+PNOD+ADR(DEVDISP) 1B244 0001CE62 765 VFD KLAS0*CLS+SSS*SLT+00140D*MBS,ADR(MGSIC) 1B245 0001EBCF 766 VFD ADR HLPMICHR 767 0001B246 768 IMCOM LABEL 1B246 494D2020 769 ASCII CNLW,IM 1B249 2431C69B 770 VFD D32+TDT+PNOD+ADR(DEVDISP) 1B24B 0001CE64 771 VFD KLAS0*CLS+SSS*SLT+1*MWR+00140F*MBS,ADR(MGSIM) 1B24C 0001EBE5 772 VFD ADR HLPMIM 773 1B24D 4D423120 774 ASCII CNLW,MB1 1B250 0001C8E7 775 VFD ADR(SSMSG) 1B252 00000000 776 VFD SSS*SLT+MB1ADR,0 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 75 (RDUCOMS) F 14 Command Tables 1B253 0001EC00 777 VFD ADR HLPMMB1 778 1B254 4D423220 779 ASCII CNLW,MB2 1B257 0001C8E7 780 VFD ADR(SSMSG) 1B259 00000000 781 VFD SSS*SLT+MB2ADR,0 1B25A 0001EC17 782 VFD ADR HLPMMB2 783 0001B25B 784 NVMCOM LABEL 1B25B 4E564D20 785 ASCII CNLW,NVM 1B25E 59A1C6CE 786 VFD PRQAD+A11+D8+TUP+ADR(MEMORY) 1B260 10000000 787 VFD 0*CLS+SSS*SLT+1*MWR+01800*MBS,1*DSL 1B261 0001EC2E 788 VFD ADR HLPMNVM 789 0001B262 790 OCHARCOM LABEL 1B262 4F434841 791 ASCII CNLW,OCHAR 1B265 0431C69B 792 VFD D32+PNOD+ADR(DEVDISP) 1B267 0001CE67 793 VFD KLAS0*CLS+SSS*SLT+001408*MBS,ADR(MGSOC) 1B268 0001EC65 794 VFD ADR HLPMOCHR 795 1B269 52414D20 796 ASCII CNLW,RAM 1B26C 5961C6CE 797 VFD PRQAD+A10+D8+TUP+ADR(MEMORY) 1B26E 10000000 798 VFD 0*CLS+SSS*SLT+1*MWR+0C00*MBS,1*DSL 1B26F 0001EC7C 799 VFD ADR HLPMRAM 800 1B270 53202020 801 ASCII CNLW,S 1B273 0031C69B 802 VFD D32+ADR(DEVDISP) 1B275 00000000 803 VFD KLAS0*CLS+SSS*SLT+00140E,0 1B276 0001ECAE 804 VFD ADR HLPMSS 805 1B277 53544154 806 ASCII CNLW,STATUS 1B27A 0001C184 807 VFD ADR SSTATUS 1B27C 00000000 808 VFD 0,0 1B27D 0001ECE7 809 VFD ADR HLPMSSTAT 810 0001B27E 811 SWITCHCOM LABEL 1B27E 53574954 812 ASCII CNLW,SWITCHES 1B281 2411C69B 813 VFD D4+TDT+PNOD+ADR(DEVDISP) 1B283 0001CE69 814 VFD KLAS0*CLS+SSS*SLT+1*MWR+001411*MBS,ADR(MGSSW) 1B284 0001ED24 815 VFD ADR HLPMSWIT 816 0001B285 817 TFENCECOM LABEL 1B285 5446454E 818 ASCII CNLW,TFENCE 1B288 0431C69B 819 VFD D32+PNOD+ADR(DEVDISP) 1B28A 0001CE6C 820 VFD KLAS0*CLS+SSS*SLT+001409*MBS,ADR(MGSTF) 1B28B 0001ED47 821 VFD ADR HLPMTFEN 822 1B28C 54494D45 823 ASCII CNLW,TIMESET 1B28F 0001C908 824 VFD PNO+ADR(TIMESET) 1B291 00000000 825 VFD KLAS0*CLS+SSS*SLT+1*MWR+001416*MBS,0 1B292 0001ED61 826 VFD ADR HLPMTMST 827 1B293 5A202020 828 ASCII CNLW,Z 1B296 9A71C6CE 829 VFD PRQAD+A22+D32+TPT+ADR(MEMORY) 1B298 10000000 830 VFD 0*CLS+SSS*SLT+1*MWR+0*MBS,1*DSL 1B299 0001ED9D 831 VFD ADR HLPMSZ 832 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 76 (RDUCOMS) F 14 Command Tables 0001B29A 833 SSCTTOP LABEL 1B29A 0001CF92 834 VFD ADR(ERM123) 1B29B 0001CD9D 835 VFD ADR(MSSSCOMS) 836 BSS COMBLKLEN-DISPW SSCTTOP 0001B2A1 837 BIGCTTOP LABEL 1B2A1 0001CED6 838 VFD ADR(ERM100) 1B2A2 0001CD7F 839 VFD ADR(MSGENCOMS) 840 BSS COMBLKLEN-DISPW BIGCTTOP 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 77 (RDUCOMS) F 14 Command Look Up Subroutines 843 844 ********************************************************************************** 845 * * 846 * COMLOOK is called to compare the symbol in SBUFF with * 847 * entries in the command table to determine if there is a * 848 * match. * 849 * If a match is found, COM will be returned pointing to * 850 * the matching entry, and R0 will be zero. * 851 * Note that the command tables are set up so that the last * 852 * entry in each table is the address of an error message explaining * 853 * the lack of a matching command in that table. * 854 * Call: * 855 * R4 -> end of command table (address of error message) * 856 * R5 -> beginning of command table * 857 * CALLNP COMLOOK * 858 * JNEZ R0 error message> * 859 * R5 -> matching entry * 860 * * 861 * Eats R0. Sets R5. * 862 * * 863 ********************************************************************************** 864 865 BLOCK 866 ENTRY COMLOOK 867 868 BEGFRAME 00178801 6 BASE 869 COMTEMP BSS 2 temp for terminator 870 ENDFRAME 871 1B2A8 DD5F8003 6 STAK 872 COMLOOK ENTRNP PUSH 1B2A9 E6578801 126 BASE 873 ST2 R1 SP,COMTEMP save registers 0001B2AA 874 COML10 LABEL 1B2AA 3801A830 0 875 LEA R0 SBUFFW point to user input 1B2AB 38974800 2 5 BASE 876 LEA R2 COM,COMNAME point to command name 1B2AC 6044000C 1 IMM 877 LD R1 CNL get name length 1B2AD FE540000 878 CMS see if this is the one 1B2AE FE03B2B4 879 JEQ COMLGOOD quit looking if found it 880 * \ / 881 1B2AF 19440007 5 IMM 882 ADD COM COMBLKLEN advance to next block 1B2B0 65530000 5 4 REG 883 CPR COM R4 are we out of choices? 1B2B1 FE09B2AA 884 JLT COML10 if not, then keep looking 1B2B2 60170800 0 4 BASE 885 LD R0 R4,0 get pointer to error message 1B2B3 FE0FB2B5 886 JMP COMLEXIT and get out of here 887 * --- 888 0001B2B4 889 COMLGOOD LABEL 1B2B4 60040000 0 IMM 890 LD R0 0 say we have no error 0001B2B5 891 COMLEXIT LABEL 1B2B5 62578801 126 BASE 892 LD2 R1 SP,COMTEMP restore registers 1B2B6 5D1F8003 6 STAK 893 LEAVE POP 894 * --- 895 896 END of COMLOOK subroutine 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 78 (RDUCOMS) F 14 Command Look Up Subroutines 898 899 ********************************************************************************** 900 * * 901 * DECODER simply checks the bit in the command element * 902 * that determines the type of alphabetic parameter to pick up * 903 * and then calls the appropriate version of FETCHITEM. * 904 * Call: * 905 * COM -> command element * 906 * BUFPT -> postion in buffer chars start * 907 * CALLNP DECODER * 908 * On return, R1 = terminating character. * 909 * R2 = item type * 910 * SBUFF = item returned * 911 * * 912 * Eats R0:R2. * 913 * * 914 ********************************************************************************** 915 916 BLOCK 917 ENTRY DECODER 918 919 BEGFRAME 920 ENDFRAME 921 1B2B7 DD5F8001 6 STAK 922 DECODER ENTRNP PUSH 1B2B8 60094C43 0 5 ZBM 923 LD R0 COM,COMCODE get the desired code type 1B2B9 64040002 0 IMM 924 CPR R0 CFILE/CCODE is this a file request? 1B2BA FE03B2BD 925 JEQ DCODFILE if so then different call 1B2BB DC41B33C 926 CALLNP FETCHAP else simple alpha fetch 1B2BC 5D1F8001 6 STAK 927 LEAVE STAK SP,1 then return to caller 928 * --- 929 0001B2BD 930 DCODFILE LABEL 1B2BD DC41B346 931 CALLNP FETCHITMF pick up file specifier 1B2BE 5D1F8001 6 STAK 932 LEAVE POP 933 * --- 934 935 END of DECODER subroutine 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 79 (RDUCOMS) F 14 Command Look Up Subroutines 937 938 ********************************************************************************** 939 * * 940 * This is the COMLIST routine. It is called to list out * 941 * the command table pointed to by COM. Commands are listed * 942 * out of the table until COM reaches R4 (top of table). * 943 * Call: * 944 * R4 -> end of command table * 945 * COM -> beginning of command table * 946 * CALLNP COMLIST * 947 * Eats R0:R2. * 948 * * 949 ********************************************************************************** 950 951 BLOCK 952 ENTRY COMLIST 953 954 BEGFRAME 00178801 6 BASE 955 CLSTTEMP BSS 1 temp for R7 956 ENDFRAME 957 1B2BF DD5F8002 6 STAK 958 COMLIST ENTRNP PUSH 1B2C0 E5D78801 7 6 BASE 959 ST R7 SP,CLSTTEMP save R7 from harm 1B2C1 DC41B8B8 960 CALLNP OUTCRLF make some room 1B2C2 60170801 0 4 BASE 961 LD R0 R4,1 get pointer to header 1B2C3 DC41B88A 962 CALLNP OUT list that out 963 * \ / 964 0001B2C4 965 CLST10 LABEL 1B2C4 DC41B86F 966 CALLNP BLANKOUT clear the buffer 1B2C5 61C40003 7 IMM 967 LD R7 NCOMPL-1 get number per line 0001B2C6 968 CLST20 LABEL 1B2C6 60AFCD7B 2 7 969 LD R2 COMPOST(R7) get line position 1B2C7 38174800 0 5 BASE 970 LEA R0 COM,COMNAME point to command name 1B2C8 6044000C 1 IMM 971 LD R1 CNL get name length 1B2C9 FE400000 972 CMOVE move into output line 1B2CA 19440007 5 IMM 973 ADD COM COMBLKLEN advance to next entry 1B2CB 65530000 5 4 REG 974 CPR COM R4 enough of this?? 1B2CC FE07B2D2 975 JGE CLST40 jump if almost done 1B2CD FBE7B2C6 7 976 JDR R7 CLST20 recycle if room on line 977 * \ / 978 1B2CE EC168000 2 CACH 979 STZ CACH R2,0 terminate the line 1B2CF 6005A818 0 IMM 980 LD R0 ADR(OBUFFW) point to the line 1B2D0 DC41B88A 981 CALLNP OUT list out the line 1B2D1 FE0FB2C4 982 JMP CLST10 then start anew 983 * --- 984 0001B2D2 985 CLST40 LABEL 1B2D2 EC168000 2 CACH 986 STZ CACH R2,0 mark the end 1B2D3 6005A818 0 IMM 987 LD R0 ADR(OBUFFW) point to the buffer 1B2D4 DC41B88A 988 CALLNP OUT list it out 1B2D5 61D78801 7 6 BASE 989 LD R7 SP,CLSTTEMP restore R7 1B2D6 5D1F8002 6 STAK 990 LEAVE POP 991 * --- 992 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 80 (RDUCOMS) F 14 Command Look Up Subroutines 993 END of COMLIST 129 130 INPUT RDUISUB 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 81 (RDUISUB) F 15 Input subroutines 3 00000000 ABS 4 CNM EQU 0 number 00000001 ABS 5 CHX EQU 1 hex number (A-F) 00000002 ABS 6 CAL EQU 2 alpha 00000003 ABS 7 CFC EQU 3 file character 00000004 ABS 8 CCM EQU 4 comma 00000005 ABS 9 CCL EQU 5 colon 00000006 ABS 10 CEL EQU 6 end-of-line 00000007 ABS 11 CBL EQU 7 blank 00000008 ABS 12 CSC EQU 8 semi-colon 00000009 ABS 13 CDT EQU 9 dot (period) 0000000A ABS 14 CLF EQU 10 line-feed 0000000B ABS 15 CUP EQU 11 up-arrow 0000000C ABS 16 CGT EQU 12 greater-than 0000000D ABS 17 CLT EQU 13 less-than 0000000E ABS 18 CAT EQU 14 at-sign 0000000F ABS 19 CQT EQU 15 single quote 00000010 ABS 20 CDQ EQU 16 double-quote 00000011 ABS 21 CER EQU 17 error 00000012 ABS 22 NFITYPES EQU 18 number of class types 23 00003E10 BYTE 24 TEOL EQU BIT 31 carriage return 00003C10 BYTE 25 TDOT EQU BIT 30 period, dot 00003A10 BYTE 26 TLFD EQU BIT 29 line-feed 00003810 BYTE 27 TUPA EQU BIT 28 up-arrow 00003610 BYTE 28 TPTR EQU BIT 27 pointer, greater-than 00003410 BYTE 29 TBPT EQU BIT 26 back-pointer, less-than 00003210 BYTE 30 TATS EQU BIT 25 at-sign 00003010 BYTE 31 TCOL EQU BIT 24 colon 00003080 BYTE 32 TERMS EQU BITS 24:31 terminator flags 00002E10 BYTE 33 TALPH EQU BIT 23 alpha 00002C10 BYTE 34 TNUM EQU BIT 22 number 00002A10 BYTE 35 TSTEP EQU BIT 21 single-step, semi-colon 00002810 BYTE 36 TSTR EQU BIT 20 string 00002610 BYTE 37 TQUO EQU BIT 19 single quote 00000000 ABS 38 TERR EQU 0 error 39 00000061 ABS 40 LOWCASE EQU 061 lower case characters 0000007A ABS 41 LOWTOP EQU 07A last lower case char 00000020 ABS 42 LOWBIAS EQU 020 change lower to upper 00000030 ABS 43 NUMBIAS EQU 030 change ASCII to binary 00000037 ABS 44 HEXBIAS EQU 037 hexadecimal conversion bias 0000007F ABS 45 GASMASK EQU 07F parity mask 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 82 (RDUISUB) F 15 Input subroutines 47 ********************************************************************************** 48 * * 49 * The following table is for determining character type of * 50 * each of the 128 ASCII characters (after stripping parity). * 51 * Each entry corresponds to one character. After converting * 52 * the character to a type, the type may then be used to index * 53 * one of the FETCHITM control tables. * 54 * * 55 ********************************************************************************** 56 1B2D7 0149B2D8 57 CODES PTR CODETAB pointer to ASCII code table 1B2D8 00000011 58 CODETAB VFD 5:CER,CER,CER,CER,CER,CER,CER,CER 1B2D9 00000011 59 VFDB 5:CER,CER,CLF,CER,CER,CEL,CER,CER 1B2DA 00000011 60 VFDB 5:CER,CER,CER,CER,CER,CER,CER,CER 1B2DC 00000011 61 VFDB 5:CER,CER,CER,CER,CER,CER,CER,CER 1B2DD 0000000F 62 VFDB 5:CBL,CAL,CDQ,CER,CFC,CER,CAL,CQT 1B2DE 00000011 63 VFDB 5:CER,CER,CAL,CFC,CCM,CER,CDT,CER 1B2DF 00000000 64 VFDB 5:CNM,CNM,CNM,CNM,CNM,CNM,CNM,CNM 1B2E1 00000011 65 VFDB 5:CNM,CNM,CCL,CSC,CLT,CER,CGT,CER 1B2E2 00000002 66 VFDB 5:CAT,CHX,CHX,CHX,CHX,CHX,CHX,CAL 1B2E3 00000002 67 VFDB 5:CAL,CAL,CAL,CAL,CAL,CAL,CAL,CAL 1B2E4 00000002 68 VFDB 5:CAL,CAL,CAL,CAL,CAL,CAL,CAL,CAL 1B2E6 00000002 69 VFDB 5:CAL,CAL,CAL,CER,CER,CER,CUP,CAL 1B2E7 00000002 70 VFDB 5:CER,CHX,CHX,CHX,CHX,CHX,CHX,CAL 1B2E8 00000002 71 VFDB 5:CAL,CAL,CAL,CAL,CAL,CAL,CAL,CAL 1B2E9 00000002 72 VFDB 5:CAL,CAL,CAL,CAL,CAL,CAL,CAL,CAL 1B2EB 00000011 73 VFDB 5:CAL,CAL,CAL,CER,CER,CER,CER,CER 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 83 (RDUISUB) F 15 Input subroutines 75 ********************************************************************************** 76 * * 77 * The following are the FETCHITM control tables. They are * 78 * state tables controlling actions by the item fetcher based * 79 * on entry type, current character, and current state. * 80 * * 81 * Current Fetchitm entry types are: * 82 * 0 = FETCHCOM - command fetch * 83 * 1 = FETCHCM2 - secondary command fetch * 84 * 2 = FETCHAP - alpha parameter fetch * 85 * 3 = FETCHNP - numeric parameter fetch * 86 * 4 = FETCHDATA - data item fetch * 87 * 5 = FETCHFILE - file name or unit fetch * 88 * * 89 ********************************************************************************** 90 00000000 ABS 91 FPN EQU 0 pack number 00000001 ABS 92 FCN EQU 1 continue number 00000002 ABS 93 FEP EQU 2 end packing 00000003 ABS 94 FPA EQU 3 pack alpha 00000004 ABS 95 FCA EQU 4 continue alpha 00000005 ABS 96 FCR EQU 5 carriage return 00000006 ABS 97 FSK EQU 6 skip to next (blank) 00000007 ABS 98 FDL EQU 7 delimiter (comma) 00000008 ABS 99 FSS EQU 8 single-step 00000009 ABS 100 FDT EQU 9 dot 0000000A ABS 101 FLF EQU 10 line feed 0000000B ABS 102 FUP EQU 11 up arrow 0000000C ABS 103 FPT EQU 12 pointer 0000000D ABS 104 FBP EQU 13 back-pointer 0000000E ABS 105 FAT EQU 14 at-sign 0000000F ABS 106 FPH EQU 15 hex digit (A-F) 00000010 ABS 107 FCL EQU 16 colon 00000011 ABS 108 FST EQU 17 string 00000012 ABS 109 FQT EQU 18 quote 00000013 ABS 110 FER EQU 19 error 111 112 * CNM,CHX,CAL,CFC,CCM,CCL,CEL,CBL,CSC,CDT,CLF,CUP,CGT,CLT,CAT,CQT,CDQ,CER 113 1B2ED 00000013 114 FITABI VFD 5:FPN,FPA,FPA,FER,FER,FER,FCR,FSK,FSS,FDT,FER,FER,FER,FER,FER,FER,FER,FER 1B2F0 00000013 115 VFDB 5:FPN,FPH,FPA,FER,FDL,FER,FCR,FSK,FER,FER,FER,FER,FER,FER,FER,FER,FER,FER 1B2F3 00000013 116 VFDB 5:FER,FPA,FPA,FER,FDL,FER,FCR,FSK,FER,FER,FER,FER,FER,FER,FER,FQT,FST,FER 1B2F6 00000013 117 VFDB 5:FPN,FPN,FER,FER,FDL,FER,FCR,FSK,FER,FDT,FER,FER,FER,FER,FER,FER,FER,FER 1B2F9 00000013 118 VFDB 5:FPN,FPN,FER,FER,FDL,FCL,FCR,FSK,FER,FDT,FLF,FUP,FPT,FBP,FAT,FER,FER,FER 1B2FB 00000013 119 VFDB 5:FPN,FPA,FPA,FPA,FDL,FER,FCR,FSK,FER,FPA,FER,FER,FER,FER,FER,FER,FER,FER 120 1B2FE 00000013 121 FITABN VFD 5:FCN,FER,FER,FER,FEP,FER,FEP,FEP,FSS,FDT,FER,FER,FER,FER,FER,FER,FER,FER 1B301 00000013 122 VFDB 5:FCN,FER,FER,FER,FER,FER,FEP,FEP,FEP,FER,FER,FER,FER,FER,FER,FER,FER,FER 1B304 00000013 123 VFDB 5:FER,FER,FER,FER,FER,FER,FER,FER,FER,FER,FER,FER,FER,FER,FER,FER,FER,FER 1B307 00000013 124 VFDB 5:FCN,FCN,FER,FER,FEP,FEP,FEP,FEP,FER,FER,FER,FER,FER,FER,FER,FEP,FER,FER 1B30A 00000013 125 VFDB 5:FCN,FCN,FER,FER,FEP,FER,FCR,FEP,FER,FDT,FLF,FUP,FPT,FBP,FAT,FER,FER,FER 1B30C 00000013 126 VFDB 5:FCN,FER,FER,FEP,FEP,FER,FCR,FEP,FER,FER,FER,FER,FER,FER,FER,FER,FER,FER 127 1B30F 00000013 128 FITABA VFD 5:FCA,FCA,FCA,FER,FEP,FER,FEP,FEP,FER,FDT,FER,FER,FER,FER,FER,FQT,FER,FER 1B312 00000013 129 VFDB 5:FCA,FCA,FCA,FER,FEP,FER,FEP,FEP,FER,FER,FER,FER,FER,FER,FER,FQT,FER,FER 1B315 00000013 130 VFDB 5:FCA,FCA,FCA,FER,FEP,FER,FEP,FEP,FER,FER,FER,FER,FER,FER,FER,FER,FER,FER 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 84 (RDUISUB) F 15 Input subroutines 1B318 00000013 131 VFDB 5:FER,FER,FER,FER,FER,FER,FER,FER,FER,FER,FER,FER,FER,FER,FER,FER,FER,FER 1B31B 00000013 132 VFDB 5:FER,FER,FER,FER,FER,FER,FER,FER,FER,FER,FER,FER,FER,FER,FER,FER,FER,FER 1B31D 00000002 133 VFDB 5:FCA,FCA,FCA,FCA,FEP,FCA,FEP,FEP,FEP,FCA,FEP,FEP,FEP,FEP,FEP,FEP,FEP,FEP 134 1B31F 0149B2EC 135 FIPTI PTR FITABI 1B320 0149B2FD 136 FIPTN PTR FITABN 1B321 0149B30E 137 FIPTA PTR FITABA 138 139 BLOCK FETCHITEM subroutines 140 ENTRY FETCHCOM (Command fetch) 141 ENTRY FETCHCM2 (Secondary command fetch or hex digit) 142 ENTRY FETCHAP (Alpha param fetch) 143 ENTRY FETCHNP (Hex numeric param fetch) 144 ENTRY FETCHDN (Decimal numeric param fetch) 145 ENTRY FETCHDATA (Data fetch) 146 ENTRY FETCHITMF (File name/unit fetch) 147 1B322 FE0FB385 148 FITABX JMP FIPN 0 1B323 FE0FB387 149 JMP FICN 1 1B324 FEC00000 150 NOP 0 2 1B325 FE0FB366 151 JMP FIPA 3 1B326 FE0FB367 152 JMP FICA 4 1B327 7C840001 2 IMM 153 IOR R2 1*TEOL 5 1B328 FE0FB354 154 JMP FISK 6 1B329 FE0FB35B 155 JMP FIDL 7 1B32A 7C840400 2 IMM 156 IOR R2 1*TSTEP 8 1B32B 7C840002 2 IMM 157 IOR R2 1*TDOT 9 1B32C 7C840004 2 IMM 158 IOR R2 1*TLFD 10 1B32D 7C840008 2 IMM 159 IOR R2 1*TUPA 11 1B32E 7C840010 2 IMM 160 IOR R2 1*TPTR 12 1B32F 7C840020 2 IMM 161 IOR R2 1*TBPT 13 1B330 7C840040 2 IMM 162 IOR R2 1*TATS 14 1B331 FE0FB35E 163 JMP FIPH 15 1B332 7C840080 2 IMM 164 IOR R2 1*TCOL 16 1B333 FE0FB375 165 JMP FIPS 17 1B334 7C841000 2 IMM 166 IOR R2 1*TQUO 18 1B335 FE0FB39A 167 JMP FIERROR 19 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 85 (RDUISUB) F 15 Input subroutines 169 170 ********************************************************************************** 171 * * 172 * This is the FETCHITM routine. It scans the input buffer * 173 * and returns symbols or numbers or possibly a line terminator * 174 * (EOL or question mark). * 175 * * 176 * Entry types: * 177 * 0 - FETCHCOM (Command fetch) * 178 * 1 - FETCHCM2 (Secondary command fetch or hex digit) * 179 * 2 - FETCHAP (Alpha param fetch) * 180 * 3 - FETCHNP (Hex numeric param fetch) * 181 * 4 - FETCHDN (Decimal numeric param fetch) * 182 * 5 - FETCHDATA (Data fetch) * 183 * 6 - FETCHITMF (File name/unit fetch) * 184 * * 185 * Call: * 186 * BUFPT -> postion in buffer chars start * 187 * CALLNP FETCHxxx * 188 * On return, R1 = terminating character. * 189 * R2 = item type * 190 * SBUFF = item returned * 191 * Eats R0:R2. * 192 * * 193 * FETCHAP will return either an alphabetic item converted * 194 * to all capital letters, or if the the string is enclosed in * 195 * quotes will move the string into SBUFF and VALUE will contain * 196 * the length. The string will not be converted to capital * 197 * letters, and 2 double quotes in a row will be interpreted as * 198 * a single double quote to be left within the string. * 199 * * 200 ********************************************************************************** 201 202 BEGFRAME 00178801 6 BASE 203 FITYPE BSS 1 type of entry 00178802 6 BASE 204 FIRADIX BSS 1 radix of numbers 00178803 6 BASE 205 FIDELIM BSS 1 delimiter flag 206 ENDFRAME 207 1B336 DD5F8004 6 STAK 208 FETCHCOM ENTRNP PUSH 1B337 60040000 0 IMM 209 LD R0 0 flag entry type 1B338 FE0FB344 210 JMP FIDN then merge in 211 * --- 212 1B339 DD5F8004 6 STAK 213 FETCHCM2 ENTRNP PUSH 1B33A 60040001 0 IMM 214 LD R0 1 flag type 1B33B FE0FB34B 215 JMP FI00 and here's Johnny!! 216 * --- 217 1B33C DD5F8004 6 STAK 218 FETCHAP ENTRNP PUSH 1B33D 60040002 0 IMM 219 LD R0 2 flag type 1B33E FE0FB34B 220 JMP FI00 then into the fracas 221 * --- 222 1B33F DD5F8004 6 STAK 223 FETCHNP ENTRNP PUSH 1B340 60040003 0 IMM 224 LD R0 3 get code 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 86 (RDUISUB) F 15 Input subroutines 1B341 FE0FB34B 225 JMP FI00 then head out 226 * --- 227 1B342 DD5F8004 6 STAK 228 FETCHDN ENTRNP PUSH 1B343 60040003 0 IMM 229 LD R0 3 get code 0001B344 230 FIDN LABEL 1B344 6044000A 1 IMM 231 LD R1 10 get radix 1B345 FE0FB34C 232 JMP FI01 then merge in 233 * --- 234 1B346 DD5F8004 6 STAK 235 FETCHITMF ENTRNP PUSH 1B347 60040005 0 IMM 236 LD R0 5 set entry type code 1B348 FE0FB344 237 JMP FIDN then merge in 238 * --- 239 1B349 DD5F8004 6 STAK 240 FETCHDATA ENTRNP PUSH 1B34A 60040004 0 IMM 241 LD R0 4 set type code 0001B34B 242 FI00 LABEL 1B34B 60440010 1 IMM 243 LD R1 16 use hex radix 0001B34C 244 FI01 LABEL 1B34C E4578802 1 6 BASE 245 ST R1 SP,FIRADIX set radix for numbers 1B34D 1C040012 0 IMM 246 MUL R0 NFITYPES bias by number of entries 1B34E E4178801 0 6 BASE 247 ST R0 SP,FITYPE save for table indexing 1B34F 3881A830 2 248 LEA R2 SBUFFW point to the symbol buffer 1B350 60440060 1 IMM 249 LD R1 SBMAXL maximum buffer size 1B351 FE580020 250 CFILL BLANK and blank it out clean! 1B352 60840000 2 IMM 251 LD R2 0 clear item type 1B353 EC178803 6 BASE 252 STZ SP,FIDELIM say no delimiter seen 0001B354 253 FISK LABEL 1B354 6001A8E5 0 254 LD R0 BUFPT get buffer pointer 1B355 E401A8E6 0 255 ST R0 LBUFPT save in case we need it later 1B356 DC41B39C 256 CALLNP GETCHAR get a character 1B357 18578801 1 6 BASE 257 ADD R1 SP,FITYPE bias code 1B358 6073B31F 1 1 @ 258 LD R1 @FIPTI(R1) get jump code 1B359 5D63B322 1 259 XCT FITABX(R1) then do the operation 1B35A FE0FB394 260 JMP FIEX exit if not going elsewhere 261 * --- 262 0001B35B 263 FIDL LABEL have delimiter (comma) 1B35B D1D78803 6 BASE 264 SETT SP,FIDELIM say we have seen one 1B35C FE0DB354 265 JNE FISK if first one then skip on 1B35D FE0FB39A 266 JMP FIERROR but error if already seen 267 * --- 268 0001B35E 269 FIPH LABEL pack hex number 1B35E E4128000 0 2 REG 270 ST R0 R2 save digit 1B35F DC41B39C 271 CALLNP GETCHAR check the next one 1B360 6001A8E5 0 272 LD R0 BUFPT restore buffer pointer 1B361 D04A1F30 0 CBM 273 DEC R0/NXTCHAR backup to see again 1B362 E401A8E5 0 274 ST R0 BUFPT no other way 1B363 60128000 0 2 REG 275 LD R0 R2 get the character back 1B364 64440002 1 IMM 276 CPR R1 CAL alpha, hex, or number? 1B365 FE05B385 277 JGT FIPN if not then pack as number 0001B366 278 FIPA LABEL process alpha 1B366 60840000 2 IMM 279 LD R2 0 buffer pointer 0001B367 280 FICA LABEL (no, its not Social Security) 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 87 (RDUISUB) F 15 Input subroutines 1B367 64840060 2 IMM 281 CPR R2 SBMAXL see if enough 1B368 FE07B36B 282 JGE FIA10 jump if full (I wouldn't try) 1B369 E435AC02 0 2 @ 283 ST R0 @SBPT(R2) add to former string 1B36A 18840001 2 IMM 284 ADD R2 1 advance pointer 0001B36B 285 FIA10 LABEL 1B36B DC41B39C 286 CALLNP GETCHAR get next character 1B36C 18578801 1 6 BASE 287 ADD R1 SP,FITYPE bias by entry type 1B36D 6073B321 1 1 @ 288 LD R1 @FIPTA(R1) get function code 1B36E 5D63B322 1 289 XCT FITABX(R1) and perform operation 1B36F E481A8EC 2 290 ST R2 SBCHARL for those who want the character length 1B370 10840001 2 IMM 291 SUB R2 1 to determine word length 1B371 14840004 2 IMM 292 DIV R2 NCPW in case it's a symbol 1B372 E481A8EB 2 293 ST R2 SBL save for anyone who cares 1B373 60840100 2 IMM 294 LD R2 1*TALPH get type code to return 1B374 FE0FB394 295 JMP FIEX then head on out 296 * --- 297 0001B375 298 FIPS LABEL string packer 1B375 60840000 2 IMM 299 LD R2 0 set length at zero 0001B376 300 FICS LABEL 1B376 DC41B3A9 301 CALLNP GETCHARX get a character from input 1B377 64040022 0 IMM 302 CPR R0 QUOTES is it a double-quote? 1B378 FE03B37F 303 JEQ FIES if so then possible end 1B379 6404000D 0 IMM 304 CPR R0 CR check for end-of-line 1B37A FE03B39A 305 JEQ FIERROR if so then complain 0001B37B 306 FIQS LABEL 1B37B 64840060 2 IMM 307 CPR R2 SBMAXL enough string? 1B37C FE07B376 308 JGE FICS if so then ignore the rest 1B37D E435AC02 0 2 @ 309 ST R0 @SBPT(R2) place into symbol buffer 1B37E FAA1B376 2 310 IRJ R2 FICS up counter and continue on 311 * \ / 312 0001B37F 313 FIES LABEL 1B37F DC41B3A9 314 CALLNP GETCHARX get another character 1B380 64040022 0 IMM 315 CPR R0 QUOTES is it another quote? 1B381 FE03B37B 316 JEQ FIQS if so then pack only one 1B382 E481A8ED 2 317 ST R2 VALUE save the string length 1B383 60840800 2 IMM 318 LD R2 1*TSTR get our return type 1B384 FE0FB394 319 JMP FIEX then bail on out 320 * --- 321 0001B385 322 FIPN LABEL number processing 1B385 EC01A830 323 STZ SBUFFW zero out the buffer 1B386 60840200 2 IMM 324 LD R2 1*TNUM remember we have number 0001B387 325 FICN LABEL 1B387 10040030 0 IMM 326 SUB R0 NUMBIAS take off ASCII clothes 1B388 64040009 0 IMM 327 CPR R0 9 do we have a digit yet? 1B389 FE0BB38D 328 JLE FIDD jump if a decimal digit 1B38A 10040007 0 IMM 329 SUB R0 HEXBIAS-NUMBIAS otherwise it's a hex digit 1B38B 64178802 0 6 BASE 330 CPR R0 SP,FIRADIX are we fetching hex? 1B38C FE07B39A 331 JGE FIERROR error if not 332 * \ / 333 0001B38D 334 FIDD LABEL 1B38D 60578802 1 6 BASE 335 LD R1 SP,FIRADIX get hex radix 1B38E 9C41A830 1 336 MULM R1 SBUFFW bump current value 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 88 (RDUISUB) F 15 Input subroutines 1B38F 9801A830 0 337 ADDM R0 SBUFFW add new digit 1B390 DC41B39C 338 CALLNP GETCHAR get next character 1B391 18578801 1 6 BASE 339 ADD R1 SP,FITYPE bias for entry type 1B392 6073B320 1 1 @ 340 LD R1 @FIPTN(R1) then get function code 1B393 5D63B322 1 341 XCT FITABX(R1) perform proper operation 0001B394 342 FIEX LABEL 1B394 6041A8E5 1 343 LD R1 BUFPT get buffer pointer 1B395 D04A5F30 1 CBM 344 DEC R1/NXTCHAR back up so we can see again 1B396 E441A8E5 1 345 ST R1 BUFPT for later 1B397 60520000 1 0 REG 346 LD R1 R0 get terminating character 1B398 6001A830 0 347 LD R0 SBUFFW get first word or value 0001B399 348 FIEXIT LABEL 1B399 5D1F8004 6 STAK 349 LEAVE POP 350 * --- 351 0001B39A 352 FIERROR LABEL error!!! 1B39A 60840000 2 IMM 353 LD R2 1*TERR give a nothing response 1B39B FE0FB399 354 JMP FIEXIT 355 * --- 356 357 END of FETCHITEM routines 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 89 (RDUISUB) F 15 Input subroutines 359 360 ********************************************************************************** 361 * * 362 * GETCHAR picks up one character from the input buffer, * 363 * converts from lower to upper case if necessary, and picks up * 364 * the character type from the decode table. * 365 * GETCHARX does not do case conversion. * 366 * Call: * 367 * BUFPT -> char in buffer to get * 368 * CALLNP GETCHAR(X) * 369 * * 370 * On return, R0 = character (7 bit) * 371 * R1 = character type * 372 * BUFPT -> next char in buffer * 373 * Eats R0:R1. * 374 * * 375 ********************************************************************************** 376 377 BLOCK 378 ENTRY GETCHAR 379 ENTRY GETCHARX 380 381 BEGFRAME 382 ENDFRAME 383 1B39C DD5F8001 6 STAK 384 GETCHAR ENTRNP PUSH 1B39D 6041A8E5 1 385 LD R1 BUFPT get pointer to input buffer 1B39E 60164000 0 1 CACH 386 LD R0 CACH R1,0 get a character 1B39F 7804007F 0 IMM 387 AND R0 GASMASK chop off parity garbage 1B3A0 D00A5F30 1 CBM 388 INC R1/NXTCHAR advance to next char in buf 1B3A1 E441A8E5 1 389 ST R1 BUFPT remember for later 1B3A2 64040061 0 IMM 390 CPR R0 LOWCASE check for lower case 1B3A3 FE09B3A7 391 JLT GC30 jump if not 1B3A4 6404007A 0 IMM 392 CPR R0 LOWTOP be sure its in range 1B3A5 FE05B3A7 393 JGT GC30 jump if not lower case 1B3A6 10040020 0 IMM 394 SUB R0 LOWBIAS convert to upper case 0001B3A7 395 GC30 LABEL 1B3A7 6071B2D7 1 0 @ 396 LD R1 @CODES(R0) get character group type 1B3A8 5D1F8001 6 STAK 397 LEAVE POP 398 * --- 399 1B3A9 DD5F8001 6 STAK 400 GETCHARX ENTRNP PUSH 1B3AA 6041A8E5 1 401 LD R1 BUFPT get pointer to input buffer 1B3AB 60164000 0 1 CACH 402 LD R0 CACH R1,0 get a character 1B3AC 7804007F 0 IMM 403 AND R0 GASMASK chop off parity garbage 1B3AD D00A5F30 1 CBM 404 INC R1/NXTCHAR advance to next char in buf 1B3AE E441A8E5 1 405 ST R1 BUFPT remember for later 1B3AF FE0FB3A7 406 JMP GC30 then head on out 407 * --- 408 409 END of GETCHAR subroutines 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 90 (RDUISUB) F 15 Input subroutines 411 412 ********************************************************************************** 413 * * 414 * READLINE picks up input from the user's terminal. * 415 * It will keep the remote machine alive (if present) while * 416 * waiting for the slow user to tell us what to do. * 417 * The input is left in the input buffer (IBUFF) with the * 418 * terminator added on the end and stored in TERMCHAR. R1 * 419 * contains the number of chars read. Also the event is logged. * 420 * When doing concurrent processing, this guy does ALL of * 421 * the work -- handling timeout interrupts, path data from the * 422 * concurrent process, sending data to the proper destination, * 423 * keeping the remote system alive, and anything else you can * 424 * think of. * 425 * Optional entry READLINERM will suspend only once for * 426 * terminal input. * 427 * Optional entry READLINENW will not suspend for input. * 428 * Call: * 429 * CALLNP READLINE(xx) * 430 * R0 = 0 if have data * 431 * = RTEOD if end of data read * 432 * < 0 if error during read * 433 * R1 = number of chars read * 434 * R2 = terminating character (=TERMCHAR) * 435 * IBUFF contains input * 436 * Eats R0:R3 * 437 * * 438 ********************************************************************************** 439 440 BLOCK 441 ENTRY READLINE 442 ENTRY READLINERM 443 ENTRY READLINENW 444 445 BEGFRAME 00178801 6 BASE 446 RLTEMP BSS 2 temporary help 447 ENDFRAME 448 00000010 BYTE 449 NOWAITBIT EQU BIT 0 bit in R7 sez do not allow suspend on read 00000210 BYTE 450 RTNTOME EQU BIT 1 bit in R7 sez do not loop for input here 451 1B3B0 DD5F8003 6 STAK 452 READLINERM ENTRNP PUSH 1B3B1 EDCBC210 7 CBM 453 STW R7/RTNTOME indicate wait for terminal only once 1B3B2 FE0FB3B7 454 JMP WAITENTRY go share entry 455 * --- 456 1B3B3 DD5F8003 6 STAK 457 READLINENW ENTRNP PUSH 1B3B4 EDCBC010 7 CBM 458 STW R7/NOWAITBIT indicate can't wait for terminal 1B3B5 FE0FB3B7 459 JMP WAITENTRY go share entry 460 * --- 461 1B3B6 DD5F8003 6 STAK 462 READLINE ENTRNP PUSH 0001B3B7 463 WAITENTRY LABEL 1B3B7 EC01F695 464 STZ TIMEOUTPC clear interrupt processing 1B3B8 EC01A8E2 465 STZ INTFLAGS clear left-over interrupts 466 * \ / 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 91 (RDUISUB) F 15 Input subroutines 467 468 * Set up to be interrupted if a concurrent process is trying 469 * to communicate with us over a path. 470 1B3B9 5C01A8D7 471 CMZ CPSTATE concurrent processing? 1B3BA FE03B3BE 472 JEQ RLSETTIM jump if not 1B3BB 60040080 0 IMM 473 LD R0 URSSINTARM arm for path input 1B3BC 60420080 1 IMM 474 LD R1 PATHBIT get proper bit to set 1B3BD 09040000 IMM 475 UREQ 0+XREQ now we will get path data 476 * \ / 477 0001B3BE 478 RLSETTIM LABEL 1B3BE DC41BD2D 479 CALLNP TIMER set up timeout interrupt so we can 480 * send NOPs to keep the remote alive 0001B3BF 481 RLSETTIM1 LABEL 1B3BF 6005B3E7 0 IMM 482 LD R0 ADR RLINTRPT set up interrupt return 1B3C0 E401F695 0 483 ST R0 TIMEOUTPC place to go on time-out 1B3C1 5C01A8E2 484 CMZ INTFLAGS any interrupts sneak in? 1B3C2 FE0DB3EC 485 JNE RLINTRPT1 if so then go examine 486 * \ / 487 1B3C3 EDC1A915 488 STW LINECNT reset output line counter (for MORE processing) 1B3C4 60040030 0 IMM 489 LD R0 FRREAD set up to input line 1B3C5 F3C1B3C7 7 490 JBF R7/NOWAITBIT NORMREAD check for no terminal suspend 1B3C6 7C048000 0 IMM 491 IOR R0 XRSUSPERR don't allow terminal suspend 0001B3C7 492 NORMREAD LABEL 1B3C7 6044005F 1 IMM 493 LD R1 OKLEN-1 acceptable length 1B3C8 6081AC00 2 494 LD R2 IBPT point to input buffer 1B3C9 E481A8E5 2 495 ST R2 BUFPT initialize pointer 1B3CA E481AA4C 2 496 ST R2 EVENTADDR initialize EventAddr 1B3CB 08840001 IMM 497 FREQ LUNSIN+XREQ slurp up some input 498 * \ / 499 0001B3CC 500 RLRD LABEL 1B3CC EC01F695 501 STZ TIMEOUTPC have data - don't want timeout 1B3CD FA09B3E1 0 502 JLTZ R0 RLREADERR jump on XREQ error 1B3CE FA49B3E1 1 503 JLTZ R1 RLREADERR or if input line is too long 1B3CF 3044005F 1 IMM 504 RSB R1 OKLEN-1 obtain actual length 505 1B3D0 600A2040 0 0 CBM 506 LD R0 R0/RECTYPE get type of record 1B3D1 64040000 0 IMM 507 CPR R0 RTTEXT be sure its simple text 1B3D2 FE0DB3E1 508 JNE RLREADERR error if not 1B3D3 7884007F 2 IMM 509 AND R2 GASMASK remove parity bit from terminator 1B3D4 E481A8E7 2 510 ST R2 TERMCHAR remember input line terminator 1B3D5 E4B3AC00 2 1 @ 511 ST R2 @IBPT(R1) tack terminator on end of input line 1B3D6 6481A8EF 2 512 CPR R2 EXITCHAR is this the exit character? 1B3D7 FE03B3DB 513 JEQ RLEXOK exit now if it is 514 * \ / 515 1B3D8 DC41CCCD 516 CALLNP SPECSAVE put line into session log 1B3D9 6001A8D7 0 517 LD R0 CPSTATE see if there is a concurrent process 1B3DA FA0DB3FA 0 518 JNEZ R0 RLSENDCP don't exit if working with concurrency 519 * \ / 520 0001B3DB 521 RLEXOK LABEL 1B3DB 60040000 0 IMM 522 LD R0 0 return the all-clear code 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 92 (RDUISUB) F 15 Input subroutines 0001B3DC 523 RLEXIT LABEL 1B3DC E6178801 016 BASE 524 ST2 R0 SP,RLTEMP save the return code 1B3DD 60040142 0 IMM 525 LD R0 URCLRTIMIN clear any time bombs 1B3DE 09040000 IMM 526 UREQ 0+XREQ no lurking in the shadows!! 1B3DF 62178801 016 BASE 527 LD2 R0 SP,RLTEMP restore return info 1B3E0 5D1F8003 6 STAK 528 LEAVE POP 529 * --- 530 531 * Error on the read. Complain and try again. 0001B3E1 532 RLREADERR LABEL 1B3E1 6007FFFF 0 IMM 533 LD R0 -1 to indicate no data 1B3E2 F7C1B3DC 7 534 JBT R7/NOWAITBIT RLEXIT return could not suspend error 1B3E3 DC41B8B8 535 CALLNP OUTCRLF pretty the terminal 1B3E4 6005CEDA 0 IMM 536 LD R0 ADR ERM102 "Bad input -- try again" 1B3E5 DC41B88A 537 CALLNP OUT complain a bit 1B3E6 FE0FB3EC 538 JMP RLINTRPT1 try, try again 539 * --- 540 541 * An interrupt has occurred. See what type it was and go the 542 * appropriate direction. 543 0001B3E7 544 RLINTRPT LABEL (come here on interrupt) 1B3E7 E4178801 0 6 BASE 545 ST R0 SP,RLTEMP save data a moment 1B3E8 6001F692 0 546 LD R0 INTERPC get program counter when hit 1B3E9 6405B3CC 0 IMM 547 CPR R0 ADR RLRD had we read yet? 1B3EA 60178801 0 6 BASE 548 LD R0 SP,RLTEMP get our data back 1B3EB FE03B3CC 549 JEQ RLRD if we read, then take the input 550 * \ / 551 0001B3EC 552 RLINTRPT1 LABEL 1B3EC D181A8E0 553 CLRT UBREAK have we seen a Break? 1B3ED FE0DB3F6 554 JNE RLBRK if so then process it 1B3EE D191AC09 @ 555 CLRT @PDFLAG is there path data? 1B3EF FE0DB405 556 JNE RLPATHDATA if so handle it now 1B3F0 D191AC08 @ 557 CLRT @TOFLAG has a timeout occurred? 1B3F1 FE03B3BF 558 JEQ RLSETTIM1 if not then back around again 1B3F2 6007FFFF 0 IMM 559 LD R0 -1 to indicate no data 1B3F3 F7C3B3DC 7 560 JBT R7/RTNTOME RLEXIT return if caller does not want to wait 1B3F4 DC41BC7E 561 CALLNP SHIPNOP else keep remote system alive 1B3F5 FE0FB3BE 562 JMP RLSETTIM and start counting again 563 * --- 564 565 * The interrupt was a break. Let the RDU handle it. 566 0001B3F6 567 RLBRK LABEL 1B3F6 5C01A8D7 568 CMZ CPSTATE any concurrent processing? 1B3F7 FE03BE49 569 JEQ RDUBRK if not then take the break 1B3F8 6007FFFF 0 IMM 570 LD R0 -1 say we have no data 1B3F9 FE0FB3DC 571 JMP RLEXIT then exit to caller 572 * --- 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 93 (RDUISUB) F 15 Input subroutines 574 575 ********************************************************************************** 576 * * 577 * There is a concurrent process present. See if the input * 578 * is meant for it or for us (the RDU). If for us return to * 579 * caller, if for concurrent pack it up and send it out. * 580 * * 581 ********************************************************************************** 582 0001B3FA 583 RLSENDCP LABEL 1B3FA 64040001 0 IMM 584 CPR R0 1 talking to concurrent process or RDU? 1B3FB FE03B3DB 585 JEQ RLEXOK give this line to the RDU to handle 1B3FC 6085A800 2 IMM 586 LD R2 ADR IBUFFW R2 -> input line 1B3FD FE09B400 587 JLT RLSENDCP1 if local mode then send the line as is 588 * \ / 589 590 * Let the concurrent process know this line came from the operator. 1B3FE 18440001 1 IMM 591 ADD R1 1 add a character otherwise 1B3FF D04A9F30 2 CBM 592 DEC R2/NXTCHAR add our "O" on front 0001B400 593 RLSENDCP1 LABEL 1B400 60048040 0 IMM 594 LD R0 FRWRITE+XRSUSPERR ship line to concurrent proc 1B401 0881A91C 595 FREQ PATHS(1+XREQ) use our output path 1B402 FA09B447 0 596 JLTZ R0 RLSENDERR jump if couldn't ship the line 1B403 DC41B8B8 597 CALLNP OUTCRLF space a little 1B404 FE0FB3EC 598 JMP RLINTRPT1 now look for interrupts 599 * --- 600 601 ********************************************************************************** 602 * * 603 * We got an interrupt indicating path data is waiting. * 604 * We want to read from the path and send the data * 605 * wherever it is destined to go. * 606 * * 607 ********************************************************************************** 608 0001B405 609 RLPATHDATA LABEL 1B405 5C01A8D8 610 CMZ MOREPROC are we doing more processing? 1B406 FE0DB3BE 611 JNE RLSETTIM if so then ignore concurrent process 1B407 60048030 0 IMM 612 LD R0 FRREAD+XRSUSPERR pick up the incoming line 1B408 6044005F 1 IMM 613 LD R1 OKLEN-1 standard length 1B409 6085A800 2 IMM 614 LD R2 ADR IBUFFW standard input buffer 1B40A 0881A91B 615 FREQ PATHS(XREQ) read from our input path 1B40B FA09B44F 0 616 JLTZ R0 RLPATHRERR exit if no good 1B40C FA49B44F 1 617 JLTZ R1 RLPATHRERR error if line too long 618 * \ / 619 1B40D 600A2040 0 0 CBM 620 LD R0 R0/RECTYPE get type of record 1B40E 64040009 0 IMM 621 CPR R0 RTEOD end of data? 1B40F FE03B44B 622 JEQ RLCONDONE exit if that's the case 1B410 64040000 0 IMM 623 CPR R0 RTTEXT is this a text record? 1B411 FE03B416 624 JEQ RL41 jump on down if it is 1B412 64040002 0 IMM 625 CPR R0 RTBIN is it a binary record? 1B413 FE03B416 626 JEQ RL41 that's okay too 1B414 64040001 0 IMM 627 CPR R0 RTTEXTF else must be text with forms 1B415 FE0DB44F 628 JNE RLPATHRERR error if not 629 * \ / 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 94 (RDUISUB) F 15 Input subroutines 630 0001B416 631 RL41 LABEL 1B416 E4178801 0 6 BASE 632 ST R0 SP,RLTEMP remember the record type 1B417 3044005F 1 IMM 633 RSB R1 OKLEN-1 determine line length 1B418 6085A800 2 IMM 634 LD R2 ADR IBUFFW point to input line 1B419 5C01A8D7 635 CMZ CPSTATE now, what do we do with it? 1B41A FE09B430 636 JLT RLLOCOUT jump if Local mode 637 * \ / 638 1B41B 6011AC00 0 @ 639 LD R0 @IBPT get the control character 1B41C 6404004F 0 IMM 640 CPR R0 "O" for the operator? 1B41D FE03B42E 641 JEQ RLCONOUT if so then go print it out 1B41E 64040043 0 IMM 642 CPR R0 "C" is it a command for us? 1B41F FE03B43A 643 JEQ RLCONCCMND if so go process it 1B420 64040052 0 IMM 644 CPR R0 "R" for the remote system? 1B421 FE0DB44F 645 JNE RLPATHRERR if not then bitch 646 * \ / 647 1B422 EDC1A8E3 648 STW ORIGIN say this is from Conc. proc. 1B423 DC01BBA5 649 CALL SHIPCOMDT now to ship out a command 1B424 4101BBF5 650 PAR RESPERROR error address 1B425 41568002 2 CACH 651 PARV R2,CPCLASS need the class 1B426 41568003 2 CACH 652 PARV R2,CPSLOT and the slot 1B427 41568801 2 BASE 653 PARV R2,CPDATA and the data 1B428 40568001 2 CACH 654 PARVL R2,CPTIME and the extra time delay 1B429 DC41BD2D 655 CALLNP TIMER set up another timeout 0001B42A 656 RLARMINT LABEL 1B42A 60040080 0 IMM 657 LD R0 URSSINTARM let's rearm path data interrupts 1B42B 60420080 1 IMM 658 LD R1 PATHBIT the bit to set 1B42C 09040000 IMM 659 UREQ 0 do it 1B42D FE0FB3EC 660 JMP RLINTRPT1 661 * --- 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 95 (RDUISUB) F 15 Input subroutines 663 664 ********************************************************************************** 665 * * 666 * We get here either when a concurrent process is sending a * 667 * message to the operator (RLCONOUT) or we are in local mode and * 668 * the process is sending output to the operator (RLLOCOUT). * 669 * In either case we output to the operator's terminal the contents * 670 * of IBUFF (minus the destination character if present). * 671 * * 672 ********************************************************************************** 673 0001B42E 674 RLCONOUT LABEL 1B42E 10440001 1 IMM 675 SUB R1 1 get rid of first character 1B42F D00A9F30 2 CBM 676 INC R2/NXTCHAR move past it please 0001B430 677 RLLOCOUT LABEL 1B430 60040040 0 IMM 678 LD R0 FRWRITE now to print it out 1B431 18178801 0 6 BASE 679 ADD R0 SP,RLTEMP factor in the record type 1B432 DC41CCC7 680 CALLNP SAVEEVENT save the event 1B433 08840002 IMM 681 FREQ LUNSOUT+XREQ there it goes!!! 1B434 DC41CCB3 682 CALLNP LOGIT log it 683 1B435 D191AC08 @ 684 CLRT @TOFLAG did timeout also occur? 1B436 FE03B42A 685 JEQ RLARMINT if not then don't try to talk 1B437 DC41BC7E 686 CALLNP SHIPNOP keep remote system alive 1B438 DC41BD2D 687 CALLNP TIMER start our timer again 1B439 FE0FB42A 688 JMP RLARMINT then return from processing interrupt 689 * --- 690 691 * The path data is a command meant for the RDU 692 0001B43A 693 RLCONCCMND LABEL 1B43A 60040001 0 IMM 694 LD R0 1 1B43B 3831AC00 0 0 @ 695 LEA R0 @IBPT(R0) R0 -> past leading C 1B43C E401AA4C 0 696 ST R0 EVENTADDR save for log 1B43D E401A8E5 0 697 ST R0 BUFPT and set our pointer into the buffer 1B43E 6084000D 2 IMM 698 LD R2 CR get a terminator 1B43F E4B3AC00 2 1 @ 699 ST R2 @IBPT(R1) tack on the end 1B440 E481A8E7 2 700 ST R2 TERMCHAR save for posterity sake 1B441 10440001 1 IMM 701 SUB R1 1 since we lost the first char 1B442 E6578801 126 BASE 702 ST2 R1 SP,RLTEMP save these 1B443 DC41CCCD 703 CALLNP SPECSAVE log this historic event 1B444 DC41B8AC 704 CALLNP OUTCR echo the terminator 1B445 62578801 126 BASE 705 LD2 R1 SP,RLTEMP restore these 1B446 FE0FB3DB 706 JMP RLEXOK return from interrupt 707 * --- 708 709 * Error sending to concurrent session. 0001B447 710 RLSENDERR LABEL 1B447 60C5D2E2 3 IMM 711 LD R3 ADR ERM514 "Couldn't send to concurrent" 712 * \ / 713 714 * Error occurred with concurrent process. R3 -> error message. 0001B448 715 RLCONCERR LABEL 1B448 DC41B8B8 716 CALLNP OUTCRLF make room 1B449 6012C000 0 3 REG 717 LD R0 R3 R0 -> error message 1B44A DC41B88A 718 CALLNP OUT ship out complaint 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 96 (RDUISUB) F 15 Input subroutines 719 * \ / 720 721 * Concurrent process sent EOD. Clean up and leave. 0001B44B 722 RLCONDONE LABEL 1B44B EC01A8D7 723 STZ CPSTATE say we no longer have a concurrent 1B44C DC41BD20 724 CALLNP PATHCLOSE shut down the path links 1B44D DC41B8C2 725 CALLNP OUTPROMPT let the user know we are waiting for him 1B44E FE0FB3EC 726 JMP RLINTRPT1 where to return to 727 * --- 728 729 * Error reading from concurrent process. 0001B44F 730 RLPATHRERR LABEL 1B44F 60C5D159 3 IMM 731 LD R3 ADR ERM190 "Bad input from conc. proc." 1B450 FE0FB448 732 JMP RLCONCERR and get out of here 733 * --- 734 735 END of READLINE subroutines 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 97 (RDUISUB) F 15 Input subroutines 737 738 ********************************************************************************** 739 * * 740 * PACKER is called to take the string in SBUFF and * 741 * pack it into the standard PAK6 format. * 742 * Call: * 743 * SBUFF contains string to be packed * 744 * CALLNP PACKER * 745 * Returns: * 746 * R0:R1 = or R0 = 0 on error * 747 * Eats R0:R1. * 748 * * 749 ********************************************************************************** 750 751 BLOCK 752 ENTRY PACKER 753 754 BEGFRAME 00178801 6 BASE 755 PKRTMP BSS2 1 temp for R2 and R3 756 ENDFRAME 757 1B451 DD5F8003 6 STAK 758 PACKER ENTRNP PUSH 1B452 E6978801 236 BASE 759 ST2 R2 SP,PKRTMP save R2 and R3 from harm 1B453 60040100 0 IMM 760 LD R0 URPACKI request for pack-up 1B454 6045A830 1 IMM 761 LD R1 ADR SBUFF point to the buffer 1B455 09040000 IMM 762 UREQ XREQ let the system do the work 1B456 FA09B45A 0 763 JLTZ R0 PACKERR what to do if problems 764 * \ / 1B457 62148000 0123 PAIR 765 LD2 R0 PAIR R2 put result in R0 and R1 1B458 62978801 236 BASE 766 LD2 R2 SP,PKRTMP restore R2 and R3 1B459 5D1F8003 6 STAK 767 LEAVE POP 768 * --- 769 0001B45A 770 PACKERR LABEL 1B45A 60040000 0 IMM 771 LD R0 0 say problem happened 1B45B 62978801 236 BASE 772 LD2 R2 SP,PKRTMP restore R2 and R3 1B45C 5D1F8003 6 STAK 773 LEAVE POP 774 * --- 775 776 END of PACKER 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 98 (RDUISUB) F 15 Input subroutines 778 779 ********************************************************************************** 780 * * 781 * ONOFFGET is called to fetch an item from the input line which * 782 * must be an ON, YES, or Y, or an OFF, NO, or N. On return, R0=0 if a * 783 * valid symbol was found or else it contains an error code. If no * 784 * error was made, R1=0 for OFF, and R1=1 for ON. * 785 * SBUFF = symbol * 786 * CALLNP ONOFFGET * 787 * Returns R0 = 0 if valid symbol or -> error message if not * 788 * R1 = 0 for off (no, n), or 1 for on (yes, y) * 789 * Eats R0:R1. * 790 * * 791 ********************************************************************************** 792 793 BLOCK 794 ENTRY ONOFFGET 795 796 BEGFRAME 797 ENDFRAME 798 1B45D DD5F8001 6 STAK 799 ONOFFGET ENTRNP PUSH 1B45E 6001A830 0 800 LD R0 SBUFFW get the symbol back 1B45F 60440005 1 IMM 801 LD R1 OOTLEN-1 get table length 0001B460 802 OO10 LABEL 1B460 6423AC2E 0 1 803 CPR R0 ONOFFTAB(R1) see if this entry matches 1B461 FE03B465 804 JEQ OO20 jump if a good one 1B462 FA67B460 1 805 JDR R1 OO10 try another if not 806 * \ / 807 1B463 6005CF5E 0 IMM 808 LD R0 ADR ERM115 "ON or OFF expected" 0001B464 809 OOEXIT LABEL 1B464 5D1F8001 6 STAK 810 LEAVE POP 811 * --- 812 0001B465 813 OO20 LABEL 1B465 60040000 0 IMM 814 LD R0 0 say we have no error 1B466 64440003 1 IMM 815 CPR R1 ONSYMS check for type of return 1B467 60440001 1 IMM 816 LD R1 1 assume it is on or yes 1B468 FE07B464 817 JGE OOEXIT if ON, then we're all set 1B469 60440000 1 IMM 818 LD R1 0 say we want to turn off 1B46A FE0FB464 819 JMP OOEXIT then return 820 * --- 821 822 END of ONOFFGET subroutine 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 99 (RDUISUB) F 15 Input subroutines 824 825 ********************************************************************************** 826 * * 827 * OUTIN is both an input and an output routine. It adds a * 828 * blank onto the end of the output line then writes it to the * 829 * terminal and session log. A response is then read, and the * 830 * terminator is checked against the valid terminators for the * 831 * command being processed. * 832 * Call: * 833 * COM -> command element * 834 * OBP = number of chars to output * 835 * OBUFF contains output * 836 * CALLNP OUTIN * 837 * JNEZ R0 error message> * 838 * R2 = FI code * 839 * SBUFF = data * 840 * Eats R0:R3. * 841 * * 842 * Alternate entries: * 843 * OUTINM allows multiple items on the input line. * 844 * * 845 ********************************************************************************** 846 847 BLOCK 848 ENTRY OUTIN 849 ENTRY OUTINM 850 851 BEGFRAME 00178801 6 BASE 852 OIFLAG BSS 1 flag for single/multiple data 00178802 6 BASE 853 OITEMP BSS 1 temp for FI type code 854 ENDFRAME 855 1B46B DD5F8003 6 STAK 856 OUTINM ENTRNP PUSH 1B46C EDD78801 6 BASE 857 STW SP,OIFLAG remember we can take it 1B46D FE0FB472 858 JMP OI00 then merge in with normal type 859 * --- 860 1B46E DD5F8003 6 STAK 861 OUTIN ENTRNP PUSH 1B46F 5C094033 5 ZBM 862 CMZ COM,COMTERM does it allow any input? 1B470 FE03B49D 863 JEQ OI60 jump if not 1B471 EC178801 6 BASE 864 STZ SP,OIFLAG say we want single item only 0001B472 865 OI00 LABEL 1B472 60040020 0 IMM 866 LD R0 BLANK finish up output line 1B473 E437AC01 0 3 @ 867 ST R0 @OBPT(OBP) so it looks nice 1B474 18C40001 3 IMM 868 ADD OBP 1 advance pointer 869 * \ / 870 1B475 60040042 0 IMM 871 LD R0 FRWRITEB now to list it out 1B476 6052C000 1 3 REG 872 LD R1 OBP get line length 1B477 6085A818 2 IMM 873 LD R2 ADR OBUFF point to buffer 1B478 DC41CCC7 874 CALLNP SAVEEVENT Save the event 1B479 08840002 IMM 875 FREQ LUNSOUT+XREQ that should do it 1B47A DC41CCB3 876 CALLNP LOGIT Log the thing.... 877 TCDISP 1B47B 6004011B 0 IMM 877 LD R0 FRTSETTCS set terminating characters 1B47C 6045AC65 1 IMM 877 LD R1 ADR(TCTABD) display input table 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 100 (RDUISUB) F 15 Input subroutines 1B47D E441A8EA 1 877 ST R1 TCGROUP remember group for restoration 1B47E 088400C9 IMM 877 FREQ LUNAIN+XREQ for inputting after display 1B47F DC41B3B6 878 CALLNP READLINE get user response 879 TCNORM 1B480 6004011B 0 IMM 879 LD R0 FRTSETTCS set terminating characters 1B481 6045AC5D 1 IMM 879 LD R1 ADR(TCTABN) normal table 1B482 E441A8EA 1 879 ST R1 TCGROUP remember the group we used 1B483 088400C9 IMM 879 FREQ LUNAIN+XREQ for command level inputs 880 881 * We have the line, now get any response. 1B484 DC41B349 882 CALLNP FETCHDATA get possible data item 1B485 F2B1B488 2 883 JBF R2/TCOL OI20 jump if not data flag 1B486 DC41B3A9 884 CALLNP GETCHARX skip past the colon 1B487 DC41B349 885 CALLNP FETCHDATA go back for the value 886 * \ / 887 0001B488 888 OI20 LABEL 1B488 E4978802 2 6 BASE 889 ST R2 SP,OITEMP save FI code a moment 1B489 6001A8E7 0 890 LD R0 TERMCHAR get input line terminator 1B48A 6404000A 0 IMM 891 CPR R0 LF is it a line feed? 1B48B FE0DB48E 892 JNE OI30 if not then ship CR,LF 1B48C DC41B8AC 893 CALLNP OUTCR else just a CR 1B48D FE0FB493 894 JMP OI40 then merge back in 895 * --- 896 0001B48E 897 OI30 LABEL 1B48E 6404000D 0 IMM 898 CPR R0 CR is it a CR? 1B48F FE0DB492 899 JNE OIBOTH if not send both CR and LF 1B490 DC41B8B2 900 CALLNP OUTLF send the line feed 1B491 FE0FB493 901 JMP OI40 continue on 902 * --- 903 0001B492 904 OIBOTH LABEL 1B492 DC41B8B8 905 CALLNP OUTCRLF make paper nice looking 0001B493 906 OI40 LABEL 1B493 60978802 2 6 BASE 907 LD R2 SP,OITEMP get FI codes back 1B494 60094033 0 5 ZBM 908 LD R0 COM,COMTERM get valid terminator code 1B495 78A1AC7D 2 0 909 AND R2 TCCODES(R0) compare with FI result 1B496 5C178801 6 BASE 910 CMZ SP,OIFLAG single or multiple items? 1B497 FE03B499 911 JEQ OI50 jump if single only 1B498 F6ADB49C 2 912 JBT R2/TNUM OIEXIT ok to go if got data 0001B499 913 OI50 LABEL 1B499 5C0AB080 2 CBM 914 CMZ R2/TERMS check terminator bits 1B49A FE03B4A0 915 JEQ OI90 error if not valid 0001B49B 916 OIOKEXIT LABEL 1B49B 60040000 0 IMM 917 LD R0 0 everything ok indicator 0001B49C 918 OIEXIT LABEL 1B49C 5D1F8003 6 STAK 919 LEAVE POP 920 * --- 921 0001B49D 922 OI60 LABEL 1B49D DC41B886 923 CALLNP OUTO ship the thing out 1B49E 60840001 2 IMM 924 LD R2 1*TEOL get hard terminator 1B49F FE0FB49B 925 JMP OIOKEXIT then return to caller 926 * --- 927 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 101 (RDUISUB) F 15 Input subroutines 0001B4A0 928 OI90 LABEL 1B4A0 6005CEFC 0 IMM 929 LD R0 ADR ERM106 "Bad terminator" 1B4A1 FE0FB49C 930 JMP OIEXIT return error to caller 931 * --- 932 933 END of OUTIN 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 102 (RDUISUB) F 15 Input subroutines 935 936 ********************************************************************************** 937 * * 938 * ADRGET is called to fetch a memory address or a symbol * 939 * (which must be type "memory address"). It will do all * 940 * necessary table search calls to obtain the address of the * 941 * symbol, and will return either an error code or the actual * 942 * memory address. * 943 * Call: * 944 * BUFPT -> input buffer * 945 * CALLNP ADRGET * 946 * JNEZ R0 error (R0 -> error message) * 947 * R2 = FI code * 948 * ADDRESS and VALUE contain actual memory address * 949 * Eats R0:R3. * 950 * * 951 ********************************************************************************** 952 953 BLOCK 954 ENTRY ADRGET 955 956 BEGFRAME 957 ENDFRAME 958 1B4A2 DD5F8001 6 STAK 959 ADRGET ENTRNP PUSH 1B4A3 EDC1A92C 960 STW LOCFLAG say to list labels 1B4A4 DC41B985 961 CALLNP SYMGET pick up first symbol or value 1B4A5 FA0DB4B9 0 962 JNEZ R0 AG50 jump if not a symbol 963 * 964 * If we are using the new format then depart and do our own checking. 965 * 1B4A6 5C01AAC0 966 CMZ USINGNEW new format ?? 1B4A7 FE0DB4B3 967 JNE AG02 yep, go handle it 968 * \ / 969 * 970 * Using the old format, check for a memory address only. 971 * 1B4A8 60090C40 0 4 ZBM 972 LD R0 SYM,SYMTYPE we want a memory address 1B4A9 64040005 0 IMM 973 CPR R0 SYMTYPEGD see what type it really is 1B4AA FE0DB4C9 974 JNE AG92 error if not what we want 1B4AB 60570801 1 4 BASE 975 LD R1 SYM,SYMVALUE get the symbol value 1B4AC 5C0A5450 1 CBM 976 CMZ R1/MODEBITS check for memory address 1B4AD FE0DB4C9 977 JNE AG92 jump if not what we want here 978 * \ / 979 * 980 * Yes, we have located a valid symbol. 981 * 982 * \ / 0001B4AE 983 AG04 LABEL 1B4AE D141A92C 984 STMW LOCFLAG new label - don't list it 0001B4AF 985 AG10 LABEL 1B4AF E441A91F 1 986 ST R1 ADDRESS place in the address word 1B4B0 E441A8ED 1 987 ST R1 VALUE also save in the VALUE word 1B4B1 60040000 0 IMM 988 LD R0 0 return the all-clear 0001B4B2 989 AGEXIT LABEL 1B4B2 5D1F8001 6 STAK 990 LEAVE POP 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 103 (RDUISUB) F 15 Input subroutines 991 * --- 992 * 993 * Check to see if the symbol we found is a memory address. 994 * 0001B4B3 995 AG02 LABEL 1B4B3 60090040 0 4 ZBM 996 LD R0 SYM,NEWSYMTYPE get the type of the symbol 1B4B4 64040001 0 IMM 997 CPR R0 NEWMEM is it a memory address ?? 1B4B5 FE0DB4C9 998 JNE AG92 no, bail out now 1B4B6 60570802 1 4 BASE 999 LD R1 SYM,NEWSYMVALU get the value (memory address) 1B4B7 7845FFFF 1 IMM 1000 AND R1 MAXADR hardware pointer becomes a whole word 1B4B8 FE0FB4AE 1001 JMP AG04 return to main flow with value in R1 1002 * --- 1003 0001B4B9 1004 AG50 LABEL (number) 1B4B9 FA83B4B2 2 1005 JEQZ R2 AGEXIT bail out if big error 1B4BA 6001A8E6 0 1006 LD R0 LBUFPT see if may be a number 1B4BB E401A8E5 0 1007 ST R0 BUFPT backup for another look 1B4BC DC41B33F 1008 CALLNP FETCHNP and try for a hex number 1B4BD F6BDB4C1 2 1009 JBT R2/TDOT AG60 point? use old address 1B4BE F2ADB4CC 2 1010 JBF R2/TNUM AG90 jump if not a number 1B4BF 6041A830 1 1011 LD R1 SBUFFW get the value 1B4C0 FE0FB4AF 1012 JMP AG10 1013 * --- 1014 0001B4C1 1015 AG60 LABEL 1B4C1 6041A8E5 1 1016 LD R1 BUFPT get pointer into buffer 1B4C2 D00A5F30 1 CBM 1017 INC R1/NXTCHAR since FETCHNP leaves us pointing at dot 1B4C3 E441A8E5 1 1018 ST R1 BUFPT we want to point to what is next 1B4C4 6041A91F 1 1019 LD R1 ADDRESS use last address 1B4C5 FA6FB4AF 1 1020 JNEMW R1 AG10 only bad address is 0FFFFFFFF 1B4C6 6005D18B 0 IMM 1021 LD R0 ADR ERM219 "No presently selected address" 1B4C7 60840000 2 IMM 1022 LD R2 1*TERR make sure they realize the error 1B4C8 FE0FB4B2 1023 JMP AGEXIT 1024 * --- 1025 0001B4C9 1026 AG92 LABEL 1B4C9 6005D327 0 IMM 1027 LD R0 ADR ERM701 "Symbol not a memory address" 1B4CA 60840000 2 IMM 1028 LD R2 1*TERR avoid confusion above 1B4CB FE0FB4B2 1029 JMP AGEXIT 1030 * --- 1031 0001B4CC 1032 AG90 LABEL 1B4CC 6005D334 0 IMM 1033 LD R0 ADR ERM703 "Expecting symbol or memory addr" 1B4CD FE0FB4B2 1034 JMP AGEXIT 1035 * --- 1036 1037 END of ADRGET subroutine 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 104 (RDUISUB) F 15 Input subroutines 1039 1040 ********************************************************************************** 1041 * * 1042 * PAK6IN takes the first 6 chars pointed to by BUFPT, * 1043 * converts them to PACK 6, and places them in SBUFFW. * 1044 * Call: * 1045 * BUFPT -> input buffer * 1046 * CALLNP PAK6IN * 1047 * R0 and SBUFFW contain result * 1048 * Eats R0:R2 * 1049 * * 1050 ********************************************************************************** 1051 1052 BLOCK 1053 ENTRY PAK6IN 1054 1055 BEGFRAME 1056 ENDFRAME 1057 1B4CE DD5F8001 6 STAK 1058 PAK6IN ENTRNP PUSH 1B4CF 6001A8E5 0 1059 LD R0 BUFPT pointer to input string 1B4D0 6085A830 2 IMM 1060 LD R2 ADR SBUFF where the packer can find them 1B4D1 60440006 1 IMM 1061 LD R1 6 this is PACK 6 after all 1B4D2 FE400000 1062 CMOVE put the chars away 1B4D3 DC41B451 1063 CALLNP PACKER to make them PACK 6 1B4D4 E401A830 0 1064 ST R0 SBUFFW this is where we said we would put it 1B4D5 5D1F8001 6 STAK 1065 LEAVE POP 1066 * --- 1067 1068 END of PAK6IN 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 105 (RDUISUB) F 15 Input subroutines 1070 1071 BLOCK TIMEIN routines 1072 1073 ENTRY TIMEIN 1074 ENTRY TIMEINS 1075 1076 ********************************************************************************** 1077 * * 1078 * TIMEIN and TIMEINS read an input string consisting of the * 1079 * date and time and pack it into either a 44 bit system time or * 1080 * a 32 bit system time. * 1081 * Call: * 1082 * BUFPT -> input buffer * 1083 * CALLNP TIMEIN(S) * 1084 * Returns R1 (,R2) contains the system format time. * 1085 * SBUFFW contains first word of time. * 1086 * Eats R0:R3. * 1087 * * 1088 ********************************************************************************** 1089 1090 BLOCK 1091 ENTRY TIMEIN 1092 ENTRY TIMEINS 1093 1094 BEGFRAME 00178801 6 BASE 1095 TMINR4R5 BSS 2 to save the registers 00178803 6 BASE 1096 TIME BSS 1 msecs in the day 00178804 6 BASE 1097 HOURS BSS 1 hour of the day 00178805 6 BASE 1098 DATE BSS 1 normal sort of day of the month 00178806 6 BASE 1099 MONTH BSS 1 Jan = 1 00178807 6 BASE 1100 YEAR BSS 1 between 1858 and 2416 00178808 6 BASE 1101 WEEKDAY BSS 1 weekday 00178809 6 BASE 1102 SINGLE BSS 1 flag for single word time 1103 ENDFRAME 1104 1105 1B4D6 0000EA60 1106 MSECSM VFD 60*1000 msecs per minute 1B4D7 0036EE80 1107 MSHOUR VFD 60*60*1000 msecs per hour 1B4D8 0000001F 1108 MAXDATE VFD 31 largest possible date 1B4D9 A009A8E8 1109 MIDDATA PTR TIMETEMP/BITS 20:51 pointer to single word time 1110 00001F30 BYTE 1111 FLDCHARS EQU BITS 15:1 character address field 00000060 BYTE 1112 FLAGFLD EQU BITS 0:5 field for flag bits 00000010 BYTE 1113 FNDMNTH EQU BIT 0 00000210 BYTE 1114 FNDPM EQU BIT 1 00000410 BYTE 1115 DELBIT EQU BIT 2 00000610 BYTE 1116 FNDAT EQU BIT 3 00000810 BYTE 1117 FNDYR EQU BIT 4 00000A10 BYTE 1118 FNDTM EQU BIT 5 1119 1B4DA DD5F800A 6 STAK 1120 TIMEINS ENTRNP PUSH 1B4DB EDD78809 6 BASE 1121 STW SP,SINGLE say we are in single word time format 1B4DC FE0FB4DF 1122 JMP PASTTIME 1123 * --- 1124 1B4DD DD5F800A 6 STAK 1125 TIMEIN ENTRNP PUSH 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 106 (RDUISUB) F 15 Input subroutines 1B4DE EC178809 6 BASE 1126 STZ SP,SINGLE 0001B4DF 1127 PASTTIME LABEL 1B4DF E7178801 456 BASE 1128 ST2 R4 SP,TMINR4R5 save these registers 1B4E0 61538000 5 6 REG 1129 LD R5 SP we need to save SP 1130 * unpack the raw time into time, date, month, year, and weekday 1B4E1 DC01B750 1131 CALL UNPACKDATE breaks time into time/date/month/year 1B4E2 4341A8E8 1132 PARV2 TIMETEMP contains raw time 1B4E3 41174803 5 BASE 1133 PAR R5,TIME ms since midnight gets put here 1B4E4 41174805 5 BASE 1134 PAR R5,DATE date in month gets put here 1B4E5 41174806 5 BASE 1135 PAR R5,MONTH month goes here (Jan = 1) 1B4E6 41174807 5 BASE 1136 PAR R5,YEAR year goes here 1B4E7 40174808 5 BASE 1137 PARL R5,WEEKDAY day of week goes here 1138 1B4E8 EC0BC060 7 CBM 1139 STZ R7/FLAGFLD set flag bits to 0 1140 1B4E9 6101A8E5 4 1141 LD R4 BUFPT 1B4EA D04B1F30 4 CBM 1142 DEC R4/NXTCHAR point to position before buffer 0001B4EB 1143 NEXTITEM LABEL 1B4EB EC0BC410 7 CBM 1144 STZ R7/DELBIT no delimiters found yet 0001B4EC 1145 NEXTLOOP LABEL 1B4EC DC41B5E0 1146 CALLNP GRABCHAR 0001B4ED 1147 HAVECHAR LABEL 1B4ED 5CA3B4EE 1 1148 LDPC NIJT(R1) type determines action 1149 * --- 1150 0001B4EE 1151 NIJT LABEL 1B4EE 0001B50C 1152 VFD ADR GETNUM 0 - number 1B4EF 0001B558 1153 VFD ADR ALPHA 1 - alpha (A-F) 1B4F0 0001B558 1154 VFD ADR ALPHA 2 - alpha (the rest) 1B4F1 0001B500 1155 VFD ADR DELIM 3 - delimiter (file char) 1B4F2 0001B500 1156 VFD ADR DELIM 4 - delimiter (comma) 1B4F3 0001B500 1157 VFD ADR DELIM 5 - delimiter (colon) 1B4F4 0001B5CD 1158 VFD ADR ENDSTRNG 6 - end of line 1B4F5 0001B4EC 1159 VFD ADR NEXTLOOP 7 - blank 1B4F6 0001B506 1160 VFD ADR BADSTUF 8 - semi-colon 1B4F7 0001B506 1161 VFD ADR BADSTUF 9 - period 1B4F8 0001B5CD 1162 VFD ADR ENDSTRNG 10 -line feed 1B4F9 0001B506 1163 VFD ADR BADSTUF 11 - up-arrow 1B4FA 0001B506 1164 VFD ADR BADSTUF 12 - greater than 1B4FB 0001B506 1165 VFD ADR BADSTUF 13 - less than 1B4FC 0001B506 1166 VFD ADR BADSTUF 14 - at sign 1B4FD 0001B506 1167 VFD ADR BADSTUF 15 - single quote 1B4FE 0001B506 1168 VFD ADR BADSTUF 16 - double quote 1B4FF 0001B509 1169 VFD ADR OPERATR 17 - error (but might be "-") 1170 1171 1172 ********************************************************************************** 1173 * * 1174 * DELIM is jumped to when a delimiter is found. It checks * 1175 * if another delimiter has been found since the last input * 1176 * item. If so then error, else set delimiter flag and get * 1177 * the next item. * 1178 * * 1179 ********************************************************************************** 1180 0001B500 1181 DELIM LABEL 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 107 (RDUISUB) F 15 Input subroutines 1B500 F7C5B503 7 1182 JBT R7/DELBIT BADDELIM too many delimiters 1B501 EDCBC410 7 CBM 1183 STW R7/DELBIT delimiter has been found 1B502 FE0FB4EC 1184 JMP NEXTLOOP 1185 * --- 1186 0001B503 1187 BADDELIM LABEL 1B503 6005D343 0 IMM 1188 LD R0 ADR ERM800 1B504 60840000 2 IMM 1189 LD R2 0 save bad things happened 1B505 FE0FB5DC 1190 JMP LVTIMIN 1191 * --- 1192 0001B506 1193 BADSTUF LABEL illegal characters in input 1B506 6005D34D 0 IMM 1194 LD R0 ADR ERM801 1B507 60840000 2 IMM 1195 LD R2 0 save bad things happened 1B508 FE0FB5DC 1196 JMP LVTIMIN leave this subroutine 1197 * --- 1198 1199 ********************************************************************************** 1200 * * 1201 * OPERATR is jumped to when an operator is found. A check * 1202 * is made to see if the operator is a "-", the only legal one. * 1203 * * 1204 ********************************************************************************** 1205 0001B509 1206 OPERATR LABEL 1B509 6404002D 0 IMM 1207 CPR R0 "-" is it a minus 1B50A FE03B500 1208 JEQ DELIM then treat it as a delimiter 1B50B FE0FB506 1209 JMP BADSTUF not a good char to find 1210 * --- 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 108 (RDUISUB) F 15 Input subroutines 1212 1213 ********************************************************************************** 1214 * * 1215 * GETNUM is jumped to when a number has been found in the input. * 1216 * It calls FETCHITEM to get the number then determines if the number * 1217 * is a time, year, date, or error. * 1218 * * 1219 ********************************************************************************** 1220 0001B50C 1221 GETNUM LABEL 1B50C E501A8E5 4 1222 ST R4 BUFPT store buffer pointer 1B50D DC41B342 1223 CALLNP FETCHDN get number from input 1B50E 60920000 2 0 REG 1224 LD R2 R0 need value here 1B50F 60124000 0 1 REG 1225 LD R0 R1 need terminating char in R0 1B510 6404003A 0 IMM 1226 CPR R0 ":" is the number a time? 1B511 FE03B536 1227 JEQ ATIME 1B512 64840032 2 IMM 1228 CPR R2 50 is the number a year? 1B513 FE07B524 1229 JGE AYEAR must be 1230 * \ / 1231 1232 * the number must be a date 1B514 F7C7B521 7 1233 JBT R7/FNDAT EXDATE date has already been found 1B515 6481B4D8 2 1234 CPR R2 MAXDATE is it within bounds? 1B516 FE05B51E 1235 JGT BADDATE nope 1B517 FA8BB51E 2 1236 JLEZ R2 BADDATE must be positive number 1B518 EDCBC610 7 CBM 1237 STW R7/FNDAT say date is found 1B519 E4978805 2 6 BASE 1238 ST R2 SP,DATE 1239 * \ / 1240 0001B51A 1241 FROMNUM LABEL 1B51A 6101A8E5 4 1242 LD R4 BUFPT need to keep current 1B51B 6071B2D7 1 0 @ 1243 LD R1 @CODES(R0) get the code for term char 1B51C EC0BC410 7 CBM 1244 STZ R7/DELBIT no delimiters found yet 1B51D FE0FB4ED 1245 JMP HAVECHAR 1246 * --- 1247 0001B51E 1248 BADDATE LABEL 1B51E 60840000 2 IMM 1249 LD R2 0 save bad things happened 1B51F 6005D353 0 IMM 1250 LD R0 ADR ERM802 1B520 FE0FB5DC 1251 JMP LVTIMIN leave this subroutine 1252 * --- 1253 0001B521 1254 EXDATE LABEL 1B521 60840000 2 IMM 1255 LD R2 0 say bad things happened 1B522 6005D359 0 IMM 1256 LD R0 ADR ERM803 1B523 FE0FB5DC 1257 JMP LVTIMIN leave this subroutine 1258 * --- 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 109 (RDUISUB) F 15 Input subroutines 1260 1261 ********************************************************************************** 1262 * * 1263 * AYEAR is jumped to when GETNUM has determined that the * 1264 * number is in the possible range of a year. AYEAR does more * 1265 * bound checks on this number and converts the number to a * 1266 * 20th century year if necessary. * 1267 * * 1268 ********************************************************************************** 1269 0001B524 1270 AYEAR LABEL 1B524 F7C9B533 7 1271 JBT R7/FNDYR EXYEAR year has already been found 1B525 68840064 2 IMM 1272 UCPR R2 100 are the first digits there? 1B526 FE07B529 1273 JGE OVER100 1B527 1884076C 2 IMM 1274 ADD R2 1900 add in the missing digits 1B528 FE0FB52D 1275 JMP STOREY 1276 * --- 1277 0001B529 1278 OVER100 LABEL 1B529 64840742 2 IMM 1279 CPR R2 1858 is year in legal range? 1B52A FE09B530 1280 JLT BADYEAR too small 1B52B 64840970 2 IMM 1281 CPR R2 2416 is year in legal range? 1B52C FE05B530 1282 JGT BADYEAR too big 0001B52D 1283 STOREY LABEL 1B52D EDCBC810 7 CBM 1284 STW R7/FNDYR say year has been found 1B52E E4978807 2 6 BASE 1285 ST R2 SP,YEAR save the year 1B52F FE0FB51A 1286 JMP FROMNUM 1287 * --- 1288 0001B530 1289 BADYEAR LABEL 1B530 60840000 2 IMM 1290 LD R2 0 say bad things happened 1B531 6005D35E 0 IMM 1291 LD R0 ADR ERM804 1B532 FE0FB5DC 1292 JMP LVTIMIN leave this subroutine 1293 * --- 1294 0001B533 1295 EXYEAR LABEL 1B533 60840000 2 IMM 1296 LD R2 0 say bad things happened 1B534 6005D364 0 IMM 1297 LD R0 ADR ERM805 go to error handling routine 1B535 FE0FB5DC 1298 JMP LVTIMIN leave this subroutine 1299 * --- 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 110 (RDUISUB) F 15 Input subroutines 1301 1302 ********************************************************************************** 1303 * * 1304 * ATIME is jumped to when GETNUM has determined that * 1305 * the number is a time. ATIME then gets the hours, minutes, * 1306 * and if there, seconds, does range checks on all of them, * 1307 * converts them to msecs, and adds them into TIME. * 1308 * The hour is saved for use by PMFND. * 1309 * * 1310 ********************************************************************************** 1311 0001B536 1312 ATIME LABEL 1B536 F7CBB555 7 1313 JBT R7/FNDTM EXTIME too many times 1B537 68840018 2 IMM 1314 UCPR R2 24 is hour within range? 1B538 FE07B552 1315 JGE BADTIME 1B539 E4978804 2 6 BASE 1316 ST R2 SP,HOURS save hour 1B53A 1C81B4D7 2 1317 MUL R2 MSHOUR convert to msecs 1B53B E4978803 2 6 BASE 1318 ST R2 SP,TIME keep the hour 1319 * \ / 1B53C 6001A8E5 0 1320 LD R0 BUFPT 1B53D D00A1F30 0 CBM 1321 INC R0/NXTCHAR skip over the terminator 1B53E E401A8E5 0 1322 ST R0 BUFPT save it 1B53F DC41B342 1323 CALLNP FETCHDN get the minutes 1B540 6804003C 0 IMM 1324 UCPR R0 60 are they within range? 1B541 FE07B552 1325 JGE BADTIME nope 1B542 1C01B4D6 0 1326 MUL R0 MSECSM convert minutes to msecs 1B543 98178803 0 6 BASE 1327 ADDM R0 SP,TIME keep them 1B544 EDCBCA10 7 CBM 1328 STW R7/FNDTM say time is found 1B545 60124000 0 1 REG 1329 LD R0 R1 need term char here 1B546 6404003A 0 IMM 1330 CPR R0 ":" are there seconds still? 1B547 FE0DB51A 1331 JNE FROMNUM don't need to get seconds 1332 * \ / 1333 1B548 6001A8E5 0 1334 LD R0 BUFPT 1B549 D00A1F30 0 CBM 1335 INC R0/NXTCHAR skip over the terminator 1B54A E401A8E5 0 1336 ST R0 BUFPT save it 1B54B DC41B342 1337 CALLNP FETCHDN get the seconds 1B54C 6804003C 0 IMM 1338 UCPR R0 60 are they within range? 1B54D FE07B552 1339 JGE BADTIME nope 1B54E 1C01AC23 0 1340 MUL R0 MSECSS convert to msecs 1B54F 98178803 0 6 BASE 1341 ADDM R0 SP,TIME this is the time 1B550 60124000 0 1 REG 1342 LD R0 R1 need term char here 1B551 FE0FB51A 1343 JMP FROMNUM continue onward 1344 * --- 1345 0001B552 1346 BADTIME LABEL 1B552 6005D369 0 IMM 1347 LD R0 ADR ERM806 go to error handling routine 1B553 60840000 2 IMM 1348 LD R2 0 save bad things happened 1B554 FE0FB5DC 1349 JMP LVTIMIN leave this subroutine 1350 * --- 1351 0001B555 1352 EXTIME LABEL 1B555 6005D36E 0 IMM 1353 LD R0 ADR ERM807 go to error handling routine 1B556 60840000 2 IMM 1354 LD R2 0 save bad things happened 1B557 FE0FB5DC 1355 JMP LVTIMIN leave this subroutine 1356 * --- 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 111 (RDUISUB) F 15 Input subroutines 1358 1359 ********************************************************************************** 1360 * * 1361 * ALPHA is jumped to when an alphabetic character has been found. * 1362 * It checks if there are alpha strings that have not already been * 1363 * found. If so then an error has occurred, else proceed to MNTNAME. * 1364 * * 1365 * MNTNAME picks a character at a time off the input string, * 1366 * packs it in R2, then compares R2 against legal strings in MONTHTAB. * 1367 * If a match is found then jump to MNTHFND, else pack the next * 1368 * character into R2 and check the table again. This proceeds until * 1369 * a match is found or something other than an alpha char or period * 1370 * is found in the input string. * 1371 * * 1372 * MONTHTAB contains the shortest unambiguous abbreviation * 1373 * of the 12 month names and A.M., P.M. along with a few other * 1374 * possible month name abbreviations. * 1375 * * 1376 ********************************************************************************** 1377 0001B558 1378 ALPHA LABEL 1B558 F3C1B55D 7 1379 JBF R7/FNDMNTH MNTNAME month has not been found 1B559 F3C3B55D 7 1380 JBF R7/FNDPM MNTNAME AM or PM has not been found yet 1B55A 6005D373 0 IMM 1381 LD R0 ADR ERM808 1B55B 60840000 2 IMM 1382 LD R2 0 save bad things happened 1B55C FE0FB5DC 1383 JMP LVTIMIN leave this subroutine 1384 * --- 1385 0001B55D 1386 MNTNAME LABEL 1B55D 60840000 2 IMM 1387 LD R2 0 zero out R2 0001B55E 1388 SRCHLOOP LABEL 1B55E 7C920000 2 0 REG 1389 IOR R2 R0 that is where char is 1B55F 60C40013 3 IMM 1390 LD R3 MNTHCNT-1 number of abbr to compare 1391 0001B560 1392 SRCHTAB LABEL 1B560 64A7B58E 2 3 1393 CPR R2 MONTHTAB(R3) do we have a legal abbr.? 1B561 FE03B56C 1394 JEQ MNTHFND yes 1B562 FAE7B560 3 1395 JDR R3 SRCHTAB try again 1396 * \ / 1397 1398 * abbr was not found, get another char and try again 1B563 DC41B5E0 1399 CALLNP GRABCHAR get next char 1B564 64440001 1 IMM 1400 CPR R1 1 see if alpha 1B565 FE03B56A 1401 JEQ GOTCHAR 1B566 64440002 1 IMM 1402 CPR R1 2 see if alpha 1B567 FE03B56A 1403 JEQ GOTCHAR 1B568 6404002E 0 IMM 1404 CPR R0 DOT see if period 1B569 FE0DB588 1405 JNE BADMONTH 0001B56A 1406 GOTCHAR LABEL 1B56A 608A9000 2 2 CBM 1407 LD R2 R2/BITS 8:7 shift word one char to left 1B56B FE0FB55E 1408 JMP SRCHLOOP try again 1409 * --- 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 112 (RDUISUB) F 15 Input subroutines 1411 1412 ********************************************************************************** 1413 * * 1414 * MNTHFND is jumped to when MNTNAME has found a match for the * 1415 * alpha string in the input. R3 contains the position in the table * 1416 * this match was found at and is then used for an index into MNTHNUM * 1417 * to find the month number or A.M./P.M. code. * 1418 * * 1419 ********************************************************************************** 1420 0001B56C 1421 MNTHFND LABEL 1B56C 6027B5A2 0 3 1422 LD R0 MNTHNUM(R3) get month number from table 1B56D 6404000D 0 IMM 1423 CPR R0 13 is string a month? 1B56E FE03B5B6 1424 JEQ PMFND no, must pm 1B56F FE05B5BF 1425 JGT AMFND must be am 1B570 F7C1B58B 7 1426 JBT R7/FNDMNTH EXMNTH oops, already have a month 1B571 EDCBC010 7 CBM 1427 STW R7/FNDMNTH say month has been found 1B572 E4178806 0 6 BASE 1428 ST R0 SP,MONTH save it 0001B573 1429 SKIPSTUF LABEL 1B573 DC41B5E0 1430 CALLNP GRABCHAR 1B574 EC0BC410 7 CBM 1431 STZ R7/DELBIT say no delimiter found yet 1B575 5CA3B576 1 1432 LDPC SSJT(R1) type determines action 1433 * --- 1434 0001B576 1435 SSJT LABEL 1B576 0001B50C 1436 VFD ADR GETNUM 0 - number 1B577 0001B573 1437 VFD ADR SKIPSTUF 1 - alpha (A-F) 1B578 0001B573 1438 VFD ADR SKIPSTUF 2 - alpha (the rest) 1B579 0001B500 1439 VFD ADR DELIM 3 - delimiter (file char) 1B57A 0001B500 1440 VFD ADR DELIM 4 - delimiter (comma) 1B57B 0001B500 1441 VFD ADR DELIM 5 - delimiter (colon) 1B57C 0001B5CD 1442 VFD ADR ENDSTRNG 6 - end of line 1B57D 0001B4EC 1443 VFD ADR NEXTLOOP 7 - blank 1B57E 0001B506 1444 VFD ADR BADSTUF 8 - semi-colon 1B57F 0001B573 1445 VFD ADR SKIPSTUF 9 - period 1B580 0001B5CD 1446 VFD ADR ENDSTRNG 10 -line feed 1B581 0001B506 1447 VFD ADR BADSTUF 11 - up-arrow 1B582 0001B506 1448 VFD ADR BADSTUF 12 - greater than 1B583 0001B506 1449 VFD ADR BADSTUF 13 - less than 1B584 0001B506 1450 VFD ADR BADSTUF 14 - at sign 1B585 0001B506 1451 VFD ADR BADSTUF 15 - single quote 1B586 0001B506 1452 VFD ADR BADSTUF 16 - double quote 1B587 0001B509 1453 VFD ADR OPERATR 17 - error (but might be "-") 1454 0001B588 1455 BADMONTH LABEL 1B588 6005D37B 0 IMM 1456 LD R0 ADR ERM809 go to error handling routine 1B589 60840000 2 IMM 1457 LD R2 0 save bad things happened 1B58A FE0FB5DC 1458 JMP LVTIMIN leave this subroutine 1459 * --- 1460 0001B58B 1461 EXMNTH LABEL 1B58B 6005D37F 0 IMM 1462 LD R0 ADR ERM810 go to error handling routine 1B58C 60840000 2 IMM 1463 LD R2 0 save bad things happened 1B58D FE0FB5DC 1464 JMP LVTIMIN leave this subroutine 1465 * --- 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 113 (RDUISUB) F 15 Input subroutines 1467 0001B58E 1468 MONTHTAB LABEL 1B58E 00000050 1469 VFD "P" P.M. 1B58F 0000412E 1470 VFD "A." A.M. 1B590 0000414D 1471 VFD "AM" A.M. 1B591 00004A41 1472 VFD "JA" January 1B592 00000046 1473 VFD "F" February 1B593 00004D52 1474 VFD "MR" March 1B594 004D4152 1475 VFD "MAR" " 1B595 00004150 1476 VFD "AP" April 1B596 00004D59 1477 VFD "MY" May 1B597 004D4159 1478 VFD "MAY" " 1B598 00004A4E 1479 VFD "JN" June 1B599 004A554E 1480 VFD "JUN" " 1B59A 00004A4C 1481 VFD "JL" July 1B59B 004A554C 1482 VFD "JUL" " 1B59C 00004147 1483 VFD "AG" August 1B59D 00004155 1484 VFD "AU" " 1B59E 00000053 1485 VFD "S" September 1B59F 0000004F 1486 VFD "O" October 1B5A0 0000004E 1487 VFD "N" November 1B5A1 00000044 1488 VFD "D" December 00000014 ABS 1489 MNTHCNT EQU DISPW MONTHTAB size of this here table 1490 0001B5A2 1491 MNTHNUM LABEL 1B5A4 0000000E 1492 VFD 13,14,14 pm,am numbers 1B5AD 00000006 1493 VFD 1,2,3,3,4,5,5,6,6 month numbers 1B5B5 0000000C 1494 VFD 7,7,8,8,9,10,11,12 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 114 (RDUISUB) F 15 Input subroutines 1496 1497 ********************************************************************************** 1498 * * 1499 * PMFND and AMFND are jumped to when a character string is * 1500 * either a P.M. or A.M. HOURS is checked to see if they need to be * 1501 * adjusted for the A.M. or P.M. If so the adjustment is done to TIME. * 1502 * * 1503 ********************************************************************************** 1504 0001B5B6 1505 PMFND LABEL 1B5B6 F7C3B5C7 7 1506 JBT R7/FNDPM EXPM already have a pm or am 1B5B7 F3CBB5CA 7 1507 JBF R7/FNDTM B4DATE date has not been found 1B5B8 EDCBC210 7 CBM 1508 STW R7/FNDPM save we have found one 1509 1B5B9 6004000C 0 IMM 1510 LD R0 12 to add to hours 1B5BA 64178804 0 6 BASE 1511 CPR R0 SP,HOURS does hour need to be changed? 1B5BB FE0BB573 1512 JLE SKIPSTUF nope 1B5BC 1C01B4D7 0 1513 MUL R0 MSHOUR convert to msecs 1B5BD 98178803 0 6 BASE 1514 ADDM R0 SP,TIME makes it pm 1B5BE FE0FB573 1515 JMP SKIPSTUF 1516 * --- 1517 1518 0001B5BF 1519 AMFND LABEL 1B5BF F7C3B5C7 7 1520 JBT R7/FNDPM EXPM already have a pm or am 1B5C0 F3CBB5CA 7 1521 JBF R7/FNDTM B4DATE date has not been found 1522 1B5C1 6004000C 0 IMM 1523 LD R0 12 to see if hours need subtracting 1B5C2 64178804 0 6 BASE 1524 CPR R0 SP,HOURS 1B5C3 FE05B573 1525 JGT SKIPSTUF they are in proper range 1B5C4 1C01B4D7 0 1526 MUL R0 MSHOUR convert to msecs 1B5C5 B0178803 0 6 BASE 1527 RSBM R0 SP,TIME adjust time 1B5C6 FE0FB573 1528 JMP SKIPSTUF 1529 * --- 1530 0001B5C7 1531 EXPM LABEL 1B5C7 6005D386 0 IMM 1532 LD R0 ADR ERM811 go to error handling routine 1B5C8 60840000 2 IMM 1533 LD R2 0 save bad things happened 1B5C9 FE0FB5DC 1534 JMP LVTIMIN leave this subroutine 1535 * --- 1536 0001B5CA 1537 B4DATE LABEL 1B5CA 6005D38E 0 IMM 1538 LD R0 ADR ERM812 go to error handling routine 1B5CB 60840000 2 IMM 1539 LD R2 0 save bad things happened 1B5CC FE0FB5DC 1540 JMP LVTIMIN leave this subroutine 1541 * --- 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 115 (RDUISUB) F 15 Input subroutines 1543 0001B5CD 1544 ENDSTRNG LABEL 1B5CD E501A8E5 4 1545 ST R4 BUFPT for later use 1B5CE 61538000 5 6 REG 1546 LD R5 SP need a temp stack pointer 1B5CF DC01B783 1547 CALL PACKDATE 1B5D0 4301A8E8 1548 PAR2 TIMETEMP put raw time here 1B5D1 41574803 5 BASE 1549 PARV R5,TIME msecs in today 1B5D2 41574805 5 BASE 1550 PARV R5,DATE 1B5D3 41574806 5 BASE 1551 PARV R5,MONTH 1B5D4 40574807 5 BASE 1552 PARVL R5,YEAR 1553 * \ / 1554 1B5D5 60040000 0 IMM 1555 LD R0 0 say all is ok 1B5D6 5C178809 6 BASE 1556 CMZ SP,SINGLE are we in a single word time 1B5D7 FE03B5DC 1557 JEQ LVTIMIN nope 1558 * \ / 1559 1B5D8 62440800 12 IMM 1560 LD2 R1 0800 rounding factor 1B5D9 9A41A8E8 12 1561 ADD2M R1 TIMETEMP add into time before truncation 1B5DA 6051B4D9 1 @ 1562 LD R1 @MIDDATA get 32 bit time 1B5DB E441A8E8 1 1563 ST R1 TIMETEMP 1564 * \ / 1565 0001B5DC 1566 LVTIMIN LABEL 1B5DC 63178801 456 BASE 1567 LD2 R4 SP,TMINR4R5 restore these registers 1B5DD 6241A8E8 12 1568 LD2 R1 TIMETEMP 1B5DE E441A830 1 1569 ST R1 SBUFFW 1B5DF 5D1F800A 6 STAK 1570 LEAVE POP 1571 * --- 1572 1573 END of TIMEIN subroutines 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 116 (RDUISUB) F 15 Input subroutines 1575 1576 ********************************************************************************** 1577 * * 1578 * GRABCHAR. Routine to get the next char. * 1579 * Call: * 1580 * LD R4 => the char minus one (pointer bumped first) * 1581 * CALLNP GRABCHAR * 1582 * ST R0 upperfied character * 1583 * ST R1 code for the char * 1584 * R4 -> char * 1585 * Eats R0:R1, R4. * 1586 * * 1587 ********************************************************************************** 1588 1589 BLOCK 1590 ENTRY GRABCHAR 1591 1592 BEGFRAME 1593 ENDFRAME 1594 1B5E0 DD5F8001 6 STAK 1595 GRABCHAR ENTRNP PUSH 1B5E1 D00B1F30 4 CBM 1596 INC R4/NXTCHAR advance to next character 1B5E2 60170000 0 4 CACH 1597 LD R0 CACH R4,0 get the char 1B5E3 7804007F 0 IMM 1598 AND R0 GASMASK remove the parity bit 1B5E4 64040061 0 IMM 1599 CPR R0 LOWCASE a lower case char? 1B5E5 FE09B5E9 1600 JLT GRAB30 jump if not 1B5E6 6404007A 0 IMM 1601 CPR R0 LOWTOP out of the lower range? 1B5E7 FE05B5E9 1602 JGT GRAB30 if so, don't upperfy 1B5E8 10040020 0 IMM 1603 SUB R0 LOWBIAS convert to upper case 0001B5E9 1604 GRAB30 LABEL 1B5E9 6071B2D7 1 0 @ 1605 LD R1 @CODES(R0) get the char group code 1B5EA 5D1F8001 6 STAK 1606 LEAVE POP 1607 * --- 1608 END of GRABCHAR 1609 1610 END of TIMEIN subroutines 131 132 INPUT RDUOSUB 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 117 (RDUOSUB) F 16 Output subroutines 3 4 ********************************************************************************** 5 * * 6 * This is the DATADISP routine. It is not very big at all as it * 7 * uses a table (DISPTAB) to call one of the data formatting output * 8 * routines to do the actual work. When called, VALUE must contain * 9 * the data to be output, OBP must point to the output buffer place * 10 * for the value, DISPTYPE must contain the display type code, * 11 * and COM must point to the command entry being executed. * 12 * Call: * 13 * VALUE = value to output * 14 * DISPTYPE contains display type * 15 * OBP -> current position in output buffer * 16 * COM -> command element * 17 * CALLNP DATADISP * 18 * Eats R0:R2, Adjusts R3 (OBP) * 19 * * 20 ********************************************************************************** 21 22 BLOCK 23 ENTRY DATADISP 24 25 BEGFRAME 26 ENDFRAME 27 1B5EB DD5F8001 6 STAK 28 DATADISP ENTRNP PUSH 1B5EC 60895423 2 5 ZBM 29 LD R2 COM,COMDATA check data width 1B5ED 60A5AC9D 2 2 30 LD R2 DATADIGS(R2) get digit count for hex 1B5EE 6001A8F3 0 31 LD R0 DISPTYPE get display type to use 1B5EF 5D61ACAB 0 32 XCT DISPTAB(R0) then output the thing 1B5F0 5D1F8001 6 STAK 33 LEAVE POP 34 * --- 35 36 END of DATADISP 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 118 (RDUOSUB) F 16 Output subroutines 38 39 ********************************************************************************** 40 * * 41 * HEXOUT formats the number in VAULE into the * 42 * standard hexadecimal format and leaves it in OBUFF. * 43 * HEXOUT will format all 8 digits. * 44 * HEXOUTN will format a fixed number of digits. * 45 * The digit count is passed in R2 and that number of * 46 * digits is always output. * 47 * HEXOUTA formats a 17-bit address. * 48 * HEXOUTD will format a single hex digit. * 49 * Eats R0:R3. * 50 * Leaves OBP -> to current position in output buffer. * 51 * * 52 ********************************************************************************** 53 54 BLOCK 55 ENTRY HEXOUT 56 ENTRY HEXOUTN 57 ENTRY HEXOUTA 58 ENTRY HEXOUTD 59 ENTRY HEXOUTC 60 61 BEGFRAME 62 ENDFRAME 63 1B5F1 DD5F8001 6 STAK 64 HEXOUT ENTRNP PUSH 1B5F2 6001A8ED 0 65 LD R0 VALUE get value to decode 1B5F3 60840007 2 IMM 66 LD R2 8-1 we want 8 digits no matter what 67 * \ / 68 0001B5F4 69 HEXO10 LABEL 1B5F4 604A0040 1 0 CBM 70 LD R1 R0/BITS 0:3 get 4 bits of number 1B5F5 6073AC42 1 1 @ 71 LD R1 @HEXC(R1) get proper ASCII character 1B5F6 E477AC01 1 3 @ 72 ST R1 @OBPT(OBP) stuff into output line 1B5F7 18C40001 3 IMM 73 ADD OBP 1 advance buffer pointer 1B5F8 600A0800 0 0 CBM 74 LD R0 R0/BITS 4:3 rotate to next digit 1B5F9 FAA7B5F4 2 75 JDR R2 HEXO10 and cycle through all eight 76 * \ / 77 1B5FA 5D1F8001 6 STAK 78 LEAVE POP 79 * --- 80 81 * R2 = number of digits to format. 1B5FB DD5F8001 6 STAK 82 HEXOUTN ENTRNP PUSH 1B5FC 6001A8ED 0 83 LD R0 VALUE get value to display 1B5FD 5D65AC43 2 84 XCT HEXSHIFT(R2) rotate value by digits 1B5FE FAA7B5F4 2 85 JDR R2 HEXO10 (R2 has count) 86 * \ / 87 1B5FF 5D1F8001 6 STAK 88 LEAVE POP 89 * --- 90 1B600 DD5F8001 6 STAK 91 HEXOUTA ENTRNP PUSH 1B601 6001A8ED 0 92 LD R0 VALUE get address to output 1B602 600A1800 0 0 CBM 93 LD R0 R0/BITS 12:11 rotate to proper start 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 119 (RDUOSUB) F 16 Output subroutines 1B603 60840004 2 IMM 94 LD R2 5-1 five digits 1B604 FE0FB5F4 95 JMP HEXO10 then go output 96 * --- 97 1B605 DD5F8001 6 STAK 98 HEXOUTD ENTRNP PUSH 1B606 6001A8ED 0 99 LD R0 VALUE get value to list 1B607 7804000F 0 IMM 100 AND R0 0F insure a single digit 1B608 6031AC42 0 0 @ 101 LD R0 @HEXC(R0) get ASCII equivalent 1B609 E437AC01 0 3 @ 102 ST R0 @OBPT(OBP) place in output buffer 1B60A 18C40001 3 IMM 103 ADD OBP 1 advance buffer pointer 1B60B 5D1F8001 6 STAK 104 LEAVE POP 105 * --- 106 1B60C DD5F8001 6 STAK 107 HEXOUTC ENTRNP PUSH 1B60D 60840007 2 IMM 108 LD R2 8-1 get digit count 1B60E 6001A8ED 0 109 LD R0 VALUE get value to output 1B60F FA09B612 0 110 JLTZ R0 HEXO20 if negative output hex sign 1B610 6404000A 0 IMM 111 CPR R0 10 see if we need identifier 1B611 FE09B615 112 JLT HEXO30 we don't if small enough 113 * \ / 114 0001B612 115 HEXO20 LABEL 1B612 60440023 1 IMM 116 LD R1 HATCH get the hex sign 1B613 E477AC01 1 3 @ 117 ST R1 @OBPT(OBP) so user knows it's hex 1B614 18C40001 3 IMM 118 ADD OBP 1 advance pointer 0001B615 119 HEXO30 LABEL 1B615 604A0040 1 0 CBM 120 LD R1 R0/BITS 0:3 get first digit 1B616 FA4DB5F4 1 121 JNEZ R1 HEXO10 jump if ready to list 1B617 600A0800 0 0 CBM 122 LD R0 R0/BITS 4:3 rotate to next 1B618 FAA3B615 2 123 DRJ R2 HEXO30 try another 124 * \ / 125 1B619 FE0FB5F4 126 JMP HEXO10 we always want at least one 127 * --- 128 129 END HEXOUT subroutine 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 120 (RDUOSUB) F 16 Output subroutines 131 132 ********************************************************************************** 133 * * 134 * HEXTOCHAR. Convert integer to character string (in hex). * 135 * CALL HEXTOCHAR * 136 * PARV value to convert * 137 *optional: PARV result size * 138 * PARL result buffer * 139 * * 140 * Eats R0:R2. * 141 * Stack required = 4. * 142 * * 143 ********************************************************************************** 144 145 BLOCK 146 ENTRY HEXTOCHAR 147 148 BEGFRAME 00178801 6 BASE 149 CONVVAL BSS 1 value to convert 00178802 6 BASE 150 CONVVALPTR BSS 1 pointer to one digit in value 00178803 6 BASE 151 RESULTLEN BSS 1 length of result 152 ENDFRAME 153 1B61A DD1F8004 6 STAK 154 HEXTOCHAR ENTR PUSH 1B61B C1578801 6 BASE 155 STPV SP,CONVVAL save value to convert 1B61C E4178803 0 6 BASE 156 ST R0 SP,RESULTLEN 1B61D 60040008 0 IMM 157 LD R0 8 1B61E E0178803 0 6 BASE 158 EXCH R0 SP,RESULTLEN default result length to 8 1B61F F3CBB621 7 159 JBF R7/STPVALUE NOLEN jump if length not given 1B620 C1578803 6 BASE 160 STPV SP,RESULTLEN save result length 0001B621 161 NOLEN LABEL 1B621 C0128000 2 REG 162 STPL R2 set result buffer pointer 163 1B622 60578803 1 6 BASE 164 LD R1 SP,RESULTLEN 1B623 50440008 1 IMM 165 MIN R1 8 number of digits wanted 1B624 389A8800 2 21 CACH 166 LEA R2 CACH R2,0(R1) point to end of result 1B625 70524000 1 1 REG 167 LDN R1 R1 make negative 1B626 38098042 0 6 ZBM 168 LEA R0 SP,CONVVAL/BITS 0:3(8) pointer after last digit wanted 1B627 E4178802 0 6 BASE 169 ST R0 SP,CONVVALPTR save it 170 0001B628 171 LOOP LABEL 1B628 601D8C02 0 61 FPVR 172 LD R0 @(SP,CONVVALPTR)(R1) get a digit 1B629 6031AC42 0 0 @ 173 LD R0 @HEXC(R0) convert to printable 1B62A E41A8800 0 21 CACH 174 ST R0 CACH R2,0(R1) save it 1B62B FA61B628 1 175 IRJ R1 LOOP and loop till all done 176 * \ / 177 1B62C 5D1F8004 6 STAK 178 LEAVE POP 179 * --- 180 181 END of HEXTOCHAR subroutine 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 121 (RDUOSUB) F 16 Output subroutines 183 184 ********************************************************************************** 185 * * 186 * DECOUT formats the contents of VALUE into a decimal * 187 * number. The number is considered signed, and a minus sign * 188 * will be printed if necessary. The number itself will be * 189 * left-justified, and no leading zeros are included. * 190 * Call: * 191 * VALUE contains word to be formatted * 192 * OBP -> current position in OBUFF * 193 * CALLNP DECOUT * 194 * OBP -> new current postion in OBUFF * 195 * Eats R0:R2, sets R3. * 196 * * 197 ********************************************************************************** 198 199 BLOCK 200 ENTRY DECOUT 201 202 BEGFRAME 203 ENDFRAME 204 1B62D DD5F8001 6 STAK 205 DECOUT ENTRNP PUSH 1B62E 6001A8ED 0 206 LD R0 VALUE get the value to be decoded 1B62F FA07B634 0 207 JGEZ R0 DECO10 jump if positive 208 * \ / 209 1B630 70120000 0 0 REG 210 LDN R0 R0 change the sign 1B631 6044002D 1 IMM 211 LD R1 MINUS get a minus sign 1B632 E477AC01 1 3 @ 212 ST R1 @OBPT(OBP) place in output buffer 1B633 18C40001 3 IMM 213 ADD OBP 1 advance buffer pointer 214 0001B634 215 DECO10 LABEL 1B634 60840009 2 IMM 216 LD R2 NDIGSD get maximum number of digits 1B635 62120000 010 REG 217 LD2 R0 R0 play games with number 1B636 58C40010 IMM 218 IORPSR MODIFBIT how 'bout some black magic? 0001B637 219 DECO20 LABEL 1B637 1425AC34 0 2 220 DIV R0 TENTAB(R2) look for first non-zero digit 1B638 FA0DB63D 0 221 JNEZ R0 DECO40 jump if we are there 1B639 FAA7B637 2 222 JDR R2 DECO20 otherwise keep searching 223 * \ / 224 0001B63A 225 DECO30 LABEL 1B63A 60040000 0 IMM 226 LD R0 0 zero out crud 1B63B 58C40010 IMM 227 IORPSR MODIFBIT more black magic 1B63C 1425AC34 0 2 228 DIV R0 TENTAB(R2) extract one digit 0001B63D 229 DECO40 LABEL 1B63D 58840010 IMM 230 CLBPSR MODIFBIT keep magic under control 1B63E 18040030 0 IMM 231 ADD R0 NUMBIAS make it an ASCII character 1B63F E437AC01 0 3 @ 232 ST R0 @OBPT(OBP) at last, a character to print! 1B640 18C40001 3 IMM 233 ADD OBP 1 next, please!!! 1B641 FAA7B63A 2 234 JDR R2 DECO30 continue for all digits 235 * \ / 236 1B642 5D1F8001 6 STAK 237 LEAVE POP 238 * --- 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 122 (RDUOSUB) F 16 Output subroutines 239 240 END of DECOUT subroutine 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 123 (RDUOSUB) F 16 Output subroutines 242 243 ********************************************************************************** 244 * * 245 * ASCOUT puts into ascii format and places into the output * 246 * buffer the word in VALUE. Non-printables are listed as * 247 * question marks. The user can use hex to see what they really * 248 * are. * 249 * Call: * 250 * OBP -> current postion in OBUFF * 251 * VALUE contains word to be ouput * 252 * CALLNP ASCOUT * 253 * OBP -> new current position * 254 * Eats R0:R2, sets R3. * 255 * * 256 ********************************************************************************** 257 258 BLOCK 259 ENTRY ASCOUT 260 261 BEGFRAME 262 ENDFRAME 263 1B643 DD5F8001 6 STAK 264 ASCOUT ENTRNP PUSH 1B644 3801A8ED 0 265 LEA R0 VALUE point to data word 1B645 60840000 2 IMM 266 LD R2 0 pointer to data 267 * \ / 268 0001B646 269 ASCO10 LABEL 1B646 605A1000 1 02 CACH 270 LD R1 CACH R0,0(R2) pick up one character 1B647 7844007F 1 IMM 271 AND R1 GASMASK clear off excess fat 1B648 64440020 1 IMM 272 CPR R1 BLANK be sure it's listable 1B649 FE09B64C 273 JLT ASCO20 jump if not 1B64A 6444007E 1 IMM 274 CPR R1 TILDE still checking 1B64B FE0BB64D 275 JLE ASCO40 jump if we can list it 276 * \ / 277 0001B64C 278 ASCO20 LABEL 1B64C 6044003F 1 IMM 279 LD R1 QUESTION get our catch-all character 280 * \ / 281 0001B64D 282 ASCO40 LABEL 1B64D E477AC01 1 3 @ 283 ST R1 @OBPT(OBP) and add to output line 1B64E 18C40001 3 IMM 284 ADD OBP 1 advance output pointer 1B64F 18840001 2 IMM 285 ADD R2 1 advance counter/pointer 1B650 64840004 2 IMM 286 CPR R2 NCPW done a whole word? 1B651 FE09B646 287 JLT ASCO10 if not then go do another 288 * \ / 289 1B652 5D1F8001 6 STAK 290 LEAVE POP 291 * --- 292 293 END of ASCOUT subroutine 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 124 (RDUOSUB) F 16 Output subroutines 295 296 ********************************************************************************** 297 * * 298 * This is the PAK6OUT subroutine. It is called to convert * 299 * the PAK-6 symbol in VALUE to its ascii equivalent and place * 300 * it in OBUFF starting at the position pointed to by OBP. * 301 * Call: * 302 * VALUE contains 32 bit symbol * 303 * OBP -> current position in output buffer * 304 * CALLNP PAK6OUT * 305 * * 306 * Eats R0:R2, adjusts OBP (R3) * 307 * * 308 ********************************************************************************** 309 310 BLOCK 311 ENTRY PAK6OUT 312 ENTRY PAK12OUT 313 314 BEGFRAME 315 ENDFRAME 316 1B653 DD5F8001 6 STAK 317 PAK6OUT ENTRNP PUSH 1B654 60840005 2 IMM 318 LD R2 6-1 six digits 1B655 6041A8ED 1 319 LD R1 VALUE get value to unpack 0001B656 320 PAK6O10 LABEL 1B656 60040000 0 IMM 321 LD R0 0 eliminate confusing junk 1B657 58C40010 IMM 322 IORPSR MODIFBIT say we want special handling 1B658 1425AC57 0 2 323 DIV R0 FORTYTAB(R2) extract a "digit" (0-39) 1B659 58840010 IMM 324 CLBPSR MODIFBIT undo funny magic 1B65A FA03B65F 0 325 JEQZ R0 PAK6OEXIT jump if all done 1B65B 6031AC56 0 0 @ 326 LD R0 @P6CHARS(R0) get the real character 1B65C E437AC01 0 3 @ 327 ST R0 @OBPT(OBP) add into output buffer 1B65D 18C40001 3 IMM 328 ADD OBP 1 advance buffer pointer 1B65E FAA7B656 2 329 JDR R2 PAK6O10 recycle 330 * \ / 331 0001B65F 332 PAK6OEXIT LABEL 1B65F 5D1F8001 6 STAK 333 LEAVE POP 334 * --- 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 125 (RDUOSUB) F 16 Output subroutines 336 337 ********************************************************************************** 338 * * 339 * This is the PAK12OUT routine. It is merely a 2-word * 340 * version of the PAK6OUT routine. In fact, it calls the * 341 * PAK6OUT routine to do all of its dirty work!! * 342 * Call: * 343 * VALUE contains 64 bit symbol * 344 * OBP -> current location in output buffer * 345 * CALLNP PAK12OUT * 346 * * 347 * Eats R0:R2, adjusts OBP (R3), munches VALUE. * 348 * * 349 ********************************************************************************** 350 1B660 DD5F8001 6 STAK 351 PAK12OUT ENTRNP PUSH 1B661 DC41B653 352 CALLNP PAK6OUT go do the first half 1B662 6001A8EE 0 353 LD R0 VALUE(1) get second half of number 1B663 E401A8ED 0 354 ST R0 VALUE stuff it where it wants to be 1B664 DC41B653 355 CALLNP PAK6OUT and decode that half 1B665 5D1F8001 6 STAK 356 LEAVE POP 357 * --- 358 359 END of PAK6OUT and PAK12OUT subroutines 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 126 (RDUOSUB) F 16 Output subroutines 361 362 BLOCK 363 ENTRY OPOUT 364 365 ********************************************************************************** 366 * * 367 * This table is used to determine the operation to perform * 368 * when disassembling instructions. * 369 * * 370 ********************************************************************************** 371 1B666 00000000 372 ACTIONS HALT 0 OOO - 0 1B667 FE0FB6D7 373 JMP OPOOPNMA OMA - 1 1B668 DC41B739 374 CALLNP REGO ORG - 2 1B669 DC41B74B 375 CALLNP CONO OCO - 3 1B66A DC41B84A 376 CALLNP BYTO OBY - 4 1B66B DC41B742 377 CALLNP IDXO ODX - 5 1B66C FE0FB6D5 378 JMP OPOOPNGD OGD - 6 1B66D FE0FB6DB 379 JMP OPOOPNCM OCM - 7 1B66E FE0FB6E3 380 JMP OPOOPNAT OAT - 8 1B66F FE0FB6EB 381 JMP OPOOPNPR OPR - 9 1B670 FE0FB6EE 382 JMP OPOOPNCH OCH - 10 1B671 FE0FB6E5 383 JMP OPOOPNLP OLP - 11 1B672 FE0FB6E7 384 JMP OPOOPNRP ORP - 12 1B673 FE0FB6E9 385 JMP OPOOPNPL OPL - 13 1B674 FE0FB6F0 386 JMP OPOOPNI1 OI1 - 14 1B675 FE0FB6F2 387 JMP OPOOPNF1 OF1 - 15 1B676 FE0FB6F4 388 JMP OPOOPNF2 OF2 - 16 1B677 FE0FB6F6 389 JMP OPOOPNST OST - 17 1B678 FE0FB6F8 390 JMP OPOOPNLZ OLZ - 18 1B679 FE0FB6FC 391 JMP OPOOPNRZ ORZ - 19 1B67A FE0FB6FE 392 JMP OPOOPNRW ORW - 20 1B67B FE0FB701 393 JMP OPOOPNCA OCA - 21 1B67C FE0FB703 394 JMP OPOOPNCB OCB - 22 1B67D FE0FB705 395 JMP OPOOPNCC OCC - 23 1B67E FE0FB707 396 JMP OPOOPNRA ORA - 24 1B67F FE0FB70A 397 JMP OPOOPNRB ORB - 25 1B680 FE0FB70C 398 JMP OPOOPNRC ORC - 26 1B681 FE0FB717 399 JMP OPOOPNS1 OS1 - 27 1B682 FE0FB71B 400 JMP OPOOPNS2 OS2 - 28 1B683 FE0FB70E 401 JMP OPOOPNHX OHX - 29 1B684 FE0FB71F 402 JMP OPOEXIT OEX - 30 1B685 FE0FB6D6 403 JMP OPOOPNGR OGR - 31 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 127 (RDUOSUB) F 16 Output subroutines 405 406 ********************************************************************************** 407 * * 408 * This is the OPOUT routine. It is called to disassemble * 409 * the instruction in VALUE and list it out in readable form with * 410 * proper symbol substitution as well. The output buffer must be * 411 * set up and OBP must be initialized by the caller. Also, the * 412 * caller probably wants to set SYMSFLAG off in order to have the * 413 * operand decoded instead of displayed as a symbol. * 414 * Call: * 415 * VALUE = instruction in hex * 416 * OBP -> position to start instruction output at * 417 * CALLNP OPOUT * 418 * OBP -> end of line * 419 * Eats R0:R4. * 420 * * 421 ********************************************************************************** 422 423 BEGFRAME 00178801 6 BASE 424 OPOWORD BSS 1 temp for TYPE 00178802 6 BASE 425 OPOTMP BSS 1 temp for R5 00098E31 6 ZBM 426 OPOREG EQU OPOWORD/BITS 7:9 00099451 6 ZBM 427 OPOBIT EQU OPOWORD/BITS 10:14 00098E31 6 ZBM 428 OPOPAR EQU OPOWORD/BITS 7:9 00178803 6 BASE 429 OPOOBP BSS 1 temp for output buffer pointer 00178804 6 BASE 430 OPOOP BSS 1 temp for OP 00178805 6 BASE 431 OPOCNTL BSS 1 temp for operand output control 432 ENDFRAME 433 0000000A ABS 434 OPNSPOT EQU 10 place to start operand field 435 1B686 DD5F8006 6 STAK 436 OPOUT ENTRNP PUSH 1B687 E5578802 5 6 BASE 437 ST R5 SP,OPOTMP save R5 from harm 1B688 E4D78803 3 6 BASE 438 ST OBP SP,OPOOBP save output buffer pointer 1B689 DC41BA5B 439 CALLNP RELOCATE make sure we are in the right universe 1B68A 60C1A8ED 3 440 LD R3 VALUE get the word to be disassembled 1B68B E4D78801 3 6 BASE 441 ST R3 SP,OPOWORD save from later harm 1B68C 604AC070 1 3 CBM 442 LD R1 R3/OPBITS get top 7 bits of op-code 1B68D 6073AEFC 1 1 @ 443 LD R1 @PREOP(R1) get pre-op type class 1B68E 60CAC100 3 3 CBM 444 LD R3 R3/MAXOPBITS get most possible op-code bits 1B68F 78E3AEF8 3 1 445 AND R3 OCMASKTAB(R1) chop down to size 1B690 60440000 1 IMM 446 LD R1 0 1B691 608400D3 2 IMM 447 LD R2 NUMOPS+1 set up for binary search 0001B692 448 OPO10 LABEL 1B692 60124000 0 1 REG 449 LD R0 R1 1B693 18128000 0 2 REG 450 ADD R0 R2 generate next index 1B694 14040002 0 IMM 451 DIV R0 2 1B695 64124000 0 1 REG 452 CPR R0 R1 is this too much?? 1B696 FE03B71D 453 JEQ OPO90 if so, then go list in hex 1B697 61520000 5 0 REG 454 LD OP R0 juggle 1B698 1D440002 5 IMM 455 MUL OP OPSIZE generate table pointer 1B699 1945AD52 5 IMM 456 ADD OP (ADR(OPTABLE))-OPSIZE 1B69A 68C94100 3 5 ZBM 457 UCPR R3 OP,OPCODE all that for one lousy compare!!! 1B69B FE03B6A1 458 JEQ OPO40 jump if a match - it's about time 1B69C FE05B69F 459 JGT OPO30 too big?? 1B69D E4128000 0 2 REG 460 ST R0 R2 was too small, adjust high end 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 128 (RDUOSUB) F 16 Output subroutines 1B69E FE0FB692 461 JMP OPO10 and try again 462 * --- 463 0001B69F 464 OPO30 LABEL 1B69F E4124000 0 1 REG 465 ST R0 R1 too big, raise lower bound 1B6A0 FE0FB692 466 JMP OPO10 back for another round 467 * --- 468 0001B6A1 469 OPO40 LABEL (found it!!!!!!) 1B6A1 E5578804 5 6 BASE 470 ST OP SP,OPOOP save so we can find later 1B6A2 60D78803 3 6 BASE 471 LD OBP SP,OPOOBP restore buffer pointer 1B6A3 60174801 0 5 BASE 472 LD R0 OP,OPNAME get the name field 1B6A4 E401A8ED 0 473 ST R0 VALUE set up to decode 1B6A5 DC41B653 474 CALLNP PAK6OUT decode pack-6 format 1B6A6 60040020 0 IMM 475 LD R0 BLANK tack on a blank 1B6A7 E437AC01 0 3 @ 476 ST R0 @OBPT(OBP) just for looks! 1B6A8 18C40001 3 IMM 477 ADD OBP 1 1B6A9 61578804 5 6 BASE 478 LD OP SP,OPOOP get table pointer back again 1B6AA 60097820 0 5 ZBM 479 LD R0 OP,OPMT get modifier type 1B6AB 5CA1B721 0 480 LDPC OPOMJT(R0) go process accordingly 481 * --- 482 0001B6AC 483 OPOMOD10 LABEL (register type) 1B6AC 60098E31 0 6 ZBM 484 LD R0 SP,OPOREG get the register specifier 1B6AD E401A8F1 0 485 ST R0 REGVAL stuff in the right place 1B6AE DC41B739 486 CALLNP REGO go output register name 1B6AF FE0FB6BD 487 JMP OPOOPN and then go do operand 488 * --- 489 0001B6B0 490 OPOMOD20 LABEL (CBM - REG/BIT) 1B6B0 60098E31 0 6 ZBM 491 LD R0 SP,OPOREG otherwise do register first 1B6B1 E401A8F1 0 492 ST R0 REGVAL save the register number 1B6B2 60020014 0 IMM 493 LD R0 MODECBM*MODEBITS start with CBM mode 1B6B3 60499451 1 6 ZBM 494 LD R1 SP,OPOBIT now get starting bit 1B6B4 E44A2450 1 0 CBM 495 ST R1 R0/BYTESB use as byte start bit 1B6B5 EDCA2E50 0 CBM 496 STW R0/BYTELEN and set length as one 1B6B6 E401A8F0 0 497 ST R0 CONVAL save constructed byte thing 1B6B7 DC41B739 498 CALLNP REGO output a register name 1B6B8 DC41B84A 499 CALLNP BYTO now output the byte specifier 1B6B9 FE0FB6BD 500 JMP OPOOPN and that wraps up here 501 * --- 502 0001B6BA 503 OPOMOD40 LABEL (parameter type) 1B6BA 60098E31 0 6 ZBM 504 LD R0 SP,OPOPAR get the parameter field 1B6BB E401A8F0 0 505 ST R0 CONVAL save the value to list 1B6BC DC41B74B 506 CALLNP CONO and go list it out 0001B6BD 507 OPOOPN LABEL now for the operand field 1B6BD 18C40002 3 IMM 508 ADD OBP 2 advance output buffer pointer 1B6BE 60178803 0 6 BASE 509 LD R0 SP,OPOOBP get initial buffer pointer 1B6BF 54D6100A 3 0 REG 510 MAX OBP R0+OPNSPOT tab to a nice place 1B6C0 61578804 5 6 BASE 511 LD OP SP,OPOOP get table pointer once more 1B6C1 60097C20 0 5 ZBM 512 LD R0 OP,OPOT get operand class 1B6C2 5CA1B725 0 513 LDPC OPOOJT(R0) and process accordingly 514 * --- 515 0001B6C3 516 OPOO10 LABEL (constant) 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 129 (RDUOSUB) F 16 Output subroutines 1B6C3 60099F11 0 6 ZBM 517 LD R0 SP,OPOWORD/ADRBITS get the 17 bit value 1B6C4 E401A8F0 0 518 ST R0 CONVAL set up for outputter 1B6C5 DC41B74B 519 CALLNP CONO go output a constant 1B6C6 FE0FB71F 520 JMP OPOEXIT and then you can go 521 * --- 522 0001B6C7 523 OPOO30 LABEL (memory address - 17 bit) 1B6C7 60099F11 0 6 ZBM 524 LD R0 SP,OPOWORD/ADRBITS get the value 1B6C8 E401A8F0 0 525 ST R0 CONVAL set up to locate in list 1B6C9 DC41B729 526 CALLNP MEMO output a memory address 1B6CA FE0FB71F 527 JMP OPOEXIT then it's time to go! 528 * --- 529 0001B6CB 530 OPOO40 LABEL (22-bit goodie word) 1B6CB 60099451 0 6 ZBM 531 LD R0 SP,OPOWORD/MODEBITS get mode field 1B6CC 6131ACB3 4 0 @ 532 LD R4 @MODETAB(R0) get the operand code 1B6CD 1D04000C 4 IMM 533 MUL R4 NAPC adjust for table index 1B6CE FB23B707 4 534 DRJ R4 OPOOPNRA go get possible register 535 0001B6CF 536 OPOONEXT LABEL 1B6CF 61178805 4 6 BASE 537 LD R4 SP,OPOCNTL restore control registers 0001B6D0 538 OPOONXT2 LABEL 1B6D0 BC130000 0 4 REG 539 INCL R0 R4 advance action pointer and load 1B6D1 6031ACB9 0 0 @ 540 LD R0 @ACTTAB(R0) pick up the action code 1B6D2 E5178805 4 6 BASE 541 ST R4 SP,OPOCNTL save registers from harm 1B6D3 5D61B666 0 542 XCT ACTIONS(R0) and perform next action 1B6D4 FE0FB6CF 543 JMP OPOONEXT recycle the loop if we get here 544 * --- 545 0001B6D5 546 OPOOPNGD LABEL (22-bit goodie word) 1B6D5 FE0FB6CF 547 JMP OPOONEXT no-op in RFP world 548 * --- 549 0001B6D6 550 OPOOPNGR LABEL (goodie without register) 1B6D6 FE0FB6CF 551 JMP OPOONEXT and check the results 552 * --- 553 0001B6D7 554 OPOOPNMA LABEL (memory address) 1B6D7 60099F11 0 6 ZBM 555 LD R0 SP,OPOWORD/ADRBITS get the address portion 1B6D8 E401A8F0 0 556 ST R0 CONVAL save in output location 1B6D9 DC41B729 557 CALLNP MEMO ship it out! 1B6DA FE0FB6CF 558 JMP OPOONEXT and then head back for more 559 * --- 560 0001B6DB 561 OPOOPNCM LABEL (comma) 1B6DB 5C01AAC0 562 CMZ USINGNEW new format ?? 1B6DC FE03B6E0 563 JEQ OPOONOCRT no, we are fine 564 * \ / 1B6DD 6004005E 0 IMM 565 LD R0 CARAT get a carat 1B6DE E437AC01 0 3 @ 566 ST R0 @OBPT(OBP) set it into buffer 1B6DF 18C40001 3 IMM 567 ADD OBP 1 bump to next location 0001B6E0 568 OPOONOCRT LABEL 1B6E0 6004002C 0 IMM 569 LD R0 COMMA get comma to output 0001B6E1 570 OPOOCHAR LABEL 1B6E1 E437AC01 0 3 @ 571 ST R0 @OBPT(OBP) add to the string 1B6E2 FAE1B6D0 3 572 IRJ OBP OPOONXT2 advance pointer and head back 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 130 (RDUOSUB) F 16 Output subroutines 573 * --- 574 0001B6E3 575 OPOOPNAT LABEL (at-sign) 1B6E3 60040040 0 IMM 576 LD R0 ATSIGN get the signal 1B6E4 FE0FB6E1 577 JMP OPOOCHAR and go place in buffer 578 * --- 579 0001B6E5 580 OPOOPNLP LABEL (left-paren) 1B6E5 60040028 0 IMM 581 LD R0 LPAREN 1B6E6 FE0FB6E1 582 JMP OPOOCHAR 583 * --- 584 0001B6E7 585 OPOOPNRP LABEL (right-paren) 1B6E7 60040029 0 IMM 586 LD R0 RPAREN 1B6E8 FE0FB6E1 587 JMP OPOOCHAR 588 * --- 589 0001B6E9 590 OPOOPNPL LABEL (plus) 1B6E9 6004002B 0 IMM 591 LD R0 PLUS 1B6EA FE0FB6E1 592 JMP OPOOCHAR 593 * --- 594 0001B6EB 595 OPOOPNPR LABEL (PAIR) 1B6EB 6005CD2D 0 IMM 596 LD R0 ADR(MESPAIR) 0001B6EC 597 OPOOLIT LABEL 1B6EC DC41B87B 598 CALLNP MESSMOVE add message to string 1B6ED FE0FB6CF 599 JMP OPOONEXT and head on back 600 * --- 601 0001B6EE 602 OPOOPNCH LABEL (CACH) 1B6EE 6005CD2F 0 IMM 603 LD R0 ADR(MESCACH) 1B6EF FE0FB6EC 604 JMP OPOOLIT 605 * --- 606 0001B6F0 607 OPOOPNI1 LABEL (INT1) 1B6F0 6005CD33 0 IMM 608 LD R0 ADR(MESINT1) 1B6F1 FE0FB6EC 609 JMP OPOOLIT 610 * --- 611 0001B6F2 612 OPOOPNF1 LABEL (FLT1) 1B6F2 6005CD35 0 IMM 613 LD R0 ADR(MESFLT1) 1B6F3 FE0FB6EC 614 JMP OPOOLIT 615 * --- 616 0001B6F4 617 OPOOPNF2 LABEL (FLT2) 1B6F4 6005CD37 0 IMM 618 LD R0 ADR(MESFLT2) 1B6F5 FE0FB6EC 619 JMP OPOOLIT 620 * --- 621 0001B6F6 622 OPOOPNST LABEL (STAK) 1B6F6 6005CD31 0 IMM 623 LD R0 ADR(MESSTAK) 1B6F7 FE0FB6EC 624 JMP OPOOLIT 625 * --- 626 0001B6F8 627 OPOOPNLZ LABEL (left-justify, zero-fill) 1B6F8 60099F11 0 6 ZBM 628 LD R0 SP,OPOWORD/ADRBITS get the 17-bit field 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 131 (RDUOSUB) F 16 Output subroutines 1B6F9 600A1E00 0 0 CBM 629 LD R0 R0/BITS 15:14 rotate to the top 0001B6FA 630 OPOOCON LABEL 1B6FA E401A8F0 0 631 ST R0 CONVAL stuff into the constant area 1B6FB FE0FB6D0 632 JMP OPOONXT2 and then go do next 633 * --- 634 0001B6FC 635 OPOOPNRZ LABEL (right-justify, zero-fill) 1B6FC 60099F11 0 6 ZBM 636 LD R0 SP,OPOWORD/ADRBITS 1B6FD FE0FB6FA 637 JMP OPOOCON 638 * --- 639 0001B6FE 640 OPOOPNRW LABEL (right-justify, ones-fill) 1B6FE 60099F11 0 6 ZBM 641 LD R0 SP,OPOWORD/ADRBITS 1B6FF D14A0100 0 CBM 642 STMW R0/BITS 0:15 1B700 FE0FB6FA 643 JMP OPOOCON 644 * --- 645 0001B701 646 OPOOPNCA LABEL (constant, type 'a') 1B701 6009B841 0 6 ZBM 647 LD R0 SP,OPOWORD/CONBITSA 1B702 FE0FB6FA 648 JMP OPOOCON 649 * --- 650 0001B703 651 OPOOPNCB LABEL (constant, type 'b') 1B703 6009A4E1 0 6 ZBM 652 LD R0 SP,OPOWORD/CONBITSB 1B704 FE0FB6FA 653 JMP OPOOCON 654 * --- 655 0001B705 656 OPOOPNCC LABEL (constant, type 'c') 1B705 6009ACA1 0 6 ZBM 657 LD R0 SP,OPOWORD/CONBITSC 1B706 FE0FB6FA 658 JMP OPOOCON 659 * --- 660 0001B707 661 OPOOPNRA LABEL (register, type 'a') 1B707 60099E31 0 6 ZBM 662 LD R0 SP,OPOWORD/REGBITSA 0001B708 663 OPOOREG LABEL 1B708 E401A8F1 0 664 ST R0 REGVAL save the value 1B709 FE0FB6D0 665 JMP OPOONXT2 return for more 666 * --- 667 0001B70A 668 OPOOPNRB LABEL (register, type 'b') 1B70A 6009A431 0 6 ZBM 669 LD R0 SP,OPOWORD/REGBITSB 1B70B FE0FB708 670 JMP OPOOREG 671 * --- 672 0001B70C 673 OPOOPNRC LABEL (register, type 'c') 1B70C 60099831 0 6 ZBM 674 LD R0 SP,OPOWORD/REGBITSC 1B70D FE0FB708 675 JMP OPOOREG 676 * --- 677 0001B70E 678 OPOOPNHX LABEL (hex output) 1B70E 60040028 0 IMM 679 LD R0 LPAREN 1B70F E437AC01 0 3 @ 680 ST R0 @OBPT(OBP) put in a parenthesis 1B710 18C40001 3 IMM 681 ADD OBP 1 1B711 60178801 0 6 BASE 682 LD R0 SP,OPOWORD get the entire word 1B712 DC41B5F1 683 CALLNP HEXOUT ship it out 1B713 60040029 0 IMM 684 LD R0 RPAREN and close off the line 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 132 (RDUOSUB) F 16 Output subroutines 1B714 E437AC01 0 3 @ 685 ST R0 @OBPT(OBP) 1B715 18C40001 3 IMM 686 ADD OBP 1 1B716 FE0FB6CF 687 JMP OPOONEXT then go back for more 688 * --- 689 0001B717 690 OPOOPNS1 LABEL (control change S1) 1B717 6009A441 0 6 ZBM 691 LD R0 SP,OPOWORD/S1BITS get the sub-class value 0001B718 692 OPOOX LABEL 1B718 1C04000C 0 IMM 693 MUL R0 NAPC adjust for table indexing 1B719 19120000 4 0 REG 694 ADD R4 R0 swizzle the index value 1B71A FE0FB6D0 695 JMP OPOONXT2 and go back quietly 696 * --- 697 0001B71B 698 OPOOPNS2 LABEL (control change S2) 1B71B 6009AA11 0 6 ZBM 699 LD R0 SP,OPOWORD/S2BITS get sub-class field 1B71C FE0FB718 700 JMP OPOOX go adjust the index 701 * --- 702 0001B71D 703 OPO90 LABEL 1B71D 60D78803 3 6 BASE 704 LD OBP SP,OPOOBP restore buffer pointer 1B71E DC41B5F1 705 CALLNP HEXOUT just output in hex 0001B71F 706 OPOEXIT LABEL 1B71F 61578802 5 6 BASE 707 LD R5 SP,OPOTMP restore R5 1B720 5D1F8006 6 STAK 708 LEAVE POP 709 * --- 710 1B721 0001B6BD 711 OPOMJT ADR OPOOPN no modifier 1B722 0001B6AC 712 ADR OPOMOD10 register 1B723 0001B6B0 713 ADR OPOMOD20 REG/BIT 1B724 0001B6BA 714 ADR OPOMOD40 parameter 715 1B725 0001B71F 716 OPOOJT ADR OPOEXIT plain (no operand) 1B726 0001B6C3 717 ADR OPOO10 constant 1B727 0001B6C7 718 ADR OPOO30 memory address (17-bit) 1B728 0001B6CB 719 ADR OPOO40 22-bit goodie word 720 721 END of OPOUT subroutine 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 133 (RDUOSUB) F 16 Output subroutines 723 724 ********************************************************************************** 725 * * 726 * MEMO is called by the OPOUT processor to place a memory * 727 * address, which is saved in CONVAL, into the output buffer. If * 728 * a symbol has been defined for the location then the symbol * 729 * name is put in the output, else "ma xxxxx" is used. * 730 * Call: * 731 * CONVAL contains address * 732 * OBP -> current position in output buffer * 733 * CALLNP MEMO * 734 * Sets OBP. * 735 * Eats R0:R5, VALUE, TYPE. * 736 * * 737 ********************************************************************************** 738 739 BLOCK 740 ENTRY MEMO 741 742 BEGFRAME 743 ENDFRAME 744 1B729 DD5F8001 6 STAK 745 MEMO ENTRNP PUSH 1B72A 6001A8F0 0 746 LD R0 CONVAL get the value to list 1B72B E401A8ED 0 747 ST R0 VALUE put where needed 748 * 749 * Get the code for a memory location, depending on which symbol 750 * format that is being used. 751 * 1B72C 60040005 0 IMM 752 LD R0 SYMTYPEGD type for memory addresses 1B72D 5C01AAC0 753 CMZ USINGNEW new format ?? 1B72E FE03B730 754 JEQ MEMO15 no, we have what we need 755 * \ / 1B72F 60040001 0 IMM 756 LD R0 NEWMEM yes, get the new memory code 0001B730 757 MEMO15 LABEL 1B730 E401A8F2 0 758 ST R0 TYPE set type to search for 1B731 DC41BAB0 759 CALLNP VALLOOK go see if we can match 1B732 FB0BB735 4 760 JLEZ SYM MEMO20 jump if nothing found 1B733 DC41BADF 761 CALLNP SYMOUT else list out the symbol 1B734 5D1F8001 6 STAK 762 LEAVE POP 763 * --- 764 0001B735 765 MEMO20 LABEL 1B735 6005CD28 0 IMM 766 LD R0 ADR(MESMA) "ma " 1B736 DC41B87B 767 CALLNP MESSMOVE say this is a memory address 1B737 DC41B600 768 CALLNP HEXOUTA and list out 17 bits 1B738 5D1F8001 6 STAK 769 LEAVE POP 770 * --- 771 772 END of MEMO subroutine 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 134 (RDUOSUB) F 16 Output subroutines 774 775 ********************************************************************************** 776 * * 777 * REGO is called by the OPOUT routine to list out register * 778 * symbols. This is VERY simple, as there is always a register * 779 * symbol. * 780 * Call: * 781 * OBP -> current position in output buffer * 782 * REGVAL contains the regster number * 783 * CALLNP REGO * 784 * OBP -> new position in output buffer * 785 * Eats R0. * 786 * * 787 ********************************************************************************** 788 789 BLOCK 790 ENTRY REGO 791 792 BEGFRAME 793 ENDFRAME 794 1B739 DD5F8001 6 STAK 795 REGO ENTRNP PUSH 1B73A 60040052 0 IMM 796 LD R0 "R" register name uses R 1B73B E437AC01 0 3 @ 797 ST R0 @OBPT(OBP) into the pot 1B73C 18C40001 3 IMM 798 ADD OBP 1 stir a little 1B73D 6001A8F1 0 799 LD R0 REGVAL get register number 1B73E 18040030 0 IMM 800 ADD R0 NUMBIAS make into ASCII digit 1B73F E437AC01 0 3 @ 801 ST R0 @OBPT(OBP) add it to the handle 1B740 18C40001 3 IMM 802 ADD OBP 1 advance pointer 1B741 5D1F8001 6 STAK 803 LEAVE POP 804 * --- 805 806 END of REGO subroutine 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 135 (RDUOSUB) F 16 Output subroutines 808 809 ********************************************************************************** 810 * * 811 * This is the IDXO routine. It is just like the REGO * 812 * routine but it also encloses its register with parens. * 813 * OBP -> current position in output buffer * 814 * REGVAL contains the regster number * 815 * CALLNP IDXO * 816 * OBP -> new position in output buffer * 817 * Eats R0, sets R3. * 818 * * 819 ********************************************************************************** 820 821 BLOCK 822 ENTRY IDXO 823 824 BEGFRAME 825 ENDFRAME 826 1B742 DD5F8001 6 STAK 827 IDXO ENTRNP PUSH 1B743 60040028 0 IMM 828 LD R0 LPAREN get a left parenthesis 1B744 E437AC01 0 3 @ 829 ST R0 @OBPT(OBP) place in output line 1B745 18C40001 3 IMM 830 ADD OBP 1 1B746 DC41B739 831 CALLNP REGO go list the register 1B747 60040029 0 IMM 832 LD R0 RPAREN now for the close 1B748 E437AC01 0 3 @ 833 ST R0 @OBPT(OBP) that should do it 1B749 18C40001 3 IMM 834 ADD OBP 1 advance pointer 1B74A 5D1F8001 6 STAK 835 LEAVE POP 836 * --- 837 838 END of IDXO subroutine 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 136 (RDUOSUB) F 16 Output subroutines 840 841 ********************************************************************************** 842 * * 843 * CONO simply lists a symbol as its constant value. * 844 * Call: * 845 * CONVAL contains constant's value * 846 * OBP -> current position in output buffer * 847 * CALLNP CONO * 848 * Eats R0:R2, sets R3, wipes out VALUE. * 849 * * 850 ********************************************************************************** 851 852 BLOCK 853 ENTRY CONO 854 855 BEGFRAME 856 ENDFRAME 857 1B74B DD5F8001 6 STAK 858 CONO ENTRNP PUSH 1B74C 6001A8F0 0 859 LD R0 CONVAL get the value to list 1B74D E401A8ED 0 860 ST R0 VALUE transfer to needed place 1B74E DC41B60C 861 CALLNP HEXOUTC output hex constant 1B74F 5D1F8001 6 STAK 862 LEAVE POP 863 * --- 864 865 END of CONO subroutine 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 137 (RDUOSUB) F 16 Output subroutines 874 BLOCK 875 876 ENTRY TIMEOUT 877 ENTRY TIMEOUTS 878 879 ********************************************************************************** 880 * * 881 * TIMEOUT subroutine takes the value in VALUE, as a double word * 882 * time, unpacks it into time, date, month, year, and day of the week, * 883 * and places them in character form into the output buffer OBUFF. * 884 * Since we only have the first word we fetch the second word from * 885 * the location past REALADDR. * 886 * TIMEOUTS does the same except that it treats the value in VALUE * 887 * as a single word time. * 888 * Call: * 889 * VALUE contains word(s) to be unpacked * 890 * OBP -> current position in output buffer * 891 * CALLNP TIMEOUT(S) * 892 * OBP -> new position in output buffer * 893 * Eats R0:R2, sets R3. * 894 * * 895 ********************************************************************************** 896 897 BEGFRAME 00178801 6 BASE 898 MONTH BSS 1 store month 00178802 6 BASE 899 WEEKDAY BSS 1 store number indicating weekday 00178803 6 BASE 900 TIME BSS 1 store time in ms 00178804 6 BASE 901 YEAR BSS 1 store year 00178805 6 BASE 902 DATE BSS 1 store day of month 00178806 6 BASE 903 SECONDS BSS 1 store seconds 00178807 6 BASE 904 MINUTES BSS 1 store minutes 00178808 6 BASE 905 SINGLE BSS 1 flag for single word time 00178809 6 BASE 906 TEMPVALUE BSS 2 save VALUE 0017880B 6 BASE 907 TIMER4R5 BSS 2 store registers 908 ENDFRAME 909 1B7BD DD5F800D 6 STAK 910 TIMEOUT ENTRNP PUSH 1B7BE E717880B 456 BASE 911 ST2 R4 SP,TIMER4R5 save these registers 1B7BF E4D78808 3 6 BASE 912 ST OBP SP,SINGLE prevent SHIPCOM from destroying this 1B7C0 6281F38D 23 913 LD2 R2 DATA get the present contents 1B7C1 E6978809 236 BASE 914 ST2 R2 SP,TEMPVALUE save them for a few msecs 1B7C2 60894634 2 5 ZBM 915 LD R2 COM,GMMSLOT get slot code of transfer 916 1B7C3 D001A921 917 INC REALADDR increment address 1B7C4 60494C43 1 5 ZBM 918 LD R1 COM,COMADDR get address type code 1B7C5 6063AC85 1 1 919 LD R1 ADRMASK(R1) get the proper mask 1B7C6 F841A921 1 920 ANDM R1 REALADDR keep address within range 921 1B7C7 DC01BBAC 922 CALL SHIPCOM read the second word of time 1B7C8 4101BBF5 923 PAR RESPERROR error address 1B7C9 41494034 5 ZBM 924 PARV COM,GMMCLS class=3 1B7CA 4165A97B 2 925 PARV SLOTS(R2) slot to read from 1B7CB 41440002 IMM 926 PARV BCMREAD BCM=2 1B7CC 4041A921 927 PARVL REALADDR address to start at 928 1B7CD D041A921 929 DEC REALADDR decrement address 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 138 (RDUOSUB) F 16 Output subroutines 1B7CE 60494C43 1 5 ZBM 930 LD R1 COM,COMADDR get address type code 1B7CF 6063AC85 1 1 931 LD R1 ADRMASK(R1) get the proper mask 1B7D0 F841A921 1 932 ANDM R1 REALADDR keep address within range 933 1B7D1 60D78808 3 6 BASE 934 LD OBP SP,SINGLE restore it now 1B7D2 6001F38E 0 935 LD R0 DATA(1) get the next word 1B7D3 E401A8EE 0 936 ST R0 VALUE(1) place in second word of value 1B7D4 62578809 126 BASE 937 LD2 R1 SP,TEMPVALUE now restore DATA(1) 1B7D5 E641F38D 12 938 ST2 R1 DATA there, all better now 1B7D6 6001B834 0 939 LD R0 TIMMASK get the time mask 1B7D7 F801A8ED 0 940 ANDM R0 VALUE zero out first 20 bits 1B7D8 EC178808 6 BASE 941 STZ SP,SINGLE say not single word time 1B7D9 FE0FB7E0 942 JMP UNPACK skip single word entry 943 * --- 944 1B7DA DD5F800D 6 STAK 945 TIMEOUTS ENTRNP PUSH 1B7DB E717880B 456 BASE 946 ST2 R4 SP,TIMER4R5 save these registers 1B7DC 6001A8ED 0 947 LD R0 VALUE get single word time 1B7DD EE01A8ED 948 STZ2 VALUE zero out value 1B7DE E411B833 0 @ 949 ST R0 @MIDTIME store in double word time format 1B7DF EDD78808 6 BASE 950 STW SP,SINGLE 951 * \ / 952 953 * unpack the raw time into time, date, month, year, and weekday 0001B7E0 954 UNPACK LABEL 1B7E0 6201A8ED 01 955 LD2 R0 VALUE 1B7E1 E601A8E8 01 956 ST2 R0 TIMETEMP save the original VALUE 1B7E2 61538000 5 6 REG 957 LD R5 SP we need to save SP 1B7E3 DC01B750 958 CALL UNPACKDATE breaks time into time/date/month/year 1B7E4 4341A8ED 959 PARV2 VALUE contains raw time 1B7E5 41174803 5 BASE 960 PAR R5,TIME ms since midnight gets put here 1B7E6 41174805 5 BASE 961 PAR R5,DATE date in month gets put here 1B7E7 41174801 5 BASE 962 PAR R5,MONTH month goes here (Jan = 1) 1B7E8 41174804 5 BASE 963 PAR R5,YEAR year goes here 1B7E9 40174802 5 BASE 964 PARL R5,WEEKDAY yes, the weekday goes here (Sun = 0) 965 1B7EA 60578802 1 6 BASE 966 LD R1 SP,WEEKDAY index into DAYTAB 1B7EB 3823B843 0 1 967 LEA R0 DAYTAB(R1) get location of weekday 1B7EC 60440003 1 IMM 968 LD R1 3 3 chars to move 1B7ED 38B7AC01 2 3 @ 969 LEA R2 @OBPT(OBP) where to put it 1B7EE FE400000 970 CMOVE do it 971 1B7EF 60440002 1 IMM 972 LD R1 2 want 2 blanks now 1B7F0 FE580020 973 CFILL " " 974 1B7F1 18C40005 3 IMM 975 ADD OBP 5 need OBP to point to buf position 1B7F2 60178805 0 6 BASE 976 LD R0 SP,DATE get date 1B7F3 E401A8ED 0 977 ST R0 VALUE place in value 1B7F4 DC41B62D 978 CALLNP DECOUT place in output string 979 1B7F5 6004002D 0 IMM 980 LD R0 MINUS date separator 1B7F6 E437AC01 0 3 @ 981 ST R0 @OBPT(OBP) into buffer 1B7F7 18C40001 3 IMM 982 ADD OBP 1 bump up buffer pointer 983 1B7F8 60578801 1 6 BASE 984 LD R1 SP,MONTH index into MNTHTAB 1B7F9 3823B836 0 1 985 LEA R0 MNTHTAB(R1-1) get location of month name 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 139 (RDUOSUB) F 16 Output subroutines 1B7FA 60440003 1 IMM 986 LD R1 3 3 chars to move 1B7FB 38B7AC01 2 3 @ 987 LEA R2 @OBPT(OBP) where to put it 1B7FC FE400000 988 CMOVE do it 1B7FD 18C40003 3 IMM 989 ADD OBP 3 advance pointer 990 1B7FE 6004002D 0 IMM 991 LD R0 MINUS date separator 1B7FF E437AC01 0 3 @ 992 ST R0 @OBPT(OBP) into buffer 1B800 18C40001 3 IMM 993 ADD OBP 1 advance buffer pointer 994 995 * is year in 20th century? if so remove first 2 digits 1B801 61178804 4 6 BASE 996 LD R4 SP,YEAR need year to work with 1B802 6501B835 4 997 CPR R4 CENT19 is year < 1950 1B803 FE09B807 998 JLT DIFCENT year is not in 20th century 1B804 6501B836 4 999 CPR R4 CENT20 is year > 1999 1B805 FE07B807 1000 JGE DIFCENT year is after 20th century 1B806 1104076C 4 IMM 1001 SUB R4 1900 just want last 2 digits of year 0001B807 1002 DIFCENT LABEL 1B807 E501A8ED 4 1003 ST R4 VALUE put in place for DECOUT 1B808 DC41B62D 1004 CALLNP DECOUT place in output string 1005 1B809 38B7AC01 2 3 @ 1006 LEA R2 @OBPT(OBP) pointer into buffer 1B80A 60440002 1 IMM 1007 LD R1 2 want 2 blanks now 1B80B FE580020 1008 CFILL BLANK 1B80C 18C40002 3 IMM 1009 ADD OBP 2 advance buffer pointer 1010 1011 * compute time of day 1B80D 60978803 2 6 BASE 1012 LD R2 SP,TIME get the time 1B80E 1481AC23 2 1013 DIV R2 MSECSS get rid of milliseconds 1B80F 58C40010 IMM 1014 IORPSR MODIFBIT set modified arithmetic bit 1B810 60440000 1 IMM 1015 LD R1 0 1B811 1444003C 1 IMM 1016 DIV R1 60 separate seconds and minutes 1B812 E4978806 2 6 BASE 1017 ST R2 SP,SECONDS remainder is seconds 1B813 60040000 0 IMM 1018 LD R0 0 1B814 1404003C 0 IMM 1019 DIV R0 60 separate minutes and hours 1B815 E4578807 1 6 BASE 1020 ST R1 SP,MINUTES remainder is minutes 1B816 E401A8ED 0 1021 ST R0 VALUE result is hours 1B817 58840010 IMM 1022 CLBPSR MODIFBIT unset modified arithmetic 1023 1024 * now put time into output string 1B818 DC41B62D 1025 CALLNP DECOUT hours first 1B819 6004003A 0 IMM 1026 LD R0 COLON separator 1B81A E437AC01 0 3 @ 1027 ST R0 @OBPT(OBP) present buffer address 1B81B 18C40001 3 IMM 1028 ADD OBP 1 advance buffer pointer 1029 1B81C 60178807 0 6 BASE 1030 LD R0 SP,MINUTES 1B81D 6404000A 0 IMM 1031 CPR R0 10 minutes < 10? 1B81E FE07B822 1032 JGE MINSOK minutes are big enough 1B81F 60440030 1 IMM 1033 LD R1 "0" 1B820 E477AC01 1 3 @ 1034 ST R1 @OBPT(OBP) present buffer address 1B821 18C40001 3 IMM 1035 ADD OBP 1 advance buffer pointer 0001B822 1036 MINSOK LABEL 1B822 E401A8ED 0 1037 ST R0 VALUE store minutes in VALUE 1B823 DC41B62D 1038 CALLNP DECOUT put minutes into output string 1039 1B824 5C178808 6 BASE 1040 CMZ SP,SINGLE is this a single word time 1B825 FE0DB831 1041 JNE SKPSEC if so don't need seconds 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 140 (RDUOSUB) F 16 Output subroutines 1B826 6004003A 0 IMM 1042 LD R0 COLON separator 1B827 E437AC01 0 3 @ 1043 ST R0 @OBPT(OBP) present buffer address 1B828 18C40001 3 IMM 1044 ADD OBP 1 advance buffer pointer 1045 1B829 60178806 0 6 BASE 1046 LD R0 SP,SECONDS 1B82A 6404000A 0 IMM 1047 CPR R0 10 seconds < 10? 1B82B FE07B82F 1048 JGE SECSOK seconds are big enough 1B82C 60440030 1 IMM 1049 LD R1 "0" 1B82D E477AC01 1 3 @ 1050 ST R1 @OBPT(OBP) present buffer address 1B82E 18C40001 3 IMM 1051 ADD OBP 1 advance buffer pointer 0001B82F 1052 SECSOK LABEL 1B82F E401A8ED 0 1053 ST R0 VALUE store seconds in VALUE 1B830 DC41B62D 1054 CALLNP DECOUT put seconds into output string 1055 0001B831 1056 SKPSEC LABEL 1B831 6317880B 456 BASE 1057 LD2 R4 SP,TIMER4R5 restore registers 1B832 5D1F800D 6 STAK 1058 LEAVE POP 1059 * --- 1060 1B833 A009A8ED 1061 MIDTIME PTR VALUE/BITS 20:51 points to 32 bit time 1B834 00000FFF 1062 TIMMASK VFD 000000FFF zero out first 20 bits 1B835 0000079E 1063 CENT19 VFD 1950 beginning of 20th century 1B836 000007D0 1064 CENT20 VFD 2000 beginning of 21st century 1065 0001B837 1066 MNTHTAB LABEL Table of months to be indexed into 1B837 4A616E00 1067 TEXTZ "Jan" 1B838 46656200 1068 TEXTZ "Feb" 1B839 4D617200 1069 TEXTZ "Mar" 1B83A 41707200 1070 TEXTZ "Apr" 1B83B 4D617900 1071 TEXTZ "May" 1B83C 4A756E00 1072 TEXTZ "Jun" 1B83D 4A756C00 1073 TEXTZ "Jul" 1B83E 41756700 1074 TEXTZ "Aug" 1B83F 53657000 1075 TEXTZ "Sep" 1B840 4F637400 1076 TEXTZ "Oct" 1B841 4E6F7600 1077 TEXTZ "Nov" 1B842 44656300 1078 TEXTZ "Dec" 1079 0001B843 1080 DAYTAB LABEL table of day of week 1B843 53756E00 1081 TEXTZ "Sun" 1B844 4D6F6E00 1082 TEXTZ "Mon" 1B845 54756500 1083 TEXTZ "Tue" 1B846 57656400 1084 TEXTZ "Wed" 1B847 54687500 1085 TEXTZ "Thu" 1B848 46726900 1086 TEXTZ "Fri" 1B849 53617400 1087 TEXTZ "Sat" 1088 1089 END of TIMEOUT subroutines 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 141 (RDUOSUB) F 16 Output subroutines 1091 1092 ********************************************************************************** 1093 * * 1094 * This is the BYTO routine. It is called to format for * 1095 * output a bit specifier explicitly decoded into the starting * 1096 * and ending bit. The byte specifier is expected to be in CONVAL * 1097 * when called. * 1098 * * 1099 * Eats R0:R2, sets R3. * 1100 * * 1101 ********************************************************************************** 1102 1103 BLOCK 1104 ENTRY BYTO 1105 1106 BEGFRAME 00178801 6 BASE 1107 BYTOTMP BSS 1 place to save our word 0009A451 6 ZBM 1108 BYTOSB EQU BYTOTMP/BYTESB start bit position 0009AE51 6 ZBM 1109 BYTOLB EQU BYTOTMP/BYTELEN length bits position 1110 ENDFRAME 1111 1B84A DD5F8002 6 STAK 1112 BYTO ENTRNP PUSH 1113 * 1114 * If using the old format then output a slash. However, the 1115 * new format uses a dot instead. 1116 * 1B84B 6004002F 0 IMM 1117 LD R0 SLASH first, output a slash 1B84C 5C01AAC0 1118 CMZ USINGNEW new format ?? 1B84D FE03B84F 1119 JEQ BYTO10 no, we have what we want (slash) 1120 * \ / 1B84E 6004002E 0 IMM 1121 LD R0 DOT new format, we want a dot instead 0001B84F 1122 BYTO10 LABEL 1B84F E437AC01 0 3 @ 1123 ST R0 @OBPT(OBP) as a separator 1B850 18C40001 3 IMM 1124 ADD OBP 1 advance buffer pointer 1B851 6001A8F0 0 1125 LD R0 CONVAL get the word to use 1B852 E4178801 0 6 BASE 1126 ST R0 SP,BYTOTMP save for later use 1B853 EC0A3960 0 CBM 1127 STZ R0/BYTEXTRA clear any displacement 1B854 E401A8ED 0 1128 ST R0 VALUE set up for symbol search 1B855 6009AE51 0 6 ZBM 1129 LD R0 SP,BYTOLB get the byte length 1B856 FA23B85D 0 1130 DRJ R0 BYTO20 jump if multi-bits 1B857 6005CD29 0 IMM 1131 LD R0 ADR(MESBIT) this is a one-bit field 1B858 DC41B87B 1132 CALLNP MESSMOVE move the 'BIT' message 1B859 6009A451 0 6 ZBM 1133 LD R0 SP,BYTOSB get the start bit 1B85A E401A8ED 0 1134 ST R0 VALUE that is the one to output 1B85B DC41B62D 1135 CALLNP DECOUT just use decimal output 1B85C 5D1F8002 6 STAK 1136 LEAVE POP 1137 * --- 1138 0001B85D 1139 BYTO20 LABEL 1B85D 6005CD2B 0 IMM 1140 LD R0 ADR(MESBITS) this one sez 'BITS' 1B85E DC41B87B 1141 CALLNP MESSMOVE shift into buffer 1B85F 6009A451 0 6 ZBM 1142 LD R0 SP,BYTOSB get the start bit 1B860 E401A8ED 0 1143 ST R0 VALUE set the value to output 1B861 DC41B62D 1144 CALLNP DECOUT just use decimal output 1B862 6004003A 0 IMM 1145 LD R0 COLON oh, get a separator 1B863 E437AC01 0 3 @ 1146 ST R0 @OBPT(OBP) for looks 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 142 (RDUOSUB) F 16 Output subroutines 1B864 18C40001 3 IMM 1147 ADD OBP 1 1B865 6009A451 0 6 ZBM 1148 LD R0 SP,BYTOSB get start bit again 1B866 1809AE51 0 6 ZBM 1149 ADD R0 SP,BYTOLB add the length 1B867 1804001F 0 IMM 1150 ADD R0 NBPW-1 bias for zero case 1B868 7804001F 0 IMM 1151 AND R0 NBPW-1 allow for wrap-around 1B869 E401A8ED 0 1152 ST R0 VALUE now we can use it 1B86A DC41B62D 1153 CALLNP DECOUT now put out the end bit 1B86B 5D1F8002 6 STAK 1154 LEAVE POP 1155 * --- 1156 1157 END of BYTO subroutine 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 143 (RDUOSUB) F 16 Output subroutines 1159 1160 ********************************************************************************** 1161 * * 1162 * This is the BLANKOUT routine. It is just to blank out the * 1163 * output buffer to prevent some chaos. If you can't follow this * 1164 * you are in big trouble!!! * 1165 * Alternate entry starts at the second character into * 1166 * OBUFF. * 1167 * * 1168 * Eats R1:R2, sets R3. * 1169 * * 1170 ********************************************************************************** 1171 1172 BLOCK 1173 ENTRY BLANKOUT 1174 ENTRY BLANKOUTW 1175 1176 BEGFRAME 1177 ENDFRAME 1178 1B86C DD5F8001 6 STAK 1179 BLANKOUTW ENTRNP PUSH 1B86D 60C40001 3 IMM 1180 LD OBP 1 initialize buffer pointer 1B86E FE0FB871 1181 JMP BLNK10 then merge in 1182 * --- 1183 1B86F DD5F8001 6 STAK 1184 BLANKOUT ENTRNP PUSH 1B870 60C40000 3 IMM 1185 LD OBP 0 initialize output buffer ptr 0001B871 1186 BLNK10 LABEL 1B871 60440060 1 IMM 1187 LD R1 OKLEN how many to blank 1B872 6085A818 2 IMM 1188 LD R2 ADR(OBUFF) this is the output buffer 1B873 FE580020 1189 CFILL BLANK blank it out good 1B874 5D1F8001 6 STAK 1190 LEAVE POP 1191 * --- 1192 1193 END of BLANKOUT subroutines 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 144 (RDUOSUB) F 16 Output subroutines 1195 1196 ********************************************************************************** 1197 * * 1198 * MESSMOVE is used to move a string of text from where ever * 1199 * it is to the output buffer. The message is pointed to by R0, * 1200 * and the output buffer position is in OBP. The message must * 1201 * have a null as a terminator, which will also be moved to the * 1202 * buffer. OBP will be returned pointing to the null so that * 1203 * further messages, numbers, etc., may be appended. * 1204 * Alternate entry, MESSMOVEZ, will zero OBP at start-up. * 1205 * Alternate entry, MESSMOVEW, will set OBP to one at start-up. * 1206 * Call: * 1207 * R0 -> * 1208 * OBP = current index into output buffer * 1209 * CALLNP MESSMOVE * 1210 * OBP = index into output buffer of terminating zero * 1211 * * 1212 * Eats R1:R3. * 1213 * stack required = 1 * 1214 * * 1215 ********************************************************************************** 1216 1217 BLOCK 1218 ENTRY MESSMOVE 1219 ENTRY MESSMOVEW 1220 ENTRY MESSMOVEZ 1221 1222 BEGFRAME 1223 ENDFRAME 1224 1B875 DD5F8001 6 STAK 1225 MESSMOVEZ ENTRNP PUSH 1B876 60C40000 3 IMM 1226 LD OBP 0 zero buffer pointer 1B877 FE0FB87C 1227 JMP MM10 and merge in 1228 * --- 1229 1B878 DD5F8001 6 STAK 1230 MESSMOVEW ENTRNP PUSH 1B879 60C40001 3 IMM 1231 LD OBP 1 set buffer pointer 1B87A FE0FB87C 1232 JMP MM10 then merge in 1233 * --- 1234 1B87B DD5F8001 6 STAK 1235 MESSMOVE ENTRNP PUSH 0001B87C 1236 MM10 LABEL 1B87C 60840000 2 IMM 1237 LD R2 0 start at front of message 0001B87D 1238 MM20 LABEL 1B87D 605A1000 1 02 CACH 1239 LD R1 CACH R0,0(R2) get one character of message 1B87E FA43B882 1 1240 JEQZ R1 MMEXIT jump if time to exit 1B87F E477AC01 1 3 @ 1241 ST R1 @OBPT(OBP) stuff in the buffer 1B880 18C40001 3 IMM 1242 ADD OBP 1 advance output buffer pointer 1B881 FAA1B87D 2 1243 IRJ R2 MM20 and recycle 1244 * --- 1245 0001B882 1246 MMEXIT LABEL 1B882 5D1F8001 6 STAK 1247 LEAVE POP 1248 * --- 1249 1250 END of MESSMOVE subroutines 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 145 (RDUOSUB) F 16 Output subroutines 1252 1253 ********************************************************************************** 1254 * * 1255 * OUT will write a line to the users terminal. It * 1256 * also handles ---MORE--- processing and logging the line. * 1257 * The output line is scanned for the terminator (0), to * 1258 * determine the number of characters to write out. * 1259 * LINECNT is used to determine if the user has had more * 1260 * than a screenful of output, and if so we will wait for the * 1261 * pokey human to read what we have to say before continuing. * 1262 * Alternate entry, OUTB, is used for binary write. * 1263 * Alternate entry, OUTO, writes OBUFFF (OBP contains count * 1264 * of characters in OBUFF to be output). * 1265 * Call: * 1266 * R0 -> zero terminated message (except for OUTO) * 1267 * CALLNP OUT * 1268 * * 1269 * Eats R0:R2. * 1270 * stack required = 11 * 1271 * 4 + max ( LOGIT (7), OUT (4), OUTPROMPT ( ) * 1272 * READLINE ( ), SAVEEVENT (1) ) * 1273 * * 1274 ********************************************************************************** 1275 1276 BLOCK 1277 ENTRY OUT 1278 ENTRY OUTB 1279 ENTRY OUTO 1280 1281 BEGFRAME 00178801 6 BASE 1282 OUTFLAG BSS 1 flag for normal or binary out 00178802 6 BASE 1283 OUTTMP BSS 2 temp for output record info 1284 ENDFRAME 1285 1B883 DD5F8004 6 STAK 1286 OUTB ENTRNP PUSH 1B884 EDD78801 6 BASE 1287 STW SP,OUTFLAG set flag for binary output 1B885 FE0FB88C 1288 JMP OUT10 go merge in 1289 * --- 1290 1B886 DD5F8004 6 STAK 1291 OUTO ENTRNP PUSH 1B887 EC37AC01 3 @ 1292 STZ @OBPT(OBP) tack on a terminator 1B888 6005A818 0 IMM 1293 LD R0 ADR(OBUFF) point to output buffer 1B889 FE0FB88B 1294 JMP OUT00 then do a normal entry 1295 * --- 1296 1B88A DD5F8004 6 STAK 1297 OUT ENTRNP PUSH 0001B88B 1298 OUT00 LABEL 1B88B EC178801 6 BASE 1299 STZ SP,OUTFLAG say this is a normal write 0001B88C 1300 OUT10 LABEL 1B88C 60920000 2 0 REG 1301 LD R2 R0 save the buffer pointer 1B88D 60440060 1 IMM 1302 LD R1 OKLEN max length to check 1B88E DA1C0800 0 1 1303 SRCHI R0 R1 NULL do it to it 1B88F 30440060 1 IMM 1304 RSB R1 OKLEN get the real count 1305 1B890 BC01A915 0 1306 INCL R0 LINECNT advance line counter 1B891 6401A914 0 1307 CPR R0 LINEMAX too many for page? 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 146 (RDUOSUB) F 16 Output subroutines 1B892 FE0BB8A1 1308 JLE OUT20 jump if room for one more 1B893 5C01A914 1309 CMZ LINEMAX infinite length terminal? 1B894 FE03B8A1 1310 JEQ OUT20 if so then no problem 1311 * \ / 1312 1B895 E6578802 126 BASE 1313 ST2 R1 SP,OUTTMP save record info a moment 1B896 EC01A915 1314 STZ LINECNT say we have room to print 1B897 6005CD39 0 IMM 1315 LD R0 ADR(MOREMESS) "--more--" 1B898 DC41B88A 1316 CALLNP OUT recurse away 1B899 DC41B8C2 1317 CALLNP OUTPROMPT print the prompt and ... 1B89A EDC1A8D8 1318 STW MOREPROC say we are doing more processing 1B89B DC41B3B6 1319 CALLNP READLINE ... get the user command 1B89C EC01A8D8 1320 STZ MOREPROC done with more processing 1B89D FA4DBE47 1 1321 JNEZ R1 BAILOUT go process input if got some 1B89E 6484000D 2 IMM 1322 CPR R2 CR terminator only - check it 1B89F FE0DBE47 1323 JNE BAILOUT and if not eol then exit 1B8A0 62578802 126 BASE 1324 LD2 R1 SP,OUTTMP recover real output info 1325 * \ / 1326 0001B8A1 1327 OUT20 LABEL 1B8A1 60040040 0 IMM 1328 LD R0 FRWRITE get xreq code for write 1B8A2 5C178801 6 BASE 1329 CMZ SP,OUTFLAG normal or binary?? 1B8A3 FE03B8A5 1330 JEQ OUT40 jump if normal 1B8A4 60040042 0 IMM 1331 LD R0 FRWRITEB switch to binary 0001B8A5 1332 OUT40 LABEL 1B8A5 DC41CCC7 1333 CALLNP SAVEEVENT save the event 1B8A6 08840002 IMM 1334 FREQ LUNSOUT+XREQ and let the user see it 1B8A7 DC41CCB3 1335 CALLNP LOGIT log it 1B8A8 5D1F8004 6 STAK 1336 LEAVE POP 1337 * --- 1338 1339 END of OUT subroutines 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 147 (RDUOSUB) F 16 Output subroutines 1341 1342 ********************************************************************************** 1343 * * 1344 * These routines just print out various control characters * 1345 * to keep the terminal's prompt at the proper location. * 1346 * The entry OUTCRLF outputs a carriage return, line feed and logs it. * 1347 * The entry CRLF does a CR and LF but does not log it. * 1348 * The entry OUTCR is used to output a carriage return. * 1349 * The entry OUTLF just does a line feed. * 1350 * * 1351 * Eats R0:R2 * 1352 * * 1353 ********************************************************************************** 1354 1355 BLOCK 1356 ENTRY OUTCR 1357 ENTRY OUTCRLF 1358 ENTRY CRLF 1359 ENTRY OUTLF 1360 ENTRY MESCR 1361 1362 BEGFRAME 1363 ENDFRAME 1364 1B8A8 0000000A 1365 MESLF VFD 8:LF 1B8A9 0000000D 1366 MESCR VFD 8:CR 00000001 ABS 1367 MCRLEN EQU 1 1B8AA 0000000A 1368 MESCRLF VFD 8:CR,LF 00000002 ABS 1369 MCRLFLEN EQU 2 1370 1B8AC DD5F8001 6 STAK 1371 OUTCR ENTRNP PUSH 1B8AD 60040042 0 IMM 1372 LD R0 FRWRITEB 1B8AE 60440001 1 IMM 1373 LD R1 MCRLEN get registers for write 1B8AF 6085B8AA 2 IMM 1374 LD R2 ADR(MESCR) just a CR 1B8B0 08840002 IMM 1375 FREQ LUNSOUT+XREQ that's all there is to it! 1B8B1 5D1F8001 6 STAK 1376 LEAVE POP 1377 * --- 1378 1B8B2 DD5F8001 6 STAK 1379 OUTLF ENTRNP PUSH 1B8B3 60040042 0 IMM 1380 LD R0 FRWRITEB 1B8B4 60440001 1 IMM 1381 LD R1 MCRLEN get registers for write 1B8B5 6085B8A9 2 IMM 1382 LD R2 ADR(MESLF) just a LF 1B8B6 08840002 IMM 1383 FREQ LUNSOUT+XREQ that's all there is to it! 1B8B7 5D1F8001 6 STAK 1384 LEAVE POP 1385 * --- 1386 1B8B8 DD5F8001 6 STAK 1387 OUTCRLF ENTRNP PUSH 1B8B9 6005B8AB 0 IMM 1388 LD R0 ADR(MESCRLF) point to message 1B8BA DC41B883 1389 CALLNP OUTB list it out 1B8BB 5D1F8001 6 STAK 1390 LEAVE POP 1391 * --- 1392 1B8BC DD5F8001 6 STAK 1393 CRLF ENTRNP PUSH 1B8BD 60040042 0 IMM 1394 LD R0 FRWRITEB 1B8BE 60440002 1 IMM 1395 LD R1 MCRLFLEN set up for write 1B8BF 6085B8AB 2 IMM 1396 LD R2 ADR(MESCRLF) just a CR LF 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 148 (RDUOSUB) F 16 Output subroutines 1B8C0 08840002 IMM 1397 FREQ LUNSOUT+XREQ there they go!! 1B8C1 5D1F8001 6 STAK 1398 LEAVE POP 1399 * --- 1400 1401 END of OUTCRLF routines 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 149 (RDUOSUB) F 16 Output subroutines 1403 1404 ********************************************************************************** 1405 * * 1406 * This routine puts out a prompt if we are not running in * 1407 * interactive mode. It is used just prior to command input. * 1408 * Eats R0:R2. * 1409 * * 1410 ********************************************************************************** 1411 1412 BLOCK 1413 ENTRY OUTPROMPT 1414 1415 BEGFRAME 1416 ENDFRAME 1417 1B8C2 DD5F8001 6 STAK 1418 OUTPROMPT ENTRNP PUSH 1B8C3 5C01A8D6 1419 CMZ STATE RDU mode or port zero? 1B8C4 FE03B8CA 1420 JEQ PR00 jump if port zero 1B8C5 60040041 0 IMM 1421 LD R0 FRWRITETF RDU mode, output a prompt 1B8C6 60440005 1 IMM 1422 LD R1 PROMPTLEN tell user we are waiting 1B8C7 6085AC0D 2 IMM 1423 LD R2 ADR PROMPT "RDU:" 1B8C8 08840002 IMM 1424 FREQ LUNSOUT+XREQ make the request 1B8C9 DC41CCE5 1425 CALLNP LOGPROMPT Log the stupid prompt 0001B8CA 1426 PR00 LABEL 1B8CA 5D1F8001 6 STAK 1427 LEAVE POP 1428 * --- 1429 1430 END of OUTPROMPT subroutine 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 150 (RDUOSUB) F 16 Output subroutines 1432 1433 ********************************************************************************** 1434 * * 1435 * This is the SLOTOUT routine. It is called to output the slot * 1436 * number from SLOT and to fetch the WRU(0) for the slot and * 1437 * display that too. * 1438 * Call: * 1439 * SLOT contains slot number * 1440 * CALLNP SLOTOUT * 1441 * Eats R0:R3. Munches VALUE. * 1442 * * 1443 ********************************************************************************** 1444 1445 BLOCK 1446 ENTRY SLOTOUT 1447 1448 BEGFRAME 00178801 6 BASE 1449 SLTOTEMP BSS2 1 temp for r2 and r3 1450 ENDFRAME 1451 1B8CB DD5F8003 6 STAK 1452 SLOTOUT ENTRNP PUSH 1B8CC DC41B86C 1453 CALLNP BLANKOUTW make a new output line 1B8CD 6001A924 0 1454 LD R0 SLOT get slot to output 1B8CE E401A8ED 0 1455 ST R0 VALUE set up to decode it 1B8CF DC41B605 1456 CALLNP HEXOUTD list the slot number 1B8D0 18C40002 3 IMM 1457 ADD OBP 2 advance line pointer 1B8D1 E6978801 236 BASE 1458 ST2 R2 SP,SLTOTEMP save r2 and r3 from harm 1B8D2 DC01BBAC 1459 CALL SHIPCOM now get the WRU info 1B8D3 4101BBF5 1460 PAR RESPERROR error address 1B8D4 41440000 IMM 1461 PARV KLAS0 class=0 1B8D5 4141A924 1462 PARV SLOT slot=slot 1B8D6 41440004 IMM 1463 PARV BCMWRU bcm=4 (wru) 1B8D7 40440000 IMM 1464 PARVL 0 address=0 1B8D8 6001F38E 0 1465 LD R0 DATA(1) get the wru response 1B8D9 E401A8ED 0 1466 ST R0 VALUE put into value to output 1B8DA 6005CDEC 0 IMM 1467 LD R0 ADR(MESWRU) "Wru:" 1B8DB 62978801 236 BASE 1468 LD2 R2 SP,SLTOTEMP restore r2 and r3 1B8DC DC41B87B 1469 CALLNP MESSMOVE add to the output line 1B8DD DC41B5F1 1470 CALLNP HEXOUT and add in the wru response 1B8DE 5D1F8003 6 STAK 1471 LEAVE POP 1472 * --- 1473 1474 END of SLOTOUT subroutine 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 151 (RDUOSUB) F 16 Output subroutines 1476 1477 ********************************************************************************** 1478 * * 1479 * This is the PPSLOTO routine. It is just like SLOTOUT * 1480 * except that it adds the device id for the current ppu port. * 1481 * The slot number is output, then the wru(0), and finally the * 1482 * DID. PPUSLOT should contain the proper slot number, and * 1483 * PPUPORT the port number. * 1484 * * 1485 * Eats R0:R3. Wipes out VALUE and ADDRESS. * 1486 * * 1487 ********************************************************************************** 1488 1489 BLOCK 1490 ENTRY PPSLOTO 1491 1492 BEGFRAME 00178801 6 BASE 1493 PPSOTEMP BSS 1 temp 1494 ENDFRAME 1495 1B8DF DD5F8002 6 STAK 1496 PPSLOTO ENTRNP PUSH 1B8E0 DC41B86C 1497 CALLNP BLANKOUTW make a new line 1B8E1 6001A97E 0 1498 LD R0 PPUSLOT get the slot to use 1B8E2 E401A8ED 0 1499 ST R0 VALUE set to output the thing 1B8E3 DC41B605 1500 CALLNP HEXOUTD list the slot number 1B8E4 18C40001 3 IMM 1501 ADD OBP 1 make room 1B8E5 6001A980 0 1502 LD R0 PPUPORT now get the ppu port number 1B8E6 E401A8ED 0 1503 ST R0 VALUE set to output that 1B8E7 DC41B605 1504 CALLNP HEXOUTD also a single digit 1B8E8 18C40002 3 IMM 1505 ADD OBP 2 advance line pointer 1B8E9 E4D78801 3 6 BASE 1506 ST OBP SP,PPSOTEMP save OBP from harm 1507 1B8EA DC01BBAC 1508 CALL SHIPCOM now get the WRU info 1B8EB 4101BBF5 1509 PAR RESPERROR error address 1B8EC 41440000 IMM 1510 PARV KLAS0 class=0 1B8ED 4141A97E 1511 PARV PPUSLOT slot=ppuslot 1B8EE 41440004 IMM 1512 PARV BCMWRU bcm=4 (wru) 1B8EF 40440000 IMM 1513 PARVL 0 address=0 1B8F0 6001F38E 0 1514 LD R0 DATA(1) get the wru response 1B8F1 E401A8ED 0 1515 ST R0 VALUE put into value to output 1B8F2 6005CDEC 0 IMM 1516 LD R0 ADR(MESWRU) "Wru:" 1B8F3 60D78801 3 6 BASE 1517 LD OBP SP,PPSOTEMP restore buffer pointer 1B8F4 DC41B87B 1518 CALLNP MESSMOVE add to the output line 1B8F5 DC41B5F1 1519 CALLNP HEXOUT and output the wru response 1B8F6 18C40001 3 IMM 1520 ADD OBP 1 make a little elbow room 1B8F7 60440000 1 IMM 1521 LD R1 0 now to get the device id 1B8F8 6001A980 0 1522 LD R0 PPUPORT get the port number to use 1B8F9 E40A5840 0 1 CBM 1523 ST R0 R1/PORTSPOT set up address to read from 1B8FA E441A91F 1 1524 ST R1 ADDRESS now we can fetch our info 1B8FB E4D78801 3 6 BASE 1525 ST OBP SP,PPSOTEMP save OBP again 1B8FC DC01BBAC 1526 CALL SHIPCOM send out the read request 1B8FD 4101BBF5 1527 PAR RESPERROR error address 1B8FE 41440000 IMM 1528 PARV KLAS0 class=0 1B8FF 4141A97E 1529 PARV PPUSLOT slot=ppuslot 1B900 41440002 IMM 1530 PARV BCMREAD bcm=2 1B901 4041A91F 1531 PARVL ADDRESS address=address 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 152 (RDUOSUB) F 16 Output subroutines 1B902 6001F38E 0 1532 LD R0 DATA(1) get the did response 1B903 E401A8ED 0 1533 ST R0 VALUE ready to output 1B904 6005CE49 0 IMM 1534 LD R0 ADR(MGPDI) "Did:" 1B905 60D78801 3 6 BASE 1535 LD OBP SP,PPSOTEMP restore buffer pointer 1B906 DC41B87B 1536 CALLNP MESSMOVE add to the line 1B907 DC41B5F1 1537 CALLNP HEXOUT and finish up with the data 1B908 5D1F8002 6 STAK 1538 LEAVE POP 1539 * --- 1540 1541 END of PPSLOTO subroutine 133 134 INPUT RDUSYMB 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 153 (RDUSYMB) F 18 Symbol info support subroutines 3 4 ********************************************************************************** 5 * * 6 * This routine is called to input the source ident, subroutine, * 7 * and symbol information. It is called when the Debugger is first * 8 * entered or when the user requests a new program be loaded. The * 9 * symbol lists are initialized so that if no information is avail- * 10 * able, the lists will operate with only our internal symbols. If * 11 * more info is present, it will be brought in and the correct lists * 12 * built for later traversing. * 13 * * 14 ********************************************************************************** 15 0001B909 16 SUSTAK BASE SP stack area 17 BSS 1 return address 00178801 6 BASE 18 SUTMP BSS 2 temp for R2,R3 19 DRCT 00000003 ABS 20 SUSS EQU DISPW SUSTAK 21 ORG SUSTAK 22 1B909 DD5F8003 6 STAK 23 SETUP ENTRNP STAK SP,SUSS 1B90A 3941A986 5 24 LEA SUB TREETOP point to our symbols block 1B90B EC174800 5 BASE 25 STZ SUB,SUBFPTR zap the father 1B90C EC174802 5 BASE 26 STZ SUB,SUBSPTR the son 1B90D EC174801 5 BASE 27 STZ SUB,SUBBPTR and the holy ghost 28 * 29 * Zap some stuff in case we are using the new format. 30 * 1B90E 6145AAC8 5 IMM 31 LD SUB ADR NEWTREEHED top of tree 1B90F EC174800 5 BASE 32 STZ SUB,NEWDADPTR bye daddy 1B910 EC174801 5 BASE 33 STZ SUB,NEWBROPTR bye bro' 1B911 EC174802 5 BASE 34 STZ SUB,NEWSONPTR bye kids !! 1B912 5C01A919 35 CMZ AUXLUN do we have a symbols lun? 1B913 FE09B97E 36 JLT SUEXIT bail out now if not 37 * \ / 1B914 60040090 0 IMM 38 LD R0 FRPOSITION be sure our info is there 1B915 60420010 1 IMM 39 LD R1 DBDSKPAGE*WPP*NCPW get byte address 1B916 0881A919 40 FREQ AUXLUN(XREQ) see what lies in store 1B917 FA09B97E 0 41 JLTZ R0 SUEXIT exit if problems 1B918 FA43B97E 1 42 JEQZ R1 SUEXIT or if no data 1B919 60040030 0 IMM 43 LD R0 FRREAD now get control info 1B91A 6044005C 1 IMM 44 LD R1 NEWCNTRLLN*NCPW size of area 1B91B 6085AAA9 2 IMM 45 LD R2 ADR NEWCONTROL and place to read into 1B91C 0881A919 46 FREQ AUXLUN(XREQ) slurp it up 1B91D FA09B983 0 47 JLTZ R0 SU910 jump if an error 1B91E FA4DB983 1 48 JNEZ R1 SU910 or if funny length 49 * 50 * Now see if it is the old or new format and make a break for it. 51 * 1B91F 6001AAAD 0 52 LD R0 NEWFORMAT get the word that is supposed to tell 1B920 64040001 0 IMM 53 CPR R0 NEWFORMCOD see if it is the new format 1B921 FE03BB19 54 JEQ USENEWSTUF jump if it is new 55 * \ / 1B922 6145A986 5 IMM 56 LD SUB ADR TREETOP reset to old format 1B923 EC01AAC0 57 STZ USINGNEW say it is the old format 58 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 154 (RDUSYMB) F 18 Symbol info support subroutines 1B924 D1528000 2 REG 59 STMW R2 our memory page to start at 1B925 E4978801 2 6 BASE 60 ST R2 SP,SUTMP save current mem page num 1B926 6101AAAC 4 61 LD R4 SYMTOP get top byte of syms 1B927 15041000 4 IMM 62 DIV R4 NCPW*WPP pick up page number 1B928 60C1AAAB 3 63 LD R3 SYMSTRT get first byte of syms 1B929 14C41000 3 IMM 64 DIV R3 NCPW*WPP convert to page number 1B92A 64D24000 3 1 REG 65 CPR R3 R1 is it the same as last read? 1B92B FE03B932 66 JEQ SU50 if so then advance to next 67 * \ / 68 1B92C 6052C000 1 3 REG 69 LD R1 R3 else start at that page 1B92D 18840001 2 IMM 70 ADD R2 1 need next memory page 1B92E E4978801 2 6 BASE 71 ST R2 SP,SUTMP and remember start page 0001B92F 72 SU40 LABEL 1B92F 60040094 0 IMM 73 LD R0 FRMAPINOC now to map in a page 1B930 0881A919 74 FREQ AUXLUN(XREQ) bring it in 1B931 FA09B983 0 75 JLTZ R0 SU910 jump if any problems 76 * \ / 77 0001B932 78 SU50 LABEL 1B932 18840001 2 IMM 79 ADD R2 1 advance to next memory page 1B933 64840061 2 IMM 80 CPR R2 BOTTOM out of memory? 1B934 FE07B981 81 JGE SU900 if so then no where to go 82 * \ / 83 1B935 18440001 1 IMM 84 ADD R1 1 advance disk page number 1B936 64530000 1 4 REG 85 CPR R1 R4 done yet? 1B937 FE0BB92F 86 JLE SU40 loop back if not 1B938 60C1AAAB 3 87 LD R3 SYMSTRT done mapping, get start byte 1B939 14C40004 3 IMM 88 DIV R3 NCPW convert address to words 1B93A 78C403FF 3 IMM 89 AND R3 WPP-1 get just offset within page 1B93B 60178801 0 6 BASE 90 LD R0 SP,SUTMP get first memory page number 1B93C 1C040400 0 IMM 91 MUL R0 WPP convert to word address 1B93D 18D20000 3 0 REG 92 ADD R3 R0 and bias to that page 1B93E 6016C800 0 3 BASE 93 LD R0 R3,0 get start of global block 1B93F FA03B97E 0 94 JEQZ R0 SUEXIT exit if no info 1B940 1001AAAB 0 95 SUB R0 SYMSTRT unbias from disk address 1B941 14040004 0 IMM 96 DIV R0 NCPW convert from disk address 1B942 1812C000 0 3 REG 97 ADD R0 R3 rebias to our core address 1B943 6145A986 5 IMM 98 LD SUB ADR(TREETOP) point to our own symbol info 1B944 E4174802 0 5 BASE 99 ST R0 SUB,SUBSPTR save pointer to son 1B945 E4134000 0 5 REG 100 ST R0 SUB and then move down to new block 1B946 6096C801 2 3 BASE 101 LD R2 R3,1 get the last location 1B947 1081AAAB 2 102 SUB R2 SYMSTRT unbias from disk address 1B948 14840004 2 IMM 103 DIV R2 NCPW this is a big pain!! 1B949 1892C000 2 3 REG 104 ADD R2 R3 rebias for core address 0001B94A 105 SU70 LABEL 1B94A 39174807 4 5 BASE 106 LEA SYM SUB,SUBSBLK assume a short block 1B94B 19095834 4 5 ZBM 107 ADD SYM SUB,SUBNAMEL bias for name length 1B94C 6017400C 0 5 CACH 108 LD R0 SUB,SUBLEVEL check the lexical level 1B94D 64040001 0 IMM 109 CPR R0 1 are we at level 0 or 1? 1B94E FE05B953 110 JGT SU75 if not then go get symbols 1B94F EC094014 5 ZBM 111 STZ SUB,SUBDBSRC say no source exists 1B950 EC094214 5 ZBM 112 STZ SUB,SUBSRCLST say we don't want any listed 1B951 3917480B 4 5 BASE 113 LEA SYM SUB,SUBBLK point to the symbol info 1B952 19095834 4 5 ZBM 114 ADD SYM SUB,SUBNAMEL bias for program name length 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 155 (RDUSYMB) F 18 Symbol info support subroutines 0001B953 115 SU75 LABEL 1B953 65128000 4 2 REG 116 CPR SYM R2 are there any symbols at all??? 1B954 ED094414 5 ZBM 117 STLLT SUB,SUBSYMS remember the answer 1B955 FE07B95D 118 JGE SU95 jump out not 0001B956 119 SU80 LABEL 1B956 60491F10 1 4 ZBM 120 LD R1 SYM,SYMLEN now get this block's length 1B957 18530000 1 4 REG 121 ADD R1 SYM make a pointer to next 1B958 64528000 1 2 REG 122 CPR R1 R2 is this the last? 1B959 FE07B95C 123 JGE SU90 jump if so - done!! 1B95A E4491F10 1 4 ZBM 124 ST R1 SYM,SYMPTR else link into list 1B95B FB37B956 4 125 LJNA SYM SU80 and cycle around 126 * --- 127 0001B95C 128 SU90 LABEL 1B95C EC091F10 4 ZBM 129 STZ SYM,SYMPTR make this list end 0001B95D 130 SU95 LABEL 1B95D E5528000 5 2 REG 131 ST SUB R2 advance our cut-off pointer 1B95E 6001AAAB 0 132 LD R0 SYMSTRT get disk base address 1B95F 60440004 1 IMM 133 LD R1 NCPW prepare for division 1B960 5C174800 5 BASE 134 CMZ SUB,SUBFPTR does this guy have a daddy??? 1B961 FE03B965 135 JEQ SU100 jump if non-pointer 136 * \ / 137 1B962 B0174800 0 5 BASE 138 RSBM R0 SUB,SUBFPTR unbias the father pointer 1B963 B4574800 1 5 BASE 139 RDVM R1 SUB,SUBFPTR finish the job 1B964 98D74800 3 5 BASE 140 ADDM R3 SUB,SUBFPTR rebias to our base core address 0001B965 141 SU100 LABEL 1B965 5C174801 5 BASE 142 CMZ SUB,SUBBPTR is this guy an only child? 1B966 FE03B96A 143 JEQ SU110 144 * \ / 145 1B967 B0174801 0 5 BASE 146 RSBM R0 SUB,SUBBPTR do same thing for brother ptr 1B968 B4574801 1 5 BASE 147 RDVM R1 SUB,SUBBPTR get completely clean 1B969 98D74801 3 5 BASE 148 ADDM R3 SUB,SUBBPTR rebias 0001B96A 149 SU110 LABEL 1B96A 5C174802 5 BASE 150 CMZ SUB,SUBSPTR is there an offspring? 1B96B FE03B971 151 JEQ SU120 1B96C B0174802 0 5 BASE 152 RSBM R0 SUB,SUBSPTR now convert the son 1B96D B4574802 1 5 BASE 153 RDVM R1 SUB,SUBSPTR complete the clean-up 1B96E 98D74802 3 5 BASE 154 ADDM R3 SUB,SUBSPTR 1B96F 61574802 5 5 BASE 155 LD SUB SUB,SUBSPTR if son exists, play with him next 1B970 FE0FB94A 156 JMP SU70 head on back around 157 * --- 158 0001B971 159 SU120 LABEL 1B971 5C174801 5 BASE 160 CMZ SUB,SUBBPTR is there a brother? 1B972 FE03B975 161 JEQ SU130 jump if not 1B973 61574801 5 5 BASE 162 LD SUB SUB,SUBBPTR if so, then fix him up next 1B974 FE0FB94A 163 JMP SU70 164 * --- 165 0001B975 166 SU130 LABEL 1B975 5C174800 5 BASE 167 CMZ SUB,SUBFPTR is this guy an orphan?? 1B976 FE03B97C 168 JEQ SU140 then go give him a dad 1B977 61574800 5 5 BASE 169 LD SUB SUB,SUBFPTR no son or brother, back up some 1B978 5C174801 5 BASE 170 CMZ SUB,SUBBPTR does father have a brother? 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 156 (RDUSYMB) F 18 Symbol info support subroutines 1B979 FE03B975 171 JEQ SU130 jump if not 1B97A 61574801 5 5 BASE 172 LD SUB SUB,SUBBPTR else fix up his brother next 1B97B FE0FB94A 173 JMP SU70 174 * --- 175 0001B97C 176 SU140 LABEL 1B97C 6005A986 0 IMM 177 LD R0 ADR(TREETOP) point to our own symbols 1B97D E4174800 0 5 BASE 178 ST R0 SUB,SUBFPTR give our last guy a father 0001B97E 179 SUEXIT LABEL 1B97E 6145A986 5 IMM 180 LD SUB ADR(TREETOP) point to head of symbols 1B97F E541A928 5 181 ST SUB SUBPC remember our tree-house 0001B980 182 SUEXIT2 LABEL 1B980 5D1F8003 6 STAK 183 LEAVE STAK SP,SUSS return from this madness 184 * --- 185 0001B981 186 SU900 LABEL 1B981 6005D312 0 IMM 187 LD R0 ADR(ERM600) "Too many symbols for Debugger" 1B982 FE0FBE35 188 JMP RDUERR 189 * --- 190 0001B983 191 SU910 LABEL 1B983 6005D31B 0 IMM 192 LD R0 ADR(ERM601) "Bad block in symbol information" 1B984 FE0FBE35 193 JMP RDUERR 194 * --- 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 157 (RDUSYMB) F 18 Symbol info support subroutines 196 197 ********************************************************************************** 198 * * 199 * This is the SYMGET routine. It is called to fetch * 200 * a symbol from the input line and look it up in the * 201 * symbol tables. It returns pointers to the symbol * 202 * block found or an error code. * 203 * It calls SYMSCAN to search for the symbol in the * 204 * current subprogram block, or SYMLOOK if the user * 205 * specifies a particular subprogram which is located * 206 * with the SUBLOOK routine. * 207 * Call: * 208 * BUFPT -> input buffer * 209 * CALLNP SYMGET * 210 * JNEZ R0 symbol not found, R0 -> error message * 211 * R2 contains FI code. * 212 * Returns: SYM pointing to symbol entry if found * 213 * SUB pointing to subprogram block symbol is in * 214 * Eats R0:R5. * 215 * * 216 ********************************************************************************** 217 218 1B985 DD5F8001 6 STAK 219 SYMGET ENTRNP STAK SP,1 1B986 6141A928 5 220 LD SUB SUBPC start with current subprogram 1B987 DC41B33C 221 CALLNP FETCHAP go pick up symbol from line 1B988 F2AFB9A0 2 222 JBF R2/TALPH SG92 jump if not alpha symbol 223 * 224 * Set SUB with the proper tree head pointer. If using the new 225 * format the point to NEWTREEHED else point to TREETOP for the 226 * old format. 227 * 1B989 6145A986 5 IMM 228 LD SUB ADR(TREETOP) point to our whole tree 1B98A 5C01AAC0 229 CMZ USINGNEW new format ?? 1B98B FE03B98D 230 JEQ NEWSG05 skip over next load if not 231 * \ / 1B98C 6145AAC8 5 IMM 232 LD SUB ADR NEWTREEHED point to entire tree 0001B98D 233 NEWSG05 LABEL 1B98D 6444003A 1 IMM 234 CPR R1 COLON is terminator a colon? 1B98E FE0DB99A 235 JNE SG40 if not, then this is symbol name 236 * \ / 237 0001B98F 238 SG10 LABEL 1B98F DC41B9F5 239 CALLNP SUBLOOKS look for the subprogram name 1B990 FB43B99E 5 240 JEQZ SUB SG91 or at least it was supposed to be 1B991 DC41B39C 241 CALLNP GETCHAR skip past the colon 1B992 DC41B33C 242 CALLNP FETCHAP now get the symbol 1B993 F2AFB9A3 2 243 JBF R2/TALPH SG93 this is subject to same limits 1B994 6444003A 1 IMM 244 CPR R1 COLON is this also a subprogram? 1B995 FE03B98F 245 JEQ SG10 if so then go 'round again 1B996 DC41B9B5 246 CALLNP SYMLOOK see if symbol exists for this 1B997 FB03B99C 4 247 JEQZ SYM SG90 jump if symbol not found 0001B998 248 SG20 LABEL 1B998 60040000 0 IMM 249 LD R0 0 say we have no error 0001B999 250 SGEXIT LABEL 1B999 5D1F8001 6 STAK 251 LEAVE STAK SP,1 and exit from this dump 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 158 (RDUSYMB) F 18 Symbol info support subroutines 252 * --- 253 0001B99A 254 SG40 LABEL 1B99A DC41BA46 255 CALLNP SYMSCAN see if we can locate this symbol 1B99B FB0DB998 4 256 JNEZ SYM SG20 jump if we found it!! 0001B99C 257 SG90 LABEL 1B99C 6005D322 0 IMM 258 LD R0 ADR ERM700 "Symbol not found" 1B99D FE0FB9A4 259 JMP SG95 260 * --- 261 0001B99E 262 SG91 LABEL 1B99E 6005D33D 0 IMM 263 LD R0 ADR ERM704 "Subprogram not found" 1B99F FE0FB9A4 264 JMP SG95 265 * --- 266 0001B9A0 267 SG92 LABEL 1B9A0 60840200 2 IMM 268 LD R2 1*TNUM pretend may have a number 1B9A1 6005D32E 0 IMM 269 LD R0 ADR ERM702 "Expecting symbol name" 1B9A2 FE0FB999 270 JMP SGEXIT 271 * --- 272 0001B9A3 273 SG93 LABEL 1B9A3 6005D32E 0 IMM 274 LD R0 ADR ERM702 "Expecting symbol name" 0001B9A4 275 SG95 LABEL 1B9A4 60840000 2 IMM 276 LD R2 1*TERR this time it's a real error 1B9A5 FE0FB999 277 JMP SGEXIT 278 * --- 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 159 (RDUSYMB) F 18 Symbol info support subroutines 280 281 ********************************************************************************** 282 * * 283 * This is the SYMSET routine. It is called with the * 284 * subprogram block pointer set up pointing to a block * 285 * which is to have its symbol list searched. This routine * 286 * determines if the subprogram block is a big or little * 287 * one and sets up the SYM pointer accordingly. It also * 288 * checks for an empty symbols list, and returns SYM = 0 * 289 * if that is the case. * 290 * * 291 * For the new format, all we must do is obtain the pointer * 292 * from the current subprogram block pointed to by SUB. * 293 * * 294 * * 295 * Eats R0, sets R4. * 296 * NOTE: R2 must be set to entry value on exit. * 297 * * 298 ********************************************************************************** 299 300 1B9A6 DD5F8001 6 STAK 301 SYMSET ENTRNP STAK SP,1 302 * 303 * If using new format then go set SYM our own way. 304 * 1B9A7 5C01AAC0 305 CMZ USINGNEW new format ?? 1B9A8 FE0DB9B3 306 JNE NEWSYMSET yep, go to it 307 * \ / 308 * 309 * Use old format. 310 * 1B9A9 61040000 4 IMM 311 LD SYM 0 preset SYM pointer 1B9AA 5C094414 5 ZBM 312 CMZ SUB,SUBSYMS be sure there are symbols 1B9AB FE03B9B2 313 JEQ SYMSEXIT jump if no symbols 314 * \ / 315 1B9AC 3917480B 4 5 BASE 316 LEA SYM SUB,SUBBLK pretend we have a normal block 1B9AD 6017400C 0 5 CACH 317 LD R0 SUB,SUBLEVEL now check the level 1B9AE 64040001 0 IMM 318 CPR R0 1 levels 0 and 1 are bigger 1B9AF FE0BB9B1 319 JLE SYMS10 exit if guess was correct 1B9B0 39174807 4 5 BASE 320 LEA SYM SUB,SUBSBLK else change our mind 0001B9B1 321 SYMS10 LABEL 1B9B1 19095834 4 5 ZBM 322 ADD SYM SUB,SUBNAMEL bias for size of name 0001B9B2 323 SYMSEXIT LABEL 1B9B2 5D1F8001 6 STAK 324 LEAVE STAK SP,1 and return to caller 325 * --- 326 * 327 * All we need to do with the new format is grab the symbol pointer 328 * from the current subprogram block pointed to by SUB. If there are 329 * no symbols, the pointer will be nil (0). 330 * 0001B9B3 331 NEWSYMSET LABEL 1B9B3 61174803 4 5 BASE 332 LD SYM SUB,NEWSYMPTR grab it 1B9B4 FE0FB9B2 333 JMP SYMSEXIT and return 334 * --- 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 160 (RDUSYMB) F 18 Symbol info support subroutines 336 337 ********************************************************************************** 338 * * 339 * This is the SYMLOOK subroutine. It is called to search * 340 * the symbol table of the user-routine pointne to by SUB * 341 * looking for a symbol which matches that in SBUFF. If * 342 * found, SYM will be returned pointing to the block that * 343 * matches. If no match is found, SYM will be 0. * 344 * * 345 * The code for the new format must convert the ASCII symbol * 346 * to the special packed format and then search for a match. * 347 * The symbol list must be searched using the RELSH instruction * 348 * instead of the LSRCH instruction. * 349 * * 350 * Eats R0:R1, sets R4. * 351 * * 352 * NOTE: R2 and R3 must be restored to entry values on exit. * 353 * * 354 ********************************************************************************** 355 356 BLOCK 357 358 ENTRY SYMLOOK 359 360 BEGFRAME 00178801 6 BASE 361 SYMLR2SAVE BSS 2 just what it says, saves R2,R3 00178803 6 BASE 362 RELLINK BSS 1 relative link 00178804 6 BASE 363 SYMLLENGTH BSS 1 length word for compare 364 ENDFRAME 365 1B9B5 DD5F8005 6 STAK 366 SYMLOOK ENTRNP PUSH set stack frame 1B9B6 DC41B9A6 367 CALLNP SYMSET set up symbol list pointer 1B9B7 E6978801 236 BASE 368 ST2 R2 SP,SYMLR2SAVE save them both 369 * 370 * If using the new format then we must search very differently. 371 * 1B9B8 5C01AAC0 372 CMZ USINGNEW new format ?? 1B9B9 FE0DB9C9 373 JNE NEWSYML10 yes, go to it 374 * \ / 375 * 376 * Search the old way. 377 * 0001B9BA 378 SYML10 LABEL 1B9BA 6001A830 0 379 LD R0 SBUFFW get first word of symbol to find 1B9BB 3C170802 0 4 BASE 380 LSRCH R0 SYM,SYMNAME give it a go 1B9BC FE0DB9C5 381 JNE SYMLEXIT jump if not a match 382 * \ / 383 384 * The first part of the name is a match. Check the rest of it. 1B9BD 60490630 1 4 ZBM 385 LD R1 SYM,SYMNAMEL get length of name 1B9BE 6441A8EB 1 386 CPR R1 SBL is it the same length? 1B9BF FE0DB9C7 387 JNE SYML40 jump if not - move on 1B9C0 FA43B9C5 1 388 JEQZ R1 SYMLEXIT if one word then all done!!! 0001B9C1 389 SYML20 LABEL 1B9C1 601D0802 0 41 BASE 390 LD R0 SYM,SYMNAME(R1) get a word of the name 1B9C2 6423A830 0 1 391 CPR R0 SBUFFW(R1) how does it match what we want? 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 161 (RDUSYMB) F 18 Symbol info support subroutines 1B9C3 FE0DB9C7 392 JNE SYML40 move along if not perfect 1B9C4 FA67B9C1 1 393 JDR R1 SYML20 continue the compare if ok so far 394 * \ / 395 0001B9C5 396 SYMLEXIT LABEL 1B9C5 62978801 236 BASE 397 LD2 R2 SP,SYMLR2SAVE reset them both 1B9C6 5D1F8005 6 STAK 398 LEAVE POP return home 399 * --- 400 0001B9C7 401 SYML40 LABEL 1B9C7 FB37B9BA 4 402 LJNA SYM SYML10 advance to next and go try again 1B9C8 FE0FB9C5 403 JMP SYMLEXIT sorry about that 404 * --- 405 ********************************************************************************** 406 * * 407 * The symbol tree is linked together using relative links from the * 408 * beginning of the first block. However, since 0 is a nil pointer, * 409 * the very first location (the real zeroeth one) is considered to * 410 * be location 1. There is a special instruction, RELSH, to search * 411 * lists of this type. The rest of the comments will step through * 412 * the details of the process. * 413 * * 414 ********************************************************************************** 415 * 416 * First we convert the ASCII symbol to the special packed format 417 * 0001B9C9 418 NEWSYML10 LABEL start here 1B9C9 6001A8EB 0 419 LD R0 SBL symbol length in words - 1 1B9CA 18040001 0 IMM 420 ADD R0 1 symbol length in words 1B9CB 1C040004 0 IMM 421 MUL R0 CPW turn into characters 1B9CC 50040020 0 IMM 422 MIN R0 MAXSYMCHRS make sure we didn't get too big 1B9CD 6045A830 1 IMM 423 LD R1 ADR SBUFFW the ASCII buffer 1B9CE 38564000 1 1 CACH 424 LEA R1 CACH R1,0 character address of the ASCII buffer 1B9CF DC01BB7E 425 CALL ASCII2PAKD ask nicely for the conversion 1B9D0 41520000 0 REG 426 PARV R0 pass the length 1B9D1 40524000 1 REG 427 PARVL R1 pass the character address 428 * 429 * Calculate the number of words needed to hold this symbol in the 430 * packed form and save the answer for later. 431 * 1B9D2 6041AA98 1 432 LD R1 SRCHBUFLN number of packed characters 1B9D3 1C440006 1 IMM 433 MUL R1 PAKCHRBITS make the number of total bits needed 1B9D4 60040000 0 IMM 434 LD R0 0 zap front word for divide 1B9D5 58C40010 IMM 435 IORPSR MODIFBIT say we want funny math 1B9D6 14040020 0 IMM 436 DIV R0 NBPW divide by bits per word 1B9D7 58440010 IMM 437 XORPSR MODIFBIT normallicy returns 1B9D8 FA43B9DA 1 438 JEQZ R1 SYMXACTFIT no remainder 439 * \ / 1B9D9 60161001 0 0 REG 440 LD R0 R0+1 we need an extra full word 0001B9DA 441 SYMXACTFIT LABEL 1B9DA E4178804 0 6 BASE 442 ST R0 SP,SYMLLENGTH save it for later fun 443 * 444 * Now we shall search for the first character being a match. Note 445 * the RELSH instruction needs the base address to be 1 less than the 446 * real base address because the first entry is location 1 and not 447 * location 0. This is because 0 is still the indication of a list 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 162 (RDUSYMB) F 18 Symbol info support subroutines 448 * end (the nil relative pointer). Note that R3 is zapped by the 449 * RELSH instruction if we use R2 as our offset register. 450 * 1B9DB 60840001 2 IMM 451 LD R2 1 the first location 0001B9DC 452 LOOK4MATCH LABEL 1B9DC 60174803 0 5 BASE 453 LD R0 SUB,NEWSYMPTR real base address of symbol list 1B9DD 10040001 0 IMM 454 SUB R0 1 bias it down for the RELSH instruction 1B9DE 6051AA9A 1 @ 455 LD R1 @SRCHBUFFPT get the first character 1B9DF 5D888064 2 ZBM 456 RELSH R2,NEWSYMNAME go !! 1B9E0 FA83B9F3 2 457 JEQZ R2 NOMATCH if nil pointer then we didn't find anything !! 458 * \ / 459 * 460 * We have a candidate, the first chars match. Next see if the 461 * length in words to hold these symbols is the same. If not 462 * then go to the next symbol (if any). If so then do a string 463 * compare to obtain the real answer 464 * 1B9E1 E4978803 2 6 BASE 465 ST R2 SP,RELLINK save the register for awhile 1B9E2 18920000 2 0 REG 466 ADD R2 R0 make the real address of the current block 1B9E3 60088061 0 2 ZBM 467 LD R0 R2,NEWSYMNAMEL get length of symbol in words, cannot be 0 1B9E4 10040001 0 IMM 468 SUB R0 1 bias down to skip case word 1B9E5 64178804 0 6 BASE 469 CPR R0 SP,SYMLLENGTH match what we computed ?? 1B9E6 FE0DB9EB 470 JNE SYMLBAIL if not then bail out now, they cannot match 471 * \ / 1B9E7 1C040004 0 IMM 472 MUL R0 CPW make a character count 1B9E8 6045AA92 1 IMM 473 LD R1 ADR SRCHBUFF address of symbol we are looking for 1B9E9 38888064 2 2 ZBM 474 LEA R2 R2,NEWSYMNAME address of symbol we are looking at 1B9EA DA508000 1 20 475 CMSTR R1 R2 R0 compare 'em 0001B9EB 476 SYMLBAIL LABEL 1B9EB 61178803 4 6 BASE 477 LD SYM SP,RELLINK get the relative link 1B9EC 19174803 4 5 BASE 478 ADD SYM SUB,NEWSYMPTR add to base 1B9ED 11040001 4 IMM 479 SUB SYM 1 bias it back 1B9EE FA03B9C5 0 480 JEQZ R0 SYMLEXIT if R0 is 0 then the compare worked 481 * \ / 482 * 483 * This is not the name we want. Get the next relative link and 484 * jump back into the main loop. 485 * 1B9EF 61091F10 4 4 ZBM 486 LD SYM SYM,NEWNEXTSYM get the sucker 1B9F0 FB03B9C5 4 487 JEQZ SYM SYMLEXIT nil pointer, we are done 488 * \ / 1B9F1 60930000 2 4 REG 489 LD R2 SYM put new offset into useable register 1B9F2 FE0FB9DC 490 JMP LOOK4MATCH and go look at some more 491 * --- 492 * 493 * The RELSH instruction found no matches 494 * 0001B9F3 495 NOMATCH LABEL 1B9F3 61040000 4 IMM 496 LD SYM 0 zap the pointer 1B9F4 FE0FB9C5 497 JMP SYMLEXIT and leave now 498 * --- 499 500 END 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 163 (RDUSYMB) F 18 Symbol info support subroutines 502 503 ********************************************************************************** 504 * * 505 * The SUBLOOKS entry is used for successive calls which * 506 * must have SUB pointing to a tree node which is to serve as the * 507 * top of a sub-program tree. We look for a match with the * 508 * symbol in SBUFF. If a match is found, SUB is returned * 509 * pointing to the matching subprogram block. If no match is * 510 * found, SUB is returned with 0. * 511 * * 512 * Eats R0:R2. * 513 * * 514 ********************************************************************************** 515 516 BLOCK 517 518 ENTRY SUBLOOKS 519 520 BEGFRAME 00178801 6 BASE 521 TOPNODE BSS 1 top node of tree we are searching 00178802 6 BASE 522 SUBLENGTH BSS 1 length word for compare 523 ENDFRAME 524 1B9F5 DD5F8003 6 STAK 525 SUBLOOKS ENTRNP PUSH look again from current SUB 526 * 527 * Just as we must look for symbols differently, we must search 528 * for subprogram blocks differently if we are using the new format. 529 * 1B9F6 5C01AAC0 530 CMZ USINGNEW new format ?? 1B9F7 FE0DBA05 531 JNE NEWSUBLOOK si, go do it 532 * \ / 533 * 534 * Using the old format. 535 * 1B9F8 60934000 2 5 REG 536 LD R2 SUB save top node of tree 0001B9F9 537 SUBL10 LABEL 1B9F9 60495834 1 5 ZBM 538 LD R1 SUB,SUBNAMEL first be sure length is same 1B9FA 6441A8EB 1 539 CPR R1 SBL same length? 1B9FB FE0DBA01 540 JNE SUBL40 if not then forget it 0001B9FC 541 SUBL20 LABEL 1B9FC 601D4806 0 51 BASE 542 LD R0 SUB,SUBNAME(R1) get part of name 1B9FD 6423A830 0 1 543 CPR R0 SBUFFW(R1) does it match user input? 1B9FE FE0DBA01 544 JNE SUBL40 if not then try another 1B9FF FA67B9FC 1 545 JDR R1 SUBL20 verify entire name 546 * \ / 547 1BA00 5D1F8003 6 STAK 548 LEAVE POP return our report 549 * --- 550 0001BA01 551 SUBL40 LABEL 1BA01 DC01BA27 552 CALL SUBNEXT advance to next subprogram 1BA02 40528000 2 REG 553 PARVL R2 pass limiting node 1BA03 FB4DB9F9 5 554 JNEZ SUB SUBL10 see if there is one 555 * \ / 0001BA04 556 SUBLEXIT LABEL 1BA04 5D1F8003 6 STAK 557 LEAVE POP else return bad news 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 164 (RDUSYMB) F 18 Symbol info support subroutines 558 * --- 559 ********************************************************************************** 560 * * 561 * Here we are seaching through the subprogram tree structure for * 562 * the subprogram that we want. We call SUBNEXT to get the next * 563 * subprogram for us. Look until we find one or run out of them. * 564 * * 565 ********************************************************************************** 566 * 567 * First convert the ASCII buffer to the special packed format 568 * and then compare to the current subprogram name. If no match 569 * is found then call to get the next subprogram and try again. 570 * 0001BA05 571 NEWSUBLOOK LABEL start here 572 * 573 * Convert the ASCII buffer to packed format 574 * 1BA05 E5578801 5 6 BASE 575 ST SUB SP,TOPNODE save this for awhile 1BA06 6001A8EB 0 576 LD R0 SBL length of ASCII symbol in words - 1 1BA07 60161001 0 0 REG 577 LD R0 R0+1 length of ASCII symbol in words 1BA08 1C040004 0 IMM 578 MUL R0 CPW characters to convert 1BA09 50040020 0 IMM 579 MIN R0 MAXSYMCHRS make sure we didn't get too big 1BA0A 6045A830 1 IMM 580 LD R1 ADR SBUFFW word address of ASCII buffer 1BA0B 38564000 1 1 CACH 581 LEA R1 CACH R1,0 make a character pointer out of it 1BA0C DC01BB7E 582 CALL ASCII2PAKD go convert it 1BA0D 41520000 0 REG 583 PARV R0 convert this many chars 1BA0E 40524000 1 REG 584 PARVL R1 from this buffer 585 * 586 * Now compute the length in words that the packed subprogram 587 * name will need and save for a later compare. 588 * 1BA0F 6041AA98 1 589 LD R1 SRCHBUFLN get length in packed chars 1BA10 1C440006 1 IMM 590 MUL R1 PAKCHRBITS make into bits 1BA11 60040000 0 IMM 591 LD R0 0 ready for divide 1BA12 58C40010 IMM 592 IORPSR MODIFBIT set funny math 1BA13 14040020 0 IMM 593 DIV R0 NBPW divide by bits per word 1BA14 58440010 IMM 594 XORPSR MODIFBIT normallicy returns 1BA15 FA43BA17 1 595 JEQZ R1 SUBXACTFIT exactly correct 596 * \ / 1BA16 60161001 0 0 REG 597 LD R0 R0+1 remainder so add another whole word 0001BA17 598 SUBXACTFIT LABEL 1BA17 E4178802 0 6 BASE 599 ST R0 SP,SUBLENGTH save it 600 * 601 * The loop that compares 602 * 603 * \ / 0001BA18 604 NEWSUBL10 LABEL 605 * 606 * We have a possible match. First check for equal word lengths. 607 * If words lengths are unequal then bail out with no match. 608 * If they are equal then do a string compare to see if they really 609 * are identical and then take the proper action in either case. 610 * 1BA18 60094038 0 5 ZBM 611 LD R0 SUB,NEWNAMELEN get length of name 1BA19 FA03BA22 0 612 JEQZ R0 SUBLBAIL no name for this subprogram 613 * \ / 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 165 (RDUSYMB) F 18 Symbol info support subroutines 1BA1A 10040001 0 IMM 614 SUB R0 1 bias down to skip case word 1BA1B 64178802 0 6 BASE 615 CPR R0 SP,SUBLENGTH matching lengths ?? 1BA1C FE0DBA22 616 JNE SUBLBAIL no, cannot be a match 617 * \ / 1BA1D 1C040004 0 IMM 618 MUL R0 CPW make a byte count 1BA1E 6045AA92 1 IMM 619 LD R1 ADR SRCHBUFF address of packed symbol we are looking for 1BA1F 3889406A 2 5 ZBM 620 LEA R2 SUB,NEWSUBNAME address of packed name we are looking at 1BA20 DA508000 1 20 621 CMSTR R1 R2 R0 compare 'em 1BA21 FE03BA04 622 JEQ SUBLEXIT 623 * \ / 0001BA22 624 SUBLBAIL LABEL 1BA22 60178801 0 6 BASE 625 LD R0 SP,TOPNODE top of it all 1BA23 DC01BA27 626 CALL SUBNEXT next !! 1BA24 40520000 0 REG 627 PARVL R0 but don't go above here looking 1BA25 FB4DBA18 5 628 JNEZ SUB NEWSUBL10 if we found another then go check it out 629 * \ / 1BA26 FE0FBA04 630 JMP SUBLEXIT if we found no more then say goodbye 631 * --- 632 633 END 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 166 (RDUSYMB) F 18 Symbol info support subroutines 635 636 ********************************************************************************** 637 * * 638 * This is the SUBNEXT routine. It is called to move down * 639 * the subprogram tree to the next tree node. The son is the * 640 * first candidate and if none exists, then the brother is tried. * 641 * If there is neither a son nor a brother, the father's brother * 642 * is tried, and so on. * 643 * Called with SUB pointing to the last subprogram. Returns * 644 * with SUB pointing to the next subprogram in the tree or else * 645 * zero if there are no more. * 646 * * 647 * Sets R5, Eats no other registers. * 648 * * 649 ********************************************************************************** 650 0001BA27 651 SUBNSTAK BASE SP stack area 652 BSS 1 return address 00178801 6 BASE 653 SUBNTOP BSS 1 top node of sub-tree to search 654 DRCT 00000002 ABS 655 SUBNSS EQU DISPW SUBNSTAK 656 ORG SUBNSTAK 657 1BA27 DD1F8002 6 STAK 658 SUBNEXT ENTR STAK SP,SUBNSS 1BA28 C0578801 6 BASE 659 STPVL SP,SUBNTOP top node of sub-tree 660 * 661 * Get the next subprogram differently if using the new format. 662 * 1BA29 5C01AAC0 663 CMZ USINGNEW new format ?? 1BA2A FE0DBA39 664 JNE NEWSUBNEXT si, go do it 665 * \ / 666 * 667 * Old format. 668 * 1BA2B 5C174802 5 BASE 669 CMZ SUB,SUBSPTR does he have a son? 1BA2C FE03BA2F 670 JEQ SUBN20 jump if no son 1BA2D 61574802 5 5 BASE 671 LD SUB SUB,SUBSPTR else try looking in son 1BA2E FE0FBA38 672 JMP SUBNEXIT and go try again 673 * --- 674 0001BA2F 675 SUBN20 LABEL 1BA2F 5C174801 5 BASE 676 CMZ SUB,SUBBPTR does he have a brother? 1BA30 FE03BA33 677 JEQ SUBN30 jump if only-child 1BA31 61574801 5 5 BASE 678 LD SUB SUB,SUBBPTR use the brother if he exists 1BA32 FE0FBA38 679 JMP SUBNEXIT then go try this one 680 * --- 681 0001BA33 682 SUBN30 LABEL 1BA33 65578801 5 6 BASE 683 CPR SUB SP,SUBNTOP is this the top node? 1BA34 FE03BA37 684 JEQ SUBN40 if so then we crapped out 1BA35 61574800 5 5 BASE 685 LD SUB SUB,SUBFPTR dead-end. Back up to father 1BA36 FB4DBA2F 5 686 JNEZ SUB SUBN20 if we still have one! 0001BA37 687 SUBN40 LABEL 1BA37 61440000 5 IMM 688 LD SUB 0 say we did not find it 0001BA38 689 SUBNEXIT LABEL 1BA38 5D1F8002 6 STAK 690 LEAVE STAK SP,SUBNSS return home with our find 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 167 (RDUSYMB) F 18 Symbol info support subroutines 691 * --- 692 * 693 * Use the same algorithm as the code that searches the old 694 * structures to search the new structures for the next 695 * logical subprogram block. 696 * 0001BA39 697 NEWSUBNEXT LABEL 698 * 699 * Look for son. 700 * 1BA39 5C174802 5 BASE 701 CMZ SUB,NEWSONPTR any kids for him ?? 1BA3A FE03BA3D 702 JEQ SUBNNEW20 no son for him 703 * \ / 704 * 705 * Return with son. 706 * 1BA3B 61574802 5 5 BASE 707 LD SUB SUB,NEWSONPTR yes, nominate the son for duty 1BA3C FE0FBA38 708 JMP SUBNEXIT and return 709 * --- 710 * 711 * Look for brother. 712 * 0001BA3D 713 SUBNNEW20 LABEL 1BA3D 5C174801 5 BASE 714 CMZ SUB,NEWBROPTR any bro's around ?? 1BA3E FE03BA41 715 JEQ SUBNNEW30 no younger kids 716 * \ / 717 * 718 * Return with brother. 719 * 1BA3F 61574801 5 5 BASE 720 LD SUB SUB,NEWBROPTR get his bro' 1BA40 FE0FBA38 721 JMP SUBNEXIT and return 722 * --- 0001BA41 723 SUBNNEW30 LABEL 724 * 725 * If not past the top then get daddy. 726 * 1BA41 65578801 5 6 BASE 727 CPR SUB SP,SUBNTOP is this the top node 1BA42 FE03BA37 728 JEQ SUBN40 yep, can go no further 729 * \ / 1BA43 61574800 5 5 BASE 730 LD SUB SUB,NEWDADPTR get daddy 1BA44 FB4DBA3D 5 731 JNEZ SUB SUBNNEW20 look for daddy relatives if he exists 732 * \ / 733 * 734 * No one is left. 735 * 1BA45 FE0FBA37 736 JMP SUBN40 else return saying no dice 737 * --- 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 168 (RDUSYMB) F 18 Symbol info support subroutines 739 740 ********************************************************************************** 741 * * 742 * This is the SYMSCAN routine. It is used to search for a * 743 * symbol (in SBUFF) in the current subprogram symbol area or in * 744 * a parent subprogram. The symbol area pointed to by SUB is * 745 * searched first, and if no match is found, SUB is moved up * 746 * towards the global level. If a symbol match is found, SUB will * 747 * be left pointing to the subprogram entry the symbol match * 748 * occurred in, and SYM will point to the symbol entry itself. If * 749 * no match is found at all, SYM will be returned with 0. * 750 * * 751 * Eats R0:R1, sets R5. * 752 * NOTE: R2 must be set to entry value on exit. * 753 * * 754 ********************************************************************************** 755 1BA46 DD5F8001 6 STAK 756 SYMSCAN ENTRNP STAK SP,1 1BA47 6141A928 5 757 LD SUB SUBPC point to current subprogram 758 * 759 * If we can't find it in his direct fathers then we will search 760 * the entire tree looking for it. Decide which way to do it. 761 * 1BA48 5C01AAC0 762 CMZ USINGNEW new format ?? 1BA49 FE0DBA55 763 JNE NEWSYMSC10 yes, bail out of loop for a second 764 * \ / 765 * 766 * Do it the old way. 767 * 768 * \ / 0001BA4A 769 SYMSC10 LABEL 1BA4A DC41B9B5 770 CALLNP SYMLOOK look in subprogram "SUB" 1BA4B FB0DBA54 4 771 JNEZ SYM SYMSCEXIT exit if we found a match 1BA4C 61574800 5 5 BASE 772 LD SUB SUB,SUBFPTR get pointer to father block 1BA4D FB4DBA4A 5 773 JNEZ SUB SYMSC10 and look in this subprogram 1BA4E 6145A986 5 IMM 774 LD SUB ADR(TREETOP) no luck. Search entire tree 775 * 776 * Keep looking until found or tree exhausted. 777 * 778 * \ / 0001BA4F 779 SYMSC20 LABEL 1BA4F DC41B9B5 780 CALLNP SYMLOOK see if symbol is here 1BA50 FB0DBA54 4 781 JNEZ SYM SYMSCEXIT exit if we found it finally 1BA51 DC01BA27 782 CALL SUBNEXT else move to next subprogram 1BA52 40440000 IMM 783 PARVL 0 we don't care where it stops 1BA53 FB4DBA4F 5 784 JNEZ SUB SYMSC20 try this one if possible 0001BA54 785 SYMSCEXIT LABEL 1BA54 5D1F8001 6 STAK 786 LEAVE STAK SP,1 return to caller 787 * --- 788 * 789 * Get a pointer or two and resume the loop.1 790 * 0001BA55 791 NEWSYMSC10 LABEL 1BA55 DC41B9B5 792 CALLNP SYMLOOK look in subprogram "SUB" 1BA56 FB0DBA54 4 793 JNEZ SYM SYMSCEXIT exit if we found a match 794 * \ / 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 169 (RDUSYMB) F 18 Symbol info support subroutines 1BA57 61574800 5 5 BASE 795 LD SUB SUB,NEWDADPTR get daddy 1BA58 FB4DBA55 5 796 JNEZ SUB NEWSYMSC10 exit if we found a block 797 * \ / 1BA59 6145AAC8 5 IMM 798 LD SUB ADR NEWTREEHED no luck, search entire tree 1BA5A FE0FBA4F 799 JMP SYMSC20 back to normal flow 800 * --- 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 170 (RDUSYMB) F 18 Symbol info support subroutines 802 803 ********************************************************************************** 804 * * 805 * This is the RELOCATE routine. It is called to set the SUB * 806 * pointer at the proper block for the address in ADDRESS. Since * 807 * the global block covers the entire address range, there is * 808 * always a routine which will include the given address. * 809 * * 810 * Eats R0:R1 * 811 * * 812 ********************************************************************************** 813 1BA5B DD5F8001 6 STAK 814 RELOCATE ENTRNP STAK SP,1 1BA5C 6001A91F 0 815 LD R0 ADDRESS get the address we want 816 * 817 * Relocate to the proper block using either the old 818 * or new structures. 819 * 1BA5D 5C01AAC0 820 CMZ USINGNEW new format ?? 1BA5E FE0DBA6D 821 JNE NEWRELOCATE yes, go handle it 822 * \ / 823 * 824 * The old way. 825 * 1BA5F 6145A986 5 IMM 826 LD SUB ADR(TREETOP) point to the top block 0001BA60 827 RELO10 LABEL 1BA60 64095F13 0 5 ZBM 828 CPR R0 SUB,SUBBASE see if we fit here 1BA61 FE09BA68 829 JLT RELO40 jump if too low - exit 1BA62 64095F14 0 5 ZBM 830 CPR R0 SUB,SUBHIGH are we off the top?? 1BA63 FE05BA68 831 JGT RELO40 jump if so - try to advance 1BA64 60534000 1 5 REG 832 LD R1 SUB remember we can fit here 1BA65 61574802 5 5 BASE 833 LD SUB SUB,SUBSPTR get pointer to son, if any 1BA66 FB43BA6A 5 834 JEQZ SUB RELOEXIT if none, then time to leave 1BA67 FE0FBA60 835 JMP RELO10 else go check out our son 836 * --- 837 0001BA68 838 RELO40 LABEL 1BA68 61574801 5 5 BASE 839 LD SUB SUB,SUBBPTR get pointer to brother 1BA69 FB4DBA60 5 840 JNEZ SUB RELO10 jump if we do have a brother 0001BA6A 841 RELOEXIT LABEL 1BA6A 61524000 5 1 REG 842 LD SUB R1 get pointer to best fit 1BA6B E541A929 5 843 ST SUB SUBADR save in case of later need 1BA6C 5D1F8001 6 STAK 844 LEAVE STAK SP,1 and return our position 845 * --- 846 * 847 * Keep looking a subprogram blocks until we get an exact match 848 * for our address or run out of blocks to look at. We will always 849 * remember if we can fit in a block or not. 850 * 0001BA6D 851 NEWRELOCATE LABEL start here 1BA6D 6145AAC8 5 IMM 852 LD SUB ADR NEWTREEHED top of the tree 0001BA6E 853 NEWRELO10 LABEL 1BA6E 64095F17 0 5 ZBM 854 CPR R0 SUB,NEWLOWADDR check against low address 1BA6F FE09BA77 855 JLT NEWRELO40 too low 856 * \ / 1BA70 64095F18 0 5 ZBM 857 CPR R0 SUB,NEWHIGHADR check against high address 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 171 (RDUSYMB) F 18 Symbol info support subroutines 1BA71 FE05BA77 858 JGT NEWRELO40 too high 859 * \ / 1BA72 60534000 1 5 REG 860 LD R1 SUB remember that we can fit within these bounds 0001BA73 861 NEWTRYSON LABEL 1BA73 61574802 5 5 BASE 862 LD SUB SUB,NEWSONPTR go check out our kid 1BA74 60934000 2 5 REG 863 LD R2 SUB save for a second 1BA75 FB43BA6A 5 864 JEQZ SUB RELOEXIT if nil pointer then we are finished 865 * \ / 1BA76 FE0FBA6E 866 JMP NEWRELO10 go check out our son 867 * --- 0001BA77 868 NEWRELO40 LABEL 1BA77 61574801 5 5 BASE 869 LD SUB SUB,NEWBROPTR go check out our bro' 1BA78 FB4DBA6E 5 870 JNEZ SUB NEWRELO10 yes we have a brother to examine 871 * \ / 1BA79 61528000 5 2 REG 872 LD SUB R2 where we were before 1BA7A FE0FBA73 873 JMP NEWTRYSON try the son next 874 * --- 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 172 (RDUSYMB) F 18 Symbol info support subroutines 876 877 ********************************************************************************** 878 * * 879 * This is the LABELLOOK routine. It is called to search the * 880 * symbol list of the subprogram area containing the location in * 881 * ADDRSS for a symbol of type memory address. The SUB pointer is * 882 * relocated to the proper routine, and that subprogram's symbol * 883 * list is searched for a match. If found, SYM will be returned * 884 * pointing to the symbol block for the label, and if not found, * 885 * SYM will be zero. * 886 * * 887 * Eats R0:R1, sets R4,R5. * 888 * * 889 ********************************************************************************** 890 0001BA7B 891 LBLLSTAK BASE SP stack area 892 BSS 1 return address 00178801 6 BASE 893 LBLLSYM BSS 1 temp for symbol pointer 00178802 6 BASE 894 LBLLSUB BSS 1 temp for sub pointer 895 DRCT 00000003 ABS 896 LBLLSS EQU DISPW LBLLSTAK 897 ORG LBLLSTAK 898 1BA7B DD5F8003 6 STAK 899 LABELLOOK ENTRNP STAK SP,LBLLSS 1BA7C DC41BA5B 900 CALLNP RELOCATE setup to proper subprogram 1BA7D E5578802 5 6 BASE 901 ST SUB SP,LBLLSUB save the SUB pointer for exit 1BA7E EC178801 6 BASE 902 STZ SP,LBLLSYM we have no candidate yet 1BA7F 6005FFFF 0 IMM 903 LD R0 MAXADR biggest possible address 1BA80 E401A92B 0 904 ST R0 SYMBIAS save as best we have found 905 * 906 * If using the new format then do the looking differently. 907 * 1BA81 5C01AAC0 908 CMZ USINGNEW new symbol format ?? 1BA82 FE0DBA98 909 JNE NEWLBLL10 yes, go handle it 910 * \ / 911 * 912 * Use the old structures. 913 * 914 * \ / 0001BA83 915 LBLL10 LABEL 1BA83 DC41B9A6 916 CALLNP SYMSET set up symbol list pointer 1BA84 FB03BA93 4 917 JEQZ SYM LBLL40 exit if no symbols here 1BA85 60440005 1 IMM 918 LD R1 SYMTYPEGD symbol type for memory addr 0001BA86 919 LBLL20 LABEL 1BA86 64490C40 1 4 ZBM 920 CPR R1 SYM,SYMTYPE is this symbol of proper type? 1BA87 FE0DBA92 921 JNE LBLL30 ignore it if not 1BA88 5C090410 4 ZBM 922 CMZ SYM,SYMKILLED are we allowed to use this? 1BA89 FE0DBA92 923 JNE LBLL30 if not, go try another 1BA8A 60170801 0 4 BASE 924 LD R0 SYM,SYMVALUE get the symbol's value 1BA8B 3001A91F 0 925 RSB R0 ADDRESS determine distance from ours 1BA8C FA09BA92 0 926 JLTZ R0 LBLL30 ignore if greater 927 * \ / 928 1BA8D 6401A92B 0 929 CPR R0 SYMBIAS is previous one better? 1BA8E FE07BA92 930 JGE LBLL30 forget this one if so 1BA8F E401A92B 0 931 ST R0 SYMBIAS save the new winner 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 173 (RDUSYMB) F 18 Symbol info support subroutines 1BA90 FA03BA96 0 932 JEQZ R0 LBLLEXIT head out if right on 1BA91 E5178801 4 6 BASE 933 ST SYM SP,LBLLSYM remember the new winner 0001BA92 934 LBLL30 LABEL 1BA92 FB37BA86 4 935 LJNA SYM LBLL20 see if we can do better 936 * \ / 937 0001BA93 938 LBLL40 LABEL 1BA93 61574800 5 5 BASE 939 LD SUB SUB,SUBFPTR backup to our father 1BA94 FB4DBA83 5 940 JNEZ SUB LBLL10 and check that one out 941 * \ / 942 1BA95 61178801 4 6 BASE 943 LD SYM SP,LBLLSYM now pick up our winner 0001BA96 944 LBLLEXIT LABEL 1BA96 61578802 5 6 BASE 945 LD SUB SP,LBLLSUB restore SUB pointer 1BA97 5D1F8003 6 STAK 946 LEAVE STAK SP,LBLLSS return to our spawning ground 947 * --- 948 * 949 * Handle the situation just like the above code 950 * 0001BA98 951 NEWLBLL10 LABEL start here 1BA98 DC41B9A6 952 CALLNP SYMSET set up the SYM pointer 1BA99 FB03BAAC 4 953 JEQZ SYM NEWLBLL40 no symbols here, go see dear old dad for some 954 * \ / 1BA9A 60440001 1 IMM 955 LD R1 NEWMEM type code for a memory address 0001BA9B 956 NEWLBLL20 LABEL 1BA9B 64490040 1 4 ZBM 957 CPR R1 SYM,NEWSYMTYPE compare what we got with what we want 1BA9C FE0DBAA7 958 JNE NEWLBLL30 not what we want, go to next one 959 * \ / 1BA9D 5C091A10 4 ZBM 960 CMZ SYM,SKILLDBONLY is symbol dead ?? 1BA9E FE0DBAA7 961 JNE NEWLBLL30 yes, we cannot list it, keep looking 962 * \ / 1BA9F 60170802 0 4 BASE 963 LD R0 SYM,NEWSYMVALU get the acutal value of the sucker 1BAA0 3001A91F 0 964 RSB R0 ADDRESS subtract what we is looking for 1BAA1 FA09BAA7 0 965 JLTZ R0 NEWLBLL30 too far away, no use to us 966 * \ / 1BAA2 6401A92B 0 967 CPR R0 SYMBIAS is this the best guess so far ?? 1BAA3 FE07BAA7 968 JGE NEWLBLL30 no, the old one is still better 969 * \ / 1BAA4 E401A92B 0 970 ST R0 SYMBIAS our new best guess so far 1BAA5 FA03BA96 0 971 JEQZ R0 LBLLEXIT equal is as good as we can get 972 * \ / 1BAA6 E5178801 4 6 BASE 973 ST SYM SP,LBLLSYM say where we found it 0001BAA7 974 NEWLBLL30 LABEL 1BAA7 61091F10 4 4 ZBM 975 LD SYM SYM,NEWNEXTSYM get next relative link 1BAA8 FB03BAAC 4 976 JEQZ SYM NEWLBLL40 no next one 977 * \ / 1BAA9 19174803 4 5 BASE 978 ADD SYM SUB,NEWSYMPTR add in base address 1BAAA 11040001 4 IMM 979 SUB SYM 1 bias down since first location has a relative address of 1 1BAAB FE0FBA9B 980 JMP NEWLBLL20 go check out next symbol 981 * --- 0001BAAC 982 NEWLBLL40 LABEL 1BAAC 61574800 5 5 BASE 983 LD SUB NEWDADPTR see if daddy has better luck than we did 1BAAD FB4DBA98 5 984 JNEZ SUB NEWLBLL10 yes, we have a father 985 * \ / 1BAAE 61178801 4 6 BASE 986 LD SYM SP,LBLLSYM retrieve what we found 1BAAF FE0FBA96 987 JMP LBLLEXIT and return 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 174 (RDUSYMB) F 18 Symbol info support subroutines 988 * --- 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 175 (RDUSYMB) F 18 Symbol info support subroutines 990 991 ********************************************************************************** 992 * * 993 * This is the VALLOOK routine. It is called to search the * 994 * symbol tables for a symbol whose value matches that stored in * 995 * VALUE. Searching starts at the symbol table for the subprogram * 996 * pointed to by SUBADR, and backs up the father list to the * 997 * global block if necessary. If found, SYM will be left pointing * 998 * to the block which matches, and SUB will point to the * 999 * subprogram block for the symbol entry. If not found, SYM will * 1000 * be returned as 0, and SUB will be zero. Oh, the symbol type is * 1001 * also checked as well as the value, and must match the symbol * 1002 * type expected in TYPE. * 1003 * * 1004 * Eats R0, sets R4,R5. * 1005 * * 1006 ********************************************************************************** 1007 1008 BLOCK 1009 1010 ENTRY VALLOOK 1011 1012 BEGFRAME 00178801 6 BASE 1013 VALLR3SAVE BSS 1 just what it sez it is 1014 ENDFRAME 1015 1BAB0 DD5F8002 6 STAK 1016 VALLOOK ENTRNP PUSH 1BAB1 E4D78801 3 6 BASE 1017 ST R3 SP,VALLR3SAVE save the register since we zap it 1018 * 1019 * Again, we must look differently depending on what format 1020 * we are looking at. 1021 * 1BAB2 5C01AAC0 1022 CMZ USINGNEW new format ?? 1BAB3 FE0DBAC6 1023 JNE NEWVALL yes, go handle it 1024 * \ / 1025 * 1026 * Old format. 1027 * 1BAB4 6141A929 5 1028 LD SUB SUBADR point to current subprog block 1BAB5 5C01A92A 1029 CMZ SYMSFLAG do we want symbols? 1BAB6 FE0DBAB8 1030 JNE VALL10 all set if we do 1BAB7 6145A986 5 IMM 1031 LD SUB ADR(TREETOP) else allow only our predefined 0001BAB8 1032 VALL10 LABEL 1BAB8 DC41B9A6 1033 CALLNP SYMSET set up symbol list pointer 0001BAB9 1034 VALL20 LABEL 1BAB9 6001A8ED 0 1035 LD R0 VALUE get the value to locate 1BABA 3C170801 0 4 BASE 1036 LSRCH R0 SYM,SYMVALUE and see if we can find it 1BABB FE0DBAC2 1037 JNE VALL40 jump if searched list to end 1038 * \ / 1039 1BABC 6001A8F2 0 1040 LD R0 TYPE have match, check type 1BABD 64090C40 0 4 ZBM 1041 CPR R0 SYM,SYMTYPE be sure they match, too 1BABE FE0DBAC1 1042 JNE VALL30 jump if not of correct type 1BABF 5C090410 4 ZBM 1043 CMZ SYM,SYMKILLED was this one axed? 1BAC0 FE03BAC4 1044 JEQ VALLEXIT jump if we have our man (symbol) 0001BAC1 1045 VALL30 LABEL 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 176 (RDUSYMB) F 18 Symbol info support subroutines 1BAC1 FB37BAB9 4 1046 LJNA SYM VALL20 advance to next and keep trying 1047 * \ / 1048 0001BAC2 1049 VALL40 LABEL 1BAC2 61574800 5 5 BASE 1050 LD SUB SUB,SUBFPTR try looking in father block 1BAC3 FB73BAB8 5 1051 JNZA SUB VALL10 at least, if we have a father 1052 * \ / 1053 0001BAC4 1054 VALLEXIT LABEL 1BAC4 60D78801 3 6 BASE 1055 LD R3 SP,VALLR3SAVE reset R3 1BAC5 5D1F8002 6 STAK 1056 LEAVE POP and truck on home 1057 * --- 1058 * 1059 * Let's search from the current subprogram. 1060 * 0001BAC6 1061 NEWVALL LABEL 1BAC6 6141A929 5 1062 LD SUB SUBADR use current subprogram 1BAC7 5C01A92A 1063 CMZ SYMSFLAG do we want symbols ?? 1BAC8 FE0DBACA 1064 JNE NEWVALL10 yep, we are set for it 1065 * \ / 1BAC9 6145AAC8 5 IMM 1066 LD SUB ADR NEWTREEHED no, allow only the predefined ones 0001BACA 1067 NEWVALL10 LABEL 1BACA DC41B9A6 1068 CALLNP SYMSET set up the pointer 1BACB 60840001 2 IMM 1069 LD R2 1 initial relative pointer 0001BACC 1070 NEWVALL20 LABEL 1BACC 60174803 0 5 BASE 1071 LD R0 SUB,NEWSYMPTR base address of symbol list 1BACD 10040001 0 IMM 1072 SUB R0 1 bias back for relative address of 1 1BACE 6041A8ED 1 1073 LD R1 VALUE here is what we is looking for 1BACF 5D968802 2 BASE 1074 RELSH R2,NEWSYMVALU look for a matching value 1BAD0 FA83BADB 2 1075 JEQZ R2 NEWVALL40 no match, end of list found 1076 * \ / 1BAD1 18920000 2 0 REG 1077 ADD R2 R0 make a memory pointer 1BAD2 6001A8F2 0 1078 LD R0 TYPE get the type 1BAD3 64088040 0 2 ZBM 1079 CPR R0 R2,NEWSYMTYPE well ?? 1BAD4 FE0DBAD9 1080 JNE NEWVALL30 no, not what we really want 1081 * \ / 1BAD5 5C089A10 2 ZBM 1082 CMZ R2,SKILLDBONLY is this symbol killed off ?? 1BAD6 FE0DBAD9 1083 JNE NEWVALL30 if so then we cannot use it, go look for another 1084 * \ / 1085 * 1086 * We found what we wanted. Set SYM and vamoose. 1087 * 1BAD7 61128000 4 2 REG 1088 LD SYM R2 put it into the symbol pointer 1BAD8 FE0FBAC4 1089 JMP VALLEXIT and leave 1090 * --- 1091 * 1092 * Resume the search if the list is not empty. 1093 * 0001BAD9 1094 NEWVALL30 LABEL resume the linked list search 1BAD9 60889F10 2 2 ZBM 1095 LD R2 R2,NEWNEXTSYM get the next relative address 1BADA FA8DBACC 2 1096 JNEZ R2 NEWVALL20 if link is not 0 then continue 1097 * \ / 1098 * 1099 * Start a new search at daddy if we have found nothing so far. 1100 * 0001BADB 1101 NEWVALL40 LABEL 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 177 (RDUSYMB) F 18 Symbol info support subroutines 1BADB 61574800 5 5 BASE 1102 LD SUB SUB,NEWDADPTR look for daddy 1BADC FB4DBACA 5 1103 JNEZ SUB NEWVALL10 start all over with the next symbol list 1104 * \ / 1105 * 1106 * Nowhere else to look so get out with SYM pointing to nothing. 1107 * 1BADD 61040000 4 IMM 1108 LD SYM 0 say we found no one 1BADE FE0FBAC4 1109 JMP VALLEXIT get outta here 1110 * --- 1111 1112 END 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 178 (RDUSYMB) F 18 Symbol info support subroutines 1114 1115 ********************************************************************************** 1116 * * 1117 * This is the SYMOUT routine. It is used to move the name * 1118 * of the symbol entry pointed to by SYM into the output buffer * 1119 * at the position pointed to by OBP. It is quite similar to * 1120 * MESSMOVE, but moves characters until the number specified * 1121 * by the NAMEL field have been moved, or until a blank is * 1122 * encountered. OBP is left pointing to the next position in * 1123 * OBUFF. R0, R1, and R2 are clobberred. * 1124 * Call * 1125 * SYM -> symbol element * 1126 * OBP -> position in output buffer * 1127 * CALLNP SYMOUT * 1128 * Eats R0:R2, sets R3. * 1129 * * 1130 ********************************************************************************** 1131 1BADF DD5F8001 6 STAK 1132 SYMOUT ENTRNP STAK SP,1 1133 * 1134 * If using the new format then go find the symbol name 1135 * in a different way. 1136 * 1BAE0 5C01AAC0 1137 CMZ USINGNEW new format ?? 1BAE1 FE0DBAEE 1138 JNE NEWSYMOUT yes, go handle it 1139 * \ / 1140 * 1141 * Use old format. 1142 * 1BAE2 38170802 0 4 BASE 1143 LEA R0 SYM,SYMNAME point to the symbol name 1BAE3 60890630 2 4 ZBM 1144 LD R2 SYM,SYMNAMEL get length of name 1BAE4 1C840004 2 IMM 1145 MUL R2 NCPW convert to characters 1BAE5 18840004 2 IMM 1146 ADD R2 NCPW adjust for offset 1147 * 1148 * Come here with a symbol name pointed to by R0 and the count 1149 * of characters in R2. 1150 * 1151 * \ / 0001BAE6 1152 SYMO10 LABEL 1BAE6 60560000 1 0 CACH 1153 LD R1 CACH R0,0 get a character of the name 1BAE7 64440020 1 IMM 1154 CPR R1 BLANK is it a blank? 1BAE8 FE03BAED 1155 JEQ SYMOEXIT time to leave if it is 1BAE9 E477AC01 1 3 @ 1156 ST R1 @OBPT(OBP) add to string in output buffer 1BAEA D00A1F30 0 CBM 1157 INC R0/NXTCHAR advance to next character 1BAEB 18C40001 3 IMM 1158 ADD OBP 1 advance output buffer pointer 1BAEC FAA3BAE6 2 1159 DRJ R2 SYMO10 be sure we don't move too many 1160 * \ / 1161 0001BAED 1162 SYMOEXIT LABEL 1BAED 5D1F8001 6 STAK 1163 LEAVE STAK SP,1 now return to our caller 1164 * --- 1165 * 1166 * Convert the packed symbol name into an ASCII name and then 1167 * jump back to the output section. 1168 * 0001BAEE 1169 NEWSYMOUT LABEL 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 179 (RDUSYMB) F 18 Symbol info support subroutines 1BAEE DC01BB57 1170 CALL PAKD2ASCII ask nicely for conversion 1BAEF 41490061 4 ZBM 1171 PARV SYM,NEWSYMNAMEL length of the name in words including case 1BAF0 41090013 4 ZBM 1172 PAR SYM,NEWSYMCASE the case flag word address 1BAF1 40090064 4 ZBM 1173 PARL SYM,NEWSYMNAME the name address 1BAF2 6081AAA3 2 1174 LD R2 ASCIIBUFLN characters the routine found 1BAF3 6005AA9B 0 IMM 1175 LD R0 ADR ASCIIBUFF get the address of the message 1BAF4 FE0FBAE6 1176 JMP SYMO10 go combine efforts 1177 * --- 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 180 (RDUSYMB) F 18 Symbol info support subroutines 1179 1180 ********************************************************************************** 1181 * * 1182 * LABELOUT moves a label for a memory address into the * 1183 * output buffer. The label is pointed to by SYM on entry and any * 1184 * offset from SYM is passed in SYMBIAS. If the value is exactly * 1185 * right, SYMBIAS should be zero. This routine calls SYMOUT to * 1186 * output the symbol and then outputs the bias as a subscripted * 1187 * number by calling DECOUT to do the work. * 1188 * * 1189 * Call: * 1190 * SYMBIAS contains bias from symbol * 1191 * SYM -> symbol element * 1192 * OBP -> position in output buffer * 1193 * CALLNP LABELOUT * 1194 * Eats R0:R2, sets R3. * 1195 * * 1196 ********************************************************************************** 1197 1BAF5 DD5F8001 6 STAK 1198 LABELOUT ENTRNP STAK SP,1 1BAF6 DC41BADF 1199 CALLNP SYMOUT output the symbol first 1BAF7 6001A92B 0 1200 LD R0 SYMBIAS is the bias zero? 1BAF8 FA03BB01 0 1201 JEQZ R0 LBLOEXIT if so then we are done here 1202 * \ / 1203 1BAF9 E401A8ED 0 1204 ST R0 VALUE otherwise prepare to list 1BAFA 60040028 0 IMM 1205 LD R0 LPAREN get the necessary dress 1BAFB E437AC01 0 3 @ 1206 ST R0 @OBPT(OBP) neatness counts 1BAFC 18C40001 3 IMM 1207 ADD OBP 1 advance output buffer pointer 1BAFD DC41B62D 1208 CALLNP DECOUT output offset 1BAFE 60040029 0 IMM 1209 LD R0 RPAREN now for the rest of dress 1BAFF E437AC01 0 3 @ 1210 ST R0 @OBPT(OBP) this will do it 1BB00 18C40001 3 IMM 1211 ADD OBP 1 and get the hell out!! 0001BB01 1212 LBLOEXIT LABEL 1BB01 5D1F8001 6 STAK 1213 LEAVE STAK SP,1 be seeing you now! 1214 * --- 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 181 (RDUSYMB) F 18 Symbol info support subroutines 1216 1217 ********************************************************************************** 1218 * * 1219 * LOCOUT searches for a label on the statement at ADDRESS * 1220 * and moves it into the output line if one exists. It also * 1221 * outputs the hex address of the location. * 1222 * One parameter is passed as follows: * 1223 * -1 - Do not list any label * 1224 * 0 - List label only if exact match * 1225 * 1 - List label and bias * 1226 * Call: * 1227 * OBP -> current position in output buffer * 1228 * CALL LOCOUT * 1229 * PARVL bias flag * 1230 * * 1231 * Eats R0:R2,R4:R5. Sets R3. * 1232 * * 1233 ********************************************************************************** 1234 0001BB02 1235 LOCOSTAK BASE SP stack area 1236 BSS 1 return address 00178801 6 BASE 1237 LOCOFLAG BSS 1 controls label bias display 1238 DRCT 00000002 ABS 1239 LOCOSS EQU DISPW LOCOSTAK 1240 1BB04 DD1F8002 6 STAK 1241 LOCOUT ENTR STAK SP,LOCOSS 1BB05 C0578801 6 BASE 1242 STPVL SP,LOCOFLAG determines label format 1BB06 5C178801 6 BASE 1243 CMZ SP,LOCOFLAG now check our control flag 1BB07 FE09BB11 1244 JLT LOCO70 jump if not listing labels 1245 * \ / 1246 1BB08 DC41BA7B 1247 CALLNP LABELLOOK go see if this has a label 1BB09 FB03BB11 4 1248 JEQZ SYM LOCO70 jump if none found 1BB0A 5C178801 6 BASE 1249 CMZ SP,LOCOFLAG are we biasing labels? 1BB0B FE05BB0E 1250 JGT LOCO60 if so then go list now 1BB0C 5C01A92B 1251 CMZ SYMBIAS otherwise check the offset 1BB0D FE0DBB11 1252 JNE LOCO70 don't list if not exact 1253 * \ / 1254 0001BB0E 1255 LOCO60 LABEL 1BB0E DC41B86F 1256 CALLNP BLANKOUT clean up the output buffer 1BB0F DC41BAF5 1257 CALLNP LABELOUT ship out the symbol 1BB10 DC41B886 1258 CALLNP OUTO there it goes!! 0001BB11 1259 LOCO70 LABEL 1BB11 DC41B86C 1260 CALLNP BLANKOUTW re-blank output buffer 1BB12 6001A91F 0 1261 LD R0 ADDRESS get the address again 1BB13 E401A8ED 0 1262 ST R0 VALUE so we can list it out 1BB14 DC41B600 1263 CALLNP HEXOUTA tell where we are 1BB15 6004003A 0 IMM 1264 LD R0 COLON add some dress 1BB16 E437AC01 0 3 @ 1265 ST R0 @OBPT(OBP) for good looks 1BB17 18C40002 3 IMM 1266 ADD OBP 2 advance 1BB18 5D1F8002 6 STAK 1267 LEAVE STAK SP,LOCOSS now return to caller 1268 * --- 135 136 INPUT NEWSETUP 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 182 (NEWSETUP) F 19 Symbol info support subroutines 2 ********************************************************************************** 3 * * 4 * This new section of code has been added to the SETUP code * 5 * to handle the new debugger symbol format. If the fifth * 6 * word of page 128 of the code file is a 1 then the new * 7 * debugger symbol format is assumed. This code does the * 8 * following: * 9 * * 10 * 1. Converts the control block .RAF pointers to * 11 * memory addresses. * 12 * 2. Maps in all the subprogram, symbol, and * 13 * source blocks. * 14 * 3. Converts all the .RAF pointers in the subprogram * 15 * to memory addresses. * 16 * * 17 ********************************************************************************** 18 0001BB19 19 USENEWSTUF LABEL start processing here 1BB19 EDC1AAC0 20 STW USINGNEW say we are using the new format 21 * 22 * Make the .RAF pointers in the control block into memory addresses. 23 * These pointers point to the first subprogram block, the start of 24 * the space allocated to the subprogram blocks, the start of the space 25 * allocated for the symbol blocks, and the start of the space allocated 26 * for the source blocks. 27 * 1BB1A 60020010 0 IMM 28 LD R0 DBDSKPAGE*WPP*CPW relative address 0 from where we start 1BB1B B001AAA9 0 29 RSBM R0 NEWTREETOP make it relative 1BB1C B001AAAE 0 30 RSBM R0 NEWSUBTOP make it relative 1BB1D B001AAB0 0 31 RSBM R0 NEWSYMTOP make it relative 1BB1E B001AAB2 0 32 RSBM R0 NEWSRCTOP make it relative 1BB1F 60040004 0 IMM 33 LD R0 CPW use characters per word to make a word address out of byte address 1BB20 B401AAA9 0 34 RDVM R0 NEWTREETOP make it a word address 1BB21 B401AAAE 0 35 RDVM R0 NEWSUBTOP make it a word address 1BB22 B401AAB0 0 36 RDVM R0 NEWSYMTOP make it a word address 1BB23 B401AAB2 0 37 RDVM R0 NEWSRCTOP make it a word address 38 * 39 * Find the high memory address that we will need to occupy with the 40 * symbol information. Accomplish this by finding out which pointer 41 * and its associated length point at the highest memory location. 42 * Simple enough. Also not HLL mode if source statements exist. 43 * 1BB24 6101AAAE 4 44 LD R4 NEWSUBTOP top of the subprogram blocks 1BB25 1901AAAF 4 45 ADD R4 NEWSUBLEN add in the number of words within the subprogram blocks area 1BB26 6041AAB0 1 46 LD R1 NEWSYMTOP top of the symbol blocks 1BB27 1841AAB1 1 47 ADD R1 NEWSYMLEN add in the number of words within the symbol blocks area 1BB28 6081AAB3 2 48 LD R2 NEWSRCLEN length of the source blocks 1BB29 FA83BB2B 2 49 JEQZ R2 NOSOURCE pause for a moment to check for source statements existing 50 * \ / 1BB2A 1881AAB2 2 51 ADD R2 NEWSRCTOP add in the starting address of the source blocks area 0001BB2B 52 NOSOURCE LABEL 1BB2B 55124000 4 1 REG 53 MAX R4 R1 get the bigger of the two 1BB2C 55128000 4 2 REG 54 MAX R4 R2 and then the biggest of the three 1BB2D E501AAC1 4 55 ST R4 HIGHADDR save the high address pointer 1BB2E 15040400 4 IMM 56 DIV R4 WPP make it into a page number 1BB2F E501AAC2 4 57 ST R4 HIGHPAGE save the high page number 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 183 (NEWSETUP) F 19 Symbol info support subroutines 1BB30 65040061 4 IMM 58 CPR R4 BOTTOM too many pages required ?? 1BB31 FE05B981 59 JGT SU900 yes, bail out now 60 * \ / 61 * 62 * Now we will map in (own copy mode) the pages that contain the 63 * symbol information that we will be using. 64 * 1BB32 60440080 1 IMM 65 LD R1 DBDSKPAGE our special debugger code file page (128) 1BB33 60840000 2 IMM 66 LD R2 0 start at the low end of memory 0001BB34 67 MAPINLOOP LABEL 1BB34 60040094 0 IMM 68 LD R0 FRMAPINOC request to map in page in own copy mode 1BB35 0881A919 69 FREQ AUXLUN(XREQ) the request 1BB36 FA09B983 0 70 JLTZ R0 SU910 something real bad happened 71 * \ / 1BB37 60565001 1 1 REG 72 LD R1 R1+1 next .RAF page 1BB38 60969001 2 2 REG 73 LD R2 R2+1 next memory page 1BB39 FB27BB34 4 74 JDR R4 MAPINLOOP next page counter 75 * \ / 76 * 77 * Now we must go through every subprogram block and change the 78 * .RAF addresses into memory addresses. This is accomplished 79 * by starting at the top of the subprogram block area and 80 * converting the location in that subprogram block. Then we 81 * add the length of that block to the base pointer to arrive at 82 * the next subprogram block and convert its locations. This 83 * process is repeated until all the subprogram blocks have been 84 * altered. 85 * 1BB3A 6081AAAF 2 86 LD R2 NEWSUBLEN the length will tell us when we have finished 1BB3B 6141AAAE 5 87 LD SUB NEWSUBTOP point to the phisically top block 0001BB3C 88 NEXTSUB LABEL 1BB3C 60440005 1 IMM 89 LD R1 PTRBLOKLEN length of consecutive pointers within the block 1BB3D FE0FBB43 90 JMP FIXLOOPEND enter this loop at the end to make the length into an index 91 * --- 0001BB3E 92 FIXLOOP LABEL 1BB3E 601D4800 0 51 BASE 93 LD R0 SUB,PTRBLOCK(R1) get the pointer 1BB3F FA03BB43 0 94 JEQZ R0 FIXLOOPEND we do nothing with NIL pointers 95 * \ / 1BB40 10020010 0 IMM 96 SUB R0 DBDSKPAGE*WPP*CPW subtract relative 0 from address 1BB41 14040004 0 IMM 97 DIV R0 CPW change byte oriented address into word address 1BB42 E41D4800 0 51 BASE 98 ST R0 SUB,PTRBLOCK(R1) reset the pointer 0001BB43 99 FIXLOOPEND LABEL 1BB43 FA67BB3E 1 100 JDR R1 FIXLOOP do the next pointer within the same block 101 * \ / 1BB44 60440009 1 IMM 102 LD R1 SHORTNONAM length of a short block not counting the name 1BB45 18494038 1 5 ZBM 103 ADD R1 SUB,NEWNAMELEN add in the name length 1BB46 5C095817 5 ZBM 104 CMZ SUB,NEWLONGBLK is an optional block attached ?? 1BB47 FE03BB4D 105 JEQ LENREADY no, we have the length we need 106 * \ / 1BB48 60174018 0 5 CACH 107 LD R0 SUB,NEWFCHARLN get the length of part of the optional block 1BB49 18040003 0 IMM 108 ADD R0 ROUNDCPW round it up before the divide 1BB4A 14040004 0 IMM 109 DIV R0 CPW now make it the number of words 1BB4B 18040002 0 IMM 110 ADD R0 OPTIONLEN length of fixed part of option block 1BB4C 18520000 1 0 REG 111 ADD R1 R0 add it in with the rest 0001BB4D 112 LENREADY LABEL 1BB4D 19524000 5 1 REG 113 ADD SUB R1 bump to next block 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 184 (NEWSETUP) F 19 Symbol info support subroutines 1BB4E 10924000 2 1 REG 114 SUB R2 R1 subtract the words we passed over 1BB4F FA85BB3C 2 115 JGTZ R2 NEXTSUB go do the next if we aren't done yet 116 * \ / 117 * 118 * Now give the first subprogram block a father by pointing to our 119 * tree head and make the tree head point to him as a son. 120 * 1BB50 6005AAC8 0 IMM 121 LD R0 ADR NEWTREEHED point to the head block 1BB51 6141AAA9 5 122 LD SUB NEWTREETOP first subprogram block 1BB52 E5560802 5 0 BASE 123 ST SUB R0,NEWSONPTR give our guy a son 1BB53 E4174800 0 5 BASE 124 ST R0 SUB,NEWDADPTR and give the son a dad 1BB54 6145AAC8 5 IMM 125 LD SUB ADR NEWTREEHED head of the list 1BB55 E541A928 5 126 ST SUB SUBPC remember where we started 1BB56 FE0FB980 127 JMP SUEXIT2 get outta here !! 128 * --- 137 138 INPUT NEWSYMSUPP 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 185 (NEWSYMSUPP) F 20 support for handling new debugger symbol format 3 ********************************************************************************** 4 * * 5 * Name: PAKD2ASCII * 6 * * 7 * PAKD2ASCII takes a field which contains the newer debugger * 8 * packed symbol format and converts the field to an ASCII character * 9 * array. The packed character has a value of between 0 and * 10 * MAXPAKDCHR and is used as an index into one of two tables. If * 11 * corresponding bit in the NEWSYMCASE field is set, then the character * 12 * indexes the lower case character table, else if the bit is zero, * 13 * the character indexes the upper case character table. In any case, * 14 * the resulting characters are placed into the buffer ASCIIBUFF and * 15 * the length into ASCIIBUFLN. ASCIIBUFF is set to all blanks before * 16 * any characters are saved into it. The conversion continues until * 17 * the packed character obtained is 0. * 18 * * 19 * Call: * 20 * CALL PAKD2ASCII with SYM pointing to a symbol block * 21 * PARV length in words including case word * 22 * PAR forms address of upper/lower case word * 23 * PARL forms address of packed name * 24 * * 25 * Eats: R0:R2 * 26 * * 27 ********************************************************************************** 28 29 BLOCK start PAKD2ASCII 30 ENTRY PAKD2ASCII 31 32 BEGFRAME 00178801 6 BASE 33 P2ALENGTH BSS 1 max length of conversion 00178802 6 BASE 34 CASEPOINTR BSS 1 holds pointer to case word 00178803 6 BASE 35 NAMEPOINTR BSS 1 holds pointer to packed name 00178804 6 BASE 36 LCTABLPNTR BSS 1 holds pointer to the lower case table 00178805 6 BASE 37 UCTABLPNTR BSS 1 holds pointer to the upper case table 38 ENDFRAME 39 1BB57 DD1F8006 6 STAK 40 PAKD2ASCII ENTR PUSH start here 1BB58 C1578801 6 BASE 41 STPV SP,P2ALENGTH save the length 1BB59 C1178802 6 BASE 42 STP SP,CASEPOINTR save the pointer to the case flag 1BB5A C0178803 6 BASE 43 STPL SP,NAMEPOINTR save the pointer to the first packed item 44 * 45 * Zap buffer 46 * 1BB5B 6005AA9B 0 IMM 47 LD R0 ADR ASCIIBUFF address of buffer 1BB5C 60440020 1 IMM 48 LD R1 MAXSYMCHRS characters to zap 1BB5D DA000820 0 1 49 FILLI R0 R1 020 fill it with blanks 50 * 51 * Set some addresses up 52 * 1BB5E 6005ACE9 0 IMM 53 LD R0 ADR PK2UPCHAR word address of the upper case character array 1BB5F 38160000 0 0 CACH 54 LEA R0 CACH R0,0 make a character address 1BB60 E4178805 0 6 BASE 55 ST R0 SP,UCTABLPNTR save on stack 1BB61 6005ACF4 0 IMM 56 LD R0 ADR PK2LOWCHR word address of the lower case character array 1BB62 38160000 0 0 CACH 57 LEA R0 CACH R0,0 make a character address 1BB63 E4178804 0 6 BASE 58 ST R0 SP,LCTABLPNTR save on stack 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 186 (NEWSYMSUPP) F 20 support for handling new debugger symbol format 1BB64 60840000 2 IMM 59 LD R2 0 zero out the index 60 * 61 * Set max length in packed characters 62 * 1BB65 60178801 0 6 BASE 63 LD R0 SP,P2ALENGTH get length in words 1BB66 10040001 0 IMM 64 SUB R0 1 don't count case word 1BB67 1C040020 0 IMM 65 MUL R0 NBPW make it into bits 1BB68 14040006 0 IMM 66 DIV R0 PAKCHRBITS how many of these funnies will fit ?? 1BB69 E4178801 0 6 BASE 67 ST R0 SP,P2ALENGTH this many !! 1BB6A FA0BBB7C 0 68 JLEZ R0 BADSYM awful 69 * \ / 70 * 71 * Now obtain packed characters from the symbol block until we receive 72 * the fill character (SYMNONE), which is 0, or until we hit the max 73 * length which was calculated earlier from the word length. 74 * 0001BB6B 75 NEXTPAKCHR LABEL 1BB6B 60578805 1 6 BASE 76 LD R1 SP,UCTABLPNTR get upper case table pointer 1BB6C 60178802 0 6 BASE 77 LD R0 SP,CASEPOINTR get pointer to bit array 1BB6D 601A1400 0 02 @R 78 LD R0 @R0(R2) get the corresponding upper/lower case bit 1BB6E FA03BB70 0 79 JEQZ R0 CHARISUPPR it's upper case, we already have the correct pointer 80 * \ / 1BB6F 60578804 1 6 BASE 81 LD R1 SP,LCTABLPNTR get lower case table pointer 82 * 83 * Okay, get the packed character and index the proper table with it 84 * to obtain an ASCII character. Place this ASCII character in the 85 * ASCII character buffer we provide. 86 * 87 * \ / 0001BB70 88 CHARISUPPR LABEL 1BB70 60178803 0 6 BASE 89 LD R0 SP,NAMEPOINTR get pointer to packed item array 1BB71 601A1400 0 02 @R 90 LD R0 @R0(R2) get a packed character 1BB72 FA03BB7A 0 91 JEQZ R0 NOMORECHRS none left to convert 92 * \ / 1BB73 D0578801 6 BASE 93 DEC SP,P2ALENGTH did we max out yet ?? 1BB74 FE09BB7A 94 JLT NOMORECHRS if less then zero then we sure did 95 * \ / 1BB75 64040027 0 IMM 96 CPR R0 MAXPAKDCHR is it above the max ?? 1BB76 FE05BB7C 97 JGT BADSYM if so then bail out now 98 * \ / 1BB77 601A4400 0 10 @R 99 LD R0 @R1(R0) this is the conversion step 1BB78 E435AAA4 0 2 @ 100 ST R0 @ASCIIBUFPT(R2) save it into buffer 1BB79 FAA1BB6B 2 101 IRJ R2 NEXTPAKCHR alway do the jump and bump index 102 * --- 0001BB7A 103 NOMORECHRS LABEL 1BB7A E481AAA3 2 104 ST R2 ASCIIBUFLN save the count of characters 1BB7B 5D1F8006 6 STAK 105 LEAVE POP bye 106 * --- 0001BB7C 107 BADSYM LABEL 1BB7C 6005D32E 0 IMM 108 LD R0 ADR ERM702 bad symbol 1BB7D FE0FBE35 109 JMP RDUERR 110 * --- 111 112 END end of PAKD2ASCII 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 187 (NEWSYMSUPP) F 20 support for handling new debugger symbol format 114 ********************************************************************************** 115 * * 116 * Name: ASCII2PAKD * 117 * * 118 * ASCII2PAKD converts the characters in an ASCII character array * 119 * into packed characters within a dummy symbol block area. It also * 120 * sets the upper/lower case bits within the NEWSYMCASE field as is * 121 * necessary. The packed buffer area is filled with 0s before any * 122 * items are stored into it. The number of characters processed is * 123 * saved into SRCHBUFLN. Conversion continues until the requested * 124 * number of characters is processed OR the fetched ASCII character * 125 * is a (hex 020). * 126 * * 127 * Call: * 128 * CALL ASCII2PAKD * 129 * PARV LENGTH length of the buffer in chars * 130 * PARVL BUFCHARADD character address of buffer * 131 * * 132 * Eats: R0:R2 * 133 * * 134 ********************************************************************************** 135 136 BLOCK start of ASCII2PAKD 137 ENTRY ASCII2PAKD 138 139 BEGFRAME 00178801 6 BASE 140 BUFLENGTH BSS 1 character length of the buffer 141 ENDFRAME 142 1BB7E DD1F8002 6 STAK 143 ASCII2PAKD ENTR PUSH start here 1BB7F C1578801 6 BASE 144 STPV SP,BUFLENGTH save the length of the buffer 1BB80 C0528000 2 REG 145 STPVL R2 character address of the ASCII buffer 1BB81 6005AA91 0 IMM 146 LD R0 ADR SRCHCASEBF address of buffer 1BB82 6044001C 1 IMM 147 LD R1 LENTOZERO characters to zap 1BB83 DA000800 0 1 148 FILLI R0 R1 0 place zeros into the buffer 1BB84 60440000 1 IMM 149 LD R1 0 zero out index 150 * 151 * Grab characters until the count is up. Each character is biased down 152 * and then used to index a table of the packed values. 153 * 154 * \ / 0001BB85 155 NEXTASCII LABEL 1BB85 601A8C00 0 21 @R 156 LD R0 @R2(R1) get the ASCII character 1BB86 7804007F 0 IMM 157 AND R0 GASMASK save only the low 7 bits 1BB87 64040020 0 IMM 158 CPR R0 020 a space ?? 1BB88 FE03BB93 159 JEQ ASCIIEXIT yes, no need to go any further 160 * \ / 1BB89 10040021 0 IMM 161 SUB R0 LOWBOUND bias down by the lowest valued ASCII character 1BB8A FA09BB95 0 162 JLTZ R0 BADSYM no dice with this one !! 163 * \ / 1BB8B 6031ACFF 0 0 @ 164 LD R0 @ASC2PAKPT(R0) use biased value to index the conversion table 1BB8C FA03BB95 0 165 JEQZ R0 BADSYM illegal value was obtained 166 * \ / 1BB8D E433AA9A 0 1 @ 167 ST R0 @SRCHBUFFPT(R1) save the lower 6 bits only 1BB8E 600A3010 0 0 CBM 168 LD R0 R0/UPLOWBIT get the upper/lower case flag bit 1BB8F E433AA99 0 1 @ 169 ST R0 @SRCHCASEPT(R1) save the bit we have 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 188 (NEWSYMSUPP) F 20 support for handling new debugger symbol format 1BB90 60565001 1 1 REG 170 LD R1 R1+1 bump index 1BB91 64578801 1 6 BASE 171 CPR R1 SP,BUFLENGTH see if we reached the end yet 1BB92 FE09BB85 172 JLT NEXTASCII if less than length then go do another 173 * \ / 0001BB93 174 ASCIIEXIT LABEL 1BB93 E441AA98 1 175 ST R1 SRCHBUFLN save the count 1BB94 5D1F8002 6 STAK 176 LEAVE POP bye 177 * --- 0001BB95 178 BADSYM LABEL 1BB95 6005D32E 0 IMM 179 LD R0 ADR ERM702 bad symbol 1BB96 FE0FBE35 180 JMP RDUERR 181 * --- 182 183 END end of ASCII2PAKD 139 140 INPUT RDUUSUB 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 189 (RDUUSUB) F 21 Utility subroutines 3 4 ********************************************************************************** 5 * * 6 * These are the SHIPCOM routines. They are called to send * 7 * a command or data to the SSU. They build a five-character * 8 * command string and send that out to the encryptor and then to * 9 * the phone line. Each routine takes four or five parameters * 10 * (see the calling sequence). * 11 * * 12 * Param 0 - Error address * 13 * Param 1 - Class code for command * 14 * Param 2 - Slot number for command * 15 * Param 3 - BCM for command * 16 * Param 4 - Address/Data for command * 17 * Param 5 - Delay time * 18 * * 19 * Data returned by the command is stored in DATA. This may * 20 * be a single word or as many as 16 words depending on the type * 21 * of command. The caller must know how much to expect. * 22 * The data is checked for errors and if one occurs we will * 23 * go to the the error address passed us. R1 will contain the * 24 * error code. * 25 * 0 - no error * 26 * 1 - system error occurred, error message printed, (return RDUSYSERR) * 27 * 2 - bus error occurred (return to RDUSYSERR) * 28 * 3 - system not initialized (return to RDUNOINIT) * 29 * 4 - CPU halted (return to RDUENTER) * 30 * 5 - user break request (return to RDUBRK) * 31 * 6 - bus error occurred, WRU(1) in R1 (CALLNP BUSERR * 32 * JMP RDUSYSERR) * 33 * 7 - some other error occurred, R0 => error message (return to RDUERR) * 34 * * 35 * SHIPCOMD is an entry for data ship with no BCM. * 36 * SHIPCOMT entry is for requesting a timed response. * 37 * SHIPCOMDT entry is for data ship with no BCM but timed. * 38 * SHIPCOM is the normal entry with no time delay. * 39 * * 40 * Eats R0:R3. * 41 * * 42 ********************************************************************************** 43 44 BLOCK 45 ENTRY SHIPCOM 46 ENTRY SHIPCOMD 47 ENTRY SHIPCOMDT 48 ENTRY SHIPCOMT 49 50 BEGFRAME 00178801 6 BASE 51 SCTIME BSS 1 flag for timed response 00178802 6 BASE 52 SCERRAD BSS 1 error address 00178803 6 BASE 53 SCSAVR4 BSS 1 save for R4 54 ENDFRAME 55 1BB97 DD1F8004 6 STAK 56 SHIPCOMD ENTR PUSH 1BB98 C1178802 6 BASE 57 STP SP,SCERRAD save the error address 1BB99 C141A932 58 STPV XCLASS set class code 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 190 (RDUUSUB) F 21 Utility subroutines 1BB9A C141A933 59 STPV XSLOT set slot number 1BB9B C041A934 60 STPVL XDATA set data word 1BB9C FE0FBBB2 61 JMP SCNOTIME then merge in 62 * --- 63 1BB9D DD1F8004 6 STAK 64 SHIPCOMT ENTR PUSH 1BB9E C1178802 6 BASE 65 STP SP,SCERRAD save the error address 1BB9F C141A932 66 STPV XCLASS set class 1BBA0 C141A933 67 STPV XSLOT set slot 1BBA1 C151AC0A @ 68 STPV @XBCM set bcm 1BBA2 C151AC0C @ 69 STPV @XADDR set data 1BBA3 C0578801 6 BASE 70 STPVL SP,SCTIME remember delay time 1BBA4 FE0FBBB3 71 JMP SC10 then merge in 72 * --- 73 1BBA5 DD1F8004 6 STAK 74 SHIPCOMDT ENTR PUSH 1BBA6 C1178802 6 BASE 75 STP SP,SCERRAD save the error address 1BBA7 C141A932 76 STPV XCLASS set class 1BBA8 C141A933 77 STPV XSLOT and slot 1BBA9 C141A934 78 STPV XDATA and the data 1BBAA C0578801 6 BASE 79 STPVL SP,SCTIME remember extra delay time 1BBAB FE0FBBB3 80 JMP SC10 then merge in 81 * --- 82 1BBAC DD1F8004 6 STAK 83 SHIPCOM ENTR PUSH 1BBAD C1178802 6 BASE 84 STP SP,SCERRAD save the error address 1BBAE C141A932 85 STPV XCLASS set class code 1BBAF C141A933 86 STPV XSLOT set slot number 1BBB0 C151AC0A @ 87 STPV @XBCM set BCM 1BBB1 C051AC0C @ 88 STPVL @XADDR set data 89 * \ / 90 0001BBB2 91 SCNOTIME LABEL 1BBB2 EC178801 6 BASE 92 STZ SP,SCTIME no extra delay time 0001BBB3 93 SC10 LABEL 1BBB3 5C01A933 94 CMZ XSLOT see if we have a slot 1BBB4 FE09BBCF 95 JLT SC90 if not then stop in our tracks 96 * \ / 97 1BBB5 6001A932 0 98 ld r0 xclass check class 1BBB6 64040005 0 IMM 99 cpr r0 klas5 is it a class five? 1BBB7 FE0DBBBF 100 jne noprob 1BBB8 6001A934 0 101 ld r0 xdata check data (BCM) 1BBB9 64026000 0 IMM 102 cpr r0 030000000 is it a clear all? 1BBBA FE0DBBBF 103 jne noprob 1BBBB 60178801 0 6 BASE 104 ld r0 sp,sctime check for extra time 1BBBC 64040005 0 IMM 105 cpr r0 5 ensure that it was requested 1BBBD FE07BBBF 106 jge noprob 1BBBE 00000000 107 halt 0 0001BBBF 108 noprob label 109 1BBBF E5178803 4 6 BASE 110 ST R4 SP,SCSAVR4 save R4 1BBC0 60578801 1 6 BASE 111 LD R1 SP,SCTIME get the extra wait time 1BBC1 DC01F6D8 112 CALL IORDYMSG prepare message for transmit 1BBC2 41524000 1 REG 113 PARV R1 tell I/O how long to wait 1BBC3 4141A932 114 PARV XCLASS pass class 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 191 (RDUUSUB) F 21 Utility subroutines 1BBC4 4141A933 115 PARV XSLOT pass slot 1BBC5 4041A934 116 PARVL XDATA pass data 117 118 * TCNONE 1BBC6 DC41F6F6 119 CALLNP XMIT send message to SSU 1BBC7 DC01F708 120 CALL GRESP now receive the response 1BBC8 4045BE59 IMM 121 PARVL ADR(RDULOST) bail out if lost system 1BBC9 61178803 4 6 BASE 122 LD R4 SP,SCSAVR4 restore R4 123 124 * TCRESTORE 1BBCA DC41BC01 125 CALLNP RESPCHECK check out the response 1BBCB FA45BBCD 1 126 JGTZ R1 SHPCMERR error occurred 1BBCC 5D1F8004 6 STAK 127 LEAVE POP 128 * --- 129 0001BBCD 130 SHPCMERR LABEL 1BBCD 61D78802 7 6 BASE 131 LD R7 SP,SCERRAD want to return to the error address 1BBCE 5D1F8004 6 STAK 132 LEAVE POP 133 * --- 134 0001BBCF 135 SC90 LABEL 1BBCF 6005CF1C 0 IMM 136 LD R0 ADR(ERM109) "no slot for this device" 1BBD0 FE0FBE35 137 JMP RDUERR complain loudly 138 * --- 139 140 END of SHIPCOM subroutines 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 192 (RDUUSUB) F 21 Utility subroutines 142 143 ********************************************************************************** 144 * * 145 * SHIPWRU sends a request to the remote machine similar * 146 * to SHIPCOM except it does no response checking and gets its * 147 * parameters from COM. * 148 * Call: * 149 * COM => command table entry * 150 * SBUFFW = slot number * 151 * CALLNP SHIPWRU * 152 * Eats R0:R3. * 153 * * 154 ********************************************************************************** 155 156 BLOCK 157 ENTRY SHIPWRU 158 159 BEGFRAME 00178801 6 BASE 160 SWSAVR4 BSS 1 save for R4 161 ENDFRAME 162 1BBD1 DD5F8002 6 STAK 163 SHIPWRU ENTRNP PUSH 1BBD2 EC11AC0C @ 164 STZ @XADDR set address to 0 1BBD3 60094C34 0 5 ZBM 165 LD R0 COM,GCNBCM 1BBD4 E411AC0A 0 @ 166 ST R0 @XBCM set bcm 1BBD5 E5178801 4 6 BASE 167 ST R4 SP,SWSAVR4 save R4 1BBD6 DC01F6D8 168 CALL IORDYMSG prepare message for transmit 1BBD7 41440000 IMM 169 PARV 0 tell I/O how long to wait 1BBD8 41494034 5 ZBM 170 PARV COM,GCNCLS class 1BBD9 4141A830 171 PARV SBUFFW slot 1BBDA 4041A934 172 PARVL XDATA data set by XADDR and XBCM 173 174 * TCNONE 1BBDB DC41F6F6 175 CALLNP XMIT send message to SSU 1BBDC DC01F708 176 CALL GRESP now receive the response 1BBDD 4045BE59 IMM 177 PARVL ADR(RDULOST) bail out if lost system 178 1BBDE 61178801 4 6 BASE 179 LD R4 SP,SWSAVR4 restore R4 180 181 * TCRESTORE 1BBDF 5D1F8002 6 STAK 182 LEAVE POP 183 * --- 184 185 END of SHIPWRU 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 193 (RDUUSUB) F 21 Utility subroutines 187 188 ********************************************************************************** 189 * * 190 * This is the SHIPDATA routine. It is used to ship a data * 191 * word to one of the accumulators. It needs two parameters. * 192 * The first is the ACC# (0-2), and the second is the 32-bit * 193 * data to be stored in the register. * 194 * The data is checked for remote machine errors and if an * 195 * error is found we will go to the error address passed by the * 196 * caller. * 197 * Call: * 198 * CALL SHIPDATA * 199 * PAR error address * 200 * PARV * 201 * PARVL * 202 * Eats R0:R3. * 203 * * 204 ********************************************************************************** 205 206 BLOCK 207 ENTRY SHIPDATA 208 209 BEGFRAME 00178801 6 BASE 210 SHIPERRAD BSS 1 error address 00178802 6 BASE 211 SDSAVR4 BSS 1 save for R4 212 ENDFRAME 213 1BBE0 DD1F8003 6 STAK 214 SHIPDATA ENTR PUSH 1BBE1 C1178801 6 BASE 215 STP SP,SHIPERRAD save the error return address 1BBE2 C141A933 216 STPV XSLOT set the register number 1BBE3 C041A934 217 STPVL XDATA set the data 1BBE4 60040007 0 IMM 218 LD R0 7 get class code 1BBE5 E401A932 0 219 ST R0 XCLASS set the class 1BBE6 E5178802 4 6 BASE 220 ST R4 SP,SDSAVR4 save R4 1BBE7 DC01F6D8 221 CALL IORDYMSG ready message for sending 1BBE8 41440000 IMM 222 PARV 0 don't add any extra time 1BBE9 4141A932 223 PARV XCLASS send class 1BBEA 4141A933 224 PARV XSLOT and slot 1BBEB 4041A934 225 PARVL XDATA and data 226 227 * TCNONE 228 1BBEC DC41F6F6 229 CALLNP XMIT send message to SSU 1BBED DC01F708 230 CALL GRESP now receive the response 1BBEE 4045BE59 IMM 231 PARVL ADR(RDULOST) where to go if lost remote system 232 1BBEF 61178802 4 6 BASE 233 LD R4 SP,SDSAVR4 restore R4 234 235 * TCRESTORE 236 1BBF0 DC41BC01 237 CALLNP RESPCHECK check out type of response 1BBF1 FA45BBF3 1 238 JGTZ R1 SHPDTERR error occurred 1BBF2 5D1F8003 6 STAK 239 LEAVE POP 240 * --- 241 0001BBF3 242 SHPDTERR LABEL 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 194 (RDUUSUB) F 21 Utility subroutines 1BBF3 61D78801 7 6 BASE 243 LD R7 SP,SHIPERRAD return to the error address 1BBF4 5D1F8003 6 STAK 244 LEAVE POP 245 * --- 246 247 END of SHIPDATA 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 195 (RDUUSUB) F 21 Utility subroutines 249 250 ********************************************************************************** 251 * * 252 * This table is used to determine what to do with error codes * 253 * returned by RESPCHEK. * 254 * Use: * 255 * R1 = error code from RESPCHEK * 256 * LDPC RESPTAB(R1) * 257 ** --- * 258 * * 259 * We also have a generic system wide error handler here. * 260 * Use: * 261 * R1 = error code * 262 * JMP RESPERROR * 263 ** --- * 264 * * 265 ********************************************************************************** 266 267 BLOCK 268 ENTRY RESPTAB 269 ENTRY RESPBUS 270 ENTRY RESPERROR 271 0001BBF5 272 RESPERROR LABEL 1BBF5 5CA3BBF6 1 273 LDPC RESPTAB(R1) 274 * --- 275 276 * Jump table indexed by error code given by RESPCHEK 1BBF6 0001BDC8 277 RESPTAB VFD ADR RDUOK 0 - no error 1BBF7 0001BEEF 278 VFD ADR RDUSYSERR 1 - system error occurred, error message printed 1BBF8 0001BEEF 279 VFD ADR RDUSYSERR 2 - bus error occurred 1BBF9 0001BF08 280 VFD ADR RDUNOINIT 3 - system not initialized 1BBFA 0001BEB0 281 VFD ADR RDUENTER 4 - CPU halted 1BBFB 0001BE49 282 VFD ADR RDUBRK 5 - user break request 1BBFC 0001BBFE 283 VFD ADR RESPBUS 6 - SSU bus error occurred 1BBFD 0001BE35 284 VFD ADR RDUERR 7 - some other error occurred 285 286 * This is where we come upon finding a bus error on the remote machine. 287 * We create and send a message to the operator then go to the standard 288 * RDU bus error handler. 289 0001BBFE 290 RESPBUS LABEL 1BBFE DC41C928 291 CALLNP DODESTROY ensure there is no DO file hanging around 1BBFF DC41BC69 292 CALLNP BUSERR create and send bus error message 1BC00 FE0FBEEF 293 JMP RDUSYSERR go see what to do now 294 * --- 295 296 END of error response handler 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 196 (RDUUSUB) F 21 Utility subroutines 298 299 ********************************************************************************** 300 * * 301 * This is the RESPCHECK routine. It examines each response from * 302 * the remote system to check for problems or for data for port 0. * 303 * It returns an error code in R1: * 304 * 0 - no error * 305 * 1 - system error occurred, error message printed, (return RDUSYSERR) * 306 * 2 - bus error occurred (return to RDUSYSERR) * 307 * 3 - system not initialized (return to RDUNOINIT) * 308 * 4 - CPU halted (return to RDUENTER) * 309 * 5 - user break request (return to RDUBRK) * 310 * 6 - bus error occurred, WRU(1) in R1 (CALLNP BUSERR * 311 * JMP RDUSYSERR) * 312 * 7 - some other error occurred, R0 => error message (return to RDUERR) * 313 * * 314 * Eats R0:R3 * 315 * * 316 ********************************************************************************** 317 318 BLOCK 319 ENTRY RESPCHECK 320 321 BEGFRAME 322 ENDFRAME 323 1BC01 DD5F8001 6 STAK 324 RESPCHECK ENTRNP PUSH 1BC02 D181A8E3 325 CLRT ORIGIN see where command came from 1BC03 FE0DBC13 326 JNE RSCKCONC jump if concurrent process 1BC04 6001A8D7 0 327 LD R0 CPSTATE see who gets responses 1BC05 64040002 0 IMM 328 CPR R0 2 do responses go to C.P.? 1BC06 FE03BC13 329 JEQ RSCKCONC jump if that's the case 1BC07 EC12C000 3 REG 330 STZ R3 start at the front 331 * \ / 332 0001BC08 333 RSCK10 LABEL 1BC08 6227F38D 01 3 334 LD2 R0 DATA(R3) get one response 1BC09 DC41BC1B 335 CALLNP CHEKRESP see what the response is like 1BC0A FA47BC0C 1 336 JGEZ R1 RSCKEXIT if can't continue then don't 1BC0B FAE1BC08 3 337 IRJ R3 RSCK10 advance to next response 338 * --- 339 0001BC0C 340 RSCKEXIT LABEL 1BC0C 5C01A8E0 341 CMZ UBREAK does user want in? 1BC0D FE03BC12 342 JEQ RSCKLEAVE leave if not 343 * \ / 344 1BC0E 5C01A8D6 345 CMZ STATE are we interactive? 1BC0F FE0DBC12 346 JNE RSCKLEAVE if not then let someone else handle it 1BC10 EC01A8E0 347 STZ UBREAK 1BC11 60440005 1 IMM 348 LD R1 5 say a break occurred 349 * \ / 350 0001BC12 351 RSCKLEAVE LABEL 1BC12 5D1F8001 6 STAK 352 LEAVE POP 353 * --- 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 197 (RDUUSUB) F 21 Utility subroutines 354 355 * The response from the remote machine is meant for a concurrent process. 0001BC13 356 RSCKCONC LABEL 1BC13 60048040 0 IMM 357 LD R0 FRWRITE+XRSUSPERR get request to write, no susp 1BC14 6041F38B 1 358 LD R1 RTNCOUNT get length of response 1BC15 1C440008 1 IMM 359 MUL R1 NCPW*2 make into character count 1BC16 18440004 1 IMM 360 ADD R1 4 add for our header 1BC17 6085F38C 2 IMM 361 LD R2 ADR(DATAHEAD) point to response data 1BC18 0881A91C 362 FREQ PATHS(1+XREQ) and ship to remote system 1BC19 60440000 1 IMM 363 LD R1 0 say a normal condition exists 1BC1A FE0FBC12 364 JMP RSCKLEAVE and get out of here 365 * --- 366 367 END of RESPCHECK 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 198 (RDUUSUB) F 21 Utility subroutines 369 370 ********************************************************************************** 371 * * 372 * CHEKRESP classifies the remote machine response in R0 and * 373 * returns an error code in R1. RESPCHEK has a list of error code * 374 * definitions. If port zero data is response it is sent to user. * 375 * R1 contains -1 if not last item or abnormal condition. * 376 * Call: * 377 * LD2 R0 DATA(R3) * 378 * R3 = index into DATA * 379 * CALLNP CHEKRESP * 380 * JGTZ R1 abnormal condition * 381 * JEQZ R1 no more data * 382 * JLTZ R1 more data * 383 * * 384 * Eats R0:R2 * 385 * * 386 ********************************************************************************** 387 388 BLOCK 389 ENTRY CHEKRESP 390 391 BEGFRAME 392 ENDFRAME 393 1BC1B DD5F8001 6 STAK 394 CHEKRESP ENTRNP PUSH 1BC1C F611BC55 0 395 JBT R0/XRERR CKRS50 jump if error response 1BC1D F615BC22 0 396 JBT R0/XRACK CKRS20 jump if an ACK response 0001BC1E 397 CKRSNEXT LABEL 1BC1E 6047FFFF 1 IMM 398 LD R1 -1 guess nothing interesting about response 1BC1F F213BC21 0 399 JBF R0/XRLST CKRSLEAVE exit if true 1BC20 60440000 1 IMM 400 LD R1 0 say last response occurred 0001BC21 401 CKRSLEAVE LABEL 1BC21 5D1F8001 6 STAK 402 LEAVE POP return 403 * --- 404 405 * We got an ACK (RKLAS2, RKLAS2, or RKLAS7 response). See 406 * if some interactive data came with it. 0001BC22 407 CKRS20 LABEL 1BC22 5C0A1610 0 CBM 408 CMZ R0/XRIOK input enabled? 1BC23 ED81A8E1 409 STLNE IOK keep our flag in sync 1BC24 604A1840 1 0 CBM 410 LD R1 R0/XMSGSLOT get slot code 1BC25 FA43BC46 1 411 JEQZ R1 CKRS30 jump if no port zero data 1BC26 64440005 1 IMM 412 CPR R1 REMBREAK break or dwell? 1BC27 FE07BC36 413 JGE CKRS25 check for break or dwell 414 * \ / 415 416 ********************************************************************************** 417 * * 418 * We've ruled out break, dwell, and higher subtypes. Assume * 419 * XMSGSLOT holds subtype for data transmission (one to four * 420 * characters in the data word, quantified by subtype value * 421 * in R1). * 422 * * 423 ********************************************************************************** 424 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 199 (RDUUSUB) F 21 Utility subroutines 1BC28 5C01A8D9 425 CMZ XFERFLAG see if we are transferring a file 1BC29 FE0DBC33 426 JNE CKRSXFER jump if so 1BC2A 3AA7F38E 2 3 427 LEA2 R2 DATAW(R3) point to the actual data 1BC2B 60040042 0 IMM 428 LD R0 FRWRITEB get code to write 1BC2C DC41CCC7 429 CALLNP SAVEEVENT save the binary event. 1BC2D 5C01A8DC 430 CMZ DOSUPP are we suppressing interactive data 1BC2E FE0DBC30 431 JNE CKRS22 if so then don't list it 1BC2F 08840002 IMM 432 FREQ LUNSOUT+XREQ ship out to user port 0001BC30 433 CKRS22 LABEL 1BC30 DC41CCDA 434 CALLNP LOGRESP go log the event 1BC31 DC41C997 435 CALLNP FILLDOBUF save for Receive (if needed) 1BC32 FE0FBC4D 436 JMP CKRS40 back for another data word 437 * --- 438 439 * R1 has count of chars. 0001BC33 440 CKRSXFER LABEL do file transfer 1BC33 3AA7F38E 2 3 441 LEA2 R2 DATAW(R3) R2 -> characters 1BC34 DC41F202 442 CALLNP RDUTOXFER move chars from RDU to file transfer 1BC35 FE0FBC4D 443 JMP CKRS40 keep on going 444 * --- 445 446 ********************************************************************************** 447 * * 448 * Subtype is for break, or higher. Only other valid subtype * 449 * is dwell. * 450 * * 451 ********************************************************************************** 452 0001BC36 453 CKRS25 LABEL 1BC36 64440006 1 IMM 454 CPR R1 REMDWELL is it a dwell? 1BC37 FE03BC3D 455 JEQ CKRSDWELL if so, send dwell to the terminal 1BC38 FE05BC4D 456 JGT CKRS40 ignore all of this stuff 457 * \ / 458 459 * must be BREAK sent from SSU 1BC39 6227F38D 01 3 460 LD2 R0 DATA(R3) length in characters of the break 1BC3A 600401B5 0 IMM 461 LD R0 FRTBREAK send break to terminal 1BC3B 08840002 IMM 462 FREQ LUNSOUT send to the output terminal 1BC3C FE0FBC4D 463 JMP CKRS40 and continue through the data 464 * --- 465 0001BC3D 466 CKRSDWELL LABEL 1BC3D 6004012C 0 IMM 467 LD R0 FRTGETIRAT get terminals input baud rate 1BC3E 08840002 IMM 468 FREQ LUNSOUT standard terminal unit 1BC3F 60924000 2 1 REG 469 LD R2 R1 put in R2 for safety 1BC40 6227F38D 01 3 470 LD2 R0 DATA(R3) number of characters to send 1BC41 1C442710 1 IMM 471 MUL R1 10000 convert to msecs 1BC42 14528000 1 2 REG 472 DIV R1 R2 finish converting using our baud rate 1BC43 600401B4 0 IMM 473 LD R0 FRTDELAY request terminal delay 1BC44 08840002 IMM 474 FREQ LUNSOUT on this terminal 1BC45 FE0FBC4D 475 JMP CKRS40 and continue through the data 476 * --- 477 478 ********************************************************************************** 479 * * 480 * ACK with further information about the state of the * 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 200 (RDUUSUB) F 21 Utility subroutines 481 * remote system. * 482 * * 483 ********************************************************************************** 484 0001BC46 485 CKRS30 LABEL 1BC46 5C11AC0B @ 486 CMZ @STOPPED do we think it's running? 1BC47 FE0DBC4D 487 JNE CKRS40 if not then no error checks 1BC48 6227F38D 01 3 488 LD2 R0 DATA(R3) retrieve data words 1BC49 E441A8DE 1 489 ST R1 SYSSTAT remember system status 1BC4A F65BBC4F 1 490 JBT R1/SBSE CKRSSYSERR jump if bus error asserted 1BC4B F655BC51 1 491 JBT R1/SNIT CKRSNOINIT jump if system not initialized 1BC4C F653BC53 1 492 JBT R1/SERR CKRSENTER enter RDU mode if halted CPU 0001BC4D 493 CKRS40 LABEL 1BC4D 6227F38D 01 3 494 LD2 R0 DATA(R3) retrieve data words 1BC4E FE0FBC1E 495 JMP CKRSNEXT then return to other checks 496 * --- 497 0001BC4F 498 CKRSSYSERR LABEL 1BC4F 60440002 1 IMM 499 LD R1 2 say bus error happened 1BC50 FE0FBC21 500 JMP CKRSLEAVE 501 * --- 502 0001BC51 503 CKRSNOINIT LABEL 1BC51 60440003 1 IMM 504 LD R1 3 say system is not initialized 1BC52 FE0FBC21 505 JMP CKRSLEAVE 506 * --- 507 0001BC53 508 CKRSENTER LABEL 1BC53 60440004 1 IMM 509 LD R1 4 say CPU halted 1BC54 FE0FBC21 510 JMP CKRSLEAVE 511 * --- 512 513 ********************************************************************************** 514 * * 515 * The response class indicates the presence of an error on * 516 * the remote machine. The low three bits of the class field are * 517 * the error code if the error bit is turned on. We recognize * 518 * three types of errors. They are: * 519 * 8 - Command error * 520 * 9 - SSU detected a bus error * 521 * A - Some other VRA slot detected a bus error * 522 * * 523 ********************************************************************************** 524 0001BC55 525 CKRS50 LABEL 1BC55 608A1230 2 0 CBM 526 LD R2 R0/XRERRCODE get the error class 1BC56 64840002 2 IMM 527 CPR R2 MAXERRCODE see if within reason 1BC57 FE05BC65 528 JGT UNKNOWNERR jump if not 1BC58 5CA5BC59 2 529 LDPC CKRSJTAB(R2) act on code 530 * --- 531 0001BC59 532 CKRSJTAB LABEL 1BC59 0001BC5C 533 VFD ADR CMNDERR command error 1BC5A 0001BC60 534 VFD ADR SSUBUSERR SSU detected bus error 1BC5B 0001BC63 535 VFD ADR VRABUSERR VRA module detected bus error 00000002 ABS 536 MAXERRCODE EQU (DISPW CKRSJTAB)-1 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 201 (RDUUSUB) F 21 Utility subroutines 537 0001BC5C 538 CMNDERR LABEL 1BC5C 7844000F 1 IMM 539 AND R1 0F chop off any crud 1BC5D 6023D3BA 0 1 540 LD R0 E1TAB(R1) get pointer to error message 1BC5E 60440007 1 IMM 541 LD R1 7 say miscellaneous error 1BC5F FE0FBC21 542 JMP CKRSLEAVE 543 * --- 544 0001BC60 545 SSUBUSERR LABEL 1BC60 E441A8ED 1 546 ST R1 VALUE save response 1BC61 60440006 1 IMM 547 LD R1 6 bus error, call BUSERR 1BC62 FE0FBC21 548 JMP CKRSLEAVE 549 * --- 550 0001BC63 551 VRABUSERR LABEL 1BC63 6005D046 0 IMM 552 LD R0 ADR(ERM153) "Bus error" 1BC64 FE0FBC66 553 JMP CKRSOUTERR 554 * --- 555 0001BC65 556 UNKNOWNERR LABEL 1BC65 6005CECE 0 IMM 557 LD R0 ADR(ERM000) for now 558 * \ / 0001BC66 559 CKRSOUTERR LABEL 1BC66 DC41B88A 560 CALLNP OUT list the error 1BC67 60440001 1 IMM 561 LD R1 1 say system error 1BC68 FE0FBC21 562 JMP CKRSLEAVE 563 * --- 564 565 END of CHEKRESP 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 202 (RDUUSUB) F 21 Utility subroutines 567 568 ********************************************************************************** 569 * * 570 * BUSERR creates a bus error message and sends it to the user. * 571 * Call: * 572 * VALUE = WRU(1) * 573 * CALLNP BUSERR * 574 * Eats R0:R3. * 575 * * 576 ********************************************************************************** 577 578 BLOCK 579 ENTRY BUSERR 580 581 BEGFRAME 582 ENDFRAME 583 1BC69 DD5F8001 6 STAK 584 BUSERR ENTRNP PUSH 1BC6A DC41B86C 585 CALLNP BLANKOUTW clear a path 1BC6B 6005D03E 0 IMM 586 LD R0 ADR(ERM152) "Bus error from remote system - " 1BC6C DC41B87B 587 CALLNP MESSMOVE start a line 1BC6D 6001A8ED 0 588 LD R0 VALUE get the response back 1BC6E 600A0040 0 0 CBM 589 LD R0 R0/BITS 0:3 get just the sub-class 1BC6F 6021D3C2 0 0 590 LD R0 E2TAB(R0) get type of bus error message 1BC70 DC41B87B 591 CALLNP MESSMOVE add to the line 1BC71 DC41B886 592 CALLNP OUTO then list it out 1BC72 DC41B86C 593 CALLNP BLANKOUTW clear listing buffer 1BC73 6005CDEE 0 IMM 594 LD R0 ADR(MESWRU1) "SSU WRU(1):" 1BC74 DC41B87B 595 CALLNP MESSMOVE put message in buffer 1BC75 DC41B5F1 596 CALLNP HEXOUT ship out the whole word 1BC76 DC41B886 597 CALLNP OUTO list out the line 1BC77 DC01C064 598 CALL WRU1LIST decode and list the WRU(1) 1BC78 4141A97F 599 PARV SSUSLOT the slot number 1BC79 4041A8ED 600 PARVL VALUE the WRU(1) response 1BC7A 5D1F8001 6 STAK 601 LEAVE POP 602 * --- 603 604 END of BUSERR subroutine 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 203 (RDUUSUB) F 21 Utility subroutines 606 607 ********************************************************************************** 608 * * 609 * This is the SHIPNOP routine. It is called to send a NOP * 610 * to the remote machine. This is done whenever the I/O routines * 611 * timeout while waiting for input from the user. We do check * 612 * the I/O buffer and if there are characters hanging around we * 613 * will send them too. After the NOP is sent, we just go back to * 614 * waiting some more. * 615 * Call: * 616 * CALLNP SHIPNOP * 617 * There is a version that picks up some input from the * 618 * user while trying to receive port zero output as rapidly * 619 * as possible. * 620 * Call: * 621 * CALLNP SHIPNOPRD * 622 * * 623 * Eats R0:R3. * 624 * * 625 ********************************************************************************** 626 627 BLOCK 628 ENTRY SHIPNOP 629 ENTRY SHIPNOPRD 630 631 BEGFRAME 00178801 6 BASE 632 SNCC BSS 1 count of characters to send 00178802 6 BASE 633 SNOUTC BSS 1 count of messages out 00178803 6 BASE 634 SNBPTR BSS 1 pointer to first outstanding msg 00178804 6 BASE 635 SNSAVR4 BSS 1 location to save R4 636 ENDFRAME 637 000BC020 7 CBM 638 SNFLAGS EQU R7/BITS 0:1 flag field 000BC010 7 CBM 639 SNRDFLG EQU SNFLAGS/BIT 30 indicates we can read in between NOPS 000BC210 7 CBM 640 SNMULFLG EQU SNFLAGS/BIT 31 indicates new SSU microcode 641 1BC7B DD5F8005 6 STAK 642 SHIPNOPRD ENTRNP PUSH 1BC7C EDCBC010 7 CBM 643 STW SNRDFLG indicate read lines in between 1BC7D FE0FBC80 644 JMP SN05 and enter other routine 645 * --- 646 1BC7E DD5F8005 6 STAK 647 SHIPNOP ENTRNP PUSH 1BC7F EC0BC010 7 CBM 648 STZ SNRDFLG indicate no terminal reads 0001BC80 649 SN05 LABEL 1BC80 EDCBC210 7 CBM 650 STW SNMULFLG tentatively indicate new SSU microcode 1BC81 60100000 0 @ 651 LD R0 SSUREV get current SSU ucode revision 1BC82 64040010 0 IMM 652 CPR R0 SSUREVMM can it do multiple messages? 1BC83 FE07BC85 653 JGE SN07 jump if so 1BC84 EC0BC020 7 CBM 654 STZ SNFLAGS clear both flags if not 0001BC85 655 SN07 LABEL 656 1BC85 E5178804 4 6 BASE 657 ST R4 SP,SNSAVR4 save R4 1BC86 EC178802 6 BASE 658 STZ SP,SNOUTC clear count of msgs out 1BC87 EC178803 6 BASE 659 STZ SP,SNBPTR (for safety) clear initial ptr 0001BC88 660 SN10 LABEL 1BC88 EC01A8E4 661 STZ CPZDATA clear character data to send 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 204 (RDUUSUB) F 21 Utility subroutines 1BC89 EC178801 6 BASE 662 STZ SP,SNCC zero character count 1BC8A 5C01A8E1 663 CMZ IOK is input being accepted? 1BC8B FE03BCA0 664 JEQ SN30 if not then don't send any 665 * \ / 666 1BC8C 6041A911 1 667 LD R1 CPI get character input pointer 1BC8D 1041A912 1 668 SUB R1 CPO how many characters to send? 1BC8E FA43BC9A 1 669 JEQZ R1 SN20 jump if nothing to send 1BC8F E4578801 1 6 BASE 670 ST R1 SP,SNCC save the character count 1BC90 BC01A912 0 671 INCL R0 CPO get the output pointer 1BC91 50440004 1 IMM 672 MIN R1 MAXOCHAR keep count realistic 1BC92 3831A884 0 0 @ 673 LEA R0 @SHIPBPT(R0) point to characters to send 1BC93 3881A8E4 2 674 LEA R2 CPZDATA and to the data word 1BC94 FE400000 675 CMOVE move the shit over 1BC95 60578801 1 6 BASE 676 LD R1 SP,SNCC get the character count back 1BC96 64440004 1 IMM 677 CPR R1 MAXOCHAR are there more than four? 1BC97 FE05BCAA 678 JGT SN40 jump if lots to send 679 * \ / 1BC98 5C178802 6 BASE 680 CMZ SP,SNOUTC any msgs out? 1BC99 FE0DBCAA 681 JNE SN40 jump to add on this one 682 0001BC9A 683 SN20 LABEL (buffer empty) 1BC9A D141A911 684 STMW CPI clear input pointer 1BC9B D141A912 685 STMW CPO and also output pointer 1BC9C F3C1BCA0 7 686 JBF SNRDFLG SN30 jump if no reads or input force 1BC9D 6001F38B 0 687 LD R0 RESPBINDX see how much we got last time 1BC9E 64040010 0 IMM 688 CPR R0 MAXRESPS was it a full house? 1BC9F FE03BCB4 689 JEQ SNDOMULT if so, go try to force char return 0001BCA0 690 SN30 LABEL (can't send any more) 1BCA0 5C178802 6 BASE 691 CMZ SP,SNOUTC any msgs out? 1BCA1 FE0DBCC2 692 JNE SNMO40 jump to pick up the response 693 1BCA2 60578801 1 6 BASE 694 LD R1 SP,SNCC get character count 1BCA3 DC01BB97 695 CALL SHIPCOMD now send out the nop 1BCA4 4101BBF5 696 PAR RESPERROR where to go on error 1BCA5 41440008 IMM 697 PARV KLAS8 class=8 1BCA6 41524000 1 REG 698 PARV R1 slot=count of characters 1BCA7 4041A8E4 699 PARVL CPZDATA data=characters to send 700 1BCA8 61178804 4 6 BASE 701 LD R4 SP,SNSAVR4 restore R4 1BCA9 5D1F8005 6 STAK 702 LEAVE POP 703 * --- 704 705 ********************************************************************************** 706 * We come here when there are more than 4 characters in * 707 * the buffer to be sent or there are multiple messages. * 708 ********************************************************************************** 709 0001BCAA 710 SN40 LABEL 1BCAA 50440004 1 IMM 711 MIN R1 MAXOCHAR calculate how many chars moved this time 1BCAB E4561001 1 0 REG 712 ST R1 R0+1 adjust for one already counted 1BCAC 9801A912 0 713 ADDM R0 CPO adjust for characters sent 714 1BCAD F7C3BCB4 7 715 JBT SNMULFLG SNDOMULT jump if new SSU ucode 716 1BCAE DC01BB97 717 CALL SHIPCOMD send out the characters 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 205 (RDUUSUB) F 21 Utility subroutines 1BCAF 4101BBF5 718 PAR RESPERROR where to go on error 1BCB0 41440008 IMM 719 PARV KLAS8 class=8 1BCB1 41524000 1 REG 720 PARV R1 slot=number of chars 1BCB2 4041A8E4 721 PARVL CPZDATA data=characters to send 1BCB3 FE0FBC88 722 JMP SN10 then see if still more 723 * --- 724 725 ********************************************************************************** 726 * We are talking to an SSU with newer ucode that * 727 * can accept multiple inputs (up to 3). Therefore, * 728 * we can send multiple messages before checking the * 729 * response. This can significantly improve throughput. * 730 ********************************************************************************** 731 0001BCB4 732 SNDOMULT LABEL 1BCB4 60578801 1 6 BASE 733 LD R1 SP,SNCC get character count 1BCB5 50440004 1 IMM 734 MIN R1 MAXOCHAR keep count realistic 1BCB6 DC01F6D8 735 CALL IORDYMSG prepare message for transmit 1BCB7 41440000 IMM 736 PARV 0 tell I/O extra wait time 1BCB8 41440008 IMM 737 PARV KLAS8 pass class 1BCB9 41524000 1 REG 738 PARV R1 slot=count of characters 1BCBA 4041A8E4 739 PARVL CPZDATA data=characters to send 740 1BCBB 5C178802 6 BASE 741 CMZ SP,SNOUTC are any messages now out? 1BCBC FE0DBCBE 742 JNE SNDOM10 jump if so 1BCBD E5178803 4 6 BASE 743 ST R4 SP,SNBPTR otherwise, store first MH block ptr 0001BCBE 744 SNDOM10 LABEL 1BCBE DC41F6F6 745 CALLNP XMIT send message to SSU 746 1BCBF BC178802 0 6 BASE 747 INCL R0 SP,SNOUTC add count for this message 1BCC0 64040003 0 IMM 748 CPR R0 3 check for maximum 1BCC1 FE09BC88 749 JLT SN10 jump if below max, try some more 750 * \ / 0001BCC2 751 SNMO40 LABEL pick up response 1BCC2 61178803 4 6 BASE 752 LD R4 SNBPTR get pointer to next MH block 1BCC3 DC01F708 753 CALL GRESP now receive the response 1BCC4 4045BE59 IMM 754 PARVL ADR(RDULOST) bail out if lost system 755 1BCC5 DC41BC01 756 CALLNP RESPCHECK check out the response 1BCC6 FA43BCC8 1 757 JEQZ R1 SNMO50 jump if no error 1BCC7 61E3BBF6 7 1 758 LD R7 RESPTAB(R1) error, set return, and clear flags 0001BCC8 759 SNMO50 LABEL 760 1BCC8 60170800 0 4 BASE 761 LD R0 R4,MHLINK get link to next element 1BCC9 E4178803 0 6 BASE 762 ST R0 SP,SNBPTR and save as next pointer 1BCCA D0578802 6 BASE 763 DEC SP,SNOUTC and decrement count 764 1BCCB F3C1BC88 7 765 JBF SNRDFLG SN10 jump if no reading 1BCCC DC41B3B3 766 CALLNP READLINENW check for input without waiting 1BCCD FA09BC88 0 767 JLTZ R0 SN10 jump if no input 1BCCE 6481A8EF 2 768 CPR R2 EXITCHAR is this our switch char? 1BCCF FE0DBCD1 769 JNE SNM90 jump if not 1BCD0 61C5BE7D 7 IMM 770 LD R7 ADR RDUGO enter new return address and clear flags 0001BCD1 771 SNM90 LABEL 1BCD1 BC41A911 1 772 INCL R1 CPI get input pointer 1BCD2 64440078 1 IMM 773 CPR R1 CBLEN more room in input buffer? 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 206 (RDUUSUB) F 21 Utility subroutines 1BCD3 FE09BCD7 774 JLT SNM95 jump if okay 1BCD4 61C5BE3F 7 IMM 775 LD R7 ADR RDU96 enter new return address and clear flags 1BCD5 D041A911 776 DEC CPI count back the buffer pointer 1BCD6 FE0FBCA0 777 JMP SN30 and continue 0001BCD7 778 SNM95 LABEL 1BCD7 E4B3AC03 2 1 @ 779 ST R2 @CBPT(R1) add to the input buffer 1BCD8 FE0FBC88 780 JMP SN10 781 * --- 782 783 END of SHIPNOP 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 207 (RDUUSUB) F 21 Utility subroutines 785 786 ********************************************************************************** 787 * * 788 * This is the RFPBREAK routine. It is called by the I/O * 789 * processor whenever it gets hit with a Break from the user. * 790 * We simply set the break flag indicating that a break occurred. * 791 * Call: * 792 * CALLNP RFPBREAK * 793 * Eats no registers. * 794 * * 795 ********************************************************************************** 796 797 BLOCK 798 ENTRY RFPBREAK 799 800 BEGFRAME 801 ENDFRAME 802 1BCD9 DD5F8001 6 STAK 803 RFPBREAK ENTRNP PUSH 1BCDA EDC1A8E0 804 STW UBREAK say user hit break 1BCDB 5D1F8001 6 STAK 805 LEAVE POP 806 * --- 807 808 END of RDFBREAK subroutine 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 208 (RDUUSUB) F 21 Utility subroutines 810 811 ********************************************************************************** 812 * * 813 * This is the SLOTCHECK routine. It verifies the slot of the * 814 * newly-selected bus device to be sure that there is a working * 815 * module on the bus at that slot and that the device type matches * 816 * that selected by the user. If all is well, it just returns, but * 817 * if there is any trouble then an exit is made to list the error. * 818 * Call: * 819 * R0 = new slot number * 820 * COM -> command element * 821 * CALLNP SLOTCHECK * 822 * R1 = new slot's WRU(0) * 823 * NEWSLOT = new slot number * 824 * NEWWRU = new slot's WRU(0) * 825 * * 826 * Eats R1. * 827 * * 828 ********************************************************************************** 829 830 BLOCK 831 ENTRY SLOTCHECK 832 833 BEGFRAME 00178801 6 BASE 834 CHKTEMP BSS2 1 temp 835 ENDFRAME 836 1BCDC DD5F8003 6 STAK 837 SLOTCHECK ENTRNP PUSH 1BCDD E401A925 0 838 ST R0 NEWSLOT save the desired slot number 1BCDE E6978801 236 BASE 839 ST2 R2 SP,CHKTEMP save r2,r3 from harm 1BCDF DC01BBAC 840 CALL SHIPCOM now see what is really there 1BCE0 4101BBF5 841 PAR RESPERROR where to go on error 1BCE1 41440000 IMM 842 PARV KLAS0 class=0 1BCE2 4141A925 843 PARV NEWSLOT slot=new 1BCE3 41440004 IMM 844 PARV BCMWRU bcm=4 (wru) 1BCE4 40440000 IMM 845 PARVL 0 address=0 1BCE5 6001F38E 0 846 LD R0 DATA(1) check the response 1BCE6 600A0040 0 0 CBM 847 LD R0 R0/XMSGBCM get message class 1BCE7 64174805 0 5 BASE 848 CPR R0 COM,COMDEV does device match command? 1BCE8 FE0DBCED 849 JNE CHK90 if not then user loses 1BCE9 E441A926 1 850 ST R1 NEWWRU remember the wru result 1BCEA 6001A925 0 851 LD R0 NEWSLOT get slot back 1BCEB 62978801 236 BASE 852 LD2 R2 SP,CHKTEMP restore r2, r3 1BCEC 5D1F8003 6 STAK 853 LEAVE POP 854 * --- 855 0001BCED 856 CHK90 LABEL 1BCED 6005CEEE 0 IMM 857 LD R0 ADR(ERM105) "Wrong device for slot" 1BCEE FE0FBE35 858 JMP RDUERR 859 * --- 860 861 END of SLOTCHECK 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 209 (RDUUSUB) F 21 Utility subroutines 863 864 ********************************************************************************** 865 * * 866 * FIXUPMCUS. This subroutine sends a WRU4 to each MCU on the * 867 * system. This is a software kludge to handle MCU design * 868 * oddity. When an MCU is issued a CLEARALL, WRU0, WRU1, or * 869 * WRU2 it enters a state where it attempts to preserve bus * 870 * error information. In this state, some commands (e.g. * 871 * double-word reads and WRU memory size info) will not operate * 872 * correctly. A WRU3 or WRU4 is required to restore normalcy * 873 * before further operations (e.g. BCMGO) are attempted. * 874 * Call: * 875 * * 876 * CALLNP FIXUPMCUS * 877 * * 878 * Eats R0:R4 * 879 * * 880 ********************************************************************************** 881 882 BLOCK FIXUPMCUS subroutine 883 884 ENTRY FIXUPMCUS clear up MCU registers 885 886 BEGFRAME 887 ENDFRAME 888 1BCEF DD5F8001 6 STAK 889 FIXUPMCUS ENTRNP PUSH 1BCF0 6104000F 4 IMM 890 LD R4 MAXSLOT get slot count 0001BCF1 891 FUMLOOP LABEL 1BCF1 6029A96B 0 4 892 LD R0 SLOTTYPE(R4) get the slot type 1BCF2 64040001 0 IMM 893 CPR R0 DEVMCU maybe an mcu? 1BCF3 FE0DBCFA 894 JNE FUMNEXT if not then go away 895 * \ / 896 1BCF4 DC01BBAC 897 CALL SHIPCOM send wru 4 to restore MCU size register 1BCF5 4101BBF5 898 PAR RESPERROR error address 1BCF6 41440000 IMM 899 PARV KLAS0 class=0 1BCF7 41530000 4 REG 900 PARV R4 slot=ours 1BCF8 41440004 IMM 901 PARV BCMWRU bcm=5 1BCF9 40440004 IMM 902 PARVL 4 addr=4 903 * \ / 904 0001BCFA 905 FUMNEXT LABEL 1BCFA FB27BCF1 4 906 JDR R4 FUMLOOP cycle through all slots 907 * \ / 908 1BCFB 5D1F8001 6 STAK 909 LEAVE POP 910 * --- 911 912 END of FIXUPMCUS subroutine 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 210 (RDUUSUB) F 21 Utility subroutines 914 915 ********************************************************************************** 916 * * 917 * This is the PROCMAKE routine. It is called to pick up a code * 918 * file and make a concurrent process out of it. Of course, it must * 919 * also establish path links to the process for communication. * 920 * When called, LBUFPT should point to the file name in the input * 921 * buffer. It will return with the process started, the path luns * 922 * in PATHS, and the process number in PROC. * 923 * * 924 * Eats R0:R3. * 925 * * 926 ********************************************************************************** 927 928 BLOCK 929 ENTRY PROCMAKE 930 931 BEGFRAME 00178801 6 BASE 932 PRMLUN BSS 1 lun for concurrent process 933 ENDFRAME 934 1BCFC DD5F8002 6 STAK 935 PROCMAKE ENTRNP PUSH 1BCFD 6001A8E6 0 936 LD R0 LBUFPT get input buffer pointer 1BCFE E401A8E5 0 937 ST R0 BUFPT backup to look again 1BCFF 6001AC13 0 938 LD R0 EXTCODE we want code files 1BD00 DC41BD4A 939 CALLNP FILEGET go try to equip the thing 1BD01 FA0DBE35 0 940 JNEZ R0 RDUERR go straight to jail if trouble 1BD02 E4578801 1 6 BASE 941 ST R1 SP,PRMLUN save the unit a moment 1BD03 DC41BD0E 942 CALLNP PATHMAKE go set up a path pair 1BD04 E641A91B 12 943 ST2 R1 PATHS save unit numbers of ends 1BD05 DC41BD0E 944 CALLNP PATHMAKE make another path 1BD06 E041A91B 1 945 EXCH R1 PATHS get an end of each 1BD07 60040133 0 IMM 946 LD R0 FRCONCP make concurrent process 1BD08 08978801 6 BASE 947 FREQ SP,PRMLUN or at least ask system to 1BD09 FA09BD0C 0 948 JLTZ R0 PRM90 well, did we do it? 1BD0A E401A91D 0 949 ST R0 PROC remember the process number 1BD0B 5D1F8002 6 STAK 950 LEAVE POP 951 * --- 952 0001BD0C 953 PRM90 LABEL 1BD0C 6005D2C7 0 IMM 954 LD R0 ADR(ERM511) "Could not make it" 1BD0D FE0FBE35 955 JMP RDUERR that's the breaks 956 * --- 957 958 END of PROCMAKE 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 211 (RDUUSUB) F 21 Utility subroutines 960 961 ********************************************************************************** 962 * * 963 * This is the PATHMAKE routine. It is called to establish * 964 * a path for use in concurrent process I/O. The units returned * 965 * are either end of a single path, one with read-only access and * 966 * one with read-write access. They are local units. * 967 * * 968 * * 969 * Call: CALLNP PATHMAKE * 970 * ST R1 * 971 * ST R2 * 972 * * 973 * Eats R0:R2. * 974 * * 975 ********************************************************************************** 976 977 BLOCK 978 ENTRY PATHMAKE 979 980 BEGFRAME 00178801 6 BASE 981 PTMLUN BSS 1 one of the luns 982 ENDFRAME 983 1BD0E DD5F8002 6 STAK 984 PATHMAKE ENTRNP PUSH 1BD0F 60040122 0 IMM 985 LD R0 URFREELUN get unit for writing end 1BD10 09040064 IMM 986 UREQ MAXLOCAL+XREQ start at the very top 1BD11 FA09BD1C 0 987 JLTZ R0 PTM90 complain if none to be had 1BD12 E4578801 1 6 BASE 988 ST R1 SP,PTMLUN remember the unit 989 * \ / 990 1BD13 60040122 0 IMM 991 LD R0 URFREELUN get unit for reading end 1BD14 10440001 1 IMM 992 SUB R1 1 start one down from writer 1BD15 09165000 1 REG 993 UREQ R1+XREQ call OS 1BD16 FA09BD1C 0 994 JLTZ R0 PTM90 we have to have two 995 * \ / 996 1BD17 60040270 0 IMM 997 LD R0 FRMAKEPATH create the double-ended .PATH 1BD18 08978801 6 BASE 998 FREQ SP,PTMLUN (one lun is in R1) 1BD19 FA09BD1E 0 999 JLTZ R0 PTM91 complain if can't do it 1000 * \ / 1001 1BD1A 60978801 2 6 BASE 1002 LD R2 SP,PTMLUN get lun to return 1BD1B 5D1F8002 6 STAK 1003 LEAVE POP 1004 * --- 1005 0001BD1C 1006 PTM90 LABEL 1BD1C 6005D299 0 IMM 1007 LD R0 ADR(ERM500) "No free luns" 1BD1D FE0FBE35 1008 JMP RDUERR 1009 * --- 1010 0001BD1E 1011 PTM91 LABEL 1BD1E 6005D2D0 0 IMM 1012 LD R0 ADR(ERM512) "Could not open Paths" 1BD1F FE0FBE35 1013 JMP RDUERR 1014 * --- 1015 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 212 (RDUUSUB) F 21 Utility subroutines 1016 END of PATHMAKE 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 213 (RDUUSUB) F 21 Utility subroutines 1018 1019 ********************************************************************************** 1020 * * 1021 * This is the PATHCLOSE routine. It is called to close the * 1022 * path units currently open in PATHS. Caller is expected to have * 1023 * placed one lun in PATH and one in PATH(1). * 1024 * * 1025 * Eats R0:R1. * 1026 * * 1027 ********************************************************************************** 1028 1029 BLOCK 1030 ENTRY PATHCLOSE 1031 1032 BEGFRAME 1033 ENDFRAME 1034 1BD20 DD5F8001 6 STAK 1035 PATHCLOSE ENTRNP PUSH 1BD21 60040081 0 IMM 1036 LD R0 URSCINTARM ensure path interrupts are turned off 1BD22 60420080 1 IMM 1037 LD R1 PATHBIT 1BD23 09040000 IMM 1038 UREQ 0 do it 1BD24 EC11AC09 @ 1039 STZ @PDFLAG turn off this flag 1BD25 60040060 0 IMM 1040 LD R0 FRCLOSE request to close up 1BD26 0881A91C 1041 FREQ PATHS(1+XREQ) give back the write pipe 1BD27 60040060 0 IMM 1042 LD R0 FRCLOSE now for the other 1BD28 0881A91B 1043 FREQ PATHS(XREQ) there goes the read unit 1BD29 5D1F8001 6 STAK 1044 LEAVE POP 1045 * --- 1046 1047 END of PATHCLOSE 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 214 (RDUUSUB) F 21 Utility subroutines 1049 1050 ********************************************************************************** 1051 * * 1052 * This little monster is the TIMER routine. It simply sets * 1053 * a time interrupt request based on the current operating state * 1054 * of the RDU. Currently, normal RDU mode sets a 10 second time * 1055 * interrupt, portzero mode sets a 2 second interrupt, and running * 1056 * with breakpoints in sets a 4 second interrupt. * 1057 * * 1058 * Eats R0:R1. * 1059 * * 1060 ********************************************************************************** 1061 1062 BLOCK 1063 ENTRY TIMER 1064 1065 BEGFRAME 1066 ENDFRAME 1067 1068 * Note these definitions are VFDs so they may be easily patched. 1BD2A 00000002 1069 PORTZTO VFD 2 time to wait between NOPs when interactive 1BD2B 00000004 1070 BPITO VFD 4 running with breakpoints 1BD2C 0000000A 1071 NORMALTO VFD 10 normal operation timeout interval 1072 1BD2D DD5F8001 6 STAK 1073 TIMER ENTRNP PUSH 1BD2E 6001A8D6 0 1074 LD R0 STATE get the current RDU state 1BD2F FA09BD3A 0 1075 JLTZ R0 TIEXIT exit if not dialed in 1BD30 6041BD2A 1 1076 LD R1 PORTZTO assume a port zero mode 1BD31 FA03BD38 0 1077 JEQZ R0 TI10 jump if hunch was correct 1BD32 6041BD2C 1 1078 LD R1 NORMALTO assume in normal operating mode 1BD33 64040002 0 IMM 1079 CPR R0 STATERUN is the remote system running 1BD34 FE0DBD38 1080 JNE TI10 if not, breakpoints can't be in 1BD35 5C090210 4 ZBM 1081 CMZ BPIIN are breakpoints in? 1BD36 FE03BD38 1082 JEQ TI10 if not then use the normal value 1083 * \ / 1084 1BD37 6041BD2B 1 1085 LD R1 BPITO use longer time otherwise 0001BD38 1086 TI10 LABEL 1BD38 60040141 0 IMM 1087 LD R0 URSETTIMIN request for time interrupt 1BD39 09040000 IMM 1088 UREQ 0+XREQ start the clock running 0001BD3A 1089 TIEXIT LABEL 1BD3A 5D1F8001 6 STAK 1090 LEAVE POP 1091 * --- 1092 1093 END of TIMER 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 215 (RDUUSUB) F 21 Utility subroutines 1095 1096 ********************************************************************************** 1097 * * 1098 * GETPARAM sees if there was parameters passed on the invocation * 1099 * of the call to RDU. If so it decides whether it is a NOLOG request, * 1100 * and sets the LOGFLAG accordingly. * 1101 * R0:R3 get munched. IBUFF is used. * 1102 * * 1103 ********************************************************************************** 1104 1105 BLOCK 1106 ENTRY GETPARAM 1107 1108 BEGFRAME 1109 ENDFRAME 1110 1BD3B DD5F8001 6 STAK 1111 GETPARAM ENTRNP PUSH 1BD3C EDC1A92E 1112 STW LOGFLAG assume we are printing the log 1BD3D 60040021 0 IMM 1113 LD R0 URVARGETS get CM symbol 1BD3E 6045A800 1 IMM 1114 LD R1 ADR IBUFF buffer to put value 1BD3F E441A8E5 1 1115 ST R1 BUFPT save for FETCHITEM 1BD40 6281AC28 23 1116 LD2 R2 PARAMBANG PARAMETERS! 1BD41 09040060 IMM 1117 UREQ OKLEN length of buffer 1BD42 30440060 1 IMM 1118 RSB R1 OKLEN see if any buffer was used 1BD43 FA43BD49 1 1119 JEQZ R1 PARAMEXIT if no parameter then we assumed right 1120 * \ / 1121 1BD44 DC41B33C 1122 CALLNP FETCHAP get the parameter 1BD45 6001A830 0 1123 LD R0 SBUFFW get the first word 1BD46 6401AC27 0 1124 CPR R0 NOLOG "NOLO" 1BD47 FE0DBD49 1125 JNE PARAMEXIT if we don't match this then log it 1BD48 EC01A92E 1126 STZ LOGFLAG say NOLOG 0001BD49 1127 PARAMEXIT LABEL 1BD49 5D1F8001 6 STAK 1128 LEAVE POP 1129 * --- 1130 1131 END of GETPARAMS subroutine 141 142 INPUT RDUFSUB 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 216 (RDUFSUB) F 22 File handling subroutines 3 4 ********************************************************************************** 5 * * 6 * This is the FILEGET routine. It is called to obtain a * 7 * file name or lun from the input line, and return the lun of * 8 * the equipped unit to the caller. (It may be necessary to equip * 9 * up the unit. If so, the file is opened on a local unit.) * 10 * Call: * 11 * LD R0 * 12 * CALLNP FILEGET * 13 * * 14 * Returns: If no error, R0 = 0 * 15 * R1 = lun we came up with * 16 * R2 = equip flag (1=we did, -1=user's lun) * 17 * If error, R0 = error message * 18 * * 19 * Eats R0:R3. * 20 * * 21 ********************************************************************************** 22 23 BLOCK 24 ENTRY FILEGET 25 26 BEGFRAME 00178801 6 BASE 27 FIGLUN BSS 1 lun we are using 00178802 6 BASE 28 FIGDEF BSS 1 default extension 29 ENDFRAME 30 1BD4A DD5F8003 6 STAK 31 FILEGET ENTRNP PUSH 1BD4B E4178802 0 6 BASE 32 ST R0 SP,FIGDEF save the desired default 1BD4C DC41B346 33 CALLNP FETCHITMF pick up the lun or file name 1BD4D F6ADBD64 2 34 JBT R2/TNUM FIG30 jump if a lun 1BD4E F2AFBD71 2 35 JBF R2/TALPH FIG90 jump if not a possible name 36 * \ / 37 38 * We have found ourselves a file name. Open a unit with it. 1BD4F 60040122 0 IMM 39 LD R0 URFREELUN find a free unit to equip 1BD50 09040064 IMM 40 UREQ MAXLOCAL+XREQ good spot to hunt 1BD51 FA09BD73 0 41 JLTZ R0 FIG91 if this ever jumps... 1BD52 E4578801 1 6 BASE 42 ST R1 SP,FIGLUN save the lun we found 1BD53 60040102 0 IMM 43 LD R0 URPACKFS request for file pack 1BD54 6041A8E6 1 44 LD R1 LBUFPT point to file name string 1BD55 6085A957 2 IMM 45 LD R2 ADR(EQBUF) point to equip buffer 1BD56 09040000 IMM 46 UREQ XREQ ask system for help 1BD57 FA09BD71 0 47 JLTZ R0 FIG90 jump if trouble 48 * \ / 49 1BD58 6001A963 0 50 LD R0 EQEXT get the extension 1BD59 FA2FBD5C 0 51 JNEMW R0 FIG10 jump if not defaulted 1BD5A 60178802 0 6 BASE 52 LD R0 SP,FIGDEF get out default 1BD5B E401A963 0 53 ST R0 EQEXT and use that for equipping 0001BD5C 54 FIG10 LABEL 1BD5C 60040051 0 IMM 55 LD R0 FREQUIPR now to equip it up!! 1BD5D 6045A957 1 IMM 56 LD R1 ADR(EQBUF) point to buffer again 1BD5E 08978801 6 BASE 57 FREQ SP,FIGLUN(XREQ) see what happens 1BD5F FA09BD75 0 58 JLTZ R0 FIG92 jump if not found 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 217 (RDUFSUB) F 22 File handling subroutines 59 * \ / 60 1BD60 60840001 2 IMM 61 LD R2 1 remember we equipped it! 0001BD61 62 FIG20 LABEL 1BD61 60040000 0 IMM 63 LD R0 0 return the all-clear signal 0001BD62 64 FIGEXIT LABEL 1BD62 60578801 1 6 BASE 65 LD R1 SP,FIGLUN pick up the lun selection 1BD63 5D1F8003 6 STAK 66 LEAVE POP 67 * --- 68 69 * The user passed us a number. See if it is a unit with an opened file. 0001BD64 70 FIG30 LABEL 1BD64 6087FFFF 2 IMM 71 LD R2 -1 say we did not equip it 1BD65 6201A8ED 01 72 LD2 R0 VALUE get the user's input 1BD66 E4578801 1 6 BASE 73 ST R1 SP,FIGLUN save the lun he wants 1BD67 FA4BBD6F 1 74 JLEZ R1 FIG89 jump if garbage 1BD68 644400C9 1 IMM 75 CPR R1 LUNCMLOW see if too high 1BD69 FE07BD6F 76 JGE FIG89 jump if not ok 77 * \ / 78 1BD6A 60040010 0 IMM 79 LD R0 FRSTATUS make sure it's equipped 1BD6B 08978801 6 BASE 80 FREQ SP,FIGLUN(XREQ) 1BD6C FA07BD61 0 81 JGEZ R0 FIG20 1BD6D 6005D2B1 0 IMM 82 LD R0 ADR(ERM504) "Lun not equipped" 1BD6E FE0FBD62 83 JMP FIGEXIT 84 * --- 85 0001BD6F 86 FIG89 LABEL 1BD6F 6005D29F 0 IMM 87 LD R0 ADR(ERM501) "Lun must be in range 1-200" 1BD70 FE0FBD62 88 JMP FIGEXIT 89 * --- 90 0001BD71 91 FIG90 LABEL 1BD71 6005D2A6 0 IMM 92 LD R0 ADR(ERM502) "Expecting file name or lun" 1BD72 FE0FBD62 93 JMP FIGEXIT 94 * --- 95 0001BD73 96 FIG91 LABEL 1BD73 6005D299 0 IMM 97 LD R0 ADR(ERM500) "No free luns available" 1BD74 FE0FBD62 98 JMP FIGEXIT no such thing as a free lun.. 99 * --- 100 0001BD75 101 FIG92 LABEL 1BD75 6005D2AD 0 IMM 102 LD R0 ADR(ERM503) "File not found" 1BD76 FE0FBD62 103 JMP FIGEXIT 104 * --- 105 106 END of FILEGET subroutine 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 218 (RDUFSUB) F 22 File handling subroutines 108 109 ********************************************************************************** 110 * * 111 * This is the FREELUN routine. It is called to unequip the * 112 * lun in INLUN which we have equipped for some command processor. * 113 * The INLUN word is also cleared so we know all is clear. * 114 * * 115 * Eats R0. * 116 * * 117 ********************************************************************************** 118 119 BLOCK 120 ENTRY FREELUNS 121 122 BEGFRAME 00178801 6 BASE 123 FLTMP BSS 1 possible error code 124 ENDFRAME 125 1BD77 DD5F8002 6 STAK 126 FREELUNS ENTRNP PUSH 1BD78 E4178801 0 6 BASE 127 ST R0 SP,FLTMP save possible error code 1BD79 5C01A917 128 CMZ INLUN is there a lun in use? 1BD7A FE03BD7E 129 JEQ FREELUN10 jump if not 130 * \ / 131 1BD7B 60040060 0 IMM 132 LD R0 FRUNEQUIP get code to free up the lun 1BD7C 0881A917 133 FREQ INLUN(XREQ) give the unit back 1BD7D EC01A917 134 STZ INLUN clear the word 0001BD7E 135 FREELUN10 LABEL 1BD7E 5C01A91E 136 CMZ UNEQFLAG free up output lun? 1BD7F FE03BD83 137 JEQ FREELUNX done if not 138 * \ / 139 1BD80 60040060 0 IMM 140 LD R0 FRUNEQUIP get request to let it go 1BD81 0881A918 141 FREQ OUTLUN(XREQ) release our grip 1BD82 EC01A91E 142 STZ UNEQFLAG reset flag 0001BD83 143 FREELUNX LABEL 1BD83 60178801 0 6 BASE 144 LD R0 SP,FLTMP restore error code 1BD84 5D1F8002 6 STAK 145 LEAVE POP 146 * --- 147 148 END of FREELUN 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 219 (RDUFSUB) F 22 File handling subroutines 150 151 ********************************************************************************** 152 * * 153 * This is the READFILE routine. It reads a record from a file * 154 * and does some rudimentary processing. * 155 * Call: * 156 * CALL READFILE * 157 * PARVL * 158 * * 159 * R0=RTEOF or RTEOD for respective condition * 160 * R0=-1 for other errors * 161 * R1 = length of record (chars) * 162 * R2 = terminaing char (parity bit removed) * 163 * IBUFF containing record with terminator tacked on the end. * 164 * Eats R0:R2. * 165 * * 166 ********************************************************************************** 167 168 BLOCK 169 ENTRY READFILE 170 171 BEGFRAME 00178801 6 BASE 172 RFLUN BSS 1 unit to read from 173 ENDFRAME 174 1BD85 DD1F8002 6 STAK 175 READFILE ENTR PUSH 1BD86 C0578801 6 BASE 176 STPVL SP,RFLUN save unit to read from 1BD87 60040030 0 IMM 177 LD R0 FRREAD set up to input line 1BD88 6044005F 1 IMM 178 LD R1 OKLEN-1 acceptable length 1BD89 6085A800 2 IMM 179 LD R2 ADR IBUFFW point to input buffer 1BD8A E481A8E5 2 180 ST R2 BUFPT initialize pointer 1BD8B 08978801 6 BASE 181 FREQ SP,RFLUN(XREQ) slurp up some input 1BD8C FA09BD9B 0 182 JLTZ R0 RF80 jump if trouble 1BD8D FA49BD9B 1 183 JLTZ R1 RF80 or if line too long 184 * \ / 185 1BD8E 3044005F 1 IMM 186 RSB R1 OKLEN-1 obtain actual length 1BD8F 600A2040 0 0 CBM 187 LD R0 R0/RECTYPE get type of record 1BD90 64040000 0 IMM 188 CPR R0 RTTEXT be sure its simple text 1BD91 FE0DBD97 189 JNE RF70 possible error if not 1BD92 7884007F 2 IMM 190 AND R2 GASMASK clear the air 1BD93 E481A8E7 2 191 ST R2 TERMCHAR remember input line terminator 1BD94 E4B3AC00 2 1 @ 192 ST R2 @IBPT(R1) tack on the terminator 1BD95 60040000 0 IMM 193 LD R0 0 indicate no error in file read 0001BD96 194 RFEXIT LABEL 1BD96 5D1F8002 6 STAK 195 LEAVE POP 196 * --- 197 0001BD97 198 RF70 LABEL 1BD97 64040008 0 IMM 199 CPR R0 RTEOF maybe end-of-file 1BD98 FE03BD96 200 JEQ RFEXIT exit if so 1BD99 64040009 0 IMM 201 CPR R0 RTEOD or end of data 1BD9A FE03BD96 202 JEQ RFEXIT also exits 0001BD9B 203 RF80 LABEL 1BD9B D1520000 0 REG 204 STMW R0 set error return code 1BD9C FE0FBD96 205 JMP RFEXIT give bad error 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 220 (RDUFSUB) F 22 File handling subroutines 206 * --- 207 208 END of READFILE 143 144 INPUT RDUMAIN 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 221 (RDUMAIN) F 23 Main control code 3 4 BLOCK main control 5 ENTRY BAILOUT 6 ENTRY BREAK 7 ENTRY PROCCOM 8 ENTRY RDU 9 ENTRY RDU96 10 ENTRY RDUBRK 11 ENTRY RDUDO 12 ENTRY RDUDODONE 13 ENTRY RDUDOERR 14 ENTRY RDUE00 15 ENTRY RDUENTER 16 ENTRY RDUERR 17 ENTRY RDUGO 18 ENTRY RDULOST 19 ENTRY RDUNOINIT 20 ENTRY RDUOK 21 ENTRY RDUSYSERR 22 ENTRY VERSION 23 24 ********************************************************************************** 25 * * 26 * This is the Start-up area. We enter here from * 27 * Control Mode or whoever called us. This section * 28 * takes care of necessary initialization, and then jumps * 29 * into the main loop to prompt the user. * 30 * Here we go....... * 31 * * 32 ********************************************************************************** 33 0001BD9D 34 RDU LABEL 1BD9D FE0FBDA1 35 JMP OVERVRSN skip the version number 36 * --- 37 1BDA0 00000000 38 VERSION VFD VERSIONHI,VERSIONLO,0 39 0001BDA1 40 OVERVRSN LABEL 1BDA1 6185AA46 6 IMM 41 LD SP ADR(STACK) set up stack frame pointer 1BDA2 DC41BD3B 42 CALLNP GETPARAM initialize log flag for LOG 1BDA3 60040001 0 IMM 43 LD R0 CNTLA get the default exit character 1BDA4 E401A8EF 0 44 ST R0 EXITCHAR and call it the current exit character 1BDA5 6007FFFF 0 IMM 45 LD R0 STATENDIAL get not dialed state indicator 1BDA6 E401A8D6 0 46 ST R0 STATE say we are not dialed in 1BDA7 EC01A8DA 47 STZ DOFLAG and not processing from a do file 1BDA8 EC01A8DC 48 STZ DOSUPP not suppressing interactive data 49 1BDA9 60040040 0 IMM 50 LD R0 FRWRITE tell user we are here 1BDAA 60440024 1 IMM 51 LD R1 NML get length of message 1BDAB 6085CD1F 2 IMM 52 LD R2 ADR(NAMEMESS) "RDU....etc." 1BDAC 08840002 IMM 53 FREQ LUNSOUT+XREQ hello out there! 54 55 TCNORM 1BDAD 6004011B 0 IMM 55 LD R0 FRTSETTCS set terminating characters 1BDAE 6045AC5D 1 IMM 55 LD R1 ADR(TCTABN) normal table 1BDAF E441A8EA 1 55 ST R1 TCGROUP remember the group we used 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 222 (RDUMAIN) F 23 Main control code 1BDB0 088400C9 IMM 55 FREQ LUNAIN+XREQ for command level inputs 1BDB1 6004011A 0 IMM 56 LD R0 FRTSETTCG now to request our group 1BDB2 60440003 1 IMM 57 LD R1 3 kludge for now 1BDB3 08840001 IMM 58 FREQ LUNSIN+XREQ this should put us in business 59 1BDB4 60040128 0 IMM 60 LD R0 FRTGETECHO fetch the echo mode 1BDB5 088400C9 IMM 61 FREQ LUNAIN+XREQ from the system 1BDB6 E441A916 1 62 ST R1 ECHOMODE remember the RDU echo mode 63 1BDB7 60040127 0 IMM 64 LD R0 FRTGETSH now check out the terminal 1BDB8 08840002 IMM 65 FREQ LUNSOUT+XREQ get info from system 1BDB9 FA07BDBB 0 66 JGEZ R0 RDU05 jump if good data 1BDBA 60440000 1 IMM 67 LD R1 0 make infinite length 0001BDBB 68 RDU05 LABEL 1BDBB FA43BDBF 1 69 JEQZ R1 RDU10 if infinite then leave alone 1BDBC 10440002 1 IMM 70 SUB R1 2 else allow for overhead 1BDBD FA45BDBF 1 71 JGTZ R1 RDU10 if enough space use it 1BDBE 60440001 1 IMM 72 LD R1 1 else make just enough 0001BDBF 73 RDU10 LABEL 1BDBF E441A914 1 74 ST R1 LINEMAX set terminal max length 1BDC0 EDC1A915 75 STW LINECNT then start line count 1BDC1 D141A911 76 STMW CPI clear comm buffer pointers 1BDC2 D141A912 77 STMW CPO both of them 1BDC3 6001AC03 0 78 LD R0 CBPT get pointer to normal i/o processor 1BDC4 E401A884 0 79 ST R0 SHIPBPT set up for use 1BDC5 DC41F7BC 80 CALLNP IOINIT set up I/O processor 1BDC6 6145A986 5 IMM 81 LD SUB ADR(TREETOP) point to head of symbols 1BDC7 E541A928 5 82 ST SUB SUBPC remember our tree-house 83 * \ / 84 85 ********************************************************************************** 86 * * 87 * This is the start of the command processing loop. * 88 * We always reset the stack pointer here due to some messy * 89 * subroutine exits (jumping out on error conditions). * 90 * If we are in normal RDU mode we pick up a command * 91 * from the input line and process it. If we are in interactive * 92 * mode we just pick up the input line and ship it off to the * 93 * remote system to deal with. * 94 * * 95 ********************************************************************************** 96 97 * \ / 0001BDC8 98 RDUOK LABEL top of loop for command fetch 1BDC8 6185AA46 6 IMM 99 LD SP ADR(STACK) set up stack pointer 1BDC9 5C01A8DA 100 CMZ DOFLAG processing from a DO file? 1BDCA FE0DBE8C 101 JNE RDUDO if so go get it 1BDCB 5C01A8D6 102 CMZ STATE RDU or Port zero? 1BDCC FE03BE6B 103 JEQ RDUZERO if port zero then get out 1BDCD DC41B8C2 104 CALLNP OUTPROMPT print the prompt and ... 1BDCE DC41B3B6 105 CALLNP READLINE ... get the next command line 106 * \ / 107 0001BDCF 108 RDU20 LABEL 1BDCF DC41B336 109 CALLNP FETCHCOM see what dear user wants to do 1BDD0 F6ABBF13 2 110 JBT R2/TSTEP SNGLSTEP if single-step then jump 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 223 (RDUMAIN) F 23 Main control code 1BDD1 5C01A8DA 111 CMZ DOFLAG processing from a DO file? 1BDD2 FE0DBDD8 112 JNE RDU25 if so don't add extra line 1BDD3 5C01A8D7 113 CMZ CPSTATE working with a concurrent process? 1BDD4 FE0DBDD8 114 JNE RDU25 if so don't add extra line 1BDD5 E65F8002 126 STAK 115 ST2 R1 STAK SP,2 save FI status 1BDD6 DC41B8BC 116 CALLNP CRLF move paper 1BDD7 625F8002 126 STAK 117 LD2 R1 STAK SP,2 retrieve FI status 0001BDD8 118 RDU25 LABEL 1BDD8 F2AFBE33 2 119 JBF R2/TALPH RDU90 jump if cruddy input 1BDD9 6145AF05 5 IMM 120 LD COM ADR(COMTAB) point to general commands 1BDDA 6105B2A1 4 IMM 121 LD R4 ADR(BIGCTTOP) and to the end 122 * \ / 123 124 * COM -> beginning of appropriate command table, 125 * R4 -> end of appropriate command table, 126 * BUFPT -> command string being searched for 0001BDDB 127 PROCCOM LABEL 1BDDB DC41B2A8 128 CALLNP COMLOOK go see if known command 1BDDC FA0DBE35 0 129 JNEZ R0 RDUERR jump if have problems 1BDDD DC41C2E7 130 CALLNP FORMHELP see if just format question 1BDDE FA0DBDC8 0 131 JNEZ R0 RDUOK jump if so, it was already processed 132 133 * Ensure that the command is legal under current operating conditions. 1BDDF 5C095813 5 ZBM 134 CMZ COM,COMOKDO must we be processing a DO file? 1BDE0 FE03BDE5 135 JEQ PROCCOM5 if not then try next check 136 * \ / 137 1BDE1 5C01A8DA 138 CMZ DOFLAG are we processing a DO file? 1BDE2 FE0DBDE5 139 JNE PROCCOM5 if so then all is ok 1BDE3 6005CF2B 0 IMM 140 LD R0 ADR ERM10A "Command only valid from a DO file" 1BDE4 FE0FBE35 141 JMP RDUERR 142 * --- 143 0001BDE5 144 PROCCOM5 LABEL 1BDE5 5C11AC0B @ 145 CMZ @STOPPED is remote system stopped? 1BDE6 FE0DBDEB 146 JNE PROCCOM10 if so then next check 1BDE7 5C095C13 5 ZBM 147 CMZ COM,COMOKNS is command ok when running? 1BDE8 FE0DBDEF 148 JNE PROCCOM20 if so then go do the command 1BDE9 6005CEE1 0 IMM 149 LD R0 ADR ERM103 "must be stopped" 1BDEA FE0FBE35 150 JMP RDUERR 151 * --- 152 0001BDEB 153 PROCCOM10 LABEL 1BDEB 5C01A8D6 154 CMZ STATE are we dialed up? 1BDEC FE07BDEF 155 JGE PROCCOM20 if so then no problem 1BDED 5C095A13 5 ZBM 156 CMZ COM,COMOKND ok to do this if not dialed? 1BDEE FE03BE3D 157 JEQ RDU95 if not then we can't do it 158 * \ / 159 160 * The command is valid under current conditions. Pick up parameters. 0001BDEF 161 PROCCOM20 LABEL 1BDEF EC01A8F3 162 STZ DISPTYPE clear display type 1BDF0 60094633 0 5 ZBM 163 LD R0 COM,COMPARAM get parameter control code 1BDF1 5CA1BDF2 0 164 LDPC PARGETTAB(R0) then process parameters 165 * --- 166 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 224 (RDUMAIN) F 23 Main control code 0001BDF2 167 PARGETTAB LABEL parameter fetch control table 1BDF2 0001BDFA 168 VFD ADR RDUNOPAR 0 - no parameters allowed 1BDF3 0001BE12 169 VFD ADR RDUNOD 1 - no param but display type 1BDF4 0001BE2D 170 VFD ADR RDURQC 2 - required code 1BDF5 0001BE29 171 VFD ADR RDUSPC 3 - special 1BDF6 0001BE05 172 VFD ADR RDURQA 4 - required address 1BDF7 0001BE2A 173 VFD ADR RDUOPA 5 - optional address 1BDF8 0001BE05 174 VFD ADR RDURQAD 6 - required address, display 1BDF9 0001BDFE 175 VFD ADR RDURQADS 7 - symbolic addr, display 176 177 * The command should have no parameters with it. 0001BDFA 178 RDUNOPAR LABEL 1BDFA DC41B33F 179 CALLNP FETCHNP get something 1BDFB F6BFBE29 2 180 JBT R2/TEOL DOCOMMND ok if nothing there, go do the command 1BDFC 6005CF35 0 IMM 181 LD R0 ADR ERM110 "No params on this one" 1BDFD FE0FBE35 182 JMP RDUERR sorry 183 * --- 184 185 * Expecting an address, either actual or symbolic. 0001BDFE 186 RDURQADS LABEL 1BDFE E55F8001 5 6 STAK 187 ST COM STAK SP,1 save command pointer from harm 1BDFF DC41B4A2 188 CALLNP ADRGET get address to display 1BE00 FA0DBE35 0 189 JNEZ R0 RDUERR if problems tell user 1BE01 6001A91F 0 190 LD R0 ADDRESS get address to use 1BE02 E401A830 0 191 ST R0 SBUFFW keep everyone informed 1BE03 615F8001 5 6 STAK 192 LD COM STAK SP,1 restore command pointer 1BE04 FE0FBE07 193 JMP RDUP20 then merge back in 194 * --- 195 196 * Expecting an address (hex form). 0001BE05 197 RDURQAD LABEL address display 0001BE05 198 RDURQA LABEL address 1BE05 DC41B33F 199 CALLNP FETCHNP get a number 1BE06 F6BFBE39 2 200 JBT R2/TEOL RDU93 error if nothing there 201 * \ / 202 203 * We have an address. Check for legality. 0001BE07 204 RDUP20 LABEL 1BE07 FA83BE37 2 205 JEQZ R2 RDU92 jump if bad error 1BE08 6001A830 0 206 LD R0 SBUFFW get the value 1BE09 60C94C43 3 5 ZBM 207 LD R3 COM,COMADDR get address control field 1BE0A 6827AC85 0 3 208 UCPR R0 ADRMASK(R3) see if too big 1BE0B FE05BE3B 209 JGT RDU94 if so then we won't use it 210 * \ / 211 212 * Check for more on the input line. 1BE0C E401A91F 0 213 ST R0 ADDRESS save the address we are to use 1BE0D 6444000D 1 IMM 214 CPR R1 CR is terminating char a carriage return? 1BE0E FE03BE29 215 JEQ DOCOMMND if so then we have good stuff 216 * \ / 217 1BE0F 60094633 0 5 ZBM 218 LD R0 COM,COMPARAM get param type code back 1BE10 64040006 0 IMM 219 CPR R0 RQAD display type possibilities? 1BE11 FE09BE41 220 JLT RDU97 if not this then can't have more input 221 * \ / 222 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 225 (RDUMAIN) F 23 Main control code 223 * Pick up a display type. 0001BE12 224 RDUNOD LABEL 1BE12 6444000D 1 IMM 225 CPR R1 CR is terminator the end? 1BE13 FE03BE29 226 JEQ DOCOMMND if so then process the command 1BE14 64440027 1 IMM 227 CPR R1 QUOTE then is it a write? 1BE15 FE03BE20 228 JEQ RDUP50 if so go check it out 229 * \ / 230 1BE16 DC41B33C 231 CALLNP FETCHAP pick up display type 1BE17 F6BFBE29 2 232 JBT R2/TEOL DOCOMMND if end then what the heck 1BE18 F6A7BE20 2 233 JBT R2/TQUO RDUP50 wants to change the contents 1BE19 F2AFBE45 2 234 JBF R2/TALPH RDU99 we want a display type code 235 * \ / 236 237 * We have a possible display type. See if we recognize it. 1BE1A 60840007 2 IMM 238 LD R2 DTTABL-1 get number of types 0001BE1B 239 RDUP40 LABEL 1BE1B 6425ACA3 0 2 240 CPR R0 DTTAB(R2) is this a valid type? 1BE1C FE03BE26 241 JEQ RDUP60 if so then we're all set 1BE1D FAA7BE1B 2 242 JDR R2 RDUP40 if not then try another 1BE1E 6005D0F7 0 IMM 243 LD R0 ADR ERM171 "unknown display type" 1BE1F FE0FBE35 244 JMP RDUERR give them a goose 245 * --- 246 247 * A single quote was found indicating a request to change the 248 * value of the specified location. Is this legal? 0001BE20 249 RDUP50 LABEL 1BE20 5C094C14 5 ZBM 250 CMZ COM,GMMWRITE does command allow writes?? 1BE21 FE03BE43 251 JEQ RDU98 error if not 252 * \ / 253 1BE22 6001A8E5 0 254 LD R0 BUFPT now skip over the quote 1BE23 D00A1F30 0 CBM 255 INC R0/NXTCHAR we don't want to see it again 1BE24 E401A8E5 0 256 ST R0 BUFPT ready to roll on 1BE25 FE0FBE29 257 JMP DOCOMMND go process command 258 * --- 259 260 * Found a known display type. 0001BE26 261 RDUP60 LABEL 1BE26 E481A8F3 2 262 ST R2 DISPTYPE save desired display type 1BE27 6444000D 1 IMM 263 CPR R1 CR better be CR at the end 1BE28 FE0DBE41 264 JNE RDU97 if not then all for naught 265 * \ / 266 0001BE29 267 RDUSPC LABEL special (defer fetch) 0001BE29 268 DOCOMMND LABEL 1BE29 5C895F13 5 ZBM 269 LDPC COM,COMPROC now go process command 270 * --- 271 272 * Optional address parameter. 0001BE2A 273 RDUOPA LABEL 1BE2A DC41B33F 274 CALLNP FETCHNP get a number 1BE2B F6BFBE29 2 275 JBT R2/TEOL DOCOMMND optional, so CR is ok here 1BE2C FE0FBE07 276 JMP RDUP20 merge in a little 277 * --- 278 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 226 (RDUMAIN) F 23 Main control code 279 * Alpha parameter (possibly file name). 0001BE2D 280 RDURQC LABEL 1BE2D DC41B2B7 281 CALLNP DECODER get alpha code 1BE2E F6BFBE39 2 282 JBT R2/TEOL RDU93 error if nothing there 1BE2F FA83BE37 2 283 JEQZ R2 RDU92 complain if bad error 1BE30 6444000D 1 IMM 284 CPR R1 CR is that all there is? 1BE31 FE03BE29 285 JEQ DOCOMMND if so then we're all set 1BE32 FE0FBE41 286 JMP RDU97 else complain loudly 287 * --- 288 0001BE33 289 RDU90 LABEL 1BE33 F6BFBDC8 2 290 JBT R2/TEOL RDUOK ignore solo cr's 1BE34 6005CEE8 0 IMM 291 LD R0 ADR ERM104 "Expecting RDU command" 292 * \ / 293 294 ********************************************************************************** 295 * * 296 * This is where we jump to on any error condition * 297 * throughout this program. We print the error message * 298 * that R0 points to then go to the main command loop. * 299 * Don't worry about the stack pointer since it will get * 300 * reset at RDUOK. * 301 * Usage: * 302 * LD R0 ADR * 303 * JMP RDUERR * 304 * --- * 305 * Never returns so who cares what Regs get munched. * 306 * * 307 ********************************************************************************** 308 309 * \ / 0001BE35 310 RDUERR LABEL 1BE35 DC41B88A 311 CALLNP OUT ship out the error message 1BE36 FE0FBDC8 312 JMP RDUOK and try again 313 * --- 314 0001BE37 315 RDU92 LABEL 1BE37 6005CF46 0 IMM 316 LD R0 ADR ERM112 "Bad parameter" 1BE38 FE0FBE35 317 JMP RDUERR 318 * --- 319 0001BE39 320 RDU93 LABEL 1BE39 6005CF50 0 IMM 321 LD R0 ADR ERM113 "Parameter expected" 1BE3A FE0FBE35 322 JMP RDUERR 323 * --- 324 0001BE3B 325 RDU94 LABEL 1BE3B 6005CF58 0 IMM 326 LD R0 ADR ERM114 "Parameter too big" 1BE3C FE0FBE35 327 JMP RDUERR 328 * --- 329 0001BE3D 330 RDU95 LABEL 1BE3D 6005CF0F 0 IMM 331 LD R0 ADR ERM108 "Not valid if not dialed" 1BE3E FE0FBE35 332 JMP RDUERR 333 * --- 334 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 227 (RDUMAIN) F 23 Main control code 0001BE3F 335 RDU96 LABEL 1BE3F 6005D04F 0 IMM 336 LD R0 ADR ERM154 "Remote sys not taking data" 1BE40 FE0FBE35 337 JMP RDUERR and go complain 338 * --- 339 0001BE41 340 RDU97 LABEL 1BE41 6005CF3F 0 IMM 341 LD R0 ADR ERM111 "extra parameters" 1BE42 FE0FBE35 342 JMP RDUERR 343 * --- 344 0001BE43 345 RDU98 LABEL 1BE43 6005CF75 0 IMM 346 LD R0 ADR ERM118 "write not allowed" 1BE44 FE0FBE35 347 JMP RDUERR 348 * --- 349 0001BE45 350 RDU99 LABEL 1BE45 6005D0EE 0 IMM 351 LD R0 ADR ERM170 "expecting display type" 1BE46 FE0FBE35 352 JMP RDUERR 353 * --- 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 228 (RDUMAIN) F 23 Main control code 355 356 ********************************************************************************** 357 * * 358 * We come here from "MORE --- " processing if the user decides not * 359 * to continue getting more. We probably have a command that needs to * 360 * be processed so we reset the stack and join in the command processor. * 361 * * 362 ********************************************************************************** 363 0001BE47 364 BAILOUT LABEL 1BE47 6185AA46 6 IMM 365 LD SP ADR STACK restore stack pointer 1BE48 FE0FBDCF 366 JMP RDU20 then go process input 367 * --- 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 229 (RDUMAIN) F 23 Main control code 369 370 ********************************************************************************** 371 * * 372 * Terminal break has been received. Decide what to do. * 373 * We also come here for the BREAK command. All this does * 374 * is send a break to the remote machine (useful from DO files). * 375 * * 376 ********************************************************************************** 377 0001BE49 378 RDUBRK LABEL (get here with terminal Break) 1BE49 5C01A8DA 379 CMZ DOFLAG DO file processing? 1BE4A FE0DBEAE 380 JNE RDUDODONE if so then let it handle the break 1BE4B 5C01A8D6 381 CMZ STATE RDU mode or port zero? 1BE4C FE0DBDC8 382 JNE RDUOK if RDU then go re-prompt user 383 * \ / 384 0001BE4D 385 BREAK LABEL 1BE4D D141A911 386 STMW CPI clear character buffer ptrs 1BE4E D141A912 387 STMW CPO both of them 1BE4F 5C01A8E1 388 CMZ IOK is the thing accepting input? 1BE50 FE03BDC8 389 JEQ RDUOK if not then ignore 390 * \ / 391 1BE51 DC01BBAC 392 CALL SHIPCOM else send system a break 1BE52 4101BBF5 393 PAR RESPERROR error address 1BE53 41440008 IMM 394 PARV KLAS8 class=8 1BE54 41440005 IMM 395 PARV 5 slot=5 (send break) 1BE55 41440000 IMM 396 PARV 0 bcm=0 1BE56 40440000 IMM 397 PARVL 0 address=0 1BE57 DC41BC7E 398 CALLNP SHIPNOP pick up any response to the break 1BE58 FE0FBDC8 399 JMP RDUOK then go get something else 400 * --- 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 230 (RDUMAIN) F 23 Main control code 402 403 ********************************************************************************** 404 * * 405 * The remote system went away. Clean up the mess that is left * 406 * around then tell the user all about it. * 407 * * 408 ********************************************************************************** 409 0001BE59 410 RDULOST LABEL (lost remote system) 1BE59 DC41C40D 411 CALLNP FAILPRINT print number of transmission errors 1BE5A 5C01A92E 412 CMZ LOGFLAG see if we should print this log file 1BE5B FE03BE5D 413 JEQ RDULOSTNP if not then don't 1BE5C DC41CCF0 414 CALLNP LOGPRINT print the log 415 * \ / 416 0001BE5D 417 RDULOSTNP LABEL 1BE5D DC41CD0D 418 CALLNP CLOSEM close the session (and batch) units 1BE5E DC41F7E2 419 CALLNP IODROP drop the communications link 1BE5F 6007FFFF 0 IMM 420 LD R0 STATENDIAL get not dialed state indicator 1BE60 E401A8D6 0 421 ST R0 STATE say we are not dialed in 422 TCNORM 1BE61 6004011B 0 IMM 422 LD R0 FRTSETTCS set terminating characters 1BE62 6045AC5D 1 IMM 422 LD R1 ADR(TCTABN) normal table 1BE63 E441A8EA 1 422 ST R1 TCGROUP remember the group we used 1BE64 088400C9 IMM 422 FREQ LUNAIN+XREQ for command level inputs 1BE65 60040118 0 IMM 423 LD R0 FRTSETECHO be sure to restore our echo 1BE66 6041A916 1 424 LD R1 ECHOMODE back to when we started 1BE67 088400C9 IMM 425 FREQ LUNAIN+XREQ now we are set 1BE68 DC41B8B8 426 CALLNP OUTCRLF make room for error message 1BE69 6005D024 0 IMM 427 LD R0 ADR ERM150 "Lost remote system - redial" 1BE6A FE0FBE35 428 JMP RDUERR sorry about that 429 * --- 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 231 (RDUMAIN) F 23 Interactive Mode 432 433 ********************************************************************************** 434 * * 435 * We are in interactive mode. Pick up stuff from the user * 436 * and ship it to the remote system if not our escape character. * 437 * We also send NOPs to let the machine know we still care. * 438 * * 439 ********************************************************************************** 440 0001BE6B 441 RDUZERO LABEL come here when port zero 1BE6B DC41B3B3 442 CALLNP READLINENW check quickly for input 1BE6C FA09BE76 0 443 JLTZ R0 RDUZ20 jump if no input here 444 * \ / 445 446 * R2 contains character just read from the terminal. 0001BE6D 447 RDUZ10 LABEL 1BE6D 6481A8EF 2 448 CPR R2 EXITCHAR is it our switch? 1BE6E FE03BE7D 449 JEQ RDUGO if so then re-enter RDU mode 450 * \ / 451 1BE6F BC41A911 1 452 INCL R1 CPI get input pointer 1BE70 64440078 1 IMM 453 CPR R1 CBLEN more room in input buffer? 1BE71 FE07BE3F 454 JGE RDU96 if not then tell user 1BE72 E4B3AC03 2 1 @ 455 ST R2 @CBPT(R1) add to the input buffer 1BE73 1041A912 1 456 SUB R1 CPO check how many characters we have 1BE74 64440004 1 IMM 457 CPR R1 MAXOCHAR is it less than one word? 1BE75 FE09BE6B 458 JLT RDUZERO try to send all available characters next shipnop 459 * \ / 460 0001BE76 461 RDUZ20 LABEL 1BE76 DC41BC7B 462 CALLNP SHIPNOPRD send operator input if possible, 463 * otherwise poll for output 1BE77 6001F38B 0 464 LD R0 RESPBINDX see how much we got last time 1BE78 64040010 0 IMM 465 CPR R0 MAXRESPS in fact, was it a full house? 1BE79 FE03BE6B 466 JEQ RDUZERO if full house, just quickly check for input 1BE7A DC41B3B0 467 CALLNP READLINERM wait 2 secs for input then return 1BE7B FA09BE76 0 468 JLTZ R0 RDUZ20 error sez no input, send another NOP 1BE7C FE0FBE6D 469 JMP RDUZ10 otherwise, go process input character 470 * --- 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 232 (RDUMAIN) F 23 Interactive Mode 472 473 ********************************************************************************** 474 * * 475 * We return here from an interactive session through PORT 0. * 476 * Change our state, log the exit character, disable breaks, reset * 477 * terminal echo, pretty the screen, and we will be set to continue. * 478 * * 479 ********************************************************************************** 480 0001BE7D 481 RDUGO LABEL 1BE7D 60040002 0 IMM 482 LD R0 STATERUN first change our state 1BE7E E401A8D6 0 483 ST R0 STATE make the switch 1BE7F 60440001 1 IMM 484 LD R1 1 two characters in buffer 1BE80 6085A800 2 IMM 485 LD R2 ADR IBUFF where the characters are 1BE81 DC41CCCD 486 CALLNP SPECSAVE log the event 487 1BE82 DC41F7CA 488 CALLNP SIMNOBRKS disable break processing 489 TCNORM 1BE83 6004011B 0 IMM 489 LD R0 FRTSETTCS set terminating characters 1BE84 6045AC5D 1 IMM 489 LD R1 ADR(TCTABN) normal table 1BE85 E441A8EA 1 489 ST R1 TCGROUP remember the group we used 1BE86 088400C9 IMM 489 FREQ LUNAIN+XREQ for command level inputs 1BE87 60040118 0 IMM 490 LD R0 FRTSETECHO get request to set echo 1BE88 6041A916 1 491 LD R1 ECHOMODE get original echo mode 1BE89 088400C9 IMM 492 FREQ LUNAIN+XREQ restore proper echo mode 1BE8A DC41B8B8 493 CALLNP OUTCRLF make a little room 1BE8B FE0FBDC8 494 JMP RDUOK then prompt dear user 495 * --- 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 233 (RDUMAIN) F 23 DO File Processor 498 499 ********************************************************************************** 500 * * 501 * We get here when ready for another command and processing * 502 * from a DO file. Make sure a break has not come in, get the * 503 * input line, echo it if desired, see if we are done, then go to * 504 * the command processor. * 505 * Note that we must ship out a prompt before logging the read * 506 * or else the log file will look bizarre. * 507 * * 508 ********************************************************************************** 509 0001BE8C 510 RDUDO LABEL 1BE8C D181A8E0 511 CLRT UBREAK did a break happen while we were working? 1BE8D FE0DBEAE 512 JNE RDUDODONE if so clean up and leave 513 * \ / 514 1BE8E 60040030 0 IMM 515 LD R0 FRREAD read a line from the DO file 1BE8F 6044005F 1 IMM 516 LD R1 OKLEN-1 legal length of input line 1BE90 6085A800 2 IMM 517 LD R2 ADR IBUFFW our input buffer 1BE91 E481A8E5 2 518 ST R2 BUFPT initialize the input buffer pointer 1BE92 E481AA4C 2 519 ST R2 EVENTADDR save for logging 1BE93 0881A8DD 520 FREQ DOUNIT(XREQ) read a line from the DO file 1BE94 FA09BEAC 0 521 JLTZ R0 RDUDO40 error on read 1BE95 600A2040 0 0 CBM 522 LD R0 R0/RECTYPE get the record type 1BE96 64040009 0 IMM 523 CPR R0 RTEOD end of data? 1BE97 FE03BEAE 524 JEQ RDUDODONE if so then quit 525 * \ / 526 1BE98 3044005F 1 IMM 527 RSB R1 OKLEN-1 see how much input there was 1BE99 E481A8E7 2 528 ST R2 TERMCHAR save the terminating char (CR) 1BE9A E4B3AC00 2 1 @ 529 ST R2 @IBPT(R1) and put on end of buffer 1BE9B 5C01A8DB 530 CMZ DOLIST listing commands? 1BE9C FE03BEA1 531 JEQ RDUDO10 don't list prompt 1BE9D E45F8001 1 6 STAK 532 ST R1 STAK SP,1 save the number of char 1BE9E DC41B8BC 533 CALLNP CRLF pretty the paper 1BE9F DC41B8C2 534 CALLNP OUTPROMPT indicate another command 1BEA0 605F8001 1 6 STAK 535 LD R1 STAK SP,1 restore number of chars 536 * \ / 537 0001BEA1 538 RDUDO10 LABEL 1BEA1 DC41CCCD 539 CALLNP SPECSAVE log it 1BEA2 5C01A8DB 540 CMZ DOLIST list the command? 1BEA3 FE03BEA8 541 JEQ RDUDO30 go process the command 542 * \ / 543 1BEA4 60040040 0 IMM 544 LD R0 FRWRITE time to echo the input 1BEA5 6085A800 2 IMM 545 LD R2 ADR IBUFFW => buffer 1BEA6 08840002 IMM 546 FREQ LUNSOUT+XREQ 1BEA7 D001A915 547 INC LINECNT another line in the output 548 * \ / 549 0001BEA8 550 RDUDO30 LABEL 1BEA8 6011AC00 0 @ 551 LD R0 @IBPT get first char in line 1BEA9 6404002A 0 IMM 552 CPR R0 STAR is the line just a comment? 1BEAA FE0DBDCF 553 JNE RDU20 if not then process as a command 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 234 (RDUMAIN) F 23 DO File Processor 1BEAB FE0FBE8C 554 JMP RDUDO get the next line from the DO file 555 * --- 556 0001BEAC 557 RDUDO40 LABEL 1BEAC 6005CF7A 0 IMM 558 LD R0 ADR ERM119 "Error reading DO file" 559 * \ / 560 561 ********************************************************************************** 562 * * 563 * This handy place is jumped to when a fatal error occurred * 564 * processing a DO file. An error message (R0 -> error message) * 565 * is listed and then the do file is cleaned up. Control then * 566 * goes to RDUOK. * 567 * * 568 ********************************************************************************** 569 0001BEAD 570 RDUDOERR LABEL 1BEAD DC41B88A 571 CALLNP OUT tell user about the error 572 * \ / 573 0001BEAE 574 RDUDODONE LABEL 1BEAE DC41C928 575 CALLNP DODESTROY wipe out the do file 1BEAF FE0FBDC8 576 JMP RDUOK act normal 577 * --- 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 235 (RDUMAIN) F 23 Abnormal Condition Handler 580 581 ********************************************************************************** 582 * * 583 * We come here when returning to RDU mode, usually due * 584 * to some error in interactive mode. Disable breaks, restore * 585 * normal terminating characters, reset the echo mode and do * 586 * whatever else is necessary to keep our place clean. * 587 * * 588 ********************************************************************************** 589 590 * Entry from CPU halt processing 0001BEB0 591 RDUENTER LABEL 1BEB0 DC41C928 592 CALLNP DODESTROY ensure there is no DO file hanging around 1BEB1 5C01A8D9 593 CMZ XFERFLAG file transfer going on? 1BEB2 FE03BEB4 594 JEQ RDUENOXFER if not 1BEB3 DC41F0F8 595 CALLNP XFERTIDY if so clean up after it 0001BEB4 596 RDUENOXFER LABEL 1BEB4 60040001 0 IMM 597 LD R0 STATESTOP state code indicating stopped 1BEB5 E401A8D6 0 598 ST R0 STATE say we are back in RDU mode 1BEB6 DC41F7CA 599 CALLNP SIMNOBRKS disable break processing 600 TCNORM 1BEB7 6004011B 0 IMM 600 LD R0 FRTSETTCS set terminating characters 1BEB8 6045AC5D 1 IMM 600 LD R1 ADR(TCTABN) normal table 1BEB9 E441A8EA 1 600 ST R1 TCGROUP remember the group we used 1BEBA 088400C9 IMM 600 FREQ LUNAIN+XREQ for command level inputs 1BEBB DC01BBAC 601 CALL SHIPCOM now stop the sucker 1BEBC 4101BBF5 602 PAR RESPERROR error address 1BEBD 41440005 IMM 603 PARV KLAS5 class=5 1BEBE 41440000 IMM 604 PARV 0 slot=0 1BEBF 41440000 IMM 605 PARV BCMSTOP bcm=0 1BEC0 40440000 IMM 606 PARVL 0 address=0 607 * \ / 608 609 * Entry from bus error processing 0001BEC1 610 RDUENTRY LABEL 1BEC1 60040118 0 IMM 611 LD R0 FRTSETECHO get request to set echo 1BEC2 6041A916 1 612 LD R1 ECHOMODE get original echo mode 1BEC3 088400C9 IMM 613 FREQ LUNAIN+XREQ restore proper echo mode 1BEC4 DC41B8B8 614 CALLNP OUTCRLF make a little room 1BEC5 DC41CA77 615 CALLNP BPIRESTORE restore all breakpoints 1BEC6 5C01A8DF 616 CMZ MAPPED got a map yet? 1BEC7 FE0DBED4 617 JNE RDUE05 if so then don't get another 618 * \ / 619 620 * Entry from STOP command 0001BEC8 621 RDUE00 LABEL 1BEC8 DC41BFFA 622 CALLNP GETMAP else go capture that info 1BEC9 5C01A981 623 CMZ THESSU have system SSU yet? 1BECA FE07BED4 624 JGE RDUE05 jump if so 625 * \ / 626 627 * find the main SSU, in case there are more than one 1BECB 61C4000F 7 IMM 628 LD R7 16-1 start high 0001BECC 629 FINDSSU LABEL 1BECC 622FA935 01 7 630 LD2 R0 MAPDATA(R7) get some info 1BECD 600A4040 0 1 CBM 631 LD R0 R1/XMSGBCM get slot type 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 236 (RDUMAIN) F 23 Abnormal Condition Handler 1BECE 64040004 0 IMM 632 CPR R0 DEVSSU is it SSU? 1BECF ED920000 0 REG 633 STLNE R0 save answer 1BED0 7C0A4E10 0 1 CBM 634 IOR R0 R1/THEBIT combine w/meaningful bit 1BED1 FA03BED3 0 635 JEQZ R0 HAVEIT jump if SSU and bit is 0 1BED2 FBE7BECC 7 636 JDR R7 FINDSSU else try more 637 * \ / 638 0001BED3 639 HAVEIT LABEL 1BED3 E5C1A981 7 640 ST R7 THESSU save result 0001BED4 641 RDUE05 LABEL 1BED4 DC41C108 642 CALLNP DOSTATUS obtain status and list out 1BED5 D1C1A8DF 643 SETT MAPPED have we mapped the frontier? 1BED6 FE03BDC8 644 JEQ RDUOK if so then once is enough 1BED7 DC41C006 645 CALLNP MAPPER go list out the map 646 * \ / 647 648 * Now report what is in the SSU message buffers. 1BED8 DC01C8ED 649 CALL DOSSMSG 1BED9 4141A97F 650 PARV SSUSLOT SLOT number 1BEDA 4044140A IMM 651 PARVL MB1ADR address of info in SSU 1BEDB DC41B86C 652 CALLNP BLANKOUTW fill output buffer with blanks 1BEDC 6005CE6E 0 IMM 653 LD R0 ADR MGSMB1 "MB1:" 1BEDD DC41B87B 654 CALLNP MESSMOVE move into the buffer 1BEDE 38B7AC01 2 3 @ 655 LEA R2 @OBPT(OBP) R2 -> where we are in the buffer 1BEDF 6005A830 0 IMM 656 LD R0 ADR SBUFFW R0 -> the string 1BEE0 6044000A 1 IMM 657 LD R1 10 10 characters in SSU buffer 1BEE1 FE400000 658 CMOVE into the output they go 1BEE2 DC01C8ED 659 CALL DOSSMSG 1BEE3 4141A97F 660 PARV SSUSLOT SLOT number 1BEE4 40441413 IMM 661 PARVL MB2ADR address of info in SSU 1BEE5 60C40011 3 IMM 662 LD OBP 17 1BEE6 6005CE70 0 IMM 663 LD R0 ADR MGSMB2 "MB2:" 1BEE7 DC41B87B 664 CALLNP MESSMOVE move into the buffer 1BEE8 38B7AC01 2 3 @ 665 LEA R2 @OBPT(OBP) R2 -> where we are in the buffer 1BEE9 6005A830 0 IMM 666 LD R0 ADR SBUFFW R0 -> the string 1BEEA 6044000A 1 IMM 667 LD R1 10 10 characters in SSU buffer 1BEEB FE400000 668 CMOVE place into the output 1BEEC 18C4000A 3 IMM 669 ADD OBP 10 keep pointer current 1BEED DC41B886 670 CALLNP OUTO send it to the user 1BEEE FE0FBDC8 671 JMP RDUOK now we're set! 672 * --- 673 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 237 (RDUMAIN) F 23 Abnormal Condition Handler 675 676 ********************************************************************************** 677 * * 678 * We have received a bus error from the remote system. * 679 * Send a clearall, tell the user about it, and join in with * 680 * the normal entry. * 681 * * 682 ********************************************************************************** 683 0001BEEF 684 RDUSYSERR LABEL (error from remote sys) 1BEEF DC41C928 685 CALLNP DODESTROY ensure there is no DO file hanging around 1BEF0 D1C1A8D6 686 SETT STATE are we running? 1BEF1 FE03BDC8 687 JEQ RDUOK if not then carry on 1BEF2 DC41F7CA 688 CALLNP SIMNOBRKS disable break processing 689 TCNORM 1BEF3 6004011B 0 IMM 689 LD R0 FRTSETTCS set terminating characters 1BEF4 6045AC5D 1 IMM 689 LD R1 ADR(TCTABN) normal table 1BEF5 E441A8EA 1 689 ST R1 TCGROUP remember the group we used 1BEF6 088400C9 IMM 689 FREQ LUNAIN+XREQ for command level inputs 1BEF7 DC01BBAC 690 CALL SHIPCOM if port zero then switch 1BEF8 4101BBF5 691 PAR RESPERROR error address 1BEF9 41440005 IMM 692 PARV KLAS5 class 1BEFA 41440000 IMM 693 PARV 0 slot=0 1BEFB 41440000 IMM 694 PARV BCMSTOP bcm=stop 1BEFC 40440000 IMM 695 PARVL 0 address=0 1BEFD DC01BB9D 696 CALL SHIPCOMT then clear the bus logic 1BEFE 4101BBF5 697 PAR RESPERROR error address 1BEFF 41440005 IMM 698 PARV KLAS5 class=5 1BF00 41440000 IMM 699 PARV 0 slot=0 1BF01 41440003 IMM 700 PARV BCMCALL clear all 1BF02 41440000 IMM 701 PARV 0 address=0 1BF03 40440005 IMM 702 PARVL CLEARDELAY how long to delay 1BF04 DC41B8B8 703 CALLNP OUTCRLF make room 1BF05 6005D089 0 IMM 704 LD R0 ADR ERM159 "Warning - Clearall sent" 1BF06 DC41B88A 705 CALLNP OUT just so they know 1BF07 FE0FBEC1 706 JMP RDUENTRY then enter RDU mode 707 * --- 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 238 (RDUMAIN) F 23 Abnormal Condition Handler 709 710 ********************************************************************************** 711 * * 712 * The remote system is not initialized. * 713 * * 714 ********************************************************************************** 715 0001BF08 716 RDUNOINIT LABEL (remote sys not initialized) 1BF08 DC41C928 717 CALLNP DODESTROY ensure there is no DO file hanging around 1BF09 D1C1A8D6 718 SETT STATE are we running? 1BF0A FE03BDC8 719 JEQ RDUOK if not then ignore this state 1BF0B DC41F7CA 720 CALLNP SIMNOBRKS disable break processing 721 TCNORM 1BF0C 6004011B 0 IMM 721 LD R0 FRTSETTCS set terminating characters 1BF0D 6045AC5D 1 IMM 721 LD R1 ADR(TCTABN) normal table 1BF0E E441A8EA 1 721 ST R1 TCGROUP remember the group we used 1BF0F 088400C9 IMM 721 FREQ LUNAIN+XREQ for command level inputs 1BF10 6005D07C 0 IMM 722 LD R0 ADR ERM158 "Warning - not initialized" 1BF11 DC41B88A 723 CALLNP OUT tell them about the problem 1BF12 FE0FBDC8 724 JMP RDUOK then continue on 725 * --- 726 727 END of RDU main control 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 239 (RDUMAIN) F 23 Single-Step Command Processor 730 731 ********************************************************************************** 732 * * 733 * We come here to single-step the currently selected CPU. The * 734 * proper bus commands are sent out to single-step and then obtain * 735 * the current program counter and instruction register which are * 736 * then displayed for the user. The instruction is decoded so * 737 * that the user can watch a mnemonic instead of hex. * 738 * * 739 ********************************************************************************** 740 741 BLOCK 742 ENTRY SNGLSTEP 743 0001BF13 744 SNGLSTEP LABEL (come here with single-step) 1BF13 6001A8D6 0 745 LD R0 STATE get the remote system's state 1BF14 FA09BF3B 0 746 JLTZ R0 SSNOTDIAL jump if not dialed 1BF15 64040001 0 IMM 747 CPR R0 STATESTOP is the system stopped? 1BF16 FE0DBF3D 748 JNE SSNOTSTOP error if not 749 * \ / 750 1BF17 EDDF8001 6 STAK 751 STW STAK SP,1 assume a single single-step 1BF18 F2ADBF1C 2 752 JBF R2/TNUM SS10 jump if that's what user wants 1BF19 6001A830 0 753 LD R0 SBUFFW get instruction count 1BF1A FA0BBDC8 0 754 JLEZ R0 RDUOK just return if bogus count 1BF1B E4178800 0 6 BASE 755 ST R0 SP,0 use the user-supplied count 0001BF1C 756 SS10 LABEL 1BF1C DC01BBAC 757 CALL SHIPCOM send single-step 1BF1D 4101BBF5 758 PAR RESPERROR error address 1BF1E 41440005 IMM 759 PARV KLAS5 class=5 1BF1F 4141A97D 760 PARV CPUSLOT slot=CPU 1BF20 41440006 IMM 761 PARV BCMSSTEP bcm=single step 1BF21 4041AC2C 762 PARVL CPSTEP address=CPSTEP 1BF22 D0578800 6 BASE 763 DEC SP,0 count down control counter 1BF23 FE05BF1C 764 JGT SS10 go round again if more to do 765 * \ / 766 1BF24 DC01BBAC 767 CALL SHIPCOM get the program counter 1BF25 4101BBF5 768 PAR RESPERROR error address 1BF26 41440000 IMM 769 PARV KLAS0 class=0 1BF27 4141A97D 770 PARV CPUSLOT slot=CPU 1BF28 41440002 IMM 771 PARV BCMREAD bcm=2 1BF29 40440008 IMM 772 PARVL CPPC address=program counter 1BF2A 6001F38E 0 773 LD R0 DATA(1) get the value 1BF2B E401A91F 0 774 ST R0 ADDRESS and more places 1BF2C DC01BB04 775 CALL LOCOUT list out location name/address 1BF2D 40440000 IMM 776 PARVL 0 only list label if exact 777 1BF2E E4DF8001 3 6 STAK 778 ST OBP STAK SP,1 save pointer from harm 1BF2F DC01BBAC 779 CALL SHIPCOM now get the next instruction 1BF30 4101BBF5 780 PAR RESPERROR error address 1BF31 41440001 IMM 781 PARV KLAS1 class=1 1BF32 4141A97D 782 PARV CPUSLOT slot=CPU 1BF33 41440002 IMM 783 PARV BCMREAD bcm=2 1BF34 4041A91F 784 PARVL ADDRESS address=(from PC) 1BF35 6001F38E 0 785 LD R0 DATA(1) get the value 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 240 (RDUMAIN) F 23 Single-Step Command Processor 1BF36 E401A8ED 0 786 ST R0 VALUE where we need it 1BF37 60DF8001 3 6 STAK 787 LD OBP STAK SP,1 restore output buffer pointer 1BF38 DC41B686 788 CALLNP OPOUT list the op-code 1BF39 DC41B886 789 CALLNP OUTO then print the line 1BF3A FE0FBDC8 790 JMP RDUOK and that's all she wrote! 791 * --- 792 0001BF3B 793 SSNOTDIAL LABEL 1BF3B 6005CF0F 0 IMM 794 LD R0 ADR ERM108 "Not valid if not dialed" 1BF3C FE0FBE35 795 JMP RDUERR 796 * --- 797 0001BF3D 798 SSNOTSTOP LABEL 1BF3D 6005CEE1 0 IMM 799 LD R0 ADR ERM103 "Remote system not stopped" 1BF3E FE0FBE35 800 JMP RDUERR 801 * --- 802 803 END of SINGLE STEP command 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 241 (RDUMAIN) F 23 Step Command 806 807 ********************************************************************************** 808 * * 809 * This section handles the STEP command which is somewhat like * 810 * the single-step function. The main difference is that STEP will * 811 * store a halt into the next instruction following the one pointed * 812 * to by the program counter, and then release pause. This lets the * 813 * CPU run until it stops, hopefully at the halt we stored. Since * 814 * we remember the location we stored into, any time we are re-entered * 815 * from running, the location is restored with the original contents. * 816 * * 817 ********************************************************************************** 818 819 BLOCK 820 ENTRY STEP 821 0001BF3F 822 STEP LABEL 1BF3F 6105A8C2 4 IMM 823 LD BRK ADR BPITABLE get address of breakpoint table 1BF40 6001F38E 0 824 LD R0 DATA(1) get program counter value 1BF41 E4091D20 0 4 ZBM 825 ST R0 BRK,BPIADDR remember that's where we are 1BF42 EDC90010 4 ZBM 826 STW BRK,BPIUSED this BPI block is in use 1BF43 EC090210 4 ZBM 827 STZ BRK,BPIIN the BPI is not in the remote machine 1BF44 EDC1A930 828 STW STEPSET say step is in 829 * \ / 830 0001BF45 831 STEP10 LABEL 1BF45 BC091D20 0 4 ZBM 832 INCL R0 BRK,BPIADDR advance to next location 1BF46 7805FFFF 0 IMM 833 AND R0 MAXADR keep value within reason 1BF47 E4091D20 0 4 ZBM 834 ST R0 BRK,BPIADDR wrap around if necessary 1BF48 E401A91F 0 835 ST R0 ADDRESS keep it in address, too 1BF49 DC01BBAC 836 CALL SHIPCOM obtain instruction there 1BF4A 4101BBF5 837 PAR RESPERROR error address 1BF4B 41440001 IMM 838 PARV KLAS1 class=1 1BF4C 4141A97D 839 PARV CPUSLOT slot=cpu 1BF4D 41440002 IMM 840 PARV BCMREAD bcm=2 1BF4E 40491D20 4 ZBM 841 PARVL BRK,BPIADDR address=breakpoint addr 1BF4F 6001F38E 0 842 LD R0 DATA(1) get contents 1BF50 6105A8C2 4 IMM 843 LD BRK ADR BPITABLE get address of breakpoint table 1BF51 600A0060 0 0 CBM 844 LD R0 R0/PAROPBITS get just op-code portion 1BF52 64040010 0 IMM 845 CPR R0 PAROPS is it one of the PAR's? 1BF53 FE03BF45 846 JEQ STEP10 if so then skip past it 847 * \ / 848 1BF54 DC41CA1E 849 CALLNP BPILOOK is breakpoint already set at address? 1BF55 FA0DBF58 0 850 JNEZ R0 STEPGO if not set then go 851 * \ / 852 1BF56 EC01A930 853 STZ STEPSET say no step command 1BF57 EE01A8C2 854 STZ2 BPITABLE zero out step entry 0001BF58 855 STEPGO LABEL 1BF58 6145AF8A 5 IMM 856 LD COM ADR GOCOM now start it going 1BF59 5C895F13 5 ZBM 857 LDPC COM,COMPROC and see what happens... 858 * --- 859 860 END of STEP command 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 242 (RDUMAIN) F 23 IPOLL, Selftest Commands 863 864 ********************************************************************************** 865 * * 866 * This section handles those commands which send a bus command * 867 * to the user-specified slot. The slot number is obtained from * 868 * SBUFFW and the remainder of the command data is obtained from * 869 * the command table entry. Reponse will be in DATA, and may be * 870 * missing, one-word, or 16-word, depending on the command. * 871 * * 872 * This is also the display section. Items listed from DATA * 873 * and are 32-bit values. Terminators are not checked for and * 874 * control is always to RDUOK. * 875 * * 876 ********************************************************************************** 877 878 BLOCK 879 ENTRY DISPLAY 880 ENTRY SEND 881 ENTRY SELFTEST 882 0001BF5A 883 SEND LABEL 1BF5A DC01BBAC 884 CALL SHIPCOM 1BF5B 4101BBF5 885 PAR RESPERROR error address 1BF5C 41494034 5 ZBM 886 PARV COM,GCNCLS class 1BF5D 4141A830 887 PARV SBUFFW slot 1BF5E 41494C34 5 ZBM 888 PARV COM,GCNBCM bcm 1BF5F 40440000 IMM 889 PARVL 0 address=0 1BF60 5C974805 5 BASE 890 LDPC COM,GCNPDSP then continue on 891 * --- 892 0001BF61 893 DISPLAY LABEL 1BF61 DC41B86C 894 CALLNP BLANKOUTW clear output buffer 0001BF62 895 DISPLAYX LABEL 1BF62 6001F38E 0 896 LD R0 DATA(1) get the value 1BF63 E401A8ED 0 897 ST R0 VALUE where we need it 1BF64 DC41B5F1 898 CALLNP HEXOUT decode 8 digits 1BF65 DC41B886 899 CALLNP OUTO list out value 1BF66 FE0FBDC8 900 JMP RDUOK always return for new command 901 * --- 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 243 (RDUMAIN) F 23 IPOLL, Selftest Commands 903 904 ********************************************************************************** 905 * * 906 * This section handles the SELFTEST command. Actually, the * 907 * selftest is sent with the general sending facility. However, * 908 * after the selftest is sent, we must pause and then pick up the * 909 * wru 15 for the slot we tested. This must also be displayed. * 910 * * 911 ********************************************************************************** 912 0001BF67 913 SELFTEST LABEL 1BF67 60040140 0 IMM 914 LD R0 URDELAY must wait before reading 1BF68 6041AC26 1 915 LD R1 PPUSTWAIT length 1BF69 60840000 2 IMM 916 LD R2 0 no other events 1BF6A 09040000 IMM 917 UREQ 0+XREQ call OS 1BF6B DC01BBAC 918 CALL SHIPCOM now get the test result 1BF6C 4101BBF5 919 PAR RESPERROR error address 1BF6D 41440000 IMM 920 PARV KLAS0 class=0 1BF6E 4141A830 921 PARV SBUFFW slot=as specified 1BF6F 41440004 IMM 922 PARV BCMWRU bcm=4(wru) 1BF70 4044000F IMM 923 PARVL 15 address=15 1BF71 DC41B86C 924 CALLNP BLANKOUTW clear output buffer 1BF72 6005CDF1 0 IMM 925 LD R0 ADR MESWRU15 "Wru(15):" 1BF73 DC41B87B 926 CALLNP MESSMOVE put into the line 1BF74 FE0FBF62 927 JMP DISPLAYX 928 * --- 929 930 END of SELFTEST and IPOLL commands 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 244 (RDUMAIN) F 23 Control Commands 933 934 ********************************************************************************** 935 * * 936 * This section handles the control commands. They usually * 937 * perform some form of a bus transfer with a given class, slot, * 938 * and BCM. Some may use data as well. * 939 * * 940 ********************************************************************************** 941 942 BLOCK 943 ENTRY BOOTCOPY 944 ENTRY CONTROL 945 ENTRY GOING 946 ENTRY STOPPING 947 ENTRY GO 948 ENTRY GOCONTROL 949 950 * Clear breakpoints before doing a boot copy 0001BF75 951 BOOTCOPY LABEL 1BF75 EC01A930 952 STZ STEPSET say no step instruction set 1BF76 5C01A92F 953 CMZ BPINUM see if any breakpoints in table 1BF77 FE03BF79 954 JEQ CONTROL 1BF78 DC41CB0F 955 CALLNP BPIINIT zero out the breakpoint table 956 * \ / 957 0001BF79 958 CONTROL LABEL 1BF79 5C095214 5 ZBM 959 CMZ COM,GCNDF check data flag 1BF7A FE0DBF7D 960 JNE CNTL10 jump if using user's address 1BF7B 60095564 0 5 ZBM 961 LD R0 COM,GCNTMA get transfer address 1BF7C E401A830 0 962 ST R0 SBUFFW and set up the address to use 0001BF7D 963 CNTL10 LABEL 1BF7D 60894634 2 5 ZBM 964 LD R2 COM,GCNSLOT get slot code 1BF7E DC01BBAC 965 CALL SHIPCOM send out the command 1BF7F 4101BBF5 966 PAR RESPERROR error address 1BF80 41494034 5 ZBM 967 PARV COM,GCNCLS class 1BF81 4165A97B 2 968 PARV SLOTS(R2) slot 1BF82 41494C34 5 ZBM 969 PARV COM,GCNBCM bcm 1BF83 4041A830 970 PARVL SBUFFW address 1BF84 5C974805 5 BASE 971 LDPC COM,COMEX2 now continue processing 972 * --- 973 0001BF85 974 GOING LABEL 1BF85 60040002 0 IMM 975 LD R0 STATERUN say we are going again 1BF86 E401A8D6 0 976 ST R0 STATE remember our new state 1BF87 DC41BC7E 977 CALLNP SHIPNOP send a sync pulse 1BF88 FE0FBDC8 978 JMP RDUOK then off for new input 979 * --- 980 981 * STOP command 982 0001BF89 983 STOPPING LABEL 1BF89 60040001 0 IMM 984 LD R0 STATESTOP say we are stopped again 1BF8A E401A8D6 0 985 ST R0 STATE say we are stopped 1BF8B DC41CA77 986 CALLNP BPIRESTORE ensure breakpoints are out 1BF8C 5C01A8DF 987 CMZ MAPPED do we have our wits? 1BF8D FE0DBDC8 988 JNE RDUOK if so then that's all we need 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 245 (RDUMAIN) F 23 Control Commands 1BF8E FE0FBEC8 989 JMP RDUE00 else send out the scouts 990 * --- 991 0001BF8F 992 GO LABEL 1BF8F 5C01A92F 993 CMZ BPINUM are there breakoints to go in? 1BF90 FE05BF93 994 JGT GOSTEP if so then single step first 1BF91 5C01A930 995 CMZ STEPSET is there a step to put in? 1BF92 FE03BF9A 996 JEQ GOCONTROL if not then just GO 997 * \ / 0001BF93 998 GOSTEP LABEL 1BF93 DC01BBAC 999 CALL SHIPCOM send single step command 1BF94 4101BBF5 1000 PAR RESPERROR error address 1BF95 41440005 IMM 1001 PARV KLAS5 class=5 1BF96 4141A97D 1002 PARV CPUSLOT slot=CPU 1BF97 41440006 IMM 1003 PARV BCMSSTEP BCM=6 1BF98 4041AC2C 1004 PARVL CPSTEP address=CPSTEP 1BF99 DC41CA32 1005 CALLNP BPISET put in the breakpoints 1006 * \ / 1007 0001BF9A 1008 GOCONTROL LABEL 1BF9A DC41BCEF 1009 CALLNP FIXUPMCUS revive MCUs 1BF9B FE0FBF79 1010 JMP CONTROL and GO 1011 * --- 1012 1013 END of CONTROL commands 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 246 (RDUMAIN) F 23 CLEARALL command 1016 1017 ********************************************************************************** 1018 * * 1019 * The CLEARALL command needs special handling since a * 1020 * delay is required. * 1021 * * 1022 ********************************************************************************** 1023 1024 BLOCK 1025 ENTRY CLEARALL 1026 0001BF9C 1027 CLEARALL LABEL 1BF9C DC01BB9D 1028 CALL SHIPCOMT then clear the bus logic 1BF9D 4101BBF5 1029 PAR RESPERROR error address 1BF9E 41440005 IMM 1030 PARV KLAS5 class=5 1BF9F 41440000 IMM 1031 PARV 0 slot=0 1BFA0 41440003 IMM 1032 PARV BCMCALL clear all 1BFA1 41440000 IMM 1033 PARV 0 address=0 1BFA2 40440005 IMM 1034 PARVL CLEARDELAY how long to delay 1BFA3 FE0FBDC8 1035 JMP RDUOK 1036 * --- 1037 1038 END of CLEARALL command 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 247 (RDUMAIN) F 23 Boot Command 1041 1042 ********************************************************************************** 1043 * * 1044 * We arrive here when for some reason we want to * 1045 * initialize the remote system (usually either a BOOT or * 1046 * a SYSINIT command). We must allow some extra time * 1047 * with the SYSINIT since the SSU is kept busy for awhile * 1048 * supervising the other modules during their selftests * 1049 * and has a tendency to ignore us. * 1050 * * 1051 ********************************************************************************** 1052 1053 BLOCK 1054 ENTRY SYSINIT 1055 ENTRY BOOTER 1056 0001BFA4 1057 SYSINIT LABEL 1BFA4 DC01BB9D 1058 CALL SHIPCOMT send the system initalization command 1BFA5 4101BBF5 1059 PAR RESPERROR error address 1BFA6 41440005 IMM 1060 PARV KLAS5 class=5 1BFA7 41440000 IMM 1061 PARV 0 slot=0 1BFA8 41440007 IMM 1062 PARV BCMSINIT bcm=7 1BFA9 41440000 IMM 1063 PARV 0 address=0 1BFAA 40440008 IMM 1064 PARVL INITDELAY how long to wait 1BFAB 5C974804 5 BASE 1065 LDPC COM,COMEX1 off we go 1066 * --- 1067 1068 ********************************************************************************** 1069 * * 1070 * The BOOT command is handled here. The SYSINIT has already * 1071 * been sent (see above). We send the bootcopy command, ensure * 1072 * our BPI table is clean, then march off to do a GO. * 1073 * * 1074 ********************************************************************************** 1075 0001BFAC 1076 BOOTER LABEL 1BFAC DC01BBAC 1077 CALL SHIPCOM send the boot copy command 1BFAD 4101BBF5 1078 PAR RESPERROR error address 1BFAE 41440005 IMM 1079 PARV KLAS5 class 1BFAF 41440000 IMM 1080 PARV 0 slot 1BFB0 41440004 IMM 1081 PARV BCMBOOTCOP BCM 1BFB1 4041A830 1082 PARVL SBUFFW address=SBUFFW (boot switches) 1083 * \ / 1084 * clear all breakpoints before starting 1085 1BFB2 EC01A930 1086 STZ STEPSET say no step instruction set 1BFB3 5C01A92F 1087 CMZ BPINUM see if any breakpoints in table 1BFB4 FE03BFB6 1088 JEQ BOOTGO 1BFB5 DC41CB0F 1089 CALLNP BPIINIT zero out the breakpoint table 0001BFB6 1090 BOOTGO LABEL 1BFB6 6145AF8A 5 IMM 1091 LD COM ADR GOCOM 1BFB7 5C895F13 5 ZBM 1092 LDPC COM,COMPROC go do the GO 1093 * --- 1094 1095 END of BOOT and SYSINIT commands 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 248 (RDUMAIN) F 23 Powerreset Command 1098 1099 ********************************************************************************** 1100 * * 1101 * This section does the POWERRESET command. It is a special * 1102 * case because no response will ever come back (other than * 1103 * perhaps a NAK if it was garbled on the line). On * 1104 * completion of the bus transfer, we must change our internal * 1105 * state to reflect that the remote system is no longer dialed. * 1106 * * 1107 ********************************************************************************** 1108 1109 BLOCK 1110 ENTRY RESET 1111 0001BFB8 1112 RESET LABEL 1BFB8 DC41CAF6 1113 CALLNP EXITBPI ensure breakpoints are out 1BFB9 DC41F7E5 1114 CALLNP IOPWRRESET send a power reset command 1BFBA DC41F7E2 1115 CALLNP IODROP drop the talker unit 1BFBB DC41C40D 1116 CALLNP FAILPRINT print any transmission errors 1BFBC 5C01A92E 1117 CMZ LOGFLAG should we print this 1BFBD FE03BFBF 1118 JEQ RESETNP if not then don't 1BFBE DC41CCF0 1119 CALLNP LOGPRINT print the log 0001BFBF 1120 RESETNP LABEL 1BFBF DC41CD0D 1121 CALLNP CLOSEM close the session log LUN 1BFC0 6007FFFF 0 IMM 1122 LD R0 STATENDIAL code indicating not dialed 1BFC1 E401A8D6 0 1123 ST R0 STATE say we are no longer dialed 1BFC2 FE0FBDC8 1124 JMP RDUOK then get another command 1125 * --- 1126 1127 END of RESET command 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 249 (RDUMAIN) F 23 Restart Command 1130 1131 ********************************************************************************** 1132 * * 1133 * This section takes care of the RESTART command. This command * 1134 * performs several functions and is a combination of a Clearall, * 1135 * a Selftest to each PPU, a Go to each CPU, and a general Go. * 1136 * It is expected that the functionality provided by this command * 1137 * will be required often, so this is easier than entering a whole * 1138 * slew of individual commands. * 1139 * The CLEARALL is done here rather than at CONTROL because a * 1140 * delay is needed. * 1141 * * 1142 ********************************************************************************** 1143 1144 BLOCK 1145 ENTRY RESTART 1146 0001BFC3 1147 RESTART LABEL 1BFC3 DC01BB9D 1148 CALL SHIPCOMT then clear the bus logic 1BFC4 4101BBF5 1149 PAR RESPERROR error address 1BFC5 41440005 IMM 1150 PARV KLAS5 class=5 1BFC6 41440000 IMM 1151 PARV 0 slot=0 1BFC7 41440003 IMM 1152 PARV BCMCALL clear all 1BFC8 41440000 IMM 1153 PARV 0 address=0 1BFC9 40440005 IMM 1154 PARVL CLEARDELAY how long to delay 1BFCA 6104000F 4 IMM 1155 LD R4 MAXSLOT get slot count 0001BFCB 1156 REST10 LABEL 1BFCB 6029A96B 0 4 1157 LD R0 SLOTTYPE(R4) get the slot type 1BFCC 64040002 0 IMM 1158 CPR R0 DEVCPU is it a CPU? 1BFCD FE0DBFD5 1159 JNE REST20 continue on if not 1BFCE DC01BBAC 1160 CALL SHIPCOM else start it up 1BFCF 4101BBF5 1161 PAR RESPERROR error address 1BFD0 41440000 IMM 1162 PARV KLAS0 class=0 1BFD1 41530000 4 REG 1163 PARV R4 slot=(where we are) 1BFD2 41440000 IMM 1164 PARV BCMWRITE bcm=0 1BFD3 40420006 IMM 1165 PARVL 030000 addr=go address 1BFD4 FE0FBFDE 1166 JMP REST30 then merge back in 1167 * --- 1168 0001BFD5 1169 REST20 LABEL 1BFD5 64040003 0 IMM 1170 CPR R0 DEVPPU maybe a ppu? 1BFD6 FE0DBFDE 1171 JNE REST30 if not then go away 1BFD7 DC01BB9D 1172 CALL SHIPCOMT send out selftest to start up 1BFD8 4101BBF5 1173 PAR RESPERROR error address 1BFD9 41440000 IMM 1174 PARV KLAS0 class=0 1BFDA 41530000 4 REG 1175 PARV R4 slot=ours 1BFDB 41440005 IMM 1176 PARV BCMSLFTST bcm=5 1BFDC 41440000 IMM 1177 PARV 0 addr=0 1BFDD 40440005 IMM 1178 PARVL SLFTDELAY how long to wait 1179 * \ / 1180 0001BFDE 1181 REST30 LABEL 1BFDE FB27BFCB 4 1182 JDR R4 REST10 cycle through all slots 1183 * \ / 1184 1185 * done with all slots 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 250 (RDUMAIN) F 23 Restart Command 1BFDF 60040140 0 IMM 1186 LD R0 URDELAY wait for selftest to finish 1BFE0 6041AC26 1 1187 LD R1 PPUSTWAIT length 1BFE1 09040000 IMM 1188 UREQ 0+XREQ just hanging around... 1BFE2 6104000F 4 IMM 1189 LD R4 MAXSLOT start over again 0001BFE3 1190 REST40 LABEL 1BFE3 6029A96B 0 4 1191 LD R0 SLOTTYPE(R4) get slot type again 1BFE4 64040003 0 IMM 1192 CPR R0 DEVPPU is it a ppu? 1BFE5 FE0DBFF4 1193 JNE REST50 if not then we don't want it 1194 * \ / 1195 1BFE6 DC01BBAC 1196 CALL SHIPCOM else obtain its wru(15) 1BFE7 4101BBF5 1197 PAR RESPERROR error address 1BFE8 41440000 IMM 1198 PARV KLAS0 class=0 1BFE9 41530000 4 REG 1199 PARV R4 slot=this one 1BFEA 41440004 IMM 1200 PARV BCMWRU bcm=4 1BFEB 4044000F IMM 1201 PARVL 15 address=15 1BFEC 6001F38E 0 1202 LD R0 DATA(1) get the answer 1BFED FA03BFF4 0 1203 JEQZ R0 REST50 if ok then continue on 1204 * \ / 1205 1BFEE E501A8ED 4 1206 ST R4 VALUE bad test - tell user 1BFEF 6005CDF4 0 IMM 1207 LD R0 ADR MESFAIL "PPU failed self-test.." 1BFF0 DC41B875 1208 CALLNP MESSMOVEZ put into output line 1BFF1 DC41B605 1209 CALLNP HEXOUTD add the slot number 1BFF2 DC41B886 1210 CALLNP OUTO then list the line 1BFF3 FE0FBDC8 1211 JMP RDUOK solicit input 1212 * --- 1213 0001BFF4 1214 REST50 LABEL 1BFF4 FB27BFE3 4 1215 JDR R4 REST40 cycle through all slots 1216 * \ / 1217 1BFF5 6145AF8A 5 IMM 1218 LD COM ADR GOCOM now to start the sucker up 1BFF6 FE0FBF9A 1219 JMP GOCONTROL so, go do it! 1220 * --- 1221 1222 END of RESTART command 145 146 INPUT RDUSTATUS 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 251 (RDUSTATUS) F 24 Map Command and Subroutine 3 4 BLOCK MAP command 5 ENTRY DISPMAP 6 ENTRY MAPPER 7 ENTRY GETMAP 8 9 ********************************************************************************** 10 * * 11 * This section processes the MAP command. It issues a WRU 0 * 12 * to each bus slot and displays the result. If a slot does * 13 * respond, the module type is listed as well as the WRU result. * 14 * No additonal input is accepted with this command. * 15 * * 16 ********************************************************************************** 17 0001BFF7 18 DISPMAP LABEL 1BFF7 DC41BFFA 19 CALLNP GETMAP obtain map data from system 1BFF8 DC41C006 20 CALLNP MAPPER list out the map 1BFF9 FE0FBDC8 21 JMP RDUOK then back to ground control 22 * --- 23 24 ********************************************************************************** 25 * * 26 * GETMAP just gets map data and saves it in MAPDATA. * 27 * Call: * 28 * CALLNP GETMAP * 29 * * 30 * Eats R0:R3. * 31 * * 32 ********************************************************************************** 33 34 BLOCK 35 ENTRY GETMAP 36 37 BEGFRAME 38 ENDFRAME 39 1BFFA DD5F8001 6 STAK 40 GETMAP ENTRNP PUSH 1BFFB DC01BBAC 41 CALL SHIPCOM now get a map 1BFFC 4101BBF5 42 PAR RESPERROR error address 1BFFD 41440002 IMM 43 PARV KLAS2 class=block mode 1BFFE 41440000 IMM 44 PARV 0 slot=0 1BFFF 41440002 IMM 45 PARV BCMMAP bcm=map 1C000 40440000 IMM 46 PARVL 0 address=0 1C001 6005F38D 0 IMM 47 LD R0 ADR DATA point to the data we got 1C002 60440080 1 IMM 48 LD R1 16*2*NCPW get count 1C003 6085A935 2 IMM 49 LD R2 ADR MAPDATA point to our save area 1C004 FE400000 50 CMOVE transfer the goodies 1C005 5D1F8001 6 STAK 51 LEAVE POP 52 * --- 53 54 END of GETMAP 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 252 (RDUSTATUS) F 24 Map Command and Subroutine 56 57 ********************************************************************************** 58 * * 59 * MAPPER prints out a map of the remote system. * 60 * The data area (MAPDATA) is expected to contain the proper * 61 * map data when called. * 62 * Call: * 63 * MAPDATA contains map data * 64 * CALLNP MAPPER * 65 * * 66 * Eats R0:R4 * 67 * * 68 ********************************************************************************** 69 70 BLOCK 71 ENTRY MAPPER 72 73 BEGFRAME 00178801 6 BASE 74 MAPTMP BSS 1 temp for R7 75 ENDFRAME 76 1C006 DD5F8002 6 STAK 77 MAPPER ENTRNP PUSH 1C007 E5D78801 7 6 BASE 78 ST R7 SP,MAPTMP save a register 79 80 ********************************************************************************** 81 * * 82 * First loop removes slot selections (as per SLOTS) for those * 83 * whose device type has changed since the last map was done. * 84 * You're SUPPOSED to power off the systen to move modules * 85 * around (which would disconnect the RDU) but someone might * 86 * not have bothered. It is also possible that a module has * 87 * died (and therefore returned no MAP entry). We don't bother * 88 * with special SSU check since we know we're connected to the * 89 * right one, and it therefore could not have died or been moved * 90 * (besides, the user might have selected a non-system SSU). * 91 * * 92 ********************************************************************************** 93 1C008 61C40004 7 IMM 94 LD R7 SLOTSNUM-1 highest entry (device type code) to check 0001C009 95 MAP05 LABEL 1C009 60AFA97B 2 7 96 LD R2 SLOTS(R7) get current selection for type R7 1C00A FA8BC012 2 97 JLEZ R2 GOON jump if nothing selected here 1C00B 6225A935 01 2 98 LD2 R0 MAPDATA(R2) get current WRU info for this slot 1C00C 65CA4040 7 1 CBM 99 CPR R7 R1/DEVTYPEB check board type 1C00D FE03C012 100 JEQ GOON jump if board type stayed the same 1C00E D16FA97B 7 101 STMW SLOTS(R7) kill selection 1C00F 65C40003 7 IMM 102 CPR R7 DEVPPU PPU moved/died? 1C010 FE0DC012 103 JNE GOON jump if not 1C011 D141A980 104 STMW PPUPORT else, deselect PPU port, too 0001C012 105 GOON LABEL 1C012 FBE3C009 7 106 DRJ R7 MAP05 loop to do more 107 * \ / 108 109 ********************************************************************************** 110 * * 111 * We want to set the SLOTTYPE according to the module and make * 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 253 (RDUSTATUS) F 24 Map Command and Subroutine 112 * an entry in the table of modules for this type. Because the SMU * 113 * and MCU have a few different commands despite performing similar * 114 * functions, we must keep track of these two types specially. If * 115 * an SMU is found we set the SLOTTYPE to indicate SMU, but set * 116 * SLOTS to indicate MCU since it is memory. Also, an SSU device * 117 * is put in SLOTS only if it is the system SSU. * 118 * * 119 ********************************************************************************** 120 121 * \ / 1C013 61C40000 7 IMM 122 LD R7 0 start at the beginning 0001C014 123 MAP10 LABEL 1C014 DC41B86F 124 CALLNP BLANKOUT clear output line 1C015 61040003 4 IMM 125 LD R4 NREGPL-1 number of items per line 0001C016 126 MAP20 LABEL 1C016 60E9CD73 3 4 127 LD OBP REGPOST(R4) get line position for this one 1C017 E5C1A8ED 7 128 ST R7 VALUE set to output slot number 1C018 DC41B605 129 CALLNP HEXOUTD then unpack the thing 1C019 6004003A 0 IMM 130 LD R0 COLON get some dress 1C01A E437AC01 0 3 @ 131 ST R0 @OBPT(OBP) looking good 1C01B 18C40001 3 IMM 132 ADD OBP 1 advance pointer 133 * \ / 134 1C01C 622FA935 01 7 135 LD2 R0 MAPDATA(R7) get the WRU for this slot 1C01D 600A4040 0 1 CBM 136 LD R0 R1/DEVTYPEB get device code field 1C01E 60920000 2 0 REG 137 LD R2 R0 copy it 1C01F 64040001 0 IMM 138 CPR R0 DEVMCU is it an MCU? 1C020 FE0DC024 139 JNE NOTASMU if not then no extra check 1C021 5C0A5610 1 CBM 140 CMZ R1/MCUTYPEB see if this is a new fangled MCU 1C022 FE03C024 141 JEQ NOTASMU if not then no biggie 1C023 60840005 2 IMM 142 LD R2 DEVSMU else we have an SMU (not the college) 0001C024 143 NOTASMU LABEL 1C024 E4AFA96B 2 7 144 ST R2 SLOTTYPE(R7) set the type for this slot 1C025 FA43C035 1 145 JEQZ R1 MAP30 jump if nothing to list 146 * \ / 147 1C026 E441A8ED 1 148 ST R1 VALUE save WRU 0 to output later 149 150 * if SSU, find max NVM size and ensure true SSU goes in table 1C027 64840004 2 IMM 151 CPR R2 DEVSSU is it an SSU? 1C028 FE0DC02F 152 JNE NOTASSU jump if not 1C029 604A7080 1 1 CBM 153 LD R1 R1/DEVREV get SSU revision 1C02A 6444000D 1 IMM 154 CPR R1 SSUNVMREV old or new 1C02B ECBFA985 7 @ 155 STLGT @SSUNVMIDXP(R7) save the answer 1C02C 6041A8ED 1 156 LD R1 VALUE retrieve WRU 0 1C02D 5C0A4E10 1 CBM 157 CMZ R1/THEBIT is it the REAL SSU? 1C02E FE0DC032 158 JNE MAP25 jump if not 0001C02F 159 NOTASSU LABEL 160 * \ / 161 162 * set SLOTS table to have lowest slot of each bus module type 1C02F 5C21A97B 0 163 CMZ SLOTS(R0) have we already found one of these? 1C030 FE07C032 164 JGE MAP25 if so then continue on 1C031 E5E1A97B 7 0 165 ST R7 SLOTS(R0) else set the slot for this device type 0001C032 166 MAP25 LABEL 1C032 3A25CDBA 0 2 167 LEA2 R0 DEVNAMES(R2) then point to device name 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 254 (RDUSTATUS) F 24 Map Command and Subroutine 1C033 DC41B87B 168 CALLNP MESSMOVE put into line 1C034 DC41B5F1 169 CALLNP HEXOUT list out the WRU response 170 * \ / 171 0001C035 172 MAP30 LABEL 1C035 19C40001 7 IMM 173 ADD R7 1 advance to next slot 1C036 FB27C016 4 174 JDR R4 MAP20 next line spot and recycle 175 * \ / 176 1C037 DC41B886 177 CALLNP OUTO list out current line 1C038 65C4000F 7 IMM 178 CPR R7 MAXSLOT see if we have done them all 1C039 FE0BC014 179 JLE MAP10 jump if not done 180 * \ / 181 182 ********************************************************************************** 183 * * 184 * Select the lowest port on PPU, if any. * 185 * * 186 ********************************************************************************** 187 1C03A 5C01A980 188 CMZ PPUPORT have a favorite one already? 1C03B FE07C04F 189 JGE MAP50 jump if so 1C03C 5C01A97E 190 CMZ PPUSLOT is PPU on system? 1C03D FE09C04F 191 JLT MAP50 if not don't look for port 1C03E 61C40000 7 IMM 192 LD R7 0 look for a port on ppu 0001C03F 193 MAP40 LABEL 1C03F 600BE000 0 7 CBM 194 LD R0 R7/BITS 16:15 shift port number around 1C040 E401A91F 0 195 ST R0 ADDRESS then set address 1C041 DC01BBAC 196 CALL SHIPCOM issue device id request 1C042 4101BBF5 197 PAR RESPERROR error address 1C043 41440000 IMM 198 PARV KLAS0 class=0 1C044 4141A97E 199 PARV PPUSLOT slot=ppu 1C045 41440002 IMM 200 PARV BCMREAD bcm=2 1C046 4041A91F 201 PARVL ADDRESS address=from port 1C047 5C01F38E 202 CMZ DATA(1) check response 1C048 FE03C04C 203 JEQ MAP45 jump if nothing there 1C049 E5C1A980 7 204 ST R7 PPUPORT otherwise remember the port 1C04A D141A91F 205 STMW ADDRESS in case an attempt to use "." 1C04B FE0FC04F 206 JMP MAP50 then continue on 207 * --- 208 0001C04C 209 MAP45 LABEL 1C04C 19C40001 7 IMM 210 ADD R7 1 advance to next port 1C04D 65C40003 7 IMM 211 CPR R7 MAXPORT 4 ports on ppu 1C04E FE0BC03F 212 JLE MAP40 jump if more to check 213 *\ / 214 0001C04F 215 MAP50 LABEL 1C04F 61D78801 7 6 BASE 216 LD R7 SP,MAPTMP restore R7 1C050 5D1F8002 6 STAK 217 LEAVE POP 218 * --- 219 220 END of MAPPER subroutine 221 222 END of MAP command 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 255 (RDUSTATUS) F 24 WRU and WRUALL commands 225 226 BLOCK WRU commands 227 ENTRY WRUALL 228 ENTRY DISPWRU 229 ENTRY WRU1LIST 230 231 ********************************************************************************** 232 * * 233 * This section handles the WRU command. It obtains all sixteen * 234 * WRU's from the requested slot. They are displayed on four lines * 235 * of the screen, four to a line. Each WRU is checked for errors * 236 * and acted on accordingly. * 237 * * 238 ********************************************************************************** 239 0001C051 240 DISPWRU LABEL 1C051 DC41C0B9 241 CALLNP WRULIST list the desired WRU 1C052 5CA1BBF6 0 242 LDPC RESPTAB(R0) then go get new command or error handler 243 * --- 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 256 (RDUSTATUS) F 24 WRU and WRUALL commands 245 246 ********************************************************************************** 247 * * 248 * The WRUALL command lists the WRUs for all the slots of the * 249 * remote machine which have devices in them. We let the output * 250 * routine handle ---MORE--- processing. If there is a bad remote * 251 * machine error while processing this command we will go to the * 252 * proper error handler. * 253 * * 254 ********************************************************************************** 255 0001C053 256 WRUALL LABEL 1C053 EC1F8001 6 STAK 257 STZ STAK SP,1 say no device found on remote system 1C054 61C40000 7 IMM 258 LD R7 0 start with slot zero 0001C055 259 NEXTSLOT LABEL 1C055 5C2FA96B 7 260 CMZ SLOTTYPE(R7) is there a device here? 1C056 FE03C05B 261 JEQ NODEVICE jump if nothing is there 262 * \ / 263 1C057 EDD78800 6 BASE 264 STW SP,0 say we have found a device 1C058 E5C1A830 7 265 ST R7 SBUFFW save slot number for lister 1C059 DC41C0B9 266 CALLNP WRULIST list the WRU 1C05A FA0DC061 0 267 JNEZ R0 WRUALLERR if bad trouble in River City 268 * \ / 269 0001C05B 270 NODEVICE LABEL 1C05B 19C40001 7 IMM 271 ADD R7 1 move to the next slot 1C05C 65C4000F 7 IMM 272 CPR R7 MAXSLOT are we done yet? 1C05D FE0BC055 273 JLE NEXTSLOT if not then don't quit 274 * \ / 275 1C05E 5C178800 6 BASE 276 CMZ SP,0 did we find a device out there? 1C05F FE03C062 277 JEQ NODEVICES if not then complain 1C060 FE0FBDC8 278 JMP RDUOK go get the next command 279 * --- 280 0001C061 281 WRUALLERR LABEL 1C061 5CA1BBF6 0 282 LDPC RESPTAB(R0) handle the error 283 * --- 284 0001C062 285 NODEVICES LABEL 1C062 6005D22C 0 IMM 286 LD R0 ADR ERM392 "No map information to find devices" 1C063 FE0FBE35 287 JMP RDUERR 288 * --- 289 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 257 (RDUSTATUS) F 24 WRU and WRUALL commands 291 292 ********************************************************************************** 293 * * 294 * WRU1LIST will list the slot number, type of device, and * 295 * analysis of the WRU1 information. * 296 * Call: * 297 * CALL WRU1LIST * 298 * PARV slot number * 299 * PARVL WRU(1) * 300 * Eats R0:R4. * 301 * * 302 ********************************************************************************** 303 304 BEGFRAME 305 ENDFRAME 306 1C064 DD1F8001 6 STAK 307 WRU1LIST ENTR PUSH 1C065 C141A830 308 STPV SBUFFW put the slot number here 1C066 C0530000 4 REG 309 STPVL R4 the WRU(1) 310 1C067 DC41C0AA 311 CALLNP SLOTDISP start the output line with the slot type 1C068 18C40002 3 IMM 312 ADD OBP 2 leave some space 1C069 600B0040 0 4 CBM 313 LD R0 R4/BITS 0:3 get the error code 1C06A 6404000F 0 IMM 314 CPR R0 0F is this an undefined error? 1C06B FE03C0A2 315 JEQ WRUUNDEF if so then the WRU info is no good 1C06C 6021D3D2 0 0 316 LD R0 WRU1TAB(R0) R0 -> error message 1C06D DC41B87B 317 CALLNP MESSMOVE put the message into the table 1C06E 18C40001 3 IMM 318 ADD OBP 1 leave some space 319 1C06F F309C072 4 320 JBF R4/BIT 4 CHECKCBN jump if no RTO to report 1C070 6005CDA5 0 IMM 321 LD R0 ADR RTOMESS "RTO," 1C071 DC41B87B 322 CALLNP MESSMOVE 323 * \ / 324 0001C072 325 CHECKCBN LABEL 1C072 F30BC075 4 326 JBF R4/BIT 5 CHECKRFR jump if no CBN to report 1C073 6005CDA7 0 IMM 327 LD R0 ADR CBNMESS "CBN," 1C074 DC41B87B 328 CALLNP MESSMOVE 329 * \ / 330 0001C075 331 CHECKRFR LABEL 1C075 F30DC078 4 332 JBF R4/BIT 6 CHECKRFI jump if no RFR to report 1C076 6005CDA9 0 IMM 333 LD R0 ADR RFRMESS "RFR," 1C077 DC41B87B 334 CALLNP MESSMOVE 335 * \ / 336 0001C078 337 CHECKRFI LABEL 1C078 F30FC07B 4 338 JBF R4/BIT 7 REPORTTO jump if no RFI to report 1C079 6005CDAB 0 IMM 339 LD R0 ADR RFIMESS "RFI," 1C07A DC41B87B 340 CALLNP MESSMOVE 341 * \ / 342 0001C07B 343 REPORTTO LABEL 1C07B 6005CDAD 0 IMM 344 LD R0 ADR TOMESS "To=" 1C07C DC41B87B 345 CALLNP MESSMOVE 1C07D 600B1040 0 4 CBM 346 LD R0 R4/BITS 8:11 get contents of TO register 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 258 (RDUSTATUS) F 24 WRU and WRUALL commands 1C07E E401A8ED 0 347 ST R0 VALUE put where HEXOUT can find 1C07F DC41B605 348 CALLNP HEXOUTD put in the digit 1C080 DC41C0A5 349 CALLNP ADDCOMMA put in a separator 350 1C081 6005CDAE 0 IMM 351 LD R0 ADR FROMMESS "From=" 1C082 DC41B87B 352 CALLNP MESSMOVE 1C083 600B1840 0 4 CBM 353 LD R0 R4/BITS 12:15 get contents of FROM register 1C084 E401A8ED 0 354 ST R0 VALUE put where HEXOUT can find 1C085 DC41B605 355 CALLNP HEXOUTD put in the digit 1C086 DC41C0A5 356 CALLNP ADDCOMMA put in a separator 357 1C087 6005CDB0 0 IMM 358 LD R0 ADR F1MESS "F1=" 1C088 DC41B87B 359 CALLNP MESSMOVE 1C089 600B2420 0 4 CBM 360 LD R0 R4/BITS 18:19 get flags one 1C08A 6021CDB6 0 0 361 LD R0 FLAGTAB(R0) R0 -> flag status message 1C08B DC41B87B 362 CALLNP MESSMOVE move into output 1C08C DC41C0A5 363 CALLNP ADDCOMMA put in a separator 364 1C08D 600B2840 0 4 CBM 365 LD R0 R4/BITS 20:23 get the parity error bits 1C08E FA03C094 0 366 JEQZ R0 NOPE1 jump if no error here 1C08F E401A8ED 0 367 ST R0 VALUE save for HEXOUT 1C090 6005CDB2 0 IMM 368 LD R0 ADR PE1MESS "PE1=" 1C091 DC41B87B 369 CALLNP MESSMOVE 1C092 DC41B605 370 CALLNP HEXOUTD put in the flags 1C093 DC41C0A5 371 CALLNP ADDCOMMA put in a separator 372 * \ / 373 0001C094 374 NOPE1 LABEL 1C094 6005CDB1 0 IMM 375 LD R0 ADR F2MESS "F2=" 1C095 DC41B87B 376 CALLNP MESSMOVE 1C096 600B3420 0 4 CBM 377 LD R0 R4/BITS 26:27 get flags two 1C097 6021CDB6 0 0 378 LD R0 FLAGTAB(R0) R0 -> flag status message 1C098 DC41B87B 379 CALLNP MESSMOVE move into output 380 1C099 600B3840 0 4 CBM 381 LD R0 R4/BITS 28:31 get the parity error bits 1C09A FA03C0A0 0 382 JEQZ R0 WRUFINISH jump if no error here 1C09B E401A8ED 0 383 ST R0 VALUE save for HEXOUT 1C09C DC41C0A5 384 CALLNP ADDCOMMA put in a comma separator 1C09D 6005CDB4 0 IMM 385 LD R0 ADR PE2MESS "PE2=" 1C09E DC41B87B 386 CALLNP MESSMOVE 1C09F DC41B605 387 CALLNP HEXOUTD put in the flags 388 * \ / 389 0001C0A0 390 WRUFINISH LABEL 1C0A0 DC41B886 391 CALLNP OUTO send out the buffer 1C0A1 5D1F8001 6 STAK 392 LEAVE POP 393 * --- 394 0001C0A2 395 WRUUNDEF LABEL 1C0A2 6005D221 0 IMM 396 LD R0 ADR ERM390 "No valid WRU information for this device" 1C0A3 DC41B87B 397 CALLNP MESSMOVE 1C0A4 FE0FC0A0 398 JMP WRUFINISH and finish things up 399 * --- 400 401 ********************************************************************************** 402 * * 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 259 (RDUSTATUS) F 24 WRU and WRUALL commands 403 * A simple little subroutine to add a comma to the output line. * 404 * Call: * 405 * OBP = index into output buffer * 406 * CALLNP ADDCOMMA * 407 * OBP = index into output buffer * 408 * Eats R0. * 409 * * 410 ********************************************************************************** 411 1C0A5 DD5F8001 6 STAK 412 ADDCOMMA ENTRNP PUSH 1C0A6 6004002C 0 IMM 413 LD R0 COMMA 1C0A7 E437AC01 0 3 @ 414 ST R0 @OBPT(OBP) put in a separator 1C0A8 18C40001 3 IMM 415 ADD OBP 1 1C0A9 5D1F8001 6 STAK 416 LEAVE POP 417 * --- 418 419 END of WRU commands 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 260 (RDUSTATUS) F 24 WRU and WRUALL commands 421 422 ********************************************************************************** 423 * * 424 * SLOTDISP creates an output line describing a slot as follows: * 425 * Slot 0=MCU. The rest of the output buffer is blank filled. * 426 * Call: * 427 * SBUFFW contains the slot number * 428 * CALLNP SLOTDISP * 429 * OBP -> current position in output buffer * 430 * Eats R0:R2, sets R3. * 431 * * 432 ********************************************************************************** 433 434 BLOCK 435 ENTRY SLOTDISP 436 437 BEGFRAME 438 ENDFRAME 439 1C0AA DD5F8001 6 STAK 440 SLOTDISP ENTRNP PUSH 1C0AB DC41B86F 441 CALLNP BLANKOUT start with a clean line 1C0AC 6005CDEA 0 IMM 442 LD R0 ADR MESSLOT "Slot " 1C0AD DC41B875 443 CALLNP MESSMOVEZ start our output line 1C0AE 6001A830 0 444 LD R0 SBUFFW get the slot number 1C0AF FA2DC0B7 0 445 JEQMW R0 SDUNK jump if slot number not known 1C0B0 E401A8ED 0 446 ST R0 VALUE put where hexout can find it 1C0B1 DC41B605 447 CALLNP HEXOUTD convert the slot number 1C0B2 6001A830 0 448 LD R0 SBUFFW get the slot number 1C0B3 6021A96B 0 0 449 LD R0 SLOTTYPE(R0) get the type of this slot 1C0B4 3A21CDCA 0 0 450 LEA2 R0 DEVNAME(R0) R0 -> name of device 0001C0B5 451 SDPRINT LABEL 1C0B5 DC41B87B 452 CALLNP MESSMOVE add to our output line 1C0B6 5D1F8001 6 STAK 453 LEAVE POP return 454 * --- 455 456 * slot number unknown, use very generic message 0001C0B7 457 SDUNK LABEL 1C0B7 3801CDDA 0 458 LEA R0 DEVUNKMSG "?=xxx" 1C0B8 FE0FC0B5 459 JMP SDPRINT print and go 460 * --- 461 462 END of SLOTDISP subroutine 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 261 (RDUSTATUS) F 24 WRU and WRUALL commands 464 465 ********************************************************************************** 466 * * 467 * WRULIST will list the WRU information for the slot number * 468 * in SBUFFW. If any bus error is detected while checking the WRUs * 469 * we will print the error message. We will return the RESPCHECK * 470 * error code in R0. * 471 * Call: * 472 * SBUFFW = slot number * 473 * CALLNP SBUFFW * 474 * JNEZ R0 error handler (R0 contains RESPCHECK error code) * 475 * Eats R0:R4. * 476 * * 477 ********************************************************************************** 478 479 BLOCK 480 ENTRY WRULIST 481 482 BEGFRAME 00178801 6 BASE 483 WRUR5 BSS 1 temp for R5 484 ENDFRAME 485 1C0B9 DD5F8002 6 STAK 486 WRULIST ENTRNP PUSH 1C0BA E5578801 5 6 BASE 487 ST R5 SP,WRUR5 save this for the duration 1C0BB DC41BBD1 488 CALLNP SHIPWRU get the WRU's from remote machine 1C0BC DC01C064 489 CALL WRU1LIST list WRU 1 analysis 1C0BD 4141A830 490 PARV SBUFFW slot number 1C0BE 4041F390 491 PARVL DATA(3) the WRU(1) response 1C0BF 61440000 5 IMM 492 LD R5 0 start at the first 0001C0C0 493 WRU10 LABEL 1C0C0 DC41B86F 494 CALLNP BLANKOUT clear output line 1C0C1 61040003 4 IMM 495 LD R4 NREGPL-1 get item count for line 0001C0C2 496 WRU20 LABEL 1C0C2 60E9CD73 3 4 497 LD OBP REGPOST(R4) get position within line 1C0C3 E541A8ED 5 498 ST R5 VALUE set the WRU code for listing 1C0C4 DC41B605 499 CALLNP HEXOUTD list out the WRU code 1C0C5 6004003A 0 IMM 500 LD R0 COLON get some dress 1C0C6 E437AC01 0 3 @ 501 ST R0 @OBPT(OBP) add to the line 1C0C7 18C40002 3 IMM 502 ADD OBP 2 now we are set 503 1C0C8 622BF38D 01 5 504 LD2 R0 DATA(R5) get response for this WRU 1C0C9 E0D34000 3 5 REG 505 EXCH R3 R5 for CHEKRESP 1C0CA DC41BC1B 506 CALLNP CHEKRESP see if error with WRU 1C0CB E152C000 5 3 REG 507 EXCH R5 R3 restore these 1C0CC FA45C0D8 1 508 JGTZ R1 WRUERR if so then get out of here 509 * \ / 510 1C0CD 622BF38D 01 5 511 LD2 R0 DATA(R5) get response for this WRU 1C0CE E441A8ED 1 512 ST R1 VALUE where we need it 1C0CF DC41B5F1 513 CALLNP HEXOUT ship it out 1C0D0 19440001 5 IMM 514 ADD R5 1 on to the next WRU 1C0D1 FB27C0C2 4 515 JDR R4 WRU20 next position in line if room 1C0D2 DC41B886 516 CALLNP OUTO if no room print line 1C0D3 6544000F 5 IMM 517 CPR R5 WRUMAX have we done them all? 1C0D4 FE0BC0C0 518 JLE WRU10 do another round if not done yet 519 * \ / 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 262 (RDUSTATUS) F 24 WRU and WRUALL commands 520 0001C0D5 521 WRUEXIT LABEL 1C0D5 60040000 0 IMM 522 LD R0 0 all went ok 0001C0D6 523 WRUBADBYE LABEL error exit 1C0D6 61578801 5 6 BASE 524 LD R5 SP,WRUR5 restore callers register 1C0D7 5D1F8002 6 STAK 525 LEAVE POP 526 * --- 527 0001C0D8 528 WRUERR LABEL 1C0D8 E45F8001 1 6 STAK 529 ST R1 STAK SP,1 hold this for a moment 1C0D9 10C40004 3 IMM 530 SUB OBP 4 get rid of last chars in buffer 1C0DA DC41B886 531 CALLNP OUTO list anything in final line 1C0DB 601F8001 0 6 STAK 532 LD R0 STAK SP,1 restore this 1C0DC 64040006 0 IMM 533 CPR R0 6 simple bus error? 1C0DD FE0DC0D6 534 JNE WRUBADBYE go to the bad exit 1C0DE DC41BC69 535 CALLNP BUSERR print the proper bus error mesage 1C0DF FE0FC0D5 536 JMP WRUEXIT and leave 537 * --- 538 539 END of WRULIST 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 263 (RDUSTATUS) F 24 Status Command 542 543 BLOCK STATUS command 544 ENTRY CSTATUS 545 ENTRY DOSTATUS 546 ENTRY STATUS 547 ENTRY PSTATUS 548 ENTRY SSTATUS 549 ENTRY MSTATUS 550 551 552 ********************************************************************************** 553 * * 554 * This section handles the C STATUS command. It lists out the * 555 * registers of each of the CPU's on the system. It simply loops * 556 * through all slots checking for a CPU and then calling the * 557 * CPU lister. * 558 * * 559 ********************************************************************************** 560 0001C0E0 561 CSTATUS LABEL 1C0E0 DC41BC7E 562 CALLNP SHIPNOP make sure info is current 1C0E1 DC41C108 563 CALLNP DOSTATUS list out system status 1C0E2 EC1F8001 6 STAK 564 STZ STAK SP,1 start at slot zero 1C0E3 61440000 5 IMM 565 LD R5 0 keep in sync 566 * \ / 567 0001C0E4 568 STAT10 LABEL 1C0E4 602BA96B 0 5 569 LD R0 SLOTTYPE(R5) get device type of this slot 1C0E5 64040002 0 IMM 570 CPR R0 DEVCPU is it a CPU? 1C0E6 FE0DC0E9 571 JNE STAT20 if not then don't stop here 1C0E7 DC01C88C 572 CALL CPUREGS then list out the registers 1C0E8 40534000 5 REG 573 PARVL R5 pass the slot number 0001C0E9 574 STAT20 LABEL 1C0E9 BD578800 5 6 BASE 575 INCL R5 SP,0 advance to next slot 1C0EA 6544000F 5 IMM 576 CPR R5 MAXSLOT have we been through them all? 1C0EB FE0BC0E4 577 JLE STAT10 if not then go do another 578 * \ / 579 1C0EC FE0FBDC8 580 JMP RDUOK else we are all done 581 * --- 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 264 (RDUSTATUS) F 24 Status Command 583 584 ********************************************************************************** 585 * * 586 * STATLINE creates and outputs the first status line * 587 * used by DOSTATUS. This line contains the switches, time fence, * 588 * bus error flag, and interrupt status. * 589 * * 590 * "Switches=xx Timer Fence=x BSE=x Interrupt=x" * 591 * * 592 * Call: * 593 * SYSSTAT contains recent system status * 594 * CALLNP STATLINE * 595 * JNEZ R0 * 596 * Eats R0:R5. * 597 * * 598 ********************************************************************************** 599 600 BLOCK 601 ENTRY STATLINE 602 603 BEGFRAME 604 ENDFRAME 605 1C0ED DD5F8001 6 STAK 606 STATLINE ENTRNP PUSH 1C0EE 6141A8DE 5 607 LD R5 SYSSTAT pick up status info 1C0EF DC41B86C 608 CALLNP BLANKOUTW make a clean line 609 1C0F0 6005CE0C 0 IMM 610 LD R0 ADR MESSFP "Switches=" 1C0F1 DC41B87B 611 CALLNP MESSMOVE put message in line 1C0F2 600B4080 0 5 CBM 612 LD R0 R5/SFP get the value 1C0F3 E401A8ED 0 613 ST R0 VALUE set up to list 1C0F4 60840002 2 IMM 614 LD R2 2 we want two digits 1C0F5 DC41B5FB 615 CALLNP HEXOUTN so go list them 616 1C0F6 6005CE0F 0 IMM 617 LD R0 ADR MESSTF " Timer Fence=" 1C0F7 DC41B87B 618 CALLNP MESSMOVE add to line 1C0F8 600B5010 0 5 CBM 619 LD R0 R5/STF get value 1C0F9 E401A8ED 0 620 ST R0 VALUE set up to list 1C0FA DC41B62D 621 CALLNP DECOUT add the result 622 1C0FB 6005CE13 0 IMM 623 LD R0 ADR MESSBSE " BSE=" 1C0FC DC41B87B 624 CALLNP MESSMOVE bus error data 1C0FD 600B5A10 0 5 CBM 625 LD R0 R5/SBSE get the flag 1C0FE E401A8ED 0 626 ST R0 VALUE now list it 1C0FF DC41B62D 627 CALLNP DECOUT well, now 628 1C100 6005CE15 0 IMM 629 LD R0 ADR MESSINT " Interrupt=" 1C101 DC41B87B 630 CALLNP MESSMOVE interrupt status 1C102 600B5E10 0 5 CBM 631 LD R0 R5/SINT get interrupt flag 1C103 E401A8ED 0 632 ST R0 VALUE ready to go 1C104 DC41B62D 633 CALLNP DECOUT this will do it 1C105 DC41B886 634 CALLNP OUTO list out the line 635 1C106 600B5210 0 5 CBM 636 LD R0 R5/SERR get error status 1C107 5D1F8001 6 STAK 637 LEAVE POP 638 * --- 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 265 (RDUSTATUS) F 24 Status Command 639 640 END of STATLINE 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 266 (RDUSTATUS) F 24 Status Command 642 643 ********************************************************************************** 644 * * 645 * DOSTATUS picks up the system status and lists out the * 646 * switches, timer fence, bus error flag, and interrupt status. * 647 * If there is a halt or stop message, it is decoded and listed * 648 * out as well. We also handle printing breakpoint messages. * 649 * Call: * 650 * SYSSTAT contains system status * 651 * CALLNP DOSTATUS * 652 * Eats R0:R5. * 653 * * 654 ********************************************************************************** 655 656 BLOCK 657 ENTRY DOSTATUS 658 659 BEGFRAME 00178801 6 BASE 660 DOSTR4R5 BSS 2 temp save for R4,R5 661 ENDFRAME 662 00000010 BYTE 663 PBIT EQU BIT 0 flag in R7 to say error status found 664 1C108 DD5F8003 6 STAK 665 DOSTATUS ENTRNP PUSH 1C109 DC41C0ED 666 CALLNP STATLINE do the status line first 1C10A FA0DC10C 0 667 JNEZ R0 DOSTERR jump if error to report 0001C10B 668 DOSTEXIT LABEL else, exit 1C10B 5D1F8003 6 STAK 669 LEAVE POP return 670 * --- 671 0001C10C 672 DOSTERR LABEL 1C10C EC0BC010 7 CBM 673 STZ R7/PBIT say nothing found yet 1C10D DC01BBAC 674 CALL SHIPCOM get error block 1C10E 4101BBF5 675 PAR RESPERROR error address 1C10F 41440002 IMM 676 PARV KLAS2 class=2 1C110 41440000 IMM 677 PARV 0 slot=0 1C111 41440008 IMM 678 PARV BCMERRBLK bcm=error block 1C112 40440000 IMM 679 PARVL 0 address=0 680 * \ / 681 682 ********************************************************************************** 683 * * 684 * DATA contains error information for each slot on the * 685 * remote machine. Check each slot for a possible error and * 686 * report it if found. R5 is used as a slot index. * 687 * * 688 ********************************************************************************** 689 * \ / 690 1C113 61440000 5 IMM 691 LD R5 0 start at slot zero 0001C114 692 DOSTAGAIN LABEL 1C114 622BF38D 01 5 693 LD2 R0 DATA(R5) get data from one slot 1C115 FA43C145 1 694 JEQZ R1 DOSTNEXT jump if nothing interesting 1C116 DC41B86C 695 CALLNP BLANKOUTW clear output line 1C117 622BF38D 01 5 696 LD2 R0 DATA(R5) retrieve error word again 1C118 5C0A4080 1 CBM 697 CMZ R1/ERF1 is first field empty? 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 267 (RDUSTATUS) F 24 Status Command 1C119 FE03C124 698 JEQ DOST20 if so then Halt or Stop 699 * \ / 700 1C11A 6005CE1E 0 IMM 701 LD R0 ADR MESSCPU "CPU " 1C11B DC41B87B 702 CALLNP MESSMOVE start error line 1C11C E541A8ED 5 703 ST R5 VALUE save slot to list 1C11D DC41B605 704 CALLNP HEXOUTD a single digit 705 1C11E 6005CE20 0 IMM 706 LD R0 ADR MESSERR " Err " 1C11F DC41B87B 707 CALLNP MESSMOVE add to messgae 1C120 622BF38D 01 5 708 LD2 R0 DATA(R5) get error info again 1C121 E441A8ED 1 709 ST R1 VALUE set to output 1C122 DC41B5F1 710 CALLNP HEXOUT the whole word 1C123 FE0FC143 711 JMP DOSTOUT then go list out 712 * --- 713 0001C124 714 DOST20 LABEL 1C124 6001AC20 0 715 LD R0 ERF3MASK check for controlled shutdown 1C125 640A5560 0 1 CBM 716 CPR R0 R1/ERF3 is that what took place? 1C126 FE03C14E 717 JEQ DOST50 if so then display message buf 718 * \ / 719 1C127 6005CE19 0 IMM 720 LD R0 ADR MESSSTP assume a stop 1C128 5C0A5010 1 CBM 721 CMZ R1/ERF2 well, which was it? 1C129 FE0DC133 722 JNE DOSTNOBPIS jump if a good guess 723 * \ / 724 725 * We have found a halt. See if it is a breakpoint we put in or 726 * a real system halt. 1C12A 6005CE1A 0 IMM 727 LD R0 ADR MESSHLT switch to a halt 1C12B 5C01A92F 728 CMZ BPINUM are there breakpoints in? 1C12C FE0DC12F 729 JNE DOST25 if so then see if a breakpoint halt 1C12D 5C01A930 730 CMZ STEPSET is there a step in? 1C12E FE03C133 731 JEQ DOSTNOBPIS if neither in then not a breakpoint 732 * \ / 0001C12F 733 DOST25 LABEL 1C12F 6441AC2A 1 734 CPR R1 BPIVALUE is the halt a breakpoint? 1C130 FE09C133 735 JLT DOSTNOBPIS if not then carry on 1C131 6441AC2B 1 736 CPR R1 BPIMAXVAL check high range too 1C132 FE0BC154 737 JLE DOSTBPI must be a breakpoint halt 738 * \ / 739 0001C133 740 DOSTNOBPIS LABEL 1C133 E541A97D 5 741 ST R5 CPUSLOT select halted CPU 1C134 DC41B87B 742 CALLNP MESSMOVE start the line 1C135 E541A8ED 5 743 ST R5 VALUE set slot number to list 1C136 DC41B605 744 CALLNP HEXOUTD a single digit 1C137 18C40001 3 IMM 745 ADD OBP 1 advance output pointer 746 1C138 622BF38D 01 5 747 LD2 R0 DATA(R5) get data again 1C139 600A5460 0 1 CBM 748 LD R0 R1/BITS 10:15 pick up the alpha code 1C13A 60040000 0 IMM 749 LD R0 0 clear work area 1C13B 5C0A5410 1 CBM 750 CMZ R1/BIT 10 check high-order bit 1C13C EC4A3210 0 CBM 751 STLEQ R0/BIT 25 set another funky bit 1C13D 7C0A5460 0 1 CBM 752 IOR R0 R1/BITS 10:15 then merge in the data 1C13E E437AC01 0 3 @ 753 ST R0 @OBPT(OBP) add to output line 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 268 (RDUSTATUS) F 24 Status Command 1C13F 18C40001 3 IMM 754 ADD OBP 1 advance pointer 1C140 E441A8ED 1 755 ST R1 VALUE save value to add to output 1C141 60840004 2 IMM 756 LD R2 4 we want four digits 1C142 DC41B5FB 757 CALLNP HEXOUTN so output that many 758 * \ / 759 0001C143 760 DOSTOUT LABEL 1C143 DC41B886 761 CALLNP OUTO ship out the line 762 * \ / 763 0001C144 764 DOSTNEXTP LABEL 1C144 EDCBC010 7 CBM 765 STW R7/PBIT say we found the problem 0001C145 766 DOSTNEXT LABEL 1C145 19440001 5 IMM 767 ADD R5 1 advance to next slot 1C146 6544000F 5 IMM 768 CPR R5 MAXSLOT at the end?? 1C147 FE0BC114 769 JLE DOSTAGAIN if not then do another 770 * \ / 771 772 ********************************************************************************** 773 * * 774 * Status said there was a problem. If it was a CPU halt where * 775 * the CPU had executed a word of 0, we will fall all the way * 776 * through the above loop without finding a slot in error * 777 * (all 0 looks like "no error"). Therefore, funk it up by * 778 * printing a standard message. We could scan all the CPUs * 779 * for one pointing to a 0 in monitor memory, but why bother? * 780 * * 781 ********************************************************************************** 782 1C148 F7C1C10B 7 783 JBT R7/PBIT DOSTEXIT exit if error located 1C149 DC41B86C 784 CALLNP BLANKOUTW clear the decks 1C14A 6005CE1B 0 IMM 785 LD R0 ADR MESSHLT0 "HLTx @0000" 1C14B DC41B87B 786 CALLNP MESSMOVE place on line 1C14C DC41B886 787 CALLNP OUTO put out the line 1C14D FE0FC10B 788 JMP DOSTEXIT time to go now 789 * --- 790 791 ********************************************************************************** 792 * * 793 * The error code was all ones indicating a controlled system * 794 * shutdown. We display the contents of the OS message buffer (MB1). * 795 * * 796 ********************************************************************************** 797 0001C14E 798 DOST50 LABEL 1C14E DC01C8ED 799 CALL DOSSMSG go display SSU message 1C14F 4141A981 800 PARV THESSU pass SSU slot 1C150 4044140A IMM 801 PARVL MB1ADR pass MB1 address 1C151 6005A830 0 IMM 802 LD R0 ADR SBUFFW R0 -> message 1C152 DC41B88A 803 CALLNP OUT then list the line 1C153 FE0FC144 804 JMP DOSTNEXTP then carry on 805 * --- 806 0001C154 807 DOSTBPI LABEL 1C154 EC01A930 808 STZ STEPSET say no step in 1C155 1041AC2A 1 809 SUB R1 BPIVALUE convert halt code to BPI number 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 269 (RDUSTATUS) F 24 Status Command 1C156 E441A8ED 1 810 ST R1 VALUE so we know what breakpoint # to list 1C157 1C440002 1 IMM 811 MUL R1 BPIBLKLEN convert number to address offset 1C158 6105A8C2 4 IMM 812 LD BRK ADR BPITABLE now get address of table 1C159 19124000 4 1 REG 813 ADD BRK R1 add in the offset 1C15A 5C090010 4 ZBM 814 CMZ BRK,BPIUSED is this a valid breakpoint? 1C15B FE03C133 815 JEQ DOSTNOBPIS error if not 1C15C 60091D20 0 4 ZBM 816 LD R0 BRK,BPIADDR get breakpoint address 1C15D E401A91F 0 817 ST R0 ADDRESS place where LOCOUT can find 818 * \ / 819 1C15E 6005CD4F 0 IMM 820 LD R0 ADR BPIMESS "Breakpoint (" 1C15F DC41B875 821 CALLNP MESSMOVEZ put the message in output buffer 1C160 DC41B62D 822 CALLNP DECOUT tell which breakpoint 1C161 6005CD53 0 IMM 823 LD R0 ADR BPICPUM ") CPU=" 1C162 DC41B87B 824 CALLNP MESSMOVE now add this to our line 1C163 E541A8ED 5 825 ST R5 VALUE slot number gets listed next 1C164 DC41B605 826 CALLNP HEXOUTD put slot number in output 1C165 DC41B886 827 CALLNP OUTO ship out the line 828 * \ / 829 1C166 E7178801 456 BASE 830 ST2 R4 SP,DOSTR4R5 save this from subroutine 1C167 DC01BB04 831 CALL LOCOUT list the label and address 1C168 40440001 IMM 832 PARVL 1 say to list bias from label 833 * \ / 1C169 61178801 4 6 BASE 834 LD BRK SP,DOSTR4R5 make sure we point to instruction 1C16A 60170801 0 4 BASE 835 LD R0 BRK,BPIINSTR get the instruction 1C16B E401A8ED 0 836 ST R0 VALUE and put where OPOUT can find 1C16C DC41B686 837 CALLNP OPOUT turn into instruction 1C16D 63178801 456 BASE 838 LD2 R4 SP,DOSTR4R5 restore these 1C16E E541A97D 5 839 ST R5 CPUSLOT make sure breakpointed CPU is selected 1C16F FE0FC143 840 JMP DOSTOUT 841 * --- 842 843 END of DOSTATUS subroutine 844 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 270 (RDUSTATUS) F 24 Status Command 846 847 ********************************************************************************** 848 * * 849 * This is the STATUS command. We loop through the slot * 850 * table and if there is a device in the slot we call a subroutine * 851 * to output all sorts of neat status information about that device. * 852 * * 853 ********************************************************************************** 854 0001C170 855 STATUS LABEL 1C170 DC41C108 856 CALLNP DOSTATUS list out system status 1C171 EC01A8F3 857 STZ DISPTYPE assure hex display 1C172 61440000 5 IMM 858 LD R5 0 start with the first slot 0001C173 859 SYSTATLOOP LABEL 1C173 602BA96B 0 5 860 LD R0 SLOTTYPE(R5) see what type of slot we have 1C174 50040006 0 IMM 861 MIN R0 STATTABMAX keep within the table 1C175 5D61C17A 0 862 XCT STATTAB(R0) call the proper subroutine 1C176 19440001 5 IMM 863 ADD R5 1 one more slot done 1C177 6544000F 5 IMM 864 CPR R5 MAXSLOT out of slots yet? 1C178 FE0BC173 865 JLE SYSTATLOOP if not then keep going 866 * \ / 867 1C179 FE0FBDC8 868 JMP RDUOK 869 * --- 870 871 * All subroutines expect R5 = slot number. 0001C17A 872 STATTAB LABEL 1C17A FEC00000 873 NOP 0 no device 1C17B DC41C18A 874 CALLNP MCUSTAT MCU 1C17C DC41C1CE 875 CALLNP CPUSTAT CPU 1C17D DC41C21C 876 CALLNP PPUSTAT PPU 1C17E DC41C22F 877 CALLNP SSUSTAT SSU 1C17F DC41C18A 878 CALLNP MCUSTAT SMU 00000006 ABS 879 STATTABMAX EQU DISPW STATTAB 1C180 FEC00000 880 NOP 0 no device 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 271 (RDUSTATUS) F 24 Status Command 882 883 ********************************************************************************** 884 * * 885 * Here we handle the PPU status command. We simply * 886 * call a subroutine to output the registers for each controller * 887 * attached to the PPU. * 888 * * 889 ********************************************************************************** 890 0001C181 891 PSTATUS LABEL 1C181 6141A97E 5 892 LD R5 PPUSLOT the slot we are displaying 1C182 DC41C21C 893 CALLNP PPUSTAT 1C183 FE0FBDC8 894 JMP RDUOK 895 * --- 896 897 898 ********************************************************************************** 899 * * 900 * This is the SSU status command. We call the same * 901 * subroutine called by the system STATUS command to output * 902 * the registers of the SSU. * 903 * * 904 ********************************************************************************** 905 0001C184 906 SSTATUS LABEL 1C184 6141A97F 5 907 LD R5 SSUSLOT the slot we are displaying 1C185 DC41C22F 908 CALLNP SSUSTAT 1C186 FE0FBDC8 909 JMP RDUOK pretty simple 910 * --- 911 912 ********************************************************************************** 913 * * 914 * This is the MCU status command. We call the same * 915 * subroutine called by the system STATUS command to output * 916 * information about the MCU. * 917 * * 918 ********************************************************************************** 919 0001C187 920 MSTATUS LABEL 1C187 6141A97C 5 921 LD R5 MCUSLOT the slot we are displaying 1C188 DC41C18A 922 CALLNP MCUSTAT 1C189 FE0FBDC8 923 JMP RDUOK pretty simple 924 * --- 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 272 (RDUSTATUS) F 24 Status Command 926 927 ********************************************************************************** 928 * * 929 * MCUSTAT tells what type of device occupies the slot, * 930 * the type of memory attached, and the range of addresses * 931 * of occupied memory. * 932 * Call: * 933 * R5 = slot number * 934 * CALLNP MCUSTAT * 935 * Eats R0:R4. * 936 * * 937 ********************************************************************************** 938 939 BLOCK 940 ENTRY MCUSTAT 941 942 BLOCK 943 ENTRY MCUSTAT 944 945 BEGFRAME 00178801 6 BASE 946 SAVER5 BSS 1 947 ENDFRAME 948 1C18A DD5F8002 6 STAK 949 MCUSTAT ENTRNP PUSH 1C18B E5578801 5 6 BASE 950 ST R5 SP,SAVER5 save this away 1C18C E541A830 5 951 ST R5 SBUFFW put the slot number where it can be found 1C18D 6145B024 5 IMM 952 LD R5 ADR SYSSTATCOM 1C18E DC41BBD1 953 CALLNP SHIPWRU request WRUs for this device 1C18F DC41BC01 954 CALLNP RESPCHECK check them for errors 1C190 FA45BBF5 1 955 JGTZ R1 RESPERROR if errors then bail out 956 * \ / 957 1C191 DC41C0AA 958 CALLNP SLOTDISP display the slot type 1C192 6101F38E 4 959 LD R4 DATA(1) pick up the WRU0 1C193 F717C19A 4 960 JBT R4/MCUTYPEB JUSTOUT SMU is obvious 1C194 6005CDDC 0 IMM 961 LD R0 ADR COREMESS "Core memory attached" 1C195 604B2040 1 4 CBM 962 LD R1 R4/WRUMEMINC pick up the memory increments 1C196 64440000 1 IMM 963 CPR R1 CORESIZE is it core memory size? 1C197 FE03C199 964 JEQ HAVEMESS if so then we have the proper message 1C198 6005CDE3 0 IMM 965 LD R0 ADR PEBXMESS "PEBX memory is attached" 0001C199 966 HAVEMESS LABEL 1C199 DC41B87B 967 CALLNP MESSMOVE move the message in 968 * \ / 969 0001C19A 970 JUSTOUT LABEL 1C19A DC41B886 971 CALLNP OUTO ship it to the user 1C19B 6041F396 1 972 LD R1 DATA(9) get the WRU4 1C19C DC01C1A1 973 CALL GIVERANGE give the range of the memory 1C19D 414A7080 1 CBM 974 PARV R1/WRUMEMHERE pass the bits indicating what mem is here 1C19E 40530000 4 REG 975 PARVL R4 WRU0 1C19F 61578801 5 6 BASE 976 LD R5 SP,SAVER5 restore this register 1C1A0 5D1F8002 6 STAK 977 LEAVE POP 978 * --- 979 980 END of MCUSTAT 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 273 (RDUSTATUS) F 24 Status Command 982 983 ********************************************************************************** 984 * * 985 * GIVERANGE * 986 * * 987 * Given a WRU0 and the bits from a WRU4 response indicating * 988 * where memory is on a board this subroutine will output the range * 989 * of occupied memory on the given board. * 990 * Call: * 991 * CALL GIVERANGE * 992 * PARV WRU4/WRUMEMHERE * 993 * PARVL WRU0 * 994 * * 995 * Eats R0:R4 * 996 * * 997 ********************************************************************************** 998 999 BLOCK GIVERANGE subroutine 1000 1001 ENTRY GIVERANGE 1002 1003 BEGFRAME 00178801 6 BASE 1004 MEMBITS BSS 1 memory bits we still have left 00178802 6 BASE 1005 MEMSIZE BSS 1 00178803 6 BASE 1006 STARTADDR BSS 1 1007 ENDFRAME 1008 1C1A1 DD1F8004 6 STAK 1009 GIVERANGE ENTR PUSH 1C1A2 C1528000 2 REG 1010 STPV R2 bits from WRU4 indicating memory present 1C1A3 C0520000 0 REG 1011 STPVL R0 WRU zero 1C1A4 FA83C1CB 2 1012 JEQZ R2 NOMEMORY jump if no memory is attached 1013 1C1A5 600A2040 0 0 CBM 1014 LD R0 R0/WRUMEMINC description of size of blocks of mem 1C1A6 60440010 1 IMM 1015 LD R1 16 0001C1A7 1016 MEMDOUBLE LABEL 1C1A7 18524000 1 1 REG 1017 ADD R1 R1 double piece size each time around 1C1A8 FA27C1A7 0 1018 JDR R0 MEMDOUBLE 1019 * \ / 1C1A9 1C440400 1 IMM 1020 MUL R1 WPP turn into a word count 1C1AA E4578802 1 6 BASE 1021 ST R1 SP,MEMSIZE save the size of the memory chunks 1C1AB EC178803 6 BASE 1022 STZ SP,STARTADDR start at address zero 1023 * \ / 1024 1025 * R1 = size of memory chunks, R2 = bit array of memory chunks 0001C1AC 1026 SETSTART LABEL 1C1AC F6BFC1B0 2 1027 JBT R2/BIT 31 GOTSTART jump if we really start here 1C1AD 608A81F0 2 2 CBM 1028 LD R2 R2/BITS 0:30 shift around if not 1C1AE 98578803 1 6 BASE 1029 ADDM R1 SP,STARTADDR move up the start address 1C1AF FE0FC1AC 1030 JMP SETSTART 1031 * --- 1032 0001C1B0 1033 GOTSTART LABEL 1C1B0 61178803 4 6 BASE 1034 LD R4 SP,STARTADDR 1C1B1 19124000 4 1 REG 1035 ADD R4 R1 add in the size of the first chunk 0001C1B2 1036 NEXTCHUNK LABEL 1C1B2 608A81F0 2 2 CBM 1037 LD R2 R2/BITS 0:30 remove bit for work done 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 274 (RDUSTATUS) F 24 Status Command 1C1B3 FA83C1B7 2 1038 JEQZ R2 TELLWHERE jump if done 1C1B4 F2BFC1B7 2 1039 JBF R2/BIT 31 TELLWHERE jump if hole in memory 1C1B5 19124000 4 1 REG 1040 ADD R4 R1 add in memory for this chunk 1C1B6 FE0FC1B2 1041 JMP NEXTCHUNK find the next chunk 1042 * --- 1043 1044 * Report start addr and stop addr 0001C1B7 1045 TELLWHERE LABEL 1C1B7 E4978801 2 6 BASE 1046 ST R2 SP,MEMBITS save where we are 1C1B8 DC41B86C 1047 CALLNP BLANKOUTW clear out the output buffer 1C1B9 60178803 0 6 BASE 1048 LD R0 SP,STARTADDR get the start address 1C1BA E401A8ED 0 1049 ST R0 VALUE 1C1BB 60840006 2 IMM 1050 LD R2 6 output up to 6 digits 1C1BC DC41B5FB 1051 CALLNP HEXOUTN put it into the output 1C1BD 6004003A 0 IMM 1052 LD R0 COLON 1C1BE E437AC01 0 3 @ 1053 ST R0 @OBPT(OBP) put in the separator 1C1BF 18C40001 3 IMM 1054 ADD OBP 1 give it space 1C1C0 E501A8ED 4 1055 ST R4 VALUE put in the stop address 1C1C1 D041A8ED 1056 DEC VALUE only through last word of previous chunk 1C1C2 60840006 2 IMM 1057 LD R2 6 output up to 6 digits 1C1C3 DC41B5FB 1058 CALLNP HEXOUTN put it into the output 1C1C4 DC41B886 1059 CALLNP OUTO ship it out 1C1C5 60978801 2 6 BASE 1060 LD R2 SP,MEMBITS pick up where we are at 1C1C6 FA83C1CA 2 1061 JEQZ R2 ALLDONE 1C1C7 E5178803 4 6 BASE 1062 ST R4 SP,STARTADDR that is where we start next 1C1C8 60578802 1 6 BASE 1063 LD R1 SP,MEMSIZE 1C1C9 FE0FC1AC 1064 JMP SETSTART see if there is a chunk of memory there 1065 * --- 1066 0001C1CA 1067 ALLDONE LABEL 1C1CA 5D1F8004 6 STAK 1068 LEAVE POP 1069 * --- 1070 0001C1CB 1071 NOMEMORY LABEL 1C1CB 6005D1D7 0 IMM 1072 LD R0 ADR ERM330 "No memory attached..." 1C1CC DC41B88A 1073 CALLNP OUT tell user 1C1CD FE0FC1CA 1074 JMP ALLDONE 1075 * --- 1076 1077 END of GIVERANGE subroutine 1078 1079 END of MCUSTAT subroutines 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 275 (RDUSTATUS) F 24 Status Command 1081 1082 ********************************************************************************** 1083 * * 1084 * CPUSTAT lists all 32 CPU scratch registers and the * 1085 * previous 2 instructions, current instruction, and following * 1086 * 2 instructions. * 1087 * Call: * 1088 * R5 = slot number * 1089 * CALLNP CPUSTAT * 1090 * Eats R0:R4. * 1091 * * 1092 ********************************************************************************** 1093 1094 BLOCK 1095 ENTRY CPUSTAT 1096 1097 BEGFRAME 00178801 6 BASE 1098 CPUSTATTMP BSS 1 temporary position on stack 00178802 6 BASE 1099 CPUSTATR5 BSS 1 stack position to save R5 at 00178803 6 BASE 1100 CPUSTATPC BSS 1 place to keep the current PC 1101 ENDFRAME 1102 1C1CE DD5F8004 6 STAK 1103 CPUSTAT ENTRNP PUSH 1C1CF E541A830 5 1104 ST R5 SBUFFW put the slot number where it can be found 1C1D0 E5578802 5 6 BASE 1105 ST R5 SP,CPUSTATR5 save the slot number 1C1D1 DC41C0AA 1106 CALLNP SLOTDISP display the slot type 1C1D2 DC41B886 1107 CALLNP OUTO ship it to the user 1108 1C1D3 EC01A91F 1109 STZ ADDRESS start at address 0 0001C1D4 1110 CPUSTATTOP LABEL 1C1D4 EC178801 6 BASE 1111 STZ SP,CPUSTATTMP set first line end count 1C1D5 DC01BBAC 1112 CALL SHIPCOM general request, get data 1C1D6 4101BBF5 1113 PAR RESPERROR error address 1C1D7 41440002 IMM 1114 PARV KLAS2 class=2 1C1D8 41534000 5 REG 1115 PARV R5 slot=CPU 1C1D9 41440003 IMM 1116 PARV BCMBLKREAD bcm=0 1C1DA 4041A91F 1117 PARVL ADDRESS address 1C1DB 61040000 4 IMM 1118 LD R4 0 start at the first of the data 1C1DC 6145B024 5 IMM 1119 LD COM ADR SYSSTATCOM R5 -> our command element 1120 * \ / 1121 0001C1DD 1122 CPUSTATLP LABEL 1C1DD DC41C873 1123 CALLNP MADISP put in the register number 1C1DE 60040008 0 IMM 1124 LD R0 8 1C1DF 98178801 0 6 BASE 1125 ADDM R0 SP,CPUSTATTMP so we know where to stop the next loop 1C1E0 9801A91F 0 1126 ADDM R0 ADDRESS move the address up 0001C1E1 1127 CPUSTATLP1 LABEL 1C1E1 6229F38D 01 4 1128 LD2 R0 DATA(R4) pick up the register 1C1E2 E441A8ED 1 1129 ST R1 VALUE put here for HEXOUT 1C1E3 DC41B5F1 1130 CALLNP HEXOUT move into the output 1C1E4 18C40001 3 IMM 1131 ADD OBP 1 leave a blank between words 1C1E5 19040001 4 IMM 1132 ADD R4 1 move to the next register 1C1E6 65178801 4 6 BASE 1133 CPR R4 SP,CPUSTATTMP full line? 1C1E7 FE09C1E1 1134 JLT CPUSTATLP1 if not then keep on going 1135 * \ / 1136 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 276 (RDUSTATUS) F 24 Status Command 1C1E8 DC41B886 1137 CALLNP OUTO ship out the finished line 1C1E9 65040010 4 IMM 1138 CPR R4 16 have we done a block? 1C1EA FE09C1DD 1139 JLT CPUSTATLP if not then keep on going 1C1EB 61578802 5 6 BASE 1140 LD R5 SP, CPUSTATR5 pick up the slot number 1C1EC 60040020 0 IMM 1141 LD R0 32 number of registers we are displaying 1C1ED 6401A91F 0 1142 CPR R0 ADDRESS are we done yet? 1C1EE FE03C1F3 1143 JEQ CPUREGDONE 1144 * \ / 1145 1146 * Now get the current PC 1C1EF 6201F39D 01 1147 LD2 R0 DATA(8) pick up the PC 1C1F0 10440002 1 IMM 1148 SUB R1 2 back up 2 1C1F1 E4578803 1 6 BASE 1149 ST R1 SP,CPUSTATPC save it for later 1C1F2 FE0FC1D4 1150 JMP CPUSTATTOP get the next block of registers 1151 * --- 1152 0001C1F3 1153 CPUREGDONE LABEL 1C1F3 60978803 2 6 BASE 1154 LD R2 SP,CPUSTATPC 1C1F4 DC01BBAC 1155 CALL SHIPCOM send request for data 1C1F5 4101C211 1156 PAR CPUSTATPB error address 1C1F6 41440003 IMM 1157 PARV KLAS3 class 1C1F7 41534000 5 REG 1158 PARV R5 slot 1C1F8 41440003 IMM 1159 PARV BCMBLKREAD BCM for dump 1C1F9 40528000 2 REG 1160 PARVL R2 starting address 1161 1162 * List the current instructions. 1C1FA 60178803 0 6 BASE 1163 LD R0 SP,CPUSTATPC first instruction we will list 1C1FB E401A8ED 0 1164 ST R0 VALUE here for hexout 1C1FC 61440000 5 IMM 1165 LD R5 0 loop counter 0001C1FD 1166 CPUINSTRLP LABEL 1C1FD DC41B86F 1167 CALLNP BLANKOUT clean up the output buffer 1C1FE 65440002 5 IMM 1168 CPR R5 2 is this the PC instruction? 1C1FF FE0DC203 1169 JNE NOTPCINSTR 1170 * \ / 1171 1C200 6004003D 0 IMM 1172 LD R0 EQUAL "=" 1C201 60C40001 3 IMM 1173 LD OBP 1 position in buffer for marker 1C202 E437AC01 0 3 @ 1174 ST R0 @OBPT(OBP) put in buffer 0001C203 1175 NOTPCINSTR LABEL 1C203 60C40002 3 IMM 1176 LD OBP 2 where to start in line 1C204 DC41B600 1177 CALLNP HEXOUTA put the address in 1C205 6004003A 0 IMM 1178 LD R0 COLON separator 1C206 E437AC01 0 3 @ 1179 ST R0 @OBPT(OBP) in it goes 1C207 18C40001 3 IMM 1180 ADD OBP 1 give it room to reside 1C208 622BF38D 01 5 1181 LD2 R0 DATA(R5) pick up the data 1C209 E441A8ED 1 1182 ST R1 VALUE place for output 1C20A DC41B686 1183 CALLNP OPOUT list instruction 1C20B DC41B886 1184 CALLNP OUTO give our line to the user 1C20C 65440004 5 IMM 1185 CPR R5 4 have we done enough lines 1C20D FE03C216 1186 JEQ CPUSTATEND get out of here if done 1187 * \ / 1188 1C20E BC178803 0 6 BASE 1189 INCL R0 SP,CPUSTATPC pick up the instruction's address 1C20F E401A8ED 0 1190 ST R0 VALUE 1C210 FB61C1FD 5 1191 IRJ R5 CPUINSTRLP 1192 * --- 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 277 (RDUSTATUS) F 24 Status Command 1193 1194 * Error doing block fetch around @PC. Suspect excluded page, 1195 * but be ready for SSU detected bus error. Else, quit. 0001C211 1196 CPUSTATPB LABEL 1C211 64440006 1 IMM 1197 CPR R1 6 bus error found by SSU? 1C212 FE03C218 1198 JEQ HADSSUBE jump if so 1C213 64440007 1 IMM 1199 CPR R1 7 misc command error? 1C214 FE0DBBF5 1200 JNE RESPERROR jump if not 1201 * \ / 1202 1203 ********************************************************************************** 1204 * SENDCOM error code 7 means misc command error. Most of these * 1205 * misc errors are actually command format problems. One is * 1206 * 'excluded page'. This happens when the BCMBLKREAD starting * 1207 * address points to an unmapped page (i.e. the halted CPUs PC * 1208 * is at or within two words of the end of an unmapped page). * 1209 * If the PC looks reasonable, suspect the CPU's page file. * 1210 * See if PC is 'excluded' according to the OS PFMAP. If not, * 1211 * compare the PFMAP PM value against the CPU's PM value. * 1212 ********************************************************************************** 1213 1C215 DC41B88A 1214 CALLNP OUT tell user of error, and go on 1215 * \ / 1216 1217 ********************************************************************************** 1218 * * 1219 * Exit point. * 1220 * * 1221 ********************************************************************************** 1222 0001C216 1223 CPUSTATEND LABEL 1C216 61578802 5 6 BASE 1224 LD R5 SP,CPUSTATR5 restore from harm 1C217 5D1F8004 6 STAK 1225 LEAVE POP 1226 * --- 1227 1228 * SSU detected bus error in block fetch. Suspect CPU page file 1229 * is bad for virtual addresses PC-2:PC+14 (e.g. PM value has 1230 * incorrect slot number). 0001C218 1231 HADSSUBE LABEL 1C218 6005CDFB 0 IMM 1232 LD R0 ADR(MESBADFTCH) "Error while fetching ..." 1C219 DC41B88A 1233 CALLNP OUT pass to user 1C21A DC41BC69 1234 CALLNP BUSERR do more error info 1C21B FE0FC216 1235 JMP CPUSTATEND and go on 1236 * --- 1237 1238 END of CPUSTAT 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 278 (RDUSTATUS) F 24 Status Command 1240 1241 ********************************************************************************** 1242 * * 1243 * PPUSTAT lists the registers that the PPU keeps for * 1244 * each controller connected to it. * 1245 * Call: * 1246 * R5 = slot number * 1247 * CALLNP PPUSTAT * 1248 * Eats R0:R4. * 1249 * * 1250 ********************************************************************************** 1251 1252 BLOCK 1253 ENTRY PPUSTAT 1254 1255 BEGFRAME 00178801 6 BASE 1256 PPUPORTTMP BSS 1 temp to hold current PPUPORT 00178802 6 BASE 1257 PPUSLOTTMP BSS 1 temp to hold current PPUSLOT 1258 ENDFRAME 1259 1C21C DD5F8003 6 STAK 1260 PPUSTAT ENTRNP PUSH 1C21D 6001A980 0 1261 LD R0 PPUPORT 1C21E E4178801 0 6 BASE 1262 ST R0 SP,PPUPORTTMP save away some place safe 1C21F 6001A97E 0 1263 LD R0 PPUSLOT 1C220 E4178802 0 6 BASE 1264 ST R0 SP,PPUSLOTTMP save away some place safe 1265 1C221 E541A830 5 1266 ST R5 SBUFFW put the slot number where it can be found 1C222 E541A97E 5 1267 ST R5 PPUSLOT set to our slot 1C223 DC41C0AA 1268 CALLNP SLOTDISP display the slot type 1C224 DC41B886 1269 CALLNP OUTO ship it to the user 1270 1C225 EC01A980 1271 STZ PPUPORT start with the first port 0001C226 1272 PPUSTATLP LABEL 1C226 DC41C8B0 1273 CALLNP LISTPPR list this port's registers 1C227 BC01A980 0 1274 INCL R0 PPUPORT advance to the next port 1C228 64040004 0 IMM 1275 CPR R0 4 have we reached the last port 1C229 FE09C226 1276 JLT PPUSTATLP if not then do the next port 1277 * \ / 1278 1C22A 60178801 0 6 BASE 1279 LD R0 SP,PPUPORTTMP 1C22B E401A980 0 1280 ST R0 PPUPORT restore to original condition 1C22C 60178802 0 6 BASE 1281 LD R0 SP,PPUSLOTTMP 1C22D E401A97E 0 1282 ST R0 PPUSLOT restore to original condition 1C22E 5D1F8003 6 STAK 1283 LEAVE POP 1284 * --- 1285 1286 END of PPUSTAT 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 279 (RDUSTATUS) F 24 Status Command 1288 1289 ********************************************************************************** 1290 * * 1291 * SSUSTAT lists various status information about * 1292 * the SSU. We do a lot of this by setting COM to point * 1293 * to the normal SSU command that outputs this information, * 1294 * then calling a subroutine to pick up the info from the SSU, * 1295 * and format as described by the command element. * 1296 * Call: * 1297 * R5 = slot number * 1298 * CALLNP SSUSTAT * 1299 * Eats R0:R4. * 1300 * * 1301 ********************************************************************************** 1302 1303 BLOCK 1304 ENTRY SSUSTAT 1305 1306 BEGFRAME 00178801 6 BASE 1307 SSUSTSLOT BSS 1 temp to hold slot during subroutine 1308 ENDFRAME 1309 1C22F DD5F8002 6 STAK 1310 SSUSTAT ENTRNP PUSH 1C230 E5578801 5 6 BASE 1311 ST R5 SP,SSUSTSLOT save R5 1C231 61134000 4 5 REG 1312 LD R4 R5 keep the slot number around 1C232 E541A830 5 1313 ST R5 SBUFFW put the slot number where it can be found 1C233 DC41C0AA 1314 CALLNP SLOTDISP display the slot type 1C234 DC41B886 1315 CALLNP OUTO ship it to the user 1316 1317 * Put clock into output line. 1318 * Start the line with the TFENCE value. 1C235 DC41B86F 1319 CALLNP BLANKOUT clean up the output buffer 1C236 60C40002 3 IMM 1320 LD OBP 2 start our line here 1C237 6145B285 5 IMM 1321 LD COM ADR TFENCECOM 1C238 DC41C270 1322 CALLNP DOSSUWORD put switches into the line 1323 1324 * Put in the clock. 1C239 60C40016 3 IMM 1325 LD OBP 22 start of next column 1C23A 6145B223 5 IMM 1326 LD COM ADR CLOCKCOM 1C23B DC41C270 1327 CALLNP DOSSUWORD put into the output buffer 1328 1C23C 60C4002A 3 IMM 1329 LD OBP 42 where to put it in output 1C23D DC41B7DA 1330 CALLNP TIMEOUTS display the clock in time display format 1C23E DC41B886 1331 CALLNP OUTO that is all for this line 1332 1333 * Start a new line and put ICHAR on it. 1C23F DC41B86F 1334 CALLNP BLANKOUT clean up the output buffer 1C240 60C40002 3 IMM 1335 LD OBP 2 start our line here 1C241 6145B23F 5 IMM 1336 LD COM ADR ICHARCOM 1C242 DC41C270 1337 CALLNP DOSSUWORD put into the output buffer 1338 1339 * OCHAR goes next. 1C243 60C40016 3 IMM 1340 LD OBP 22 where to put next item in line 1C244 6145B262 5 IMM 1341 LD COM ADR OCHARCOM 1C245 DC41C270 1342 CALLNP DOSSUWORD put in the next word of SSU info 1343 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 280 (RDUSTATUS) F 24 Status Command 1344 * Finish the line with error log. 1C246 60C4002A 3 IMM 1345 LD OBP 42 index to start the next at 1C247 6145B231 5 IMM 1346 LD COM ADR ERRLOGCOM 1C248 DC41C270 1347 CALLNP DOSSUWORD put switches into the line 1C249 DC41B886 1348 CALLNP OUTO that is all for this line 1349 1350 * Put in the interrupt mask. 1C24A DC41B86F 1351 CALLNP BLANKOUT fill output buffer with blanks 1C24B 60C40002 3 IMM 1352 LD OBP 2 where to put next item in line 1C24C 6145B246 5 IMM 1353 LD COM ADR IMCOM 1C24D DC41C270 1354 CALLNP DOSSUWORD put in the next word of SSU info 1355 1356 * Now it is time for the message buffers. 1C24E DC01C8ED 1357 CALL DOSSMSG 1C24F 41530000 4 REG 1358 PARV R4 SLOT number 1C250 4044140A IMM 1359 PARVL MB1ADR address of info in SSU 1C251 60C40016 3 IMM 1360 LD OBP 22 where to start 1C252 6005CE6E 0 IMM 1361 LD R0 ADR MGSMB1 "MB1:" 1C253 DC41B87B 1362 CALLNP MESSMOVE move into the buffer 1C254 38B7AC01 2 3 @ 1363 LEA R2 @OBPT(OBP) R2 -> where we are in the buffer 1C255 6005A830 0 IMM 1364 LD R0 ADR SBUFFW R0 -> the string 1C256 6044000A 1 IMM 1365 LD R1 10 10 characters in SSU buffer 1C257 FE400000 1366 CMOVE into the output they go 1C258 61178801 4 6 BASE 1367 LD R4 SP,SSUSTSLOT restore slot number 1368 1369 * The second message buffer, now. 1C259 DC01C8ED 1370 CALL DOSSMSG 1C25A 41530000 4 REG 1371 PARV R4 SLOT number 1C25B 40441413 IMM 1372 PARVL MB2ADR address of info in SSU 1C25C 60C4002A 3 IMM 1373 LD OBP 42 index to start MB2 at 1C25D 6005CE70 0 IMM 1374 LD R0 ADR MGSMB2 "MB2:" 1C25E DC41B87B 1375 CALLNP MESSMOVE move into the buffer 1C25F 38B7AC01 2 3 @ 1376 LEA R2 @OBPT(OBP) R2 -> where we are in the buffer 1C260 6005A830 0 IMM 1377 LD R0 ADR SBUFFW R0 -> the string 1C261 6044000A 1 IMM 1378 LD R1 10 10 characters in SSU buffer 1C262 FE400000 1379 CMOVE into the output they go 1C263 61178801 4 6 BASE 1380 LD R4 SP,SSUSTSLOT restore slot number 1381 1C264 60C40038 3 IMM 1382 LD OBP 56 length of stuff in buffer 1C265 DC41B886 1383 CALLNP OUTO that is all for this line 1384 1385 * Put Boot Switch in line. 1C266 DC41B86F 1386 CALLNP BLANKOUT clear the output buffer 1C267 60C40002 3 IMM 1387 LD OBP 2 where to put next item in line 1C268 6145B21C 5 IMM 1388 LD COM ADR BSWITCHCOM 1C269 DC41C270 1389 CALLNP DOSSUWORD put in the next word of SSU info 1390 1391 * Put current switch setting in. 1C26A 60C40016 3 IMM 1392 LD OBP 22 index to start the next at 1C26B 6145B27E 5 IMM 1393 LD COM ADR SWITCHCOM 1C26C DC41C270 1394 CALLNP DOSSUWORD put switches into the line 1C26D DC41B886 1395 CALLNP OUTO that is all for this line 1C26E 61578801 5 6 BASE 1396 LD R5 SP,SSUSTSLOT restore R5 1C26F 5D1F8002 6 STAK 1397 LEAVE POP 1398 * --- 1399 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 281 (RDUSTATUS) F 24 Status Command 1400 END of SSUSTAT 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 282 (RDUSTATUS) F 24 Status Command 1402 1403 ********************************************************************************** 1404 * * 1405 * DOSSUWORD will get a word of info from the SSU and * 1406 * format it in the output buffer. * 1407 * Call: * 1408 * COM -> command element of SSU command that * 1409 * displays this word * 1410 * OBP -> current position in OBUFF * 1411 * R4 = slot number * 1412 * CALLNP DOSSUWORD * 1413 * OBP -> new position in word * 1414 * Eats R0:R2. * 1415 * * 1416 ********************************************************************************** 1417 1418 BLOCK 1419 ENTRY DOSSUWORD 1420 1421 BEGFRAME 00178801 6 BASE 1422 DOSSUR3 BSS 1 temp location on stack for R3 1423 ENDFRAME 1424 1C270 DD5F8002 6 STAK 1425 DOSSUWORD ENTRNP PUSH 1C271 E4D78801 3 6 BASE 1426 ST R3 SP,DOSSUR3 save index into output buffer 1C272 DC01BBAC 1427 CALL SHIPCOM ask for the info 1C273 4101BBF5 1428 PAR RESPERROR error address 1C274 41440000 IMM 1429 PARV KLAS0 class 1C275 41530000 4 REG 1430 PARV R4 SLOT 1C276 41440002 IMM 1431 PARV BCMREAD BCM 1C277 40495564 5 ZBM 1432 PARVL COM,GMMBASE the address 1C278 60D78801 3 6 BASE 1433 LD R3 SP,DOSSUR3 restore index into output buffer 1434 1C279 60174805 0 5 BASE 1435 LD R0 COM,GMMNAM R0 -> register name message 1C27A DC41B87B 1436 CALLNP MESSMOVE move into the buffer 1C27B 6001F38E 0 1437 LD R0 DATA(1) pick up the data 1C27C E401A8ED 0 1438 ST R0 VALUE and put where it can be found 1C27D DC41B5EB 1439 CALLNP DATADISP put into output line 1C27E 5D1F8002 6 STAK 1440 LEAVE POP 1441 * --- 1442 1443 END of DOSSUWORD subroutine 1623 1624 END of STATUS command 147 148 INPUT RDUMAIN2 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 283 (RDUMAIN2) F 25 Help, Format, and Command Commands 3 4 BLOCK HELP and FORMAT commands and subroutines 5 ENTRY HELP 6 ENTRY HELPPPU 7 ENTRY HELPCPU 8 ENTRY HELPSSU 9 ENTRY HELPMCU 10 ENTRY FORMHELP 11 12 ********************************************************************************** 13 * * 14 * This section handles the HELP command. Help * 15 * finds the appropriate message for a command and * 16 * sends it to the user. * 17 * * 18 ********************************************************************************** 19 0001C27F 20 HELP LABEL 1C27F 6004003B 0 IMM 21 LD R0 SEMI 1C280 6401A8E7 0 22 CPR R0 TERMCHAR was the command terminator a semi-colon? 1C281 FE03C298 23 JEQ STEPHELP if so give them single step help 24 * \ / 25 1C282 DC41B336 26 CALLNP FETCHCOM get the next command 1C283 F6BFC296 2 27 JBT R2/TEOL JUSTHELP give 'em generic help 1C284 F2AFC29A 2 28 JBF R2/TALPH NOHELP user is in trouble 29 * \ / 1C285 6145AF05 5 IMM 30 LD COM ADR COMTAB point to the commands 1C286 6105B063 4 IMM 31 LD R4 ADR COMTABTOP and the end of them 1C287 DC41B2A8 32 CALLNP COMLOOK now find the command 1C288 FA03C291 0 33 JEQZ R0 SENDHELP it is found, go send it 34 * \ / 1C289 DC41C2B6 35 CALLNP MCUHELP try the MCU commands 1C28A FA03C291 0 36 JEQZ R0 SENDHELP it is found, go send it 1C28B DC41C2BB 37 CALLNP CPUHELP try the CPU commands 1C28C FA03C291 0 38 JEQZ R0 SENDHELP it is found, go send it 1C28D DC41C2C0 39 CALLNP PPUHELP try the PPU commands 1C28E FA03C291 0 40 JEQZ R0 SENDHELP it is found, go send it 1C28F DC41C2C5 41 CALLNP SSUHELP try the SSU commands 1C290 FA0DC29A 0 42 JNEZ R0 NOHELP the command was not found 43 * \ / 0001C291 44 SENDHELP LABEL 1C291 60174806 0 5 BASE 45 LD R0 COM,COMHELP get the address of help message 0001C292 46 SENDHELP1 LABEL 1C292 DC41C2CA 47 CALLNP HELPOUT and send the message 1C293 5C120000 0 REG 48 CMZ R0 1C294 FE03BDC8 49 JEQ RDUOK return to mission control 1C295 FE0FBE35 50 JMP RDUERR something went wrong 51 * --- 52 0001C296 53 JUSTHELP LABEL 1C296 6005D9AB 0 IMM 54 LD R0 ADR HLPMHELP 1C297 FE0FC291 55 JMP SENDHELP go send it 56 * --- 57 0001C298 58 STEPHELP LABEL 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 284 (RDUMAIN2) F 25 Help, Format, and Command Commands 1C298 6005E680 0 IMM 59 LD R0 ADR HLPMSEMI address of message 1C299 FE0FC292 60 JMP SENDHELP1 go send it 61 * --- 62 0001C29A 63 NOHELP LABEL 1C29A 6005CED6 0 IMM 64 LD R0 ADR ERM100 Unknown command 1C29B DC41B88A 65 CALLNP OUT send it 1C29C 6005D555 0 IMM 66 LD R0 ADR HLPMCMND give them COMMANDS help 1C29D FE0FC292 67 JMP SENDHELP1 go send it 68 * --- 69 70 71 ********************************************************************************** 72 * * 73 * The next 4 sections are the help commands for MCU, SSU, * 74 * PPU, and CPU commands. They all just search their respective * 75 * command tables for a match, and if found send the help message. * 76 * They then all merge in with the HELP command above. * 77 * * 78 ********************************************************************************** 79 0001C29E 80 HELPMCU LABEL 1C29E DC41B336 81 CALLNP FETCHCOM get the next command 1C29F F6BFC296 2 82 JBT R2/TEOL JUSTHELP give 'em generic help 1C2A0 F2AFC29A 2 83 JBF R2/TALPH NOHELP user is in trouble 84 * \ / 1C2A1 DC41C2B6 85 CALLNP MCUHELP search MCU command table for match 1C2A2 FA0DC29A 0 86 JNEZ R0 NOHELP no match was found 1C2A3 FE0FC291 87 JMP SENDHELP go send it 88 * --- 89 0001C2A4 90 HELPCPU LABEL 1C2A4 DC41B336 91 CALLNP FETCHCOM get the next command 1C2A5 F6BFC296 2 92 JBT R2/TEOL JUSTHELP give 'em generic help 1C2A6 F2AFC29A 2 93 JBF R2/TALPH NOHELP user is in trouble 94 * \ / 1C2A7 DC41C2BB 95 CALLNP CPUHELP search CPU command table for match 1C2A8 FA0DC29A 0 96 JNEZ R0 NOHELP no match was found 1C2A9 FE0FC291 97 JMP SENDHELP go send it 98 * --- 99 0001C2AA 100 HELPPPU LABEL 1C2AA DC41B336 101 CALLNP FETCHCOM get the next command 1C2AB F6BFC296 2 102 JBT R2/TEOL JUSTHELP give 'em generic help 1C2AC F2AFC29A 2 103 JBF R2/TALPH NOHELP user is in trouble 104 * \ / 1C2AD DC41C2C0 105 CALLNP PPUHELP search PPU command table for match 1C2AE FA0DC29A 0 106 JNEZ R0 NOHELP no match was found 1C2AF FE0FC291 107 JMP SENDHELP go send it 108 * --- 109 0001C2B0 110 HELPSSU LABEL 1C2B0 DC41B336 111 CALLNP FETCHCOM get the next command 1C2B1 F6BFC296 2 112 JBT R2/TEOL JUSTHELP give 'em generic help 1C2B2 F2AFC29A 2 113 JBF R2/TALPH NOHELP user is in trouble 114 * \ / 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 285 (RDUMAIN2) F 25 Help, Format, and Command Commands 1C2B3 DC41C2C5 115 CALLNP SSUHELP search SSU command table for match 1C2B4 FA0DC29A 0 116 JNEZ R0 NOHELP no match was found 1C2B5 FE0FC291 117 JMP SENDHELP go send it 118 * --- 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 286 (RDUMAIN2) F 25 Help, Format, and Command Commands 120 121 ********************************************************************************** 122 * * 123 * The following 4 subroutines are basically identical. They * 124 * search their respective command tables for a match to the command * 125 * name found after the help command. If it is found, COM will point * 126 * to the command table entry of the command, and R0 will contain 0, * 127 * otherwise R0 will contain the address of an error message. * 128 * * 129 ********************************************************************************** 130 131 BLOCK 132 ENTRY MCUHELP 133 ENTRY CPUHELP 134 ENTRY PPUHELP 135 ENTRY SSUHELP 136 137 BEGFRAME 138 ENDFRAME 139 1C2B6 DD5F8001 6 STAK 140 MCUHELP ENTRNP PUSH 1C2B7 6145B06A 5 IMM 141 LD COM ADR MCCOMTAB point to the MCU commands 1C2B8 6105B0BE 4 IMM 142 LD R4 ADR MCCTTOP and the end of them 1C2B9 DC41B2A8 143 CALLNP COMLOOK now find the command 1C2BA 5D1F8001 6 STAK 144 LEAVE POP 145 * --- 146 1C2BB DD5F8001 6 STAK 147 CPUHELP ENTRNP PUSH 1C2BC 6145B0C5 5 IMM 148 LD COM ADR CPCOMTAB point to the CPU commands 1C2BD 6105B189 4 IMM 149 LD R4 ADR CPCTTOP and the end of them 1C2BE DC41B2A8 150 CALLNP COMLOOK now find the command 1C2BF 5D1F8001 6 STAK 151 LEAVE POP 152 * --- 153 1C2C0 DD5F8001 6 STAK 154 PPUHELP ENTRNP PUSH 1C2C1 6145B190 5 IMM 155 LD COM ADR PPCOMTAB point to the PPU commands 1C2C2 6105B20E 4 IMM 156 LD R4 ADR PPCTTOP and the end of them 1C2C3 DC41B2A8 157 CALLNP COMLOOK now find the command 1C2C4 5D1F8001 6 STAK 158 LEAVE POP 159 * --- 160 1C2C5 DD5F8001 6 STAK 161 SSUHELP ENTRNP PUSH 1C2C6 6145B215 5 IMM 162 LD COM ADR SSCOMTAB point to the SSU commands 1C2C7 6105B29A 4 IMM 163 LD R4 ADR SSCTTOP and the end of them 1C2C8 DC41B2A8 164 CALLNP COMLOOK now find the command 1C2C9 5D1F8001 6 STAK 165 LEAVE POP 166 * --- 167 168 END of xxxHELP subroutines 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 287 (RDUMAIN2) F 25 Help, Format, and Command Commands 170 171 ********************************************************************************** 172 * * 173 * HELPOUT sends the help message that R0 points to. The first * 174 * line of the help message is a format message so FORMOUT is called, * 175 * then the rest of the message is sent. * 176 * Call: * 177 * LD R0 ADR * 178 * CALLNP HELPOUT * 179 * Eats R1, R2 Returns R0 with 0 if all went well or address * 180 * of an error message if not. * 181 * * 182 ********************************************************************************** 183 184 BLOCK 185 ENTRY HELPOUT 186 187 BEGFRAME 00178801 6 BASE 188 HLPOUTR0 BSS 1 to save this register 189 ENDFRAME 190 1C2CA DD5F8002 6 STAK 191 HELPOUT ENTRNP PUSH 1C2CB DC41C2DC 192 CALLNP FORMOUT send the format message 1C2CC E4178801 0 6 BASE 193 ST R0 SP,HLPOUTR0 save the pointer to rest of message 0001C2CD 194 HELPLOOP LABEL 1C2CD 60440060 1 IMM 195 LD R1 OKLEN max length of line 1C2CE 60840000 2 IMM 196 LD R2 NULL search for the ending NULL 1C2CF FE560000 197 CSRCH remember R0 points to the string 1C2D0 FE0DC2DA 198 JNE HELPERR must find terminator 1C2D1 30440060 1 IMM 199 RSB R1 OKLEN get actual line length 1C2D2 FA43C2D8 1 200 JEQZ R1 HOLEAVE two consecutive nulls means all done 1C2D3 38160801 0 0 BASE 201 LEA R0 R0,1 get address of next word 1C2D4 E0178801 0 6 BASE 202 EXCH R0 SP,HLPOUTR0 because we want pointer to current mess 1C2D5 DC41B88A 203 CALLNP OUT send the line out 1C2D6 60178801 0 6 BASE 204 LD R0 SP,HLPOUTR0 R0 -> beginning of next line 1C2D7 FE0FC2CD 205 JMP HELPLOOP 206 * --- 207 0001C2D8 208 HOLEAVE LABEL 1C2D8 60040000 0 IMM 209 LD R0 0 say all is OK 0001C2D9 210 HOEXIT LABEL 1C2D9 5D1F8002 6 STAK 211 LEAVE POP 212 * --- 213 0001C2DA 214 HELPERR LABEL 1C2DA 6005CFB1 0 IMM 215 LD R0 ADR ERM129 "Bug in help routine" 1C2DB FE0FC2D9 216 JMP HOEXIT 217 * --- 218 219 END of HELPOUT 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 288 (RDUMAIN2) F 25 Help, Format, and Command Commands 221 222 ********************************************************************************** 223 * * 224 * FORMOUT sends the format line of the help message to the user. * 225 * Call: * 226 * LD R0 ADR * 227 * CALLNP FORMOUT * 228 * Leaves R0 pointing to next line of the help message and eats R1, R2. * 229 * * 230 ********************************************************************************** 231 232 BLOCK 233 ENTRY FORMOUT 234 235 BEGFRAME 00178801 6 BASE 236 FORMR0 BSS 1 temp for R0 237 ENDFRAME 238 1C2DC DD5F8002 6 STAK 239 FORMOUT ENTRNP PUSH 1C2DD E4178801 0 6 BASE 240 ST R0 SP,FORMR0 save the address of the message 1C2DE 60440060 1 IMM 241 LD R1 OKLEN max length of line 1C2DF 60840000 2 IMM 242 LD R2 NULL search for the ending NULL 1C2E0 FE560000 243 CSRCH remember R0 points to the string 1C2E1 30440060 1 IMM 244 RSB R1 OKLEN get actual line length 1C2E2 38160801 0 0 BASE 245 LEA R0 R0,1 get address of next word 1C2E3 E0178801 0 6 BASE 246 EXCH R0 SP,FORMR0 because we want pointer to current mess 1C2E4 DC41B88A 247 CALLNP OUT send the line out 1C2E5 60178801 0 6 BASE 248 LD R0 SP,FORMR0 R0 -> beginning of next line 1C2E6 5D1F8002 6 STAK 249 LEAVE POP 250 * --- 251 252 END of FORMOUT 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 289 (RDUMAIN2) F 25 Help, Format, and Command Commands 254 255 ********************************************************************************** 256 * * 257 * FORMHELP checks the command line for a question mark. If * 258 * found then the format section of the help command is printed. * 259 * Call: * 260 * LD COM ADR COM * 261 * CALLNP FORMHELP * 262 * Returns R0 with 0 if no question mark was found. Restores all registers. * 263 * * 264 ********************************************************************************** 265 266 BLOCK 267 ENTRY FORMHELP 268 269 BEGFRAME 00178801 6 BASE 270 FRMHLPR1 BSS 2 save R1,R2 00178803 6 BASE 271 FRMBUFPT BSS 1 save BUFPT 272 ENDFRAME 273 1C2E7 DD5F8004 6 STAK 274 FORMHELP ENTRNP PUSH 1C2E8 E6578801 126 BASE 275 ST2 R1 SP,FRMHLPR1 save R1,R2 1C2E9 6001A8E5 0 276 LD R0 BUFPT 1C2EA E4178803 0 6 BASE 277 ST R0 SP,FRMBUFPT save this 0001C2EB 278 FRMLOOP LABEL 1C2EB DC41B39C 279 CALLNP GETCHAR get next char on command line 1C2EC 64040020 0 IMM 280 CPR R0 BLANK is it a blank? 1C2ED FE03C2EB 281 JEQ FRMLOOP if so, ignore, get next char 282 * \ / 1C2EE 6404003F 0 IMM 283 CPR R0 "?" is it a question mark? 1C2EF FE03C2F5 284 JEQ SENDFORM then go send the format 1C2F0 EC120000 0 REG 285 STZ R0 say no question mark here 0001C2F1 286 FORMEXIT LABEL 1C2F1 60578803 1 6 BASE 287 LD R1 SP,FRMBUFPT get BUFPT back 1C2F2 E441A8E5 1 288 ST R1 BUFPT and restore it 1C2F3 62578801 126 BASE 289 LD2 R1 SP,FRMHLPR1 restore R1,R2 1C2F4 5D1F8004 6 STAK 290 LEAVE POP 291 * --- 292 0001C2F5 293 SENDFORM LABEL 1C2F5 60174806 0 5 BASE 294 LD R0 COM,COMHELP get address of help message 1C2F6 DC41C2DC 295 CALLNP FORMOUT and send the format message 1C2F7 FE0FC2F1 296 JMP FORMEXIT 297 * --- 298 299 END of FORMHELP subroutine 300 301 END of HELP command and subroutines 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 290 (RDUMAIN2) F 25 Help, Format, and Command Commands 303 304 ********************************************************************************** 305 * * 306 * COMMANDS lists out the RDU commands by category. * 307 * * 308 ********************************************************************************** 309 310 BLOCK 311 ENTRY COMMANDS 312 ENTRY COMLISTER 313 0001C2F8 314 COMMANDS LABEL 1C2F8 6145AF05 5 IMM 315 LD COM ADR(COMTAB) point to the command table 1C2F9 6105B063 4 IMM 316 LD R4 ADR(COMTABTOP) point to the top 1C2FA DC41B2BF 317 CALLNP COMLIST list out the commands 1C2FB 6145B06A 5 IMM 318 LD COM ADR(MCCOMTAB) point to command table 1C2FC 6105B0BE 4 IMM 319 LD R4 ADR(MCCTTOP) 1C2FD DC41B2BF 320 CALLNP COMLIST list the dudes out 1C2FE 6145B0C5 5 IMM 321 LD COM ADR(CPCOMTAB) point to CPU commands 1C2FF 6105B189 4 IMM 322 LD R4 ADR(CPCTTOP) and to the end 1C300 DC41B2BF 323 CALLNP COMLIST list them out 1C301 6145B190 5 IMM 324 LD COM ADR(PPCOMTAB) command table 1C302 6105B20E 4 IMM 325 LD R4 ADR(PPCTTOP) and top 1C303 DC41B2BF 326 CALLNP COMLIST list that one out 1C304 6145B215 5 IMM 327 LD COM ADR(SSCOMTAB) 1C305 6105B29A 4 IMM 328 LD R4 ADR(SSCTTOP) 1C306 DC41B2BF 329 CALLNP COMLIST this will do it!! 1C307 FE0FBDC8 330 JMP RDUOK so get out 331 * --- 332 0001C308 333 COMLISTER LABEL (list commands by device) 1C308 61174805 4 5 BASE 334 LD R4 COM,COMEX2 get the high end of the table 1C309 61574804 5 5 BASE 335 LD COM COM,COMEX1 and get the low end 1C30A DC41B2BF 336 CALLNP COMLIST list the entries out 1C30B FE0FBDC8 337 JMP RDUOK then back for more 338 * --- 339 340 END of COMMAND command 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 291 (RDUMAIN2) F 25 Interactive or PortZero command 343 344 ********************************************************************************** 345 * * 346 * This handles the port zero case of the PORT command. * 347 * It switches the RDU into port zero mode for the remote * 348 * machine. If the system is stopped a GO is sent and then * 349 * the echo mode is changed and the RDU enters transparent * 350 * port zero mode. The escape character is set to CNTL-A * 351 * unless a different one is specified with the EXIT * 352 * parameter to the command. (e.g. RDU: i exit ^Z) * 353 * * 354 ********************************************************************************** 355 356 BLOCK 357 ENTRY PORTZERO 358 0001C30C 359 PORTZERO LABEL switch to port zero mode 1C30C 5C01A8D7 360 CMZ CPSTATE is there a concurrent proc? 1C30D FE0DC33F 361 JNE PZ90 if so then no port zero!! 1C30E 6444000D 1 IMM 362 CPR R1 CR was the terminating character a CR? 1C30F FE0DC32D 363 JNE SETEXITCH if not, there may be an exit char to set 364 * \ / 365 0001C310 366 PORTSET LABEL 1C310 6001A8D6 0 367 LD R0 STATE check our current state 1C311 FA23C320 0 368 DRJ R0 PZ10 jump if already going 369 * \ / 1C312 DC01BBAC 370 CALL SHIPCOM send single-step 1C313 4101BBF5 371 PAR RESPERROR error address 1C314 41440005 IMM 372 PARV KLAS5 class=5 1C315 4141A97D 373 PARV CPUSLOT slot=CPU 1C316 41440006 IMM 374 PARV BCMSSTEP bcm=6 1C317 4041AC2C 375 PARVL CPSTEP address=CPSTEP 376 1C318 DC41CA32 377 CALLNP BPISET put in any breakpoints 1C319 DC41BCEF 378 CALLNP FIXUPMCUS revive MCUs 1C31A DC01BBAC 379 CALL SHIPCOM send out a GO 1C31B 4101BBF5 380 PAR RESPERROR error address 1C31C 41440005 IMM 381 PARV KLAS5 class=5 1C31D 41440000 IMM 382 PARV 0 slot=0 1C31E 41440001 IMM 383 PARV BCMGO bcm=1 1C31F 40440000 IMM 384 PARVL 0 address=0 0001C320 385 PZ10 LABEL 1C320 60040000 0 IMM 386 LD R0 STATEPORTZ 1C321 E401A8D6 0 387 ST R0 STATE say that we are now port zero 1C322 DC41F7C5 388 CALLNP SIMWBRKS allow break processing 389 TCZERO 1C323 6004011B 0 IMM 389 LD R0 FRTSETTCS set terminating characters 1C324 6045AC6D 1 IMM 389 LD R1 ADR(TCTABZ) port zero table 1C325 E441A8EA 1 389 ST R1 TCGROUP save group address 1C326 088400C9 IMM 389 FREQ LUNAIN+XREQ for input from port zero 1C327 60040118 0 IMM 390 LD R0 FRTSETECHO request to set echo mode 1C328 60440000 1 IMM 391 LD R1 0 now to turn off the echo 1C329 088400C9 IMM 392 FREQ LUNAIN+XREQ and turn off the echo 1C32A D141A911 393 STMW CPI clear buffer pointers 1C32B D141A912 394 STMW CPO input and output 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 292 (RDUMAIN2) F 25 Interactive or PortZero command 1C32C 5C974805 5 BASE 395 LDPC COM,COMEX2 then continue on 396 * --- 397 0001C32D 398 SETEXITCH LABEL 1C32D DC41B33C 399 CALLNP FETCHAP get word from line 1C32E F6BFC310 2 400 JBT R2/TEOL PORTSET if nothing, then keep default 1C32F 6401AC2D 0 401 CPR R0 EXITCOM is it the exit command? 1C330 FE0DC33D 402 JNE SETEXERR if not then problems 1C331 6444000D 1 IMM 403 CPR R1 CR if the terminator is a CR then trouble 1C332 FE03C33B 404 JEQ SETEXITERR 405 * \ / 406 0001C333 407 GETEXIT LABEL 1C333 DC41B39C 408 CALLNP GETCHAR get the character 1C334 6404001A 0 IMM 409 CPR R0 26 is it a valid escape character? 1C335 FE0BC339 410 JLE FOUNDEXIT if not try again 1C336 64040020 0 IMM 411 CPR R0 BLANK if a blank then check next char 1C337 FE03C333 412 JEQ GETEXIT 1C338 FE0FC33B 413 JMP SETEXITERR else problem 414 * --- 415 0001C339 416 FOUNDEXIT LABEL 1C339 E401A8EF 0 417 ST R0 EXITCHAR call it the exit character 1C33A FE0FC310 418 JMP PORTSET 419 * --- 420 0001C33B 421 SETEXITERR LABEL 1C33B 6005D193 0 IMM 422 LD R0 ADR ERM221 "Expecting a control character" 1C33C FE0FBE35 423 JMP RDUERR go complain 424 * --- 425 0001C33D 426 SETEXERR LABEL 1C33D 6005D19A 0 IMM 427 LD R0 ADR ERM222 "expecting EXIT parameter" 1C33E FE0FBE35 428 JMP RDUERR 429 * --- 430 0001C33F 431 PZ90 LABEL 1C33F 6005D2D7 0 IMM 432 LD R0 ADR(ERM513) "Not when c.p. exists" 1C340 FE0FBE35 433 JMP RDUERR 434 * --- 435 436 END of PORTZERO command 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 293 (RDUMAIN2) F 25 Dial Command 439 440 ********************************************************************************** 441 * * 442 * This section processes the DIAL command. Any previous * 443 * connection is terminated and session log printed. Then the * 444 * remote site serial number, phone number, and password are * 445 * picked up from the user, a session log is started, and the * 446 * I/O package is called to establish a link to the selected * 447 * remote system. If all goes well, we can then send commands * 448 * to and receive data from the remote system. * 449 * A session log is started before the dialup is attempted * 450 * so that any dialup errors will be recorded and so that a * 451 * trace can be kept of the dialup. * 452 * * 453 ********************************************************************************** 454 455 BLOCK 456 ENTRY DIAL 457 0001C341 458 DIAL LABEL 1C341 5C01A92E 459 CMZ LOGFLAG should we print the log 1C342 FE03C344 460 JEQ DIALNP if not then skip next call 1C343 DC41CCF0 461 CALLNP LOGPRINT first, print the session log 462 * \ / 0001C344 463 DIALNP LABEL 1C344 DC41CD0D 464 CALLNP CLOSEM close the session log LUN 1C345 DC41C429 465 CALLNP HANGER then, terminate previous 1C346 EC01A931 466 STZ BPISIN say no breakpoints in 1C347 EC01A930 467 STZ STEPSET say no step either 1C348 DC41CB0F 468 CALLNP BPIINIT do all the BPI initialization 469 * \ / 1C349 DC41B342 470 CALLNP FETCHDN get site serial number 1C34A F2ADC3E5 2 471 JBF R2/TNUM DIAL90 error if not there 1C34B E401AA51 0 472 ST R0 SYSNUM and place here for permanent keeping 473 * \ / 474 475 * Determine if the site information is on the input line or is to 476 * be read in from the SITEFILE. 477 0001C34C 478 DIALLOOP LABEL 1C34C DC41B39C 479 CALLNP GETCHAR see what is left on the input line 1C34D FA43C36A 1 480 JEQZ R1 DIAL20 jump if number is found 481 * indicates that SITE information is on 482 * input line 483 * \ / 1C34E 64440006 1 IMM 484 CPR R1 CEL is it end-of-line? 1C34F FE03C356 485 JEQ DIAL5 then information is in the SITEFILE 1C350 64440007 1 IMM 486 CPR R1 CBL is it a blank? 1C351 FE03C34C 487 JEQ DIALLOOP if so then try the next char 1C352 FE05C3E9 488 JGT DIAL92 if code is greater than this then error 1C353 64440004 1 IMM 489 CPR R1 CCM is it a comma? 1C354 FE03C34C 490 JEQ DIALLOOP if so then try next char 1C355 FE0FC3E9 491 JMP DIAL92 out of valid choices 492 * --- 493 494 * Information is in REMOTE.RFP:SITEFILE.TEXT. 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 294 (RDUMAIN2) F 25 Dial Command 495 * Open the file and find an entry to match our site serial number. 496 0001C356 497 DIAL5 LABEL 1C356 6005AC17 0 IMM 498 LD R0 ADR(SITEFILE) point to configuration file 1C357 E401A8E5 0 499 ST R0 BUFPT set up to get file name 1C358 DC41BD4A 500 CALLNP FILEGET then try to equip it up 1C359 FA0DC3ED 0 501 JNEZ R0 DIAL95 complain if no file 1C35A E441A917 1 502 ST R1 INLUN save the unit the file is opened on 0001C35B 503 DIAL10 LABEL 1C35B DC01BD85 504 CALL READFILE get a record from the file 1C35C 4041A917 505 PARVL INLUN pass unit to read from 1C35D FA0DC3E2 0 506 JNEZ R0 DIAL80 jump if problems 507 * \ / 1C35E 6001A8E5 0 508 LD R0 BUFPT get pointer to buffer 1C35F 60080080 0 0 ZBM 509 LD R0 R0,0/CH0 pick up first character in buffer 1C360 6404002A 0 IMM 510 CPR R0 "*" is it a snowflake? 1C361 FE03C35B 511 JEQ DIAL10 jump if so to ignore comment record 512 * \ / 1C362 DC41B342 513 CALLNP FETCHDN get site serial number from the entry 1C363 F2ADC3F3 2 514 JBF R2/TNUM DIAL97 if not numeric then bad data 1C364 6401AA51 0 515 CPR R0 SYSNUM check for a match against given number 1C365 FE0DC35B 516 JNE DIAL10 if not ours, try the next entry 517 * \ / 1C366 6001A8E5 0 518 LD R0 BUFPT get the buffer pointer 1C367 D00A1F30 0 CBM 519 INC R0/NXTCHAR move pointer beyond terminator 1C368 E401A8E5 0 520 ST R0 BUFPT put it back 1C369 DC41B39C 521 CALLNP GETCHAR pick up the next char 522 * \ / 523 524 ********************************************************************************** 525 * * 526 * We get here with BUFPT pointing to the line with the SITE * 527 * information (either input line from user or the correct line * 528 * in the SITEFILE). The first character of either the phone * 529 * number or hardwired port name is in R0, with R1 containing * 530 * zero if this is a number and BUFPT pointing to the next character. * 531 * We want to get the number or port name and store it into PHONE. * 532 * * 533 ********************************************************************************** 534 0001C36A 535 DIAL20 LABEL 1C36A FA43C374 1 536 JEQZ R1 DIAL25 jump if have a real phone number 1C36B 6001A8E5 0 537 LD R0 BUFPT backup and try again 1C36C D04A1F30 0 CBM 538 DEC R0/NXTCHAR move pointer back to first char 1C36D E401A8E5 0 539 ST R0 BUFPT may be a port specifier 1C36E DC41B33C 540 CALLNP FETCHAP if so then it will be alpha 1C36F F2AFC3E9 2 541 JBF R2/TALPH DIAL92 if not then out of luck 1C370 DC41B451 542 CALLNP PACKER turn into pack-6 1C371 E601A8F9 01 543 ST2 R0 PHONE and save the value 1C372 EC01A8F8 544 STZ PHONEFLAG say this is a port 1C373 FE0FC382 545 JMP DIAL27 then merge back in 546 * --- 547 0001C374 548 DIAL25 LABEL 1C374 EDC1A8F8 549 STW PHONEFLAG say this is a phone number 1C375 6001A8E5 0 550 LD R0 BUFPT get current line pointer 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 295 (RDUMAIN2) F 25 Dial Command 1C376 D04A1F30 0 CBM 551 DEC R0/NXTCHAR want to point to first number 1C377 E401A8E5 0 552 ST R0 BUFPT cause we will need it later 553 554 * The phone number should be imbedded between commas so search 555 * for the ending comma and move everything between them into PHONE. 556 1C378 60440060 1 IMM 557 LD R1 SBMAXL max length of line 1C379 6084002C 2 IMM 558 LD R2 COMMA search for a comma 1C37A FE560000 559 CSRCH go for it 1C37B FE0DC3E9 560 JNE DIAL92 there had to be a comma 561 * \ / 1C37C 30440060 1 IMM 562 RSB R1 SBMAXL get the number of chars before comma 1C37D 6001A8E5 0 563 LD R0 BUFPT now lets move the chars 1C37E 3881A8F9 2 564 LEA R2 PHONE want the phone number here 1C37F FE400000 565 CMOVE so move them 1C380 E401A8E5 0 566 ST R0 BUFPT keep it up-to-date 1C381 EC168000 2 CACH 567 STZ CACH R2,0 then terminate the thing 568 * \ / 0001C382 569 DIAL27 LABEL 1C382 DC41B346 570 CALLNP FETCHITMF now get rate value 1C383 F6AFC387 2 571 JBT R2/TALPH RATEHILOW old style rate switch 1C384 F2ADC3EB 2 572 JBF R2/TNUM DIAL93 error if not numeric 1C385 E401A8F5 0 573 ST R0 PHONERATE save the phone rate 1C386 FE0FC38D 574 JMP DIAL30 fetch next parameter 575 * --- 576 0001C387 577 RATEHILOW LABEL 1C387 EDC1A8F5 578 STW PHONERATE assume we run high-speed 1C388 6401AC0F 0 579 CPR R0 HIGHCHARS did user ask for high rate? 1C389 FE03C38D 580 JEQ DIAL30 if so then we are already set 1C38A 6401AC10 0 581 CPR R0 LOWCHARS hope he switched to slow rate 1C38B FE0DC3EB 582 JNE DIAL93 if not then complain 1C38C EC01A8F5 583 STZ PHONERATE set rate switch to slow 584 * \ / 0001C38D 585 DIAL30 LABEL 1C38D DC41B342 586 CALLNP FETCHDN get the call class 1C38E F2ADC3F1 2 587 JBF R2/TNUM DIAL98 complain about the service 1C38F E401A8F4 0 588 ST R0 CALLCLASS save the class 589 * \ / 1C390 5C01A917 590 CMZ INLUN are we inputting from file? 1C391 FE0DC39B 591 JNE DIAL40 if so then speed ahead 592 * \ / 1C392 60040118 0 IMM 593 LD R0 FRTSETECHO before asking for site key 1C393 EC124000 1 REG 594 STZ R1 set terminal echo to none 1C394 088400C9 IMM 595 FREQ LUNAIN+XREQ just to hide a little 1C395 6005CD3C 0 IMM 596 LD R0 ADR(MESPASS) "Site key?" 1C396 DC41B88A 597 CALLNP OUT print that out 1C397 DC41B3B6 598 CALLNP READLINE then pick up the response 1C398 60040118 0 IMM 599 LD R0 FRTSETECHO be sure to reset echo 1C399 6041A916 1 600 LD R1 ECHOMODE get original echo back 1C39A 088400C9 IMM 601 FREQ LUNAIN+XREQ and restore to normal 602 * \ / 0001C39B 603 DIAL40 LABEL 1C39B DC41B33C 604 CALLNP FETCHAP grab an alpha parameter 1C39C F2AFC3A3 2 605 JBF R2/TALPH DIAL45 if not alpha try numeric 1C39D 6041A8E6 1 606 LD R1 LBUFPT get starting buffer pointer 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 296 (RDUMAIN2) F 25 Dial Command 1C39E 60040100 0 IMM 607 LD R0 URPACKI set up to pack key 1C39F 09040000 IMM 608 UREQ 0+XREQ let system do it 1C3A0 FA09C3E7 0 609 JLTZ R0 DIAL91 complain if trouble 1C3A1 E681A8F6 23 610 ST2 R2 PASSWORD save the key for later use 1C3A2 FE0FC3AF 611 JMP DIAL50 then merge back in 612 * --- 613 0001C3A3 614 DIAL45 LABEL 1C3A3 6001A8E6 0 615 LD R0 LBUFPT backup and try numeric key 1C3A4 E401A8E5 0 616 ST R0 BUFPT reset to scan again 1C3A5 DC41B33F 617 CALLNP FETCHNP get user input 1C3A6 F2ADC3E7 2 618 JBF R2/TNUM DIAL91 jump if numeric key 1C3A7 EC124000 1 REG 619 STZ R1 clear second half 1C3A8 E601A8F6 01 620 ST2 R0 PASSWORD set the key 1C3A9 DC41B33F 621 CALLNP FETCHNP try for second half of key 1C3AA F6ADC3AE 2 622 JBT R2/TNUM DIAL47 jump if we got our wish 1C3AB 6001A8E6 0 623 LD R0 LBUFPT else backup to check again 1C3AC E401A8E5 0 624 ST R0 BUFPT assume one-value password 1C3AD FE0FC3AF 625 JMP DIAL50 then check on name string 626 * --- 627 0001C3AE 628 DIAL47 LABEL 1C3AE E401A8F7 0 629 ST R0 PASSWORD(1) and save second part 630 * \ / 0001C3AF 631 DIAL50 LABEL 1C3AF DC41CB31 632 CALLNP INITLOGLUN start the log session ball rolling 633 634 * tell user what is happening 1C3B0 DC41B86F 635 CALLNP BLANKOUT tell them how we're doing 1C3B1 6005CD4B 0 IMM 636 LD R0 ADR(MESDIAL) "Dialing system " 1C3B2 DC41B87B 637 CALLNP MESSMOVE start the line 1C3B3 6001AA51 0 638 LD R0 SYSNUM get system number 1C3B4 E401A8ED 0 639 ST R0 VALUE set up to output 1C3B5 DC41B62D 640 CALLNP DECOUT add it to line 1C3B6 5C01A917 641 CMZ INLUN file input?? 1C3B7 FE03C3C1 642 JEQ DIAL55 if not then can't add name 643 * \ / 1C3B8 DC41B33C 644 CALLNP FETCHAP get the name 1C3B9 F2A9C3C1 2 645 JBF R2/TSTR DIAL55 if not there then ignore 1C3BA 6004002C 0 IMM 646 LD R0 COMMA get a delimiter 1C3BB E437AC01 0 3 @ 647 ST R0 @OBPT(OBP) add to line 1C3BC 18C40002 3 IMM 648 ADD OBP 2 add some room 1C3BD 6001A8ED 0 649 LD R0 VALUE get length of name 1C3BE EC31AC02 0 @ 650 STZ @SBPT(R0) tack terminator on end 1C3BF 6005A830 0 IMM 651 LD R0 ADR(SBUFFW) point to name 1C3C0 DC41B87B 652 CALLNP MESSMOVE add to other things 653 * \ / 0001C3C1 654 DIAL55 LABEL 1C3C1 DC41B886 655 CALLNP OUTO print the line 656 * TCNONE 657 * \ / 1C3C2 5C01A8F8 658 CMZ PHONEFLAG phone number or port number? 1C3C3 FE03C3CA 659 JEQ DIAL60 jump if a port 1C3C4 DC01F89F 660 CALL IODIAL it's a phone, dial it! 1C3C5 4101A8F9 661 PAR PHONE pass the phone number 1C3C6 4141A8F5 662 PARV PHONERATE pass the rate 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 297 (RDUMAIN2) F 25 Dial Command 1C3C7 4141A8F4 663 PARV CALLCLASS pass the call class 1C3C8 4241A8F6 664 PARV2L PASSWORD and the password 1C3C9 FE0FC3CE 665 JMP DIAL65 then merge back in 666 * --- 667 0001C3CA 668 DIAL60 LABEL 1C3CA DC01F891 669 CALL IODONTDIAL don't dial to a port 1C3CB 4341A8F9 670 PARV2 PHONE actually the port number 1C3CC 4141A8F5 671 PARV PHONERATE and the rate 1C3CD 4241A8F6 672 PARV2L PASSWORD and the password 673 * \ / 0001C3CE 674 DIAL65 LABEL 1C3CE 61120000 4 0 REG 675 LD R4 R0 save return code 676 * TCNORM 1C3CF FB0DC3DF 4 677 JNEZ R4 DIAL70 jump if unable to link up 678 * \ / 1C3D0 6005CD40 0 IMM 679 LD R0 ADR(MESSITE) "Now dialed into remote sys" 1C3D1 DC41B875 680 CALLNP MESSMOVEZ and start a line 1C3D2 6001AA51 0 681 LD R0 SYSNUM get the site number 1C3D3 E401A8ED 0 682 ST R0 VALUE and set up to to output 1C3D4 DC41B62D 683 CALLNP DECOUT list site serial number out 1C3D5 DC41B886 684 CALLNP OUTO list the line 685 * \ / 1C3D6 DC41BD77 686 CALLNP FREELUNS give back the site unit 1C3D7 D141A97D 687 STMW CPUSLOT say devices are unknown 1C3D8 D141A97C 688 STMW MCUSLOT at least until we find them 1C3D9 D141A97E 689 STMW PPUSLOT clear them all out 1C3DA D141A97F 690 STMW SSUSLOT to protect the innocent 1C3DB D141A981 691 STMW THESSU clear system SSU, too 1C3DC D141A980 692 STMW PPUPORT finllay, clear the PPU port 1C3DD EC01A8DF 693 STZ MAPPED say we have no map of things 1C3DE FE0FBF85 694 JMP GOING then say we are going (I hope) 695 * --- 696 0001C3DF 697 DIAL70 LABEL (error in dial-up) 1C3DF 51040006 4 IMM 698 MIN R4 6 keep error code within reason 1C3E0 6029D3E2 0 4 699 LD R0 EACSTAB(R4) get pointer to proper message 1C3E1 FE0FC3F4 700 JMP DIAL99 then list it out 701 * --- 702 0001C3E2 703 DIAL80 LABEL 1C3E2 FA09C3EF 0 704 JLTZ R0 DIAL96 jump if really bad data 1C3E3 6005D002 0 IMM 705 LD R0 ADR(ERM145) "Site number not found" 1C3E4 FE0FC3F4 706 JMP DIAL99 707 * --- 708 0001C3E5 709 DIAL90 LABEL 1C3E5 6005CFD9 0 IMM 710 LD R0 ADR(ERM140) "Site serial number required" 1C3E6 FE0FC3F4 711 JMP DIAL99 712 * --- 713 0001C3E7 714 DIAL91 LABEL 1C3E7 6005CFE1 0 IMM 715 LD R0 ADR(ERM141) "Expecting site key(password)" 1C3E8 FE0FC3F4 716 JMP DIAL99 717 * --- 718 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 298 (RDUMAIN2) F 25 Dial Command 0001C3E9 719 DIAL92 LABEL 1C3E9 6005CFE7 0 IMM 720 LD R0 ADR(ERM142) "Expecting site phone number" 1C3EA FE0FC3F4 721 JMP DIAL99 722 * --- 723 0001C3EB 724 DIAL93 LABEL 1C3EB 6005CFEE 0 IMM 725 LD R0 ADR(ERM143) "Expecting baud rate specification" 1C3EC FE0FC3F4 726 JMP DIAL99 727 * --- 728 0001C3ED 729 DIAL95 LABEL 1C3ED 6005CFF7 0 IMM 730 LD R0 ADR(ERM144) "Could not access site file" 1C3EE FE0FC3F4 731 JMP DIAL99 732 * --- 733 0001C3EF 734 DIAL96 LABEL 1C3EF 6005D00D 0 IMM 735 LD R0 ADR(ERM146) "Site configuration file bad" 1C3F0 FE0FC3F4 736 JMP DIAL99 737 * --- 738 0001C3F1 739 DIAL98 LABEL 1C3F1 6005D01D 0 IMM 740 LD R0 ADR ERM148 "Expecting call class number" 1C3F2 FE0FC3F4 741 JMP DIAL99 742 * --- 743 0001C3F3 744 DIAL97 LABEL 1C3F3 6005D015 0 IMM 745 LD R0 ADR(ERM147) "Bad data in site file" 0001C3F4 746 DIAL99 LABEL 1C3F4 DC41B88A 747 CALLNP OUT report on the error 1C3F5 DC41CD0D 748 CALLNP CLOSEM close the session log 1C3F6 DC41BD77 749 CALLNP FREELUNS give back the site unit 1C3F7 FE0FBDC8 750 JMP RDUOK then go pick up another command 751 * --- 752 753 END of DIAL command 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 299 (RDUMAIN2) F 25 Print Command 756 757 ********************************************************************************** 758 * * 759 * This section process the PRINT command. It releases the * 760 * job to print the current session file, then sets up the * 761 * new session file. * 762 * * 763 ********************************************************************************** 764 765 BLOCK 766 ENTRY PRINT 767 0001C3F8 768 PRINT LABEL 1C3F8 D1C1A92E 769 SETT LOGFLAG set flag to print log 1C3F9 EC5F8001 6 STAK 770 STLEQ STAK SP,1 save present flag value 1C3FA DC41CCF0 771 CALLNP LOGPRINT Launch the batch 1C3FB DC41CD0D 772 CALLNP CLOSEM close the session log and batch LUNs 1C3FC DC41CB31 773 CALLNP INITLOGLUN Set up to do it again 1C3FD 601F8001 0 6 STAK 774 LD R0 STAK SP,1 get flag value back 1C3FE E401A92E 0 775 ST R0 LOGFLAG and restore to original condition 1C3FF FE0FBDC8 776 JMP RDUOK Go about your business 777 * --- 778 779 END of PRINT command 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 300 (RDUMAIN2) F 25 EXIT, EXITNP, EXITP Commands 782 783 ********************************************************************************** 784 * * 785 * This section processes the EXIT commands. The EXIT commands * 786 * disconnect the telephone, clear up status, terminate the RDU * 787 * session, and dump the user back into Control Mode. The four * 788 * different flavors of EXIT are for controlling whether the session * 789 * log should be printed. EXIT uses the LOGFLAG to determine * 790 * whether to print the session log. (The LOGFLAG is set upon our * 791 * original invocation.) EXITNP causes the session log not to be * 792 * printed, and EXITP causes the session log to be printed. * 793 * * 794 ********************************************************************************** 795 796 BLOCK EXIT and HANGUP commands and subroutines 797 ENTRY EXIT 798 ENTRY EXITP 799 ENTRY EXITNP 800 ENTRY HANGUP 801 ENTRY FAILPRINT 802 ENTRY HANGER 803 0001C400 804 EXIT LABEL 1C400 5C01A92E 805 CMZ LOGFLAG should we print the log? 1C401 FE03C40B 806 JEQ EXITNP if not then go elsewhere 807 * \ / 0001C402 808 EXITP LABEL 1C402 EDC1A92E 809 STW LOGFLAG make sure the log gets printed 1C403 DC41C40D 810 CALLNP FAILPRINT print failcount 1C404 DC41CCF0 811 CALLNP LOGPRINT print the log file 0001C405 812 EXITMERGE LABEL 1C405 DC41C429 813 CALLNP HANGER go take care of the job 1C406 DC41CD0D 814 CALLNP CLOSEM close the session log LUN 1C407 60040060 0 IMM 815 LD R0 FRUNEQUIP in case we equipped up a file 1C408 0881A919 816 FREQ AUXLUN(XREQ) we will now close it 1C409 60040071 0 IMM 817 LD R0 URSTOPZR get request to end 1C40A 09040000 IMM 818 UREQ 0+XREQ evening all 819 * --- 820 0001C40B 821 EXITNP LABEL 1C40B DC41C40D 822 CALLNP FAILPRINT print failcount 1C40C FE0FC405 823 JMP EXITMERGE get on out of here 824 * --- 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 301 (RDUMAIN2) F 25 EXIT, EXITNP, EXITP Commands 826 827 ********************************************************************************** 828 * * 829 * FAILPRINT checks to see if any transmission errors * 830 * occurred, and if so prints a message to the user and logfile. * 831 * The errors are divided into 2 classes: SYNCECOUNT indicates * 832 * outgoing errors (NAKs and response timeouts), and FAILCOUNT * 833 * indicates incoming (checksum) errors. * 834 * Eats R0:R3. * 835 * * 836 ********************************************************************************** 837 838 BLOCK 839 ENTRY FAILPRINT 840 841 BEGFRAME 842 ENDFRAME 843 1C40D DD5F8001 6 STAK 844 FAILPRINT ENTRNP PUSH 1C40E DC41B86F 845 CALLNP BLANKOUT clean up the output line (OBP=0) 1C40F 5C01F4AE 846 CMZ SYNECOUNT see if any synchronizations errors 1C410 FE03C418 847 JEQ CHEKFAIL if not then check failures 848 * \ / 849 1C411 6001F4AE 0 850 LD R0 SYNECOUNT get the number of errors 1C412 E401A8ED 0 851 ST R0 VALUE place it for call 1C413 DC41B62D 852 CALLNP DECOUT put into the output line 1C414 6005CD5A 0 IMM 853 LD R0 ADR SYNCMESS " NAKs or timeouts occurred." 1C415 DC41B87B 854 CALLNP MESSMOVE add to our message 1C416 18C40002 3 IMM 855 ADD OBP 2 leave some space between messages 1C417 EC01F4AE 856 STZ SYNECOUNT reset the number of errors 857 * \ / 858 0001C418 859 CHEKFAIL LABEL 1C418 6001F4AD 0 860 LD R0 FAILCOUNT get the number of failures 1C419 FA03C41F 0 861 JEQZ R0 FAILDONE if none, leave 1C41A E401A8ED 0 862 ST R0 VALUE put in an obvious location 1C41B DC41B62D 863 CALLNP DECOUT put in the output buffer 1C41C 6005CD62 0 IMM 864 LD R0 ADR FAILMESS " checksum errors occurred." 1C41D DC41B87B 865 CALLNP MESSMOVE add it to the output buffer 1C41E EC01F4AD 866 STZ FAILCOUNT reset count of checksum failures 867 * \ / 868 0001C41F 869 FAILDONE LABEL 1C41F FAC3C421 3 870 JEQZ OBP FAILEXIT did we have any errors 1C420 DC41B886 871 CALLNP OUTO ship out the error messages 872 * \ / 0001C421 873 FAILEXIT LABEL 1C421 5D1F8001 6 STAK 874 LEAVE POP 875 * --- 876 877 END of FAILPRINT subroutine 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 302 (RDUMAIN2) F 25 Hangup Command 880 881 ********************************************************************************** 882 * * 883 * This is the HANGUP section. It handles dropping the remote * 884 * link and indicating that we are no longer dialed in. Since * 885 * it can be done by command as well as implicitly within other * 886 * commands, the work is done by a subroutine, HANGER. * 887 * * 888 ********************************************************************************** 889 0001C422 890 HANGUP LABEL 1C422 DC41C40D 891 CALLNP FAILPRINT print number of transmission errors 1C423 5C01A92E 892 CMZ LOGFLAG should we print the log 1C424 FE03C426 893 JEQ HANGUPNP if not then dont't print it 1C425 DC41CCF0 894 CALLNP LOGPRINT print the session log 895 * \ / 0001C426 896 HANGUPNP LABEL 1C426 DC41CD0D 897 CALLNP CLOSEM close the session log LUN 1C427 DC41C429 898 CALLNP HANGER so hang the phone up!! 1C428 FE0FBDC8 899 JMP RDUOK then get new command 900 * --- 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 303 (RDUMAIN2) F 25 Hangup Command 902 903 ********************************************************************************** 904 * * 905 * HANGER removes breakpoints from the remote machine, then * 906 * terminates the link. * 907 * Call: * 908 * CALLNP HANGER * 909 * * 910 ********************************************************************************** 911 912 BLOCK 913 ENTRY HANGER 914 915 BEGFRAME 916 ENDFRAME 917 1C429 DD5F8001 6 STAK 918 HANGER ENTRNP PUSH 1C42A 5C01A8D6 919 CMZ STATE were we dialed in? 1C42B FE09C435 920 JLT HANG10 if not then nothing to drop 1C42C DC41CAF6 921 CALLNP EXITBPI make sure breakpoints are out 1C42D DC01F802 922 CALL IOTERM terminate remote link 1C42E 4045C42F IMM 923 PARVL ADR(HANG05) if error, then so what? 0001C42F 924 HANG05 LABEL 1C42F 6007FFFF 0 IMM 925 LD R0 STATENDIAL state code indicating not dialed 1C430 E401A8D6 0 926 ST R0 STATE say we are no longer dialed 927 * \ / 1C431 60040140 0 IMM 928 LD R0 URDELAY delay to allow the modem to clear 1C432 60440002 1 IMM 929 LD R1 2 allow 2 seconds 1C433 60840000 2 IMM 930 LD R2 0 delay terminators (none) 1C434 09040000 IMM 931 UREQ 0 and do the delay 932 * \ / 0001C435 933 HANG10 LABEL 1C435 5D1F8001 6 STAK 934 LEAVE POP 935 * --- 936 937 END of HANGER 938 939 END of EXIT and HANGUP commands and subroutines 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 304 (RDUMAIN2) F 25 Concurrent Process Start-up 942 943 ********************************************************************************** 944 * * 945 * This section handles the RUN command. It is used to fire up * 946 * a concurrent diagnostic process. The concurrent process can * 947 * send 'commands' to the RDU via path links. The RDU then processes * 948 * the requests by printing lines on the terminal or sending commands * 949 * to the remote system. Responses are sent back to the concurrent * 950 * process. Most of the work is done in set-up routines or by the * 951 * READLINE routine which does all the I/O. We start by sending the * 952 * table of selected slots and the remainder of the command line as * 953 * parameters to the process (remainder may be empty). * 954 * * 955 ********************************************************************************** 956 957 BLOCK Concurrent process commands 958 ENTRY RUN 959 ENTRY LOCAL 960 ENTRY PATH 961 ENTRY DROP 962 0001C436 963 RUN LABEL 1C436 5C01A8D7 964 CMZ CPSTATE is there already a concurrent process? 1C437 FE0DC45C 965 JNE CONCALRDY if so then can not do another 1C438 5C01A8DA 966 CMZ DOFLAG is there a do file running? 1C439 FE0DC45A 967 JNE CONCURERR if so then we have an error 968 * \ / 969 1C43A DC41B346 970 CALLNP FETCHITMF get file name 1C43B DC41BCFC 971 CALLNP PROCMAKE set-up concurrent process 1C43C EDC1A8D7 972 STW CPSTATE say we have diagnostic routine 973 974 * send SLOTS 1C43D 60040040 0 IMM 975 LD R0 FRWRITE request for output 1C43E 6044001C 1 IMM 976 LD R1 SLOTSLEN length 1C43F 6085A97B 2 IMM 977 LD R2 ADR(SLOTS) address 1C440 0881A91C 978 FREQ PATHS(1+XREQ) give SLOTS to conc process 979 980 * send remainder of command line 1C441 6001A8E5 0 981 LD R0 BUFPT current position 1C442 6044005F 1 IMM 982 LD R1 OKLEN-1 buffer is only this long 1C443 6081A8E7 2 983 LD R2 TERMCHAR char that stopped read 1C444 DA188800 0 21 984 SRCH R0 R2 R1 find address of terminator 1C445 3044005F 1 IMM 985 RSB R1 OKLEN-1 length remaining in command line 986 1C446 60040040 0 IMM 987 LD R0 FRWRITE request for output 1C447 6081A8E5 2 988 LD R2 BUFPT current position 1C448 0881A91C 989 FREQ PATHS(1+XREQ) give params to conc process 1C449 FE0FBDC8 990 JMP RDUOK and carry on - simple!! 991 * --- 992 993 ********************************************************************************** 994 * * 995 * The LOCAL command is handled here. It is similar to the RUN * 996 * command but does not communicate with the remote machine. The * 997 * RDU just keeps the remote link alive (if it exists). This mode * 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 305 (RDUMAIN2) F 25 Concurrent Process Start-up 998 * allows people to call up their favorite program from within the * 999 * RDU and the RDU will pass I/O back and forth between program * 1000 * and terminal user. (Sneak in a game or two of Klondike!!) * 1001 * * 1002 ********************************************************************************** 1003 0001C44A 1004 LOCAL LABEL 1C44A 5C01A8D7 1005 CMZ CPSTATE is there already a concurrent process? 1C44B FE0DC45C 1006 JNE CONCALRDY if so then can not do another 1C44C 5C01A8DA 1007 CMZ DOFLAG is there a do file running? 1C44D FE0DC45A 1008 JNE CONCURERR if so then we have an error 1009 * \ / 1010 1C44E DC41BCFC 1011 CALLNP PROCMAKE fire up concurrent process 1C44F D141A8D7 1012 STMW CPSTATE say we are in Local mode 1013 TCPROC 1C450 6004011B 0 IMM 1013 LD R0 FRTSETTCS set terminating characters 1C451 6045AC75 1 IMM 1013 LD R1 ADR(TCTABP) just CR and CNTL-A 1C452 088400C9 IMM 1013 FREQ LUNAIN+XREQ make the switch 1C453 DC41B3B6 1014 CALLNP READLINE go do all the I/O 1C454 EC01A8D7 1015 STZ CPSTATE switch back to 'normal' 1016 TCNORM 1C455 6004011B 0 IMM 1016 LD R0 FRTSETTCS set terminating characters 1C456 6045AC5D 1 IMM 1016 LD R1 ADR(TCTABN) normal table 1C457 E441A8EA 1 1016 ST R1 TCGROUP remember the group we used 1C458 088400C9 IMM 1016 FREQ LUNAIN+XREQ for command level inputs 1C459 FE0FBDC8 1017 JMP RDUOK then we are finished 1018 * --- 1019 0001C45A 1020 CONCURERR LABEL 1C45A 6005D2ED 0 IMM 1021 LD R0 ADR ERM516 "Cannot run a DO file and concurrent... 1C45B FE0FBE35 1022 JMP RDUERR 1023 * --- 1024 0001C45C 1025 CONCALRDY LABEL 1C45C 6005D2FA 0 IMM 1026 LD R0 ADR ERM517 "Cannot run more than one concurrent... 1C45D FE0FBE35 1027 JMP RDUERR 1028 * --- 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 306 (RDUMAIN2) F 25 Concurrent Process Start-up 1030 1031 ********************************************************************************** 1032 * * 1033 * This section handles the PATH command. It allows the operator * 1034 * to designate his terminal as a port to communicate with a * 1035 * previously-initiated concurrent diagnostic process. Once the * 1036 * operator has selected this, this condition remains in effect * 1037 * until he enters a Control-A or until catastrophic errors occur. * 1038 * * 1039 ********************************************************************************** 1040 0001C45E 1041 PATH LABEL 1C45E 5C01A8D7 1042 CMZ CPSTATE is there a concurrent proc? 1C45F FE0BC46C 1043 JLE PATH90 error if none exists 1044 * \ / 1045 1C460 60040002 0 IMM 1046 LD R0 2 ready to switch modes 1C461 E401A8D7 0 1047 ST R0 CPSTATE say operator talking to c.p. 1048 TCPROC 1C462 6004011B 0 IMM 1048 LD R0 FRTSETTCS set terminating characters 1C463 6045AC75 1 IMM 1048 LD R1 ADR(TCTABP) just CR and CNTL-A 1C464 088400C9 IMM 1048 FREQ LUNAIN+XREQ make the switch 1C465 DC41B3B6 1049 CALLNP READLINE go allow talking 1C466 EDC1A8D7 1050 STW CPSTATE switch back to remote 1051 TCNORM 1C467 6004011B 0 IMM 1051 LD R0 FRTSETTCS set terminating characters 1C468 6045AC5D 1 IMM 1051 LD R1 ADR(TCTABN) normal table 1C469 E441A8EA 1 1051 ST R1 TCGROUP remember the group we used 1C46A 088400C9 IMM 1051 FREQ LUNAIN+XREQ for command level inputs 1C46B FE0FBDC8 1052 JMP RDUOK then back to more normal 1053 * --- 1054 0001C46C 1055 PATH90 LABEL 1C46C 6005D2BB 0 IMM 1056 LD R0 ADR(ERM510) "No concurrent process" 1C46D FE0FBE35 1057 JMP RDUERR 1058 * --- 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 307 (RDUMAIN2) F 25 Concurrent Process Start-up 1060 1061 ********************************************************************************** 1062 * * 1063 * This section handles the DROP command. It simply zaps the * 1064 * concurrent diagnostic process. Simple... * 1065 * * 1066 ********************************************************************************** 1067 0001C46E 1068 DROP LABEL 1C46E 5C01A8D7 1069 CMZ CPSTATE is there a diagnostic process? 1C46F FE03C473 1070 JEQ DROP90 if not then what can we do? 1C470 DC41BD20 1071 CALLNP PATHCLOSE drop the path links 1C471 EC01A8D7 1072 STZ CPSTATE say we are normal again 1C472 FE0FBDC8 1073 JMP RDUOK then go get another command 1074 * --- 1075 0001C473 1076 DROP90 LABEL 1C473 6005D2BB 0 IMM 1077 LD R0 ADR(ERM510) "No concurrent process" 1C474 FE0FBE35 1078 JMP RDUERR 1079 * --- 1080 1081 END of concurrent process commands 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 308 (RDUMAIN2) F 25 Symbols Command 1084 1085 ********************************************************************************** 1086 * * 1087 * This section processes the SYMBOLS command. It is used to turn * 1088 * on or off the substitution of symbols in instruction and address * 1089 * display. A SYMS,OFF command will cause the RDU to display * 1090 * only the predefined symbols(R0-R7, PC, etc.). Turning the flag * 1091 * on again will cause full-blown substitution of user-defined * 1092 * symbols wherever possible. * 1093 * * 1094 * This command also allows the user to specify the source of the * 1095 * symbol information. If the parameter is not an ON/OFF, then it * 1096 * is assumed to be the name of the a code file from which the symbol * 1097 * information is then picked up. * 1098 * * 1099 ********************************************************************************** 1100 1101 BLOCK 1102 ENTRY SYMBOLS 1103 0001C475 1104 SYMBOLS LABEL 1C475 DC41B45D 1105 CALLNP ONOFFGET get the input from user 1C476 FA0DC479 0 1106 JNEZ R0 SYMBOL10 jump if not simple on or off 1C477 E441A92A 1 1107 ST R1 SYMSFLAG set the flag to the result 1C478 FE0FBDC8 1108 JMP RDUOK then head back for more 1109 * --- 1110 0001C479 1111 SYMBOL10 LABEL 1C479 5C01A919 1112 CMZ AUXLUN is a file equipped ?? 1C47A FE03C47F 1113 JEQ SYMBOL20 jump if none 1114 * \ / 1C47B 5C01A91A 1115 CMZ EQUIPTYPE linked by us or by user 1C47C FE0BC47F 1116 JLE SYMBOL20 jump if by user 1117 * \ / 1C47D 60040060 0 IMM 1118 LD R0 FRUNEQUIP it was linked by us and now 1C47E 0881A919 1119 FREQ AUXLUN(XREQ) we are finished with it 0001C47F 1120 SYMBOL20 LABEL 1C47F 6001A8E6 0 1121 LD R0 LBUFPT get buffer pointer 1C480 E401A8E5 0 1122 ST R0 BUFPT reset for another look 1C481 6001AC13 0 1123 LD R0 EXTCODE assume another code file 1C482 DC41BD4A 1124 CALLNP FILEGET go try for another file 1C483 FA0DBE35 0 1125 JNEZ R0 RDUERR complain if nothing doing 1C484 E441A919 1 1126 ST R1 AUXLUN set the lun to use 1C485 E481A91A 2 1127 ST R2 EQUIPTYPE save the equip type 1C486 DC41B909 1128 CALLNP SETUP go input symbol info 1C487 EDC1A92A 1129 STW SYMSFLAG say we want symbols listed 1C488 FE0FBDC8 1130 JMP RDUOK then go talk to dear user 1131 * --- 1132 1133 END of symbols command 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 309 (RDUMAIN2) F 25 TRACE command 1136 1137 ********************************************************************************** 1138 * * 1139 * This command is used to turn on or off the tracing of * 1140 * the communications section of the RDU. We expect an ON or * 1141 * OFF on the command line, or if nothing is there assume on. * 1142 * * 1143 ********************************************************************************** 1144 1145 BLOCK 1146 ENTRY TRACECOM 1147 0001C489 1148 TRACECOM LABEL 1C489 DC41B33C 1149 CALLNP FETCHAP pick up whatever is on the input line 1C48A 60C1C492 3 1150 LD R3 TRACECALL get the call to TRACE 1C48B F6BFC490 2 1151 JBT R2/TEOL TRACEON no parm means turn it on 1C48C DC41B45D 1152 CALLNP ONOFFGET see if it is an on or off 1C48D FA0DBE35 0 1153 JNEZ R0 RDUERR if it was a shitty symbol 1C48E FA4DC490 1 1154 JNEZ R1 TRACEON jump if turning on the TRACE 1C48F 60C3FD80 3 IMM 1155 LD R3 NOPINST get a NOP instruction 0001C490 1156 TRACEON LABEL 1C490 E4C1F696 3 1157 ST R3 TRACEINST store in the TRACE instruction location 1C491 FE0FBDC8 1158 JMP RDUOK all done 1159 * --- 1160 1C492 DC41F6B7 1161 TRACECALL CALLNP TRACE 1162 1163 END of TRACE command 149 150 INPUT RDUSCAN 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 310 (RDUSCAN) F 26 Memory Fill and Scan Commands 3 4 ********************************************************************************** 5 * * 6 * This section handles the FILL,SCAN, NSCAN, and abnormal * 7 * data scan commands for the MCU and CPU. They take a number of * 8 * parameters and may generate vast amounts of display. * 9 * Since scans tend to be rather long we break them up into * 10 * approximately 20 second chunks and enable break processing so * 11 * that the person running this does not get stuck here longer than * 12 * necessary. A break will get the user out whenever a chunk has * 13 * ended or a match of some type has been found and displayed. * 14 * * 15 * The first thing done here is to pick up the beginning * 16 * and ending address for the scan. We then go to separate * 17 * handlers for the different commands to pick up the various * 18 * parameters they require and set the words per second and * 19 * chunksize parameters on the stack. Once things are all * 20 * set we merge together to do the actual work. * 21 * * 22 ********************************************************************************** 23 24 BLOCK memory scan processor 25 ENTRY MCPROC 26 ENTRY MCPFILL 27 ENTRY MCPNSCAN 28 ENTRY MCPSCAN 29 30 BEGFRAME2 00178800 6 BASE 31 WRDSPERSEC BSS 1 00178801 6 BASE 32 STOPADDRESS BSS 1 absolute last address to stop at 00178802 6 BASE 33 CHUNKSIZE BSS 1 size of chunk in words that can 34 * be scanned or filled at once 35 ENDFRAME 36 0001C493 37 MCPROC LABEL 1C493 EC1F8003 6 STAK 38 STZ PUSH make some stack space 1C494 DC41C517 39 CALLNP GETRANGE get the address range 1C495 FE0FC50B 40 JMP MCP90 error return indicates bad params 1C496 FA09C515 0 41 JLTZ R0 MCP95 jump if bad range 1C497 E4578801 1 6 BASE 42 ST R1 SP,STOPADDRESS save the stopping address 43 * ADDRESS = starting address, ENDADDRESS = ending address, 44 * R0 = number of words to scan/fill 1C498 5C974805 5 BASE 45 LDPC COM,COMEX2 now process specific command 46 * --- 47 48 ********************************************************************************** 49 * * 50 * The FILL command is handled here. We already have the * 51 * address range to fill, so we just get the value to fill, set * 52 * our constants on the stack and merge in with the scan. * 53 * * 54 ********************************************************************************** 55 0001C499 56 MCPFILL LABEL 1C499 6001ACA2 0 57 LD R0 MAXFILL maximum words to scan in a chunk 1C49A E4178802 0 6 BASE 58 ST R0 SP,CHUNKSIZE 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 311 (RDUSCAN) F 26 Memory Fill and Scan Commands 1C49B 60042400 0 IMM 59 LD R0 FILLPPS*WPP words per second that can be filled 1C49C E4178800 0 6 BASE 60 ST R0 SP,WRDSPERSEC put on the stack 61 1C49D DC41B33F 62 CALLNP FETCHNP get value to fill with 1C49E F2ADC50D 2 63 JBF R2/TNUM MCP91 must have it 1C49F DC01BBE0 64 CALL SHIPDATA move it out on the line 1C4A0 4101BBF5 65 PAR RESPERROR error address 1C4A1 41440000 IMM 66 PARV ACC0 acc0 1C4A2 4041A830 67 PARVL SBUFFW data to fill with 1C4A3 61C40007 7 IMM 68 LD R7 BCMFILL indicate a fill command 1C4A4 FE0FC4CC 69 JMP MCPSTART and start the fill 70 * --- 71 72 ********************************************************************************** 73 * * 74 * The NSCAN command is dealt with here. We pick up * 75 * the value we are scanning for, and a possible mask for * 76 * that value. If no scan value is given we assume zero. * 77 * * 78 ********************************************************************************** 79 0001C4A5 80 MCPNSCAN LABEL 1C4A5 6001ACA1 0 81 LD R0 MAXSCAN maximum words to scan in a chunk 1C4A6 E4178802 0 6 BASE 82 ST R0 SP,CHUNKSIZE 1C4A7 60040C00 0 IMM 83 LD R0 SCANPPS*WPP approx. 1/3 second/page 1C4A8 E4178800 0 6 BASE 84 ST R0 SP,WRDSPERSEC set time factor for scan 1C4A9 DC41B33F 85 CALLNP FETCHNP get data to look for 1C4AA F6ADC4AD 2 86 JBT R2/TNUM NSCANVAL jump if it was there 1C4AB F2BFC511 2 87 JBF R2/TEOL MCP93 error if something else 1C4AC EC01A830 88 STZ SBUFFW scan for first non-zero word 89 * \ / 90 0001C4AD 91 NSCANVAL LABEL 1C4AD DC01BBE0 92 CALL SHIPDATA ship out value to look for 1C4AE 4101BBF5 93 PAR RESPERROR error address 1C4AF 41440000 IMM 94 PARV ACC0 acc0 1C4B0 4041A830 95 PARVL SBUFFW value 1C4B1 DC41B33F 96 CALLNP FETCHNP now get the next thing 1C4B2 61C4000A 7 IMM 97 LD R7 BCMNSCANM code for nscanm 1C4B3 F6ADC4C8 2 98 JBT R2/TNUM SCANMASK jump if more data, must be mask 1C4B4 F2BFC513 2 99 JBF R2/TEOL MCP94 error if something else is left 1C4B5 61C40009 7 IMM 100 LD R7 BCMNSCAN code for nscan 1C4B6 FE0FC4CE 101 JMP MCPSTART1 then merge back in 102 * --- 103 104 ********************************************************************************** 105 * * 106 * The SCAN command is handled here. We check for a value * 107 * to scan for and a possible mask. If no scan value is given * 108 * we scan for abnormal data. * 109 * * 110 ********************************************************************************** 111 0001C4B7 112 MCPSCAN LABEL 1C4B7 6001ACA1 0 113 LD R0 MAXSCAN maximum words to scan in a chunk 1C4B8 E4178802 0 6 BASE 114 ST R0 SP,CHUNKSIZE 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 312 (RDUSCAN) F 26 Memory Fill and Scan Commands 1C4B9 60040C00 0 IMM 115 LD R0 SCANPPS*WPP approx. 1/3 second/page 1C4BA E4178800 0 6 BASE 116 ST R0 SP,WRDSPERSEC set time factor for scan 1C4BB DC41B33F 117 CALLNP FETCHNP get data to look for 1C4BC 61C40004 7 IMM 118 LD R7 BCMABSCAN bcm code for abscan 1C4BD F6BFC4CE 2 119 JBT R2/TEOL MCPSTART1 no data to scan for 1C4BE F2ADC511 2 120 JBF R2/TNUM MCP93 error if something else 121 * \ / 122 1C4BF DC01BBE0 123 CALL SHIPDATA ship out value to look for 1C4C0 4101BBF5 124 PAR RESPERROR error address 1C4C1 41440000 IMM 125 PARV ACC0 acc0 1C4C2 4041A830 126 PARVL SBUFFW value 1C4C3 DC41B33F 127 CALLNP FETCHNP now get the next thing 1C4C4 61C40005 7 IMM 128 LD R7 BCMSCAN code for scan 1C4C5 F6BFC4CE 2 129 JBT R2/TEOL MCPSTART1 no mask for the data scan 1C4C6 F2ADC513 2 130 JBF R2/TNUM MCP94 data mask must be a number 131 * \ / 132 1C4C7 61C40006 7 IMM 133 LD R7 BCMSCANM masked scan code 0001C4C8 134 SCANMASK LABEL 1C4C8 DC01BBE0 135 CALL SHIPDATA ship out mask 1C4C9 4101BBF5 136 PAR RESPERROR error address 1C4CA 41440001 IMM 137 PARV ACC1 acc1 1C4CB 4041A830 138 PARVL SBUFFW value to mask with 139 * \ / 140 0001C4CC 141 MCPSTART LABEL 1C4CC DC41B33F 142 CALLNP FETCHNP now check for excess input 1C4CD F2BFC50F 2 143 JBF R2/TEOL MCP92 jump if too much 144 * \ / 145 146 * R7 = BCM for type of scan or fill, WRDSPERSEC is set, 147 * CHUNKSIZE = # words per chunk. 0001C4CE 148 MCPSTART1 LABEL 1C4CE E5C1A921 7 149 ST R7 REALADDR use this to save scan type 1C4CF DC41F7C5 150 CALLNP SIMWBRKS enable break processing 151 * \ / 152 0001C4D0 153 NEXTCHUNK LABEL 1C4D0 60178801 0 6 BASE 154 LD R0 SP,STOPADDRESS get the last address 1C4D1 1001A91F 0 155 SUB R0 ADDRESS determine the number of words 1C4D2 50178802 0 6 BASE 156 MIN R0 SP,CHUNKSIZE do not exceed the maximum 1C4D3 60520000 1 0 REG 157 LD R1 R0 mangle the value in this register 1C4D4 1841A91F 1 158 ADD R1 ADDRESS determine our stopping address for 159 * this chunk 1C4D5 E441A920 1 160 ST R1 ENDADDRESS and save 1C4D6 14178800 0 6 BASE 161 DIV R0 SP,WRDSPERSEC turn into a time limit 1C4D7 E401A913 0 162 ST R0 WAITTIME and save for the shipper 163 1C4D8 DC01BBE0 164 CALL SHIPDATA ship out the stop address 1C4D9 4101BBF5 165 PAR RESPERROR error address 1C4DA 41440002 IMM 166 PARV ACC2 into ACC2 1C4DB 4041A920 167 PARVL ENDADDRESS 168 * \ / 169 0001C4DC 170 MCPSMORE LABEL 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 313 (RDUSCAN) F 26 Memory Fill and Scan Commands 1C4DC D181A8E0 171 CLRT UBREAK did a break happen? 1C4DD FE0DC500 172 JNE SCANBREAK if so get out of here 1C4DE 60894634 2 5 ZBM 173 LD R2 COM,GCNSLOT get the slot code 1C4DF DC01BB9D 174 CALL SHIPCOMT issue scan command 1C4E0 4101BBF5 175 PAR RESPERROR error address 1C4E1 41494034 5 ZBM 176 PARV COM,GCNCLS class=2 1C4E2 4165A97B 2 177 PARV SLOTS(R2) slot 1C4E3 4141A921 178 PARV REALADDR bcm=type of scan 1C4E4 4141A91F 179 PARV ADDRESS start address for scan 1C4E5 4041A913 180 PARVL WAITTIME amount of patience 1C4E6 6201F38D 01 181 LD2 R0 DATA get response 1C4E7 F615C4FB 0 182 JBT R0/XRACK DONECHUNK if an ACK then all done with this chunk 183 * \ / 184 1C4E8 E441A91F 1 185 ST R1 ADDRESS save address we hit 1C4E9 E441A8ED 1 186 ST R1 VALUE now to print it out 1C4EA DC41B86C 187 CALLNP BLANKOUTW clear output buffer 1C4EB 60894C43 2 5 ZBM 188 LD R2 COM,COMADDR get size of address 1C4EC 60A5AC91 2 2 189 LD R2 ADDRDIGS(R2) pick up number of digits 1C4ED DC41B5FB 190 CALLNP HEXOUTN and display address 1C4EE 6004003A 0 IMM 191 LD R0 COLON get a colon 1C4EF 65C40004 7 IMM 192 CPR R7 BCMABSCAN was this an abnormal data scan? 1C4F0 FE0DC4F2 193 JNE HAVESEP if not then all set 1C4F1 6004003F 0 IMM 194 LD R0 QUESTION else change marker character 195 * \ / 196 0001C4F2 197 HAVESEP LABEL 1C4F2 E437AC01 0 3 @ 198 ST R0 @OBPT(OBP) and add that 1C4F3 18C40002 3 IMM 199 ADD OBP 2 bump pointer 1C4F4 6001F390 0 200 LD R0 DATA(3) get data word 1C4F5 E401A8ED 0 201 ST R0 VALUE stuff it in right place 1C4F6 DC41B5F1 202 CALLNP HEXOUT then list it out 1C4F7 DC41B886 203 CALLNP OUTO list out the line 1C4F8 BC01A91F 0 204 INCL R0 ADDRESS advance address and pick up new 1C4F9 6401A920 0 205 CPR R0 ENDADDRESS did this complete the scan? 1C4FA FE0BC4DC 206 JLE MCPSMORE jump if not, go continue scan 207 * \ / 208 0001C4FB 209 DONECHUNK LABEL 1C4FB BC01A920 0 210 INCL R0 ENDADDRESS get our last address 1C4FC 64178801 0 6 BASE 211 CPR R0 SP,STOPADDRESS see if we are all done 1C4FD FE05C509 212 JGT SCANDONE if so then quit 213 * \ / 214 1C4FE E401A91F 0 215 ST R0 ADDRESS set the new starting address 1C4FF FE0FC4D0 216 JMP NEXTCHUNK do the next chunk 217 * --- 218 219 * The user wants out of this scan. Tell him where we are at 220 * and that his request is being honored. 0001C500 221 SCANBREAK LABEL 1C500 6005D1A8 0 IMM 222 LD R0 ADR ERM310 "Aborting Scan/Fill. Last address = " 1C501 DC41B875 223 CALLNP MESSMOVEZ move into the output buffer 1C502 6001A91F 0 224 LD R0 ADDRESS get the next address 1C503 10040001 0 IMM 225 SUB R0 1 point to the last address 1C504 E401A8ED 0 226 ST R0 VALUE put here for HEXOUT 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 314 (RDUSCAN) F 26 Memory Fill and Scan Commands 1C505 60894C43 2 5 ZBM 227 LD R2 COM,COMADDR get the address class 1C506 60A5AC91 2 2 228 LD R2 ADDRDIGS(R2) determine the number of digits 1C507 DC41B5FB 229 CALLNP HEXOUTN put this on the end of our message 1C508 DC41B886 230 CALLNP OUTO tell the user 231 * \ / 232 233 * We must enable breaks before continuing. 0001C509 234 SCANDONE LABEL 1C509 DC41F7CA 235 CALLNP SIMNOBRKS disable break processing 1C50A FE0FBDC8 236 JMP RDUOK 237 * --- 238 0001C50B 239 MCP90 LABEL 1C50B 6005CFB7 0 IMM 240 LD R0 ADR(ERM130) "Expecting address range" 1C50C FE0FBE35 241 JMP RDUERR 242 * --- 243 0001C50D 244 MCP91 LABEL 1C50D 6005CFC0 0 IMM 245 LD R0 ADR(ERM131) "Expecting data for fill" 1C50E FE0FBE35 246 JMP RDUERR 247 * --- 248 0001C50F 249 MCP92 LABEL 1C50F 6005CF3F 0 IMM 250 LD R0 ADR(ERM111) "Too many parameters" 1C510 FE0FBE35 251 JMP RDUERR 252 * --- 253 0001C511 254 MCP93 LABEL 1C511 6005CFC6 0 IMM 255 LD R0 ADR(ERM132) "Expecting data for scan" 1C512 FE0FBE35 256 JMP RDUERR 257 * --- 258 0001C513 259 MCP94 LABEL 1C513 6005CFCC 0 IMM 260 LD R0 ADR(ERM133) "Expecting mask for scan" 1C514 FE0FBE35 261 JMP RDUERR 262 * --- 263 0001C515 264 MCP95 LABEL 1C515 6005CFD2 0 IMM 265 LD R0 ADR(ERM134) "Bad address range" 1C516 FE0FBE35 266 JMP RDUERR 267 * --- 268 269 END of memory scan processor 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 315 (RDUSCAN) F 26 Memory Fill and Scan Commands 271 272 ********************************************************************************** 273 * * 274 * GETRANGE will scan the input line for a starting and * 275 * ending address. The first and second address may or may * 276 * not be separated by a colon. The first address found is * 277 * stored in ADDRESS and the second is returned in R1. R0 * 278 * contains the number of words in this range. * 279 * Call: * 280 * CALLNP GETRANGE * 281 * JMP error in input line * 282 * R0 = number of words in range * 283 * R1 = last address * 284 * ADDRESS = first address * 285 * Eats R0:R2. * 286 * * 287 ********************************************************************************** 288 289 BLOCK 290 ENTRY GETRANGE 291 292 BEGFRAME 293 ENDFRAME 294 1C517 DD5F8001 6 STAK 295 GETRANGE ENTRNP PUSH 1C518 DC41B33F 296 CALLNP FETCHNP get start address 1C519 F2ADC523 2 297 JBF R2/TNUM GETRNGERR error if not a number 1C51A E401A91F 0 298 ST R0 ADDRESS set start address for command 299 1C51B 6444003A 1 IMM 300 CPR R1 COLON is terminator a colon? 1C51C FE0DC51E 301 JNE PASTCOLON jump if something else 1C51D DC41B3A9 302 CALLNP GETCHARX skip past the colon 303 * \ / 304 0001C51E 305 PASTCOLON LABEL 1C51E DC41B33F 306 CALLNP FETCHNP now get ending address 1C51F F2ADC523 2 307 JBF R2/TNUM GETRNGERR error if not there just right 1C520 60520000 1 0 REG 308 LD R1 R0 1C521 1001A91F 0 309 SUB R0 ADDRESS determine length of scan/fill 1C522 19C40001 7 IMM 310 ADD R7 1 indicate a good return 311 * \ / 312 0001C523 313 GETRNGERR LABEL 1C523 5D1F8001 6 STAK 314 LEAVE POP 315 * --- 316 317 END of GETRANGE subroutine 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 316 (RDUSCAN) F 26 SMU Error Log Commands 320 321 BLOCK SMU error log commands 322 ENTRY SMUERROR 323 ENTRY SMUERRFILE 324 ENTRY ERRORFILE 325 ENTRY CLRERRFILE 326 ENTRY ERRORLOG 327 ENTRY CLEARERR 328 329 ********************************************************************************** 330 * * 331 * SMU command codes. These command codes are used * 332 * for manipulation of the SMU error logs. * 333 * The SMU is limited in the number of pseudo-commands * 334 * it can process so requires that they come in no faster * 335 * than one command every 20 ms. If the SMU receives a * 336 * pseudo-command while it is processing a previous one the * 337 * first pseudo-command will be lost. * 338 * * 339 ********************************************************************************** 340 341 * EQU BITS 0:3 bits containing SMU command code 342 * These are the standard bus read and write command formats 343 * EQU 0 write 344 * EQU 1 illegal 345 * EQU 2 read 346 00000C10 BYTE 347 SMUPCMND EQU BIT 6 indicates this is a pseudo-command 00001840 BYTE 348 SMUPCC EQU BITS 12:15 psuedo-command code 349 350 * Write pseudo-command pseudo-command codes 351 * EQU 0 unused 00000001 ABS 352 SMUCLEARALL EQU 1 clear error log and error log buffer 00000002 ABS 353 SMUCLEAR EQU 2 clear individual error entry 354 355 * Read pseudo-command pseudo-command codes 00000000 ABS 356 SMURANDERR EQU 0 read random error log entry 00000001 ABS 357 SMUSEQERR EQU 1 read sequential error log entry 00000002 ABS 358 SMUPCRCEL EQU 2 read current errror log status 359 000028C0 BYTE 360 SMUADR EQU BITS 20:31 address field 00002A30 BYTE 361 SMUADRRANK EQU BITS 21:23 rank field 00000008 ABS 362 MAXRANK EQU 8 maximum number of ranks on a SMU 00003080 BYTE 363 SMUADRCHIP EQU BITS 24:31 IC field (chip number within rank) 00000027 ABS 364 MAXCHIPNUM EQU 39 number of chips in each rank 365 366 * Format of the error status word 367 * EQU BIT 0 indicates new error information 00000270 BYTE 368 SMUSYNDROME EQU BITS 1:7 correction check bits 00001220 BYTE 369 SMUERRTYPE EQU BITS 9:10 error type 370 * EQU 0 soft error 371 * EQU 1 hard error 372 * EQU 2 uncorrectable error 00001630 BYTE 373 SMURANK EQU BITS 11:13 rank address 00001D20 BYTE 374 SMURASCAS EQU BITS 14:31 Ras/Cas 375 * EQU BITS 14:15 upper address bits for Ras & Cas 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 317 (RDUSCAN) F 26 SMU Error Log Commands 376 * EQU BITS 16:23 Ras address 377 * EQU BITS 24:31 Cas address 378 379 * Format of the error file entries: 380 * EQU BITS 0:12 unused 00001AB0 BYTE 381 SEQRESPADR EQU BITS 13:23 address 382 * EQU BITS 24:25 unused 383 * EQU BIT 26 error type (1 sez hard error) 384 * EQU BIT 27 error overflow indicator 385 * EQU BITS 28:31 count of errors 386 387 * Address/data portion of bus commands to access SMU error log 388 * for various purposes. The "read" accesses are sent with 389 * BCMREAD commands, the "clear" accesses are sent with BCMWRITEs. 1C524 02020000 390 ERRLOGCMND VFD SMUPCRCEL*SMUPCC+1*SMUPCMND read current log 1C525 02010000 391 CLRLOGCMND VFD SMUCLEARALL*SMUPCC+1*SMUPCMND clear error log 1C526 02000000 392 ERFILECMND VFD SMURANDERR*SMUPCC+1*SMUPCMND read random entry 1C527 02020000 393 CLREFCMND VFD SMUCLEAR*SMUPCC+1*SMUPCMND clear random entry 1C528 02010000 394 SEQERRCMND VFD SMUSEQERR*SMUPCC+1*SMUPCMND read sequential entry 395 396 * message address table indexed by SMUERRTYPE 0001C529 397 SMUERRMEST LABEL 1C529 0001CE82 398 VFD ADR MESSOFT 1C52A 0001CE84 399 VFD ADR MESHARD 1C52B 0001CE86 400 VFD ADR MESNOFIX 1C52C 0001CE89 401 VFD ADR MESUNK 402 403 * Definitions of real and pseudo chip numbers for SYN2CHIP table 00000027 ABS 404 CPR EQU 39 chips per rank 00000027 ABS 405 MU EQU CPR pseudochip for "multiple errors" 00000028 ABS 406 AH EQU CPR+1 pseudochip for "all high error" 00000029 ABS 407 AL EQU CPR+2 pseudochip for "all low error" 0000002A ABS 408 FS EQU CPR+3 pseudochip for "forbidden syndrome" 00000006 ABS 409 CNLOG EQU (CPR+3) LOG 2 log size of chip number field 410 411 * message address table for pseudo chip numbers, indexed by ( - CPR) 0001C52D 412 PCMESTAB LABEL 1C52D 0001CE8E 413 VFD ADR MESMULT 1C52E 0001CE91 414 VFD ADR MESALLHIGH 1C52F 0001CE96 415 VFD ADR MESALLLOW 1C530 0001CE9B 416 VFD ADR MESBADSYN 417 418 * table indexed by syndrome yields chip number in error 1C530 00000027 419 SYN2CHIP VFD CNLOG:FS,16,17,MU 00:0F 1C531 00000028 420 VFDB CNLOG:18,MU,MU,AH 1C532 0000000C 421 VFDB CNLOG:19,MU,MU,12 1C533 00000027 422 VFDB CNLOG:MU,15,37,MU 1C533 0000001A 423 VFDB CNLOG:20,MU,MU,26 10:1F 1C534 00000027 424 VFDB CNLOG:MU,11,33,MU 1C535 00000027 425 VFDB CNLOG:AL,01,30,MU 1C536 00000027 426 VFDB CNLOG:13,MU,MU,MU 1C536 00000007 427 VFDB CNLOG:21,MU,MU,07 20:2F 1C537 00000027 428 VFDB CNLOG:MU,32,09,MU 1C538 00000027 429 VFDB CNLOG:MU,03,29,MU 1C539 00000027 430 VFDB CNLOG:08,MU,MU,MU 1C539 00000027 431 VFDB CNLOG:MU,25,06,MU 30:3F 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 318 (RDUSCAN) F 26 SMU Error Log Commands 1C53A 00000027 432 VFDB CNLOG:10,MU,MU,MU 1C53B 00000027 433 VFDB CNLOG:14,MU,MU,MU 1C53C 00000027 434 VFDB CNLOG:MU,MU,MU,MU 1C53C 00000002 435 VFDB CNLOG:22,MU,MU,02 40:4F 1C53D 00000027 436 VFDB CNLOG:MU,24,28,MU 1C53E 00000027 437 VFDB CNLOG:MU,38,05,MU 1C53F 00000027 438 VFDB CNLOG:36,MU,MU,MU 1C53F 00000027 439 VFDB CNLOG:MU,23,27,MU 50:5F 1C540 00000027 440 VFDB CNLOG:34,MU,MU,MU 1C541 00000027 441 VFDB CNLOG:35,MU,MU,MU 1C542 00000027 442 VFDB CNLOG:MU,MU,MU,MU 1C542 00000027 443 VFDB CNLOG:MU,00,04,MU 60:6F 1C543 00000027 444 VFDB CNLOG:31,MU,MU,MU 1C544 00000027 445 VFDB CNLOG:MU,MU,MU,MU 1C545 00000027 446 VFDB CNLOG:MU,MU,MU,MU 1C545 00000027 447 VFDB CNLOG:MU,MU,MU,MU 70:7F 1C546 00000027 448 VFDB CNLOG:MU,MU,MU,MU 1C547 00000027 449 VFDB CNLOG:MU,MU,MU,MU 1C548 00000027 450 VFDB CNLOG:MU,MU,MU,MU 451 1C549 0189C531 452 S2CPTR VFD PTR(SYN2CHIP) 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 319 (RDUSCAN) F 26 SMU Error Log Commands 454 455 ********************************************************************************** 456 * * 457 * The various SMU error log manipulating commands come here. We * 458 * ensure that the currently selected memory is an SMU then go off to * 459 * the proper command processor. Simple. * 460 * * 461 ********************************************************************************** 462 0001C54A 463 SMUERROR LABEL 1C54A 6001A97C 0 464 LD R0 MCUSLOT pick up slot number of current memory 1C54B 6021A96B 0 0 465 LD R0 SLOTTYPE(R0) get the actual type of this slot 1C54C 64040005 0 IMM 466 CPR R0 DEVSMU is it an SMU? 1C54D FE0DC54F 467 JNE MCUNOTSMU error if not 1C54E 5C974804 5 BASE 468 LDPC COM,COMEX1 go process the SMU command 469 * --- 470 0001C54F 471 MCUNOTSMU LABEL 1C54F 6005D1B2 0 IMM 472 LD R0 ADR ERM320 "Selected memory device must be SMU." 1C550 FE0FBE35 473 JMP RDUERR 474 * --- 475 476 ********************************************************************************** 477 * * 478 * All of the SMU error file commands come here for processing. * 479 * We already know that the current memory is an SMU, so pick up the rank * 480 * and chip numbers, build an SMU address from these, and send them all * 481 * off to be processed individually. * 482 * Note that in all of the SMU error file commands we must deal * 483 * with the fact that there are holes in the addressing range. While * 484 * the address field is 11 bits wide the lower 8 bits are treated * 485 * separately from the upper 3 bits and the lower 11 may not exceed * 486 * the actual number of chips in a rank. * 487 * * 488 ********************************************************************************** 489 0001C551 490 SMUERRFILE LABEL 1C551 DC41B342 491 CALLNP FETCHDN pick up a possible rank number 1C552 F6BDC55E 2 492 JBT R2/TDOT SAMEAGAIN dot means reuse previous location 1C553 F2ADC567 2 493 JBF R2/TNUM NOTRANK error if no rank 1C554 68040008 0 IMM 494 UCPR R0 MAXRANK is the rank number reasonable? 1C555 FE07C569 495 JGE RANKRANK the rank number is rank 1C556 61040000 4 IMM 496 LD R4 0 clean out this register 1C557 E40B2A30 0 4 CBM 497 ST R0 R4/SMUADRRANK start building the chip address 498 1C558 DC41B33F 499 CALLNP FETCHNP get the chip number now 1C559 F2ADC56B 2 500 JBF R2/TNUM NOTCHIPNUM must have a number 1C55A 68040027 0 IMM 501 UCPR R0 MAXCHIPNUM is it within range? 1C55B FE07C56D 502 JGE BADCHIPNUM error if not 1C55C E40B3080 0 4 CBM 503 ST R0 R4/SMUADRCHIP finish building the chip address 1C55D 5C974805 5 BASE 504 LDPC COM,COMEX2 go process 505 * --- 506 0001C55E 507 SAMEAGAIN LABEL 1C55E 6101A91F 4 508 LD R4 ADDRESS pick up the address 1C55F 790407FF 4 IMM 509 AND R4 07FF keep within reason 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 320 (RDUSCAN) F 26 SMU Error Log Commands 1C560 600B3080 0 4 CBM 510 LD R0 R4/SMUADRCHIP get the chip number from the address 1C561 50040026 0 IMM 511 MIN R0 MAXCHIPNUM-1 make sure it is legal 1C562 E40B3080 0 4 CBM 512 ST R0 R4/SMUADRCHIP put it back in place 513 1C563 600B2A30 0 4 CBM 514 LD R0 R4/SMUADRRANK get the rank number from the address 1C564 50040007 0 IMM 515 MIN R0 MAXRANK-1 make sure it is legal 1C565 E40B2A30 0 4 CBM 516 ST R0 R4/SMUADRRANK put it back in place 1C566 5C974805 5 BASE 517 LDPC COM,COMEX2 off we go 518 * --- 519 0001C567 520 NOTRANK LABEL 1C567 6005D1D1 0 IMM 521 LD R0 ADR ERM324 "Expecting rank number." 1C568 FE0FBE35 522 JMP RDUERR 523 * --- 524 0001C569 525 RANKRANK LABEL 1C569 6005D1BB 0 IMM 526 LD R0 ADR ERM321 "Rank number out of range." 1C56A FE0FBE35 527 JMP RDUERR 528 * --- 529 0001C56B 530 NOTCHIPNUM LABEL 1C56B 6005D1C3 0 IMM 531 LD R0 ADR ERM322 "Expecting chip number." 1C56C FE0FBE35 532 JMP RDUERR 533 * --- 534 0001C56D 535 BADCHIPNUM LABEL 1C56D 6005D1C9 0 IMM 536 LD R0 ADR ERM323 "Chip number out of range." 1C56E FE0FBE35 537 JMP RDUERR 538 * --- 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 321 (RDUSCAN) F 26 SMU Error Log Commands 540 541 ********************************************************************************** 542 * * 543 * The ERRORFILE command ends up here. The chip address has * 544 * already been picked up so now we build an error file read command * 545 * and display the results. Once the results have been displayed * 546 * a line feed will display the next error file location, a greater * 547 * than sign will scan to the next error file error, and a 0 will * 548 * clear the location. * 549 * Call: * 550 * R4 = SMU chip address * 551 * JMP ERRORFILE * 552 * (returns to RDUOK) * 553 * * 554 ********************************************************************************** 555 0001C56F 556 ERRORFILE LABEL 1C56F E501A91F 4 557 ST R4 ADDRESS save the address 1C570 60C1C526 3 558 LD R3 ERFILECMND pick up the command word 1C571 E50AE8C0 4 3 CBM 559 ST R4 R3/SMUADR put in the address portion 1C572 DC01BBAC 560 CALL SHIPCOM now actually hand it to the SMU 1C573 4101BBF5 561 PAR RESPERROR error address 1C574 41440000 IMM 562 PARV KLAS0 class 1C575 4141A97C 563 PARV MCUSLOT to a memory slot 1C576 41440002 IMM 564 PARV BCMREAD we actually do a read 1C577 4052C000 3 REG 565 PARVL R3 address indicates read error log 566 * \ / 567 0001C578 568 DISPTHEERR LABEL 1C578 DC41C873 569 CALLNP MADISP put the address into the output line 1C579 DC01B61A 570 CALL HEXTOCHAR send out the result 1C57A 4141F38E 571 PARV DATA(1) the response 1C57B 4037AC01 3 @ 572 PARL @OBPT(OBP) where it is 1C57C 18C40009 3 IMM 573 ADD OBP 9 move output buffer pointer 1C57D EC37AC01 3 @ 574 STZ @OBPT(OBP) terminate buffer 1C57E 6001AC01 0 575 LD R0 OBPT R0 -> output 1C57F DC41B883 576 CALLNP OUTB print it 577 578 TCDISP 1C580 6004011B 0 IMM 578 LD R0 FRTSETTCS set terminating characters 1C581 6045AC65 1 IMM 578 LD R1 ADR(TCTABD) display input table 1C582 E441A8EA 1 578 ST R1 TCGROUP remember group for restoration 1C583 088400C9 IMM 578 FREQ LUNAIN+XREQ for inputting after display 1C584 DC41B3B6 579 CALLNP READLINE slurp... 580 TCNORM 1C585 6004011B 0 IMM 580 LD R0 FRTSETTCS set terminating characters 1C586 6045AC5D 1 IMM 580 LD R1 ADR(TCTABN) normal table 1C587 E441A8EA 1 580 ST R1 TCGROUP remember the group we used 1C588 088400C9 IMM 580 FREQ LUNAIN+XREQ for command level inputs 581 * \ / 582 0001C589 583 MORERESP LABEL 1C589 DC41B349 584 CALLNP FETCHDATA pick up response 1C58A 60D28000 3 2 REG 585 LD R3 R2 move type info to safe register 1C58B F6FBC593 3 586 JBT R3/TLFD NEXTLOC if line feed then next location 1C58C DC41B8B8 587 CALLNP OUTCRLF clean up the terminal 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 322 (RDUSCAN) F 26 SMU Error Log Commands 1C58D F6EDC5A7 3 588 JBT R3/TNUM GOTNUMERIC clear the current location 1C58E F6FDC56F 3 589 JBT R3/TDOT ERRORFILE redisplay current location 1C58F F6F7C5B4 3 590 JBT R3/TPTR SEQSEARCH do a sequential search for errors 1C590 F6F9C59E 3 591 JBT R3/TUPA PREVLOC up-arrow means display previous location 1C591 F2FFC611 3 592 JBF R3/TEOL ERRRESP ran out of options 593 * \ / 594 1C592 FE0FBDC8 595 JMP RDUOK 596 * --- 597 598 * A line feed was found. Display the next error log location. 0001C593 599 NEXTLOC LABEL 1C593 DC41B8AC 600 CALLNP OUTCR clean up the terminal 1C594 19040001 4 IMM 601 ADD R4 1 move to next address 1C595 600B3080 0 4 CBM 602 LD R0 R4/SMUADRCHIP get the chip number 1C596 64040027 0 IMM 603 CPR R0 MAXCHIPNUM is it within range? 1C597 FE09C56F 604 JLT ERRORFILE if so go display it 1C598 EC0B3080 4 CBM 605 STZ R4/SMUADRCHIP loop around 1C599 BC0B2A30 0 4 CBM 606 INCL R0 R4/SMUADRRANK move to next rank 1C59A 64040008 0 IMM 607 CPR R0 MAXRANK beyond the ranks 1C59B FE09C56F 608 JLT ERRORFILE if not then go display 1C59C EC0B28C0 4 CBM 609 STZ R4/SMUADR start back over at zero 1C59D FE0FC56F 610 JMP ERRORFILE 611 * --- 612 613 * An up-arrow was found. Display the previous location. 0001C59E 614 PREVLOC LABEL 1C59E D04B3080 4 CBM 615 DEC R4/SMUADRCHIP move back a chip number 1C59F FE07C56F 616 JGE ERRORFILE if within range, then display it 1C5A0 60040026 0 IMM 617 LD R0 MAXCHIPNUM-1 get the highest actual chip address 1C5A1 E40B3080 0 4 CBM 618 ST R0 R4/SMUADRCHIP put into the address 1C5A2 D04B2A30 4 CBM 619 DEC R4/SMUADRRANK move back a rank 1C5A3 FE07C56F 620 JGE ERRORFILE if within range, then display it 1C5A4 60040007 0 IMM 621 LD R0 MAXRANK-1 highest actual rank 1C5A5 E40B2A30 0 4 CBM 622 ST R0 R4/SMUADRRANK put into address 1C5A6 FE0FC56F 623 JMP ERRORFILE 624 * --- 625 626 * A numeric character was found. Ship it to the errorlog. 627 ** note that for now the data is ignored by the SMU and this just 628 ** clears the error log. 0001C5A7 629 GOTNUMERIC LABEL 1C5A7 DC01BBE0 630 CALL SHIPDATA ship over the new data 1C5A8 4101BBF5 631 PAR RESPERROR error address 1C5A9 41440000 IMM 632 PARV 0 send it to ACC0 1C5AA 4041A830 633 PARVL SBUFFW word to write 1C5AB 60C1C527 3 634 LD R3 CLREFCMND clear error file command 1C5AC E50AE8C0 4 3 CBM 635 ST R4 R3/SMUADR put in the address 1C5AD DC01BBAC 636 CALL SHIPCOM now say to write it 1C5AE 4101BBF5 637 PAR RESPERROR error address 1C5AF 41440000 IMM 638 PARV KLAS0 class 1C5B0 4141A97C 639 PARV MCUSLOT send it to memory 1C5B1 41440000 IMM 640 PARV BCMWRITE it is a write 1C5B2 4052C000 3 REG 641 PARVL R3 where to write it to 1C5B3 FE0FC589 642 JMP MORERESP see if there was more response 643 * --- 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 323 (RDUSCAN) F 26 SMU Error Log Commands 644 645 * A greater-than (>) sign was found. Search sequentially for the 646 * next error. 0001C5B4 647 SEQSEARCH LABEL 1C5B4 DC01BBAC 648 CALL SHIPCOM now say to write it 1C5B5 4101BBF5 649 PAR RESPERROR error address 1C5B6 41440000 IMM 650 PARV KLAS0 class 1C5B7 4141A97C 651 PARV MCUSLOT send it to memory 1C5B8 41440002 IMM 652 PARV BCMREAD it is a write 1C5B9 4041C528 653 PARVL SEQERRCMND where to read from 1C5BA 6001F38E 0 654 LD R0 DATA(1) 1C5BB 610A1AB0 4 0 CBM 655 LD R4 R0/SEQRESPADR pick up the address portion 1C5BC E501A91F 4 656 ST R4 ADDRESS 1C5BD FE0FC578 657 JMP DISPTHEERR go display the error 658 * --- 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 324 (RDUSCAN) F 26 SMU Error Log Commands 660 661 ********************************************************************************** 662 * * 663 * The CLEARERRFILE command clears a specified location in the error * 664 * file. * 665 * * 666 ********************************************************************************** 667 0001C5BE 668 CLRERRFILE LABEL 1C5BE E501A91F 4 669 ST R4 ADDRESS save the address 1C5BF 60C1C527 3 670 LD R3 CLREFCMND clear error file command 1C5C0 E50AE8C0 4 3 CBM 671 ST R4 R3/SMUADR put in the address 1C5C1 DC01BBAC 672 CALL SHIPCOM now say to write it 1C5C2 4101BBF5 673 PAR RESPERROR error address 1C5C3 41440000 IMM 674 PARV KLAS0 class 1C5C4 4141A97C 675 PARV MCUSLOT send it to memory 1C5C5 41440000 IMM 676 PARV BCMWRITE it is a write 1C5C6 4052C000 3 REG 677 PARVL R3 where to write it to 1C5C7 FE0FBDC8 678 JMP RDUOK 679 * --- 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 325 (RDUSCAN) F 26 SMU Error Log Commands 681 682 ********************************************************************************** 683 * * 684 * The ERRORLOG command is processed here. We simply display * 685 * the current error log. The user may then enter a . or line-feed * 686 * to display the next error log entry. * 687 * * 688 ********************************************************************************** 689 0001C5C8 690 ERRORLOG LABEL 1C5C8 DC01BBAC 691 CALL SHIPCOM now actually hand it to the SMU 1C5C9 4101BBF5 692 PAR RESPERROR error address 1C5CA 41440000 IMM 693 PARV KLAS0 class 1C5CB 4141A97C 694 PARV MCUSLOT to a memory slot 1C5CC 41440002 IMM 695 PARV BCMREAD we actually do a read 1C5CD 4041C524 696 PARVL ERRLOGCMND address indicates read error log 1C5CE 6101F38E 4 697 LD R4 DATA(1) the raw error word 698 699 * initialize the line 1C5CF 6005CE72 0 IMM 700 LD R0 ADR MESSMUELD prototype line 1C5D0 DC41B875 701 CALLNP MESSMOVEZ move proto into buffer 702 703 * add in the individual parts to specific places 1C5D1 60C4000A 3 IMM 704 LD OBP RAWPOS place for raw word 1C5D2 DC01B61A 705 CALL HEXTOCHAR put out raw error status 1C5D3 41530000 4 REG 706 PARV R4 the value 1C5D4 4037AC01 3 @ 707 PARL @OBPT(OBP) where to put it 1C5D5 60D6D009 3 3 REG 708 LD OBP OBP+9 in case this is all we print 1C5D6 FB03C5FF 4 709 JEQZ R4 ELOUTLINE jump if nothing there 710 1C5D7 60C40014 3 IMM 711 LD OBP ERRPOS place for entry type 1C5D8 600B1220 0 4 CBM 712 LD R0 R4/SMUERRTYPE error type 1C5D9 6021C529 0 0 713 LD R0 SMUERRMEST(R0) message 1C5DA DC41B87B 714 CALLNP MESSMOVE put out entry type 715 1C5DB 60C40021 3 IMM 716 LD OBP RASCASPOS place for address 1C5DC DC01B61A 717 CALL HEXTOCHAR put out address 1C5DD 414B1D20 4 CBM 718 PARV R4/SMURASCAS the value 1C5DE 41440005 IMM 719 PARV RASCASWID field width 1C5DF 4037AC01 3 @ 720 PARL @OBPT(OBP) where to put it 721 1C5E0 60C4002C 3 IMM 722 LD OBP RANKPOS place for rank 1C5E1 600B1630 0 4 CBM 723 LD R0 R4/SMURANK the value 1C5E2 E401A8ED 0 724 ST R0 VALUE save for call 1C5E3 DC41B62D 725 CALLNP DECOUT put out rank 726 1C5E4 60C40033 3 IMM 727 LD OBP CHIPPOS place for chip description 1C5E5 600B0270 0 4 CBM 728 LD R0 R4/SMUSYNDROME check bits for error 1C5E6 6031C549 0 0 @ 729 LD R0 @S2CPTR(R0) "chip" of error 1C5E7 64040027 0 IMM 730 CPR R0 CPR is it actual chip? 1C5E8 FE07C5FC 731 JGE PSEUDOCHIP jump if not 1C5E9 E401A8ED 0 732 ST R0 VALUE save for call 1C5EA DC41B62D 733 CALLNP DECOUT put out chip number 734 735 * convert chip number to U-number 1C5EB 60C40033 3 IMM 736 LD OBP CHIPPOS position for U-number is ... 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 326 (RDUSCAN) F 26 SMU Error Log Commands 1C5EC 60D6D004 3 3 REG 737 LD OBP OBP+4 following chip number 1C5ED 6005CE8C 0 IMM 738 LD R0 ADR(MESUNUM1) first part of display 1C5EE DC41B87B 739 CALLNP MESSMOVE put it out 1C5EF 6041A8ED 1 740 LD R1 VALUE use the chip number 1C5F0 30440031 1 IMM 741 RSB R1 49 to calculate U-number (decimal) 1C5F1 6444001E 1 IMM 742 CPR R1 30 U=(Rank*50)+x, where 1C5F2 FE07C5F4 743 JGE UOK x=49-Chip, if Chip<=19 1C5F3 10440006 1 IMM 744 SUB R1 6 x=43-Chip, if Chip>=20 0001C5F4 745 UOK LABEL R1 = x 1C5F4 600B1630 0 4 CBM 746 LD R0 R4/SMURANK get rank 1C5F5 1C040032 0 IMM 747 MUL R0 50 R0 = Rank*50 1C5F6 18124000 0 1 REG 748 ADD R0 R1 R0 = U-number 1C5F7 E401A8ED 0 749 ST R0 VALUE save for call 1C5F8 DC41B62D 750 CALLNP DECOUT put out U-number 1C5F9 6005CE8D 0 IMM 751 LD R0 ADR(MESUNUM2) last part of display 1C5FA DC41B87B 752 CALLNP MESSMOVE put it out 1C5FB FE0FC5FF 753 JMP ELOUTLINE done here 754 * --- 755 756 * R0 = pseudochip number 0001C5FC 757 PSEUDOCHIP LABEL 1C5FC 10040027 0 IMM 758 SUB R0 CPR subtract off the base 1C5FD 6021C52D 0 0 759 LD R0 PCMESTAB(R0) find appropriate message 1C5FE DC41B87B 760 CALLNP MESSMOVE put out description 761 * \ / 762 763 * line is built, show it to the user 0001C5FF 764 ELOUTLINE LABEL 1C5FF EC37AC01 3 @ 765 STZ @OBPT(OBP) terminate buffer 1C600 6001AC01 0 766 LD R0 OBPT R0 -> output 1C601 DC41B883 767 CALLNP OUTB print it 768 769 * Change terminators and pick up response. 770 TCDISP 1C602 6004011B 0 IMM 770 LD R0 FRTSETTCS set terminating characters 1C603 6045AC65 1 IMM 770 LD R1 ADR(TCTABD) display input table 1C604 E441A8EA 1 770 ST R1 TCGROUP remember group for restoration 1C605 088400C9 IMM 770 FREQ LUNAIN+XREQ for inputting after display 1C606 DC41B3B6 771 CALLNP READLINE 772 TCNORM 1C607 6004011B 0 IMM 772 LD R0 FRTSETTCS set terminating characters 1C608 6045AC5D 1 IMM 772 LD R1 ADR(TCTABN) normal table 1C609 E441A8EA 1 772 ST R1 TCGROUP remember the group we used 1C60A 088400C9 IMM 772 FREQ LUNAIN+XREQ for command level inputs 1C60B DC41B8B8 773 CALLNP OUTCRLF pretty the paper 1C60C DC41B33F 774 CALLNP FETCHNP pick up response 1C60D F6BDC5C8 2 775 JBT R2/TDOT ERRORLOG if just a dot then do this again 1C60E F6BBC5C8 2 776 JBT R2/TLFD ERRORLOG if line feed then do this again 1C60F F2BFC611 2 777 JBF R2/TEOL ERRRESP finish up and leave 1C610 FE0FBDC8 778 JMP RDUOK all done here 779 * --- 780 0001C611 781 ERRRESP LABEL 1C611 6005CEFC 0 IMM 782 LD R0 ADR ERM106 "Invalid terminator." 1C612 FE0FBE35 783 JMP RDUERR 784 * --- 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 327 (RDUSCAN) F 26 SMU Error Log Commands 786 787 ********************************************************************************** 788 * * 789 * CLEARERR simply sends a command to the SMU to clear its error log * 790 * and error files. Note that this command does a write to a pseudo * 791 * location on the SMU. The location determines the action and the * 792 * actual data is ignored. * 793 * * 794 ********************************************************************************** 795 0001C613 796 CLEARERR LABEL 1C613 DC01BBAC 797 CALL SHIPCOM now actually hand it to the SMU 1C614 4101BBF5 798 PAR RESPERROR error address 1C615 41440000 IMM 799 PARV KLAS0 class 1C616 4141A97C 800 PARV MCUSLOT to a memory slot 1C617 41440000 IMM 801 PARV BCMWRITE we actually do a write 1C618 4041C525 802 PARVL CLRLOGCMND address indicates clear error log 1C619 FE0FBDC8 803 JMP RDUOK 804 * --- 805 806 END of SMU error log commands 151 152 INPUT RDUDISP 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 328 (RDUDISP) F 27 C, M, P, and S Commands 3 4 ********************************************************************************** 5 * * 6 * This section processes the C, M, P, and S commands. Each * 7 * has a variety of options depending on the parameters given. If * 8 * no parameters are entered, the current slot is displayed and * 9 * the user has the option of entering a new one. A slot number * 10 * may also appear on the command line after the command. In * 11 * addition, another command may follow the original command * 12 * which is specific to the type of module selected. If the * 13 * original command is not terminated with a CR, then the * 14 * command list is selected for the specific type of module. * 15 * * 16 ********************************************************************************** 17 18 BLOCK slot command processors 19 ENTRY PROCCPU 20 ENTRY PROCMCU 21 ENTRY PROCSSU 22 ENTRY PROCPPU 23 0001C61A 24 PROCCPU LABEL process C command 1C61A DC41B339 25 CALLNP FETCHCM2 get next item in line 1C61B F6BFC654 2 26 JBT R2/TEOL SLOTPROC if eol then just slot number 1C61C F2ADC623 2 27 JBF R2/TNUM PROCC10 if not a number then go on 1C61D 6404000F 0 IMM 28 CPR R0 MAXSLOT slot number max value 1C61E FE05C68B 29 JGT PROC90 error if too big 30 * \ / 31 1C61F DC41BCDC 32 CALLNP SLOTCHECK be sure it's a good slot 1C620 E401A97D 0 33 ST R0 CPUSLOT set the slot 1C621 DC41B339 34 CALLNP FETCHCM2 now get something else 1C622 F6BFBDC8 2 35 JBT R2/TEOL RDUOK if eol then all done 36 * \ / 37 0001C623 38 PROCC10 LABEL 1C623 F2AFC68D 2 39 JBF R2/TALPH PROCC90 error if not command 1C624 6145B0C5 5 IMM 40 LD COM ADR(CPCOMTAB) point to command table 1C625 6105B189 4 IMM 41 LD R4 ADR(CPCTTOP) and to the end 1C626 FE0FBDDB 42 JMP PROCCOM then go see if command is good 43 * --- 44 0001C627 45 PROCMCU LABEL 1C627 DC41B339 46 CALLNP FETCHCM2 get next item in line 1C628 F6BFC654 2 47 JBT R2/TEOL SLOTPROC if eol then display slot 1C629 F2ADC630 2 48 JBF R2/TNUM PROCM10 if not slot number then go on 1C62A 6404000F 0 IMM 49 CPR R0 MAXSLOT slot too big? 1C62B FE05C68B 50 JGT PROC90 complain if so 51 * \ / 52 1C62C DC41BCDC 53 CALLNP SLOTCHECK check for reasonable device 1C62D E401A97C 0 54 ST R0 MCUSLOT set the slot address 1C62E DC41B339 55 CALLNP FETCHCM2 get next item in line 1C62F F6BFBDC8 2 56 JBT R2/TEOL RDUOK all done if no more input 57 * \ / 58 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 329 (RDUDISP) F 27 C, M, P, and S Commands 0001C630 59 PROCM10 LABEL 1C630 F2AFC68F 2 60 JBF R2/TALPH PROCM90 error if not alpha 1C631 6145B06A 5 IMM 61 LD COM ADR(MCCOMTAB) point to proper table 1C632 6105B0BE 4 IMM 62 LD R4 ADR(MCCTTOP) and to the end 1C633 FE0FBDDB 63 JMP PROCCOM then continue with processing 64 * --- 65 0001C634 66 PROCPPU LABEL process P command 1C634 DC41B339 67 CALLNP FETCHCM2 get next item in line 1C635 F6BFC66A 2 68 JBT R2/TEOL PPSLOTPROC list slot and port 1C636 F2ADC643 2 69 JBF R2/TNUM PROCP10 if not number then continue 1C637 6404000F 0 IMM 70 CPR R0 MAXSLOT is the slot number too big? 1C638 FE05C68B 71 JGT PROC90 don't accept bad data 72 * \ / 73 1C639 DC41BCDC 74 CALLNP SLOTCHECK check for real ppu in slot 1C63A DC41B33F 75 CALLNP FETCHNP get another item 1C63B F2ADC693 2 76 JBF R2/TNUM PROCP91 must be a port number 77 * \ / 78 1C63C 64040003 0 IMM 79 CPR R0 MAXPORT range must be 0-3 1C63D FE05C695 80 JGT PROCP92 got that?? 1C63E E401A980 0 81 ST R0 PPUPORT set the port number 1C63F 6001A925 0 82 LD R0 NEWSLOT get the new slot he wanted 1C640 E401A97E 0 83 ST R0 PPUSLOT and set that too 1C641 DC41B339 84 CALLNP FETCHCM2 and now get the next item 1C642 F6BFBDC8 2 85 JBT R2/TEOL RDUOK all done if end of line 86 * \ / 87 0001C643 88 PROCP10 LABEL 1C643 F2AFC691 2 89 JBF R2/TALPH PROCP90 error if not alpha 1C644 6145B190 5 IMM 90 LD COM ADR(PPCOMTAB) point to ppu commands 1C645 6105B20E 4 IMM 91 LD R4 ADR(PPCTTOP) and to the end 1C646 FE0FBDDB 92 JMP PROCCOM then merge back in 93 * --- 94 0001C647 95 PROCSSU LABEL process S command 1C647 DC41B339 96 CALLNP FETCHCM2 get next line item 1C648 F6BFC654 2 97 JBT R2/TEOL SLOTPROC play with slot number 1C649 F2ADC650 2 98 JBF R2/TNUM PROCS10 jump if no slot number 1C64A 6404000F 0 IMM 99 CPR R0 MAXSLOT check range 1C64B FE05C68B 100 JGT PROC90 complain if too big 101 * \ / 102 1C64C DC41BCDC 103 CALLNP SLOTCHECK be sure slot is really an ssu 1C64D E401A97F 0 104 ST R0 SSUSLOT else set the slot address 1C64E DC41B339 105 CALLNP FETCHCM2 now get the next command 1C64F F6BFBDC8 2 106 JBT R2/TEOL RDUOK all done if nothing else 107 * \ / 108 0001C650 109 PROCS10 LABEL 1C650 F2AFC699 2 110 JBF R2/TALPH PROCS90 error if not alpha 1C651 6145B215 5 IMM 111 LD COM ADR(SSCOMTAB) point to proper command table 1C652 6105B29A 4 IMM 112 LD R4 ADR(SSCTTOP) and to the end 1C653 FE0FBDDB 113 JMP PROCCOM then go process the command 114 * --- 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 330 (RDUDISP) F 27 C, M, P, and S Commands 115 0001C654 116 SLOTPROC LABEL 1C654 60174C04 0 5 FPVR 117 LD R0 @(COM,COMSLOT) pick up slot number 1C655 FA07C659 0 118 JGEZ R0 SLOT10 jump if slot is defined 1C656 6005CE09 0 IMM 119 LD R0 ADR(MESNOSLOT) "" 1C657 DC41B878 120 CALLNP MESSMOVEW tell them the story 1C658 FE0FC65B 121 JMP SLOT15 then merge back in 122 * --- 123 124 * We are here to display a slot number and WRU(0) for it. 0001C659 125 SLOT10 LABEL 1C659 E401A924 0 126 ST R0 SLOT set up to decode 1C65A DC41B8CB 127 CALLNP SLOTOUT so list it out 128 * \ / 129 0001C65B 130 SLOT15 LABEL 1C65B DC41B46E 131 CALLNP OUTIN list out line and reread 1C65C FA0DBE35 0 132 JNEZ R0 RDUERR oops, error on input 1C65D F2ADC668 2 133 JBF R2/TNUM SLOT20 jump if no new value 1C65E 6001A830 0 134 LD R0 SBUFFW else get the new value 1C65F 6404000F 0 IMM 135 CPR R0 MAXSLOT ensure proper range 1C660 FE05C68B 136 JGT PROC90 complain about crud 137 * \ / 138 1C661 DC41BCDC 139 CALLNP SLOTCHECK check out the user's slot 1C662 E4174C04 0 5 FPVR 140 ST R0 @(COM,COMSLOT) change the slot number 1C663 E401A924 0 141 ST R0 SLOT set current working slot too 1C664 F2BFC668 2 142 JBF R2/TEOL SLOT20 jump if command follows 1C665 DC41B8CB 143 CALLNP SLOTOUT otherwise list out the new slot 1C666 DC41B886 144 CALLNP OUTO now print the line 1C667 FE0FBDC8 145 JMP RDUOK then get a new command 146 * --- 147 0001C668 148 SLOT20 LABEL 1C668 F6BFBDC8 2 149 JBT R2/TEOL RDUOK if end then we're done 1C669 FE0FC654 150 JMP SLOTPROC else redisplay 151 * --- 152 0001C66A 153 PPSLOTPROC LABEL 1C66A 5C01A97E 154 CMZ PPUSLOT is the ppu slot known? 1C66B FE07C66F 155 JGE PPSLOT10 jump if so 1C66C 6005CE09 0 IMM 156 LD R0 ADR(MESNOSLOT) "" 1C66D DC41B878 157 CALLNP MESSMOVEW start a line 1C66E FE0FC670 158 JMP PPSLOT15 then merge back in 159 * --- 160 0001C66F 161 PPSLOT10 LABEL 1C66F DC41B8DF 162 CALLNP PPSLOTO list it out 0001C670 163 PPSLOT15 LABEL 1C670 DC41B46B 164 CALLNP OUTINM list and fetch response 1C671 FA0DBE35 0 165 JNEZ R0 RDUERR oops, error on input 1C672 F2ADC689 2 166 JBF R2/TNUM PPSLOT20 jump if no new values 1C673 6001A830 0 167 LD R0 SBUFFW get the new slot number 1C674 6404000F 0 IMM 168 CPR R0 MAXSLOT be sure it's valid 1C675 FE05C68B 169 JGT PROC90 complain if too big 170 * \ / 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 331 (RDUDISP) F 27 C, M, P, and S Commands 171 1C676 DC41BCDC 172 CALLNP SLOTCHECK be sure we have a real ppu 1C677 6001F38E 0 173 LD R0 DATA(1) get the wru response 1C678 E401A8ED 0 174 ST R0 VALUE save for later use 1C679 DC41B349 175 CALLNP FETCHDATA get the port number 1C67A F2ADC693 2 176 JBF R2/TNUM PROCP91 must have both 177 * \ / 178 1C67B 60094033 0 5 ZBM 179 LD R0 COM,COMTERM get terminator code 1C67C 78A1AC7D 2 0 180 AND R2 TCCODES(R0) mask for valid terminators 1C67D 5C0AB080 2 CBM 181 CMZ R2/TERMS did we get a good one? 1C67E FE03C697 182 JEQ PROCP93 error if not 183 * \ / 184 1C67F 6001A830 0 185 LD R0 SBUFFW get the value 1C680 64040003 0 IMM 186 CPR R0 MAXPORT check for valid port number 1C681 FE05C695 187 JGT PROCP92 jump if too big 1C682 E401A980 0 188 ST R0 PPUPORT set the new port number 1C683 6001A925 0 189 LD R0 NEWSLOT get the new slot we want 1C684 E401A97E 0 190 ST R0 PPUSLOT and set that now too 1C685 F2BFC689 2 191 JBF R2/TEOL PPSLOT20 jump if command input follows 192 * \ / 193 1C686 DC41B8DF 194 CALLNP PPSLOTO otherwise list out new data 1C687 DC41B886 195 CALLNP OUTO put the works out 1C688 FE0FBDC8 196 JMP RDUOK then you can go 197 * --- 198 0001C689 199 PPSLOT20 LABEL 1C689 F6BFBDC8 2 200 JBT R2/TEOL RDUOK if end of line then done 1C68A FE0FC66A 201 JMP PPSLOTPROC else do a relist 202 * --- 203 0001C68B 204 PROC90 LABEL 1C68B 6005CF06 0 IMM 205 LD R0 ADR(ERM107) "Bad slot number" 1C68C FE0FBE35 206 JMP RDUERR 207 * --- 208 0001C68D 209 PROCC90 LABEL 1C68D 6005CF80 0 IMM 210 LD R0 ADR(ERM120) "Expecting CPU command" 1C68E FE0FBE35 211 JMP RDUERR 212 * --- 213 0001C68F 214 PROCM90 LABEL 1C68F 6005CF86 0 IMM 215 LD R0 ADR(ERM121) "Expecting MCU command" 1C690 FE0FBE35 216 JMP RDUERR 217 * --- 218 0001C691 219 PROCP90 LABEL 1C691 6005CF8C 0 IMM 220 LD R0 ADR(ERM122) "Expecting PPU command" 1C692 FE0FBE35 221 JMP RDUERR 222 * --- 223 0001C693 224 PROCP91 LABEL 1C693 6005CF98 0 IMM 225 LD R0 ADR(ERM124) "Expecting PPU port number" 1C694 FE0FBE35 226 JMP RDUERR 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 332 (RDUDISP) F 27 C, M, P, and S Commands 227 * --- 228 0001C695 229 PROCP92 LABEL 1C695 6005CF9F 0 IMM 230 LD R0 ADR(ERM125) "Bad PPU port number" 1C696 FE0FBE35 231 JMP RDUERR 232 * --- 233 0001C697 234 PROCP93 LABEL 1C697 6005CEFC 0 IMM 235 LD R0 ADR(ERM106) "Bad terminator" 1C698 FE0FBE35 236 JMP RDUERR 237 * --- 238 0001C699 239 PROCS90 LABEL 1C699 6005CF92 0 IMM 240 LD R0 ADR(ERM123) "Expecting SSU command" 1C69A FE0FBE35 241 JMP RDUERR 242 * --- 243 244 END of SLOT processors 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 333 (RDUDISP) F 27 Device Read Commands 247 248 ********************************************************************************** 249 * * 250 * This section is for processing the device read/write commands. * 251 * These commands read the appropriate data from the selected * 252 * slot and display the register name and its data. Once the data * 253 * is displayed, the user may enter a new value or enter one of * 254 * the accepted terminators to redisplay data or terminate command. * 255 * These commands are all heavily dependent upon the command element * 256 * to provide the address, class, slot, display type, etc. for the * 257 * command. * 258 * * 259 ********************************************************************************** 260 261 BLOCK 262 ENTRY DEVDISP 263 ENTRY PPSEND 264 ENTRY PPDISP 265 ENTRY CAMEM 266 0001C69B 267 DEVDISP LABEL 1C69B 60095564 0 5 ZBM 268 LD R0 COM,GMMBASE pick up address we are using 1C69C E401A921 0 269 ST R0 REALADDR so everyone will know 0001C69D 270 DEVDISP1 LABEL 1C69D 64440027 1 IMM 271 CPR R1 QUOTE is this a direct write? 1C69E FE03C710 272 JEQ MEMQUOTE1 if so then go have at it 273 * \ / 274 1C69F 60894634 2 5 ZBM 275 LD R2 COM,GMMSLOT get slot index 1C6A0 DC01BBAC 276 CALL SHIPCOM ship out the data request 1C6A1 4101BBF5 277 PAR RESPERROR error address 1C6A2 41494034 5 ZBM 278 PARV COM,GMMCLS class 1C6A3 4165A97B 2 279 PARV SLOTS(R2) slot=(from command) 1C6A4 41440002 IMM 280 PARV BCMREAD BCM=2 1C6A5 4041A921 281 PARVL REALADDR address 282 1C6A6 6001F38E 0 283 LD R0 DATA(1) get the value 1C6A7 E401A8ED 0 284 ST R0 VALUE where we need it 285 * \ / 286 0001C6A8 287 DEVAGAIN LABEL 1C6A8 DC41B86C 288 CALLNP BLANKOUTW set up output buffer 1C6A9 60174805 0 5 BASE 289 LD R0 COM,GMMNAM get register name 1C6AA DC41B87B 290 CALLNP MESSMOVE place in buffer 1C6AB DC41B5EB 291 CALLNP DATADISP output the data portion 1C6AC 5C094C14 5 ZBM 292 CMZ COM,GMMWRITE is a write allowed? 1C6AD FE03C6BE 293 JEQ DEVOUT if not then just OUT this 294 * \ / 295 1C6AE 18C40001 3 IMM 296 ADD OBP 1 move up buffer pointer 1C6AF EC37AC01 3 @ 297 STZ @OBPT(OBP) terminate it 1C6B0 6001AC01 0 298 LD R0 OBPT R0 -> output line 1C6B1 DC41B883 299 CALLNP OUTB ship it 1C6B2 DC41C787 300 CALLNP IN pick up response 1C6B3 5CA3C6B4 1 301 LDPC DEVJTAB(R1) act upon response 302 * --- 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 334 (RDUDISP) F 27 Device Read Commands 303 0001C6B4 304 DEVJTAB LABEL 1C6B4 0001BDC8 305 VFD ADR RDUOK 1C6B5 0001C6A8 306 VFD ADR DEVAGAIN repeat same word 1C6B6 0001C785 307 VFD ADR MEMBADTERM illegal terminator 1C6B7 0001C6B9 308 VFD ADR DEVMEM wants to display memory location 1C6B8 0001BE35 309 VFD ADR RDUERR IN found an error 310 311 0001C6B9 312 DEVMEM LABEL 1C6B9 F2B7C785 2 313 JBF R2/TPTR MEMBADTERM if not pointer then error 1C6BA 60494033 1 5 ZBM 314 LD R1 COM,COMTERM pick up the terminating group 1C6BB 64440003 1 IMM 315 CPR R1 TR can we display what this reg points to? 1C6BC FE09C785 316 JLT MEMBADTERM illegal display type 1C6BD FE0FC771 317 JMP MEMLIST then treat like memory address 318 * --- 319 0001C6BE 320 DEVOUT LABEL 1C6BE DC41B886 321 CALLNP OUTO ship out the line 1C6BF FE0FBDC8 322 JMP RDUOK go back for more commands 323 * --- 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 335 (RDUDISP) F 27 PPU Command Handler 326 327 ********************************************************************************** 328 * * 329 * The PPDISP section handles many of the PPU commands. * 330 * Data is obtained from the currently-selected PPU and displayed * 331 * on the user's terminal. Some commands accept new data. * 332 * The address of the PPU location to be displayed is * 333 * determined here and set in REALADDR then we join in with * 334 * DEVDISP to do all of the work. * 335 * * 336 ********************************************************************************** 337 0001C6C0 338 PPDISP LABEL 1C6C0 6001A980 0 339 LD R0 PPUPORT get current port number 1C6C1 60895564 2 5 ZBM 340 LD R2 COM,GPPADDR get address of transfer 1C6C2 E40A9840 0 2 CBM 341 ST R0 R2/PORTSPOT set the port in the address 1C6C3 E481A921 2 342 ST R2 REALADDR then remember address 1C6C4 FE0FC69D 343 JMP DEVDISP1 344 * --- 345 0001C6C5 346 PPSEND LABEL 1C6C5 6001A980 0 347 LD R0 PPUPORT get current port number 1C6C6 60895564 2 5 ZBM 348 LD R2 COM,GPPADDR get address of transfer 1C6C7 E40A9840 0 2 CBM 349 ST R0 R2/PORTSPOT set the port in the address 1C6C8 E481A921 2 350 ST R2 REALADDR then remember address 1C6C9 FE0FC714 351 JMP MEMSENDIT 352 * --- 353 354 ********************************************************************************** 355 * * 356 * This is where we come to handle the CA command. It displays * 357 * memory locations for a controller connected to the PPU. We just * 358 * set up the base address then join in with the normal memory command. * 359 * * 360 ********************************************************************************** 361 0001C6CA 362 CAMEM LABEL 1C6CA 6001A980 0 363 LD R0 PPUPORT get port number 1C6CB 600A2000 0 0 CBM 364 LD R0 R0/BITS 16:15 shift the sucker around 1C6CC E401A922 0 365 ST R0 BASEADDR set base address for command 1C6CD FE0FC6CF 366 JMP MEM00 then merge in 367 * --- 368 369 END of device register displayer 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 336 (RDUDISP) F 27 Display Commands 372 373 ********************************************************************************** 374 * * 375 * This section processes those commands which reference memory * 376 * locations of one form or another. These include actual MCU * 377 * memory as well as NVM, RAM, PROM, and CPU scratch-pads. Each * 378 * command contains info which describes transfer class and slot * 379 * type, address range, data size, address bias, and rewrite * 380 * capability. This allows the heavy code sharing. * 381 * * 382 * R1 = command terminator, COM -> command table entry * 383 ********************************************************************************** 384 385 BLOCK 386 ENTRY MEMORY 387 ENTRY MEM00 388 ENTRY MEMQUOTE1 389 ENTRY MEMSENDIT 390 ENTRY MEMSEND 391 ENTRY MEMLIST 392 ENTRY MEMBADTERM 393 0001C6CE 394 MEMORY LABEL 1C6CE EC01A922 395 STZ BASEADDR set the base address for later 0001C6CF 396 MEM00 LABEL 1C6CF 6001A91F 0 397 LD R0 ADDRESS get address user supplied 398 * \ / 399 400 * if NVM command, make special address check based on SSU rev level 1C6D0 6545B25B 5 IMM 401 CPR COM ADR(NVMCOM) NVM command? 1C6D1 FE0DC6D6 402 JNE MEM10 jump if not 1C6D2 6081A97F 2 403 LD R2 SSUSLOT slot we're headed for 1C6D3 60B5A985 2 2 @ 404 LD R2 @SSUNVMIDXP(R2) get index to max table 1C6D4 6425A982 0 2 405 CPR R0 SSUNVMMAX(R2) compare addr against this SSU's NVM 1C6D5 FE05C77F 406 JGT MEMBIGADDR jump if too big 0001C6D6 407 MEM10 LABEL 408 * \ / 409 410 * take different route if address is being written to 1C6D6 64440027 1 IMM 411 CPR R1 QUOTE was terminator a quote? 1C6D7 FE03C70D 412 JEQ MEMQUOTE if so then treat different 413 * \ / 414 415 * set up back pointer buffer 1C6D8 6045A9DD 1 IMM 416 LD R1 ADR(MASTACK) address of buffer 1C6D9 E441A9DF 1 417 ST R1 LASTADRPTR pointer to last valid position 1C6DA E41E4001 0 1 STAK 418 ST R0 STAK R1,1 save start address 1C6DB E441A9DE 1 419 ST R1 MASPTR and save stack pointer 1C6DC EC01A9E1 420 STZ DONEBUF say we haven't listed entire buffer 1C6DD EC01A9E0 421 STZ CIRCLEFLAG say we haven't filled the buffer 1C6DE D141A923 422 STMW DATALOC indicate no valid data yet 423 * \ / 424 425 * save page file selection (user vs monitor) for multiple displays 1C6DF EC01A927 426 STZ BANK clear bank selection 1C6E0 5C094E14 5 ZBM 427 CMZ COM,GMMMSR check for MSR relocation 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 337 (RDUDISP) F 27 Display Commands 1C6E1 FE03C6E4 428 JEQ MEM20 if none then all set 1C6E2 604A1C10 1 0 CBM 429 LD R1 R0/BANKBIT get bank from address 1C6E3 E441A927 1 430 ST R1 BANK save it for later 431 * \ / 432 433 * adjust address for base and range 434 * R0 = address, COM -> command element 0001C6E4 435 MEM20 LABEL 1C6E4 60494C43 1 5 ZBM 436 LD R1 COM,COMADDR get address range code 1C6E5 7823AC85 0 1 437 AND R0 ADRMASK(R1) keep value within range 1C6E6 E401A91F 0 438 ST R0 ADDRESS put back for later 1C6E7 1801A922 0 439 ADD R0 BASEADDR add any necessary base 1C6E8 18095564 0 5 ZBM 440 ADD R0 COM,GMMBASE add in the base bias 1C6E9 E401A921 0 441 ST R0 REALADDR save that for later too 442 * \ / 443 444 * fetch memory from remote system 0001C6EA 445 MEM30 LABEL 1C6EA 60094045 0 5 ZBM 446 LD R0 COM,COMDSL pick up length of line 1C6EB 64040001 0 IMM 447 CPR R0 1 just a single word display type? 1C6EC FE05C723 448 JGT MEMDL nope, it is the long form 1C6ED 60894634 2 5 ZBM 449 LD R2 COM,GMMSLOT get slot code of transfer 1C6EE DC01BBAC 450 CALL SHIPCOM now issue read request 1C6EF 4101BBF5 451 PAR RESPERROR error address 1C6F0 41494034 5 ZBM 452 PARV COM,GMMCLS class for transfer 1C6F1 4165A97B 2 453 PARV SLOTS(R2) slot to read from 1C6F2 41440002 IMM 454 PARV BCMREAD BCM=2 (read) 1C6F3 4041A921 455 PARVL REALADDR address to read from 1C6F4 DC41C873 456 CALLNP MADISP display address portion 1C6F5 6001F38E 0 457 LD R0 DATA(1) get the value 1C6F6 E401A8ED 0 458 ST R0 VALUE where we need it 1C6F7 DC41B5EB 459 CALLNP DATADISP then add data to the line 460 * \ / 461 0001C6F8 462 MEMOUT LABEL 1C6F8 D012C000 3 REG 463 INC OBP want a trailing blank 0001C6F9 464 MEMOUT1 LABEL 1C6F9 EC37AC01 3 @ 465 STZ @OBPT(OBP) need null on end 1C6FA 6001AC01 0 466 LD R0 OBPT need R0 to point to output 1C6FB DC41B883 467 CALLNP OUTB print 1C6FC DC41C787 468 CALLNP IN now get the response 1C6FD 5CA3C6FE 1 469 LDPC INJTAB(R1) go where IN wants us to 470 * --- 471 472 * action table indexed by IN subroutine return code (R1) 0001C6FE 473 INJTAB LABEL 1C6FE 0001BDC8 474 VFD ADR RDUOK command is finished 1C6FF 0001C6EA 475 VFD ADR MEM30 redisplay same address 1C700 0001C74A 476 VFD ADR MEMABSOLUT display absolute memory address 1C701 0001C703 477 VFD ADR MEM35 display a new address 1C702 0001BE35 478 VFD ADR RDUERR output an error message 479 480 ********************************************************************************** 481 * * 482 * Continue display by using new ADDRESS (i.e. user hit line-feed, * 483 * forward arrow, etc.). * 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 338 (RDUDISP) F 27 Display Commands 484 * * 485 * R0 = new address in question, COM -> command table entry * 486 * * 487 ********************************************************************************** 488 489 * maintain proper page file selection for multiple D and DL 0001C703 490 MEM35 LABEL 1C703 5C094E14 5 ZBM 491 CMZ COM,GMMMSR check for MSR relocation 1C704 FE03C707 492 JEQ MEM40 if none, check NVM 1C705 6041A927 1 493 LD R1 BANK ensure proper bank selection 1C706 E44A1C10 1 0 CBM 494 ST R1 R0/BANKBIT stay in the right universe 495 * \ / 496 497 * ensure NVM wraparound 0001C707 498 MEM40 LABEL 1C707 6545B25B 5 IMM 499 CPR COM ADR(NVMCOM) NVM command? 1C708 FE0DC6D6 500 JNE MEM10 jump if not 1C709 6081A97F 2 501 LD R2 SSUSLOT slot we're headed for 1C70A 60B5A985 2 2 @ 502 LD R2 @SSUNVMIDXP(R2) get index to max table 1C70B 7825A982 0 2 503 AND R0 SSUNVMMAX(R2) pull on the reins 1C70C FE0FC6E4 504 JMP MEM20 go do it 505 * --- 506 507 ********************************************************************************** 508 * * 509 * This section handles writing data to a location. We get here * 510 * when a apostrophe follows the display command. There should be data * 511 * to write following the apostrophe. * 512 * Other various commands join in along the way to use this code * 513 * to write to some address of some slot on the remote machine for * 514 * god knows what purpose. * 515 * * 516 ********************************************************************************** 517 0001C70D 518 MEMQUOTE LABEL 1C70D 1801A922 0 519 ADD R0 BASEADDR add any necessary base 1C70E 18095564 0 5 ZBM 520 ADD R0 COM,GMMBASE add in bias 1C70F E401A921 0 521 ST R0 REALADDR make the real address 0001C710 522 MEMQUOTE1 LABEL 1C710 DC41B33F 523 CALLNP FETCHNP get the data to write 1C711 F2ADC77D 2 524 JBF R2/TNUM MEMBADDATA jump if bad data 525 * \ / 526 527 * User wants to change the data at the location in REALADDR. 1C712 5C094C14 5 ZBM 528 CMZ COM,GMMWRITE is write allowed? 1C713 FE03C781 529 JEQ MEMNOWRITE error if not 530 * \ / 531 0001C714 532 MEMSENDIT LABEL 1C714 DC01BBE0 533 CALL SHIPDATA ship data to SSU 1C715 4101BBF5 534 PAR RESPERROR error address 1C716 41440000 IMM 535 PARV 0 ACC0 1C717 4041A830 536 PARVL SBUFFW data word to rewrite 1C718 60894634 2 5 ZBM 537 LD R2 COM,GMMSLOT get slot type to use 1C719 DC01BBAC 538 CALL SHIPCOM now issue the write request 1C71A 4101BBF5 539 PAR RESPERROR error address 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 339 (RDUDISP) F 27 Display Commands 1C71B 41494034 5 ZBM 540 PARV COM,GMMCLS class code 1C71C 4165A97B 2 541 PARV SLOTS(R2) slot number 1C71D 41440000 IMM 542 PARV BCMWRITE BCM=0=write 1C71E 4041A921 543 PARVL REALADDR address to write to 1C71F FE0FBDC8 544 JMP RDUOK all done 545 * --- 546 547 ********************************************************************************** 548 * * 549 * Commands that do direct writes to pseudo-addresses of * 550 * devices come here. REALADDR is set from the command element, * 551 * and SBUFFW contains the data to be sent. * 552 * * 553 ********************************************************************************** 554 0001C720 555 MEMSEND LABEL 1C720 60095564 0 5 ZBM 556 LD R0 COM,GMMBASE pick up the destination address 1C721 E401A921 0 557 ST R0 REALADDR chose it for write 1C722 FE0FC714 558 JMP MEMSENDIT join in 559 * --- 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 340 (RDUDISP) F 27 Display Commands 561 562 ********************************************************************************** 563 * * 564 * The DL and ZL commands are handled here. They work similarly * 565 * to the D and Z commands except that a full screen line gets output * 566 * at a time. Since we quite often reach this point on a linefeed, * 567 * and we do a block read of MAXRESPS words to get our data, we check to * 568 * see if there is enough data left around from last time to satisfy * 569 * this time around. * 570 * Note that we cannot use the previous date if redisplaying the * 571 * same line as the first word of data gets wiped out by any incidental * 572 * SHIPNOP. * 573 * Since we are doing block reads to get the data it is possible * 574 * to read beyond the valid addressing range for whatever is being read. * 575 * This is a problem we choose to ignore thus a long display command can * 576 * lead to bus errors if near the addressing boundary. * 577 * * 578 ********************************************************************************** 579 0001C723 580 MEMDL LABEL (list long form - a screen line worth) 1C723 6001A8F3 0 581 LD R0 DISPTYPE see if we have a valid display type 1C724 64040005 0 IMM 582 CPR R0 5 is this a legal display type? 1C725 FE07C783 583 JGE MEMBADTYPE cannot have time or instruction display 584 * \ / 585 1C726 61C1A923 7 586 LD R7 DATALOC get the starting address of current data 1C727 FBC9C72D 7 587 JLTZ R7 GETSOME jump if we need some 1C728 31C1A921 7 588 RSB R7 REALADDR see how close to last block 1C729 FBCBC72D 7 589 JLEZ R7 GETSOME can't do previous or same locations 1C72A 31C40010 7 IMM 590 RSB R7 MAXRESPS how many words of data are around 1C72B 65C94045 7 5 ZBM 591 CPR R7 COM,COMDSL enough for another long display? 1C72C FE07C737 592 JGE HAVEDATA if so don't send out for more 593 * \ / 594 0001C72D 595 GETSOME LABEL 1C72D 60894634 2 5 ZBM 596 LD R2 COM,GMMSLOT get slot code of transfer 1C72E DC01BBAC 597 CALL SHIPCOM send out block read 1C72F 4101BBF5 598 PAR RESPERROR error address 1C730 41494034 5 ZBM 599 PARV COM,GMMCLS class for transfer 1C731 4165A97B 2 600 PARV SLOTS(R2) slot to read from 1C732 41440003 IMM 601 PARV BCMBLKREAD bcm=3 1C733 4041A921 602 PARVL REALADDR address to start at 1C734 6001A921 0 603 LD R0 REALADDR get our starting address 1C735 E401A923 0 604 ST R0 DATALOC keep track for next time 605 * \ / 606 1C736 61C40010 7 IMM 607 LD R7 MAXRESPS start at first word 0001C737 608 HAVEDATA LABEL 1C737 31C40010 7 IMM 609 RSB R7 MAXRESPS determine where to start picking up data 1C738 DC41C873 610 CALLNP MADISP output memory address 1C739 6085A818 2 IMM 611 LD R2 ADR(OBUFF) get address of output buffer 1C73A 38168001 0 2 CACH 612 LEA R0 CACH R2,1 address of first char in buffer 1C73B 60440008 1 IMM 613 LD R1 8 8 chars to move 1C73C FE400000 614 CMOVE move everything back one in the buffer 1C73D 10C40002 3 IMM 615 SUB OBP 2 adjust pointer 1C73E 622FF38D 01 7 616 LD2 R0 DATA(R7) pick up the very first data word 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 341 (RDUDISP) F 27 Display Commands 1C73F E45F8001 1 6 STAK 617 ST R1 STAK SP,1 and save for possible pointer following 618 * \ / 619 1C740 61094045 4 5 ZBM 620 LD R4 COM,COMDSL how many words to display 0001C741 621 MEMDL10 LABEL 1C741 18C40001 3 IMM 622 ADD OBP 1 leave a space 1C742 622FF38D 01 7 623 LD2 R0 DATA(R7) get data item 1C743 E441A8ED 1 624 ST R1 VALUE save value to display 1C744 DC41B5EB 625 CALLNP DATADISP add it to the output buffer 1C745 19C40001 7 IMM 626 ADD R7 1 one more listed 1C746 FB23C741 4 627 DRJ R4 MEMDL10 continue on with another 628 * \ / 629 1C747 601F8001 0 6 STAK 630 LD R0 STAK SP,1 pick up first word displayed 1C748 E401A8ED 0 631 ST R0 VALUE save for possible pointer follow 1C749 FE0FC6F9 632 JMP MEMOUT1 633 * --- 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 342 (RDUDISP) F 27 Display Commands 635 636 ********************************************************************************** 637 * * 638 * Display the absolute memory location. * 639 * * 640 ********************************************************************************** 641 0001C74A 642 MEMABSOLUT LABEL 1C74A 60094033 0 5 ZBM 643 LD R0 COM,COMTERM get the terminating group 1C74B 64040005 0 IMM 644 CPR R0 TA is the @ display legal? 1C74C FE0DC785 645 JNE MEMBADTERM if not, then complain 646 * \ / 647 1C74D D141A923 648 STMW DATALOC since we will wipe this out 1C74E DC01BBAC 649 CALL SHIPCOM get MSR from CPU 1C74F 4101BBF5 650 PAR RESPERROR error address 1C750 41440000 IMM 651 PARV KLAS0 class=0 1C751 4141A97D 652 PARV CPUSLOT slot=cpu 1C752 41440002 IMM 653 PARV BCMREAD bcm=2 1C753 40440009 IMM 654 PARVL CPMSR addr=msr 1C754 6041F38E 1 655 LD R1 DATA(1) pick up the result 1C755 6081A91F 2 656 LD R2 ADDRESS get address we are listing 1C756 608A9C80 2 2 CBM 657 LD R2 R2/BITS 14:21 get just page number 1C757 604A7610 1 1 CBM 658 LD R1 R1/RELOBIT get the msr relocation flag 1C758 F44AB010 1 2 CBM 659 XORM R1 R2/BIT 24 then adjust page accordingly 1C759 18850000 2 IMM 660 ADD R2 CPPF bias to CPU page file address 1C75A DC01BBAC 661 CALL SHIPCOM request page file 1C75B 4101BBF5 662 PAR RESPERROR error address 1C75C 41440000 IMM 663 PARV KLAS0 class=0 1C75D 4141A97D 664 PARV CPUSLOT slot=cpu 1C75E 41440002 IMM 665 PARV BCMREAD bcm=2 1C75F 40528000 2 REG 666 PARVL R2 address=page file address 1C760 DC41C873 667 CALLNP MADISP display virtual address again 1C761 6005CDEA 0 IMM 668 LD R0 ADR(MESSLOT) "Slot " 1C762 DC41B87B 669 CALLNP MESSMOVE start the message 1C763 6001F38E 0 670 LD R0 DATA(1) get the value 1C764 600A0840 0 0 CBM 671 LD R0 R0/BITS 4:7 get slot address 1C765 E401A8ED 0 672 ST R0 VALUE save for output 1C766 DC41B605 673 CALLNP HEXOUTD then list out the slot number 1C767 18C40001 3 IMM 674 ADD OBP 1 make a little room 1C768 6001F38E 0 675 LD R0 DATA(1) get data back again 1C769 600A28C0 0 0 CBM 676 LD R0 R0/BITS 20:31 get physical bank address 1C76A 600A1400 0 0 CBM 677 LD R0 R0/BITS 10:9 shift it around 1C76B 6041A91F 1 678 LD R1 ADDRESS get virtual address 1C76C 180A6CA0 0 1 CBM 679 ADD R0 R1/BITS 22:31 add in location within page 1C76D E401A8ED 0 680 ST R0 VALUE now to list it out 1C76E 60840006 2 IMM 681 LD R2 6 should be six digits 1C76F DC41B5FB 682 CALLNP HEXOUTN add to the line 1C770 FE0FC6F8 683 JMP MEMOUT and ship it out 684 * --- 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 343 (RDUDISP) F 27 Display Commands 686 687 ********************************************************************************** 688 * * 689 * Some other display command ended up pointing to a memory location * 690 * that it wants to display. We fake the normal D (display) command. * 691 * R0 =
. * 692 * * 693 ********************************************************************************** 694 0001C771 695 MEMLIST LABEL (entry from other displays) 1C771 6145AF52 5 IMM 696 LD COM ADR(DCOM) memory pointer - fake "D" 1C772 7805FFFF 0 IMM 697 AND R0 MAXADR get address within limits 1C773 6045A9DD 1 IMM 698 LD R1 ADR(MASTACK) set up memory address buffer 1C774 E441A9DF 1 699 ST R1 LASTADRPTR pointer to last valid position 1C775 E41E4001 0 1 STAK 700 ST R0 STAK R1,1 put initial address on 1C776 E441A9DE 1 701 ST R1 MASPTR pointer to current position 1C777 EC01A9E1 702 STZ DONEBUF say we haven't listed entire buffer 1C778 EC01A9E0 703 STZ CIRCLEFLAG say we haven't filled the buffer 1C779 EC01A927 704 STZ BANK clear bank selection 1C77A EC01A922 705 STZ BASEADDR say there is no bias 1C77B EC01A8F3 706 STZ DISPTYPE use hex display 1C77C FE0FC6E4 707 JMP MEM20 then merge in 708 * --- 709 710 ********************************************************************************** 711 * * 712 * Assorted errors in the memory display commands end up here. * 713 * * 714 ********************************************************************************** 715 0001C77D 716 MEMBADDATA LABEL 1C77D 6005CF63 0 IMM 717 LD R0 ADR(ERM116) "Bad data to write" 1C77E FE0FBE35 718 JMP RDUERR 719 * --- 720 0001C77F 721 MEMBIGADDR LABEL 1C77F 6005CF6A 0 IMM 722 LD R0 ADR(ERM117) "Memory address too big" 1C780 FE0FBE35 723 JMP RDUERR 724 * --- 725 0001C781 726 MEMNOWRITE LABEL 1C781 6005CF75 0 IMM 727 LD R0 ADR(ERM118) "Write not allowed on this" 1C782 FE0FBE35 728 JMP RDUERR 729 * --- 730 0001C783 731 MEMBADTYPE LABEL 1C783 6005CFA8 0 IMM 732 LD R0 ADR(ERM127) "Invalid display type for DL..." 1C784 FE0FBE35 733 JMP RDUERR 734 * --- 735 0001C785 736 MEMBADTERM LABEL 1C785 6005CEFC 0 IMM 737 LD R0 ADR(ERM106) "Illegal terminator" 1C786 FE0FBE35 738 JMP RDUERR 739 * --- 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 344 (RDUDISP) F 27 Display Commands 741 742 ********************************************************************************** 743 * * 744 * IN is called to fetch a possible change to a displayed memory * 745 * location, a change in its display type, a request to display the * 746 * next or previous memory location, to follow a possible pointer, or * 747 * to display the absolute memory location. * 748 * Call: * 749 * CALLNP IN * 750 * R1 = code indicating what to do with reponse * 751 * 0 : done * 752 * 1 : redisplay address * 753 * 2 : display absolute memory address * 754 * 3 : display new address (which is in R0) * 755 * 4 : error (R0 -> error message) * 756 * Eats R0:R3. * 757 * * 758 ********************************************************************************** 759 760 BLOCK 761 ENTRY IN 762 763 BEGFRAME 764 ENDFRAME 765 1C787 DD5F8001 6 STAK 766 IN ENTRNP PUSH 767 TCDISP 1C788 6004011B 0 IMM 767 LD R0 FRTSETTCS set terminating characters 1C789 6045AC65 1 IMM 767 LD R1 ADR(TCTABD) display input table 1C78A E441A8EA 1 767 ST R1 TCGROUP remember group for restoration 1C78B 088400C9 IMM 767 FREQ LUNAIN+XREQ for inputting after display 1C78C DC41B3B6 768 CALLNP READLINE 769 TCNORM 1C78D 6004011B 0 IMM 769 LD R0 FRTSETTCS set terminating characters 1C78E 6045AC5D 1 IMM 769 LD R1 ADR(TCTABN) normal table 1C78F E441A8EA 1 769 ST R1 TCGROUP remember the group we used 1C790 088400C9 IMM 769 FREQ LUNAIN+XREQ for command level inputs 1C791 6001A8E7 0 770 LD R0 TERMCHAR 1C792 6404000A 0 IMM 771 CPR R0 LF is the terminating char a LF? 1C793 FE03C798 772 JEQ LFIN then don't put in another 1C794 6404000D 0 IMM 773 CPR R0 CR is the terminating char a CR? 1C795 FE0DC79A 774 JNE INBOTH jump if not, set cr, lf 1C796 DC41B8B2 775 CALLNP OUTLF then send a LF 1C797 FE0FC79B 776 JMP INCRLF merge back in 777 * --- 778 0001C798 779 LFIN LABEL 1C798 DC41B8AC 780 CALLNP OUTCR just send a CR 1C799 FE0FC79B 781 JMP INCRLF 782 * --- 783 0001C79A 784 INBOTH LABEL 1C79A DC41B8B8 785 CALLNP OUTCRLF pretty up the terminal 0001C79B 786 INCRLF LABEL 1C79B 60040060 0 IMM 787 LD R0 OKLEN max length of buffer 788 * \ / 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 345 (RDUDISP) F 27 Display Commands 789 790 * Now look for the first character on the input line. 791 1C79C 60840000 2 IMM 792 LD R2 0 start at position 0 0001C79D 793 INLOOP LABEL 1C79D 6075A8E5 1 2 @ 794 LD R1 @BUFPT(R2) get char from input buffer 1C79E 7844007F 1 IMM 795 AND R1 GASMASK remove the parity bit 1C79F 64440061 1 IMM 796 CPR R1 LOWCASE a lower case char? 1C7A0 FE09C7A4 797 JLT INLOOP1 jump if not 1C7A1 6444007A 1 IMM 798 CPR R1 LOWTOP out of the lower range? 1C7A2 FE05C7A4 799 JGT INLOOP1 if so, don't upperfy 1C7A3 10440020 1 IMM 800 SUB R1 LOWBIAS convert to upper case 0001C7A4 801 INLOOP1 LABEL 1C7A4 64440020 1 IMM 802 CPR R1 BLANK is it a blank? 1C7A5 FE0DC7AC 803 JNE INGOTCHR then we have got a char 1C7A6 18840001 2 IMM 804 ADD R2 1 bump up buffer index 1C7A7 FA23C79D 0 805 DRJ R0 INLOOP 806 * \ / 807 0001C7A8 808 INERR LABEL 1C7A8 6005D16C 0 IMM 809 LD R0 ADR(ERM215) Expecting display type or operator... 0001C7A9 810 INERR1 LABEL 1C7A9 60440004 1 IMM 811 LD R1 4 indicate an error 1C7AA 60840000 2 IMM 812 LD R2 TERR 1C7AB FE0FC819 813 JMP INEXIT 814 * --- 815 816 * We have the first character on the input line. See what it is. 817 0001C7AC 818 INGOTCHR LABEL 1C7AC 6004000E 0 IMM 819 LD R0 INTABL-1 length of table 0001C7AD 820 INCHRLP LABEL 1C7AD 6461C7B8 1 0 821 CPR R1 INTAB(R0) is this our char? 1C7AE FE03C7B7 822 JEQ INFOUND found it 1C7AF FA27C7AD 0 823 JDR R0 INCHRLP 824 * \ / 825 1C7B0 64440030 1 IMM 826 CPR R1 "0" is it a number? 1C7B1 FE03C7B5 827 JEQ INNUMBER looks like time to move in a number 1C7B2 FE09C7A8 828 JLT INERR error if anything else 1C7B3 64440039 1 IMM 829 CPR R1 "9" high end of number 1C7B4 FE05C7A8 830 JGT INERR 0001C7B5 831 INNUMBER LABEL 1C7B5 10840001 2 IMM 832 SUB R2 1 lets repeat getting this char 1C7B6 FE0FC81A 833 JMP INDATA should have found a match 834 * --- 835 0001C7B7 836 INFOUND LABEL 1C7B7 5CA1C7C7 0 837 LDPC INOPTAB(R0) now go perform proper operation 838 * --- 839 0001C7B8 840 INTAB LABEL 1C7B8 00000048 841 VFD "H" 0 - hex display 1C7B9 00000044 842 VFD "D" 1 - decimal display 1C7BA 00000050 843 VFD "P" 2 - PACK 6 display 1C7BB 00000041 844 VFD "A" 3 - ascii display 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 346 (RDUDISP) F 27 Display Commands 1C7BC 00000049 845 VFD "I" 4 - op-code display 1C7BD 00000054 846 VFD "T" 5 - double word time display 1C7BE 0000005A 847 VFD "Z" 6 - single word time display 1C7BF 00000040 848 VFD ATSIGN 7 - display absolute memory address 1C7C0 0000002E 849 VFD DOT 8 - redisplay current address 1C7C1 0000003C 850 VFD LESS 9 - back up pointer 1C7C2 0000005E 851 VFD UPARROW 10 - previous word display 1C7C3 0000000A 852 VFD LF 11 - next word display 1C7C4 0000003E 853 VFD GREATER 12 - follow link 1C7C5 0000000D 854 VFD CR 13 - return to main control 1C7C6 0000003A 855 VFD COLON 14 - change data 0000000F ABS 856 INTABL EQU DISPW INTAB 857 0001C7C7 858 INOPTAB LABEL 1C7C7 0001C7D6 859 VFD ADR INDISPT 0 - hex display 1C7C8 0001C7D6 860 VFD ADR INDISPT 1 - decimal display 1C7C9 0001C7D6 861 VFD ADR INDISPT 2 - PACK 6 display 1C7CA 0001C7D6 862 VFD ADR INDISPT 3 - ascii display 1C7CB 0001C7D6 863 VFD ADR INDISPT 4 - op-code display 1C7CC 0001C7D6 864 VFD ADR INDISPT 5 - double word time display 1C7CD 0001C7D6 865 VFD ADR INDISPT 6 - single word time display 1C7CE 0001C7E0 866 VFD ADR INABSMEM 7 - display absolute memory address 1C7CF 0001C7DD 867 VFD ADR INSAME 8 - redisplay current address 1C7D0 0001C805 868 VFD ADR INBCKPNT 9 - back up pointer 1C7D1 0001C7E3 869 VFD ADR INBACK 10 - back up a word 1C7D2 0001C7EB 870 VFD ADR INNEXT 11 - next word 1C7D3 0001C7F3 871 VFD ADR INLINK 12 - follow the link 1C7D4 0001C817 872 VFD ADR INDONE 13 - return to main control 1C7D5 0001C81A 873 VFD ADR INDATA 14 - change the dislayed data 874 875 * Just want to redisplay the same word as a different type. 876 0001C7D6 877 INDISPT LABEL 1C7D6 64040003 0 IMM 878 CPR R0 3 is display type after the P6? 1C7D7 FE09C7D9 879 JLT DISPADJS if so no need to adjust it 1C7D8 18040001 0 IMM 880 ADD R0 1 since there is a P and P6 disp type 0001C7D9 881 DISPADJS LABEL 1C7D9 E401A8F3 0 882 ST R0 DISPTYPE change the display type code 1C7DA 60440001 1 IMM 883 LD R1 1 say we have a changed display type 1C7DB 60840002 2 IMM 884 LD R2 1*TDOT 1C7DC FE0FC819 885 JMP INEXIT get out of here 886 * --- 887 888 * Repeat this line. 889 0001C7DD 890 INSAME LABEL 1C7DD 60440001 1 IMM 891 LD R1 1 say to relist current address 1C7DE 60840002 2 IMM 892 LD R2 1*TDOT indicate dot was terminator 1C7DF FE0FC819 893 JMP INEXIT 894 * --- 895 896 * Want to display the absolute memory address of this word. 897 0001C7E0 898 INABSMEM LABEL 1C7E0 60440002 1 IMM 899 LD R1 2 say to list memory address 1C7E1 60840040 2 IMM 900 LD R2 1*TATS 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 347 (RDUDISP) F 27 Display Commands 1C7E2 FE0FC819 901 JMP INEXIT 902 * --- 903 904 * Display the preceding memory location. 905 0001C7E3 906 INBACK LABEL 1C7E3 6001A91F 0 907 LD R0 ADDRESS get the current address 1C7E4 10094045 0 5 ZBM 908 SUB R0 COM,COMDSL move back a little 1C7E5 60494C43 1 5 ZBM 909 LD R1 COM,COMADDR get address type 1C7E6 6063AC85 1 1 910 LD R1 ADRMASK(R1) get the proper mask 1C7E7 78124000 0 1 REG 911 AND R0 R1 keep address within range 1C7E8 60440003 1 IMM 912 LD R1 3 say we have a new address to list 1C7E9 60840008 2 IMM 913 LD R2 1*TUPA backup pointer 1C7EA FE0FC819 914 JMP INEXIT 915 * --- 916 917 * Display the next memory location. 918 0001C7EB 919 INNEXT LABEL 1C7EB 6001A91F 0 920 LD R0 ADDRESS get the current address 1C7EC 18094045 0 5 ZBM 921 ADD R0 COM,COMDSL move up a little 1C7ED 60494C43 1 5 ZBM 922 LD R1 COM,COMADDR get address type 1C7EE 6063AC85 1 1 923 LD R1 ADRMASK(R1) get the proper mask 1C7EF 78124000 0 1 REG 924 AND R0 R1 keep address within range 1C7F0 60440003 1 IMM 925 LD R1 3 say we have a new address to list 1C7F1 60840004 2 IMM 926 LD R2 1*TLFD 1C7F2 FE0FC819 927 JMP INEXIT 928 * --- 929 930 * Follow the pointer displayed. We save these in a circular buffer so 931 * that we can then follow the pointer back if desired. 932 0001C7F3 933 INLINK LABEL 1C7F3 6041A9DE 1 934 LD R1 MASPTR current address stack pointer 1C7F4 6445A9B5 1 IMM 935 CPR R1 ADR(MASTOP) any room left? 1C7F5 FE05C7FB 936 JGT INLINK1 yes 1C7F6 EDC1A9E0 937 STW CIRCLEFLAG say we have filled the buffer 1C7F7 6441A9DF 1 938 CPR R1 LASTADRPTR get pointer to last address in buffer 1C7F8 6045A9DD 1 IMM 939 LD R1 ADR(MASTACK) start at first of buffer 1C7F9 FE0DC7FB 940 JNE INLINK1 if not equal don't update last pointer 1C7FA E441A9DF 1 941 ST R1 LASTADRPTR keep the pointer in sync with us 942 * \ / 943 0001C7FB 944 INLINK1 LABEL 1C7FB 6001A91F 0 945 LD R0 ADDRESS get the current address 1C7FC 6441A9DF 1 946 CPR R1 LASTADRPTR 1C7FD E41E4001 0 1 STAK 947 ST R0 STAK R1,1 save the address in the buffer 1C7FE E441A9DE 1 948 ST R1 MASPTR save the new position in buffer 1C7FF FE0DC801 949 JNE INLINK2 don't move last pointer along 1C800 E441A9DF 1 950 ST R1 LASTADRPTR keep this up with current position 951 * \ / 952 0001C801 953 INLINK2 LABEL 1C801 6001A8ED 0 954 LD R0 VALUE get the value listed 1C802 60440003 1 IMM 955 LD R1 3 say we have a new address to list 1C803 60840010 2 IMM 956 LD R2 1*TPTR 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 348 (RDUDISP) F 27 Display Commands 1C804 FE0FC819 957 JMP INEXIT 958 * --- 959 960 * Follow the pointers back. That is why we saved addresses in the 961 * circular buffer. 962 0001C805 963 INBCKPNT LABEL 1C805 6041A9DE 1 964 LD R1 MASPTR where the addresses are 1C806 5C01A9E1 965 CMZ DONEBUF has the complete buffer been listed? 1C807 FE0DC815 966 JNE INBCKPNTERR if so then can't do any more 1C808 601E4001 0 1 STAK 967 LD R0 STAK R1,1 get address to list 1C809 6445A9DD 1 IMM 968 CPR R1 ADR(MASTACK) time to circle around? 1C80A FE07C811 969 JGE INBCKPNT3 then see if it has been filled 0001C80B 970 INBCKPNT2 LABEL 1C80B E441A9DE 1 971 ST R1 MASPTR 1C80C 6441A9DF 1 972 CPR R1 LASTADRPTR see if the entire buffer has been listed 1C80D EC41A9E1 973 STLEQ DONEBUF set flag accordingly 1C80E 60440003 1 IMM 974 LD R1 3 say we have a new address to list 1C80F 60840020 2 IMM 975 LD R2 1*TBPT 1C810 FE0FC819 976 JMP INEXIT 977 * --- 978 0001C811 979 INBCKPNT3 LABEL 1C811 5C01A9E0 980 CMZ CIRCLEFLAG has a complete circle been filled? 1C812 FE03C815 981 JEQ INBCKPNTERR if not then can't backup anymore 1C813 3841A9B5 1 982 LEA R1 MASTOP circle around 1C814 FE0FC80B 983 JMP INBCKPNT2 join in the fun 984 * --- 985 0001C815 986 INBCKPNTERR LABEL 1C815 6005D162 0 IMM 987 LD R0 ADR(ERM210) "No more backpointers to follow." 1C816 FE0FC7A9 988 JMP INERR1 go to error return 989 * --- 990 991 0001C817 992 INDONE LABEL 1C817 60840001 2 IMM 993 LD R2 1*TEOL 1C818 60440000 1 IMM 994 LD R1 0 say we are done displaying 995 * \ / 0001C819 996 INEXIT LABEL 1C819 5D1F8001 6 STAK 997 LEAVE POP 998 * --- 999 1000 ********************************************************************************** 1001 * * 1002 * We come here if the user wants to change the value in a * 1003 * memory location. We pick up a value of the same type, make * 1004 * sure it is valid, and ship it out. * 1005 * * 1006 ********************************************************************************** 1007 0001C81A 1008 INDATA LABEL 1C81A 5C094C14 5 ZBM 1009 CMZ COM,GMMWRITE is write allowed? 1C81B FE03C82A 1010 JEQ NOCHNG no 1C81C 18840001 2 IMM 1011 ADD R2 1 1C81D 6005A800 0 IMM 1012 LD R0 ADR(IBUFFW) get address of input buffer 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 349 (RDUDISP) F 27 Display Commands 1C81E 389A1000 2 02 CACH 1013 LEA R2 CACH R0,0(R2) get address of char in buffer 1C81F E481A8E5 2 1014 ST R2 BUFPT put it where GETCHAR can get it 1C820 6001A8F3 0 1015 LD R0 DISPTYPE get the display type 1C821 5CA1C822 0 1016 LDPC INDATAB(R0) 1017 * --- 1018 0001C822 1019 INDATAB LABEL 1C822 0001C82C 1020 VFD ADR HEXIN 0 - hex 1C823 0001C830 1021 VFD ADR DECIN 1 - decimal 1C824 0001C83D 1022 VFD ADR PAKIN 2 - PACK 6 1C825 0001C83D 1023 VFD ADR PAKIN 3 - PACK 6 1C826 0001C841 1024 VFD ADR ASCIN 4 - ascii 1C827 0001C82C 1025 VFD ADR HEXIN 5 - op-code 1C828 0001C846 1026 VFD ADR DTIMEIN 6 - double word time 1C829 0001C84A 1027 VFD ADR STIMEIN 7 - single word time 1028 0001C82A 1029 NOCHNG LABEL 1C82A 6005CF75 0 IMM 1030 LD R0 ADR(ERM118) Write not allowed on this 1C82B FE0FC7A9 1031 JMP INERR1 go to error return 1032 * --- 1033 1034 ********************************************************************************** 1035 * * 1036 * The following locations are jumped to depending on what the * 1037 * display type is. We try to pick up some input of the same type * 1038 * and if successful ship it out to that memory location. If not * 1039 * we will return an error. * 1040 * * 1041 ********************************************************************************** 1042 0001C82C 1043 HEXIN LABEL 1C82C DC41B349 1044 CALLNP FETCHDATA get the data item 1C82D F6ADC84D 2 1045 JBT R2/TNUM INSHIP if we have a number then ship it 1C82E 6005D17C 0 IMM 1046 LD R0 ADR(ERM217) "Expecting hexadecimal number" 1C82F FE0FC7A9 1047 JMP INERR1 go to error return 1048 * --- 1049 0001C830 1050 DECIN LABEL 1C830 DC41B342 1051 CALLNP FETCHDN get the decimal data item 1C831 F6ADC84D 2 1052 JBT R2/TNUM INSHIP if we have a number then ship it 1C832 D0C1A8E5 1053 DECP BUFPT back up one char 1C833 DC41B39C 1054 CALLNP GETCHAR pick up the char 1C834 6404002D 0 IMM 1055 CPR R0 MINUS is it a negative number? 1C835 FE0DC83B 1056 JNE DECINERR if not then we have an error 1C836 DC41B342 1057 CALLNP FETCHDN get the decimal number 1C837 F2ADC83B 2 1058 JBF R2/TNUM DECINERR if we have a number then ship it 1C838 7001A830 0 1059 LDN R0 SBUFFW make into a negative number 1C839 E401A830 0 1060 ST R0 SBUFFW and put back 1C83A FE0FC84D 1061 JMP INSHIP 1062 * --- 1063 0001C83B 1064 DECINERR LABEL 1C83B 6005D184 0 IMM 1065 LD R0 ADR(ERM218) "Expecting decimal number" 1C83C FE0FC7A9 1066 JMP INERR1 go to error return 1067 * --- 1068 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 350 (RDUDISP) F 27 Display Commands 0001C83D 1069 PAKIN LABEL 1C83D DC41B4CE 1070 CALLNP PAK6IN 1C83E FA0DC84D 0 1071 JNEZ R0 INSHIP ship out the data if no problem 1C83F 6005D177 0 IMM 1072 LD R0 ADR(ERM216) "Invalid PAK6 format" 1C840 FE0FC7A9 1073 JMP INERR1 go to error return 1074 * --- 1075 0001C841 1076 ASCIN LABEL 1C841 60440004 1 IMM 1077 LD R1 4 number of chars to get 1C842 6085A830 2 IMM 1078 LD R2 ADR(SBUFFW) where the chars will go 1C843 6001A8E5 0 1079 LD R0 BUFPT where the chars are 1C844 FE400000 1080 CMOVE move them 1C845 FE0FC84D 1081 JMP INSHIP go send the data 1082 * --- 1083 0001C846 1084 DTIMEIN LABEL 1C846 DC41B4DD 1085 CALLNP TIMEIN convert the time 1C847 5C120000 0 REG 1086 CMZ R0 did everything go ok? 1C848 FE03C84D 1087 JEQ INSHIP go send data if so 1088 * \ / 1089 0001C849 1090 TMINERR LABEL error in TIMEIN(S) subroutine 1C849 FE0FC7A9 1091 JMP INERR1 go to error return 1092 * --- 1093 0001C84A 1094 STIMEIN LABEL 1C84A DC41B4DA 1095 CALLNP TIMEINS convert the time 1C84B 5C120000 0 REG 1096 CMZ R0 did everything go ok? 1C84C FE0DC849 1097 JNE TMINERR go say so 1098 * \ / 1099 0001C84D 1100 INSHIP LABEL send off data 1C84D 6001A8F3 0 1101 LD R0 DISPTYPE get the display type 1C84E 64040006 0 IMM 1102 CPR R0 6 is it double time display? 1C84F FE03C861 1103 JEQ SENDDOUBL we are sending a double word 0001C850 1104 INSHIP1 LABEL 1C850 DC01BBE0 1105 CALL SHIPDATA ship data to SSU 1C851 4101BBF5 1106 PAR RESPERROR error address 1C852 41440000 IMM 1107 PARV 0 ACC0 1C853 4041A830 1108 PARVL SBUFFW data word to rewrite 1C854 60894634 2 5 ZBM 1109 LD R2 COM,GMMSLOT get slot type to use 1C855 DC01BBAC 1110 CALL SHIPCOM now issue the write request 1C856 4101BBF5 1111 PAR RESPERROR error address 1C857 41494034 5 ZBM 1112 PARV COM,GMMCLS class code 1C858 4165A97B 2 1113 PARV SLOTS(R2) slot number 1C859 41440000 IMM 1114 PARV BCMWRITE BCM=0=write 1C85A 4041A921 1115 PARVL REALADDR address to write to 1116 * \ / 1C85B 6041A8E7 1 1117 LD R1 TERMCHAR get the terminating char 1C85C 6001A8F3 0 1118 LD R0 DISPTYPE get the display type 1C85D 64040006 0 IMM 1119 CPR R0 6 is it double word time? 1C85E FE0DC7AC 1120 JNE INGOTCHR if not then go see what to do next 1C85F D041A921 1121 DEC REALADDR move the address back 1C860 FE0FC7AC 1122 JMP INGOTCHR now go see what to do 1123 * --- 1124 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 351 (RDUDISP) F 27 Display Commands 1125 * send the first changed word 0001C861 1126 SENDDOUBL LABEL 1C861 DC01BBE0 1127 CALL SHIPDATA ship data to SSU 1C862 4101BBF5 1128 PAR RESPERROR error address 1C863 41440000 IMM 1129 PARV 0 ACC0 1C864 4041A830 1130 PARVL SBUFFW data word to rewrite 1C865 60894634 2 5 ZBM 1131 LD R2 COM,GMMSLOT get slot type to use 1C866 DC01BBAC 1132 CALL SHIPCOM now issue the write request 1C867 4101BBF5 1133 PAR RESPERROR error address 1C868 41494034 5 ZBM 1134 PARV COM,GMMCLS class code 1C869 4165A97B 2 1135 PARV SLOTS(R2) slot number 1C86A 41440000 IMM 1136 PARV BCMWRITE BCM=0=write 1C86B 4041A921 1137 PARVL REALADDR address to write to 1138 * \ / 1C86C 6001A8E9 0 1139 LD R0 TIMETEMP(1) stored second word of time here 1C86D E401A830 0 1140 ST R0 SBUFFW put it where it can be sent 1C86E D001A921 1141 INC REALADDR that does it 1C86F 60494C43 1 5 ZBM 1142 LD R1 COM,COMADDR get address type 1C870 6063AC85 1 1 1143 LD R1 ADRMASK(R1) get the proper mask 1C871 F841A921 1 1144 ANDM R1 REALADDR 1C872 FE0FC850 1145 JMP INSHIP1 now go send it 1146 * --- 1147 1148 END of IN subroutine 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 352 (RDUDISP) F 27 Display Commands 1150 1151 ********************************************************************************** 1152 * * 1153 * This little guy outputs the address portion of the memory * 1154 * displays. It is called from a couple of places in the memory * 1155 * lister, hence a subroutine. * 1156 * Call: * 1157 * ADDRESS = address to display * 1158 * CALLNP MADISP * 1159 * Eats R0:R2, sets OBP. * 1160 * * 1161 ********************************************************************************** 1162 1163 BLOCK 1164 ENTRY MADISP 1165 1166 BEGFRAME 1167 ENDFRAME 1168 1C873 DD5F8001 6 STAK 1169 MADISP ENTRNP PUSH 1C874 DC41B86C 1170 CALLNP BLANKOUTW clear listing line 1C875 6001A91F 0 1171 LD R0 ADDRESS get address of data 1C876 E401A8ED 0 1172 ST R0 VALUE stuff where we can use it 1C877 6545AF52 5 IMM 1173 CPR COM ADR(DCOM) is this the D command? 1C878 FE03C882 1174 JEQ MAD10 if so then handle specially 1C879 6545AF59 5 IMM 1175 CPR COM ADR(DLCOM) same goes for DL command 1C87A FE03C882 1176 JEQ MAD10 they get symbols too! 1177 * \ / 1178 1C87B 60894C43 2 5 ZBM 1179 LD R2 COM,COMADDR get address class 1C87C 60A5AC91 2 2 1180 LD R2 ADDRDIGS(R2) get number of digits 1C87D DC41B5FB 1181 CALLNP HEXOUTN and list out address 1C87E 6004003A 0 IMM 1182 LD R0 COLON now get some dress 1C87F E437AC01 0 3 @ 1183 ST R0 @OBPT(OBP) add frills 1C880 18C40001 3 IMM 1184 ADD OBP 1 1C881 5D1F8001 6 STAK 1185 LEAVE POP 1186 * --- 1187 0001C882 1188 MAD10 LABEL 1C882 E55F8001 5 6 STAK 1189 ST COM STAK SP,1 save command pointer 1C883 DC01BB04 1190 CALL LOCOUT list out the location 1C884 4041A92C 1191 PARVL LOCFLAG pass label listing flag 1C885 EC01A92C 1192 STZ LOCFLAG only list if exact now on 1C886 615F8001 5 6 STAK 1193 LD COM STAK SP,1 retrieve command pointer 1C887 5D1F8001 6 STAK 1194 LEAVE STAK SP,1 then return 1195 * --- 1196 1197 END of MADISP 1198 1199 END of MEMORY displayer 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 353 (RDUDISP) F 27 Register Commands 1202 1203 ********************************************************************************** 1204 * * 1205 * This section handles the CPU Registers command. It first * 1206 * checks for the existence of a parameter and if there is one, * 1207 * it assumes it to be a register number and goes off to process * 1208 * as a memory reference. Otherwise, the standard registers are * 1209 * displayed (R0:R7, PC, MSR, CAR, IMR). * 1210 * * 1211 ********************************************************************************** 1212 1213 BLOCK 1214 ENTRY CPUREGDISP 1215 ENTRY CPUREGS 1216 0001C888 1217 CPUREGDISP LABEL 1C888 F6ADC6CE 2 1218 JBT R2/TNUM MEMORY jump if specific register # 1C889 DC01C88C 1219 CALL CPUREGS list out the registers 1C88A 4041A97D 1220 PARVL CPUSLOT from current CPU 1C88B FE0FBDC8 1221 JMP RDUOK then return to mission control 1222 * --- 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 354 (RDUDISP) F 27 Register Commands 1224 1225 ********************************************************************************** 1226 * * 1227 * This is a subroutine which will list out the registers for * 1228 * the requested CPU. The CPU slot number is passed as a parameter. * 1229 * All general registers are listed as is the slot number. * 1230 * * 1231 ********************************************************************************** 1232 1233 BLOCK 1234 ENTRY CPUREGS 1235 1236 BEGFRAME 00178801 6 BASE 1237 CPRTEMP BSS 1 temp for R7 1238 ENDFRAME 1239 1C88C DD1F8002 6 STAK 1240 CPUREGS ENTR PUSH 1C88D C041A924 1241 STPVL SLOT save slot number to use 1C88E E5D78801 7 6 BASE 1242 ST R7 SP,CPRTEMP save R7 to free it up 1C88F DC41B86C 1243 CALLNP BLANKOUTW clear buffer and set pointer 1C890 3801CE22 0 1244 LEA R0 MESCPU point to name message 1C891 DC41B87B 1245 CALLNP MESSMOVE add that to the line 1C892 6001A924 0 1246 LD R0 SLOT get the slot number 1C893 E401A8ED 0 1247 ST R0 VALUE put it where we need it 1C894 DC41B605 1248 CALLNP HEXOUTD then output the digit 1C895 DC41B886 1249 CALLNP OUTO then list it out 1250 1C896 DC01BBAC 1251 CALL SHIPCOM general request, get data 1C897 4101BBF5 1252 PAR RESPERROR error address 1C898 41440002 IMM 1253 PARV KLAS2 class=2 1C899 4141A924 1254 PARV SLOT slot=CPU 1C89A 41440000 IMM 1255 PARV BCMSTATUS bcm=0 1C89B 40440000 IMM 1256 PARVL 0 address=0 1257 * \ / 1258 1C89C 61C40000 7 IMM 1259 LD R7 0 start at the beginning 0001C89D 1260 CPR10 LABEL 1C89D DC41B86F 1261 CALLNP BLANKOUT clear the air 1C89E 61040003 4 IMM 1262 LD R4 NREGPL-1 how many per line? 0001C89F 1263 CPR20 LABEL 1C89F 60E9CD73 3 4 1264 LD OBP REGPOST(R4) get position for this one 1C8A0 3A2FCE24 0 7 1265 LEA2 R0 MESCPR(R7) point to register name 1C8A1 DC41B87B 1266 CALLNP MESSMOVE put name into line 1C8A2 622FF38D 01 7 1267 LD2 R0 DATA(R7) get value for this one 1C8A3 E441A8ED 1 1268 ST R1 VALUE set up to output 1C8A4 DC41B5F1 1269 CALLNP HEXOUT ship it out 1C8A5 19C40001 7 IMM 1270 ADD R7 1 one more down 1C8A6 65C4000C 7 IMM 1271 CPR R7 NCPR how many to go? 1C8A7 FE07C8AB 1272 JGE CPR30 jump if done 1C8A8 FB27C89F 4 1273 JDR R4 CPR20 more room on this line? 1C8A9 DC41B886 1274 CALLNP OUTO enough. list it out 1C8AA FE0FC89D 1275 JMP CPR10 1276 * --- 1277 0001C8AB 1278 CPR30 LABEL 1C8AB DC41B886 1279 CALLNP OUTO list out last line 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 355 (RDUDISP) F 27 Register Commands 1C8AC 61D78801 7 6 BASE 1280 LD R7 SP,CPRTEMP restore R7 1C8AD 5D1F8002 6 STAK 1281 LEAVE POP 1282 * --- 1283 1284 END of CPUREGS 1285 1286 END of REGISTER display 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 356 (RDUDISP) F 27 Register Commands 1288 1289 ********************************************************************************** 1290 * * 1291 * This section handles the PPU Registers command. It displays * 1292 * the values of several of the PPU registers with a single command. * 1293 * This reduces the time it takes to obtain and display all of the * 1294 * information. No changes are accepted here. * 1295 * In addition, the device type is extracted and displayed in * 1296 * text along with the slot and port numbers currently selected. * 1297 * * 1298 ********************************************************************************** 1299 1300 BLOCK 1301 ENTRY PPR 1302 ENTRY LISTPPR 1303 0001C8AE 1304 PPR LABEL 1C8AE DC41C8B0 1305 CALLNP LISTPPR list the PPU registers 1C8AF FE0FBDC8 1306 JMP RDUOK pretty easy 1307 * --- 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 357 (RDUDISP) F 27 Register Commands 1309 1310 ********************************************************************************** 1311 * * 1312 * LISTPPR lists the PPU registers for the PPU * 1313 * specified in PPUSLOT and the port specified in PPUPORT. * 1314 * The registers listed are DID, IS, CS1, CS2, BC1, BC2, * 1315 * MA1, and MA2. * 1316 * Call: * 1317 * PPUPORT = port number to display * 1318 * PPUSLOT = PPU slot number * 1319 * CALLNP LISTPPR * 1320 * Eats R0:R4. * 1321 * * 1322 ********************************************************************************** 1323 1324 BLOCK 1325 ENTRY LISTPPR 1326 1327 BEGFRAME 00178801 6 BASE 1328 PPRR3 BSS 1 temp for R3 00178802 6 BASE 1329 PPRR5 BSS 1 temp for R5 1330 ENDFRAME 1331 1C8B0 DD5F8003 6 STAK 1332 LISTPPR ENTRNP PUSH 1C8B1 E5578802 5 6 BASE 1333 ST R5 SP,PPRR5 save R5 1C8B2 6001A980 0 1334 LD R0 PPUPORT get port number to use 1C8B3 60440000 1 IMM 1335 LD R1 0 clear memory address 1C8B4 E40A5840 0 1 CBM 1336 ST R0 R1/PORTSPOT set the port number 1C8B5 E441A91F 1 1337 ST R1 ADDRESS then remember the address 1C8B6 DC41B86C 1338 CALLNP BLANKOUTW make a new line 1C8B7 6005CE47 0 IMM 1339 LD R0 ADR(MESPPU) point to name message 1C8B8 DC41B87B 1340 CALLNP MESSMOVE add to output line 1C8B9 6001A97E 0 1341 LD R0 PPUSLOT get slot number 1C8BA E401A8ED 0 1342 ST R0 VALUE always have to diddle 1C8BB DC41B605 1343 CALLNP HEXOUTD output a single digit 1C8BC 18C40001 3 IMM 1344 ADD OBP 1 advance pointer 1C8BD 6001A980 0 1345 LD R0 PPUPORT now get the port number 1C8BE E401A8ED 0 1346 ST R0 VALUE same old thing 1C8BF DC41B605 1347 CALLNP HEXOUTD and decode that too 1C8C0 E4D78801 3 6 BASE 1348 ST OBP SP,PPRR3 save pointer from harm 1C8C1 DC01BBAC 1349 CALL SHIPCOM request the device id 1C8C2 4101BBF5 1350 PAR RESPERROR error address 1C8C3 41440000 IMM 1351 PARV KLAS0 class=0 1C8C4 4141A97E 1352 PARV PPUSLOT slot=ppu 1C8C5 41440002 IMM 1353 PARV BCMREAD bcm=2 1C8C6 4041A91F 1354 PARVL ADDRESS address=port+0 1C8C7 60D78801 3 6 BASE 1355 LD OBP SP,PPRR3 restore buffer pointer 1C8C8 6001F38E 0 1356 LD R0 DATA(1) get the data word 1C8C9 FA03C8CD 0 1357 JEQZ R0 PPR05 jump if no device there 1C8CA 600A0840 0 0 CBM 1358 LD R0 R0/BITS 4:7 extract the device code 1C8CB 6021CEBE 0 0 1359 LD R0 DEVMESTAB(R0) point to proper message 1C8CC DC41B87B 1360 CALLNP MESSMOVE add to the other info 0001C8CD 1361 PPR05 LABEL 1C8CD DC41B886 1362 CALLNP OUTO list out the line 1363 * \ / 1364 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 358 (RDUDISP) F 27 Register Commands 1C8CE 61440000 5 IMM 1365 LD R5 0 from the top... 0001C8CF 1366 PPR10 LABEL 1C8CF DC41B86F 1367 CALLNP BLANKOUT start clean 1C8D0 61040003 4 IMM 1368 LD R4 NREGPL-1 how many per line? 0001C8D1 1369 PPR20 LABEL 1C8D1 DC01BBAC 1370 CALL SHIPCOM issue request for registers 1C8D2 4101BBF5 1371 PAR RESPERROR error address 1C8D3 41440000 IMM 1372 PARV KLAS0 class=0 1C8D4 4141A97E 1373 PARV PPUSLOT slot=PPU 1C8D5 41440002 IMM 1374 PARV BCMREAD bcm=2 1C8D6 4041A91F 1375 PARVL ADDRESS address=port+r7 1C8D7 D001A91F 1376 INC ADDRESS advance to next location 1C8D8 60E9CD77 3 4 1377 LD OBP PPUREGSPOT(R4) get line position to move to 1C8D9 3A2BCE49 0 5 1378 LEA2 R0 MESPPR(R5) point to register name 1C8DA DC41B87B 1379 CALLNP MESSMOVE put name into line buffer 1C8DB 6001F38E 0 1380 LD R0 DATA(1) get the value 1C8DC E401A8ED 0 1381 ST R0 VALUE where we need it 1C8DD DC41B5F1 1382 CALLNP HEXOUT list the value out 1C8DE 19440001 5 IMM 1383 ADD R5 1 advance to next register 1C8DF 65440008 5 IMM 1384 CPR R5 NPPR how many are there? 1C8E0 FE07C8E4 1385 JGE PPR30 jump if done them all 1C8E1 FB27C8D1 4 1386 JDR R4 PPR20 else continue on 1387 * \ / 1388 1C8E2 DC41B886 1389 CALLNP OUTO list line if full 1C8E3 FE0FC8CF 1390 JMP PPR10 then start a new line 1391 * --- 1392 0001C8E4 1393 PPR30 LABEL 1C8E4 DC41B886 1394 CALLNP OUTO and list out the last line 1C8E5 61578802 5 6 BASE 1395 LD R5 SP,PPRR5 restore R5 1C8E6 5D1F8003 6 STAK 1396 LEAVE POP 1397 * --- 1398 1399 END of LISTPPR 1400 1401 END of PPU register command 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 359 (RDUDISP) F 27 MB1 and MB2 Commands 1404 1405 ********************************************************************************** 1406 * * 1407 * This section processes the SSU message commands (MB1 & MB2). * 1408 * These display the contents of the "blue lights" message buffers. * 1409 * No input is accepted and no other processing takes place. * 1410 * * 1411 ********************************************************************************** 1412 1413 BLOCK 1414 ENTRY SSMSG 1415 ENTRY DOSSMSG 1416 0001C8E7 1417 SSMSG LABEL 1C8E7 DC01C8ED 1418 CALL DOSSMSG well, do it to it 1C8E8 4141A97F 1419 PARV SSUSLOT pass slot of SSU 1C8E9 40495564 5 ZBM 1420 PARVL COM,GMMBASE pass starting address 1C8EA 6005A830 0 IMM 1421 LD R0 ADR(SBUFFW) R0 -> message 1C8EB DC41B88A 1422 CALLNP OUT then list the line 1C8EC FE0FBDC8 1423 JMP RDUOK then return for more 1424 * --- 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 360 (RDUDISP) F 27 MB1 and MB2 Commands 1426 1427 ********************************************************************************** 1428 * * 1429 * DOSSMSG will convert the contents of one of the SSU * 1430 * message buffers to normal ascii and leave the result in * 1431 * SBUFF, terminated by a zero. * 1432 * Call: * 1433 * CALL DOSSMSG * 1434 * PARV SLOT * 1435 * PARVL
* 1436 * Eats R0:R4. * 1437 * * 1438 ********************************************************************************** 1439 1440 BLOCK 1441 ENTRY DOSSMSG 1442 1443 BEGFRAME 00178801 6 BASE 1444 DOSSSLOT BSS 1 slot of SSU 00178802 6 BASE 1445 DOSSADDR BSS 1 address of message buffer 1446 ENDFRAME 1447 1C8ED DD1F8003 6 STAK 1448 DOSSMSG ENTR PUSH 1C8EE C1578801 6 BASE 1449 STPV SP,DOSSSLOT save slot 1C8EF C0578802 6 BASE 1450 STPVL SP,DOSSADDR save message buffer address 1451 1C8F0 6107FFFE 4 IMM 1452 LD R4 -2 start at front of buffer 0001C8F1 1453 SSMG10 LABEL 1C8F1 60938000 2 6 REG 1454 LD R2 SP get pointer to stack frame 1C8F2 DC01BBAC 1455 CALL SHIPCOM request the data 1C8F3 4101BBF5 1456 PAR RESPERROR error address 1C8F4 41440000 IMM 1457 PARV KLAS0 class=0 1C8F5 41568801 2 BASE 1458 PARV R2,DOSSSLOT slot=SSU 1C8F6 41440002 IMM 1459 PARV BCMREAD bcm=2 1C8F7 40568802 2 BASE 1460 PARVL R2,DOSSADDR address=(from command) 1C8F8 D0178802 6 BASE 1461 INC SP,DOSSADDR advance to next address 1462 1463 * Convert the value from 6 bit ascii to 8 bit ascii. 1C8F9 DC01C900 1464 CALL ASCII6TO8 convert to 8 bit ascii 1C8FA 4001F38E 1465 PARL DATA(1) what to convert 1C8FB E429A832 0 4 1466 ST R0 SBUFFW(R4+2) place in output buffer 1C8FC FB25C8F1 4 1467 JIR R4 SSMG10 continue for entire buffer 1468 * \ / 1469 1C8FD 6004000A 0 IMM 1470 LD R0 10 how many characters are in the buffer? 1C8FE EC31AC02 0 @ 1471 STZ @SBPT(R0) terminate the message 1C8FF 5D1F8003 6 STAK 1472 LEAVE POP 1473 * --- 1474 1475 END of DOSSMSG subroutine 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 361 (RDUDISP) F 27 MB1 and MB2 Commands 1477 1478 ********************************************************************************** 1479 * * 1480 * ASCII6TO8 converts a word of 6 bit ascii to * 1481 * 8 bit ascii. * 1482 * Call: * 1483 * CALL ASCII6TO8 * 1484 * PARL * 1485 * R0 = converted word * 1486 * Eats R0:R1. * 1487 * * 1488 ********************************************************************************** 1489 1490 BLOCK 1491 ENTRY ASCII6TO8 1492 1493 BEGFRAME 1494 ENDFRAME 1495 1C900 DD1F8001 6 STAK 1496 ASCII6TO8 ENTR PUSH 1C901 C0124000 1 REG 1497 STPL R1 1C902 60164800 0 1 BASE 1498 LD R0 R1,0 get the value 1C903 7801AC11 0 1499 AND R0 BLANKS first we must diddle data 1C904 7401AC11 0 1500 XOR R0 BLANKS twiddle six-bit to eight 1C905 600A0200 0 0 CBM 1501 LD R0 R0/BITS 1:0 shift left one bit 1C906 7C164800 0 1 BASE 1502 IOR R0 R1,0 then beat against original 1C907 5D1F8001 6 STAK 1503 LEAVE POP 1504 * --- 1506 1507 END of ASCII6TO8 subroutine 1508 1509 END of SSU MB1 and MB2 command 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 362 (RDUDISP) F 27 Timeset Command 1511 1512 ********************************************************************************** 1513 * * 1514 * This section processes the TIMESET command. It is used to obtain * 1515 * the current clock from the host system and ship it to the remote * 1516 * site. This leaves the remote system within 4 seconds of reality. * 1517 * * 1518 ********************************************************************************** 1519 1520 BLOCK 1521 ENTRY TIMESET 1522 0001C908 1523 TIMESET LABEL 1C908 60040060 0 IMM 1524 LD R0 URRAWDATE get date fetch request 1C909 09040000 IMM 1525 UREQ 0+XREQ obtain raw date from host 1C90A 600AC140 0 3 CBM 1526 LD R0 R3/BITS 0:19 pick up lower 20 bits 1C90B E48A00C0 2 0 CBM 1527 ST R2 R0/BITS 0:11 and top 12 1C90C E401A830 0 1528 ST R0 SBUFFW put into input buffer word 1C90D FE0FC720 1529 JMP MEMSEND then send out new value 1530 * --- 1531 1532 END of TIMESET command 153 154 INPUT RDUDOFILE 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 363 (RDUDOFILE) F 28 DO File Start-up 3 4 BLOCK DO file processor 5 ENTRY DO 6 ENTRY DODESTROY 7 ENTRY SENDSTR 8 ENTRY RECEIVE 9 ENTRY WAIT 10 11 ********************************************************************************** 12 * * 13 * This is the DO file start-up center for the RDU. We open * 14 * the file, set flags indicating we are working a DO file, then go * 15 * execute the commands from the file. * 16 * * 17 ********************************************************************************** 18 0001C90E 19 DO LABEL 1C90E 5C01A8D7 20 CMZ CPSTATE concurrent session running? 1C90F FE0DC924 21 JNE DOFILERR if so then we have a problem 22 * \ / 23 1C910 6001AC14 0 24 LD R0 EXTDO use DO for the extension 1C911 DC41BD4A 25 CALLNP FILEGET try to pick up the DO file 1C912 FA0DBE35 0 26 JNEZ R0 RDUERR if we could not get the file 27 * \ / 28 1C913 E441A8DD 1 29 ST R1 DOUNIT save the unit number of the DO file 1C914 EDC1A8DA 30 STW DOFLAG say we are getting commands from a do file 1C915 EC01A8DB 31 STZ DOLIST assume not listing commands 1C916 EC01A8DC 32 STZ DOSUPP assume not suppressing data display 1C917 DC41F7C5 33 CALLNP SIMWBRKS turn on break handling 34 * \ / 35 0001C918 36 DOPARMS LABEL 1C918 DC41B33C 37 CALLNP FETCHAP see if requesting command listing 1C919 F6BFBE8C 2 38 JBT R2/TEOL RDUDO no parameters, so go read the DO file 1C91A F2AFC926 2 39 JBF R2/TALPH DOERR if not alpha then done 40 * \ / 41 1C91B 6001A830 0 42 LD R0 SBUFFW get the parameter 1C91C 6801AC15 0 43 UCPR R0 ASCILIST is it "LIST"? 1C91D FE0DC920 44 JNE DOPARMS1 if not, maybe it is a suppress 1C91E EDC1A8DB 45 STW DOLIST let's list the commands 1C91F FE0FC918 46 JMP DOPARMS see if another parameter 47 * --- 48 0001C920 49 DOPARMS1 LABEL 1C920 6801AC16 0 50 UCPR R0 ASCISUPP "SUPP" maybe suppress 1C921 FE0DC926 51 JNE DOERR if not this then we have a problem 1C922 EDC1A8DC 52 STW DOSUPP say to suppress data in interactive mode 1C923 FE0FC918 53 JMP DOPARMS see if any more parameters to pick up 54 * --- 55 56 * The lazy bum is trying to do a concurrent process and a do file. 0001C924 57 DOFILERR LABEL 1C924 6005D2ED 0 IMM 58 LD R0 ADR ERM516 "Can not run DO file and concurrent... 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 364 (RDUDOFILE) F 28 DO File Start-up 1C925 FE0FBE35 59 JMP RDUERR 60 * --- 61 0001C926 62 DOERR LABEL 1C926 6005CF46 0 IMM 63 LD R0 ADR ERM112 "Bad parameters... 1C927 FE0FBEAD 64 JMP RDUDOERR 65 * --- 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 365 (RDUDOFILE) F 28 DO File Cleanup Routine 68 69 ********************************************************************************** 70 * * 71 * DODESTROY will clean up the mess left over by a DO file if * 72 * there was a do file running. All necessary flags are reset and * 73 * the do file unit is given back. * 74 * Call: * 75 * CALLNP DODESTROY * 76 * Eats R0. * 77 * * 78 ********************************************************************************** 79 80 BLOCK 81 ENTRY DODESTROY 82 83 BEGFRAME 84 ENDFRAME 85 1C928 DD5F8001 6 STAK 86 DODESTROY ENTRNP PUSH 1C929 D181A8DA 87 CLRT DOFLAG turn this off 1C92A FE03C931 88 JEQ DODESTEXIT leave if no DO file to clean up after 89 * \ / 90 1C92B DC41F7CA 91 CALLNP SIMNOBRKS turn off break processing 1C92C 60040060 0 IMM 92 LD R0 FRCLOSE request to close the file 1C92D 0881A8DD 93 FREQ DOUNIT the DO file unit 1C92E EC01A8DC 94 STZ DOSUPP no longer suppressing data 1C92F EC01A8DB 95 STZ DOLIST not listing commands 1C930 EC01A8C1 96 STZ RECVACTIVE not waiting for string 97 * \ / 98 0001C931 99 DODESTEXIT LABEL 1C931 5D1F8001 6 STAK 100 LEAVE POP 101 * --- 102 103 END of DODESTROY subroutine 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 366 (RDUDOFILE) F 28 Send and Send* commands 106 107 ********************************************************************************** 108 * * 109 * The SEND and SEND* commands come here for processing. * 110 * We pick up the string to be sent from the parameter line and * 111 * send it to the remote machine as an interactive command. For * 112 * SEND we tack on a terminating CR. * 113 * For either command the string may be a single word not * 114 * contained in quotes, or it may be a string of words contained * 115 * within quotes. We recognize ^ as a control character iff * 116 * it appears as a single entity without quotes. * 117 * * 118 ********************************************************************************** 119 120 BLOCK 121 ENTRY SENDSTR 122 ENTRY RECEIVE 123 124 0001C932 125 SENDSTR LABEL 1C932 60C5A866 3 IMM 126 LD R3 ADR CBUFF buffer sending interactive stuff 1C933 DC41C960 127 CALLNP FETCHDOPAR get the string to send 1C934 FA0DBEAD 0 128 JNEZ R0 RDUDOERR error in do string 129 * \ / 130 1C935 6545B00F 5 IMM 131 CPR COM ADR SENDCOM is this the SEND or SEND* command? 1C936 FE0DC93A 132 JNE SENDNOCR if not SEND then don't add CR 1C937 6004000D 0 IMM 133 LD R0 CR terminator we attach 1C938 E433AC03 0 1 @ 134 ST R0 @CBPT(R1) tack it on the end 1C939 18440001 1 IMM 135 ADD R1 1 for the extra character 0001C93A 136 SENDNOCR LABEL 1C93A 9841A911 1 137 ADDM R1 CPI set pointer to end of input 1C93B EC01A8BF 138 STZ DOBUFBEG initialize buffer pointers 1C93C EC01A8C0 139 STZ DOBUFEND initialize buffer pointers 1C93D EDC1A8C1 140 STW RECVACTIVE waiting for string 0001C93E 141 SENDAGAIN LABEL 1C93E DC41BC7E 142 CALLNP SHIPNOP send the string to the remote system 1C93F D181A8E0 143 CLRT UBREAK does dear user want out? 1C940 FE0DBEAE 144 JNE RDUDODONE if so, let him 1C941 5C01A911 145 CMZ CPI is the buffer emptied? 1C942 FE07C93E 146 JGE SENDAGAIN if not then send again 1C943 5C01A912 147 CMZ CPO both of these should be -1 1C944 FE07C93E 148 JGE SENDAGAIN if not then send again 1C945 FE0FBDC8 149 JMP RDUOK get another command 150 * --- 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 367 (RDUDOFILE) F 28 Receive and Receive* Commands 153 154 ********************************************************************************** 155 * * 156 * The RECEIVE and RECEIVE* commands pick up data from the * 157 * remote machine and try to find a match for the string * 158 * specified with the command. The RECEIVE version adds a * 159 * CR terminator on to the expected string. * 160 * Until a match is found we just keep on looking through * 161 * incoming data so the user had best be sure that the desired * 162 * string will arrive. If all else fails a break will get us * 163 * out of the mess and dump the DO file being processed. * 164 * * 165 ********************************************************************************** 166 0001C946 167 RECEIVE LABEL 1C946 60C5A885 3 IMM 168 LD R3 ADR RECBUFF our buffer for receive string 1C947 DC41C960 169 CALLNP FETCHDOPAR pick up the desired string 1C948 FA0DBEAD 0 170 JNEZ R0 RDUDOERR if error, then output message and clean up 171 * \ / 172 1C949 6545AFDE 5 IMM 173 CPR COM ADR RECEIVECOM which command is this? 1C94A FE0DC94E 174 JNE DONTADDCR don't add the CR if RECEIVE* 1C94B 6004000D 0 IMM 175 LD R0 CR 1C94C E433AC06 0 1 @ 176 ST R0 @RECPT(R1) tack on a terminator 1C94D 18440001 1 IMM 177 ADD R1 1 one more char in the buffer 0001C94E 178 DONTADDCR LABEL 1C94E E441A89D 1 179 ST R1 RECENDPTR save number of chars to match 180 * \ / 1C94F FE0FC951 181 JMP RECLENTRY skip first NOP transmission 182 * --- 183 0001C950 184 RECLOOP LABEL 1C950 DC41BC7E 185 CALLNP SHIPNOP get any waiting response 0001C951 186 RECLENTRY LABEL 1C951 DC41C988 187 CALLNP RECCHECK check the received data 1C952 FE0FC95E 188 JMP RECFOUND jump if found what we were looking for 189 1C953 D181A8E0 190 CLRT UBREAK did a break come in 1C954 FE0DBEAE 191 JNE RDUDODONE if so, then blow away the DO file 192 1C955 6001F38B 0 193 LD R0 RESPBINDX see how much response we got 1C956 64040010 0 IMM 194 CPR R0 MAXRESPS was it a full load 1C957 FE03C950 195 JEQ RECLOOP if so then pick up some more reponse 196 * \ / 197 1C958 60040140 0 IMM 198 LD R0 URDELAY let's wait a little bit 1C959 60440002 1 IMM 199 LD R1 2 how long to delay 1C95A 60820400 2 IMM 200 LD R2 BRKMASK allow breaks to interrupt us 1C95B 09040000 IMM 201 UREQ 0 1C95C FA4DBEAE 1 202 JNEZ R1 RDUDODONE jump if break occured during delay 1C95D FE0FC950 203 JMP RECLOOP 204 * --- 205 0001C95E 206 RECFOUND LABEL 1C95E EC01A8C1 207 STZ RECVACTIVE not waiting for string 1C95F FE0FBE8C 208 JMP RDUDO found what we were looking for, return 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 368 (RDUDOFILE) F 28 Receive and Receive* Commands 209 * --- 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 369 (RDUDOFILE) F 28 Parameter Fetcher for Send and Receive Commands 212 213 ********************************************************************************** 214 * * 215 * FETCHDOPAR gets the parameter from a do file send or * 216 * receive line. This is expected to either have the form of * 217 * a string of characters enclosed in double quotes, or a single * 218 * word. If the parameter is a single word and the first character * 219 * is an up-arrow (^), then we change it to a control character. * 220 * The parameter is then moved into a destination buffer * 221 * chosen by the caller. * 222 * Call: * 223 * BUFPT -> input buffer position * 224 * IBUFF contains input string * 225 * R3 -> destination buffer * 226 * CALLNP FETCHDOPAR * 227 * JNEZ R0 (R0 -> error message> * 228 * R1 = number of chars * 229 * Eats R0:R2. * 230 * * 231 ********************************************************************************** 232 233 BLOCK 234 ENTRY FETCHDOPAR 235 236 BEGFRAME 00178801 6 BASE 237 DOPARLEN BSS 1 place to keep length safe 238 ENDFRAME 239 1C960 DD5F8002 6 STAK 240 FETCHDOPAR ENTRNP PUSH 1C961 60440030 1 IMM 241 LD R1 OKLEN/2 how far to search for a char 1C962 6001A8E5 0 242 LD R0 BUFPT R0 -> postion in buffer 1C963 60840020 2 IMM 243 LD R2 BLANK what we are not searching for 1C964 FE520000 244 CSRCHN let's go looking 1C965 FE03C975 245 JEQ DOPARERR error if only found blanks 246 * \ / 247 1C966 E401A8E5 0 248 ST R0 BUFPT save postion in buffer 1C967 60560000 1 0 CACH 249 LD R1 CACH R0,0 get the terminating char 1C968 64440022 1 IMM 250 CPR R1 QUOTES double quotes? 1C969 FE0DC977 251 JNE DONOQUOTE if not then terminated by CR 252 * \ / 253 1C96A DC41B33C 254 CALLNP FETCHAP get the quoted string 1C96B FA83C975 2 255 JEQZ R2 DOPARERR jump if error 1C96C F2A9C975 2 256 JBF R2/TSTR DOPARERR or we did not get a quoted string 1C96D 6005A830 0 IMM 257 LD R0 ADR SBUFFW point to our string 1C96E 6041A8ED 1 258 LD R1 VALUE get the length of the string 259 * \ / 260 0001C96F 261 DOPARMOVE LABEL 1C96F E4578801 1 6 BASE 262 ST R1 SP,DOPARLEN save the length 1C970 6092C000 2 3 REG 263 LD R2 R3 R2 -> destination 1C971 FE400000 264 CMOVE move the new string in 1C972 60578801 1 6 BASE 265 LD R1 SP,DOPARLEN restore the length 1C973 60040000 0 IMM 266 LD R0 0 all ok 0001C974 267 DOPAREXIT LABEL 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 370 (RDUDOFILE) F 28 Parameter Fetcher for Send and Receive Commands 1C974 5D1F8002 6 STAK 268 LEAVE POP 269 * --- 270 0001C975 271 DOPARERR LABEL 1C975 6005D306 0 IMM 272 LD R0 ADR ERM550 "Bad entry in DO file" 1C976 FE0FC974 273 JMP DOPAREXIT 274 * --- 275 0001C977 276 DONOQUOTE LABEL 1C977 6444005E 1 IMM 277 CPR R1 UPARROW is terminator an up-arrow? 1C978 FE03C980 278 JEQ DOPARCNTL if so then we have a control char 1C979 6084000D 2 IMM 279 LD R2 CR CR terminator 1C97A 60440060 1 IMM 280 LD R1 OKLEN how far we will search for the terminator 1C97B FE560000 281 CSRCH now look for it 1C97C FE0DC975 282 JNE DOPARERR if not found, then error 1C97D 30440060 1 IMM 283 RSB R1 OKLEN find how much was there 1C97E 6001A8E5 0 284 LD R0 BUFPT R0 -> beginning of the string 1C97F FE0FC96F 285 JMP DOPARMOVE 286 * --- 287 0001C980 288 DOPARCNTL LABEL 1C980 D00A1F30 0 CBM 289 INC R0/NXTCHAR move to the next character 1C981 E401A8E5 0 290 ST R0 BUFPT 1C982 DC41B39C 291 CALLNP GETCHAR get the character 1C983 10040040 0 IMM 292 SUB R0 040 convert to a control character 1C984 E416C000 0 3 CACH 293 ST R0 CACH R3,0 put into the destination buffer 1C985 60440001 1 IMM 294 LD R1 1 number of chars in buffer 1C986 60040000 0 IMM 295 LD R0 0 inidcate a safe landing 1C987 FE0FC974 296 JMP DOPAREXIT 297 * --- 298 299 END of FETCHDOPAR 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 371 (RDUDOFILE) F 28 Receive String Checker 302 303 ********************************************************************************** 304 * * 305 * RECCHECK checks incoming characters for a match to the * 306 * string in RECBUFF. * 307 * Call: * 308 * DATA contains response from remote machine * 309 * RECENDPTR contains number of chars in RECEIVE string * 310 * CALLNP RECCHECK * 311 * JMP match was found * 312 * Eats R0:R3. * 313 * * 314 ********************************************************************************** 315 316 BLOCK 317 ENTRY RECCHECK 318 319 BEGFRAME 320 ENDFRAME 321 1C988 DD5F8001 6 STAK 322 RECCHECK ENTRNP PUSH 0001C989 323 RECCHKLOOP LABEL 1C989 DC41C9B5 324 CALLNP FINDFIRST find the first char we are looking for 1C98A FE0FC995 325 JMP RECCHKEND get out of here if not found 326 1C98B DC41C9AB 327 CALLNP DOBUFUSED 1C98C 6441A89D 1 328 CPR R1 RECENDPTR is there enough to bother comparing? 1C98D FE09C995 329 JLT RECCHKEND if not then don't 330 * \ / 331 1C98E DC41C9D2 332 CALLNP COMPARESTR now compare the strings 1C98F FE0FC95E 333 JMP RECFOUND quit if found our target 1C990 BC01A8BF 0 334 INCL R0 DOBUFBEG start search at next char in string 1C991 64040083 0 IMM 335 CPR R0 DOBUFLEN beyond the buffer? 1C992 FE09C989 336 JLT RECCHKLOOP all ok if not 1C993 EC01A8BF 337 STZ DOBUFBEG loop around 1C994 FE0FC989 338 JMP RECCHKLOOP try again 339 * --- 340 0001C995 341 RECCHKEND LABEL 1C995 19C40001 7 IMM 342 ADD R7 1 not found return L 343 RECFOUND LABEL 1C996 5D1F8001 6 STAK 344 LEAVE POP 345 * --- 346 ***** LINES WITH ERRORS = 1 ***** 347 END of RECCHECK subroutine 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 372 (RDUDOFILE) F 28 Receive String Checker 349 350 ********************************************************************************** 351 * * 352 * FILLDOBUF moves the input data into the * 353 * circular buffer used to keep characters when looking for * 354 * a match against a RECEIVE string. * 355 * We only do the move between a SEND or SEND* and * 356 * a RECEIVE or RECEIVE*. Otherwise, RECVACTIVE is zero * 357 * and we skip the whole move operation. * 358 * Call: * 359 * EVENTADDR and EVENTLEN contain the received string info * 360 * DOBUFEND is index to next char position in buffer * 361 * CALLNP FILLDOBUF * 362 * Eats R0:R3 * 363 * * 364 ********************************************************************************** 365 366 BLOCK 367 ENTRY FILLDOBUF 368 369 BEGFRAME 00178801 6 BASE 370 NUMOFCHARS BSS 1 number of chars to move 371 ENDFRAME 372 1C997 DD5F8002 6 STAK 373 FILLDOBUF ENTRNP PUSH 1C998 5C01A8C1 374 CMZ RECVACTIVE check for caring 1C999 FE03C9AA 375 JEQ FILLDOEND no overhead if not in position in DO file 1C99A 6081A8C0 2 376 LD R2 DOBUFEND get current position in buffer 1C99B 38B5AC07 2 2 @ 377 LEA R2 @DOBFPT(R2) R2 -> where to put next chars 1C99C 6041AA4B 1 378 LD R1 EVENTLEN get number of characters received and 1C99D E4578801 1 6 BASE 379 ST R1 SP,NUMOFCHARS ...save for move 380 1C99E 60440083 1 IMM 381 LD R1 DOBUFLEN how big the buffer is 1C99F 1041A8C0 1 382 SUB R1 DOBUFEND where we are currently in the buffer 1C9A0 50578801 1 6 BASE 383 MIN R1 SP,NUMOFCHARS don't exceed our resources 1C9A1 64578801 1 6 BASE 384 CPR R1 SP,NUMOFCHARS is there enough room for our chars? 1C9A2 FE07C9A8 385 JGE ROOMENUF jump if so 386 * \ / 387 1C9A3 B0578801 1 6 BASE 388 RSBM R1 SP,NUMOFCHARS indicate how many we are moving 1C9A4 FE400000 389 CMOVE 1C9A5 60578801 1 6 BASE 390 LD R1 SP,NUMOFCHARS how many left to move 1C9A6 6081AC07 2 391 LD R2 DOBFPT point to beginning of buffer 1C9A7 EC01A8C0 392 STZ DOBUFEND buffer positioned at beginning 393 * \ / 394 0001C9A8 395 ROOMENUF LABEL 1C9A8 9841A8C0 1 396 ADDM R1 DOBUFEND keep the position up to date 1C9A9 FE400000 397 CMOVE do the move 398 * \ / 399 0001C9AA 400 FILLDOEND LABEL 1C9AA 5D1F8002 6 STAK 401 LEAVE POP 402 * --- 403 404 END of FILLDOBUF 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 373 (RDUDOFILE) F 28 Receive String Checker 406 407 ********************************************************************************** 408 * * 409 * DOBUFUSED returns the number of buffered characters in * 410 * DOBUFF. * 411 * Call: * 412 * DOBUFBEG and DOBUFEND must be set * 413 * CALLNP DOBUFUSED * 414 * R1 = number of chars * 415 * Uses only R1. * 416 * * 417 ********************************************************************************** 418 419 BLOCK 420 ENTRY DOBUFUSED 421 422 BEGFRAME 423 ENDFRAME 424 1C9AB DD5F8001 6 STAK 425 DOBUFUSED ENTRNP PUSH 1C9AC 6041A8C0 1 426 LD R1 DOBUFEND get end of buffer index 1C9AD 6441A8BF 1 427 CPR R1 DOBUFBEG is it before or after beginning 1C9AE FE09C9B1 428 JLT WRAPPED if smaller then we must have wrapped around 429 * \ / 430 1C9AF 1041A8BF 1 431 SUB R1 DOBUFBEG get the amount of buffer filled 0001C9B0 432 USEDEND LABEL 1C9B0 5D1F8001 6 STAK 433 LEAVE POP 434 * --- 435 0001C9B1 436 WRAPPED LABEL 1C9B1 60440083 1 IMM 437 LD R1 DOBUFLEN get length of buffer 1C9B2 1041A8BF 1 438 SUB R1 DOBUFBEG see how much is used at the end 1C9B3 1841A8C0 1 439 ADD R1 DOBUFEND add in the amount used at the beginning 1C9B4 FE0FC9B0 440 JMP USEDEND and we are done 441 * --- 442 443 END of DOBUFUSED 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 374 (RDUDOFILE) F 28 Receive String Checker 445 446 ********************************************************************************** 447 * * 448 * FINDFIRST searches DOBUFF for the first char in the * 449 * RECBUFF. If found we set DOBUFBEG to point to it, if not we * 450 * know that all the reponses we have are not what we want so * 451 * DOBUF is setup to be empty. * 452 * Call: * 453 * DOBUFBEG and DOBUFEND must be set * 454 * CALLNP FINDFIRST * 455 * JMP first char not found * 456 * DOBUFBEG = index to char found * 457 * R0 -> character position * 458 * Eats R0:R2. * 459 * * 460 ********************************************************************************** 461 462 BLOCK 463 ENTRY FINDFIRST 464 465 BEGFRAME 466 ENDFRAME 467 1C9B5 DD5F8001 6 STAK 468 FINDFIRST ENTRNP PUSH 1C9B6 6041A8BF 1 469 LD R1 DOBUFBEG index to end postion of buffer 1C9B7 3833AC07 0 1 @ 470 LEA R0 @DOBFPT(R1) R0 -> start of chars to search 1C9B8 6441A8C0 1 471 CPR R1 DOBUFEND has it wrapped around? 1C9B9 FE05C9C3 472 JGT FFWRAPPED if so treat special 1C9BA FE03C9C2 473 JEQ FFERREND if they are equal then nothing there 474 * \ / 475 1C9BB 3041A8C0 1 476 RSB R1 DOBUFEND number of chars to search 1C9BC 6091AC06 2 @ 477 LD R2 @RECPT char to search for 1C9BD FE560000 478 CSRCH look for the character 1C9BE FE0DC9CF 479 JNE FFNOTFOUND 480 * \ / 481 1C9BF 3041A8C0 1 482 RSB R1 DOBUFEND determine postion of match 0001C9C0 483 FOUNDFIRST LABEL 1C9C0 E441A8BF 1 484 ST R1 DOBUFBEG call this the beginning position 1C9C1 19C40001 7 IMM 485 ADD R7 1 found char return 486 * \ / 487 0001C9C2 488 FFERREND LABEL 1C9C2 5D1F8001 6 STAK 489 LEAVE POP 490 * --- 491 492 * The buffer has wrapped around so we must search it in parts 0001C9C3 493 FFWRAPPED LABEL 1C9C3 30440083 1 IMM 494 RSB R1 DOBUFLEN determine length to end of buffer 1C9C4 6091AC06 2 @ 495 LD R2 @RECPT pick up char to search for 1C9C5 FE560000 496 CSRCH see if we can find it 1C9C6 FE0DC9C9 497 JNE FFTRYEND if not found, then wrap around 1C9C7 30440083 1 IMM 498 RSB R1 DOBUFLEN get position of char in the buffer 1C9C8 FE0FC9C0 499 JMP FOUNDFIRST 500 * --- 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 375 (RDUDOFILE) F 28 Receive String Checker 501 502 * The physical end (logical begin) of the buffer did not contain char. 0001C9C9 503 FFTRYEND LABEL 1C9C9 6001AC07 0 504 LD R0 DOBFPT R0 -> physical start of buffer 1C9CA 6041A8C0 1 505 LD R1 DOBUFEND how far to search 1C9CB FE560000 506 CSRCH R2 still contains desired char 1C9CC FE0DC9CF 507 JNE FFNOTFOUND must not have been picked up yet 1C9CD 3041A8C0 1 508 RSB R1 DOBUFEND get the index of the found char 1C9CE FE0FC9C0 509 JMP FOUNDFIRST and leave 510 * --- 511 512 * The first char was not found so all response may be dumped. 0001C9CF 513 FFNOTFOUND LABEL 1C9CF EC01A8C0 514 STZ DOBUFEND wipe out end pointer 1C9D0 EC01A8BF 515 STZ DOBUFBEG and wipe out beginning pointer 1C9D1 FE0FC9C2 516 JMP FFERREND 517 * --- 518 519 END of FINDFIRST 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 376 (RDUDOFILE) F 28 Receive String Checker 521 522 ********************************************************************************** 523 * * 524 * COMPARESTR compares the string in RECBUFF with the response * 525 * from the remote machine in DOBUFF. The comparison starts at the * 526 * first of RECBUFF and goes RECENDPTR chars. It starts at DOBUFBEG * 527 * in DOBUFF and will wrap around if necessary. We assume that the * 528 * first character in both strings match and that there are enough * 529 * characters received in DOBUFF to match against RECBUFF. * 530 * Call: * 531 * CALLNP COMPARESTR * 532 * JMP they matched!! * 533 * no match * 534 * Eats R0:R3. * 535 * * 536 ********************************************************************************** 537 538 BLOCK 539 ENTRY COMPARESTR 540 541 BEGFRAME 542 ENDFRAME 543 1C9D2 DD5F8001 6 STAK 544 COMPARESTR ENTRNP PUSH 1C9D3 6081AC06 2 545 LD R2 RECPT R2 -> RECEIVE string 1C9D4 6041A89D 1 546 LD R1 RECENDPTR how large of a string to search 1C9D5 64440001 1 IMM 547 CPR R1 1 is there just one char? 1C9D6 FE03C9DE 548 JEQ COMPMATCH if so then we found our match 1C9D7 60C1A8BF 3 549 LD R3 DOBUFBEG index to end postion of buffer 1C9D8 3837AC07 0 3 @ 550 LEA R0 @DOBFPT(R3) R0 -> start of chars to search 1C9D9 64C1A8C0 3 551 CPR R3 DOBUFEND has it wrapped around? 1C9DA FE05C9DF 552 JGT COMPWRAP if so check in parts 553 * \ / 554 0001C9DB 555 COMPFINISH LABEL 1C9DB FE540000 556 CMS compare the strings 1C9DC FE03C9DE 557 JEQ COMPMATCH jump if we have a winner 558 * \ / 559 0001C9DD 560 COMPNOMTCH LABEL 1C9DD 19C40001 7 IMM 561 ADD R7 1 not found return 0001C9DE 562 COMPMATCH LABEL 1C9DE 5D1F8001 6 STAK 563 LEAVE POP 564 * --- 565 0001C9DF 566 COMPWRAP LABEL 1C9DF 30C40083 3 IMM 567 RSB R3 DOBUFLEN amount of space left on end of buffer 1C9E0 E0D24000 3 1 REG 568 EXCH R3 R1 R1 = first compare char count 1C9E1 10D24000 3 1 REG 569 SUB R3 R1 R3 = second compare char count 1C9E2 FE540000 570 CMS compare the first string 1C9E3 FE0DC9DD 571 JNE COMPNOMTCH jump if it doesn't match 572 * \ / 573 1C9E4 6052C000 1 3 REG 574 LD R1 R3 1C9E5 6081AC07 2 575 LD R2 DOBFPT R2 -> beginning of buffer 1C9E6 FE0FC9DB 576 JMP COMPFINISH finish the compare 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 377 (RDUDOFILE) F 28 Receive String Checker 577 * --- 578 579 END of COMPARESTR 580 ***** LINES WITH ERRORS = 1 ***** 581 END of RECEIVE command 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 378 (RDUDOFILE) F 28 Wait Command 584 585 ********************************************************************************** 586 * * 587 * The WAIT command simply waits the desired number of * 588 * seconds picking up response from the remote machine and * 589 * processing it but doing no other command processing. This is * 590 * handy in DO files so that a SEND command can receive data * 591 * without using a RECEIVE command. * 592 * * 593 ********************************************************************************** 594 595 BLOCK 596 ENTRY WAIT 597 0001C9E7 598 WAIT LABEL 1C9E7 60040060 0 IMM 599 LD R0 URRAWDATE get the current system time 1C9E8 09040000 IMM 600 UREQ 0 1C9E9 6141A91F 5 601 LD R5 ADDRESS get the delay interval 1C9EA 1D41AC23 5 602 MUL R5 MSECSS convert to milliseconds 1C9EB 61040000 4 IMM 603 LD R4 0 set up for double math 1C9EC 1B148000 4523 PAIR 604 ADD2 R4 PAIR R2 get our quitting time 0001C9ED 605 WAITLOOP LABEL 1C9ED D181A8E0 606 CLRT UBREAK does dear user want out? 1C9EE FE0DBEAE 607 JNE RDUDODONE if so, let him 1C9EF DC41BC7E 608 CALLNP SHIPNOP get any waiting response 1C9F0 6001F38B 0 609 LD R0 RESPBINDX see how much response we got 1C9F1 64040010 0 IMM 610 CPR R0 MAXRESPS was it a full load 1C9F2 FE03C9ED 611 JEQ WAITLOOP if so then pick up some more reponse 612 * \ / 613 1C9F3 60040060 0 IMM 614 LD R0 URRAWDATE get the current system time 1C9F4 09040000 IMM 615 UREQ 0 1C9F5 66950000 2345 PAIR 616 CPR2 R2 PAIR R4 see if we have waited long enough 1C9F6 FE07BE8C 617 JGE RDUDO time to get another command 618 * \ / 619 1C9F7 60040140 0 IMM 620 LD R0 URDELAY let's wait a little bit 1C9F8 60440002 1 IMM 621 LD R1 2 how long to delay 1C9F9 6081AC24 2 622 LD R2 DLYBRKMASK allow breaks to interrupt us 1C9FA 09040000 IMM 623 UREQ 0 execute the delay 1C9FB FA4DBEAE 1 624 JNEZ R1 RDUDODONE jump if break occured during delay 1C9FC FE0FC9ED 625 JMP WAITLOOP see if there is something to pick up 626 * --- 627 628 END of WAIT command 629 ***** LINES WITH ERRORS = 1 ***** 630 END of DO file processor 155 156 INPUT RDUBPI 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 379 (RDUBPI) F 29 Breakpoint Handling Code 3 4 BLOCK BPI commands 5 ENTRY BPI 6 ENTRY BPIINIT 7 ENTRY BPILIST 8 ENTRY CLEARBPI 9 ENTRY CLEARBPIS 10 ENTRY EXITBPI 11 12 ********************************************************************************** 13 * * 14 * The following are the BPI handling subroutines. * 15 * BPI is jumped to when the BPI command is issued, with a * 16 * valid address in ADDRESS. * 17 * A table is kept of the breakpoint addresses and the * 18 * contents of those locations. The first location in this * 19 * table is reserved for use by the STEP instruction. * 20 * When a request is made to set a breakpoint we see if the * 21 * location specified is an enter instruction. If so we move to * 22 * higher addresses until we find a non-enter instruction. We * 23 * then ensure that there is not already a breakpoint set at the * 24 * given address. An entry is then made in the breakpoint table * 25 * for the new breakpoint. * 26 * When the remote machine is started we get the contents * 27 * of the breakpoint locations from the remote machine, store * 28 * them into the breakpoint table, then set our breakpoint halt * 29 * into the breakpoint locations. When the machine halts we * 30 * restore the original contents of the breakpointed locations. * 31 * When the remote machine is booted the breakpoint table * 32 * is cleared. Also, if there are breakpoints in the remote * 33 * machine when the RDU is exited we must stop the remote * 34 * machine and remove the breakpoints. * 35 * The maximum number of breakpoints allowed is 9, plus * 36 * one more for the step instruction. The process of setting * 37 * and removing breakpoints requires numerous transmissions * 38 * to the remote machine so exceeding the breakpoint limit * 39 * is impractical from a time point of view. However if it * 40 * is ever desired to allow more breakpoints we basically just * 41 * need to add more locations to the breakpoint table and alter * 42 * our unique breakpoint halts. * 43 * * 44 ********************************************************************************** 45 0001C9FD 46 BPI LABEL 1C9FD 60040009 0 IMM 47 LD R0 BPIMAX maximum BPI's 1C9FE 6401A92F 0 48 CPR R0 BPINUM is there room for more? 1C9FF FE09CA1A 49 JLT BPIERR if not then complain 50 * \ / 51 1CA00 DC41CA89 52 CALLNP CHEKMSR make sure we are in the OS 1CA01 6001A91F 0 53 LD R0 ADDRESS pick up the desired address 1CA02 7C01A956 0 54 IOR R0 MSRBIAS mix in any bias 1CA03 E401A921 0 55 ST R0 REALADDR this is the real location 0001CA04 56 GETINSTR LABEL 1CA04 DC41CA1E 57 CALLNP BPILOOK see if BPI is already set 1CA05 FA03CA1C 0 58 JEQZ R0 BPIERR1 if so then complain 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 380 (RDUBPI) F 29 Breakpoint Handling Code 1CA06 DC01BBAC 59 CALL SHIPCOM obtain instruction at REALADDR 1CA07 4101BBF5 60 PAR RESPERROR error address 1CA08 41440001 IMM 61 PARV KLAS1 class=1 1CA09 4141A97D 62 PARV CPUSLOT slot=CPU 1CA0A 41440002 IMM 63 PARV BCMREAD BCM=2 1CA0B 4041A921 64 PARVL REALADDR address is here 1CA0C 6001F38E 0 65 LD R0 DATA(1) get the instruction 1CA0D 604A0080 1 0 CBM 66 LD R1 R0/ENTROBITS get enter instruction opcode bits 1CA0E 644400DD 1 IMM 67 CPR R1 ENTROPS see if an enter instruction 1CA0F FE0DCA13 68 JNE BPISAVE it isn't, go put in table 1CA10 D001A921 69 INC REALADDR move past enter instruction 1CA11 D001A91F 70 INC ADDRESS keep the address up with us 1CA12 FE0FCA04 71 JMP GETINSTR and get next instruction 72 * --- 73 0001CA13 74 BPISAVE LABEL 1CA13 DC41CA2C 75 CALLNP BPIFREE find a free entry in BPITAB 1CA14 6001A91F 0 76 LD R0 ADDRESS get the address 1CA15 E4091D20 0 4 ZBM 77 ST R0 BRK,BPIADDR and store in table 1CA16 EC090210 4 ZBM 78 STZ BRK,BPIIN not in the remote machine yet 1CA17 EDC90010 4 ZBM 79 STW BRK,BPIUSED say this location is used 1CA18 D001A92F 80 INC BPINUM say we have another BPI set 1CA19 FE0FBDC8 81 JMP RDUOK continue on our merry way 82 * --- 83 0001CA1A 84 BPIERR LABEL 1CA1A 6005D23A 0 IMM 85 LD R0 ADR ERM400 "Maximum BPI's already set" 1CA1B FE0FBE35 86 JMP RDUERR tell user 87 * --- 88 0001CA1C 89 BPIERR1 LABEL 1CA1C 6005D242 0 IMM 90 LD R0 ADR ERM401 "BPI already set" 1CA1D FE0FBE35 91 JMP RDUERR 92 * --- 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 381 (RDUBPI) F 29 Breakpoint Handling Code 94 95 ********************************************************************************** 96 * * 97 * BPILOOK scans the BPI table to see if a BPI is already set * 98 * at ADDRESS. If so it returns zero in R0. * 99 * Eats R1, returns R4 pointing to entry if BPI found, * 100 * returns R0 with found flag * 101 * * 102 ********************************************************************************** 103 104 BLOCK 105 ENTRY BPILOOK 106 107 BEGFRAME 108 ENDFRAME 109 1CA1E DD5F8001 6 STAK 110 BPILOOK ENTRNP PUSH 1CA1F 6001A91F 0 111 LD R0 ADDRESS get address we are looking for 1CA20 60440009 1 IMM 112 LD R1 BPIMAX size of BPI table 1CA21 6105A8C2 4 IMM 113 LD BRK ADR BPITABLE and the table 0001CA22 114 LOOKLOOP LABEL 1CA22 19040002 4 IMM 115 ADD BRK BPIBLKLEN move to next entry in table 1CA23 5C090010 4 ZBM 116 CMZ BRK,BPIUSED is this entry in use? 1CA24 FE03CA27 117 JEQ LOOPEND skip compare if so 1CA25 64091D20 0 4 ZBM 118 CPR R0 BRK,BPIADDR is it the address? 1CA26 FE03CA2A 119 JEQ LOOKLEAVE then get out of here 0001CA27 120 LOOPEND LABEL 1CA27 FA63CA22 1 121 DRJ R1 LOOKLOOP try again 122 * \ / 123 1CA28 60040001 0 IMM 124 LD R0 1 say no BPI set here 0001CA29 125 LOOKEXIT LABEL 1CA29 5D1F8001 6 STAK 126 LEAVE POP 127 * --- 128 0001CA2A 129 LOOKLEAVE LABEL 1CA2A 60040000 0 IMM 130 LD R0 0 say BPI was found 1CA2B FE0FCA29 131 JMP LOOKEXIT 132 * --- 133 134 END of BPILOOK subroutine 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 382 (RDUBPI) F 29 Breakpoint Handling Code 136 137 ********************************************************************************** 138 * * 139 * BPIFREE finds the first open entry in the BPI table. * 140 * It assumes that there is a free entry in the BPI table. * 141 * Returns R4 pointing to the free table entry. * 142 * Eats no registers. * 143 * * 144 ********************************************************************************** 145 146 BLOCK 147 ENTRY BPIFREE 148 149 BEGFRAME 150 ENDFRAME 151 1CA2C DD5F8001 6 STAK 152 BPIFREE ENTRNP PUSH 1CA2D 6105A8C2 4 IMM 153 LD BRK ADR BPITABLE get address of the table 0001CA2E 154 FREELOOP LABEL 1CA2E 19040002 4 IMM 155 ADD BRK BPIBLKLEN save first place for STEP 1CA2F 5C090010 4 ZBM 156 CMZ BRK,BPIUSED is this location in use? 1CA30 FE0DCA2E 157 JNE FREELOOP if not then try the next 158 * \ / 159 1CA31 5D1F8001 6 STAK 160 LEAVE POP 161 * --- 162 163 END of BPIFREE 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 383 (RDUBPI) F 29 Breakpoint Handling Code 165 166 ********************************************************************************** 167 * * 168 * BPISET scans the BPI table and at each non-negative address * 169 * value gets the instruction from that address and stores it in the * 170 * table. Sets flag, BPISIN, to say we have BPI's in remote machine * 171 * and puts a halt code at the instruction. * 172 * Eats R0-R4 * 173 * * 174 ********************************************************************************** 175 176 BLOCK 177 ENTRY BPISET 178 179 BEGFRAME 180 ENDFRAME 181 1CA32 DD5F8001 6 STAK 182 BPISET ENTRNP PUSH 1CA33 5C01A930 183 CMZ STEPSET is there a step instruction set? 1CA34 FE0BCA36 184 JLE SETBPI if no step instruction then try BPI 185 * \ / 186 1CA35 DC41CA3A 187 CALLNP STEPSEND and send the halt code 0001CA36 188 SETBPI LABEL 1CA36 5C01A92F 189 CMZ BPINUM are there breakpoints to put in? 1CA37 FE0BCA39 190 JLE SETEXIT if no breakpoints then get out of here 191 * \ / 192 1CA38 DC41CA3E 193 CALLNP BPISEND send it 0001CA39 194 SETEXIT LABEL 1CA39 5D1F8001 6 STAK 195 LEAVE POP 196 * --- 197 198 END of BPISET 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 384 (RDUBPI) F 29 Breakpoint Handling Code 200 201 ********************************************************************************** 202 * * 203 * BPISEND and STEPSEND get the instruction stored at the * 204 * breakpoint address, stores it into the BPI table, and stores * 205 * a halt at the breakpoint address. * 206 * CALL: * 207 * CALLNP BPI|STEPSEND * 208 * Eats R0:R4 * 209 * * 210 ********************************************************************************** 211 212 BLOCK 213 ENTRY BPISEND 214 ENTRY STEPSEND 215 216 BEGFRAME 00178801 6 BASE 217 SENDFLAG BSS 1 sez what is being sent 00178802 6 BASE 218 TEMP BSS 1 temporary usage 219 ENDFRAME 220 221 1CA3A DD5F8003 6 STAK 222 STEPSEND ENTRNP PUSH 1CA3B 6105A8C2 4 IMM 223 LD BRK ADR BPITABLE need address of table 1CA3C EC178801 6 BASE 224 STZ SP,SENDFLAG say it is a step being sent 1CA3D FE0FCA41 225 JMP SENDMERGE go join the fun 226 * --- 227 1CA3E DD5F8003 6 STAK 228 BPISEND ENTRNP PUSH 1CA3F 6105A8C4 4 IMM 229 LD BRK ADR BPITABLE(BPIBLKLEN) need address of table 1CA40 EDD78801 6 BASE 230 STW SP,SENDFLAG say ordinary breakpoints 231 * \ / 232 0001CA41 233 SENDMERGE LABEL 1CA41 DC41CA89 234 CALLNP CHEKMSR set address bias from MSR info 0001CA42 235 SETLOOP LABEL 1CA42 5C090010 4 ZBM 236 CMZ BRK,BPIUSED see if this BPI block is in use 1CA43 FE03CA5F 237 JEQ NOTSET if not then try another one 1CA44 5C090210 4 ZBM 238 CMZ BRK,BPIIN is the BPI already in the remote machine? 1CA45 FE0DCA5F 239 JNE NOTSET if so then don't set it 240 * \ / 241 1CA46 60491D20 1 4 ZBM 242 LD R1 BRK,BPIADDR get breakpoint address 1CA47 7C41A956 1 243 IOR R1 MSRBIAS make sure it is in OS code 1CA48 E441A921 1 244 ST R1 REALADDR save it 1CA49 DC01BBAC 245 CALL SHIPCOM obtain the instruction 1CA4A 4101CA66 246 PAR SETERROR error address 1CA4B 41440001 IMM 247 PARV KLAS1 class=1 1CA4C 4141A97D 248 PARV CPUSLOT slot=cpu 1CA4D 41440002 IMM 249 PARV BCMREAD bcm=2 1CA4E 4041A921 250 PARVL REALADDR address of instruction 1CA4F 6001F38E 0 251 LD R0 DATA(1) get the instruction 1CA50 E4170801 0 4 BASE 252 ST R0 BRK,BPIINSTR put it in the table 253 * \ / 254 1CA51 60978801 2 6 BASE 255 LD R2 SP,SENDFLAG get the halt number 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 385 (RDUBPI) F 29 Breakpoint Handling Code 1CA52 1881AC2A 2 256 ADD R2 BPIVALUE put halt number on halt 1CA53 DC01BBE0 257 CALL SHIPDATA now send the halt instruction 1CA54 4101CA66 258 PAR SETERROR error address 1CA55 41440000 IMM 259 PARV 0 1CA56 40528000 2 REG 260 PARVL R2 the halt to send 1CA57 DC01BBAC 261 CALL SHIPCOM now put into memory 1CA58 4101CA66 262 PAR SETERROR error address 1CA59 41440001 IMM 263 PARV KLAS1 class=1 1CA5A 4141A97D 264 PARV CPUSLOT slot=cpu 1CA5B 41440000 IMM 265 PARV BCMWRITE bcm=0 1CA5C 4041A921 266 PARVL REALADDR the address 1CA5D EDC1A931 267 STW BPISIN say we now have BPI's in 1CA5E EDC90210 4 ZBM 268 STW BRK,BPIIN say this BPI is in 269 * \ / 270 0001CA5F 271 NOTSET LABEL 1CA5F 5C178801 6 BASE 272 CMZ SP,SENDFLAG is this just a step send? 1CA60 FE03CA65 273 JEQ SENDEXIT if so then leave 1CA61 D0178801 6 BASE 274 INC SP,SENDFLAG move up the halt number 1CA62 19040002 4 IMM 275 ADD BRK BPIBLKLEN move to next table entry 1CA63 6505A8D6 4 IMM 276 CPR BRK ADR BPITABTOP have we reached the end? 1CA64 FE09CA42 277 JLT SETLOOP if not then keep going 278 * \ / 279 0001CA65 280 SENDEXIT LABEL 1CA65 5D1F8003 6 STAK 281 LEAVE POP 282 * --- 283 284 * Error trying to set a breakpoint. 0001CA66 285 SETERROR LABEL 1CA66 64440007 1 IMM 286 CPR R1 7 is it an expected error? 1CA67 FE0DBBF5 287 JNE RESPERROR jump if things look bad 1CA68 E4178802 0 6 BASE 288 ST R0 SP,TEMP save pointer to the error message 1CA69 DC41B86F 289 CALLNP BLANKOUT clear the output buffer 1CA6A 6005D28E 0 IMM 290 LD R0 ADR ERM409 "Could not set breakpoint ..." 1CA6B DC41B875 291 CALLNP MESSMOVEZ start the output line 1CA6C 60091D20 0 4 ZBM 292 LD R0 BRK,BPIADDR pick up the address 1CA6D E401A8ED 0 293 ST R0 VALUE 1CA6E DC41B600 294 CALLNP HEXOUTA put in the address 1CA6F 18C40001 3 IMM 295 ADD OBP 1 1CA70 6004002D 0 IMM 296 LD R0 "-" a separator 1CA71 E437AC01 0 3 @ 297 ST R0 @OBPT(OBP) add to the line 1CA72 18C40002 3 IMM 298 ADD OBP 2 leave some space 1CA73 60178802 0 6 BASE 299 LD R0 SP,TEMP get the reason 1CA74 DC41B87B 300 CALLNP MESSMOVE and add on to the line 1CA75 DC41B886 301 CALLNP OUTO tell the user 1CA76 FE0FCA5F 302 JMP NOTSET 303 * --- 304 305 END of BPISEND and STEPSEND subroutine 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 386 (RDUBPI) F 29 Breakpoint Handling Code 307 308 ********************************************************************************** 309 * * 310 * BPIRESTORE places all instructions back in the remote * 311 * machine where BPI halts were placed. * 312 * Eats R0:R4. * 313 * * 314 ********************************************************************************** 315 316 BLOCK 317 ENTRY BPIRESTORE 318 319 BEGFRAME 320 ENDFRAME 321 1CA77 DD5F8001 6 STAK 322 BPIRESTORE ENTRNP PUSH 1CA78 D181A931 323 CLRT BPISIN are there breakpoints set? 1CA79 FE03CA88 324 JEQ RESTEXIT if nothing set then go home 325 * \ / 326 1CA7A DC41CA89 327 CALLNP CHEKMSR set bias into OS code 1CA7B 6105A8C2 4 IMM 328 LD BRK ADR BPITABLE get address of the table 1CA7C 5C01A930 329 CMZ STEPSET is a STEP in? 1CA7D FE0DCA7F 330 JNE RESTLOOP if STEP in then start at table top 1CA7E 19040002 4 IMM 331 ADD BRK BPIBLKLEN skip the STEP entry in table 332 * \ / 333 0001CA7F 334 RESTLOOP LABEL 1CA7F 5C090010 4 ZBM 335 CMZ BRK,BPIUSED see if we have something here 1CA80 FE03CA85 336 JEQ NOREST if not then don't restore it 1CA81 5C090210 4 ZBM 337 CMZ BRK,BPIIN is it set in the remote machine? 1CA82 FE03CA85 338 JEQ NOREST if not set then don't restore it 339 * \ / 340 1CA83 DC41CA98 341 CALLNP BPIUNSET go unset the breakpoint 1CA84 EDC1A931 342 STW BPISIN still a breakpoint in the remote machine 0001CA85 343 NOREST LABEL 1CA85 19040002 4 IMM 344 ADD BRK BPIBLKLEN move on to next entry 1CA86 6505A8D6 4 IMM 345 CPR BRK ADR BPITABTOP are we out of table? 1CA87 FE09CA7F 346 JLT RESTLOOP if not then keep on going 347 * \ / 348 0001CA88 349 RESTEXIT LABEL 1CA88 5D1F8001 6 STAK 350 LEAVE POP 351 * --- 352 353 END of BPIRESTORE subroutine 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 387 (RDUBPI) F 29 Breakpoint Handling Code 355 356 ********************************************************************************** 357 * * 358 * CHEKMSR gets the MSR contents and checks to see if a * 359 * bit is set indicating the CPU is in Operating System code. * 360 * From this it determines the bias to add in to an address to * 361 * make sure it is in OS code. * 362 * Eats R0:R3 * 363 * * 364 ********************************************************************************** 365 366 BLOCK 367 ENTRY CHEKMSR 368 369 BEGFRAME 370 ENDFRAME 371 1CA89 DD5F8001 6 STAK 372 CHEKMSR ENTRNP PUSH 1CA8A DC01BBAC 373 CALL SHIPCOM need to get MSR contents 1CA8B 4101BBF5 374 PAR RESPERROR error address 1CA8C 41440000 IMM 375 PARV KLAS0 class=0 1CA8D 4141A97D 376 PARV CPUSLOT the current CPU 1CA8E 41440002 IMM 377 PARV BCMREAD BCM=2 1CA8F 40440009 IMM 378 PARVL CPMSR we want MSR info 1CA90 6001F38E 0 379 LD R0 DATA(1) get MSR contents 1CA91 5C0A3610 0 CBM 380 CMZ R0/RELOBIT see if in operating system 1CA92 FE03CA95 381 JEQ CHEKUSER oops, we are in user program 1CA93 EC01A956 382 STZ MSRBIAS no need to change address 383 * \ / 384 0001CA94 385 CHEKEXIT LABEL 1CA94 5D1F8001 6 STAK 386 LEAVE POP 387 * --- 388 0001CA95 389 CHEKUSER LABEL 1CA95 6001A955 0 390 LD R0 MSROFFSET where to find OS 1CA96 E401A956 0 391 ST R0 MSRBIAS so we know where to go 1CA97 FE0FCA94 392 JMP CHEKEXIT continue on 393 * --- 394 395 END of CHEKMSR subroutine 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 388 (RDUBPI) F 29 Breakpoint Handling Code 397 398 ********************************************************************************** 399 * * 400 * BPIUNSET replaces the halt instruction with the original * 401 * instruction at the address in the BPITABLE entry that R4 * 402 * points to. * 403 * Call: * 404 * R4 -> BPI element * 405 * CALLNP BPIUNSET * 406 * * 407 * Eats R0:R3. * 408 * * 409 ********************************************************************************** 410 411 BLOCK 412 ENTRY BPIUNSET 413 414 BEGFRAME 00178801 6 BASE 415 BPIUNSR4R5 BSS 2 to save some regs 00178803 6 BASE 416 TEMP BSS 1 temporary location 417 ENDFRAME 418 1CA98 DD5F8004 6 STAK 419 BPIUNSET ENTRNP PUSH 1CA99 DC01BBE0 420 CALL SHIPDATA restore the instruction 1CA9A 4101BBF5 421 PAR RESPERROR error address 1CA9B 41440000 IMM 422 PARV 0 1CA9C 40570801 4 BASE 423 PARVL BRK,BPIINSTR the instruction in the table 1CA9D 60491D20 1 4 ZBM 424 LD R1 BRK,BPIADDR get the address to send to 1CA9E 7C41A956 1 425 IOR R1 MSRBIAS add in any bias to keep us in OS code 1CA9F DC01BBAC 426 CALL SHIPCOM now into memory 1CAA0 4101CAA8 427 PAR UNSETERR error address 1CAA1 41440001 IMM 428 PARV KLAS1 class=1 1CAA2 4141A97D 429 PARV CPUSLOT slot=cpu 1CAA3 41440000 IMM 430 PARV BCMWRITE bcm=0 (write) 1CAA4 40524000 1 REG 431 PARVL R1 address from table 1CAA5 EC090210 4 ZBM 432 STZ BRK,BPIIN indicate this breakpoint is no longer in 1CAA6 19C40001 7 IMM 433 ADD R7 1 indicate all ok 0001CAA7 434 UNSETEXIT LABEL 1CAA7 5D1F8004 6 STAK 435 LEAVE POP 436 * --- 437 438 ********************************************************************************** 439 * * 440 * An error occurred trying to restore a breakpointed * 441 * instruction. We tell the user about it and if not serious * 442 * then keep on going. The typical reason for this is excluded * 443 * page. If a more serious error occurred it would be * 444 * futile to try and restore any more breakpoints. * 445 * * 446 ********************************************************************************** 447 0001CAA8 448 UNSETERR LABEL 1CAA8 64440007 1 IMM 449 CPR R1 7 check the type of error 1CAA9 FE0DCABB 450 JNE SERIOUS we can only handle the minor problems 1CAAA E4178803 0 6 BASE 451 ST R0 SP,TEMP save pointer to the error message 1CAAB E7178801 456 BASE 452 ST2 R4 SP,BPIUNSR4R5 save these registers 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 389 (RDUBPI) F 29 Breakpoint Handling Code 1CAAC 6005D262 0 IMM 453 LD R0 ADR ERM405 "Could not restore breakpointed ..." 1CAAD DC41B875 454 CALLNP MESSMOVEZ start the output line 1CAAE 60178803 0 6 BASE 455 LD R0 SP,TEMP get the reason 1CAAF DC41B87B 456 CALLNP MESSMOVE and add on to the line 1CAB0 DC41B886 457 CALLNP OUTO tell the user 458 1CAB1 60091D20 0 4 ZBM 459 LD R0 BRK,BPIADDR pick up the address 1CAB2 E401A91F 0 460 ST R0 ADDRESS 1CAB3 DC01BB04 461 CALL LOCOUT start a line with the address 1CAB4 40440001 IMM 462 PARVL 1 1CAB5 63178801 456 BASE 463 LD2 R4 SP,BPIUNSR4R5 restore these registers 1CAB6 60170801 0 4 BASE 464 LD R0 BRK,BPIINSTR pick up the value at the location 1CAB7 E401A8ED 0 465 ST R0 VALUE 1CAB8 DC41B5F1 466 CALLNP HEXOUT and add it to the output line 1CAB9 DC41B886 467 CALLNP OUTO let the user know what it should be 1CABA FE0FCAA7 468 JMP UNSETEXIT 469 * --- 470 0001CABB 471 SERIOUS LABEL 1CABB 6005D256 0 IMM 472 LD R0 ADR ERM404 "Warning - Breakpoints still in ..." 1CABC DC41B88A 473 CALLNP OUT warn 'em 1CABD FE0FBBF5 474 JMP RESPERROR 475 * --- 476 477 END of BPIUNSET subroutine 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 390 (RDUBPI) F 29 Breakpoint Handling Code 479 480 ********************************************************************************** 481 * * 482 * The CLEARBPI command checks the BPI table for an address * 483 * that matches ADDRESS. If found, the entry is removed from * 484 * the table. * 485 * * 486 ********************************************************************************** 487 488 BLOCK 489 ENTRY CLEARBPI 490 ENTRY CLEARBPIS 491 0001CABE 492 CLEARBPI LABEL 1CABE DC41CA1E 493 CALLNP BPILOOK search BPI table for ADDRESS 1CABF FA0DCAC9 0 494 JNEZ R0 CLRBPIERR jump if no match found 1CAC0 5C090210 4 ZBM 495 CMZ BRK,BPIIN is the BPI still in? 1CAC1 FE0DCAC6 496 JNE STILLIN problem if so 0001CAC2 497 REMOVEIT LABEL 1CAC2 EC090010 4 ZBM 498 STZ BRK,BPIUSED remove entry from table 1CAC3 EC090210 4 ZBM 499 STZ BRK,BPIIN so we know it is not in 1CAC4 D041A92F 500 DEC BPINUM say one less breakpoint set 1CAC5 FE0FBDC8 501 JMP RDUOK and return to main control 502 * --- 503 0001CAC6 504 STILLIN LABEL 1CAC6 DC41CADE 505 CALLNP BPISTILLIN report this to the user 1CAC7 FE0FBDC8 506 JMP RDUOK else we are done here 1CAC8 FE0FCAC2 507 JMP REMOVEIT jump if we should still remove it 508 * --- 509 0001CAC9 510 CLRBPIERR LABEL 1CAC9 6005D248 0 IMM 511 LD R0 ADR ERM402 "No breakpoint set at that location" 1CACA FE0FBE35 512 JMP RDUERR 513 * --- 514 515 ********************************************************************************** 516 * * 517 * The CLEARBPIS command removes all breakpoints from the BPI table. * 518 * * 519 ********************************************************************************** 520 0001CACB 521 CLEARBPIS LABEL 1CACB 5C01A92F 522 CMZ BPINUM are there any set to clear? 1CACC FE03CADC 523 JEQ CLRSERR if not then complain 1CACD 6105A8C4 4 IMM 524 LD BRK ADR BPITABLE(BPIBLKLEN) R4 -> first BPI 0001CACE 525 CLEARLOOP LABEL 1CACE 5C090010 4 ZBM 526 CMZ BRK,BPIUSED is this BPI in use? 1CACF FE03CAD7 527 JEQ NEXT if not then try the next 1CAD0 5C090210 4 ZBM 528 CMZ BRK,BPIIN is this still in the remote machine? 1CAD1 FE03CAD4 529 JEQ NOTIN jump if not 530 * \ / 531 1CAD2 DC41CADE 532 CALLNP BPISTILLIN complain about this being still in 1CAD3 FE0FCAD7 533 JMP NEXT jump if we should leave it alone 534 * \ / 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 391 (RDUBPI) F 29 Breakpoint Handling Code 535 0001CAD4 536 NOTIN LABEL 1CAD4 EC090010 4 ZBM 537 STZ BRK,BPIUSED say no longer in use 1CAD5 EC090210 4 ZBM 538 STZ BRK,BPIIN and not in the remote machine 1CAD6 D041A92F 539 DEC BPINUM one less BPI in 0001CAD7 540 NEXT LABEL 1CAD7 19040002 4 IMM 541 ADD BRK BPIBLKLEN move to next BPI 1CAD8 6505A8D6 4 IMM 542 CPR BRK ADR BPITABTOP are we done yet? 1CAD9 FE09CACE 543 JLT CLEARLOOP keep going if not 544 * \ / 545 1CADA EC01A930 546 STZ STEPSET say STEP is not set 1CADB FE0FBDC8 547 JMP RDUOK 548 * --- 549 0001CADC 550 CLRSERR LABEL 1CADC 6005D251 0 IMM 551 LD R0 ADR ERM403 "No breakpoints set" 1CADD FE0FBE35 552 JMP RDUERR 553 * --- 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 392 (RDUBPI) F 29 Breakpoint Handling Code 555 556 ********************************************************************************** 557 * * 558 * BPISTILLIN * 559 * * 560 * If a breakpoint is still in the remote machine but the * 561 * user wants it cleared from the RDU's table we come here to * 562 * ask if that is what should really happen. * 563 * Call: * 564 * CALLNP BPISTILLIN * 565 * JMP leave BPI in * 566 * remove BPI * 567 * * 568 * Eats R0:R3 * 569 * * 570 ********************************************************************************** 571 572 BLOCK BPISTILLIN subroutine 573 574 ENTRY BPISTILLIN 575 576 BEGFRAME 00178801 6 BASE 577 SAVER4R5 BSS 2 578 ENDFRAME 579 1CADE DD5F8003 6 STAK 580 BPISTILLIN ENTRNP PUSH 1CADF E7178801 456 BASE 581 ST2 R4 SP,SAVER4R5 save these from LOCOUT 1CAE0 6005D26E 0 IMM 582 LD R0 ADR ERM406 "Breakpoint still in remote..." 1CAE1 DC41B88A 583 CALLNP OUT tell user 584 1CAE2 60091D20 0 4 ZBM 585 LD R0 BRK,BPIADDR pick up the address 1CAE3 E401A91F 0 586 ST R0 ADDRESS 1CAE4 DC01BB04 587 CALL LOCOUT start a line with the address 1CAE5 40440001 IMM 588 PARVL 1 1CAE6 63178801 456 BASE 589 LD2 R4 SP,SAVER4R5 restore these registers 1CAE7 60170801 0 4 BASE 590 LD R0 BRK,BPIINSTR pick up the value at the location 1CAE8 E401A8ED 0 591 ST R0 VALUE 1CAE9 DC41B5F1 592 CALLNP HEXOUT and add it to the output line 1CAEA DC41B886 593 CALLNP OUTO let the user know what it should be 594 1CAEB 6005D279 0 IMM 595 LD R0 ADR ERM407 "Should it be removed..." 0001CAEC 596 TRYAGAIN LABEL 1CAEC DC41B883 597 CALLNP OUTB binary it out 1CAED DC41B3B6 598 CALLNP READLINE see what was said 1CAEE DC41B33C 599 CALLNP FETCHAP fetch the response 1CAEF DC41B45D 600 CALLNP ONOFFGET interpret the response 1CAF0 FA0DCAF4 0 601 JNEZ R0 ERROR 602 1CAF1 19D24000 7 1 REG 603 ADD R7 R1 add in the response (0 if no, 1 if yes) 1CAF2 63178801 456 BASE 604 LD2 R4 SP,SAVER4R5 restore these registers 1CAF3 5D1F8003 6 STAK 605 LEAVE POP 606 * --- 607 0001CAF4 608 ERROR LABEL 1CAF4 6005D287 0 IMM 609 LD R0 ADR ERM408 "Please answer yes or no" 1CAF5 FE0FCAEC 610 JMP TRYAGAIN 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 393 (RDUBPI) F 29 Breakpoint Handling Code 611 * --- 612 613 END of BPISTILLIN subroutine 614 615 END of CLEARBPI commands 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 394 (RDUBPI) F 29 Breakpoint Handling Code 617 618 ********************************************************************************** 619 * * 620 * EXITBPI checks to see if any breakpoints are still in * 621 * the remote machine. If so it stops the machine, restores the * 622 * breakpoint instructions, then restarts the machine. * 623 * Eats R0:R3. * 624 * * 625 ********************************************************************************** 626 627 BLOCK 628 ENTRY EXITBPI 629 630 BEGFRAME 631 ENDFRAME 632 1CAF6 DD5F8001 6 STAK 633 EXITBPI ENTRNP PUSH 1CAF7 5C01A931 634 CMZ BPISIN are there any breakpoints in? 1CAF8 FE03CB0E 635 JEQ EXITEXIT like just EXIT!!! 1CAF9 6041A8D6 1 636 LD R1 STATE 1CAFA FA49CB0E 1 637 JLTZ R1 EXITEXIT if not dialed in, not much we can do 1CAFB 64440001 1 IMM 638 CPR R1 STATESTOP is machine running? 1CAFC FE03CB03 639 JEQ EXITSTOP don't stop if already stopped 640 * \ / 641 1CAFD DC01BBAC 642 CALL SHIPCOM send a stop to remote machine 1CAFE 4101BBF5 643 PAR RESPERROR error address 1CAFF 41440005 IMM 644 PARV KLAS5 class=5 1CB00 4141A97F 645 PARV SSUSLOT slot=SSU 1CB01 41440000 IMM 646 PARV BCMSTOP bcm=0 (stop) 1CB02 40440000 IMM 647 PARVL 0 ignores address 648 * \ / 649 0001CB03 650 EXITSTOP LABEL 1CB03 DC41CA77 651 CALLNP BPIRESTORE restore the breakpoints 1CB04 60440001 1 IMM 652 LD R1 STATESTOP 1CB05 6441A8D6 1 653 CPR R1 STATE was the machine running 1CB06 FE03CB0E 654 JEQ EXITEXIT then don't start it 655 * \ / 656 1CB07 DC41BCEF 657 CALLNP FIXUPMCUS revive MCUs 1CB08 DC01BBAC 658 CALL SHIPCOM send a go to remote machine 1CB09 4101BBF5 659 PAR RESPERROR error address 1CB0A 41440005 IMM 660 PARV KLAS5 class=5 1CB0B 4141A97F 661 PARV SSUSLOT slot=SSU 1CB0C 41440001 IMM 662 PARV BCMGO bcm=1 (go) 1CB0D 40440000 IMM 663 PARVL 0 ignores address 0001CB0E 664 EXITEXIT LABEL 1CB0E 5D1F8001 6 STAK 665 LEAVE POP 666 * --- 667 668 END of EXITBPI subroutine 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 395 (RDUBPI) F 29 Breakpoint Handling Code 670 671 ********************************************************************************** 672 * * 673 * BPIINIT initializes all sorts of neat things that must * 674 * be done. * 675 * Eats R0,R4. * 676 * * 677 ********************************************************************************** 678 679 BLOCK 680 ENTRY BPIINIT 681 682 BEGFRAME 683 ENDFRAME 684 1CB0F DD5F8001 6 STAK 685 BPIINIT ENTRNP PUSH 1CB10 EC01A92F 686 STZ BPINUM say no breakpoints are set 1CB11 60040009 0 IMM 687 LD R0 BPIMAX size of table-1 1CB12 6105A8C2 4 IMM 688 LD BRK ADR BPITABLE get address of table 0001CB13 689 INITLOOP LABEL 1CB13 EC090010 4 ZBM 690 STZ BRK,BPIUSED say no breakpoint here 1CB14 EC090210 4 ZBM 691 STZ BRK,BPIIN the breakpoint is not in yet 1CB15 19040002 4 IMM 692 ADD BRK BPIBLKLEN move up one entry 1CB16 6505A8D6 4 IMM 693 CPR BRK ADR BPITABTOP are we beyond the table? 1CB17 FE09CB13 694 JLT INITLOOP then all done 695 * \ / 696 1CB18 5D1F8001 6 STAK 697 LEAVE POP 698 * --- 699 700 END of BPIINIT subroutine 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 396 (RDUBPI) F 29 Breakpoint Handling Code 702 703 ********************************************************************************** 704 * * 705 * BPILIST lists the breakpoint addresses. * 706 * * 707 ********************************************************************************** 708 709 BLOCK 710 ENTRY BPILIST 711 0001CB19 712 BPILIST LABEL 1CB19 5C01A92F 713 CMZ BPINUM are there any to list? 1CB1A FE03CB2F 714 JEQ BPILISTERR if not then tell user so 715 * \ / 716 1CB1B 6105A8C4 4 IMM 717 LD BRK ADR BPITABLE(BPIBLKLEN) set up pointer to table 1CB1C 6005CD55 0 IMM 718 LD R0 ADR BPILISTM "BREAKPOINTS:" 1CB1D DC41B88A 719 CALLNP OUT and ship it 720 1CB1E 61440001 5 IMM 721 LD R5 1 start at first of table 0001CB1F 722 LISTLOOP LABEL 1CB1F 5C090010 4 ZBM 723 CMZ BRK,BPIUSED is this breakpoint set? 1CB20 FE03CB2A 724 JEQ LISTLPEND if not then continue on 725 * \ / 726 1CB21 E541A8ED 5 727 ST R5 VALUE put where DECOUT can find 1CB22 60C40000 3 IMM 728 LD OBP 0 position output buffer at start 1CB23 DC41B62D 729 CALLNP DECOUT put the number in 1CB24 6005CD59 0 IMM 730 LD R0 ADR PERBLNK ". " 1CB25 DC41B87B 731 CALLNP MESSMOVE put in buffer 1CB26 61491D20 5 4 ZBM 732 LD R5 BRK,BPIADDR get address to list out 1CB27 E141A8ED 5 733 EXCH R5 VALUE swap the two 1CB28 DC41B600 734 CALLNP HEXOUTA list the address in VALUE 1CB29 DC41B886 735 CALLNP OUTO send the message 0001CB2A 736 LISTLPEND LABEL 1CB2A 19040002 4 IMM 737 ADD BRK BPIBLKLEN move to next breakpoint 1CB2B 19440001 5 IMM 738 ADD R5 1 move to the next breakpoint 1CB2C 65440009 5 IMM 739 CPR R5 BPIMAX have they all been listed? 1CB2D FE0BCB1F 740 JLE LISTLOOP then keep on going 741 * \ / 742 1CB2E FE0FBDC8 743 JMP RDUOK 744 * --- 745 0001CB2F 746 BPILISTERR LABEL 1CB2F 6005D251 0 IMM 747 LD R0 ADR ERM403 "No breakpoints set" 1CB30 FE0FBE35 748 JMP RDUERR 749 * --- 750 751 END of BPILIST command 752 753 END of BPI commands 157 158 INPUT RDULOG 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 397 (RDULOG) F 30 RDU Logger Routines 3 4 BLOCK 5 ENTRY CLOSEM 6 ENTRY INITLOGLUN 7 ENTRY LOGIT 8 ENTRY LOGPRINT 9 ENTRY LOGPROMPT 10 ENTRY LOGRESP 11 ENTRY LOGWRITE 12 ENTRY LOGWRITETF 13 ENTRY SAVEEVENT 14 ENTRY SPECSAVE 15 16 ********************************************************************************** 17 * * 18 * This routine will create (if necessary) and equip the session * 19 * file to the "LOGLUN". The session file name will be of the * 20 * flavor "RYYMMDD_HHMM.XXXXX", where YY=year, MM=month, DD=day, * 21 * HH=hour, and MM=mminutes, and XXXXX is the system number of the * 22 * dialed up remote machine. This routine also will put a header in * 23 * the log file. * 24 * Call: * 25 * CALLNP INITLOGLUN * 26 * Eats R0:R3 * 27 * * 28 ********************************************************************************** 29 30 BLOCK 31 ENTRY INITLOGLUN 32 33 BEGFRAME 34 ENDFRAME 35 1CB31 DD5F8001 6 STAK 36 INITLOGLUN ENTRNP PUSH 1CB32 5C01AA4E 37 CMZ LOGSESSION should we log this session 1CB33 FE03CB79 38 JEQ MEMORYS jump if we are not going to log 39 * \ / 40 1CB34 EC01AA47 41 STZ CRFLAG lets initialize this 1CB35 EDC1AA46 42 STW LOBP and this 1CB36 EC01AA48 43 STZ LBUFFUL and this 1CB37 60040020 0 IMM 44 LD R0 BLANK and put a blank in the buffer 1CB38 E411AC04 0 @ 45 ST R0 @LBPT for forms control 1CB39 DC41CB7D 46 CALLNP CONADDRESS get system number of dialed machine 1CB3A DC41CB91 47 CALLNP GETINITIALS find out who we are 1CB3B DC41CB9B 48 CALLNP LOGLUNOPEN open the log file 1CB3C FA0BCB7A 0 49 JLEZ R0 LOGLUNERR jump if trouble with open 50 * \ / 51 1CB3D DC41CC36 52 CALLNP CLEARBUF 53 * put a form feed in the log file first 1CB3E 60440031 1 IMM 54 LD R1 "1" carriage control for top of form 1CB3F E451AC04 1 @ 55 ST R1 @LBPT put CC into buffer 1CB40 EDC1AA48 56 STW LBUFFUL say something in there to print 1CB41 EDD2C000 3 REG 57 STW OBP to indicate one thing in buffer 1CB42 DC41CCA3 58 CALLNP LOGBUFPR print it, causes a form feed 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 398 (RDULOG) F 30 RDU Logger Routines 1CB43 DC41CC31 59 CALLNP LOGBLNKL 1CB44 DC41CBFF 60 CALLNP PRETTYHDR go put up the pretty Id Border Top 61 * \ / 62 63 * now put in a line with R's on either end and blanks in between 1CB45 DC41CC36 64 CALLNP CLEARBUF 1CB46 6041AA49 1 65 LD R1 HDRLEN find how far out the R goes 1CB47 10440001 1 IMM 66 SUB R1 1 1CB48 60040052 0 IMM 67 LD R0 "R" get an "R" 1CB49 E433AC04 0 1 @ 68 ST R0 @LBPT(R1) and put it there. 1CB4A E411AC04 0 @ 69 ST R0 @LBPT and put it at the beginning too. 1CB4B 18440001 1 IMM 70 ADD R1 1 1CB4C 60040040 0 IMM 71 LD R0 FRWRITE tell LOGWRITE how to do it 1CB4D 6085A848 2 IMM 72 LD R2 ADR LBUFF starting from here 1CB4E DC41CC45 73 CALLNP LOGWRITE 74 * \ / 75 76 * now put in a line with name and system number 1CB4F DC41B86F 77 CALLNP BLANKOUT start with a clean slate 1CB50 6005AA52 0 IMM 78 LD R0 ADR INITMESS1 "*RDU vXXXX System " 1CB51 DC41B875 79 CALLNP MESSMOVEZ move into the output buffer 1CB52 6005BD9E 0 IMM 80 LD R0 ADR VERSION RDU version number 1CB53 DC41B87B 81 CALLNP MESSMOVE add it to the line 1CB54 6005AA56 0 IMM 82 LD R0 ADR INITMESS2 " System " 1CB55 DC41B87B 83 CALLNP MESSMOVE add it to the line 1CB56 6001AA51 0 84 LD R0 SYSNUM get the system number 1CB57 E401A8ED 0 85 ST R0 VALUE for DECOUT 1CB58 DC41B62D 86 CALLNP DECOUT move it in 1CB59 6005AA59 0 IMM 87 LD R0 ADR INITMESS3 "Taken By " 1CB5A DC41B87B 88 CALLNP MESSMOVE add it to the line 1CB5B 6005AA7A 0 IMM 89 LD R0 ADR INITIALS 1CB5C DC41B87B 90 CALLNP MESSMOVE 91 1CB5D 6052C000 1 3 REG 92 LD R1 OBP 1CB5E 18440002 1 IMM 93 ADD R1 2 leave some extra space in there 1CB5F E441AA4A 1 94 ST R1 HDRINFOLEN save how much we wrote 1CB60 6085A818 2 IMM 95 LD R2 ADR OBUFF and put address where it belongs 1CB61 DC41CC3B 96 CALLNP LOGWRITETF 97 * \ / 98 1CB62 DC41CC16 99 CALLNP LOGDATE now say what time it is 1CB63 DC41CC36 100 CALLNP CLEARBUF Clean up the buffer 1CB64 6041AA49 1 101 LD R1 HDRLEN get max length of line 1CB65 1041AA4A 1 102 SUB R1 HDRINFOLEN how much is on line already 1CB66 60C40044 3 IMM 103 LD R3 "D" Get a "D" 1CB67 E4F3AC04 3 1 @ 104 ST R3 @LBPT(R1) Put it at the end 1CB68 18440001 1 IMM 105 ADD R1 1 Make Sure its printed 1CB69 60040040 0 IMM 106 LD R0 FRWRITE tell LOGWRITE how to do it 1CB6A 6085A848 2 IMM 107 LD R2 ADR LBUFF and from here for R1 chars 1CB6B DC41CC45 108 CALLNP LOGWRITE 109 * \ / 110 111 * Put in a blank line sandwiched between 2 U's. 1CB6C DC41CC36 112 CALLNP CLEARBUF 1CB6D 6041AA49 1 113 LD R1 HDRLEN Get where the end is 1CB6E 10440001 1 IMM 114 SUB R1 1 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 399 (RDULOG) F 30 RDU Logger Routines 1CB6F 60040055 0 IMM 115 LD R0 "U" Get a "U" 1CB70 E433AC04 0 1 @ 116 ST R0 @LBPT(R1) and put it there. 1CB71 18440001 1 IMM 117 ADD R1 1 1CB72 E411AC04 0 @ 118 ST R0 @LBPT and put it at the beginning too. 1CB73 60040040 0 IMM 119 LD R0 FRWRITE tell LOGWRITE how to do it 1CB74 6085A848 2 IMM 120 LD R2 ADR LBUFF starting here 1CB75 DC41CC45 121 CALLNP LOGWRITE write it 1CB76 DC41CC36 122 CALLNP CLEARBUF make it squeeky 123 * \ / 124 125 * and we finish up with another "pretty" line followed by a blank line 1CB77 DC41CBFF 126 CALLNP PRETTYHDR Go put up the pretty Id Border Bottom 1CB78 DC41CC31 127 CALLNP LOGBLNKL 0001CB79 128 MEMORYS LABEL 1CB79 5D1F8001 6 STAK 129 LEAVE POP 130 * --- 131 0001CB7A 132 LOGLUNERR LABEL 1CB7A 6005D398 0 IMM 133 LD R0 ADR ERM900 "Not able to open session log file" 1CB7B DC41B88A 134 CALLNP OUT tell the user 1CB7C FE0FCB79 135 JMP MEMORYS 136 * --- 137 138 END of INITLOGLUN subroutine 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 400 (RDULOG) F 30 RDU Logger Routines 140 141 ********************************************************************************** 142 * * 143 * This routine converts the decimal system number to ascii * 144 * and puts it in as the extension of the file name to open the log * 145 * file on. * 146 * Call: * 147 * SYSNUM contains the system number * 148 * CALLNP CONADDRESS * 149 * EXTENSION contains the ascii equivalent * 150 * EXTLEN contains the number of digits * 151 * Eats R0:R3. * 152 * * 153 ********************************************************************************** 154 155 BLOCK 156 ENTRY CONADDRESS 157 158 BEGFRAME 159 ENDFRAME 160 1CB7D DD5F8001 6 STAK 161 CONADDRESS ENTRNP PUSH 1CB7E 60C40000 3 IMM 162 LD R3 0 clear it out 1CB7F EC01AA63 163 STZ EXTLEN clear out EXTLEN 1CB80 60840006 2 IMM 164 LD R2 MAXDIGGIES how big can we go? 1CB81 6001AA51 0 165 LD R0 SYSNUM get where dec system number is 1CB82 62120000 010 REG 166 LD2 R0 R0 make it double 1CB83 58C40010 IMM 167 IORPSR MODIFBIT modify 0001CB84 168 LOOKING LABEL 1CB84 1425AC34 0 2 169 DIV R0 TENTAB(R2) find the first digit 1CB85 FA0DCB8A 0 170 JNEZ R0 FIRSTNUM 1CB86 FAA7CB84 2 171 JDR R2 LOOKING 172 * \ / 173 0001CB87 174 MAINDEC LABEL 1CB87 60040000 0 IMM 175 LD R0 0 clean it up 1CB88 58C40010 IMM 176 IORPSR MODIFBIT Modify 1CB89 1425AC34 0 2 177 DIV R0 TENTAB(R2) pull out a digit 0001CB8A 178 FIRSTNUM LABEL 1CB8A 58840010 IMM 179 CLBPSR MODIFBIT undo modify 1CB8B 18040030 0 IMM 180 ADD R0 NUMBIAS make it asscii 1CB8C E437AA62 0 3 @ 181 ST R0 @EXTPTR(R3) put ascii char in extend 1CB8D 18C40001 3 IMM 182 ADD R3 1 next? 1CB8E D001AA63 183 INC EXTLEN one more char 1CB8F FAA7CB87 2 184 JDR R2 MAINDEC keep going 185 * \ / 186 1CB90 5D1F8001 6 STAK 187 LEAVE POP 188 * --- 189 190 END of CONADDRESS subroutine 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 401 (RDULOG) F 30 RDU Logger Routines 192 193 ********************************************************************************** 194 * * 195 * GETINITIALS fetches the user initials or name from * 196 * the Control Mode variable "Name!". If none is present we * 197 * return a single blank. The result is left in INITIALS. * 198 * Eats R0:R3. * 199 * * 200 ********************************************************************************** 201 202 BLOCK 203 ENTRY GETINITIALS 204 ENTRY LOGLUNOPEN 205 206 BEGFRAME 207 ENDFRAME 208 1CB91 DD5F8001 6 STAK 209 GETINITIALS ENTRNP PUSH 1CB92 60040021 0 IMM 210 LD R0 URVARGETS 1CB93 6045AA7A 1 IMM 211 LD R1 ADR INITIALS 1CB94 6281AA5D 23 212 LD2 R2 NAMEBANG 1CB95 0904000A IMM 213 UREQ ILEN 1CB96 FA09CB98 0 214 JLTZ R0 NONAME oops, no name was found 0001CB97 215 GETINEND LABEL 1CB97 5D1F8001 6 STAK 216 LEAVE POP 217 * --- 218 0001CB98 219 NONAME LABEL 1CB98 60040020 0 IMM 220 LD R0 BLANK put in a blank then 1CB99 E411AA7D 0 @ 221 ST R0 @INITPTR for the initials 1CB9A FE0FCB97 222 JMP GETINEND and go away 223 * --- 224 225 ********************************************************************************** 226 * * 227 * LOGLUNOPEN opens a session log file with a date code file * 228 * name on LOGLUN. (See LOGNAME for a description of the file name.) * 229 * Call: * 230 * CALLNP LOGLUNOPEN * 231 * JLTZ R0 error on open * 232 * Eats R0:R2. * 233 * * 234 ********************************************************************************** 235 1CB9B DD5F8001 6 STAK 236 LOGLUNOPEN ENTRNP PUSH 1CB9C DC41CBB4 237 CALLNP LOGNAME 0001CB9D 238 LOGOPEN LABEL 1CB9D 60040122 0 IMM 239 LD R0 URFREELUN get a free unit 1CB9E 09040064 IMM 240 UREQ MAXLOCAL+XREQ start looking at the top 1CB9F FA09CBB3 0 241 JLTZ R0 LOGOPENERR 1CBA0 E441AA60 1 242 ST R1 LOGLUN save for later use 243 1CBA1 60040268 0 IMM 244 LD R0 FRNOPENCW get file open XREQ code 1CBA2 6044000D 1 IMM 245 LD R1 FNLEN file name length 1CBA3 1841AA63 1 246 ADD R1 EXTLEN add in the file name length 1CBA4 6085AA6E 2 IMM 247 LD R2 ADR FILENAME where we have hid the file name 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 402 (RDULOG) F 30 RDU Logger Routines 1CBA5 0881AA60 248 FREQ LOGLUN open the sucker 1CBA6 FA09CBB3 0 249 JLTZ R0 LOGOPENERR if we could not open it 1CBA7 5C0A2410 0 CBM 250 CMZ R0/BIT 18 did we create this file 1CBA8 FE0DCBB2 251 JNE LOGOPENBYE if so then leave 252 * \ / 253 1CBA9 60040060 0 IMM 254 LD R0 FRCLOSE don't want this file 1CBAA 0881AA60 255 FREQ LOGLUN 1CBAB BC11AA73 0 @ 256 INCL R0 @FNMINPTR bump up the minute part of name 1CBAC 64040039 0 IMM 257 CPR R0 "9" have we maxed out? 1CBAD FE0BCB9D 258 JLE LOGOPEN keep going if not 1CBAE 60040030 0 IMM 259 LD R0 "0" the beginning 1CBAF E411AA73 0 @ 260 ST R0 @FNMINPTR start back at zero 1CBB0 D011AA74 @ 261 INC @FNMINHPTR move the higher digit up one 1CBB1 FE0FCB9D 262 JMP LOGOPEN and open again 263 * --- 264 0001CBB2 265 LOGOPENBYE LABEL 1CBB2 EDC1AA50 266 STW LOGFILOPEN say we have opened the log file 0001CBB3 267 LOGOPENERR LABEL 1CBB3 5D1F8001 6 STAK 268 LEAVE POP 269 * --- 270 271 END of Misc subroutines 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 403 (RDULOG) F 30 RDU Logger Routines 273 274 ********************************************************************************** 275 * * 276 * LOGNAME creates a file name for the session log of the form * 277 * Ryymmdd_hhmm and leaves it in FILENAME. * 278 * Call: * 279 * CALLNP LOGNAME * 280 * OBP contains the length of the file name * 281 * Eats R0:R5 * 282 * * 283 ********************************************************************************** 284 285 BLOCK 286 ENTRY LOGNAME 287 288 BEGFRAME 00178801 6 BASE 289 LOGYEAR BSS 1 the year 00178802 6 BASE 290 LOGMONTH BSS 1 the month 00178803 6 BASE 291 LOGDAY BSS 1 the day 00178804 6 BASE 292 LOGTIME BSS 1 the time of day 00178805 6 BASE 293 LOGWEEKDAY BSS 1 the day of the week 294 ENDFRAME 295 1CBB4 DD5F8006 6 STAK 296 LOGNAME ENTRNP PUSH 1CBB5 60040060 0 IMM 297 LD R0 URRAWDATE want to get the date 1CBB6 09040000 IMM 298 UREQ 0 299 300 * R1/CH3 contains the signed offset of the timezone. 1CBB7 700A7010 0 1 CBM 301 LDN R0 R1/BIT 24 sign extend across next reg 1CBB8 E40A4180 0 1 CBM 302 ST R0 R1/BITS 0:23 and sign extend across this reg 1CBB9 1E01AC21 01 303 MUL2 R0 ONEHOUR2 convert to millisecs per hour 1CBBA 1A940000 2301 PAIR 304 ADD2 R2 PAIR R0 adjust the raw time accoringly 1CBBB 61538000 5 6 REG 305 LD R5 SP R5 -> our stack 1CBBC DC01B750 306 CALL UNPACKDATE pick the raw date apart 1CBBD 43548000 23 PAIR 307 PARV2 PAIR R2 the raw time 1CBBE 41174804 5 BASE 308 PAR R5,LOGTIME 1CBBF 41174803 5 BASE 309 PAR R5,LOGDAY 1CBC0 41174802 5 BASE 310 PAR R5,LOGMONTH 1CBC1 41174801 5 BASE 311 PAR R5,LOGYEAR 1CBC2 40174805 5 BASE 312 PARL R5,LOGWEEKDAY 313 1CBC3 60440052 1 IMM 314 LD R1 "R" first char of the file name 1CBC4 E451AC01 1 @ 315 ST R1 @OBPT start the file name 1CBC5 60C40001 3 IMM 316 LD OBP 1 start at the first of the buffer 1CBC6 60178801 0 6 BASE 317 LD R0 SP,LOGYEAR pick up the year 1CBC7 1004076C 0 IMM 318 SUB R0 1900 make into a smaller number 1CBC8 E401A8ED 0 319 ST R0 VALUE put where DECOUT can find it 1CBC9 DC41B62D 320 CALLNP DECOUT put the year into the file name 321 1CBCA 60440030 1 IMM 322 LD R1 "0" assume leading digit is 0 1CBCB 60178802 0 6 BASE 323 LD R0 SP,LOGMONTH time for the month 1CBCC 6404000A 0 IMM 324 CPR R0 10 is the leading digit a 1 or 0? 1CBCD FE09CBD0 325 JLT LOGLOWMNTH if so then guessed right 1CBCE 60440031 1 IMM 326 LD R1 "1" set leading digit to 1 1CBCF 1004000A 0 IMM 327 SUB R0 10 make second digit correct 0001CBD0 328 LOGLOWMNTH LABEL 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 404 (RDULOG) F 30 RDU Logger Routines 1CBD0 18040030 0 IMM 329 ADD R0 NUMBIAS make into an ascii char 1CBD1 E477AC01 1 3 @ 330 ST R1 @OBPT(OBP) put in the first char of the month 1CBD2 18C40001 3 IMM 331 ADD OBP 1 1CBD3 E437AC01 0 3 @ 332 ST R0 @OBPT(OBP) and the rest of the month 1CBD4 18C40001 3 IMM 333 ADD OBP 1 334 1CBD5 60178803 0 6 BASE 335 LD R0 SP,LOGDAY day goes in next 1CBD6 E401A8ED 0 336 ST R0 VALUE put where DECOUT can find 1CBD7 6404000A 0 IMM 337 CPR R0 10 should we force in the leading 0? 1CBD8 FE07CBDC 338 JGE LOGNOZERO jump if this is unnecessary 1CBD9 60440030 1 IMM 339 LD R1 "0" 1CBDA E477AC01 1 3 @ 340 ST R1 @OBPT(OBP) put in leading zero 1CBDB 18C40001 3 IMM 341 ADD OBP 1 0001CBDC 342 LOGNOZERO LABEL 1CBDC DC41B62D 343 CALLNP DECOUT 344 1CBDD 6004005F 0 IMM 345 LD R0 "_" put in a seperator 1CBDE E437AC01 0 3 @ 346 ST R0 @OBPT(OBP) in it goes 1CBDF 18C40001 3 IMM 347 ADD OBP 1 348 1CBE0 60978804 2 6 BASE 349 LD R2 SP,LOGTIME finally the time 1CBE1 1481AC23 2 350 DIV R2 MSECSS get rid of milliseconds 1CBE2 58C40010 IMM 351 IORPSR MODIFBIT set modified arithmetic bit 1CBE3 60440000 1 IMM 352 LD R1 0 1CBE4 1444003C 1 IMM 353 DIV R1 60 separate seconds and minutes 1CBE5 60040000 0 IMM 354 LD R0 0 1CBE6 1404003C 0 IMM 355 DIV R0 60 separate minutes and hours 1CBE7 58840010 IMM 356 CLBPSR MODIFBIT unset modified arithmetic 1CBE8 E4578804 1 6 BASE 357 ST R1 SP,LOGTIME remainder is minutes (save for later) 1CBE9 E401A8ED 0 358 ST R0 VALUE result is hours 1CBEA 6404000A 0 IMM 359 CPR R0 10 hours < 10? 1CBEB FE07CBEF 360 JGE LOGHOUROK hours are big enough 1CBEC 60440030 1 IMM 361 LD R1 "0" 1CBED E477AC01 1 3 @ 362 ST R1 @OBPT(OBP) present buffer address 1CBEE 18C40001 3 IMM 363 ADD OBP 1 advance buffer pointer 0001CBEF 364 LOGHOUROK LABEL 1CBEF DC41B62D 365 CALLNP DECOUT in goes the hours 366 1CBF0 60178804 0 6 BASE 367 LD R0 SP,LOGTIME pick up the minutes 1CBF1 6404000A 0 IMM 368 CPR R0 10 minutes < 10? 1CBF2 FE07CBF6 369 JGE LOGMINSOK minutes are big enough 1CBF3 60440030 1 IMM 370 LD R1 "0" 1CBF4 E477AC01 1 3 @ 371 ST R1 @OBPT(OBP) present buffer address 1CBF5 18C40001 3 IMM 372 ADD OBP 1 advance buffer pointer 0001CBF6 373 LOGMINSOK LABEL 1CBF6 E401A8ED 0 374 ST R0 VALUE store minutes in VALUE 1CBF7 DC41B62D 375 CALLNP DECOUT put minutes into output string 376 377 * The file name has been built. Add on the extension. 1CBF8 6004002E 0 IMM 378 LD R0 DOT to separate the file name and extension 1CBF9 E437AC01 0 3 @ 379 ST R0 @OBPT(OBP) 1CBFA 6005A818 0 IMM 380 LD R0 ADR OBUFFW R0 -> beginning of file name 1CBFB 6044000D 1 IMM 381 LD R1 FNLEN number of chars in the name (including .) 1CBFC 6085AA6E 2 IMM 382 LD R2 ADR FILENAME where we will leave the file name 1CBFD FE400000 383 CMOVE combine everything 1CBFE 5D1F8006 6 STAK 384 LEAVE POP 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 405 (RDULOG) F 30 RDU Logger Routines 385 * --- 386 387 END of LOGNAME 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 406 (RDULOG) F 30 RDU Logger Routines 389 390 ********************************************************************************** 391 * * 392 * Subroutine To Write Pretty Header consisting of system number and * 393 * initials repetively written for approx "Linewidth Characters". * 394 * Eats R0-R4. * 395 * * 396 ********************************************************************************** 397 398 BLOCK 399 ENTRY PRETTYHDR 400 401 BEGFRAME 402 ENDFRAME 403 1CBFF DD5F8001 6 STAK 404 PRETTYHDR ENTRNP PUSH 1CC00 DC41B86F 405 CALLNP BLANKOUT start with a clean nest 1CC01 60040020 0 IMM 406 LD R0 BLANK 1CC02 E437AC01 0 3 @ 407 ST R0 @OBPT(OBP) indicate line overwrite 1CC03 18C40001 3 IMM 408 ADD OBP 1 move up some 1CC04 6001AA51 0 409 LD R0 SYSNUM pick up the system number 1CC05 E401A8ED 0 410 ST R0 VALUE 411 * \ / 412 0001CC06 413 PRETTYLOOP LABEL 1CC06 6005AA7A 0 IMM 414 LD R0 ADR INITIALS 1CC07 DC41B87B 415 CALLNP MESSMOVE move initials in 1CC08 DC41B62D 416 CALLNP DECOUT put in the system number 1CC09 64C40050 3 IMM 417 CPR OBP LINEWIDTH had enough? 1CC0A FE05CC0C 418 JGT WRITEPRETTY jump if so 1CC0B FE0FCC06 419 JMP PRETTYLOOP and go get some more 420 * --- 421 0001CC0C 422 WRITEPRETTY LABEL 1CC0C 6085A818 2 IMM 423 LD R2 ADR OBUFF 1CC0D 50C40050 3 IMM 424 MIN OBP LINEWIDTH don't let it wrap around 1CC0E 6052C000 1 3 REG 425 LD R1 OBP copy line length for logger 1CC0F 10C40001 3 IMM 426 SUB OBP 1 1CC10 E4C1AA49 3 427 ST OBP HDRLEN save for others use 1CC11 DC41CC3B 428 CALLNP LOGWRITETF print the line 1CC12 5D1F8001 6 STAK 429 LEAVE POP 430 * --- 431 432 END of PRETTYHDR 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 407 (RDULOG) F 30 RDU Logger Routines 434 435 ********************************************************************************** 436 * * 437 * LOGDATE puts the date and time into the log on the end of * 438 * the current line. * 439 * Call: * 440 * CALLNP LOGDATE * 441 * Eats R0:R3. * 442 * * 443 ********************************************************************************** 444 445 BLOCK 446 ENTRY LOGDATE 447 448 BEGFRAME 449 ENDFRAME 450 00003080 BYTE 451 TZBITS EQU BITS 24:31 bits holding timezone offset 1CC14 0036EE80 452 MSECSH VFD 0,60*60*1000 1CC15 A009A8ED 453 VALTIME PTR VALUE/BITS 20:51 pointer to single word time 454 455 1CC16 DD5F8001 6 STAK 456 LOGDATE ENTRNP PUSH 1CC17 60040060 0 IMM 457 LD R0 URRAWDATE get the raw date 1CC18 09040000 IMM 458 UREQ 0 1CC19 60040000 0 IMM 459 LD R0 0 1CC1A 604A7080 1 1 CBM 460 LD R1 R1/TZBITS get the time zone offset 1CC1B F271CC1D 1 461 JBF R1/BIT 24 SUBTZ time zone offset is negative 1CC1C 700A7010 0 1 CBM 462 LDN R0 R1/BIT 24 0001CC1D 463 SUBTZ LABEL 1CC1D E40A4180 0 1 CBM 464 ST R0 R1/BITS 0:23 sign extend 1CC1E 1E01CC13 01 465 MUL2 R0 MSECSH convert hours to msecs 1CC1F 1A940000 2301 PAIR 466 ADD2 R2 PAIR R0 add it into the time 467 1CC20 E681A8ED 23 468 ST2 R2 VALUE 1CC21 6051CC15 1 @ 469 LD R1 @VALTIME get the single word time 1CC22 E441A8ED 1 470 ST R1 VALUE put it where TIMEOUTS can get it 471 1CC23 DC41B86F 472 CALLNP BLANKOUT clean up the output buffer 1CC24 60C40000 3 IMM 473 LD OBP 0 1CC25 DC41B7DA 474 CALLNP TIMEOUTS put the time in the buffer 475 1CC26 6004002A 0 IMM 476 LD R0 STAR forms control char 1CC27 60440004 1 IMM 477 LD R1 4 1CC28 E433AC01 0 1 @ 478 ST R0 @OBPT(R1) put in the output 479 1CC29 6085A818 2 IMM 480 LD R2 ADR OBUFF 1CC2A 389A8800 2 21 CACH 481 LEA R2 CACH R2,0(R1) R2 points to first char to print 1CC2B 10C40004 3 IMM 482 SUB OBP 4 adjust OBP 1CC2C 6052C000 1 3 REG 483 LD R1 OBP 1CC2D DC41CC3B 484 CALLNP LOGWRITETF write it in the log 1CC2E 10C40001 3 IMM 485 SUB OBP 1 1CC2F 98C1AA4A 3 486 ADDM OBP HDRINFOLEN say where we are in the line 1CC30 5D1F8001 6 STAK 487 LEAVE POP 488 * --- 489 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 408 (RDULOG) F 30 RDU Logger Routines 490 END of LOGDATE 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 409 (RDULOG) F 30 RDU Logger Routines 492 493 ********************************************************************************** 494 * * 495 * Subroutine to put a blank line in log file. * 496 * Call: * 497 * CALLNP LOGBLNKL * 498 * Eats R0:R2 * 499 * * 500 ********************************************************************************** 501 502 BLOCK 503 ENTRY LOGBLNKL 504 ENTRY CLEARBUF 505 506 BEGFRAME 507 ENDFRAME 508 1CC31 DD5F8001 6 STAK 509 LOGBLNKL ENTRNP PUSH 1CC32 6085AC11 2 IMM 510 LD R2 ADR BLANKS we need a blank line 1CC33 60440001 1 IMM 511 LD R1 1 write just one blank 1CC34 DC41CC3B 512 CALLNP LOGWRITETF simulate a line feed 1CC35 5D1F8001 6 STAK 513 LEAVE POP 514 * --- 515 516 ********************************************************************************** 517 * * 518 * Routine to Fill the buffer with spaces. * 519 * Call: * 520 * CALLNP CLEARBUF * 521 * Eats R1:R2 * 522 * * 523 ********************************************************************************** 524 1CC36 DD5F8001 6 STAK 525 CLEARBUF ENTRNP PUSH 1CC37 60440078 1 IMM 526 LD R1 CBLEN length of the buffer 1CC38 6085A848 2 IMM 527 LD R2 ADR LBUFF address of buffer 1CC39 FE580020 528 CFILL BLANK fill with blanks 1CC3A 5D1F8001 6 STAK 529 LEAVE POP 530 * --- 531 532 END of misc 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 410 (RDULOG) F 30 RDU Logger Routines 534 535 ********************************************************************************** 536 * * 537 * LOGWRITETF writes lines to the log file that already have * 538 * text form control characters on them. Call: * 539 * * 540 * LD R1 * 541 * LD R2 * 542 * CALLNP LOGWRITETF * 543 * * 544 * Registers Used R0:R2. * 545 * Stack Required 1. * 546 * * 547 ********************************************************************************** 548 549 BLOCK LOGWRITEF Routine 550 ENTRY LOGWRITETF 551 552 BEGFRAME 553 ENDFRAME 554 1CC3B DD5F8001 6 STAK 555 LOGWRITETF ENTRNP PUSH 1CC3C 60168000 0 2 CACH 556 LD R0 CACH R2,0 load the forms character 1CC3D 64040020 0 IMM 557 CPR R0 BLANK blank forms character? 1CC3E ED920000 0 REG 558 STLNE R0 set to one if not 1CC3F FA0DCC42 0 559 JNEZ R0 JUSTWRITE skip if not blank forms character 1CC40 10440001 1 IMM 560 SUB R1 1 decrement line length 1CC41 38968001 2 2 CACH 561 LEA R2 CACH R2,1 advance buffer address 562 * \ / 0001CC42 563 JUSTWRITE LABEL 1CC42 18040040 0 IMM 564 ADD R0 FRWRITE add in write request code 1CC43 0881AA60 565 FREQ LOGLUN everything is ready to go 1CC44 5D1F8001 6 STAK 566 LEAVE POP return to caller 567 * --- 568 569 END LOGWRITETF Routine 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 411 (RDULOG) F 30 RDU Logger Routines 571 572 ********************************************************************************** 573 * * 574 * LOGWRITE puts stuff in the log file. * 575 * Call: * 576 * LD R0 EVENTTYPE * 577 * LD R1 * 578 * LD R2 * 579 * CALLNP LOGWRITE * 580 * Eats R0:R2 * 581 * * 582 ********************************************************************************** 583 584 BLOCK 585 ENTRY LOGWRITE 586 587 BEGFRAME 00178801 6 BASE 588 LGWRR1R2 BSS 2 to save R1, R2 589 ENDFRAME 590 1CC45 DD5F8003 6 STAK 591 LOGWRITE ENTRNP PUSH 1CC46 5C01AA4E 592 CMZ LOGSESSION should we be here? 1CC47 FE03CC4B 593 JEQ LGWREXIT no 594 * \ / 595 1CC48 64040040 0 IMM 596 CPR R0 FRWRITE is it a normal write? 1CC49 FE03CC4C 597 JEQ LOGNORM yes 1CC4A DC41CC53 598 CALLNP LOGLOOP go put chars in log buffer 0001CC4B 599 LGWREXIT LABEL 1CC4B 5D1F8003 6 STAK 600 LEAVE POP 601 * --- 602 0001CC4C 603 LOGNORM LABEL 1CC4C E6578801 126 BASE 604 ST2 R1 SP,LGWRR1R2 save these registers 1CC4D 60C1AA46 3 605 LD OBP LOBP need position in LBUFF 1CC4E DC41CCA3 606 CALLNP LOGBUFPR print any existing stuff 1CC4F 60040040 0 IMM 607 LD R0 FRWRITE need FREQ code 1CC50 62578801 126 BASE 608 LD2 R1 SP,LGWRR1R2 restore these registers 1CC51 0881AA60 609 FREQ LOGLUN registers are already set 1CC52 FE0FCC4B 610 JMP LGWREXIT 611 * --- 612 613 END of LOGWRITE 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 412 (RDULOG) F 30 RDU Logger Routines 615 616 ********************************************************************************** 617 * * 618 * LOGLOOP goes through the buffer pointed to by R2 * 619 * one character at a time, transferring them to LBUFF in a * 620 * printable form, and printing them to the log file when necessary. * 621 * Call: * 622 * LD R1 * 623 * LD R2 * 624 * CALLNP LOGLOOP * 625 * Eats R0:R2 * 626 * Updates LOBP * 627 * * 628 ********************************************************************************** 629 630 BLOCK 631 ENTRY LOGLOOP 632 633 BEGFRAME 00178801 6 BASE 634 LOGLPR2 BSS 1 to save R2 635 ENDFRAME 636 1CC53 DD5F8002 6 STAK 637 LOGLOOP ENTRNP PUSH 1CC54 60C1AA46 3 638 LD OBP LOBP need pointer into LBUFF 1CC55 38968000 2 2 CACH 639 LEA R2 CACH R2,0 make into a character address 0001CC56 640 LGLPNEXT LABEL 1CC56 5C01AA47 641 CMZ CRFLAG has a CR been found recently? 1CC57 FE0DCC60 642 JNE LGLPCR yes 0001CC58 643 LGLPNEXT0 LABEL 1CC58 60168400 0 2 @R 644 LD R0 @R2 get a char 0001CC59 645 LGLPNEXT1 LABEL 1CC59 DC41CC6D 646 CALLNP LOGCHAR see what to do with it 1CC5A 64C40060 3 IMM 647 CPR OBP OKLEN is the buffer full? 1CC5B FE07CC69 648 JGE LGLPSEND then send the line 0001CC5C 649 LGLPNEXT2 LABEL 1CC5C D0928000 2 REG 650 INCP R2 move to next char 1CC5D FA63CC56 1 651 DRJ R1 LGLPNEXT get the next char 652 * \ / 653 1CC5E E4C1AA46 3 654 ST OBP LOBP save this for next time 1CC5F 5D1F8002 6 STAK 655 LEAVE POP 656 * --- 657 0001CC60 658 LGLPCR LABEL 1CC60 60168400 0 2 @R 659 LD R0 @R2 get the next char 1CC61 6404000A 0 IMM 660 CPR R0 LF is it a line feed? 1CC62 FE03CC59 661 JEQ LGLPNEXT1 then carry on 1CC63 6404000D 0 IMM 662 CPR R0 CR is it a carriage return? 1CC64 FE03CC59 663 JEQ LGLPNEXT1 then carry on 1CC65 E4978801 2 6 BASE 664 ST R2 SP,LOGLPR2 save this 1CC66 DC41CCA3 665 CALLNP LOGBUFPR better print the buffer 1CC67 60978801 2 6 BASE 666 LD R2 SP,LOGLPR2 restore this register 1CC68 FE0FCC58 667 JMP LGLPNEXT0 now you can carry on 668 * --- 669 0001CC69 670 LGLPSEND LABEL 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 413 (RDULOG) F 30 RDU Logger Routines 1CC69 E4978801 2 6 BASE 671 ST R2 SP,LOGLPR2 save this 1CC6A DC41CCA3 672 CALLNP LOGBUFPR write the buffer to the file 1CC6B 60978801 2 6 BASE 673 LD R2 SP,LOGLPR2 restore this register 1CC6C FE0FCC5C 674 JMP LGLPNEXT2 675 * --- 676 677 END of LOGLOOP subroutine 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 414 (RDULOG) F 30 RDU Logger Routines 679 680 ********************************************************************************** 681 * * 682 * LOGCHAR classifies the character in R0 and places it into the * 683 * LOGBUF in a printable manner. * 684 * Call is: * 685 * LD R0 * 686 * LD OBP LOBP * 687 * CALLNP LOGCHAR * 688 * Eats R0, advances R3. * 689 * * 690 ********************************************************************************** 691 692 BLOCK 693 ENTRY LOGCHAR 694 695 BEGFRAME 00178801 6 BASE 696 LGCHR1R2 BSS 2 save R1 and R2 697 ENDFRAME 698 1CC6D DD5F8003 6 STAK 699 LOGCHAR ENTRNP PUSH 1CC6E E6578801 126 BASE 700 ST2 R1 SP,LGCHR1R2 save the registers 1CC6F 7804007F 0 IMM 701 AND R0 GASMASK make byte 7-bit 1CC70 64040020 0 IMM 702 CPR R0 BLANK is it a printable char? 1CC71 FE09CC79 703 JLT CNTLCHR jump if control char 1CC72 6404007F 0 IMM 704 CPR R0 DEL is it the delete char? 1CC73 FE03CCA2 705 JEQ LGCHDEL yes 0001CC74 706 INLOGLN LABEL 1CC74 E437AC04 0 3 @ 707 ST R0 @LBPT(OBP) put the char in the buffer 1CC75 D012C000 3 REG 708 INC OBP 1CC76 EDC1AA48 709 STW LBUFFUL say we are putting something in 710 * \ / 711 0001CC77 712 LGCHEXIT LABEL 1CC77 62578801 126 BASE 713 LD2 R1 SP,LGCHR1R2 restore the registers 1CC78 5D1F8003 6 STAK 714 LEAVE POP 715 * --- 716 0001CC79 717 CNTLCHR LABEL 1CC79 60520000 1 0 REG 718 LD R1 R0 get the char in R1 1CC7A 5044000E 1 IMM 719 MIN R1 CNTLTABL get index into table 1CC7B 5CA3CC7C 1 720 LDPC CNTLACT(R1) go do the proper operation 721 * --- 722 1CC7C 0001CC8B 723 CNTLACT VFD ADR LGCHNULL 0 - null 1CC7D 0001CC8D 724 VFD ADR CNTRLIN 1 - normal control char 1CC7E 0001CC8D 725 VFD ADR CNTRLIN 2 - normal control char 1CC7F 0001CC8D 726 VFD ADR CNTRLIN 3 - normal control char 1CC80 0001CC8D 727 VFD ADR CNTRLIN 4 - normal control char 1CC81 0001CC8D 728 VFD ADR CNTRLIN 5 - normal control char 1CC82 0001CC8D 729 VFD ADR CNTRLIN 6 - normal control char 1CC83 0001CC8D 730 VFD ADR CNTRLIN 7 - normal control char 1CC84 0001CC8D 731 VFD ADR LGCHBS 8 - back space 1CC85 0001CC94 732 VFD ADR LGCHHT 9 - horizontal tab 1CC86 0001CC8B 733 VFD ADR LGCHLF A - line feed 1CC87 0001CC8D 734 VFD ADR CNTRLIN B - normal control char 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 415 (RDULOG) F 30 RDU Logger Routines 1CC88 0001CC9B 735 VFD ADR LGCHFF C - form feed 1CC89 0001CC92 736 VFD ADR LGCHCR D - carriage return 0000000E ABS 737 CNTLTABL EQU DISPW CNTLACT 1CC8A 0001CC8D 738 VFD ADR CNTRLIN E and greater - normal control char 739 740 LGCHNULL EQU LGCHLF treat it like a line feed 741 LGCHBS EQU CNTRLIN put backspaces in as control char 742 0001CC8B 743 LGCHLF LABEL 1CC8B DC41CCA3 744 CALLNP LOGBUFPR time to print the logbuffer 1CC8C FE0FCC77 745 JMP LGCHEXIT 746 * --- 747 0001CC8D 748 CNTRLIN LABEL 1CC8D 6044005E 1 IMM 749 LD R1 UPARROW want to put in cntl char symbol 1CC8E E477AC04 1 3 @ 750 ST R1 @LBPT(OBP) place in output 1CC8F D012C000 3 REG 751 INC OBP 1CC90 7C040040 0 IMM 752 IOR R0 040 convert to upper case 1CC91 FE0FCC74 753 JMP INLOGLN 754 * --- 755 0001CC92 756 LGCHCR LABEL 1CC92 EDC1AA47 757 STW CRFLAG say a CR has been found 1CC93 FE0FCC77 758 JMP LGCHEXIT 759 * --- 760 0001CC94 761 LGCHHT LABEL 1CC94 6005AC11 0 IMM 762 LD R0 ADR BLANKS place some blanks into the line 1CC95 60440006 1 IMM 763 LD R1 6 1CC96 38B7AC04 2 3 @ 764 LEA R2 @LBPT(OBP) produce current addr in output buffer 1CC97 FE400000 765 CMOVE 1CC98 18C40006 3 IMM 766 ADD OBP 6 1CC99 EDC1AA48 767 STW LBUFFUL say we are putting something in 1CC9A FE0FCC77 768 JMP LGCHEXIT 769 * --- 770 0001CC9B 771 LGCHFF LABEL 1CC9B DC41CCA3 772 CALLNP LOGBUFPR print anything we already have 1CC9C 60440031 1 IMM 773 LD R1 "1" carriage control for top of form 1CC9D E451AC04 1 @ 774 ST R1 @LBPT put CC into buffer 1CC9E EDC1AA48 775 STW LBUFFUL say something in there to print 1CC9F 60C40001 3 IMM 776 LD OBP 1 to indicate one thing in buffer 1CCA0 DC41CCA3 777 CALLNP LOGBUFPR print it, causes a form feed 1CCA1 FE0FCC77 778 JMP LGCHEXIT go do it all over again 779 * --- 780 0001CCA2 781 LGCHDEL LABEL 1CCA2 FE0FCC77 782 JMP LGCHEXIT until I figure out what to do 783 * --- 784 785 END of LOGCHAR subroutine 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 416 (RDULOG) F 30 RDU Logger Routines 787 788 ********************************************************************************** 789 * * 790 * LOGBUFPR prints the current contents of the LBUFF if * 791 * any. * 792 * Call: * 793 * LD OBP * 794 * CALLNP LOGBUFPR * 795 * Eats R0. Sets R2, R3 to indicate buffer begin. * 796 * * 797 ********************************************************************************** 798 799 BLOCK 800 ENTRY LOGBUFPR 801 802 BEGFRAME 00178801 6 BASE 803 LGPRR1 BSS 1 place to save R1 804 ENDFRAME 805 1CCA3 DD5F8002 6 STAK 806 LOGBUFPR ENTRNP PUSH 1CCA4 EC01AA47 807 STZ CRFLAG say no CR's yet 1CCA5 5C01AA48 808 CMZ LBUFFUL is there anything to print? 1CCA6 FE03CCB2 809 JEQ LGPREXIT if not, get out of here 1CCA7 E4578801 1 6 BASE 810 ST R1 SP,LGPRR1 save this register 1CCA8 6052C000 1 3 REG 811 LD R1 OBP how many chars to write 1CCA9 6085A848 2 IMM 812 LD R2 ADR LBUFF specify where buffer is 1CCAA DC41CC3B 813 CALLNP LOGWRITETF and write them 814 * \ / 815 1CCAB 60C40001 3 IMM 816 LD OBP 1 set position for first char 1CCAC E4C1AA46 3 817 ST OBP LOBP save this 1CCAD EC01AA48 818 STZ LBUFFUL indicate nothing in buffer yet 1CCAE 60840020 2 IMM 819 LD R2 BLANK 1CCAF E491AC04 2 @ 820 ST R2 @LBPT put in for form control 1CCB0 6081AC05 2 821 LD R2 LBPT1 point to second char of buffer 1CCB1 60578801 1 6 BASE 822 LD R1 SP,LGPRR1 restore this register 0001CCB2 823 LGPREXIT LABEL 1CCB2 5D1F8002 6 STAK 824 LEAVE POP 825 * --- 826 827 END of LOGBUFPR subroutine 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 417 (RDULOG) F 30 RDU Logger Routines 829 830 ********************************************************************************** 831 * * 832 * This is a routine to write a session event to the log file. * 833 * Call: * 834 * EVENTLEN:= Char Count To Write * 835 * EVENTADR:= Buffer ADR * 836 * EVENTTYPE contains the FREQ code for the proper type of write. * 837 * CALLNP LOGIT * 838 * Restores all registers used. * 839 * * 840 ********************************************************************************** 841 842 BLOCK 843 ENTRY LOGIT 844 845 BEGFRAME 00178801 6 BASE 846 LOGITR0 BSS 2 save R0, R1 00178803 6 BASE 847 LOGITR2 BSS 2 save R2, R3 848 ENDFRAME 849 1CCB3 DD5F8005 6 STAK 850 LOGIT ENTRNP PUSH 1CCB4 5C01AA4E 851 CMZ LOGSESSION are we logging stuff 1CCB5 FE03CCC6 852 JEQ BYE if not let's leave 1CCB6 5C01AA50 853 CMZ LOGFILOPEN do we have a log file yet? 1CCB7 FE03CCC6 854 JEQ BYE jump if not 855 * \ / 856 1CCB8 E6178801 016 BASE 857 ST2 R0 SP,LOGITR0 save R0 and R1 because we care 1CCB9 E6978803 236 BASE 858 ST2 R2 SP,LOGITR2 save R2 and R3 because we care 1CCBA 6001AA4D 0 859 LD R0 EVENTTYPE get FREQ code for proper type of write 1CCBB 6241AA4B 12 860 LD2 R1 EVENTLEN pick up event length and address 1CCBC 60C1AA46 3 861 LD OBP LOBP get the current position in LBUFF 1CCBD DC41CC45 862 CALLNP LOGWRITE write it to the log 1CCBE FA05CCC4 0 863 JGTZ R0 OKDOKE jump if all went well 1CCBF 5C01AA4F 864 CMZ FILEERROR problems before this ? 1CCC0 FE05CCC4 865 JGT OKDOKE if so don't keep kicking a dead horse 866 * \ / 867 1CCC1 EDC1AA4F 868 STW FILEERROR and flag it 1CCC2 6005D3B0 0 IMM 869 LD R0 ADR ERM903 "Not able to write to session log" 1CCC3 DC41B88A 870 CALLNP OUT tell the user 0001CCC4 871 OKDOKE LABEL 1CCC4 62178801 016 BASE 872 LD2 R0 SP,LOGITR0 restore R0 and R1 because we care 1CCC5 62978803 236 BASE 873 LD2 R2 SP,LOGITR2 restore R2 and R3 because we care 0001CCC6 874 BYE LABEL 1CCC6 5D1F8005 6 STAK 875 LEAVE POP 876 * --- 877 878 END of LOGIT 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 418 (RDULOG) F 30 RDU Logger Routines 880 881 ********************************************************************************** 882 * * 883 * This thing saves the event for "LOGIT" to later log..... * 884 * No registers are changed. * 885 * * 886 ********************************************************************************** 887 888 BLOCK 889 ENTRY SAVEEVENT 890 ENTRY SPECSAVE 891 892 BEGFRAME 893 ENDFRAME 894 1CCC7 DD5F8001 6 STAK 895 SAVEEVENT ENTRNP PUSH 1CCC8 5C01AA4E 896 CMZ LOGSESSION 1CCC9 FE03CCCC 897 JEQ ENDIT 1CCCA E401AA4D 0 898 ST R0 EVENTTYPE save the write FREQ code 1CCCB E641AA4B 12 899 ST2 R1 EVENTLEN the length, and address 0001CCCC 900 ENDIT LABEL 1CCCC 5D1F8001 6 STAK 901 LEAVE POP 902 * --- 903 904 ********************************************************************************** 905 * * 906 * This is a special case savevent..... * 907 * Call: * 908 * LD R1 * 909 * EVENTADDR = * 910 * CALLNP SPECSAVE * 911 * Eats R0. * 912 * * 913 ********************************************************************************** 914 1CCCD DD5F8001 6 STAK 915 SPECSAVE ENTRNP PUSH 1CCCE 5C01AA4E 916 CMZ LOGSESSION log it? 1CCCF FE03CCD9 917 JEQ GOBACK jump if no 1CCD0 E441AA4B 1 918 ST R1 EVENTLEN save the event length 1CCD1 D001AA4B 919 INC EVENTLEN bump it for a terminator 1CCD2 60040042 0 IMM 920 LD R0 FRWRITEB get code for normal write 1CCD3 E401AA4D 0 921 ST R0 EVENTTYPE and save for Log routine 1CCD4 5C01AA50 922 CMZ LOGFILOPEN is there a log file yet? 1CCD5 FE03CCD9 923 JEQ GOBACK jump if not 1CCD6 5C01A8D6 924 CMZ STATE are we interactive 1CCD7 FE03CCD9 925 JEQ GOBACK if so then don't log 1CCD8 DC41CCB3 926 CALLNP LOGIT else log this sucker 0001CCD9 927 GOBACK LABEL 1CCD9 5D1F8001 6 STAK 928 LEAVE POP 929 * --- 930 931 END of SAVEEVENT and SPECSAVE subroutines 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 419 (RDULOG) F 30 RDU Logger Routines 933 934 ********************************************************************************** 935 * * 936 * This thing writes the portzero mode stuff... * 937 * Call: * 938 * EVENTADDR := * 939 * EVENTLEN := * 940 * CALLNP LOGRESP * 941 * Eats R0:R1 * 942 * * 943 ********************************************************************************** 944 945 BLOCK 946 ENTRY LOGRESP 947 948 BEGFRAME 00178801 6 BASE 949 ZEROR2 BSS 1 save R2 00178802 6 BASE 950 ZEROR3 BSS 2 save R3, R4 951 ENDFRAME 952 1CCDA DD5F8004 6 STAK 953 LOGRESP ENTRNP PUSH 1CCDB 5C01AA4E 954 CMZ LOGSESSION log it? 1CCDC FE03CCE4 955 JEQ GETOUT jump if no 956 * \ / 957 1CCDD E4978801 2 6 BASE 958 ST R2 SP,ZEROR2 save R2 1CCDE E6D78802 346 BASE 959 ST2 R3 SP,ZEROR3 save R3,R4 960 1CCDF 6081AA4C 2 961 LD R2 EVENTADDR pointer to their buffer 1CCE0 6041AA4B 1 962 LD R1 EVENTLEN how many chars there are 1CCE1 DC41CC53 963 CALLNP LOGLOOP put some chars in the buffer 964 * \ / 965 1CCE2 60978801 2 6 BASE 966 LD R2 SP,ZEROR2 restore R2 1CCE3 62D78802 346 BASE 967 LD2 R3 SP,ZEROR3 restore R3,R4 0001CCE4 968 GETOUT LABEL 1CCE4 5D1F8004 6 STAK 969 LEAVE POP 970 * --- 971 972 END of LOGRESP subroutine 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 420 (RDULOG) F 30 RDU Logger Routines 974 975 ********************************************************************************** 976 * * 977 * Routine to log the stupid prompt...."RDU:"..... * 978 * Eats R0:R2 * 979 * * 980 ********************************************************************************** 981 982 BLOCK 983 ENTRY LOGPROMPT 984 985 BEGFRAME 986 ENDFRAME 987 1CCE5 DD5F8001 6 STAK 988 LOGPROMPT ENTRNP PUSH 1CCE6 5C01AA4E 989 CMZ LOGSESSION are we taking session log? 1CCE7 FE03CCEF 990 JEQ ENDOFLINE if not then exit 1CCE8 5C01AA50 991 CMZ LOGFILOPEN is there a log file yet? 1CCE9 FE03CCEF 992 JEQ ENDOFLINE if not then don't log 1CCEA 60C1AA46 3 993 LD OBP LOBP pointer into LBUFF 1CCEB DC41CCA3 994 CALLNP LOGBUFPR make sure it is empty 1CCEC 60440004 1 IMM 995 LD R1 4 say how long 1CCED 6085AA5F 2 IMM 996 LD R2 ADR LOGPRMPT the prompt "RDU:" 1CCEE DC41CC53 997 CALLNP LOGLOOP 0001CCEF 998 ENDOFLINE LABEL 1CCEF 5D1F8001 6 STAK 999 LEAVE POP 1000 * --- 1001 1002 END of LOGPROMPT subroutine 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 421 (RDULOG) F 30 RDU Logger Routines 1004 1005 ********************************************************************************** 1006 * * 1007 * LOGPRINT starts the log file printing. It opens a batch job * 1008 * to print the file, then calls CLOSEM to close the log file and batch * 1009 * LUN's which starts the file printing. * 1010 * Call: * 1011 * CALLNP LOGPRINT * 1012 * Eats R0:R2 * 1013 * * 1014 ********************************************************************************** 1015 1016 BLOCK 1017 ENTRY LOGPRINT 1018 1019 BEGFRAME 1020 ENDFRAME 1021 1CCF0 DD5F8001 6 STAK 1022 LOGPRINT ENTRNP PUSH 1CCF1 5C01AA50 1023 CMZ LOGFILOPEN is there anything to print? 1CCF2 FE03CD06 1024 JEQ LOGPREND if not then get out of here 1CCF3 FEC00000 1025 NOP 0 room for specials 1CCF4 FEC00000 1026 NOP 0 room for specials 1027 1CCF5 60040122 0 IMM 1028 LD R0 URFREELUN get a free unit 1CCF6 09040064 IMM 1029 UREQ MAXLOCAL+XREQ start looking at the top 1CCF7 FA09CD07 0 1030 JLTZ R0 BATCHLUNERR 1CCF8 E441AA61 1 1031 ST R1 BATCHLUN save for later use 1032 1CCF9 60040268 0 IMM 1033 LD R0 FRNOPENCW open and create the file 1CCFA 60440011 1 IMM 1034 LD R1 BATCHLEN the length of the name 1CCFB 6085AA75 2 IMM 1035 LD R2 ADR DOTBATCH a .batch file 1CCFC 0881AA61 1036 FREQ BATCHLUN ask for it 1CCFD FA0BCD07 0 1037 JLEZ R0 BATCHLUNERR jump if trouble with open 1CCFE 60040040 0 IMM 1038 LD R0 FRWRITE lets build the batch job 1CCFF 60440035 1 IMM 1039 LD R1 BLLEN The length of our batch Line 1CD00 1841AA63 1 1040 ADD R1 EXTLEN add the ext (from Sys Number) 1CD01 6085AA64 2 IMM 1041 LD R2 ADR BATCHLINE Where the Batch Line is 1CD02 0881AA61 1042 FREQ BATCHLUN Put it in the .Batch File 1CD03 FA09CD0A 0 1043 JLTZ R0 BADBATCH error occurred writing batch job 1CD04 FEC00000 1044 NOP 0 room for specials 1CD05 FEC00000 1045 NOP 0 room for specials 0001CD06 1046 LOGPREND LABEL 1CD06 5D1F8001 6 STAK 1047 LEAVE POP 1048 * --- 1049 0001CD07 1050 BATCHLUNERR LABEL 1CD07 6005D3A1 0 IMM 1051 LD R0 ADR ERM901 "Not able to open batch file" 1CD08 DC41B88A 1052 CALLNP OUT tell the user 1CD09 FE0FCD06 1053 JMP LOGPREND 1054 * --- 1055 0001CD0A 1056 BADBATCH LABEL 1CD0A 6005D3A8 0 IMM 1057 LD R0 ADR ERM902 "Not able to write to batch file" 1CD0B DC41B88A 1058 CALLNP OUT tell the user 1CD0C FE0FCD06 1059 JMP LOGPREND then get out of dodge 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 422 (RDULOG) F 30 RDU Logger Routines 1060 * --- 1061 1062 END of LOGPRINT 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 423 (RDULOG) F 30 RDU Logger Routines 1064 1065 ********************************************************************************** 1066 * * 1067 * This routine will close the Batch and Log Luns. Note we * 1068 * don't check to see If the close failed or not, this is a * 1069 * "Close Damnit" flavor. * 1070 * Call: * 1071 * CALLNP CLOSEM * 1072 * Eats R0 * 1073 * * 1074 ********************************************************************************** 1075 1076 BLOCK 1077 ENTRY CLOSEM 1078 1079 BEGFRAME 1080 ENDFRAME 1081 1CD0D DD5F8001 6 STAK 1082 CLOSEM ENTRNP PUSH 1CD0E 5C01AA4E 1083 CMZ LOGSESSION Did we have a session? 1CD0F FE03CD1E 1084 JEQ TAKEOFF TakeOff if you didn't 1CD10 5C01AA50 1085 CMZ LOGFILOPEN is there a log file opened? 1CD11 FE03CD1E 1086 JEQ TAKEOFF don't waste time if so 1087 * \ / 1088 1CD12 60C1AA46 3 1089 LD OBP LOBP get log buffer index 1CD13 DC41CCA3 1090 CALLNP LOGBUFPR print anything still in buffer 1CD14 DC41CC31 1091 CALLNP LOGBLNKL put in a blank line 1CD15 DC41CC16 1092 CALLNP LOGDATE and the time 1CD16 DC41CC31 1093 CALLNP LOGBLNKL put in a blank line 1CD17 60040060 0 IMM 1094 LD R0 FRCLOSE lets close up 1CD18 0881AA60 1095 FREQ LOGLUN the session lun 1CD19 EC01AA50 1096 STZ LOGFILOPEN indicate no longer a session log 1CD1A 5C01A92E 1097 CMZ LOGFLAG is there a batch job to close 1CD1B FE03CD1E 1098 JEQ TAKEOFF if not the takeoff 1099 * \ / 1100 1CD1C 60040060 0 IMM 1101 LD R0 FRCLOSE Lets Close up the 1CD1D 0881AA61 1102 FREQ BATCHLUN The Batch lun, launches batch Job 0001CD1E 1103 TAKEOFF LABEL 1CD1E 5D1F8001 6 STAK 1104 LEAVE POP 1105 * --- 1106 1107 END of CLOSEM 1108 1109 END of LOGGING subroutines 159 160 INPUT RDUMESS 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 424 (RDUMESS) F 31 messages, etc. 1CD1F 52656D6F 3 NAMEMESS TEXT "Remote Diagnostic Utility v" 00000024 ABS 4 NML EQU (DISPC NAMEMESS)+8 message length + version 1CD27 37612020 5 VFD VERSIONHI,VERSIONLO 6 1CD28 6D612000 7 MESMA TEXTZ "ma " 1CD29 42495420 8 MESBIT TEXTZ "BIT " 1CD2B 42495453 9 MESBITS TEXTZ "BITS " 1CD2D 50414952 10 MESPAIR TEXTZ "PAIR " 1CD2F 43414348 11 MESCACH TEXTZ "CACH " 1CD31 5354414B 12 MESSTAK TEXTZ "STAK " 1CD33 494E5431 13 MESINT1 TEXTZ "INT1 " 1CD35 464C5431 14 MESFLT1 TEXTZ "FLT1 " 1CD37 464C5432 15 MESFLT2 TEXTZ "FLT2 " 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 425 (RDUMESS) F 31 messages, etc. 1CD39 2D2D4D6F 17 MOREMESS TEXTZ "--More--" 1CD3C 53697465 18 MESPASS TEXTZ "Site password?" 1CD40 4E6F7720 19 MESSITE TEXTZ "Now dialed into remote site, serial number " 1CD4B 4469616C 20 MESDIAL TEXTZ "Dialing system " 1CD4F 42726561 21 BPIMESS TEXTZ "Breakpoint (" 1CD53 29202043 22 BPICPUM TEXTZ ") CPU=" 1CD55 42524541 23 BPILISTM TEXTZ "BREAKPOINTS:" 1CD59 2E200000 24 PERBLNK TEXTZ ". " 1CD5A 204E414B 25 SYNCMESS TEXTZ " NAKs and timeouts occurred." 1CD62 20636865 26 FAILMESS TEXTZ " checksum errors occurred." 1CD69 4D6F6465 27 MODMESS TEXTZ "Modem = " 1CD6C 2C202044 28 DIALMESS TEXTZ ", Dialer = " 1CD70 2C202054 29 TYPEMESS TEXTZ ", Type = " 30 00000004 ABS 31 NREGPL EQU 4 number of registers per line 1CD76 00000001 32 REGPOST VFD 49,33,17,1 positions for registers 1CD7A 00000002 33 PPUREGSPOT VFD 50,34,18,2 positions for PPU registers 00000004 ABS 34 NCOMPL EQU 4 4 commands per line 1CD7B 820DA823 35 COMPOST PTR OBUFF(46) places in line to list 1CD7C C20DA81F 36 PTR OBUFF(31) 1CD7D 020DA81C 37 PTR OBUFF(16) 1CD7E 420DA818 38 PTR OBUFF(1) 39 1CD7F 47656E65 40 MSGENCOMS TEXTZ "General RDU commands:" 1CD85 43505520 41 MSCPCOMS TEXTZ "CPU commands (use leading C):" 1CD8D 4D435520 42 MSMCCOMS TEXTZ "MCU commands (use leading M):" 1CD95 50505520 43 MSPPCOMS TEXTZ "PPU commands (use leading P):" 1CD9D 53535520 44 MSSSCOMS TEXTZ "SSU commands (use leading S):" 45 1CDA5 52544F2C 46 RTOMESS TEXTZ "RTO," 1CDA7 43424E2C 47 CBNMESS TEXTZ "CBN," 1CDA9 5246522C 48 RFRMESS TEXTZ "RFR," 1CDAB 5246492C 49 RFIMESS TEXTZ "RFI," 1CDAD 544F3D00 50 TOMESS TEXTZ "TO=" 1CDAE 46524F4D 51 FROMMESS TEXTZ "FROM=" 1CDB0 46313D00 52 F1MESS TEXTZ "F1=" 1CDB1 46323D00 53 F2MESS TEXTZ "F2=" 1CDB2 5045313D 54 PE1MESS TEXTZ "PE1=" 1CDB4 5045323D 55 PE2MESS TEXTZ "PE2=" 56 1CDB6 0001D1A1 57 FLAGTAB VFD ADR ERM300 1CDB7 0001D1A3 58 VFD ADR ERM301 1CDB8 0001D1A5 59 VFD ADR ERM302 1CDB9 0001D1A7 60 VFD ADR ERM303 61 62 1CDBA 7878782F 63 DEVNAMES TEXTZ "xxx/" 1CDBC 4D43552F 64 TEXTZ "MCU/" 1CDBE 4350552F 65 TEXTZ "CPU/" 1CDC0 5050552F 66 TEXTZ "PPU/" 1CDC2 5353552F 67 TEXTZ "SSU/" 1CDC4 534D552F 68 TEXTZ "SMU/" 1CDC6 7878782F 69 TEXTZ "xxx/" 1CDC8 7878782F 70 TEXTZ "xxx/" 71 1CDCA 3D787878 72 DEVNAME TEXTZ "=xxx" 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 426 (RDUMESS) F 31 messages, etc. 1CDCC 3D4D4355 73 TEXTZ "=MCU" 1CDCE 3D435055 74 TEXTZ "=CPU" 1CDD0 3D505055 75 TEXTZ "=PPU" 1CDD2 3D535355 76 TEXTZ "=SSU" 1CDD4 3D534D55 77 TEXTZ "=SMU" 1CDD6 3D787878 78 TEXTZ "=xxx" 1CDD8 3D787878 79 TEXTZ "=xxx" 80 1CDDA 3F3D7878 81 DEVUNKMSG TEXTZ "?=xxx" 82 1CDDC 202D2043 83 COREMESS TEXTZ " - Core memory is attached" 1CDE3 202D2050 84 PEBXMESS TEXTZ " - PEBX memory is attached" 85 1CDEA 536C6F74 86 MESSLOT TEXTZ "Slot " 1CDEC 5752553A 87 MESWRU TEXTZ "WRU:" 1CDEE 53535520 88 MESWRU1 TEXTZ "SSU WRU(1):" 1CDF1 57525528 89 MESWRU15 TEXTZ "WRU(15):" 1CDF4 50505520 90 MESFAIL TEXTZ "PPU failed selftest, slot " 1CDFB 4572726F 91 MESBADFTCH TEXTZ "Error while fetching information from remote system:" 1CE09 3C756E64 92 MESNOSLOT TEXTZ "" 93 1CE0C 53776974 94 MESSFP TEXTZ "Switches=" 1CE0F 20205469 95 MESSTF TEXTZ " Timer Fence=" 1CE13 20204253 96 MESSBSE TEXTZ " BSE=" 1CE15 2020496E 97 MESSINT TEXTZ " Interrupt=" 1CE19 53545000 98 MESSSTP TEXTZ "STP" 1CE1A 484C5400 99 MESSHLT TEXTZ "HLT" 1CE1B 484C5478 100 MESSHLT0 TEXTZ "HLTx @0000" 1CE1E 43505520 101 MESSCPU TEXTZ "CPU " 1CE20 20455252 102 MESSERR TEXTZ " ERR " 103 1CE22 4350553D 104 MESCPU TEXTZ "CPU=" 0001CE24 105 MESCPR LABEL 1CE24 5230203A 106 MGCR0 TEXTZ "R0 :" 1CE26 5231203A 107 MGCR1 TEXTZ "R1 :" 1CE28 5232203A 108 MGCR2 TEXTZ "R2 :" 1CE2A 5233203A 109 MGCR3 TEXTZ "R3 :" 1CE2C 5234203A 110 MGCR4 TEXTZ "R4 :" 1CE2E 5235203A 111 MGCR5 TEXTZ "R5 :" 1CE30 5236203A 112 MGCR6 TEXTZ "R6 :" 1CE32 5237203A 113 MGCR7 TEXTZ "R7 :" 1CE34 5043203A 114 MGCPC TEXTZ "PC :" 1CE36 4D53523A 115 MGCMS TEXTZ "MSR:" 1CE38 4341523A 116 MGCCA TEXTZ "CAR:" 1CE3A 494D523A 117 MGCIM TEXTZ "IMR:" 1CE3C 496E7465 118 MGCIS TEXTZ "Interrupt Status:" 119 1CE41 5053523A 120 MGCPS TEXTZ "PSR:" 1CE43 4952203A 121 MGCIR TEXTZ "IR :" 1CE45 4941443A 122 TEXTZ "IAD:" 123 1CE47 5050553D 124 MESPPU TEXTZ "PPU=" 0001CE49 125 MESPPR LABEL 1CE49 4449443A 126 MGPDI TEXTZ "DID:" 1CE4B 4953203A 127 MGPIS TEXTZ "IS :" 1CE4D 4353313A 128 MGPS1 TEXTZ "CS1:" 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 427 (RDUMESS) F 31 messages, etc. 1CE4F 4353323A 129 MGPS2 TEXTZ "CS2:" 1CE51 4243313A 130 MGPC1 TEXTZ "BC1:" 1CE53 4D41313A 131 MGPA1 TEXTZ "MA1:" 1CE55 4243323A 132 MGPC2 TEXTZ "BC2:" 1CE57 4D41323A 133 MGPA2 TEXTZ "MA2:" 134 1CE59 424F4F54 135 MGSBS TEXTZ "BOOT SWITCH:" 1CE5D 434C4F43 136 MGSCL TEXTZ "CLOCK:" 1CE5F 45525220 137 MGSER TEXTZ "ERR LOG:" 1CE62 49434841 138 MGSIC TEXTZ "ICHAR:" 1CE64 494E5420 139 MGSIM TEXTZ "INT MASK:" 1CE67 4F434841 140 MGSOC TEXTZ "OCHAR:" 1CE69 53574954 141 MGSSW TEXTZ "SWITCHES:" 1CE6C 5446454E 142 MGSTF TEXTZ "TFENCE:" 1CE6E 4D42313A 143 MGSMB1 TEXTZ "MB1:" 1CE70 4D42323A 144 MGSMB2 TEXTZ "MB2:" 145 146 * messages for SMU error log command 1CE72 20455252 147 MESSMUELD TEXTZ " ERRLOG: A= Rank= Chip= " 0000000A ABS 148 RAWPOS EQU 10 position for raw error word 00000014 ABS 149 ERRPOS EQU 20 position for entry type 00000021 ABS 150 RASCASPOS EQU 33 position for RAS/CAS 00000005 ABS 151 RASCASWID EQU 5 width of RAS/CAS 0000002C ABS 152 RANKPOS EQU 44 position for rank number 00000033 ABS 153 CHIPPOS EQU 51 position for chip description 154 155 * error entry types 1CE82 536F6674 156 MESSOFT TEXTZ "Soft" 1CE84 48617264 157 MESHARD TEXTZ "Hard" 1CE86 556E6669 158 MESNOFIX TEXTZ "Unfixable" 1CE89 556E6B6E 159 MESUNK TEXTZ "Unknown!" 160 161 * U-number parts when syndrome is for single chip 1CE8C 28550000 162 MESUNUM1 TEXTZ "(U" 1CE8D 29000000 163 MESUNUM2 TEXTZ ")" 164 165 * explanations when syndrome is not for a single chip 1CE8E 4D756C74 166 MESMULT TEXTZ "Multiple" 1CE91 28416C6C 167 MESALLHIGH TEXTZ "(All ones error)" 1CE96 28416C6C 168 MESALLLOW TEXTZ "(All zeros error)" 1CE9B 3F202042 169 MESBADSYN TEXTZ "? Bad syndrome!" 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 428 (RDUMESS) F 31 messages, etc. 171 172 ********************************************************************************** 173 * * 174 * This section contains peripheral device names for each * 175 * known device. Also for unknown devices... * 176 * * 177 ********************************************************************************** 178 1CEA0 2020556E 179 DVMESUNK TEXTZ " Unknown device" 1CEA5 20204246 180 DVMESBFD TEXTZ " BFDC" 1CEA7 20204C50 181 DVMESLPC TEXTZ " LPC" 1CEA9 20204143 182 DVMESACC TEXTZ " ACC" 1CEAB 20204E69 183 DVMESNT TEXTZ " Nine-track MTC" 1CEB0 20204354 184 DVMESCTC TEXTZ " CTC" 1CEB2 20205669 185 DVMESVTC TEXTZ " Video Tape Controller" 1CEB8 20205343 186 DVMESSDC TEXTZ " SCSI Disk Controller" 187 1CEBE 0001CEA0 188 DEVMESTAB ADR DVMESUNK 0 1CEBF 0001CEA5 189 ADR DVMESBFD 1 1CEC0 0001CEA7 190 ADR DVMESLPC 2 1CEC1 0001CEA0 191 ADR DVMESUNK 3 1CEC2 0001CEA0 192 ADR DVMESUNK 4 1CEC3 0001CEA0 193 ADR DVMESUNK 5 1CEC4 0001CEA0 194 ADR DVMESUNK 6 1CEC5 0001CEA0 195 ADR DVMESUNK 7 1CEC6 0001CEA9 196 ADR DVMESACC 8 1CEC7 0001CEAB 197 ADR DVMESNT 9 1CEC8 0001CEB0 198 ADR DVMESCTC A 1CEC9 0001CEB2 199 ADR DVMESVTC B 1CECA 0001CEB8 200 ADR DVMESSDC C 1CECB 0001CEA0 201 ADR DVMESUNK D 1CECC 0001CEA0 202 ADR DVMESUNK E 1CECD 0001CEA0 203 ADR DVMESUNK F 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 429 (RDUMESS) F 31 Error messages 206 207 ********************************************************************************** 208 * * 209 * The following are the error messages for the * 210 * RDU. Error messages for errors given by the * 211 * system are obtained from Control Mode via the * 212 * 'message get' Xreq. * 213 * * 214 ********************************************************************************** 215 1CECE 4572726F 216 ERM000 TEXTZ "Error. (Message not in table)." 1CED6 556E6B6E 217 ERM100 TEXTZ "Unknown command" 1CEDA 42616420 218 ERM102 TEXTZ "Bad input line - try again" 1CEE1 52656D6F 219 ERM103 TEXTZ "Remote system not stopped" 1CEE8 45787065 220 ERM104 TEXTZ "Expecting RDU command" 1CEEE 44657669 221 ERM105 TEXTZ "Device type specified with command does not match slot" 1CEFC 5465726D 222 ERM106 TEXTZ "Terminator not valid for this command" 1CF06 536C6F74 223 ERM107 TEXTZ "Slot number must be in range 0:F" 1CF0F 4D757374 224 ERM108 TEXTZ "Must be dialed into remote system for this command" 1CF1C 536C6F74 225 ERM109 TEXTZ "Slot has not been specified, or module not on remote bus" 1CF2B 436F6D6D 226 ERM10A TEXTZ "Command is only valid from a DO file" 227 1CF35 4E6F2070 228 ERM110 TEXTZ "No parameters used with this command" 1CF3F 546F6F20 229 ERM111 TEXTZ "Too many parameters given" 1CF46 42616420 230 ERM112 TEXTZ "Bad parameter or wrong type for command" 1CF50 50617261 231 ERM113 TEXTZ "Parameter expected with command" 1CF58 50617261 232 ERM114 TEXTZ "Parameter out of bounds" 1CF5E 45787065 233 ERM115 TEXTZ "Expecting ON or OFF" 1CF63 45787065 234 ERM116 TEXTZ "Expecting value for write" 1CF6A 53706563 235 ERM117 TEXTZ "Specified address exceeds allowable range" 1CF75 57726974 236 ERM118 TEXTZ "Write not allowed" 1CF7A 4572726F 237 ERM119 TEXTZ "Error reading DO file" 238 1CF80 45787065 239 ERM120 TEXTZ "Expecting CPU command" 1CF86 45787065 240 ERM121 TEXTZ "Expecting MCU command" 1CF8C 45787065 241 ERM122 TEXTZ "Expecting PPU command" 1CF92 45787065 242 ERM123 TEXTZ "Expecting SSU command" 1CF98 45787065 243 ERM124 TEXTZ "Expecting PPU port number" 1CF9F 506F7274 244 ERM125 TEXTZ "Port number must be in range 0:3" 1CFA8 496E7661 245 ERM127 TEXTZ "Invalid display type for DL command" 1CFB1 42756720 246 ERM129 TEXTZ "Bug in the help routine" 247 1CFB7 45787065 248 ERM130 TEXTZ "Expecting start and stop addresses" 1CFC0 45787065 249 ERM131 TEXTZ "Expecting data for fill" 1CFC6 45787065 250 ERM132 TEXTZ "Expecting data for scan" 1CFCC 45787065 251 ERM133 TEXTZ "Expecting mask for scan" 1CFD2 41646472 252 ERM134 TEXTZ "Address range out of order" 253 1CFD9 45787065 254 ERM140 TEXTZ "Expecting site serial number" 1CFE1 45787065 255 ERM141 TEXTZ "Expecting site password" 1CFE7 45787065 256 ERM142 TEXTZ "Expecting site phone number" 1CFEE 45787065 257 ERM143 TEXTZ "Expecting baud rate specification" 1CFF7 436F756C 258 ERM144 TEXTZ "Could not access site configuration file" 1D002 53697465 259 ERM145 TEXTZ "Site serial number not found in site file" 1D00D 4572726F 260 ERM146 TEXTZ "Error trying to read site file" 1D015 44617461 261 ERM147 TEXTZ "Data format error in site file" 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 430 (RDUMESS) F 31 Error messages 1D01D 45787065 262 ERM148 TEXTZ "Expecting call class number" 263 1D024 4C6F7374 264 ERM150 TEXTZ "Lost communications with remote machine. Please redial." 1D033 436F756C 265 ERM151 TEXTZ "Could not access remote system (Timeout)" 1D03E 42757320 266 ERM152 TEXTZ "Bus error from remote system - " 1D046 27427573 267 ERM153 TEXTZ "'Bus Error Active' on remote system" 1D04F 52656D6F 268 ERM154 TEXTZ "Remote system not accepting port zero input" 1D05A 52656D6F 269 ERM155 TEXTZ "Remote Maintenance switch off on remote system" 1D066 47617262 270 ERM156 TEXTZ "Garbage from remote system. Possible password error." 1D074 4E6F2064 271 ERM157 TEXTZ "No dialer or modem available" 1D07C 5761726E 272 ERM158 TEXTZ "Warning - remote system not properly initialized" 1D089 28436C65 273 ERM159 TEXTZ "(Clearall has been sent to remote system)" 1D094 4572726F 274 ERM15A TEXTZ "Error during dialing" 275 1D09A 52656D6F 276 ERM160 TEXTZ "Remote command error - SSU command processor error" 1D0A7 52656D6F 277 ERM161 TEXTZ "Remote command error - bad class" 1D0B0 52656D6F 278 ERM162 TEXTZ "Remote command error - bad BCM" 1D0B8 52656D6F 279 ERM163 TEXTZ "Remote command error - bad address relocation for BCM" 1D0C6 4578636C 280 ERM164 TEXTZ "Excluded page" 1D0CA 52656D6F 281 ERM165 TEXTZ "Remote command error - system not paused" 1D0D5 52656D6F 282 ERM166 TEXTZ "Remote command error - relocation to non-CPU slot" 1D0E2 52656D6F 283 ERM167 TEXTZ "Remote command error - port zero input overflow" 284 1D0EE 45787065 285 ERM170 TEXTZ "Expecting display type specifier" 1D0F7 556E6B6E 286 ERM171 TEXTZ "Unknown display type - Expecting H, D, I, A, or P" 287 1D104 4E6F2065 288 ERM180 TEXTZ "No error code indicated" 1D10A 42757320 289 ERM181 TEXTZ "Bus parity error" 1D10F 57726F6E 290 ERM182 TEXTZ "Wrong flags or DBW" 1D114 42616420 291 ERM183 TEXTZ "Bad command code" 1D119 42616420 292 ERM184 TEXTZ "Bad address" 1D11C 52544F20 293 ERM185 TEXTZ "RTO timeout" 1D11F 52657370 294 ERM186 TEXTZ "Response timeout" 1D124 42757320 295 ERM187 TEXTZ "Bus PE and wrong flags" 1D12A 43505520 296 ERM188 TEXTZ "CPU page fault on trap" 1D130 43505520 297 ERM189 TEXTZ "CPU page fault on console area save" 1D139 556E6B6E 298 ERM18A TEXTZ "Unknown error code" 1D13E 50505520 299 ERM18B TEXTZ "PPU confused" 1D142 4D61696E 300 ERM18C TEXTZ "Main memory improperly configured" 1D14B 42616420 301 ERM18D TEXTZ "Bad data for pseudo address" 1D152 4D435520 302 ERM18E TEXTZ "MCU NAKed on bus transfer" 303 1D159 42616420 304 ERM190 TEXTZ "Bad input from concurrent process" 305 1D162 4E6F206D 306 ERM210 TEXTZ "No more pointers to follow backwards" 1D16C 45787065 307 ERM215 TEXTZ "Expecting display type or display operator" 1D177 496E7661 308 ERM216 TEXTZ "Invalid PAK6 format" 1D17C 45787065 309 ERM217 TEXTZ "Expecting a hexadecimal number" 1D184 45787065 310 ERM218 TEXTZ "Expecting a decimal number" 1D18B 4E6F2070 311 ERM219 TEXTZ "No presently selected address" 312 1D193 45787065 313 ERM221 TEXTZ "Expecting control character" 1D19A 45787065 314 ERM222 TEXTZ "Expecting EXIT parameter" 315 1D1A1 41626E6D 316 ERM300 TEXTZ "Abnm" 1D1A3 44617461 317 ERM301 TEXTZ "Data" 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 431 (RDUMESS) F 31 Error messages 1D1A5 436D6E64 318 ERM302 TEXTZ "Cmnd" 1D1A7 45727200 319 ERM303 TEXTZ "Err" 320 1D1A8 41626F72 321 ERM310 TEXTZ "Aborting Scan/Fill. Last address = " 322 1D1B2 53656C65 323 ERM320 TEXTZ "Selected memory device must be SMU." 1D1BB 52616E6B 324 ERM321 TEXTZ "Rank number is out of range." 1D1C3 45787065 325 ERM322 TEXTZ "Expecting chip number." 1D1C9 43686970 326 ERM323 TEXTZ "Chip number is out of range." 1D1D1 45787065 327 ERM324 TEXTZ "Expecting rank number." 328 1D1D7 4E6F206D 329 ERM330 TEXTZ "No memory attached to this MCU" 330 1D1DF 4E6F2065 331 ERM380 TEXTZ "No error:" 1D1E2 42757320 332 ERM381 TEXTZ "Bus parity error:" 1D1E7 57726F6E 333 ERM382 TEXTZ "Wrong flags or DBW:" 1D1EC 42616420 334 ERM383 TEXTZ "Bad command code:" 1D1F1 42616420 335 ERM384 TEXTZ "Bad address:" 1D1F5 52544F20 336 ERM385 TEXTZ "RTO timeout:" 1D1F9 52657370 337 ERM386 TEXTZ "Response timeout:" 1D1FE 42757320 338 ERM387 TEXTZ "Bus PE, bad flags:" 1D203 50616765 339 ERM388 TEXTZ "Page fault on trap:" 1D208 50616765 340 ERM389 TEXTZ "Page fault-CA save:" 1D20D 556E6B6E 341 ERM38A TEXTZ "Unknown error code:" 1D212 50505520 342 ERM38B TEXTZ "PPU confused:" 1D216 4D61696E 343 ERM38C TEXTZ "Main memory bad:" 1D21B 42616420 344 ERM38D TEXTZ "Bad data:" 1D21E 4D435520 345 ERM38E TEXTZ "MCU NAKed:" 346 1D221 4E6F2076 347 ERM390 TEXTZ "No valid WRU information for this device" 348 *ERM391 TEXTZ "No device in this slot" 1D22C 4E6F206D 349 ERM392 TEXTZ "No map has been done. Cannot find any occupied slots." 350 1D23A 4D617869 351 ERM400 TEXTZ "Maximum breakpoints already set" 1D242 42726561 352 ERM401 TEXTZ "Breakpoint already set" 1D248 4E6F2062 353 ERM402 TEXTZ "No breakpoint set at that location" 1D251 4E6F2062 354 ERM403 TEXTZ "No breakpoints set" 1D256 5761726E 355 ERM404 TEXTZ "Warning - Breakpoints still in remote machine!" 1D262 436F756C 356 ERM405 TEXTZ "Could not restore breakpointed instruction - " 1D26E 42726561 357 ERM406 TEXTZ "Breakpoint is still in the remote machine" 1D279 53686F75 358 ERM407 TEXTZ "Should it be removed from the RDU breakpoint table? " 1D287 506C6561 359 ERM408 TEXTZ "Please answer yes or no " 1D28E 436F756C 360 ERM409 TEXTZ "Could not set breakpoint instruction at " 361 1D299 4E6F2066 362 ERM500 TEXTZ "No free units available" 1D29F 556E6974 363 ERM501 TEXTZ "Unit must be in range 1-200" 1D2A6 45787065 364 ERM502 TEXTZ "Expecting unit or file name" 1D2AD 46696C65 365 ERM503 TEXTZ "File not found" 1D2B1 556E6974 366 ERM504 TEXTZ "Unit not equipped" 1D2B6 436F756C 367 ERM505 TEXTZ "Could not open file" 368 1D2BB 436F6E63 369 ERM510 TEXTZ "Concurrent diagnostic process does not exist" 1D2C7 436F756C 370 ERM511 TEXTZ "Could not create concurrent process" 1D2D0 436F756C 371 ERM512 TEXTZ "Could not open path units" 1D2D7 4E6F7420 372 ERM513 TEXTZ "Not allowed when concurrent process exists" 1D2E2 436F756C 373 ERM514 TEXTZ "Could not send line to concurrent process" 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 432 (RDUMESS) F 31 Error messages 1D2ED 43616E20 374 ERM516 TEXTZ "Can not run DO file and concurrent process together" 1D2FA 43616E20 375 ERM517 TEXTZ "Can not run more than one concurrent process" 376 1D306 4572726F 377 ERM550 TEXTZ "Error in DO file: string definition incorrect" 378 1D312 546F6F20 379 ERM600 TEXTZ "Too many symbols for RDU to handle" 1D31B 42616420 380 ERM601 TEXTZ "Bad block in symbol info" 381 1D322 53796D62 382 ERM700 TEXTZ "Symbol not found" 1D327 53796D62 383 ERM701 TEXTZ "Symbol not a memory address" 1D32E 45787065 384 ERM702 TEXTZ "Expecting symbol name" 1D334 45787065 385 ERM703 TEXTZ "Expecting symbol or memory address" 1D33D 53756270 386 ERM704 TEXTZ "Subprogram not found" 387 1D343 45787472 388 ERM800 TEXTZ "Extra delimiters between input items" 1D34D 42616420 389 ERM801 TEXTZ "Bad characters in input" 1D353 44617465 390 ERM802 TEXTZ "Date is out of range" 1D359 45787472 391 ERM803 TEXTZ "Extra date in input" 1D35E 59656172 392 ERM804 TEXTZ "Year is out of range." 1D364 45787472 393 ERM805 TEXTZ "Extra year in input" 1D369 496C6C65 394 ERM806 TEXTZ "Illegal time value" 1D36E 45787472 395 ERM807 TEXTZ "Extra time in input" 1D373 45787472 396 ERM808 TEXTZ "Extra alpha strings in input" 1D37B 42616420 397 ERM809 TEXTZ "Bad month name" 1D37F 45787472 398 ERM810 TEXTZ "Extra month name in input" 1D386 45787472 399 ERM811 TEXTZ "Extra AM, PM indicator in input" 1D38E 414D2C20 400 ERM812 TEXTZ "AM, PM indicator appears before time" 401 1D398 4E6F7420 402 ERM900 TEXTZ "Not able to open session log file" 1D3A1 4E6F7420 403 ERM901 TEXTZ "Not able to open batch file" 1D3A8 4E6F7420 404 ERM902 TEXTZ "Not able to write to batch file" 1D3B0 4E6F7420 405 ERM903 TEXTZ "Not able to write to session log file" 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 433 (RDUMESS) F 31 Error messages 407 408 ********************************************************************************** 409 * * 410 * Error message pointer tables * 411 * * 412 ********************************************************************************** 413 1D3BA 0001D09A 414 E1TAB VFD ADR ERM160 errors for class 1 response 1D3BB 0001D0A7 415 VFD ADR ERM161 1D3BC 0001D0B0 416 VFD ADR ERM162 1D3BD 0001D0B8 417 VFD ADR ERM163 1D3BE 0001D0C6 418 VFD ADR ERM164 1D3BF 0001D0CA 419 VFD ADR ERM165 1D3C0 0001D0D5 420 VFD ADR ERM166 1D3C1 0001D0E2 421 VFD ADR ERM167 422 423 1D3C2 0001D104 424 E2TAB VFD ADR ERM180 errors for class 2 response 1D3C3 0001D10A 425 VFD ADR ERM181 1D3C4 0001D10F 426 VFD ADR ERM182 1D3C5 0001D114 427 VFD ADR ERM183 1D3C6 0001D119 428 VFD ADR ERM184 1D3C7 0001D11C 429 VFD ADR ERM185 1D3C8 0001D11F 430 VFD ADR ERM186 1D3C9 0001D124 431 VFD ADR ERM187 1D3CA 0001D12A 432 VFD ADR ERM188 1D3CB 0001D130 433 VFD ADR ERM189 1D3CC 0001D139 434 VFD ADR ERM18A 1D3CD 0001D13E 435 VFD ADR ERM18B 1D3CE 0001D142 436 VFD ADR ERM18C 1D3CF 0001D14B 437 VFD ADR ERM18D 1D3D0 0001D152 438 VFD ADR ERM18E 1D3D1 0001CECE 439 VFD ADR ERM000 440 1D3D2 0001D1DF 441 WRU1TAB VFD ADR ERM380 error messages for WRU 1 error code 1D3D3 0001D1E2 442 VFD ADR ERM381 1D3D4 0001D1E7 443 VFD ADR ERM382 1D3D5 0001D1EC 444 VFD ADR ERM383 1D3D6 0001D1F1 445 VFD ADR ERM384 1D3D7 0001D1F5 446 VFD ADR ERM385 1D3D8 0001D1F9 447 VFD ADR ERM386 1D3D9 0001D1FE 448 VFD ADR ERM387 1D3DA 0001D203 449 VFD ADR ERM388 1D3DB 0001D208 450 VFD ADR ERM389 1D3DC 0001D20D 451 VFD ADR ERM38A 1D3DD 0001D212 452 VFD ADR ERM38B 1D3DE 0001D216 453 VFD ADR ERM38C 1D3DF 0001D21B 454 VFD ADR ERM38D 1D3E0 0001D21E 455 VFD ADR ERM38E 1D3E1 0001CECE 456 VFD ADR ERM000 457 458 1D3E2 0001CECE 459 EACSTAB VFD ADR ERM000 errors for dialer response 1D3E3 0001D05A 460 VFD ADR ERM155 1D3E4 0001D066 461 VFD ADR ERM156 1D3E5 0001D033 462 VFD ADR ERM151 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 434 (RDUMESS) F 31 Error messages 1D3E6 0001D074 463 VFD ADR ERM157 1D3E7 0001D094 464 VFD ADR ERM15A 1D3E8 0001CECE 465 VFD ADR ERM000 161 162 INPUT RDUHELP 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 435 (RDUHELP) F 32 Error messages 2 3 ********************************************************************************** 4 * * 5 * All of the help messages are contained in this file. The * 6 * address of the help messages is contained in the related command * 7 * control element. The format for the help messages is a leading * 8 * line describing the format of the instruction then multiple lines * 9 * of text describing the message. A word of zeroes indicates the * 10 * end of the help message. All lines of text must be zero terminated. * 11 * * 12 ********************************************************************************** 13 1D3E9 464F524D 14 HLPMBOOT TEXTZ "FORM IS: BOOT," 1D3F0 20202020 15 TEXTZ " Causes the SSU to do a boot. The boot code uses as" 1D401 20202020 16 TEXTZ " the boot switch number. This is equivalent to a SYSINIT," 1D411 20202020 17 TEXTZ " BOOTCOPY , GO." 1D419 00000000 18 VFD NULL 1D41A 464F524D 19 HLPMBTCPY TEXTZ "FORM IS: BOOTCOPY," 1D422 20202020 20 TEXTZ " Causes prom boot code to be loaded but not run. The boot code" 1D433 20202020 21 TEXTZ " uses as the boot switch number." 1D43F 00000000 22 VFD NULL 1D440 464F524D 23 HLPMBPI TEXTZ "FORM IS: BPI,
" 1D446 20202020 24 TEXTZ " The BPI command sets a breakpoint at
. If that location" 1D458 20202020 25 TEXTZ " is reached after a GO or I command is given the remote machine will" 1D46A 20202020 26 TEXTZ " stop and the current instruction displayed. " 1D477 20202020 27 TEXTZ " Breakpoints can be cleared with the CLEARBPI(S) command." 1D487 00000000 28 VFD NULL 1D488 464F524D 29 HLPMBPIL TEXTZ "FORM IS: BPILIST" 1D48D 20202020 30 TEXTZ " Lists the addresses of all set breakpoints." 1D499 00000000 31 VFD NULL 1D49A 464F524D 32 HLPMC TEXTZ "FORM IS: C[,slot number][,CPU command]" 1D4A4 20202020 33 TEXTZ " If the command is entered with no parameters, the slot number of the" 1D4B7 20202020 34 TEXTZ " currently selected CPU is displayed along with its WRU(0). A new" 1D4C9 20202020 35 TEXTZ " slot number (0:F) may be entered to select a different CPU, or a" 1D4DB 20202020 36 TEXTZ " '.' may be entered to redisplay the slot number and WRU(0)." 1D4EB 20000000 37 TEXTZ " " 1D4EC 20202020 38 TEXTZ " This command is also used to preface CPU commands." 1D4FA 20202020 39 TEXTZ " The optional slot number is used to specify a particular CPU." 1D50B 00000000 40 VFD NULL 1D50C 464F524D 41 HLPMCLALL TEXTZ "FORM IS: CLEARALL" 1D511 20202020 42 TEXTZ " Performs a master-clear of the system. (Does not disconnect the RDU.)" 1D524 00000000 43 VFD NULL 1D525 464F524D 44 HLPMCBPI TEXTZ "FORM IS: CLEARBPI
" 1D52C 20202020 45 TEXTZ " Clears the breakpoint set at
." 1D537 00000000 46 VFD NULL 1D538 464F524D 47 HLPMCBPIS TEXTZ "FORM IS: CLEARBPIS" 1D53D 20202020 48 TEXTZ " Clears all set breakpoints." 1D545 00000000 49 VFD NULL 1D546 464F524D 50 HLPMCLSSU TEXTZ "FORM IS: CLEARSSU" 1D54B 20202020 51 TEXTZ " Clears the SSU bus interface." 1D554 00000000 52 VFD NULL 1D555 464F524D 53 HLPMCMND TEXTZ "FORM IS: COMMANDS" 1D55A 20202020 54 TEXTZ " This command provides a list of all RDU commands." 1D568 20202020 55 TEXTZ " For help on any command type 'HELP,'" 1D575 20202020 56 TEXTZ " For syntax information, type ' ?'." 1D581 00000000 57 VFD NULL 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 436 (RDUHELP) F 32 Error messages 1D582 464F524D 58 HLPMD TEXTZ "FORM IS: D,[,]" 1D58E 20202020 59 TEXTZ " This command is used to display and possibly alter a word in memory." 1D5A1 20202020 60 TEXTZ " Addresses are mapped using the MSR monitor mode bit (BIT 23) and" 1D5B3 20202020 61 TEXTZ " the page file of the currently selected CPU. (The 020000 bit of the" 1D5C6 20202020 62 TEXTZ " memory addresss is XORed with the monitor mode bit.) If symbols" 1D5D8 20202020 63 TEXTZ " are available an address symbol may be used as the memory address." 1D5EA 20202020 64 TEXTZ " The memory address (0:3FFFF) is displayed according to the display" 1D5FC 20202020 65 TEXTZ " type. The default display type is hexadecimal. Display types are:" 1D60E 20202020 66 TEXTZ " a - ascii d- decimal h - hexadecimal" 1D61B 20202020 67 TEXTZ " p - PAK6 p6 - PAK6 i - opcode disassembly" 1D629 20202020 68 TEXTZ " t - double word time z - single word time" 1D637 20202020 69 TEXTZ " After the word is displayed one of the following may be entered:" 1D649 20202020 70 TEXTZ " ':' to change the contents of the word," 1D657 20202020 71 TEXTZ " 'line feed' to display the next word," 1D663 20202020 72 TEXTZ " 'carriage return' to exit display mode," 1D66F 20202020 73 TEXTZ " '^' to display previous word," 1D679 20202020 74 TEXTZ " '>' treats displayed word as a pointer," 1D685 20202020 75 TEXTZ " '<' to redisplay word displayed before '>'," 1D692 20202020 76 TEXTZ " '.' to redisplay the current location," 1D69E 20202020 77 TEXTZ " '@' to display absolute memory address, or" 1D6AB 20202020 78 TEXTZ " 'display type' to redisplay the current location in a different" 1D6BD 20202020 79 TEXTZ " format." 1D6C1 00000000 80 VFD NULL 1D6C2 464F524D 81 HLPMDL TEXTZ "FORM IS: DL,[,]" 1D6CE 20202020 82 TEXTZ " This command displays 8 words of memory on one line in the format" 1D6E0 20202020 83 TEXTZ " specified by the display type. Valid display types are:" 1D6F0 20202020 84 TEXTZ " a - ascii h - hexadecimal" 1D6FC 20202020 85 TEXTZ " p or p6 - pack-6 d - decimal" 1D707 20202020 86 TEXTZ " The default display type is hexadecimal. If symbols are available" 1D719 20202020 87 TEXTZ " an address symbol may be used instead of the memory address." 1D72A 20000000 88 TEXTZ " " 1D72B 20202020 89 TEXTZ " After the word is displayed one of the following may be entered:" 1D73D 20202020 90 TEXTZ " 'line feed' to display the next 8 words," 1D749 20202020 91 TEXTZ " 'carriage return' to exit display mode," 1D755 20202020 92 TEXTZ " '^' to display previous eight words," 1D760 20202020 93 TEXTZ " '>' treats first displayed word as a pointer," 1D76E 20202020 94 TEXTZ " '<' to redisplay the line displayed before '>'," 1D77C 20202020 95 TEXTZ " '.' to redisplay the current words," 1D787 20202020 96 TEXTZ " '@' to display absolute memory address, or" 1D794 20202020 97 TEXTZ " 'display type' to redisplay the current line in a different format." 1D7A7 00000000 98 VFD NULL 1D7A8 464F524D 99 HLPMDIAL TEXTZ "FORM IS: DIAL,[,[,high|low|],]" 1D7B9 20202020 100 TEXTZ " Establishes a communication link with a remote 8000 system." 1D7C9 20202020 101 TEXTZ " If the phone number is not given on the command line then it" 1D7DA 20202020 102 TEXTZ " will be looked up in the SITEFILE along with the rest of the" 1D7EB 20202020 103 TEXTZ " necessary information. If the phone number is given on the" 1D7FB 20202020 104 TEXTZ " command line all necessary information must be included. The" 1D80C 20202020 105 TEXTZ " echo will then be turned off and the password prompted for." 1D81C 20202020 106 TEXTZ " If you specify a specific baud rate that rate will be used for" 1D82D 20202020 107 TEXTZ " for the entire session including the initial callup." 1D83C 00000000 108 VFD NULL 1D83D 464F524D 109 HLPMDO TEXTZ "FORM IS: DO [LIST] [SUPPRESS]" 1D848 20202020 110 TEXTZ " The DO command directs the RDU to input its commands from the" 1D859 20202020 111 TEXTZ " specified file instead of from the user's terminal. The RDU will" 1D86B 20202020 112 TEXTZ " continue reading from the file until it reaches EOD or the remote" 1D87D 20202020 113 TEXTZ " machine halts. The may abort the DO file processing with a break." 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 437 (RDUHELP) F 32 Error messages 1D88F 20202020 114 TEXTZ " Some special commands are provided for performing interactive work" 1D8A1 20202020 115 TEXTZ " from a DO file. These commands are: SEND, SEND*, RECEIVE, RECEIVE*," 1D8B4 20202020 116 TEXTZ " WAIT, and BREAK. The optional parameter 'LIST' causes the commands" 1D8C6 20202020 117 TEXTZ " to be listed as they are being executed. The parameter 'SUPPRESS'" 1D8D8 20202020 118 TEXTZ " stops interactive data from being output on the user's terminal." 1D8EA 00000000 119 VFD NULL 1D8EB 464F524D 120 HLPMDROP TEXTZ "FORM IS: DROP" 1D8EF 20202020 121 TEXTZ " Causes the concurrent process to be stopped." 1D8FC 00000000 122 VFD NULL 1D8FD 464F524D 123 HLPMEXIT TEXTZ "FORM IS: EXIT" 1D901 20202020 124 TEXTZ " This command causes the RDU session to be terminated." 1D910 20202020 125 TEXTZ " It disconnects the phone link and causes the session log to be" 1D921 20202020 126 TEXTZ " sent to the line printer." 1D929 00000000 127 VFD NULL 1D92A 464F524D 128 HLPMEXTNP TEXTZ "FORM IS: EXITNP" 1D92E 20202020 129 TEXTZ " This command causes the RDU session to be terminated." 1D93D 20202020 130 TEXTZ " It disconnects the phone link but does not print the session log." 1D94F 00000000 131 VFD NULL 1D950 464F524D 132 HLPMEXTP TEXTZ "FORM IS: EXITP" 1D954 20202020 133 TEXTZ " This command causes the RDU session to be terminated and forces" 1D965 20202020 134 TEXTZ " the session log to be printed. The phone link is also terminated." 1D977 00000000 135 VFD NULL 1D978 464F524D 136 HLPMGO TEXTZ "FORM IS: GO" 1D97B 20202020 137 TEXTZ " Starts the stopped remote system by releasing pause." 1D98A 00000000 138 VFD NULL 1D98B 464F524D 139 HLPMHNGU TEXTZ "FORM IS: HANGUP" 1D98F 20202020 140 TEXTZ " Terminates communications with currently dialed system." 1D99E 20202020 141 TEXTZ " Leaves the remote system in current state." 1D9AA 00000000 142 VFD NULL 1D9AB 464F524D 143 HLPMHELP TEXTZ "FORM IS: HELP[,]" 1D9B2 20202020 144 TEXTZ " For a list of valid commands type COMMANDS. For" 1D9C0 20202020 145 TEXTZ " help on a specific command type 'HELP,'." 1D9CE 20202020 146 TEXTZ " For syntax information type ' ?'." 1D9DA 00000000 147 VFD NULL 1D9DB 464F524D 148 HLPMI TEXTZ "FORM IS: I [EXIT ]" 1D9E5 20202020 149 TEXTZ " This command causes the RDU to enter its transparent mode and" 1D9F6 20202020 150 TEXTZ " user input to be sent to the remote machine. To return to the" 1DA07 20202020 151 TEXTZ " RDU program enter ^A. The optional EXIT parameter is used to" 1DA18 20202020 152 TEXTZ " specify a return character other than ^A. This will remain" 1DA28 20202020 153 TEXTZ " the return character unless another is specified." 1DA36 00000000 154 VFD NULL 1DA37 464F524D 155 HLPMBRK TEXTZ "FORM IS: BREAK" 1DA3B 20202020 156 TEXTZ " BREAK causes the RDU to send a break to the remote machine in" 1DA4C 20202020 157 TEXTZ " interactive mode, then return to normal command processing." 1DA5D 20202020 158 TEXTZ " This command is intended for use from a DO file." 1DA6B 00000000 159 VFD NULL 1DA6C 464F524D 160 HLPMIPLL TEXTZ "FORM IS: IPOLL," 1DA74 20202020 161 TEXTZ " Displays the interrupt poll for the specified slot. This command" 1DA86 20202020 162 TEXTZ " may only be issued to a PPU or SSU." 1DA90 00000000 163 VFD NULL 1DA91 464F524D 164 HLPMLOCL TEXTZ "FORM IS: LOCAL," 1DA98 20202020 165 TEXTZ " Creates a concurrent process on the local machine and sets up the" 1DAAA 20202020 166 TEXTZ " user communicating with the process. This way a program can be" 1DABB 20202020 167 TEXTZ " run on the local machine without losing connection with the remote" 1DACD 20202020 168 TEXTZ " machine. ^A returns user to the RDU." 1DAD8 00000000 169 VFD NULL 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 438 (RDUHELP) F 32 Error messages 1DAD9 464F524D 170 HLPMM TEXTZ "FORM IS: M[,][,]" 1DAE3 20202020 171 TEXTZ " When entered with no parameters this command displays the" 1DAF3 20202020 172 TEXTZ " currently selected MCU slot number and WRU(0). A different" 1DB03 20202020 173 TEXTZ " MCU slot can be selected by entering its number." 1DB11 20000000 174 TEXTZ " " 1DB12 20202020 175 TEXTZ " This command is also used to preface MCU commands." 1DB20 00000000 176 VFD NULL 1DB21 464F524D 177 HLPMMAP TEXTZ "FORM IS: MAP" 1DB25 20202020 178 TEXTZ " Displays the WRU(0) for each occupied slot on the remote system." 1DB37 00000000 179 VFD NULL 1DB38 464F524D 180 HLPMP TEXTZ "FORM IS: P[,][,][,]" 1DB46 20202020 181 TEXTZ " When entered with no parameters this command displays the" 1DB56 20202020 182 TEXTZ " currently selected PPU's slot and port numbers, WRU(0), and DID." 1DB68 20202020 183 TEXTZ " A new slot and port number may then be entered." 1DB75 20000000 184 TEXTZ " " 1DB76 20202020 185 TEXTZ " This command is also used to preface PPU commands." 1DB84 00000000 186 VFD NULL 1DB85 464F524D 187 HLPMPATH TEXTZ "FORM IS: PATH" 1DB89 20202020 188 TEXTZ " Designates the operator's terminal as a port to communicate with a" 1DB9B 20202020 189 TEXTZ " previously initiated concurrent process. Remains in effect until" 1DBAD 20202020 190 TEXTZ " a ^A is entered." 1DBB3 00000000 191 VFD NULL 1DBB4 464F524D 192 HLPMPRNT TEXTZ "FORM IS: PRINT" 1DBB8 20202020 193 TEXTZ " Prints the current session log and starts a new log file." 1DBC8 00000000 194 VFD NULL 1DBC9 464F524D 195 HLPMPWRR TEXTZ "FORM IS: POWERRESET" 1DBCE 20202020 196 TEXTZ " Performs a power reset of the remote system. Also terminates" 1DBDF 20202020 197 TEXTZ " the communication link with the remote machine." 1DBEC 00000000 198 VFD NULL 1DBED 464F524D 199 HLPMRECV TEXTZ "FORM IS: RECEIVE[*] ||""""" 1DBFB 20202020 200 TEXTZ " Picks up 'interactive' data from the remote machine and searches" 1DC0D 20202020 201 TEXTZ " it for the specified word, control character, or string. The data" 1DC1F 20202020 202 TEXTZ " will be followed by a unless the star (*) is used with the" 1DC30 20202020 203 TEXTZ " command. When a match is found the next DO file command is read" 1DC42 20202020 204 TEXTZ " and processed. This command may only be used from a DO file." 1DC53 20202020 205 TEXTZ " If the specified string is not found the DO file will 'hang'." 1DC64 20202020 206 TEXTZ " A break will terminate DO file processing and return the user to" 1DC76 20202020 207 TEXTZ " normal RDU command processing." 1DC7F 00000000 208 VFD NULL 1DC80 464F524D 209 HLPMRCVFI TEXTZ "FORM IS: RECEIVEFILE [FROM ]" 1DC8D 20202020 210 TEXTZ " Transfers a file from the remote machine to the host machine." 1DC9E 20202020 211 TEXTZ " The RDU session must be logged on to the remote machine and in" 1DCAF 20202020 212 TEXTZ " control mode. If no FROM is specified the default file name is" 1DCC0 20202020 213 TEXTZ " the same as the destination file." 1DCCA 00000000 214 VFD NULL 1DCCB 464F524D 215 HLPMRSTRT TEXTZ "FORM IS: RESTART" 1DCD0 20202020 216 TEXTZ " Clears and restarts a remote system. Sends a CLEARALL to the" 1DCE1 20202020 217 TEXTZ " system, SELFTEST to each PPU, GO to each CPU, WRU(4) to each MCU," 1DCF3 20202020 218 TEXTZ " and if all selftests pass, a system GO." 1DCFE 00000000 219 VFD NULL 1DCFF 464F524D 220 HLPMRUN TEXTZ "FORM IS: RUN," 1DD05 20202020 221 TEXTZ " Creates a concurrent process from . This process must" 1DD17 20202020 222 TEXTZ " be able to communicate with the RDU and remote machine in the" 1DD28 20202020 223 TEXTZ " manner described in the RDU manual." 1DD32 00000000 224 VFD NULL 1DD33 464F524D 225 HLPMS TEXTZ "FORM IS: S[,][,]" 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 439 (RDUHELP) F 32 Error messages 1DD3D 20202020 226 TEXTZ " When entered with no parameters this command displays the currently" 1DD4F 20202020 227 TEXTZ " selected SSU's slot number and WRU(0). It may be followed by a" 1DD60 20202020 228 TEXTZ " slot number to select a different SSU." 1DD6B 20202020 229 TEXTZ " This command is also used to preface SSU commands." 1DD79 00000000 230 VFD NULL 1DD7A 464F524D 231 HLPMSLFT TEXTZ "FORM IS: SELFTEST," 1DD82 20202020 232 TEXTZ " Sends a self-test request to the indicated slot." 1DD90 20202020 233 TEXTZ " The WRU(15) response is displayed." 1DD9A 00000000 234 VFD NULL 1DD9B 464F524D 235 HLPMSEND TEXTZ "FORM IS: SEND[*] ||""""" 1DDA8 20202020 236 TEXTZ " Sends the specified word, control character, or string to the" 1DDB9 20202020 237 TEXTZ " remote machine as 'interactive' data. The data will be followed" 1DDCB 20202020 238 TEXTZ " by a unless the * is used with the command. This command is" 1DDDD 20202020 239 TEXTZ " intended for use from a DO file." 1DDE7 00000000 240 VFD NULL 1DDE8 464F524D 241 HLPMSENDFI TEXTZ "FORM IS: SENDFILE [TO ]" 1DDF4 20202020 242 TEXTZ " Sends the specified file to the remote machine. The user must be" 1DE06 20202020 243 TEXTZ " logged on to the remote machine through the RDU. If no TO " 1DE19 20202020 244 TEXTZ " is specified the default file name for the remote machine is the" 1DE2B 20202020 245 TEXTZ " same as the file name on the host machine." 1DE37 00000000 246 VFD NULL 1DE38 464F524D 247 HLPMSTAT TEXTZ "FORM IS: STATUS" 1DE3C 20202020 248 TEXTZ " This command returns status information for all the devices" 1DE4C 20202020 249 TEXTZ " on the remote system. For each CPU the 32 scratchpad registers" 1DE5D 20202020 250 TEXTZ " and current instructions are displayed. For each PPU the device" 1DE6F 20202020 251 TEXTZ " ID, internal status, controller status, byte counts, and memory" 1DE80 20202020 252 TEXTZ " addresses for each port is displayed. For each SSU the tfence," 1DE91 20202020 253 TEXTZ " clock, input and output characters, error log, interrupt mask," 1DEA2 20202020 254 TEXTZ " message buffers, and boot and current switches are displayed." 1DEB3 20202020 255 TEXTZ " For each MCU or SMU the range of valid memory addresses is given." 1DEC5 00000000 256 VFD NULL 1DEC6 464F524D 257 HLPMSTOP TEXTZ "FORM IS: STOP" 1DECA 20202020 258 TEXTZ " Causes pause to be asserted on the remote machine." 1DED8 00000000 259 VFD NULL 1DED9 464F524D 260 HLPMSYMB TEXTZ "FORM IS: SYMBOLS," 1DEE2 20202020 261 TEXTZ " The SYMBOLS command provides symbol information to the RDU program" 1DEF4 20202020 262 TEXTZ " from a code file on the on the host machine." 1DF01 00000000 263 VFD NULL 1DF02 464F524D 264 HLPMSYSI TEXTZ "FORM IS: SYSINIT" 1DF07 20202020 265 TEXTZ " This command causes the SSU to initialize the remote system by" 1DF18 20202020 266 TEXTZ " performing a clearall, locating the first MCU, obtaining WRU's" 1DF29 20202020 267 TEXTZ " from all slots, running selftests, and setting up the CPU's." 1DF3A 00000000 268 VFD NULL 1DF3B 464F524D 269 HLPMTRACE TEXTZ "FORM IS: TRACE [ON|OFF]" 1DF41 20202020 270 TEXTZ " This command is used to turn on and off tracing of communications." 1DF53 00000000 271 VFD NULL 1DF54 464F524D 272 HLPMWAIT TEXTZ "FORM IS: WAIT " 1DF5F 20202020 273 TEXTZ " This command will cause the RDU to do nothing but pick up data" 1DF70 20202020 274 TEXTZ " from the remote machine for the length of the specified wait." 1DF81 20202020 275 TEXTZ " May only be used in a DO file." 1DF8A 00000000 276 VFD NULL 1DF8B 464F524D 277 HLPMWRU TEXTZ "FORM IS: WRU," 1DF92 20202020 278 TEXTZ " Requests all 16 WRU's from the specified slot and displays them." 1DFA4 00000000 279 VFD NULL 1DFA5 464F524D 280 HLPMWRUA TEXTZ "FORM IS: WRUALL" 1DFA9 20202020 281 TEXTZ " Requests all 16 WRU's from each occupied slot on the remote" 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 440 (RDUHELP) F 32 Error messages 1DFB9 20202020 282 TEXTZ " machine and displays them." 1DFC1 00000000 283 VFD NULL 1DFC2 464F524D 284 HLPMCEF TEXTZ "FORM IS: [M []] CEF " 1DFCD 20202020 285 TEXTZ " Clears the specified SMU error file location. May only be issued" 1DFDF 20202020 286 TEXTZ " to an SMU." 1DFE3 00000000 287 VFD NULL 1DFE4 464F524D 288 HLPMCLRERR TEXTZ "FORM IS: [M []] CEL" 1DFEC 20202020 289 TEXTZ " Clears the SMU error log and all error file locations. May only" 1DFFE 20202020 290 TEXTZ " be issued to an SMU." 1E005 00000000 291 VFD NULL 1E006 464F524D 292 HLPMMCMND TEXTZ "FORM IS: M [] COMMANDS" 1E00E 20202020 293 TEXTZ " This command provides a list of all MCU commands." 1E01C 20202020 294 TEXTZ " These commands must be preceded by an M." 1E028 20202020 295 TEXTZ " For help on a particular command type:" 1E033 20202020 296 TEXTZ " M HELP " 1E03A 00000000 297 VFD NULL 1E03B 464F524D 298 HLPMERRFIL TEXTZ "FORM IS: [M []] EF " 1E046 20202020 299 TEXTZ " The errorfile command reads the specified chip's error word in" 1E057 20202020 300 TEXTZ " the error file. is the rank containing the chip (0:7)," 1E068 20202020 301 TEXTZ " and is the count into the rank of the chip (0:26 hex)." 1E079 20202020 302 TEXTZ " Note that this command may only be issued to an SMU." 1E088 20202020 303 TEXTZ " Once the location is displayed a line feed displays the next" 1E099 20202020 304 TEXTZ " location, an up-arrow (^) displays the previous location, a dot" 1E0AA 20202020 305 TEXTZ " redisplays the current location, a greater-than sign (>) searches" 1E0BC 20202020 306 TEXTZ " for and displays the next location containing errors, and a" 1E0CC 20202020 307 TEXTZ " number will clear the displayed location." 1E0D8 00000000 308 VFD NULL 1E0D9 464F524D 309 HLPMERRLOG TEXTZ "FORM IS: [M []] EL" 1E0E0 20202020 310 TEXTZ " The errorlog command reads the next SMU error log. Note that this" 1E0F2 20202020 311 TEXTZ " is a destructive read. Another read will return the next error." 1E104 20202020 312 TEXTZ " Once the error log is displayed a dot (.) will display the next" 1E115 20202020 313 TEXTZ " error. May only be issued to a SMU." 1E120 00000000 314 VFD NULL 1E121 464F524D 315 HLPMFILL TEXTZ "FORM IS: [M []] FILL : " 1E132 20202020 316 TEXTZ " This command will fill a block of memory starting at " 1E144 20202020 317 TEXTZ " and going through , with the 32-bit value." 1E153 00000000 318 VFD NULL 1E154 464F524D 319 HLPMNSCAN TEXTZ "FORM IS: [M []] NSCAN
:
[]" 1E165 20202020 320 TEXTZ " Negative Scan scans the block of memory indicated by" 1E174 20202020 321 TEXTZ " the two addresses for words that do not match ." 1E183 20202020 322 TEXTZ " The optional mask is used to mask memory locations" 1E191 20202020 323 TEXTZ " before comparing against for a negative match." 1E1A0 20202020 324 TEXTZ " Note that this command may only be used on systems that" 1E1AF 20202020 325 TEXTZ " have a SSU microcode revision of 0D or higher." 1E1BC 00000000 326 VFD NULL 1E1BD 464F524D 327 HLPMSCAN TEXTZ "FORM IS: [M []] SCAN
:
[ []]" 1E1CF 20202020 328 TEXTZ " This command scans the block of memory indicated by the two" 1E1DF 20202020 329 TEXTZ " addresses. Abnormal data is searched for if no value is specified." 1E1F1 20202020 330 TEXTZ " If a value is specified then that value is searched for and all" 1E202 20202020 331 TEXTZ " locations with a match are listed. The optional mask is used to" 1E214 20202020 332 TEXTZ " mask memory locations before comparing against ." 1E223 00000000 333 VFD NULL 1E224 464F524D 334 HLPMMSTAT TEXTZ "FORM IS: [M []] STATUS" 1E22C 20202020 335 TEXTZ " For each MCU or SMU the range of valid memory addresses is given." 1E23E 00000000 336 VFD NULL 1E23F 464F524D 337 HLPMMZ TEXTZ "FORM IS: [M []] Z
[|']" 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 441 (RDUHELP) F 32 Error messages 1E24F 20202020 338 TEXTZ " This command is used to examine and alter a word in memory." 1E25F 20202020 339 TEXTZ " The contents of the address are displayed and may be changed" 1E270 20202020 340 TEXTZ " by entering a colon followed by a new value." 1E27D 20202020 341 TEXTZ " terminates command, advances location" 1E28B 20202020 342 TEXTZ " '^' backs up 1 location, '.' redisplays location" 1E29A 20202020 343 TEXTZ " A write to the memory location can be done with no prior read by" 1E2AC 20202020 344 TEXTZ " following the address with a single quote and the new value." 1E2BD 00000000 345 VFD NULL 1E2BE 464F524D 346 HLPMMZL TEXTZ "FORM IS: [M []] ZL
[]" 1E2CC 20202020 347 TEXTZ " The ZL command displays 8 words of memory on a single output line." 1E2DF 20202020 348 TEXTZ " terminates command, advances 8 locations" 1E2EE 20202020 349 TEXTZ " '^' backs up 8 locations, '.' redisplays location" 1E2FD 00000000 350 VFD NULL 1E2FE 464F524D 351 HLPMCAR TEXTZ "FORM IS: [C []] CAR" 1E306 20202020 352 TEXTZ " Displays the contents of the Console Area Register of the currently" 1E318 20202020 353 TEXTZ " selected CPU. The contents may be changed by entering a new value." 1E32A 00000000 354 VFD NULL 1E32B 464F524D 355 HLPMCCMND TEXTZ "FORM IS: C [] COMMANDS" 1E333 20202020 356 TEXTZ " This command provides a list of all CPU commands." 1E341 20202020 357 TEXTZ " These commands must be preceded by an C." 1E34D 20202020 358 TEXTZ " For help on a particular command type:" 1E358 20202020 359 TEXTZ " C HELP " 1E35F 00000000 360 VFD NULL 1E360 464F524D 361 HLPMCGO TEXTZ "FORM IS: C [] GO" 1E367 20202020 362 TEXTZ " Starts a CPU that has been stopped by a C STOP" 1E374 00000000 363 VFD NULL 1E375 464F524D 364 HLPMIMR TEXTZ "FORM IS: [C []] IMR" 1E37D 20202020 365 TEXTZ " Displays the contents of the Interrupt Mask Register of the" 1E38D 20202020 366 TEXTZ " currently selected CPU. The contents may be changed by entering" 1E39F 20202020 367 TEXTZ " a new value." 1E3A4 00000000 368 VFD NULL 1E3A5 464F524D 369 HLPMIR TEXTZ "FORM IS: [C []] IR" 1E3AD 20202020 370 TEXTZ " Displays the contents of the Instruction Register of the currently" 1E3BF 20202020 371 TEXTZ " selected CPU. The contents may be changed by entering a new value." 1E3D1 00000000 372 VFD NULL 1E3D2 464F524D 373 HLPMIS TEXTZ "FORM IS: [C []] IS" 1E3DA 20202020 374 TEXTZ " Displays the interrupt status for the selected CPU." 1E3E8 00000000 375 VFD NULL 1E3E9 464F524D 376 HLPMMSR TEXTZ "FORM IS: [C []] MSR" 1E3F1 20202020 377 TEXTZ " Displays the contents of the Monitor Status Register of the" 1E401 20202020 378 TEXTZ " currently selected CPU. The contents may be changed by" 1E410 20202020 379 TEXTZ " entering a new value." 1E417 00000000 380 VFD NULL 1E418 464F524D 381 HLPMCNSCAN TEXTZ "FORM IS: C NSCAN
:
[]" 1E426 20202020 382 TEXTZ " Negative Scan scans the block of memory indicated by the two" 1E437 20202020 383 TEXTZ " addresses and relocated through the selected CPU's page file and" 1E449 20202020 384 TEXTZ " MSR for words that do not match . The optional mask is used" 1E45B 20202020 385 TEXTZ " to mask memory locations before comparing against for a" 1E46C 20202020 386 TEXTZ " negative match." 1E471 20202020 387 TEXTZ " Note that this command may only be used on systems that have a SSU" 1E483 20202020 388 TEXTZ " microcode revision of 0D or higher." 1E48D 00000000 389 VFD NULL 1E48E 464F524D 390 HLPMPC TEXTZ "FORM IS: [C []] PC" 1E496 20202020 391 TEXTZ " Displays the contents of the Program Counter of the currently" 1E4A7 20202020 392 TEXTZ " selected CPU. The contents may be changed by entering a new value." 1E4B9 00000000 393 VFD NULL 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 442 (RDUHELP) F 32 Error messages 1E4BA 464F524D 394 HLPMPF TEXTZ "FORM IS: [C []] PF " 1E4C7 20202020 395 TEXTZ " This command is used to examine and alter the contents of the" 1E4D8 20202020 396 TEXTZ " currently selected CPU's page file. It has the same options as" 1E4E9 20202020 397 TEXTZ " the DISPLAY command." 1E4F0 00000000 398 VFD NULL 1E4F1 464F524D 399 HLPMPFL TEXTZ "FORM IS: [C []] PFL " 1E4FE 20202020 400 TEXTZ " This command is used to examine the contents of the currently" 1E50F 20202020 401 TEXTZ " selected CPU's page file. It will display 8 page file locations" 1E521 20202020 402 TEXTZ " per line." 1E525 00000000 403 VFD NULL 1E526 464F524D 404 HLPMPSR TEXTZ "FORM IS: [C []] PSR" 1E52E 20202020 405 TEXTZ " Displays the contents of the Process Status Register of the" 1E53E 20202020 406 TEXTZ " currently selected CPU. The contents may be changed by entering" 1E550 20202020 407 TEXTZ " a new value." 1E555 00000000 408 VFD NULL 1E556 464F524D 409 HLPMR TEXTZ "FORM IS: [C []] R []" 1E563 20202020 410 TEXTZ " When entered with no scratch register number this command" 1E573 20202020 411 TEXTZ " displays the contents of the currently selected CPU's registers." 1E585 20202020 412 TEXTZ " When a scratch register number is included, this command displays" 1E597 20202020 413 TEXTZ " the contents of that register, and the contents may be changed by" 1E5A9 20202020 414 TEXTZ " entering a new value. The previous scratch register may then be" 1E5BB 20202020 415 TEXTZ " displayed by entering an up-arrow, or the following scratch" 1E5CB 20202020 416 TEXTZ " register displayed by entering a line feed." 1E5D7 00000000 417 VFD NULL 1E5D8 464F524D 418 HLPMRS TEXTZ "FORM IS: [C []] Rx" 1E5E0 20202020 419 TEXTZ " Displays the contents of register x. The contents may be changed" 1E5F2 20202020 420 TEXTZ " by entering a new value, or the memory location pointed to may be" 1E604 20202020 421 TEXTZ " referenced by entering a '>'." 1E60D 00000000 422 VFD NULL 1E60E 464F524D 423 HLPMCSCAN TEXTZ "FORM IS: C SCAN
:
[ []]" 1E61C 20202020 424 TEXTZ " This command scans the block of memory indicated by the two" 1E62C 20202020 425 TEXTZ " addresses and relocated through the selected CPU's MSR and page" 1E63D 20202020 426 TEXTZ " file. If is not specified abnormal data is scanned for." 1E64F 20202020 427 TEXTZ " If is specified then that value is searched for and all" 1E660 20202020 428 TEXTZ " words which match are listed. The optional mask is used to" 1E670 20202020 429 TEXTZ " mask memory locations before comparing against ." 1E67F 00000000 430 VFD NULL 1E680 464F524D 431 HLPMSEMI TEXTZ "FORM IS: [num] " 1E687 20202020 432 TEXTZ " The semi-colon is used to single step the currently selected CPU." 1E699 20202020 433 TEXTZ " The optional number specifies how many single steps to execute." 1E6AA 00000000 434 VFD NULL 1E6AB 464F524D 435 HLPMCSTAT TEXTZ "FORM IS: C STATUS" 1E6B0 20202020 436 TEXTZ " Displays CPU status information for the remote machine. Includes:" 1E6C2 20202020 437 TEXTZ " front panel switch position, state of timer fence update line, bus" 1E6D4 20202020 438 TEXTZ " error line, interrupt line, any CPU halt messages, and register" 1E6E5 20202020 439 TEXTZ " data for each CPU." 1E6EB 00000000 440 VFD NULL 1E6EC 464F524D 441 HLPMSTEP TEXTZ "FORM IS: [C []] STEP" 1E6F4 20202020 442 TEXTZ " Sets a breakpoint at the first non-subroutine calling instruction" 1E706 20202020 443 TEXTZ " past the location pointed to by the program counter." 1E715 00000000 444 VFD NULL 1E716 464F524D 445 HLPMCSTOP TEXTZ "FORM IS: C [] STOP" 1E71E 20202020 446 TEXTZ " Stops the currently selected CPU." 1E728 00000000 447 VFD NULL 1E729 464F524D 448 HLPMTAKE TEXTZ "FORM IS: [C []] TAKEINT" 1E732 20202020 449 TEXTZ " Causes the currently selected CPU to take an interrupt if enabled." 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 443 (RDUHELP) F 32 Error messages 1E744 00000000 450 VFD NULL 1E745 464F524D 451 HLPMCZ TEXTZ "FORM IS: C [] Z
" 1E74E 20202020 452 TEXTZ " This command is used to examine and alter a location in the" 1E75E 20202020 453 TEXTZ " currently selected CPU's pseudo-memory space. The contents of" 1E76F 20202020 454 TEXTZ " the address are displayed and may then be changed by entering" 1E780 20202020 455 TEXTZ " a new value." 1E785 20202020 456 TEXTZ " terminates command, advances location" 1E793 20202020 457 TEXTZ " '^' backs up 1 location, '.' redisplays location" 1E7A2 20202020 458 TEXTZ " A write to the memory location can be done directly by following" 1E7B4 20202020 459 TEXTZ " the address with a single quote and new value." 1E7C1 00000000 460 VFD NULL 1E7C2 464F524D 461 HLPMBC1 TEXTZ "FORM IS: [P [ ]] BC1" 1E7CD 20202020 462 TEXTZ " Displays the first byte count location of the currently selected" 1E7DF 20202020 463 TEXTZ " PPU port. Once displayed a new value may be entered." 1E7EE 00000000 464 VFD NULL 1E7EF 464F524D 465 HLPMBC2 TEXTZ "FORM IS: [P [ ]]" 1E7F9 20202020 466 TEXTZ " Displays the second byte count location of the currently selected" 1E80B 20202020 467 TEXTZ " PPU port. Once displayed a new value may be entered." 1E81A 00000000 468 VFD NULL 1E81B 464F524D 469 HLPMCA TEXTZ "FORM IS: [P [ ]] CA <8-bit address>" 1E829 20202020 470 TEXTZ " Displays data from a device controller. Once the data is displayed" 1E83B 20202020 471 TEXTZ " a new value may be entered to change the current location, or" 1E84C 20202020 472 TEXTZ " terminates command, advances location" 1E85A 20202020 473 TEXTZ " '^' backs up 1 location, '.' redisplays location" 1E869 00000000 474 VFD NULL 1E86A 464F524D 475 HLPMCABO TEXTZ "FORM IS: [P [ ]] CABORT" 1E875 20202020 476 TEXTZ " Aborts all operations on the controller attached to the currently" 1E887 20202020 477 TEXTZ " selected PPU port." 1E88D 00000000 478 VFD NULL 1E88E 464F524D 479 HLPMCLR TEXTZ "FORM IS: [P [ ]] CLEAR " 1E89B 20202020 480 TEXTZ " Selectively clears port status bits of the selected PPU port." 1E8AC 20202020 481 TEXTZ " The bits cleared are determined by the mask." 1E8B9 00000000 482 VFD NULL 1E8BA 464F524D 483 HLPMPCMND TEXTZ "FORM IS: P COMMANDS" 1E8BF 20202020 484 TEXTZ " This command provides a list of all PPU commands." 1E8CD 20202020 485 TEXTZ " These commands must be preceded by an P." 1E8D9 20202020 486 TEXTZ " For help on a particular command type:" 1E8E4 20202020 487 TEXTZ " P HELP " 1E8EB 00000000 488 VFD NULL 1E8EC 464F524D 489 HLPMCS1 TEXTZ "FORM IS: [P [ ]] CS1" 1E8F7 20202020 490 TEXTZ " Displays the first controller status location for the controller" 1E909 20202020 491 TEXTZ " connected to the currently selected PPU port." 1E916 00000000 492 VFD NULL 1E917 464F524D 493 HLPMCS2 TEXTZ "FORM IS: [P [ ]] CS2" 1E922 20202020 494 TEXTZ " Displays the second controller status location for the controller" 1E934 20202020 495 TEXTZ " connected to the currently selected PPU port." 1E941 00000000 496 VFD NULL 1E942 464F524D 497 HLPMCTST TEXTZ "FORM IS: [P [ ]] CTEST" 1E94D 20202020 498 TEXTZ " Causes a selftest of the controller connected to the currently" 1E95E 20202020 499 TEXTZ " selected PPU port." 1E964 00000000 500 VFD NULL 1E965 464F524D 501 HLPMDID TEXTZ "FORM IS: [P [ ]] DID" 1E970 20202020 502 TEXTZ " Displays the device ID of the controller connected to the" 1E980 20202020 503 TEXTZ " currently selected PPU port." 1E989 00000000 504 VFD NULL 1E98A 464F524D 505 HLPMPIS TEXTZ "FORM IS: [P [ ]] IS" 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 444 (RDUHELP) F 32 Error messages 1E994 20202020 506 TEXTZ " Displays the internal status for the currently selected PPU port." 1E9A6 00000000 507 VFD NULL 1E9A7 464F524D 508 HLPMMA1 TEXTZ "FORM IS: [P [ ]] MA1" 1E9B2 20202020 509 TEXTZ " Displays the first memory address location for the currently" 1E9C3 20202020 510 TEXTZ " selected PPU port. This value may then be changed." 1E9D1 00000000 511 VFD NULL 1E9D2 464F524D 512 HLPMMA2 TEXTZ "FORM IS: [P [ ]] MA2" 1E9DD 20202020 513 TEXTZ " Displays the second memory address location for the currently" 1E9EE 20202020 514 TEXTZ " selected PPU port. This value may then be changed." 1E9FC 00000000 515 VFD NULL 1E9FD 464F524D 516 HLPMPR TEXTZ "FORM IS: P [ ] R" 1EA07 20202020 517 TEXTZ " Displays the device ID, internal status, controller status, byte" 1EA19 20202020 518 TEXTZ " counts, and memory addresses for the currently selected PPU port." 1EA2B 00000000 519 VFD NULL 1EA2C 464F524D 520 HLPMSET TEXTZ "FORM IS: [P [ ]] SET " 1EA38 20202020 521 TEXTZ " Sets status information bits for the currently selected PPU port." 1EA4A 20202020 522 TEXTZ " indicates which bits to set." 1EA54 00000000 523 VFD NULL 1EA55 464F524D 524 HLPMPSTAT TEXTZ "FORM IS: P [] STATUS" 1EA5E 20202020 525 TEXTZ " Displays the registers of each port on the PPU. See the" 1EA6E 20202020 526 TEXTZ " P R command for details." 1EA76 00000000 527 VFD NULL 1EA77 464F524D 528 HLPMPZ TEXTZ "FORM IS: P[ ] Z
[ ']" 1EA86 20202020 529 TEXTZ " This command is used to examine and alter a word in the currently" 1EA98 20202020 530 TEXTZ " selected PPU's pseudo-memory space.
is an address within" 1EAAA 20202020 531 TEXTZ " the module adjusted accordingly for the selected port. The contents" 1EABD 20202020 532 TEXTZ " of the address are displayed and may be changed by entering a new" 1EACF 20202020 533 TEXTZ " value or terminates command, advances location" 1EADF 20202020 534 TEXTZ " '^' backs up 1 location, '.' redisplays location." 1EAF0 20202020 535 TEXTZ " A write to the memory location can be done with no prior read by" 1EB02 20202020 536 TEXTZ " following the address with a single quote and new value." 1EB12 00000000 537 VFD NULL 1EB13 464F524D 538 HLPMBPRM TEXTZ "FORM IS: [S []] BPROM
" 1EB1E 20202020 539 TEXTZ " Displays the contents of the boot prom location indicated by" 1EB2F 20202020 540 TEXTZ "
. displays the next location, and '^' displays" 1EB40 20202020 541 TEXTZ " previous location." 1EB46 00000000 542 VFD NULL 1EB47 464F524D 543 HLPMBSWT TEXTZ "FORM IS: [S []] BSWITCH" 1EB50 20202020 544 TEXTZ " Displays the front panel switch settings at the time of the last" 1EB62 20202020 545 TEXTZ " boot operation." 1EB67 00000000 546 VFD NULL 1EB68 464F524D 547 HLPMCLCK TEXTZ "FORM IS: [S []] CLOCK" 1EB70 20202020 548 TEXTZ " Displays the upper 32-bits of the 44-bit real-time clock and" 1EB81 20202020 549 TEXTZ " allows that value to be changed." 1EB8B 00000000 550 VFD NULL 1EB8C 464F524D 551 HLPMSCMND TEXTZ "FORM IS: S COMMANDS" 1EB91 20202020 552 TEXTZ " This command provides a list of all SSU commands." 1EB9F 20202020 553 TEXTZ " These commands must be preceded by an S." 1EBAB 20202020 554 TEXTZ " For help on a particular command type:" 1EBB6 20202020 555 TEXTZ " S HELP " 1EBBD 00000000 556 VFD NULL 1EBBE 464F524D 557 HLPMERRL TEXTZ "FORM IS: [S []] ERRLOG" 1EBC6 20202020 558 TEXTZ " Displays the SSU error log." 1EBCE 00000000 559 VFD NULL 1EBCF 464F524D 560 HLPMICHR TEXTZ "FORM IS: [S []] ICHAR" 1EBD7 20202020 561 TEXTZ " Displays the input character buffer of the SSU." 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 445 (RDUHELP) F 32 Error messages 1EBE4 00000000 562 VFD NULL 1EBE5 464F524D 563 HLPMIM TEXTZ "FORM IS: [S []] IM" 1EBEC 20202020 564 TEXTZ " Displays the interrupt mask of the SSU. A new value may be entered." 1EBFF 00000000 565 VFD NULL 1EC00 464F524D 566 HLPMMB1 TEXTZ "FORM IS: [S []] MB1" 1EC08 20202020 567 TEXTZ " Displays the contents of the SSU message buffer 1." 1EC16 00000000 568 VFD NULL 1EC17 464F524D 569 HLPMMB2 TEXTZ "FORM IS: [S []] MB2" 1EC1F 20202020 570 TEXTZ " Displays the contents of the SSU message buffer 2." 1EC2D 00000000 571 VFD NULL 1EC2E 464F524D 572 HLPMNVM TEXTZ "FORM IS: [S []] NVM <7-bit address>" 1EC3A 20202020 573 TEXTZ " Displays the contents of
in the non-volatile memory." 1EC4B 20202020 574 TEXTZ " advances one location, '^' moves back one location, or a" 1EC5C 20202020 575 TEXTZ " new value may be entered." 1EC64 00000000 576 VFD NULL 1EC65 464F524D 577 HLPMOCHR TEXTZ "FORM IS: [S []] OCHAR" 1EC6D 20202020 578 TEXTZ " Displays the contents of the SSU's output buffer." 1EC7B 00000000 579 VFD NULL 1EC7C 464F524D 580 HLPMRAM TEXTZ "FORM IS: [S []] RAM
" 1EC86 20202020 581 TEXTZ " Displays the contents of
in the SSU's RAM. " 1EC96 20202020 582 TEXTZ " advances one location, '^' backs up one location, or a new" 1ECA6 20202020 583 TEXTZ " value may be entered." 1ECAD 00000000 584 VFD NULL 1ECAE 464F524D 585 HLPMSS TEXTZ "FORM IS: [S []] S" 1ECB5 20202020 586 TEXTZ " Displays the SSU status word. This word is decoded as follows:" 1ECC6 20202020 587 TEXTZ " BIT 29 - NVM is not busy" 1ECCE 20202020 588 TEXTZ " BIT 30 - This SSU is supplying Bus Clock" 1ECDA 20202020 589 TEXTZ " BIT 31 - Local front panel is connected." 1ECE6 00000000 590 VFD NULL 1ECE7 464F524D 591 HLPMSSTAT TEXTZ "FORM IS: S [] STATUS" 1ECF0 20202020 592 TEXTZ " Displays status information for the selected SSU. This includes" 1ED02 20202020 593 TEXTZ " the tfence, clock, input and output characters, error log," 1ED12 20202020 594 TEXTZ " interrupt mask, message buffers, and boot and current switches." 1ED23 00000000 595 VFD NULL 1ED24 464F524D 596 HLPMSWIT TEXTZ "FORM IS: [S []] SWITCHES" 1ED2D 20202020 597 TEXTZ " Displays the current front panel switch setting and allows a new" 1ED3F 20202020 598 TEXTZ " value to be entered." 1ED46 00000000 599 VFD NULL 1ED47 464F524D 600 HLPMTFEN TEXTZ "FORM IS: [S []] TFENCE" 1ED4F 20202020 601 TEXTZ " Displays the timer fence and allows the value to be changed." 1ED60 00000000 602 VFD NULL 1ED61 464F524D 603 HLPMTMST TEXTZ "FORM IS: [S []] TIMESET" 1ED6A 20202020 604 TEXTZ " Takes the clock value from the host machine and sends it to the" 1ED7B 20202020 605 TEXTZ " SSU of the remote system. This will set the clock on the remote" 1ED8D 20202020 606 TEXTZ " system to within 4 seconds of the clock on the host." 1ED9C 00000000 607 VFD NULL 1ED9D 464F524D 608 HLPMSZ TEXTZ "FORM IS: S [] Z
[']" 1EDA9 20202020 609 TEXTZ " This command is used to examine and alter a word in the currently" 1EDBB 20202020 610 TEXTZ " selected SSU's pseudo-memory space. The contents of the address" 1EDCD 20202020 611 TEXTZ " are displayed and may then be changed by entering a new value, or" 1EDDF 20202020 612 TEXTZ " terminates command, advances location" 1EDED 20202020 613 TEXTZ " '^' backs up 1 location, '.' redisplays location" 1EDFC 20202020 614 TEXTZ " A write to the memory location can be done with no prior read by" 1EE0E 20202020 615 TEXTZ " following the address with a single quote and new value." 1EE1E 00000000 616 VFD NULL 163 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 446 F 0 166 167 END of RDU control 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 447 F 0 169 170 ********************************************************************************** 171 * * 172 * Place to break the listing. * 173 * This is the beginning of the file transfer section. * 174 * * 175 ********************************************************************************** 176 177 INPUT RDUTRANSFER 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 448 (RDUTRANSFER) F 33 2 3 BLOCK file transfer block 4 5 INPUT XFERDEFS get our definitions 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 449 (XFERDEFS)ER) F 34 Sendfile/Receivefile Definitions 3 4 ********************************************************************************** 5 * * 6 * The following macro will define the beginning of a stack * 7 * frame. It is intended for use with ENDFRAME. We do not generate * 8 * a BSS 1 for the return link word. * 9 * * 10 ********************************************************************************** 11 12 BEGFRAME2 MACRO 13 NOLIST 14 NOLIST CREF 15 FRAME! BASE R6 beginning of stack frame 16 LIST CREF 17 EMAC 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 450 (XFERDEFS)ER) F 34 Sendfile/Receivefile Definitions 19 20 ********************************************************************************** 21 * * 22 * Definitions for Sendfile and Receivefile. * 23 * * 24 ********************************************************************************** 25 0001EE1F 26 WHEREWEARE LABEL where we currently are 27 ORG XFERPAGE move to our own variables page 28 00018400 29 SENDUNIT BSS 1 unit for open file to send 00000001 ABS 30 SAFTYPE EQU 1 code for saf type file 00000002 ABS 31 RAFTYPE EQU 2 code for raf type file 00000003 ABS 32 CODETYPE EQU 3 code for code type file 00018401 33 SENDOPEN BSS 1 1 sez we opened local file 34 00003460 BYTE 35 DEVTYPE EQU BITS 26:31 device type bits in file static status 36 18402 3C434F44 37 CODEREQ TEXT "" indicate we are requesting a .code 00000006 ABS 38 CODEREQL EQU 6 18404 3C524146 39 RAFREQ TEXT "" indicate we are requesting a .raf 00000005 ABS 40 RAFREQL EQU 5 41 18406 46524F4D 42 FROMWORD ASCII 1,FROM 18407 544F2020 43 TOWORD TEXT "TO" 44 0000003C ABS 45 NAMEBUFFL EQU 60 46 00018408 47 LOCNAMEL BSS 1 length of local file name 00018409 48 LOCALNAME BSS 0 word address 49 BSSC NAMEBUFFL buffer for the local file name 50 00018418 51 REMNAMEL BSS 1 length of remote file name 02018419 52 REMOTENAME BSSC NAMEBUFFL buffer for remote machine file name 53 18427 0000000D 54 CRLOC VFDC CR 55 18429 53454E44 56 SENDLEADER TEXT "SENDFILE" tells remote machine what we are doing 00000008 ABS 57 SENDLEADL EQU 8 length of the leader 58 1842B 52454356 59 RECVSTR TEXT "RECVFILE" tells other end it is receiving 00000008 ABS 60 RECVSTRL EQU 8 61 0001842D 62 FILESIZE BSS 1 size of the file 0001842E 63 BYTESDONE BSS 1 number of bytes done 64 1842F 2B434F4D 65 SENDSTART TEXTZ "+COMM ReceiveFile! " 00000013 ABS 66 SENDSTARTL EQU 19 length of the previous string 18434 2B434F4D 67 RCVSTART TEXTZ "+COMM SendFile! " 00000010 ABS 68 RCVSTARTL EQU 16 length of the previous string 69 000000FF ABS 70 EODMARK EQU 0FF char indicating end of data 71 00018439 72 WORDPROTO BASE R0 00160800 0 BASE 73 CHARWORD BSS 1 00080100 0 ZBM 74 CHARS01 EQU CHARWORD/BITS 0:15 so we can get to the first chars 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 451 (XFERDEFS)ER) F 34 Sendfile/Receivefile Definitions 75 CHAR0 EQU CHARWORD/CH0 so we can create byte offsets 76 DRCT 77 ORG WORDPROTO recover lost space 78 79 DIRINFORD 80 00000078 ABS 81 CATBUFL EQU (DIRHWIDE+DIRENTWIDE+5)*CPW room for a complete catalog entry 00018439 82 CATBUF BSS CATBUFL/CPW 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 452 (XFERDEFS)ER) F 34 Sendfile/Receivefile Definitions 84 85 ********************************************************************************** 86 * * 87 * Prototype of a message sent by the PROTOCOL level 1 between * 88 * machines. * 89 * * 90 ********************************************************************************** 91 18457 0001D4C0 92 XFERTO VFD 1000*120 enough time for lots of messages 93 * 120 seconds 94 00000100 ABS 95 MSGMAXSIZE EQU 0100 maximum size of a message in chars 00001F10 BYTE 96 FLDADR EQU BITS 15:31 address portion 97 00018458 98 MSGPROTO BASE R4 00170800 4 BASE 99 MSGWORD1 BSS 1 000900A0 4 ZBM 100 MSGLEN EQU MSGWORD1/BITS 0:9 length of the message 00091440 4 ZBM 101 MSGNUM EQU MSGWORD1/BITS 10:13 message number 00091C10 4 ZBM 102 MSGPROC EQU MSGWORD1/BIT 14 1 sez message has been processed 00091F10 4 ZBM 103 MSGLINK EQU MSGWORD1/FLDADR link to next element in list 00170004 4 CACH 104 MSGSTART BSSC 1 message start character 0000007E ABS 105 MSGSTARTCH EQU 07E first char of each message 0000000D ABS 106 MSGENDCHAR EQU CR always tacked on the end of a message 107 00170005 4 CACH 108 MSGACK BSSC 1 acknowledgement field 00000040 ABS 109 MSGACKACK EQU 040 acknowledgement char 110 * add message # being acknowledged to this 00000050 ABS 111 MSGACKREJ EQU 050 rejection of all messages beyond # 0 112 * add starting reject message number to this 00000062 ABS 113 MSGACKENQ EQU 062 indicates message is an enquiry 114 00170006 4 CACH 115 MSGNEW BSSC 1 indicates whether this message contains 116 * new text or not and the message number 00000040 ABS 117 MSGNEWTEXT EQU 040 new message text contained in this msg 118 * add message number to this 00000050 ABS 119 MSGNEWNIL EQU 050 no message text included 120 * add next message number to this 121 00170007 4 CACH 122 MSGHDRCKSM BSSC 1 message header checksum 00000055 ABS 123 HDRCKSMCHR EQU 055 char to XOR with the checksum 124 00170008 4 CACH 125 MSGTEXT BSSC 0 start of message text 00170802 4 BASE 126 MSGTEXTW BSS 0 word address of text start 127 DRCT 00000004 ABS 128 MSGHDRLEN EQU 4 00000042 ABS 129 MSGELEMLEN EQU DISPW MSGPROTO+((MSGMAXSIZE-MSGHDRLEN)/CPW)+1 130 ORG MSGPROTO 131 00000002 ABS 132 MSGCHKSUML EQU 2 number of chars message checksum is 000000FA ABS 133 MAXTEXTLEN EQU MSGMAXSIZE-MSGHDRLEN-MSGCHKSUML maximum # of text chars 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 453 (XFERDEFS)ER) F 34 Sendfile/Receivefile Definitions 135 136 ********************************************************************************** 137 * * 138 * Various message related definitions. * 139 * * 140 ********************************************************************************** 141 0000005F ABS 142 HIGHTEXT EQU 05F highest character that can be in message 143 * text 00000020 ABS 144 LOWCHAR EQU 020 lowest printable char 0000003F ABS 145 CHARMASK EQU 03F mask for char before adding LOWCHAR 146 147 0000003F ABS 148 MAXREPEAT EQU 03F max number of repeats per repeat char group 00000005 ABS 149 MINREPEAT EQU 5 minimum number of repeats in a group 00000064 ABS 150 REPEATCHAR EQU 064 character indicates a repeated charcter 151 * definition follows. The format for 152 * this is 153 * + 154 00003020 BYTE 155 HIGH2BITS EQU BITS 24:25 high two bits of char right aligned in word 00003460 BYTE 156 LOW6BITS EQU BITS 26:31 the low 6 bits of char ... 000001D0 BYTE 157 DIVBY8 EQU BITS 0:28 load of these bits = /8 158 00000061 ABS 159 REPEATBLNK EQU 061 repeat BLANK character 00000062 ABS 160 REPEATNULL EQU 062 repeat NULL character 00000063 ABS 161 REPEATONES EQU 063 repeat ALLONES character 000000FF ABS 162 ALLONES EQU 0FF 163 00018458 164 REPEATCNT BSS 1 count of repeated characters 00018459 165 REPEATCHR BSS 1 repeated character 166 00000060 BYTE 167 SIXBITS EQU BITS 0:5 168 00000007 ABS 169 MAXSENTMSG EQU 7 most messages allowed before ACK 170 0001845A 171 PROT2MSG BSS 1 pointer to message buffer for PROT2 0001845B 172 LASTCHAR BSS 1 last character we sent 0001845C 173 MATCHCNT BSS 1 number of matches for repeat char 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 454 (XFERDEFS)ER) F 34 Sendfile/Receivefile Definitions 175 176 ********************************************************************************** 177 * * 178 * Variables used by PROTCOL 2 * 179 * * 180 ********************************************************************************** 181 0001845D 182 LASTACK BSS 1 last message he acknowledged 0001845E 183 LASTWEACK BSS 1 last message we acknowledged 0001845F 184 LASTSENT BSS 1 last message number sent 00018460 185 NEXTRCVMSG BSS 1 next message to receive 186 00018461 187 MSGSENDBEG BSS 1 pointer to beginning of list of sent messages 00018462 188 MSGSENDEND BSS 1 pointer to end of list of sent messages 00018463 189 MSGRCVBEG BSS 1 pointer to beginning of list of received messages 00018464 190 MSGRCVEND BSS 1 pointer to end of list of received messages 191 00018465 192 STARTFLAG BSS 1 1 sez we have found a start character 193 00018466 194 MSGSNDLIST BSS 1 pointer to send message buffer list 00018467 195 MSGRCVLIST BSS 1 pointer to receive message buffer list 196 00018468 197 P2RCVMSG BSS 1 pointer to message given out by P1GET 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 455 (XFERDEFS)ER) F 34 Sendfile/Receivefile Definitions 199 200 ********************************************************************************** 201 * * 202 * Buffers used by Sendfile/Receivefile * 203 * * 204 ********************************************************************************** 205 00018469 206 PUTTMPBUFW BSS 0 207 BSSC MAXTEXTLEN buffer for holding chars before packing 184A8 020D8469 208 PUTBPT PTR PUTTMPBUFW/CH0 character pointer 184A9 01898469 209 PUT6BIT PTR PUTTMPBUFW/SIXBITS pointer to six bit chunk of temp buff 000184AA 210 PUTPOS BSS 1 current position in tempbuf 211 000184AB 212 P1PBPT BSS 1 character pointer to Protocol 1 buffer 000184AC 213 P1PUTPOS BSS 1 current position in above buffer 214 000184AD 215 P1GBPT BSS 1 pointer to message buffer for gets 000184AE 216 P1GETCNT BSS 1 number of chars in previous buffer 000184AF 217 P1GETPOS BSS 1 where we are in P1GETBUF 218 020184B0 219 GETTMPBUF BSSC MAXTEXTLEN temp buffer for use by GET char routines 184EF 020D84B0 220 GETBPT PTR GETTMPBUF pointer to GETTMPBUF 000184F0 221 GETCNT BSS 1 number of unpacked chars in GETBUF 000184F1 222 GETPOS BSS 1 current position in GETBUF 223 000184F2 224 UPTMPBUFW LABEL 020184F2 225 UPTMPBUF BSSC MAXTEXTLEN temp buffer for use by unpacker 18531 020D84F2 226 UPBPT PTR UPTMPBUF 18532 018984F2 227 UP6BITS PTR UPTMPBUFW/SIXBITS 228 00018533 229 RCVBPT BSS 1 pointer to buffer for incoming messages 00018534 230 RCVMSGBUF BSS 1 pointer to buffer beginning 00018535 231 RCVBUFPOS BSS 1 where we are in this buffer 232 00018536 233 MSGRCVBUFS BSS (MSGELEMLEN)*(2*MAXSENTMSG+1) 00018914 234 MSGSNDBUFS BSS (MSGELEMLEN)*(MAXSENTMSG+1) 235 00018B24 236 SHORTMSG BSS 8 place to build a short message at 237 18B2C 020D8B2D 238 SAFBPT PTR SAFBUF/CH0 character pointer to the buffer 00001800 ABS 239 SAFBUFL EQU 6*WPP length of largest legal SAF record 00018B2D 240 SAFBUF BSS SAFBUFL 6 page buffer for SAF records 0001A32D 241 ENDXFERDEF LABEL 242 243 ORG ((DISPW ma 0)-WPP) AND -WPP back up to page boundary 00000067 ABS 244 BLOCKPN EQU (DISPW ma 0)/WPP page number 00019C00 245 BLOCKPAGE BSS WPP use this space for mapping in RAF pages 246 247 ORG WHEREWEARE 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 456 (RDUTRANSFER) F 33 Sendfile Command 8 9 ********************************************************************************** 10 * * 11 * The SENDFILE command mimicks the +COMM sendfile command * 12 * and uses +COMM on the remote machine end to actually receive * 13 * and build the file. We allow a little more defaulting on the * 14 * command invocation but otherwise have kept consistency. * 15 * The protocol used is split into 3 levels, plus we add * 16 * a level for communicating with the SSU. The levels are: * 17 * 1. Control level -- Direct traffic. * 18 * Processes parameters, opens the file, tells * 19 * level 2 what to send to the remote machine. * 20 * Deals with breaks, errors, user, etc. * 21 * 2. COMPROT2 -- converts between control level and COMPROT1. * 22 * Control passes 1 to 6*4096 characters to * 23 * level 2. Level 2 then picks out the characters * 24 * in 6 bit chunks, adds on a bias to make the * 25 * character legal to send, handles compression * 26 * of repeated characters, and sends the message * 27 * text to level 1. * 28 * On the other end level 2 unpacks the characters * 29 * and hands back to control level good data. * 30 * 3. COMPROT1 -- sends messages consisting of up to 256 chars * 31 * including a 4 char header and 2 char checksum. * 32 * Only characters in the interval of 020:07E * 33 * are allowed (printable characters). * 34 * The header and checksum is added to the message * 35 * and ACKs, NAKs, and ENQuiries are dealt with. * 36 * All messages are terminated with a CR. * 37 * 4. RDU/SSU Protocol -- Sends up to 4 chars at a time in 6 char * 38 * checksummed, encrypted, and labelled * 39 * packets. * 40 * * 41 ********************************************************************************** 42 43 BLOCK SENDFILE/RECEIVEFILE mainline code 44 ENTRY RECEIVEFILE 45 ENTRY SENDFILE 46 ENTRY RDUTOXFER 47 ENTRY ERM563 48 ENTRY ERM564 49 ENTRY ERM565 50 ENTRY ERM566 51 ENTRY ERM567 52 1EE1F 4572726F 53 ERM560 TEXTZ "Error on remote end. Cannot finish file transfer." 1EE2C 436F756C 54 ERM561 TEXTZ "Could not open file on remote machine." 1EE36 43616E20 55 ERM562 TEXTZ "Can not send this type of file." 1EE3E 46696C65 56 ERM563 TEXTZ "File went bad. Sendfile aborted." 1EE47 46696C65 57 ERM564 TEXTZ "File transfer aborted" 1EE4D 4F757420 58 ERM565 TEXTZ "Out of buffer space. Transfer must abort." 1EE58 45787065 59 ERM566 TEXTZ "Expecting TO or FROM." 1EE5E 52656D6F 60 ERM567 TEXTZ "Remote comm not responding. Timed out." 1EE68 2B205374 61 STARTMESS TEXT "+ Starting transfer." 00000014 ABS 62 STARTMESSL EQU 20 1EE6D 5472616E 63 DONEMESS TEXTZ "Transfer completed. " 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 457 (RDUTRANSFER) F 33 Sendfile Command 64 65 BEGFRAME2 00178800 6 BASE 66 DEVICETYPE BSS 1 hardware type of file 67 ENDFRAME 68 0001EE76 69 SENDFILE LABEL 1EE76 EC1F8001 6 STAK 70 STZ PUSH 1EE77 DC41EF47 71 CALLNP SENDPARAMS pick up the sendfile parameters 1EE78 DC41F7C5 72 CALLNP SIMWBRKS enable break handling 73 74 * Tell them we are starting the transfer. 1EE79 60040040 0 IMM 75 LD R0 FRWRITE fake out the logging routines 1EE7A 60440014 1 IMM 76 LD R1 STARTMESSL how much we have to say 1EE7B 6085EE68 2 IMM 77 LD R2 ADR STARTMESS "* Starting the transfer." 1EE7C DC41CCC7 78 CALLNP SAVEEVENT save for the logger 1EE7D 60040041 0 IMM 79 LD R0 FRWRITETF do a write with text forms 1EE7E 088400CA IMM 80 FREQ LUNAOUT send to output unit 1EE7F DC41CCB3 81 CALLNP LOGIT now log it 82 83 * Send our opening line to the remote machine. 1EE80 EDC1A8D9 84 STW XFERFLAG make sure we get any response 1EE81 DC41EF95 85 CALLNP XFERINIT initialize buffers and stuff 86 1EE82 6045842F 1 IMM 87 LD R1 ADR SENDSTART R1 -> "+COMM Receivefile! " 1EE83 DC01F1F4 88 CALL SENDTERM send characters to the terminal 1EE84 41084080 1 ZBM 89 PAR R1,CHAR0 character pointer to what to send 1EE85 40440013 IMM 90 PARVL SENDSTARTL how much to send 91 1EE86 60458419 1 IMM 92 LD R1 ADR REMOTENAME the name 1EE87 DC01F1F4 93 CALL SENDTERM send the receive file name 1EE88 41084080 1 ZBM 94 PAR R1,CHAR0 what to send 1EE89 40418418 95 PARVL REMNAMEL and the length 96 1EE8A 60458428 1 IMM 97 LD R1 ADR CRLOC where we keep a carriage return 1EE8B DC01F1F4 98 CALL SENDTERM 1EE8C 41084080 1 ZBM 99 PAR R1,CHAR0 what to send 1EE8D 40440001 IMM 100 PARVL 1 only one character 101 102 * Send first of our COMM to COMM type communications. 1EE8E DC01F102 103 CALL PUTCHARS 1EE8F 41018429 104 PAR SENDLEADER "SENDFILE" 1EE90 40440008 IMM 105 PARVL SENDLEADL length of the string 106 107 * Get the size of the file. 1EE91 600400E0 0 IMM 108 LD R0 FRCATALOG need information on this file 1EE92 60440078 1 IMM 109 LD R1 CATBUFL how much space is in our buffer 1EE93 60858439 2 IMM 110 LD R2 ADR CATBUF 1EE94 08818400 111 FREQ SENDUNIT 1EE95 FA09EECB 0 112 JLTZ R0 CANTOPEN pretend we could not find the file 113 1EE96 60058441 0 IMM 114 LD R0 ADR CATBUF(DIRHWIDE) R0 -> beginning of file info 1EE97 6048218A 1 0 ZBM 115 LD R1 R0,DIRTFL pick up the file size (in blocks) 1EE98 1C441000 1 IMM 116 MUL R1 WPP*CPW turn into a char count 1EE99 E441842D 1 117 ST R1 FILESIZE and save the size 118 1EE9A 60160030 0 0 CACH 119 LD R0 R0,DIRTYPE get the device type of the file 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 458 (RDUTRANSFER) F 33 Sendfile Command 1EE9B E4178800 0 6 BASE 120 ST R0 SP,DEVICETYPE save for later 121 122 * Send the file type. 1EE9C DC01F10E 123 CALL PROT2SEND send a character 1EE9D 40520000 0 REG 124 PARVL R0 code indicating the file type 125 126 * Send the length of the file name, the file name, and the file size. 1EE9E DC01F10E 127 CALL PROT2SEND 1EE9F 40418408 128 PARVL LOCNAMEL size of file name 1EEA0 DC01F102 129 CALL PUTCHARS now send the file name 1EEA1 41018409 130 PAR LOCALNAME 1EEA2 40418408 131 PARVL LOCNAMEL how many chars to send 1EEA3 DC01F102 132 CALL PUTCHARS send the file size 1EEA4 4101842D 133 PAR FILESIZE 1EEA5 40040004 IMM 134 PARL CPW send the whole word 1EEA6 DC41F175 135 CALLNP PROT2FLUSH make sure this all goes out 136 137 * Get the response to our requests. 1EEA7 DC01F17A 138 CALL GETCHARS get a pointer to response 1EEA8 40440008 IMM 139 PARVL RECVSTRL how many chars we want 1EEA9 60440008 1 IMM 140 LD R1 RECVSTRL number of chars 1EEAA 6085842B 2 IMM 141 LD R2 ADR RECVSTR "RECVFILE" the proper response 1EEAB FE540000 142 CMS make sure they match 1EEAC FE0DEECD 143 JNE COMMBAD problems somewhere 144 1EEAD DC41F1AA 145 CALLNP PROT2GET next char indicates remote file status 1EEAE FA03EED0 0 146 JEQZ R0 BADREMFILE jump if remote file is not good 147 148 * Next comes the file name on the remote machine. We already know 149 * what it is so we just throw this info into the bit bucket. 1EEAF DC41F1AA 150 CALLNP PROT2GET get the length of the file name 1EEB0 DC01F17A 151 CALL GETCHARS now get the file name 1EEB1 40520000 0 REG 152 PARVL R0 the length 153 154 * See how much of the file is already done. 1EEB2 DC01F17A 155 CALL GETCHARS 1EEB3 40440004 IMM 156 PARVL CPW one word worth of chars 1EEB4 60440004 1 IMM 157 LD R1 CPW we want a full word 1EEB5 6085842E 2 IMM 158 LD R2 ADR BYTESDONE where we want them moved to 1EEB6 FE400000 159 CMOVE move the characters into our word 160 161 * And off to the routine to actually do the sending. 1EEB7 60178800 0 6 BASE 162 LD R0 SP,DEVICETYPE get the device type 1EEB8 64040001 0 IMM 163 CPR R0 SAFTYPE is it a SAF 1EEB9 FE0DEEC2 164 JNE NOTASAF if not then try something else 1EEBA DC41EFDF 165 CALLNP SENDSAF send the SAF 1EEBB FE0FEEC0 166 JMP SENDDIED death during the send 167 * \ / 168 0001EEBC 169 SENDDONE LABEL 1EEBC DC41F175 170 CALLNP PROT2FLUSH make sure everything got sent 1EEBD DC41EFC7 171 CALLNP WAIT4DONE wait for last messages to be ACKed 1EEBE 6005EE6D 0 IMM 172 LD R0 ADR DONEMESS "Transfer completed." 1EEBF DC41B88A 173 CALLNP OUT tell 'em we are done 0001EEC0 174 SENDDIED LABEL 1EEC0 DC41F0F8 175 CALLNP XFERTIDY clean up after ourselves 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 459 (RDUTRANSFER) F 33 Sendfile Command 1EEC1 FE0FBDC8 176 JMP RDUOK 177 * --- 178 0001EEC2 179 NOTASAF LABEL 1EEC2 64040003 0 IMM 180 CPR R0 CODETYPE is it a code file? 1EEC3 FE03EEC6 181 JEQ ITSARAF if so treat it like a RAF 1EEC4 64040002 0 IMM 182 CPR R0 RAFTYPE is it a RAF 1EEC5 FE0DEEC9 183 JNE BADTYPE if none of the above then quit 0001EEC6 184 ITSARAF LABEL 1EEC6 DC41F019 185 CALLNP SENDRAF send the RAF 1EEC7 FE0FEEC0 186 JMP SENDDIED if problems 1EEC8 FE0FEEBC 187 JMP SENDDONE clean up and leave 188 * --- 189 0001EEC9 190 BADTYPE LABEL 1EEC9 6005EE36 0 IMM 191 LD R0 ADR ERM562 "Cannot send this file type 1EECA FE0FEECE 192 JMP GIVEUP 193 * --- 194 0001EECB 195 CANTOPEN LABEL 1EECB 6005D2AD 0 IMM 196 LD R0 ADR ERM503 " File not found" 1EECC FE0FEECE 197 JMP GIVEUP 198 * --- 199 0001EECD 200 COMMBAD LABEL 1EECD 6005EE1F 0 IMM 201 LD R0 ADR ERM560 "Error on remote end. Cannot finish.." 0001EECE 202 GIVEUP LABEL 1EECE DC41B88A 203 CALLNP OUT bitch a bit 1EECF FE0FEEC0 204 JMP SENDDIED 205 * --- 206 0001EED0 207 BADREMFILE LABEL 1EED0 6005EE2C 0 IMM 208 LD R0 ADR ERM561 "Could not open file on remote.." 1EED1 FE0FEECE 209 JMP GIVEUP 210 * --- 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 460 (RDUTRANSFER) F 33 RECEIVEFILE Command 213 214 ********************************************************************************** 215 * * 216 * The RECEIVEFILE command works like the +COMM version of * 217 * the same thing. We receive a file from the remote machine. * 218 * COMM on the remote end sends us the file and we create it on * 219 * our end. * 220 * The algorithm for this is: * 221 * - Send a string to the remote to fire up COMM. * 222 * - Receive "SENDFILE" (8 chars) * 223 * - Receive file type. (1 char) * 224 * - Receive file name length (1 char) * 225 * - Receive file name * 226 * - Receive file size in bytes (4 chars) * 227 * - Send "RECVFILE" (8 chars) * 228 * - Send file found flag (1 char) * 229 * - Send length of local file name (1 char) * 230 * - Send local file name * 231 * - Send amount of data already here (4 chars) * 232 * - Receive RAF or SAF. * 233 * * 234 ********************************************************************************** 235 0001EED2 236 RECEIVEFILE LABEL 1EED2 EC1F8001 6 STAK 237 STZ PUSH 1EED3 EC01842E 238 STZ BYTESDONE nothing sent yet 1EED4 DC41EF44 239 CALLNP RCVPARAMS pick up any parameters 1EED5 DC41F7C5 240 CALLNP SIMWBRKS enable break handling 241 242 * Tell them we are starting the transfer. 1EED6 60040040 0 IMM 243 LD R0 FRWRITE fake out the logging routines 1EED7 60440014 1 IMM 244 LD R1 STARTMESSL how much we have to say 1EED8 6085EE68 2 IMM 245 LD R2 ADR STARTMESS "* Starting the transfer." 1EED9 DC41CCC7 246 CALLNP SAVEEVENT save for the logger 1EEDA 60040041 0 IMM 247 LD R0 FRWRITETF do a write with text forms 1EEDB 088400CA IMM 248 FREQ LUNAOUT send to output unit 1EEDC DC41CCB3 249 CALLNP LOGIT now log it 250 251 * Send our opening line to the remote machine. 1EEDD EDC1A8D9 252 STW XFERFLAG make sure we get any response 1EEDE DC41EF95 253 CALLNP XFERINIT initialize buffers and stuff 254 1EEDF 60458434 1 IMM 255 LD R1 ADR RCVSTART R1 -> "+COMM Receivefile! " 1EEE0 DC01F1F4 256 CALL SENDTERM send characters to the terminal 1EEE1 41084080 1 ZBM 257 PAR R1,CHAR0 character pointer to what to send 1EEE2 40440010 IMM 258 PARVL RCVSTARTL how much to send 259 1EEE3 60458419 1 IMM 260 LD R1 ADR REMOTENAME the name 1EEE4 DC01F1F4 261 CALL SENDTERM send the receive file name 1EEE5 41084080 1 ZBM 262 PAR R1,CHAR0 what to send 1EEE6 40418418 263 PARVL REMNAMEL and the length 264 1EEE7 60458428 1 IMM 265 LD R1 ADR CRLOC where we keep a carriage return 1EEE8 DC01F1F4 266 CALL SENDTERM 1EEE9 41084080 1 ZBM 267 PAR R1,CHAR0 what to send 1EEEA 40440001 IMM 268 PARVL 1 only one character 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 461 (RDUTRANSFER) F 33 RECEIVEFILE Command 269 270 * Send first of our COMM to COMM type communications. 1EEEB DC01F17A 271 CALL GETCHARS get a pointer to response 1EEEC 40440008 IMM 272 PARVL SENDLEADL how many chars we want 1EEED 60440008 1 IMM 273 LD R1 SENDLEADL number of chars 1EEEE 60858429 2 IMM 274 LD R2 ADR SENDLEADER "RECVFILE" the proper response 1EEEF FE540000 275 CMS make sure they match 1EEF0 FE0DEECD 276 JNE COMMBAD problems somewhere 277 1EEF1 DC41F1AA 278 CALLNP PROT2GET pick up the file type 1EEF2 E4178800 0 6 BASE 279 ST R0 SP,DEVICETYPE save the type of file 280 1EEF3 DC41F1AA 281 CALLNP PROT2GET pick up the file name size 1EEF4 DC01F17A 282 CALL GETCHARS get the file name 1EEF5 40520000 0 REG 283 PARVL R0 how much to get 284 1EEF6 DC01F17A 285 CALL GETCHARS pick up the file size 1EEF7 40440004 IMM 286 PARVL CPW one word worth 1EEF8 60440004 1 IMM 287 LD R1 CPW 1EEF9 6085842D 2 IMM 288 LD R2 ADR FILESIZE where we want this 1EEFA FE400000 289 CMOVE move it in 290 1EEFB DC01F102 291 CALL PUTCHARS 1EEFC 4101842B 292 PAR RECVSTR "RECVFILE" 1EEFD 40440008 IMM 293 PARVL RECVSTRL length of the string 294 1EEFE DC01F10E 295 CALL PROT2SEND send flag indicating file is ok 1EEFF 40440001 IMM 296 PARVL 1 must be ok if we are here 297 1EF00 DC01F10E 298 CALL PROT2SEND send length of file name 1EF01 40418408 299 PARVL LOCNAMEL 1EF02 DC01F102 300 CALL PUTCHARS send the file name 1EF03 41018409 301 PAR LOCALNAME where it is 1EF04 40418408 302 PARVL LOCNAMEL how much to send 303 1EF05 DC01F102 304 CALL PUTCHARS say how much we have already 1EF06 4101842E 305 PAR BYTESDONE how much 1EF07 40440004 IMM 306 PARVL CPW how many chars 307 1EF08 5C018401 308 CMZ SENDOPEN was the unit already opened? 1EF09 FE0DEF3B 309 JNE CHEKTYPE if so, then check on the type 310 * \ / 311 1EF0A 60178800 0 6 BASE 312 LD R0 SP,DEVICETYPE get type of device 1EF0B 50040004 0 IMM 313 MIN R0 MAXFILTYPE 1EF0C 5CA1EF0D 0 314 LDPC FILETYPETB(R0) add file type to file name string 315 * --- 316 0001EF0D 317 FILETYPETB LABEL 1EF0D 0001EECD 318 VFD ADR COMMBAD 0 - error 1EF0E 0001EF12 319 VFD ADR OPENSAF 1 - saf 1EF0F 0001EF1C 320 VFD ADR OPENRAF 2 - raf 1EF10 0001EF14 321 VFD ADR OPENCODE 3 - code 1EF11 0001EECD 322 VFD ADR COMMBAD 0 - error 00000004 ABS 323 MAXFILTYPE EQU (DISPW FILETYPETB)-1 324 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 462 (RDUTRANSFER) F 33 RECEIVEFILE Command 0001EF12 325 OPENSAF LABEL 1EF12 60440000 1 IMM 326 LD R1 0 nothing added on to file name 1EF13 FE0FEF23 327 JMP OPENIT open the receiving file 328 * --- 329 0001EF14 330 OPENCODE LABEL 1EF14 60058402 0 IMM 331 LD R0 ADR CODEREQ 1EF15 60418408 1 332 LD R1 LOCNAMEL 1EF16 60858409 2 IMM 333 LD R2 ADR LOCALNAME R2 -> local name string 1EF17 389A8800 2 21 CACH 334 LEA R2 CACH R2,0(R1) point to char position at end of string 1EF18 60440006 1 IMM 335 LD R1 CODEREQL how long it is 1EF19 FE400000 336 CMOVE 1EF1A 60440006 1 IMM 337 LD R1 CODEREQL how much extra we put on 1EF1B FE0FEF23 338 JMP OPENIT now go open the file 339 * --- 340 0001EF1C 341 OPENRAF LABEL 1EF1C 60058404 0 IMM 342 LD R0 ADR RAFREQ 1EF1D 60418408 1 343 LD R1 LOCNAMEL 1EF1E 60858409 2 IMM 344 LD R2 ADR LOCALNAME R2 -> local name string 1EF1F 389A8800 2 21 CACH 345 LEA R2 CACH R2,0(R1) point to char position at end of string 1EF20 60440005 1 IMM 346 LD R1 RAFREQL how long it is 1EF21 FE400000 347 CMOVE 1EF22 60440005 1 IMM 348 LD R1 RAFREQL how much extra we put on 349 * \ / 350 0001EF23 351 OPENIT LABEL 1EF23 18418408 1 352 ADD R1 LOCNAMEL length of file name string 1EF24 60858409 2 IMM 353 LD R2 ADR LOCALNAME 1EF25 60040268 0 IMM 354 LD R0 FRNOPENCW open and create 1EF26 08818400 355 FREQ SENDUNIT unit saved for the open 1EF27 FA09EF42 0 356 JLTZ R0 BADOPEN oops 357 * \ / 358 0001EF28 359 GOGETIT LABEL 1EF28 60178800 0 6 BASE 360 LD R0 SP,DEVICETYPE get the type of file 1EF29 5CA1EF29 0 361 LDPC RCVTYPETAB(R0-1) 362 * --- 363 0001EF2A 364 RCVTYPETAB LABEL 1EF2A 0001EF2D 365 VFD ADR GODOSAF 1EF2B 0001EF30 366 VFD ADR GODORAF 1EF2C 0001EF30 367 VFD ADR GODOCODE 368 0001EF2D 369 GODOSAF LABEL 1EF2D DC41F060 370 CALLNP RECEIVESAF 1EF2E FE0FEECD 371 JMP COMMBAD if errors 1EF2F FE0FEF32 372 JMP RCVDONE 373 * --- 374 0001EF30 375 GODORAF LABEL 0001EF30 376 GODOCODE LABEL 1EF30 DC41F082 377 CALLNP RECEIVERAF 1EF31 FE0FEECD 378 JMP COMMBAD blame it on the other guy 379 * \ / 380 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 463 (RDUTRANSFER) F 33 RECEIVEFILE Command 0001EF32 381 RCVDONE LABEL 1EF32 6005EE6D 0 IMM 382 LD R0 ADR DONEMESS "Transfer completed." 1EF33 DC41B88A 383 CALLNP OUT tell 'em we are done 1EF34 60040140 0 IMM 384 LD R0 URDELAY wait a bit 1EF35 60440001 1 IMM 385 LD R1 1 one second worth 1EF36 60840000 2 IMM 386 LD R2 0 nothing can interrupt us 1EF37 09040000 IMM 387 UREQ 0 1EF38 DC41BC7E 388 CALLNP SHIPNOP get any last stuff 1EF39 DC41F0F8 389 CALLNP XFERTIDY clean up after ourselves 1EF3A FE0FBDC8 390 JMP RDUOK 391 * --- 392 0001EF3B 393 CHEKTYPE LABEL 1EF3B 60040010 0 IMM 394 LD R0 FRSTATUS find out if we have the correct type 1EF3C 08818400 395 FREQ SENDUNIT 1EF3D FA09EF42 0 396 JLTZ R0 BADOPEN if something is really wrong 1EF3E 60178800 0 6 BASE 397 LD R0 SP,DEVICETYPE get the type we expect 1EF3F 640A7460 0 1 CBM 398 CPR R0 R1/DEVTYPE do these match? 1EF40 FE0DEF42 399 JNE BADOPEN oops 1EF41 FE0FEF28 400 JMP GOGETIT 401 * --- 402 0001EF42 403 BADOPEN LABEL 1EF42 6005D2B6 0 IMM 404 LD R0 ADR ERM505 "Could not open file" 1EF43 FE0FEECE 405 JMP GIVEUP 406 * --- 407 408 END SENDFILE/RECEIVEFILE 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 464 (RDUTRANSFER) F 33 Sendfile/Receivefile Parameter Processor 411 412 ********************************************************************************** 413 * * 414 * SENDPARAMS picks up the parameters from the invocation line * 415 * and defaults any as necessary. We open the local file for reading. * 416 * The command call should be as follows: * 417 * * 418 * RDU: sendfile [TO ] * 419 * * 420 * RCVPARAMS picks up paramters from the invocation line and * 421 * defaults as necessary. We open the local file for writing and * 422 * create it if needed. * 423 * The command call should be as follows: * 424 * RDU: receivefile [FROM ] * 425 * * 426 * The command name will already be read so we pick up the * 427 * first file name (it must be there). Then if there is a TO or * 428 * FROM we pick up the second file name. If there is none * 429 * specified we default to the original. * 430 * Call: * 431 * CALLNP SENDPARAMS * 432 * LOCALNAME = file name for local machine * 433 * REMOTENAME = file name for remote machine * 434 * LOCNAMEL and REMNAMEL contain the length of the file names. * 435 * SENDUNIT = unit number of local file * 436 * SENDOPEN = 1 if we opened the unit, -1 if not * 437 * * 438 * This subroutine exits directly to RDUERR if there is * 439 * an error in the parameters. * 440 * Eats R0:R4 * 441 * * 442 ********************************************************************************** 443 444 BLOCK SENDPARAMS subroutine 445 ENTRY SENDPARAMS 446 ENTRY RCVPARAMS 447 448 BEGFRAME 449 ENDFRAME 450 00000010 BYTE 451 RCVBIT EQU BIT 0 1 sez to create local file 452 1EF44 DD5F8001 6 STAK 453 RCVPARAMS ENTRNP PUSH 1EF45 EDCBC010 7 CBM 454 STW R7/RCVBIT say to create local file 1EF46 FE0FEF49 455 JMP XFERMERGE join on in 456 * --- 457 1EF47 DD5F8001 6 STAK 458 SENDPARAMS ENTRNP PUSH 1EF48 EC0BC010 7 CBM 459 STZ R7/RCVBIT say not to create the file 0001EF49 460 XFERMERGE LABEL 1EF49 EC018418 461 STZ REMNAMEL nothing here yet 1EF4A DC41BD4A 462 CALLNP FILEGET get the first file name 1EF4B E4418400 1 463 ST R1 SENDUNIT save the unit number 1EF4C FA0DEF76 0 464 JNEZ R0 NOFILE jump if file not found 1EF4D E4818401 2 465 ST R2 SENDOPEN save this indicator 1EF4E F3C1EF55 7 466 JBF R7/RCVBIT HAVEFILE skip ahead if this is not receivefile 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 465 (RDUTRANSFER) F 33 Sendfile/Receivefile Parameter Processor 467 * \ / 468 1EF4F 600400C0 0 IMM 469 LD R0 FRCACCESS need r/w access 1EF50 60440000 1 IMM 470 LD R1 0 access we are trying for 1EF51 08818400 471 FREQ SENDUNIT give it a shot 1EF52 FA09EF79 0 472 JLTZ R0 BADFILNAME pretend we did not find the file 1EF53 60040013 0 IMM 473 LD R0 FRRELEASE release anything on this file 1EF54 08818400 474 FREQ SENDUNIT 475 * \ / 476 0001EF55 477 HAVEFILE LABEL 1EF55 6005A830 0 IMM 478 LD R0 ADR SBUFFW R0 -> file name 1EF56 6041A8EC 1 479 LD R1 SBCHARL number of chars in the name 1EF57 E4418408 1 480 ST R1 LOCNAMEL save the length of the name 1EF58 60858409 2 IMM 481 LD R2 ADR LOCALNAME 1EF59 FE400000 482 CMOVE move the file name here 483 1EF5A DC41B33C 484 CALLNP FETCHAP now see if there is more specified 1EF5B F6BFEF81 2 485 JBT R2/TEOL NOREMNAME jump if they did not specify remote name 1EF5C F2AFEF7B 2 486 JBF R2/TALPH BADPARAMS jump if bad 1EF5D 6001A830 0 487 LD R0 SBUFFW pick up word 1EF5E F7C1EF62 7 488 JBT R7/RCVBIT CHECKFROM look for "FROM" 1EF5F 64018407 0 489 CPR R0 TOWORD is it the TO 1EF60 FE03EF64 490 JEQ OKSEP if so then an ok separator 1EF61 FE0FEF7B 491 JMP BADPARAMS screwed up 492 * --- 493 0001EF62 494 CHECKFROM LABEL 1EF62 64018406 0 495 CPR R0 FROMWORD better be "FROM" 1EF63 FE0DEF7B 496 JNE BADPARAMS oops 497 * \ / 498 0001EF64 499 OKSEP LABEL 1EF64 DC41B346 500 CALLNP FETCHITMF get the file name 1EF65 F2AFEF74 2 501 JBF R2/TALPH NOFILENAME we wanted a file name 502 * \ / 503 1EF66 6005A830 0 IMM 504 LD R0 ADR SBUFFW R0 -> file name 1EF67 6041A8EC 1 505 LD R1 SBCHARL number of chars in the name 1EF68 E4418418 1 506 ST R1 REMNAMEL save the length of the name 1EF69 60858419 2 IMM 507 LD R2 ADR REMOTENAME 1EF6A FE400000 508 CMOVE move the file name here 509 * \ / 510 1EF6B 60040102 0 IMM 511 LD R0 URPACKFS time to pack up the file name 1EF6C 6045A830 1 IMM 512 LD R1 ADR SBUFFW R1 -> file specifier 1EF6D 60858B2D 2 IMM 513 LD R2 ADR SAFBUF R2 -> place to pack it at 1EF6E 09040000 IMM 514 UREQ 0 do it 515 1EF6F 5E018B37 516 CMZ2 SAFBUF(5) see if there is a file name 1EF70 FE03EF81 517 JEQ DEFNAMEXT if not default the name and extension 1EF71 60018B39 0 518 LD R0 SAFBUF(12) pick up the extension 1EF72 FA2DEF86 0 519 JEQMW R0 DEFEXT default the extension 520 * \ / 521 0001EF73 522 PARMSEXIT LABEL 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 466 (RDUTRANSFER) F 33 Sendfile/Receivefile Parameter Processor 1EF73 5D1F8001 6 STAK 523 LEAVE POP 524 * --- 525 0001EF74 526 NOFILENAME LABEL 1EF74 6005D2A6 0 IMM 527 LD R0 ADR ERM502 " Expecting a file name" 1EF75 FE0FBE35 528 JMP RDUERR 529 * --- 530 0001EF76 531 NOFILE LABEL 1EF76 F3C1EF79 7 532 JBF R7/RCVBIT BADFILNAME don' want us to create it 1EF77 EC018401 533 STZ SENDOPEN say that no one opened the file 1EF78 FE0FEF55 534 JMP HAVEFILE jump if we got it 535 * --- 536 0001EF79 537 BADFILNAME LABEL 1EF79 6005D2AD 0 IMM 538 LD R0 ADR ERM503 " File not found" 1EF7A FE0FBE35 539 JMP RDUERR 540 * --- 541 0001EF7B 542 BADPARAMS LABEL 1EF7B 5C018401 543 CMZ SENDOPEN did we open the unit 1EF7C FE09EF7F 544 JLT NOTUS then don't close it 1EF7D 60040060 0 IMM 545 LD R0 FRCLOSE 1EF7E 08818400 546 FREQ SENDUNIT 0001EF7F 547 NOTUS LABEL 1EF7F 6005EE58 0 IMM 548 LD R0 ADR ERM566 "Expecting TO or FROM" 1EF80 FE0FBE35 549 JMP RDUERR 550 * --- 551 0001EF81 552 NOREMNAME LABEL 0001EF81 553 DEFNAMEXT LABEL 1EF81 6201A961 01 554 LD2 R0 EQNAME pick up the file name 1EF82 E601A8ED 01 555 ST2 R0 VALUE put here for the unpacker 1EF83 60C40000 3 IMM 556 LD R3 0 1EF84 DC41B660 557 CALLNP PAK12OUT unpack it 1EF85 FE0FEF87 558 JMP DEFEXT1 don't reset R3 559 * --- 560 0001EF86 561 DEFEXT LABEL 1EF86 60C40000 3 IMM 562 LD R3 0 0001EF87 563 DEFEXT1 LABEL 1EF87 6004002E 0 IMM 564 LD R0 "." to separate things 1EF88 E437AC01 0 3 @ 565 ST R0 @OBPT(R3) put in string 1EF89 18C40001 3 IMM 566 ADD R3 1 leave space for it 1EF8A 6001A963 0 567 LD R0 EQEXT pick up the extension 1EF8B E401A8ED 0 568 ST R0 VALUE 1EF8C DC41B653 569 CALLNP PAK6OUT unpack it 1EF8D 6001AC01 0 570 LD R0 OBPT point to start of unpacked stuff 1EF8E 60858419 2 IMM 571 LD R2 ADR REMOTENAME 1EF8F 60418418 1 572 LD R1 REMNAMEL how much we have put in here 1EF90 389A8800 2 21 CACH 573 LEA R2 CACH R2,0(R1) R2 -> where to put name and ext 1EF91 6052C000 1 3 REG 574 LD R1 R3 how much we unpacked 1EF92 98C18418 3 575 ADDM R3 REMNAMEL so the size is right 1EF93 FE400000 576 CMOVE do the defaulting 1EF94 FE0FEF73 577 JMP PARMSEXIT 578 * --- 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 467 (RDUTRANSFER) F 33 Sendfile/Receivefile Parameter Processor 579 580 END of SENDPARAMS subroutine 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 468 (RDUTRANSFER) F 33 Sendfile/Receivefile Parameter Processor 582 583 ********************************************************************************** 584 * * 585 * XFERINIT * 586 * * 587 * Initialize everything for the file transfer. * 588 * Call: * 589 * CALLNP XFERINIT * 590 * * 591 * Eats R0:R * 592 * * 593 ********************************************************************************** 594 595 BLOCK XFERINIT subroutine 596 597 ENTRY XFERINIT 598 599 BEGFRAME 600 ENDFRAME 601 1EF95 DD5F8001 6 STAK 602 XFERINIT ENTRNP PUSH 603 * Initialize our sending buffers. 1EF96 60058914 0 IMM 604 LD R0 ADR MSGSNDBUFS R0 -> output message buffers 1EF97 E401845A 0 605 ST R0 PROT2MSG keep track of what we gave 'em 1EF98 38560008 1 0 CACH 606 LEA R1 R0,MSGTEXT make into a character pointer to text 1EF99 E44184AB 1 607 ST R1 P1PBPT set up pointer to buffer 1EF9A EC0184AC 608 STZ P1PUTPOS initialize the position 609 1EF9B 60840006 2 IMM 610 LD R2 MAXSENTMSG-1 number of buffers to initialize 1EF9C 18040042 0 IMM 611 ADD R0 MSGELEMLEN move to the next element 1EF9D E4018466 0 612 ST R0 MSGSNDLIST save pointer to our list 0001EF9E 613 SENDLOOP LABEL 1EF9E 60520000 1 0 REG 614 LD R1 R0 R1 points to start of last element 1EF9F 18040042 0 IMM 615 ADD R0 MSGELEMLEN move to next element 1EFA0 E4085F10 0 1 ZBM 616 ST R0 R1,MSGLINK link it on 1EFA1 FAA3EF9E 2 617 DRJ R2 SENDLOOP 618 * \ / 1EFA2 EC081F10 0 ZBM 619 STZ R0,MSGLINK zero link on final element 620 621 * Now our receiving buffers. 1EFA3 EC018468 622 STZ P2RCVMSG no received message handed out yet 1EFA4 60058536 0 IMM 623 LD R0 ADR MSGRCVBUFS R0 -> input message buffers 1EFA5 E4018534 0 624 ST R0 RCVMSGBUF save pointer to buffer beginning 1EFA6 38560004 1 0 CACH 625 LEA R1 R0,MSGSTART make into a character pointer to start 1EFA7 E4418533 1 626 ST R1 RCVBPT set up pointer to buffer 1EFA8 D1418535 627 STMW RCVBUFPOS initialize the position 628 1EFA9 6084000D 2 IMM 629 LD R2 2*MAXSENTMSG-1 number of buffers to initialize 1EFAA 18040042 0 IMM 630 ADD R0 MSGELEMLEN move to the next element 1EFAB E4018467 0 631 ST R0 MSGRCVLIST save pointer to our list 1EFAC EC081C10 0 ZBM 632 STZ R0,MSGPROC clear processed bit 0001EFAD 633 RECLOOP LABEL 1EFAD 60520000 1 0 REG 634 LD R1 R0 R1 points to start of last element 1EFAE 18040042 0 IMM 635 ADD R0 MSGELEMLEN move to next element 1EFAF EC085C10 1 ZBM 636 STZ R1,MSGPROC clear processed bit 1EFB0 E4085F10 0 1 ZBM 637 ST R0 R1,MSGLINK link it on 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 469 (RDUTRANSFER) F 33 Sendfile/Receivefile Parameter Processor 1EFB1 FAA3EFAD 2 638 DRJ R2 RECLOOP 639 * \ / 1EFB2 EC081F10 0 ZBM 640 STZ R0,MSGLINK zero link on final element 641 1EFB3 EC018461 642 STZ MSGSENDBEG nothing in this list yet 1EFB4 60058461 0 IMM 643 LD R0 ADR MSGSENDBEG R0 -> head of list 1EFB5 E4018462 0 644 ST R0 MSGSENDEND 645 1EFB6 EC018463 646 STZ MSGRCVBEG nothing in this list yet 1EFB7 60058463 0 IMM 647 LD R0 ADR MSGRCVBEG R0 -> head of list 1EFB8 E4018464 0 648 ST R0 MSGRCVEND 649 1EFB9 EC01845F 650 STZ LASTSENT initialize 1EFBA EDC18460 651 STW NEXTRCVMSG next message to receive 1EFBB EC01845D 652 STZ LASTACK no messages acknowldged yet 1EFBC EC01845E 653 STZ LASTWEACK no messages acknowldged yet 1EFBD EC018468 654 STZ P2RCVMSG have not handed out a received message 1EFBE EC018465 655 STZ STARTFLAG no start character found yet 656 657 * Some protocol2 type initialization, too. 1EFBF EC0184F1 658 STZ GETPOS temp buffer for unpacked chars 1EFC0 EC0184F0 659 STZ GETCNT nothing in it 1EFC1 EC0184AF 660 STZ P1GETPOS nothing in P1GETBUF 1EFC2 EC0184AE 661 STZ P1GETCNT 1EFC3 D1418458 662 STMW REPEATCNT no repeated chars yet 1EFC4 D141845C 663 STMW MATCHCNT no repeated chars yet 1EFC5 D14184AA 664 STMW PUTPOS nothing here, either 1EFC6 5D1F8001 6 STAK 665 LEAVE POP 666 * --- 667 668 END of XFERINIT subroutine 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 470 (RDUTRANSFER) F 33 Sendfile/Receivefile Parameter Processor 670 671 ********************************************************************************** 672 * * 673 * WAIT4DONE * 674 * * 675 * Waits for all messages sent to be acknowledged. * 676 * Call: * 677 * CALLNP WAIT4DONE * 678 * * 679 * Eats R0:R4 * 680 * * 681 ********************************************************************************** 682 683 BLOCK WAIT4DONE subroutine 684 685 ENTRY WAIT4DONE 686 687 BEGFRAME 688 ENDFRAME 689 1EFC7 DD5F8001 6 STAK 690 WAIT4DONE ENTRNP PUSH 0001EFC8 691 GETITALL LABEL 1EFC8 D181A8E0 692 CLRT UBREAK see if user wants out 1EFC9 FE0DEFDD 693 JNE BREAKOUT 1EFCA DC41BC7E 694 CALLNP SHIPNOP pick up any messages from the remote 1EFCB 6001F38B 0 695 LD R0 RESPBINDX how much reponse we received 1EFCC 64040010 0 IMM 696 CPR R0 MAXRESPS see if a full boat 1EFCD FE03EFC8 697 JEQ GETITALL if so then go back for more 698 * \ / 699 1EFCE DC41F26C 700 CALLNP PROCESSNOT process any messages that came in 1EFCF 60018461 0 701 LD R0 MSGSENDBEG get the head of sent message list 1EFD0 FA31EFD7 0 702 JZA R0 ALLDONE get out of here if finished 703 * \ / 704 1EFD1 60040140 0 IMM 705 LD R0 URDELAY wait a bit 1EFD2 60440002 1 IMM 706 LD R1 2 how long to delay 1EFD3 60840020 2 IMM 707 LD R2 UINTBREAK allow breaks to interrupt us 1EFD4 09040000 IMM 708 UREQ 0 1EFD5 FA4DEFDD 1 709 JNEZ R1 BREAKOUT jump if break occured during delay 1EFD6 FE0FEFC8 710 JMP GETITALL back for more reponse 711 * --- 712 0001EFD7 713 ALLDONE LABEL 1EFD7 60040140 0 IMM 714 LD R0 URDELAY wait a bit 1EFD8 60440002 1 IMM 715 LD R1 2 how long to delay 1EFD9 60840020 2 IMM 716 LD R2 UINTBREAK allow breaks to interrupt us 1EFDA 09040000 IMM 717 UREQ 0 1EFDB DC41BC7E 718 CALLNP SHIPNOP get any final crap sent on the line 1EFDC 5D1F8001 6 STAK 719 LEAVE POP 720 * --- 721 0001EFDD 722 BREAKOUT LABEL 1EFDD DC41F0C3 723 CALLNP XFERBRK process the break request 1EFDE FE0FEFC8 724 JMP GETITALL it they want to keep going 725 * --- 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 471 (RDUTRANSFER) F 33 Sendfile/Receivefile Parameter Processor 726 END of WAIT4DONE subroutine 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 472 (RDUTRANSFER) F 33 Sendfile/Receivefile Parameter Processor 728 729 ********************************************************************************** 730 * * 731 * SENDSAF * 732 * * 733 * The algorithm for sending a sequential file (SAF) is: * 734 * 1. Receiver sends number of records to skip (4 chars) * 735 * 2. Sender loops sending * 736 * - record type (1 char, 0=text, 1=text with forms) * 737 * - record length (4 chars) * 738 * - record * 739 * 3. Sender sends EOD (1 char = FF) * 740 * * 741 * Call: * 742 * SENDUNIT = unit file to send is opened on * 743 * CALLNP SENDSAF * 744 * JMP * 745 * * 746 * Eats R0:R4 * 747 * * 748 ********************************************************************************** 749 750 BLOCK SENDSAF subroutine 751 752 ENTRY SENDSAF 753 754 BEGFRAME 00178801 6 BASE 755 FIRSTREC BSS 1 first record we want 00178802 6 BASE 756 RECSIZE BSS 1 size of record 00178803 6 BASE 757 PERCENTCNT BSS 1 counter tells if we should report percent 758 ENDFRAME 759 1EFDF DD5F8004 6 STAK 760 SENDSAF ENTRNP PUSH 1EFE0 DC01F17A 761 CALL GETCHARS see how many records to skip 1EFE1 40440004 IMM 762 PARVL CPW whole word field 1EFE2 60440004 1 IMM 763 LD R1 CPW we want a whole word 1EFE3 38978801 2 6 BASE 764 LEA R2 SP,FIRSTREC point to where we want it 1EFE4 FE400000 765 CMOVE move it on in 1EFE5 60D78801 3 6 BASE 766 LD R3 SP,FIRSTREC get the word 1EFE6 FAC3EFEC 3 767 JEQZ R3 NOSKIP nothing to skip 768 * \ / 769 770 * Skip the records the remote already has. 0001EFE7 771 SKIPLOOP LABEL 1EFE7 DC41F009 772 CALLNP READREC 1EFE8 FE0FF008 773 JMP SAFERR if saf went bad 1EFE9 FE0FF005 774 JMP ALLDONE ran out of records 1EFEA 9841842E 1 775 ADDM R1 BYTESDONE keep track of where we are at 1EFEB FAE3EFE7 3 776 DRJ R3 SKIPLOOP 777 * \ / 778 0001EFEC 779 NOSKIP LABEL 1EFEC 6001842E 0 780 LD R0 BYTESDONE 1EFED 18040800 0 IMM 781 ADD R0 WPP*CPW/2 add on half a page 1EFEE E4178803 0 6 BASE 782 ST R0 SP,PERCENTCNT set when to tell percent 1EFEF DC41F0E0 783 CALLNP PERCENTDONE say how far we are 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 473 (RDUTRANSFER) F 33 Sendfile/Receivefile Parameter Processor 784 * \ / 785 0001EFF0 786 KEEPGOING LABEL 1EFF0 DC41F009 787 CALLNP READREC 1EFF1 FE0FF008 788 JMP SAFERR if saf went bad 1EFF2 FE0FF005 789 JMP ALLDONE ran out of records 1EFF3 E4578802 1 6 BASE 790 ST R1 SP,RECSIZE save the size 1EFF4 9841842E 1 791 ADDM R1 BYTESDONE keep track of where we are at 1EFF5 64040001 0 IMM 792 CPR R0 RTTEXTF see if this is text with forms 1EFF6 EC520000 0 REG 793 STLEQ R0 if so then send a one 1EFF7 DC01F10E 794 CALL PROT2SEND send the char indicating record type 1EFF8 40520000 0 REG 795 PARVL R0 1 sez text with forms 1EFF9 60938000 2 6 REG 796 LD R2 SP for parameter passing 1EFFA DC01F102 797 CALL PUTCHARS send the record length 1EFFB 41168802 2 BASE 798 PAR R2,RECSIZE the record length 1EFFC 40440004 IMM 799 PARVL 4 2 characters 800 1EFFD 60578802 1 6 BASE 801 LD R1 SP,RECSIZE get the record size 1EFFE DC01F102 802 CALL PUTCHARS now send the record 1EFFF 41018B2D 803 PAR SAFBUF where the record is 1F000 40524000 1 REG 804 PARVL R1 the size of the record 1F001 6001842E 0 805 LD R0 BYTESDONE how far we are 1F002 64178803 0 6 BASE 806 CPR R0 SP,PERCENTCNT time to tell the percentage? 1F003 FE09EFF0 807 JLT KEEPGOING if not then keep on going 808 * \ / 809 1F004 FE0FEFEC 810 JMP NOSKIP time to do percents 811 * --- 812 0001F005 813 ALLDONE LABEL 1F005 DC01F10E 814 CALL PROT2SEND send our finished indicator 1F006 404400FF IMM 815 PARVL EODMARK what it is 1F007 19C40001 7 IMM 816 ADD R7 1 good return 0001F008 817 SAFERR LABEL 1F008 5D1F8004 6 STAK 818 LEAVE POP 819 * --- 820 821 END of SENDSAF subroutine 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 474 (RDUTRANSFER) F 33 Sendfile/Receivefile Parameter Processor 823 824 ********************************************************************************** 825 * * 826 * READREC * 827 * * 828 * Reads one record from SENDUNIT into SAFBUF. * 829 * Call: * 830 * CALLNP READREC * 831 * JMP file went bad * 832 * JMP EOD reached * 833 * R0 = record type * 834 * * 835 * Eats R0:R2 * 836 * * 837 ********************************************************************************** 838 839 BLOCK READREC subroutine 840 841 ENTRY READREC 842 843 BEGFRAME 844 ENDFRAME 845 1F009 DD5F8001 6 STAK 846 READREC ENTRNP PUSH 1F00A 60040030 0 IMM 847 LD R0 FRREAD read a record 1F00B 60441800 1 IMM 848 LD R1 SAFBUFL size of the buffer to read into 1F00C 60858B2D 2 IMM 849 LD R2 ADR SAFBUF where the buffer is 1F00D 08818400 850 FREQ SENDUNIT read from our file 1F00E FA09F016 0 851 JLTZ R0 SENDERR jump if an error occurred 1F00F 30441800 1 IMM 852 RSB R1 SAFBUFL determine the record length 1F010 600A2040 0 0 CBM 853 LD R0 R0/RECTYPE get the record type 1F011 64040009 0 IMM 854 CPR R0 RTEOD is it the end of the file? 1F012 FE03F014 855 JEQ REACHEDEND 1F013 19C40001 7 IMM 856 ADD R7 1 indicate not EOD 0001F014 857 REACHEDEND LABEL 1F014 19C40001 7 IMM 858 ADD R7 1 indicate no deadly error 0001F015 859 FATALERR LABEL 1F015 5D1F8001 6 STAK 860 LEAVE POP 861 * --- 862 0001F016 863 SENDERR LABEL 1F016 6005EE3E 0 IMM 864 LD R0 ADR ERM563 "File went bad. Sendfile aborted." 1F017 DC41B88A 865 CALLNP OUT bitch about it 1F018 FE0FF015 866 JMP FATALERR get out of here 867 * --- 868 869 END of READREC subroutine 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 475 (RDUTRANSFER) F 33 Sendfile/Receivefile Parameter Processor 871 872 ********************************************************************************** 873 * * 874 * SENDRAF * 875 * * 876 * The protocol for sending a RAF type file is: * 877 * 1. Receiver sends number of first page to send. * 878 * 2. Sender sends (once for each page): * 879 * - protected status of page (1 char) * 880 * - page number (4 chars) * 881 * - page (4096 chars) * 882 * 3. EOD (1 char = 0FF) * 883 * 4. If code file then send code control block info (128 chars). * 884 * * 885 * Call: * 886 * R0 = file type * 887 * SENDUNIT = unit of file to send * 888 * CALLNP SENDRAF * 889 * JMP error occurred * 890 * * 891 * Eats R0:R5 * 892 * * 893 ********************************************************************************** 894 895 BLOCK SENDRAF subroutine 896 897 ENTRY SENDRAF 898 899 BEGFRAME 00178801 6 BASE 900 NEXTPAGE BSS 1 next page to send 00178802 6 BASE 901 FILETYPE BSS 1 1 sez code file, 0 sez RAF 00178803 6 BASE 902 LASTPAGE BSS 1 page number of last page in RAF 903 ENDFRAME 904 1F019 DD5F8004 6 STAK 905 SENDRAF ENTRNP PUSH 1F01A 64040003 0 IMM 906 CPR R0 CODETYPE is this a code file 1F01B EC578802 6 BASE 907 STLEQ SP,FILETYPE save for later usage 908 1F01C 60041000 0 IMM 909 LD R0 CPW*WPP size of a block in characters 1F01D 9001842D 0 910 SUBM R0 FILESIZE account for control block (not sent) 911 912 * Determine the starting and stopping positions. 1F01E 60040093 0 IMM 913 LD R0 FRRAFLAST get last byte number 1F01F 08818400 914 FREQ SENDUNIT 915 1F020 14441000 1 IMM 916 DIV R1 WPP*CPW turn into a page number 1F021 E4578803 1 6 BASE 917 ST R1 SP,LASTPAGE so we know when to stop 918 1F022 DC01F17A 919 CALL GETCHARS pick up the starting page number 1F023 40440004 IMM 920 PARVL CPW get some characters 1F024 38978801 2 6 BASE 921 LEA R2 SP,NEXTPAGE R2 -> where we want the page number 1F025 60440004 1 IMM 922 LD R1 CPW 1F026 FE400000 923 CMOVE move it on in 1F027 60578801 1 6 BASE 924 LD R1 SP,NEXTPAGE 925 * \ / 926 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 476 (RDUTRANSFER) F 33 Sendfile/Receivefile Parameter Processor 0001F028 927 SENDLOOP LABEL 1F028 64578803 1 6 BASE 928 CPR R1 SP,LASTPAGE are we done yet? 1F029 FE05F04A 929 JGT RAFDONE if so then quit 930 * \ / 931 1F02A 60040090 0 IMM 932 LD R0 FRPOSITION position the RAF to the next location 1F02B 60578801 1 6 BASE 933 LD R1 SP,NEXTPAGE the page number 1F02C 1C441000 1 IMM 934 MUL R1 WPP*CPW convert to a byte position 1F02D 08818400 935 FREQ SENDUNIT 1F02E FA09F05D 0 936 JLTZ R0 SENDERR jump if something went wrong 1F02F FA43F048 1 937 JEQZ R1 ITSAHOLE skip the holes 1F030 DC41F0E0 938 CALLNP PERCENTDONE say how far we are 939 * \ / 940 1F031 60840000 2 IMM 941 LD R2 0 assume page is from a RAF 1F032 5C178802 6 BASE 942 CMZ SP,FILETYPE were we right? 1F033 FE03F038 943 JEQ ITSARAF 1F034 60040096 0 IMM 944 LD R0 FRPGPROTG get protected status of page 1F035 60578801 1 6 BASE 945 LD R1 SP,NEXTPAGE the page number we are interested in 1F036 08818400 946 FREQ SENDUNIT 1F037 FA09F05D 0 947 JLTZ R0 SENDERR if problems 0001F038 948 ITSARAF LABEL 1F038 DC01F10E 949 CALL PROT2SEND send the protected status 1F039 40528000 2 REG 950 PARVL R2 1F03A 60938000 2 6 REG 951 LD R2 SP copy for parameter passing 1F03B DC01F102 952 CALL PUTCHARS send the block number 1F03C 41168801 2 BASE 953 PAR R2,NEXTPAGE the block number 1F03D 40440004 IMM 954 PARVL CPW whole word 955 956 * Now lets send a page. 1F03E 60040092 0 IMM 957 LD R0 FRMAPINR map in the page to send 1F03F 60578801 1 6 BASE 958 LD R1 SP,NEXTPAGE the page we want 1F040 60840067 2 IMM 959 LD R2 BLOCKPN page number to map it into 1F041 08818400 960 FREQ SENDUNIT from the file open on SENDUNIT 1F042 FA09F05D 0 961 JLTZ R0 SENDERR if things got screwy 962 1F043 DC01F102 963 CALL PUTCHARS send the block on out 1F044 41019C00 964 PAR BLOCKPAGE where to find it 1F045 40441000 IMM 965 PARVL WPP*CPW how much we are sending 966 * \ / 967 1F046 60041000 0 IMM 968 LD R0 WPP*CPW number of bytes we have done 1F047 9801842E 0 969 ADDM R0 BYTESDONE keep track of where we are at 970 * \ / 971 0001F048 972 ITSAHOLE LABEL 1F048 BC578801 1 6 BASE 973 INCL R1 SP,NEXTPAGE 1F049 FE0FF028 974 JMP SENDLOOP 975 * --- 976 0001F04A 977 RAFDONE LABEL 1F04A DC01F10E 978 CALL PROT2SEND send our EOD character 1F04B 404400FF IMM 979 PARVL EODMARK 1F04C 5C178802 6 BASE 980 CMZ SP,FILETYPE see if we should send CCB info 1F04D FE03F05B 981 JEQ NOCCB jump if no CCB to send 982 * \ / 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 477 (RDUTRANSFER) F 33 Sendfile/Receivefile Parameter Processor 983 1F04E 61440000 5 IMM 984 LD R5 0 start with the 0 field of the CCB 0001F04F 985 CCBLOOP LABEL 1F04F 6004018F 0 IMM 986 LD R0 FRGETCCB get CCB info 1F050 60534000 1 5 REG 987 LD R1 R5 field to get 1F051 08818400 988 FREQ SENDUNIT get a field 1F052 FA09F05D 0 989 JLTZ R0 SENDERR if problems 1F053 E4978802 2 6 BASE 990 ST R2 SP,FILETYPE place to put the info at 1F054 60938000 2 6 REG 991 LD R2 SP for parameter passing 1F055 DC01F102 992 CALL PUTCHARS send them out 1F056 41168802 2 BASE 993 PAR R2,FILETYPE where the chars to send are 1F057 40440004 IMM 994 PARVL CPW a whole word of chars 1F058 19440001 5 IMM 995 ADD R5 1 move to the next field 1F059 65440020 5 IMM 996 CPR R5 32 are we done yet? 1F05A FE09F04F 997 JLT CCBLOOP if not then keep going 998 * \ / 999 0001F05B 1000 NOCCB LABEL 1F05B 19C40001 7 IMM 1001 ADD R7 1 indicate success 0001F05C 1002 RAFERR LABEL 1F05C 5D1F8004 6 STAK 1003 LEAVE POP 1004 * --- 1005 0001F05D 1006 SENDERR LABEL 1F05D 6005EE3E 0 IMM 1007 LD R0 ADR ERM563 "File went bad...." 1F05E DC41B88A 1008 CALLNP OUT bitch a bit 1F05F FE0FF05C 1009 JMP RAFERR 1010 * --- 1011 1012 END of SENDRAF subroutine 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 478 (RDUTRANSFER) F 33 Sendfile/Receivefile Parameter Processor 1014 1015 ********************************************************************************** 1016 * * 1017 * RECEIVESAF * 1018 * * 1019 * This is where a SAF is actually received and written to * 1020 * a file on the host machine. The algorithm is: * 1021 * - Send how much is already here (4 chars) * 1022 * - LOOP * 1023 * - Receive record type, 0 => normal text, 1 => text with forms * 1024 * 0FF => file done (EXIT LOOP) * 1025 * - Receive record size (4 chars) * 1026 * - Receive record * 1027 * Call: * 1028 * CALLNP RECEIVESAF * 1029 * JMP something undesirable happened * 1030 * * 1031 * Eats R0:R4 * 1032 * * 1033 ********************************************************************************** 1034 1035 BLOCK RECEIVESAF subroutine 1036 1037 ENTRY RECEIVESAF 1038 1039 BEGFRAME 00178801 6 BASE 1040 TYPEOFREC BSS 1 type of record (1 => text forms) 00178802 6 BASE 1041 RECSIZE BSS 1 record size 00178803 6 BASE 1042 PERCENTCNT BSS 1 bytes to do until percent tell time 1043 ENDFRAME 1044 1F060 DD5F8004 6 STAK 1045 RECEIVESAF ENTRNP PUSH 1F061 DC01F102 1046 CALL PUTCHARS send amount already done 1F062 4101842E 1047 PAR BYTESDONE how much is already done 1F063 40440004 IMM 1048 PARVL CPW one word worth 1F064 DC41F175 1049 CALLNP PROT2FLUSH make sure it all goes 1050 * \ / 1051 0001F065 1052 DOPERCENT LABEL 1F065 6001842E 0 1053 LD R0 BYTESDONE 1F066 18040800 0 IMM 1054 ADD R0 WPP*CPW/2 add on half a page 1F067 E4178803 0 6 BASE 1055 ST R0 SP,PERCENTCNT set when to tell percent 1F068 DC41F0E0 1056 CALLNP PERCENTDONE say how far we are 1057 * \ / 1058 0001F069 1059 RCVSAFLOOP LABEL 1F069 DC41F1AA 1060 CALLNP PROT2GET get a char 1F06A 640400FF 0 IMM 1061 CPR R0 EODMARK are we done 1F06B FE03F080 1062 JEQ FINISHED if so then leave 1F06C E4178801 0 6 BASE 1063 ST R0 SP,TYPEOFREC save the record type 1064 1F06D DC01F17A 1065 CALL GETCHARS pick up the file size 1F06E 40440004 IMM 1066 PARVL CPW whole word 1F06F 38978802 2 6 BASE 1067 LEA R2 SP,RECSIZE R2 -> where we want this 1F070 60440004 1 IMM 1068 LD R1 CPW how much 1F071 FE400000 1069 CMOVE put it there 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 479 (RDUTRANSFER) F 33 Sendfile/Receivefile Parameter Processor 1070 1F072 60178802 0 6 BASE 1071 LD R0 SP,RECSIZE pick up the size of the record 1F073 DC01F17A 1072 CALL GETCHARS time to get the record 1F074 40520000 0 REG 1073 PARVL R0 the record size 1074 1F075 60920000 2 0 REG 1075 LD R2 R0 R2 -> beginning of record 1F076 60578802 1 6 BASE 1076 LD R1 SP,RECSIZE how much there is 1F077 9841842E 1 1077 ADDM R1 BYTESDONE keep track of how much we have done 1F078 60040040 0 IMM 1078 LD R0 FRWRITE we want to write it out 1F079 18178801 0 6 BASE 1079 ADD R0 SP,TYPEOFREC add in type in case we have text forms 1F07A 08818400 1080 FREQ SENDUNIT write the sucker 1F07B FA09F081 0 1081 JLTZ R0 WENTBAD if we could not write, then trouble 1082 * \ / 1083 1F07C 6001842E 0 1084 LD R0 BYTESDONE how far we are 1F07D 64178803 0 6 BASE 1085 CPR R0 SP,PERCENTCNT time to tell the percentage? 1F07E FE09F069 1086 JLT RCVSAFLOOP if not then keep on going 1F07F FE0FF065 1087 JMP DOPERCENT time to do percents 1088 * --- 1089 1090 0001F080 1091 FINISHED LABEL 1F080 19C40001 7 IMM 1092 ADD R7 1 indicate success 0001F081 1093 WENTBAD LABEL 1F081 5D1F8004 6 STAK 1094 LEAVE POP 1095 * --- 1096 1097 END of RECEIVESAF subroutine 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 480 (RDUTRANSFER) F 33 Sendfile/Receivefile Parameter Processor 1099 1100 ********************************************************************************** 1101 * * 1102 * RECEIVERAF * 1103 * * 1104 * We end up here if we have a RAF or code file to * 1105 * receive (bummer). The algorithm is: * 1106 * - Send first page number (4 chars) * 1107 * - LOOP * 1108 * -Receive protected status (1 char) * 1109 * 0 => not protected page * 1110 * 1 => protected page * 1111 * 0FF=> end of file (exit loop) * 1112 * - IF code file then receive 32 words (4 chars) of CCB info. * 1113 * * 1114 * Call: * 1115 * R0 = filetype * 1116 * CALLNP RECEIVERAF * 1117 * JMP error * 1118 * * 1119 * Eats R0:R4 * 1120 * * 1121 ********************************************************************************** 1122 1123 BLOCK RECEIVERAF subroutine 1124 1125 ENTRY RECEIVERAF 1126 1127 BEGFRAME 00178801 6 BASE 1128 OURTYPE BSS 1 type of file 00178802 6 BASE 1129 PROTECTED BSS 1 protected status of the word 00178803 6 BASE 1130 BLOCKNUM BSS 1 block number 1131 ENDFRAME 1132 1F082 DD5F8004 6 STAK 1133 RECEIVERAF ENTRNP PUSH 1F083 E4178801 0 6 BASE 1134 ST R0 SP,OURTYPE save our type 1F084 DC01F102 1135 CALL PUTCHARS send the starting page 1F085 4101842E 1136 PAR BYTESDONE 1F086 40440004 IMM 1137 PARVL CPW 1F087 DC41F175 1138 CALLNP PROT2FLUSH make sure it all goes 1139 * \ / 1140 0001F088 1141 RCVRAFLOOP LABEL 1F088 DC41F1AA 1142 CALLNP PROT2GET pick up a character 1F089 640400FF 0 IMM 1143 CPR R0 EODMARK is it the end of file marker 1F08A FE03F0A7 1144 JEQ RAFISDONE if so then finish things up 1F08B E4178802 0 6 BASE 1145 ST R0 SP,PROTECTED save protected status 1F08C DC41F0E0 1146 CALLNP PERCENTDONE say how far we are 1147 1F08D DC01F17A 1148 CALL GETCHARS pick up the block number 1F08E 40440004 IMM 1149 PARVL CPW whole word 1F08F 38978803 2 6 BASE 1150 LEA R2 SP,BLOCKNUM where we want it 1F090 60440004 1 IMM 1151 LD R1 CPW 1F091 FE400000 1152 CMOVE 1F092 60578803 1 6 BASE 1153 LD R1 SP,BLOCKNUM get the next block number 1F093 1C441000 1 IMM 1154 MUL R1 CPW*WPP turn into a character count 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 481 (RDUTRANSFER) F 33 Sendfile/Receivefile Parameter Processor 1F094 60040090 0 IMM 1155 LD R0 FRPOSITION want to set RAF pointers to it 1F095 08818400 1156 FREQ SENDUNIT 1F096 FA09F0B9 0 1157 JLTZ R0 RAFRCVERR if things went bad 1158 1F097 DC01F17A 1159 CALL GETCHARS let's get the block 1F098 40441000 IMM 1160 PARVL WPP*CPW whole page worth 1F099 60920000 2 0 REG 1161 LD R2 R0 R2 -> beginning of page to write 1F09A 60040040 0 IMM 1162 LD R0 FRWRITE 1F09B 60441000 1 IMM 1163 LD R1 CPW*WPP how much to write 1F09C 9841842E 1 1164 ADDM R1 BYTESDONE keep track of how much is done 1F09D 08818400 1165 FREQ SENDUNIT do it 1F09E FA09F0B9 0 1166 JLTZ R0 RAFRCVERR jump if problems 1167 1F09F 60040003 0 IMM 1168 LD R0 CODETYPE 1F0A0 64178801 0 6 BASE 1169 CPR R0 SP,OURTYPE our we receiving a code file? 1F0A1 FE0DF088 1170 JNE RCVRAFLOOP if so then set the protected status 1171 * \ / 1172 1F0A2 60040097 0 IMM 1173 LD R0 FRPGPROTS want to set the protected status 1F0A3 60578803 1 6 BASE 1174 LD R1 SP,BLOCKNUM the page number 1F0A4 60978802 2 6 BASE 1175 LD R2 SP,PROTECTED what we want it set to 1F0A5 08818400 1176 FREQ SENDUNIT do it 1F0A6 FE0FF088 1177 JMP RCVRAFLOOP keep going 1178 * --- 1179 0001F0A7 1180 RAFISDONE LABEL 1F0A7 60040003 0 IMM 1181 LD R0 CODETYPE 1F0A8 64178801 0 6 BASE 1182 CPR R0 SP,OURTYPE our we receiving a code file? 1F0A9 FE0DF0B8 1183 JNE ALLDONENOW if so then get the CCB info 1184 1F0AA EC178801 6 BASE 1185 STZ SP,OURTYPE save on stack 0001F0AB 1186 CCBLOOP LABEL 1F0AB DC01F17A 1187 CALL GETCHARS pick up a word of CCB info 1F0AC 40440004 IMM 1188 PARVL CPW whole word 1F0AD 60440004 1 IMM 1189 LD R1 CPW 1F0AE 38978803 2 6 BASE 1190 LEA R2 SP,BLOCKNUM place to put the word 1F0AF FE400000 1191 CMOVE 1F0B0 60978803 2 6 BASE 1192 LD R2 SP,BLOCKNUM get the vaqlue for the field 1F0B1 60578801 1 6 BASE 1193 LD R1 SP,OURTYPE current position in CCB 1F0B2 6004019F 0 IMM 1194 LD R0 FRSETCCB time to set the field 1F0B3 08818400 1195 FREQ SENDUNIT 1F0B4 FA09F0B9 0 1196 JLTZ R0 RAFRCVERR oops 1197 1F0B5 BC178801 0 6 BASE 1198 INCL R0 SP,OURTYPE move to next CCB 1F0B6 64040020 0 IMM 1199 CPR R0 32 have we done them all? 1F0B7 FE09F0AB 1200 JLT CCBLOOP if not then keep going 1201 * \ / 1202 0001F0B8 1203 ALLDONENOW LABEL 1F0B8 19C40001 7 IMM 1204 ADD R7 1 indicate success 0001F0B9 1205 RAFRCVERR LABEL 1F0B9 5D1F8004 6 STAK 1206 LEAVE POP 1207 * --- 1208 1209 END of RECEIVERAF subroutine 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 482 (RDUTRANSFER) F 33 Sendfile/Receivefile Parameter Processor 1211 1212 ********************************************************************************** 1213 * * 1214 * XFERBRK * 1215 * * 1216 * File transfer break handling routine. We tell the * 1217 * user how much has been done and then ask him if he really * 1218 * wants to quit. If he wants out we clean things up and * 1219 * return through RDUERR. If he wants to keep going we * 1220 * simply execute a normal LEAVE. * 1221 * Call: * 1222 * CALLNP XFERBRK * 1223 * * 1224 * Eats R0:R3 * 1225 * * 1226 ********************************************************************************** 1227 1228 BLOCK XFERBRK subroutine 1229 1230 ENTRY XFERBRK 1231 1232 BEGFRAME 1233 ENDFRAME 1234 1F0BA 2A53686F 1235 QUITMESS TEXTZ "*Should file transfer be aborted? " 00000022 ABS 1236 QUITMESSL EQU 34 1237 1F0C3 DD5F8001 6 STAK 1238 XFERBRK ENTRNP PUSH 1F0C4 DC41F0E0 1239 CALLNP PERCENTDONE tell how far we are 1F0C5 DC41B8B8 1240 CALLNP OUTCRLF don't wipe out our line 1241 * \ / 1242 0001F0C6 1243 ASKAGAIN LABEL 1F0C6 60040041 0 IMM 1244 LD R0 FRWRITETF do a write with text forms 1F0C7 60440022 1 IMM 1245 LD R1 QUITMESSL how much we have to say 1F0C8 6085F0BA 2 IMM 1246 LD R2 ADR QUITMESS where it is 1F0C9 DC41CCC7 1247 CALLNP SAVEEVENT save for the logger 1F0CA 088400CA IMM 1248 FREQ LUNAOUT send to output unit 1F0CB 6241AA4B 12 1249 LD2 R1 EVENTLEN set up for the logger 1F0CC DC41CC3B 1250 CALLNP LOGWRITETF log this 1251 1F0CD DC41B3B6 1252 CALLNP READLINE wait for a reponse 1F0CE DC41B33C 1253 CALLNP FETCHAP pick up the response 1F0CF F2AFF0C6 2 1254 JBF R2/TALPH ASKAGAIN we want a proper reply 1255 * \ / 1256 1F0D0 DC41B8B8 1257 CALLNP OUTCRLF don't wipe out our line 1F0D1 DC41B45D 1258 CALLNP ONOFFGET was it yes or no? 1F0D2 FA0DF0C6 0 1259 JNEZ R0 ASKAGAIN damn it, answer us 1F0D3 FA4DF0D5 1 1260 JNEZ R1 WANTSTODIE has a death wish 1F0D4 5D1F8001 6 STAK 1261 LEAVE POP 1262 * --- 1263 0001F0D5 1264 WANTSTODIE LABEL 1F0D5 DC41F0F8 1265 CALLNP XFERTIDY clean things up 1F0D6 6005EE47 0 IMM 1266 LD R0 ADR ERM564 "File transfer aborted" 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 483 (RDUTRANSFER) F 33 Sendfile/Receivefile Parameter Processor 1F0D7 FE0FBE35 1267 JMP RDUERR bail out!! 1268 * --- 1269 1270 END of XFERBRK subroutine 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 484 (RDUTRANSFER) F 33 Sendfile/Receivefile Parameter Processor 1272 1273 ********************************************************************************** 1274 * * 1275 * PERCENTDONE * 1276 * * 1277 * Simply tells the user the percentage of the transfer * 1278 * that has been done. * 1279 * Call: * 1280 * BYTESDONE = number of bytes done * 1281 * FILESIZE = number of bytes in file * 1282 * CALLNP PERCENTDONE * 1283 * * 1284 * Eats R0:R3 * 1285 * * 1286 ********************************************************************************** 1287 1288 BLOCK PERCENTDONE subroutine 1289 1290 ENTRY PERCENTDONE 1291 1292 BEGFRAME 1293 ENDFRAME 1294 1F0D8 25206F66 1295 PERCNTMESS TEXTZ "% of file transfer completed." 1296 1F0E0 DD5F8001 6 STAK 1297 PERCENTDONE ENTRNP PUSH 1F0E1 DC41B86F 1298 CALLNP BLANKOUT clean the output buffer 1F0E2 6041842D 1 1299 LD R1 FILESIZE size of file 1F0E3 60040000 0 IMM 1300 LD R0 0 assume nothing 1F0E4 FA43F0E8 1 1301 JEQZ R1 NONEHERE jump if file size is not set 1F0E5 6001842E 0 1302 LD R0 BYTESDONE get how much we have moved 1F0E6 1C040064 0 IMM 1303 MUL R0 100 convert for percentage 1F0E7 14124000 0 1 REG 1304 DIV R0 R1 determine the percent done 0001F0E8 1305 NONEHERE LABEL 1F0E8 E401A8ED 0 1306 ST R0 VALUE 1F0E9 60C40000 3 IMM 1307 LD R3 0 start at first of buffer 1F0EA 6004002B 0 IMM 1308 LD R0 "+" forms control char (overprint) 1F0EB E411AC01 0 @ 1309 ST R0 @OBPT put at first of buffer 1F0EC 60C40003 3 IMM 1310 LD R3 3 leave a few spaces 1F0ED DC41B62D 1311 CALLNP DECOUT put in output line 1F0EE 6005F0D8 0 IMM 1312 LD R0 ADR PERCNTMESS "% of file transfer completed." 1F0EF DC41B87B 1313 CALLNP MESSMOVE 1F0F0 60040040 0 IMM 1314 LD R0 FRWRITE fake out the logger 1F0F1 6052C000 1 3 REG 1315 LD R1 R3 how much we have to say 1F0F2 6085A818 2 IMM 1316 LD R2 ADR OBUFF where it is 1F0F3 DC41CCC7 1317 CALLNP SAVEEVENT save for the logger 1F0F4 60040041 0 IMM 1318 LD R0 FRWRITETF do a write with text forms 1F0F5 088400CA IMM 1319 FREQ LUNAOUT send to output unit 1F0F6 DC41CCB3 1320 CALLNP LOGIT now log it 1F0F7 5D1F8001 6 STAK 1321 LEAVE POP 1322 * --- 1323 1324 END of PERCENTDONE subroutine 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 485 (RDUTRANSFER) F 33 Sendfile/Receivefile Parameter Processor 1326 1327 ********************************************************************************** 1328 * * 1329 * XFERTIDY * 1330 * * 1331 * Cleans up from the file transfer. Break handling * 1332 * is disabled, local file is closed, SHIPBPT is * 1333 * restored to point to CBUFF, XFERFLAG is turned off. * 1334 * Call: * 1335 * CALLNP XFERTIDY * 1336 * * 1337 * Eats R0:R1 * 1338 * * 1339 ********************************************************************************** 1340 1341 BLOCK XFERTIDY subroutine 1342 1343 ENTRY XFERTIDY 1344 1345 BEGFRAME 1346 ENDFRAME 1347 1F0F8 DD5F8001 6 STAK 1348 XFERTIDY ENTRNP PUSH 1F0F9 6001AC03 0 1349 LD R0 CBPT get pointer to normal i/o processor 1F0FA E401A884 0 1350 ST R0 SHIPBPT set up for use 1F0FB EC01A8D9 1351 STZ XFERFLAG no longer transferring files 1F0FC 5C018401 1352 CMZ SENDOPEN see if we opened the unit 1F0FD FE09F100 1353 JLT DONTCLOSE 1F0FE 60040060 0 IMM 1354 LD R0 FRCLOSE clean up after ourselves 1F0FF 08818400 1355 FREQ SENDUNIT 1356 * \ / 1357 0001F100 1358 DONTCLOSE LABEL 1F100 DC41F7CA 1359 CALLNP SIMNOBRKS diable break processing 1F101 5D1F8001 6 STAK 1360 LEAVE POP 1361 * --- 1362 1363 END of XFERTIDY subroutine 1364 1365 INPUT PROTOCOL2 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 486 (PROTOCOL2)R) F 35 Protocol Level 2 Subroutines 3 4 BLOCK Protocol level 2 routines 5 6 ENTRY PUTCHARS puts characters on com line 7 ENTRY PROT2SEND send one character 8 ENTRY PROT2FLUSH make sure all characters get sent 9 ENTRY GETCHARS gets characters from com line 10 ENTRY PROT2GET send one character 11 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 487 (PROTOCOL2)R) F 35 Protocol Level 2 Subroutines 13 14 ********************************************************************************** 15 * * 16 * PUTCHARS * 17 * * 18 * Sends characters out over the communication line. * 19 * Call: * 20 * CALL PUTCHARS * 21 * PAR characters to send * 22 * PARL * 23 * * 24 * Eats R0:R4 * 25 * * 26 ********************************************************************************** 27 28 BLOCK PUTCHARS subroutine 29 30 ENTRY PUTCHARS 31 32 BEGFRAME 00178801 6 BASE 33 PLACE BSS 1 current place in buffer 00178802 6 BASE 34 HOWMUCH BSS 1 00178803 6 BASE 35 WHERE BSS 1 where we are 36 ENDFRAME 37 1F102 DD1F8004 6 STAK 38 PUTCHARS ENTR PUSH 1F103 C1178803 6 BASE 39 STP SP,WHERE 1F104 C0578802 6 BASE 40 STPVL SP,HOWMUCH 1F105 D1578801 6 BASE 41 STMW SP,PLACE initialize 42 * \ / 43 0001F106 44 PUTLOOP LABEL 1F106 BC578801 1 6 BASE 45 INCL R1 SP,PLACE get next location to send 1F107 64578802 1 6 BASE 46 CPR R1 SP,HOWMUCH have we done enough 1F108 FE07F10D 47 JGE TIMETOQUIT 1F109 60D78803 3 6 BASE 48 LD R3 SP,WHERE R3 -> where chars are 1F10A DC01F10E 49 CALL PROT2SEND send a character 1F10B 405AC800 31 CACH 50 PARVL CACH R3,0(R1) the character to send 1F10C FE0FF106 51 JMP PUTLOOP keep on going 52 * --- 53 0001F10D 54 TIMETOQUIT LABEL 1F10D 5D1F8004 6 STAK 55 LEAVE POP 56 * --- 57 58 END of PUTCHARS subroutine 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 488 (PROTOCOL2)R) F 35 Protocol Level 2 Subroutines 60 61 ********************************************************************************** 62 * * 63 * PROT2SEND * 64 * * 65 * Here lies the utility routine for putting one (1) char * 66 * into a buffer to be sent (some fine day) to the remote machine * 67 * COMM program. We handle data compression by keeping track of * 68 * the current character sent, and the number of repeat occurrences * 69 * of it. If this reaches above a minimum level we pack them up * 70 * special. We also make sure the proper size messages get sent * 71 * and ship them to the sender (PROTOCOL 1) when ready, in the 6-bit * 72 * form required. * 73 * Call: * 74 * CALL PROT2SEND * 75 * PARVL * 76 * * 77 * Eats R0:R4 * 78 * * 79 ********************************************************************************** 80 81 BLOCK PROT2SEND subroutine 82 83 ENTRY PROT2SEND 84 85 BEGFRAME 00178801 6 BASE 86 CHAR BSS 1 temp for CHAR 87 ENDFRAME 88 1F10E DD1F8002 6 STAK 89 PROT2SEND ENTR PUSH 1F10F C0528000 2 REG 90 STPVL R2 keep the character in R2 1F110 6481845B 2 91 CPR R2 LASTCHAR is this a repeated character 1F111 FE03F127 92 JEQ MATCHED might want some compression 1F112 5C01845C 93 CMZ MATCHCNT do we already have some matched chars? 1F113 FE09F124 94 JLT FIRSTCHAR if nothing in LASTCHAR, put this in it 1F114 FE05F121 95 JGT DOREPEATS if more than one match, process repeats 96 * \ / 97 1F115 E081845B 2 98 EXCH R2 LASTCHAR get the last char and save this one 1F116 BC0184AA 0 99 INCL R0 PUTPOS get position in temp buffer 1F117 E4B184A8 2 0 @ 100 ST R2 @PUTBPT(R0) put into the buffer 101 1F118 1C040008 0 IMM 102 MUL R0 8 number of bits used by chars in PUTTMPBUF 1F119 18040004 0 IMM 103 ADD R0 4 so we will round up 1F11A 14040006 0 IMM 104 DIV R0 6 determine number of 6 bit chars 1F11B 180184AC 0 105 ADD R0 P1PUTPOS how many chars are already there 1F11C 640400F8 0 IMM 106 CPR R0 MAXTEXTLEN-2 is there room for more? 1F11D FE09F120 107 JLT PUTDONE then don't ship what we have 108 * \ / 109 1F11E DC41F12C 110 CALLNP PACKCHARS pack chars into actual sending buffer 1F11F DC41F230 111 CALLNP PROT1SEND send them now 112 * \ / 113 0001F120 114 PUTDONE LABEL 1F120 5D1F8002 6 STAK 115 LEAVE POP 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 489 (PROTOCOL2)R) F 35 Protocol Level 2 Subroutines 116 * --- 117 118 * Put repeated characters into P1 buffer. 0001F121 119 DOREPEATS LABEL 1F121 E4978801 2 6 BASE 120 ST R2 SP,CHAR 1F122 DC41F13F 121 CALLNP MOVEREPEAT move the repeats into the buffer 1F123 60978801 2 6 BASE 122 LD R2 SP,CHAR 123 * \ / 124 125 * Set the first character into LASTCHAR. 0001F124 126 FIRSTCHAR LABEL 1F124 E481845B 2 127 ST R2 LASTCHAR set LASTCHAR 1F125 EC01845C 128 STZ MATCHCNT say no matches yet 1F126 FE0FF120 129 JMP PUTDONE 130 * --- 131 132 133 * We matched the last character sent to us. 0001F127 134 MATCHED LABEL 1F127 BC01845C 0 135 INCL R0 MATCHCNT one more match 1F128 6404003F 0 IMM 136 CPR R0 MAXREPEAT is it time to pack and send this? 1F129 FE09F120 137 JLT PUTDONE if not, then keep going 1F12A DC41F13F 138 CALLNP MOVEREPEAT move this repeat group in 1F12B FE0FF120 139 JMP PUTDONE 140 * --- 141 142 END of PROT2SEND subroutine 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 490 (PROTOCOL2)R) F 35 Protocol Level 2 Subroutines 144 145 ********************************************************************************** 146 * * 147 * PACKCHARS * 148 * * 149 * PACKCHARS is called when it is time to move the * 150 * characters from the tempbuf into the buffer for PROT1. * 151 * First the characters must be broken into 6-bit chunks * 152 * then converted to printable characters, and finally * 153 * put into position in the buffer. * 154 * Call: * 155 * CALLNP PACKCHARS * 156 * PUTPOS = -1 * 157 * * 158 * Eats R0:R2 * 159 * * 160 ********************************************************************************** 161 162 BLOCK PACKCHARS subroutine 163 164 ENTRY PACKCHARS 165 166 BEGFRAME 00178801 6 BASE 167 COUNT BSS 1 168 ENDFRAME 169 1F12C DD5F8002 6 STAK 170 PACKCHARS ENTRNP PUSH 1F12D BC0184AA 0 171 INCL R0 PUTPOS R0 = number of chars 1F12E FA0BF13D 0 172 JLEZ R0 NOPACK jump if nothing to pack 1F12F 1C040008 0 IMM 173 MUL R0 8 R0 = number of bits 1F130 18040004 0 IMM 174 ADD R0 4 so we will round up 1F131 14040006 0 IMM 175 DIV R0 6 determine number of 6 bit chunks 1F132 E4178801 0 6 BASE 176 ST R0 SP,COUNT set our counter 177 * \ / 178 1F133 60840000 2 IMM 179 LD R2 0 index into PUTTMPBUF 1F134 604184AC 1 180 LD R1 P1PUTPOS where in P1 buffer to put chars 0001F135 181 PACKLOOP LABEL 1F135 603584A9 0 2 @ 182 LD R0 @PUT6BIT(R2) get a six bit chunk 1F136 18040020 0 IMM 183 ADD R0 LOWCHAR make the char big enough 1F137 E43384AB 0 1 @ 184 ST R0 @P1PBPT(R1) move into P1 buffer 1F138 18840001 2 IMM 185 ADD R2 1 move to next position 1F139 18440001 1 IMM 186 ADD R1 1 ..in both buffers 1F13A D0578801 6 BASE 187 DEC SP,COUNT one more char moved 1F13B FE05F135 188 JGT PACKLOOP keep going 189 * \ / 190 1F13C E44184AC 1 191 ST R1 P1PUTPOS save our place in the buffer 0001F13D 192 NOPACK LABEL 1F13D D14184AA 193 STMW PUTPOS set this back to the beginning 1F13E 5D1F8002 6 STAK 194 LEAVE POP 195 * --- 196 197 END of PACKCHARS subroutine 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 491 (PROTOCOL2)R) F 35 Protocol Level 2 Subroutines 199 200 ********************************************************************************** 201 * * 202 * MOVEREPEAT * 203 * * 204 * The COMM protocol provides for packing repeat characters * 205 * into 3 character blocks. We will pack from 5 to 63 characters * 206 * in each block thus saving character transmissions on repeats. * 207 * The 3 character block consists of a start character to indicate * 208 * this is a repeat count, the character being repeated, and the * 209 * repetition count. There is a special provision for repeated * 210 * BLANKs, NULLs, and ALLONES. They each get their own repeat char * 211 * indicator thus only requiring the start char and a count. * 212 * Also there are 4 different repeat start chars for the normal * 213 * case, this being dependant upon the high order 2 bits of the * 214 * char being repeated. * 215 * We also handle the case of less than 5 repeats. * 216 * * 217 * Call: * 218 * LASTCHAR = character being repeated * 219 * MATCHCNT = number of occurences * 220 * CALLNP MOVEREPEAT * 221 * MATCHCNT = -1 * 222 * * 223 * Eats R0:R4 * 224 * * 225 ********************************************************************************** 226 227 BLOCK MOVEREPEAT subroutine 228 229 ENTRY MOVEREPEAT 230 231 BEGFRAME 00178801 6 BASE 232 OURCHAR BSS 1 place to hold repeat char 00178802 6 BASE 233 COUNT BSS 1 number of repeats to do 234 ENDFRAME 235 1F13F DD5F8003 6 STAK 236 MOVEREPEAT ENTRNP PUSH 1F140 6041845C 1 237 LD R1 MATCHCNT how many repeats are there 1F141 FA49F161 1 238 JLTZ R1 REPEATDONE get out of here 1F142 64440004 1 IMM 239 CPR R1 MINREPEAT-1 is it above the minimum? 1F143 FE09F169 240 JLT NOTENUF oh well 241 * \ / 242 1F144 DC41F12C 243 CALLNP PACKCHARS move in characters from PUTTMPBUF 1F145 600184AC 0 244 LD R0 P1PUTPOS where we are in P1 buffer 1F146 640400F7 0 IMM 245 CPR R0 MAXTEXTLEN-3 we need room for 3 chars 1F147 FE09F149 246 JLT ROOMENUF don't start a new buffer if enough room 1F148 DC41F230 247 CALLNP PROT1SEND send the full buffer 248 * \ / 249 0001F149 250 ROOMENUF LABEL 1F149 604184AC 1 251 LD R1 P1PUTPOS get location for next char in buffer 1F14A 6081845B 2 252 LD R2 LASTCHAR get the repeat char 253 254 * Check for the special case bytes 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 492 (PROTOCOL2)R) F 35 Protocol Level 2 Subroutines 1F14B 64840020 2 IMM 255 CPR R2 BLANK 1F14C FE03F163 256 JEQ ITSABLANK 1F14D 64840000 2 IMM 257 CPR R2 NULL 1F14E FE03F165 258 JEQ ITSANULL 1F14F 648400FF 2 IMM 259 CPR R2 ALLONES 1F150 FE03F167 260 JEQ ITSALLONES 261 * \ / 262 263 * The repeated char is not one of these special cases. 1F151 60040064 0 IMM 264 LD R0 REPEATCHAR get the repeat character 1F152 180AB020 0 2 CBM 265 ADD R0 R2/HIGH2BITS add the high order 2 bits to this 1F153 E43384AB 0 1 @ 266 ST R0 @P1PBPT(R1) put the char in the buffer 267 1F154 18440001 1 IMM 268 ADD R1 1 move buffer position forward 1F155 600AB460 0 2 CBM 269 LD R0 R2/LOW6BITS get the low order bits 1F156 18040020 0 IMM 270 ADD R0 LOWCHAR make sure it is high enough 271 0001F157 272 SPECREPEAT LABEL 1F157 E43384AB 0 1 @ 273 ST R0 @P1PBPT(R1) into the buffer we go 1F158 18440001 1 IMM 274 ADD R1 1 move buffer position forward 1F159 BC01845C 0 275 INCL R0 MATCHCNT need the number of matches 1F15A 18040020 0 IMM 276 ADD R0 LOWCHAR make into a printable char 1F15B E43384AB 0 1 @ 277 ST R0 @P1PBPT(R1) put into buffer 1F15C 18440001 1 IMM 278 ADD R1 1 move pointer forward 1F15D E44184AC 1 279 ST R1 P1PUTPOS save 280 1F15E 644400F8 1 IMM 281 CPR R1 MAXTEXTLEN-2 is there room for more? 1F15F FE09F161 282 JLT REPEATDONE then don't ship what we have 283 * \ / 284 1F160 DC41F230 285 CALLNP PROT1SEND send the full buffer 286 * \ / 287 0001F161 288 REPEATDONE LABEL 1F161 D141845C 289 STMW MATCHCNT 1F162 5D1F8003 6 STAK 290 LEAVE POP 291 * --- 292 293 * The following labels are for special case repeat characters. 0001F163 294 ITSABLANK LABEL 1F163 60040061 0 IMM 295 LD R0 REPEATBLNK white space 1F164 FE0FF157 296 JMP SPECREPEAT 297 * --- 298 0001F165 299 ITSANULL LABEL 1F165 60040062 0 IMM 300 LD R0 REPEATNULL zero bits 1F166 FE0FF157 301 JMP SPECREPEAT 302 * --- 303 0001F167 304 ITSALLONES LABEL 1F167 60040063 0 IMM 305 LD R0 REPEATONES one bits 1F168 FE0FF157 306 JMP SPECREPEAT 307 * --- 308 309 ********************************************************************************** 310 * * 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 493 (PROTOCOL2)R) F 35 Protocol Level 2 Subroutines 311 * There are not enough repetitions of the repeated character * 312 * to compact them so just put them in as normal chars. We must * 313 * fake out the PROT2SEND routine or else it will just put our * 314 * characters back into the repeat count and we will loop * 315 * forever. * 316 * * 317 ********************************************************************************** 318 0001F169 319 NOTENUF LABEL 1F169 6081845B 2 320 LD R2 LASTCHAR get the repeat char 1F16A E4978801 2 6 BASE 321 ST R2 SP,OURCHAR save it 1F16B E4578802 1 6 BASE 322 ST R1 SP,COUNT how many to put in 1F16C EC01845C 323 STZ MATCHCNT 324 * \ / 325 0001F16D 326 NOTENUFX LABEL 1F16D 18840001 2 IMM 327 ADD R2 1 make a different character 1F16E DC01F10E 328 CALL PROT2SEND fake like we are sending a char 1F16F 40528000 2 REG 329 PARVL R2 it will put in LASTCHAR 1F170 D0578802 6 BASE 330 DEC SP,COUNT one more char put in 1F171 FE09F161 331 JLT REPEATDONE quit when it goes negative 1F172 60978801 2 6 BASE 332 LD R2 SP,OURCHAR get the char we want 1F173 E481845B 2 333 ST R2 LASTCHAR make this it 1F174 FE0FF16D 334 JMP NOTENUFX 335 * --- 336 337 END of MOVEREPEAT subroutine 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 494 (PROTOCOL2)R) F 35 Protocol Level 2 Subroutines 339 340 ********************************************************************************** 341 * * 342 * PROT2FLUSH * 343 * * 344 * This subroutine ensures that all the characters queued up * 345 * to send to the remote machine get sent. * 346 * Call: * 347 * CALLNP PROT2FLUSH * 348 * * 349 * Eats R0:R4 * 350 * * 351 ********************************************************************************** 352 353 BLOCK PROT2FLUSH subroutine 354 355 ENTRY PROT2FLUSH 356 357 BEGFRAME 358 ENDFRAME 359 1F175 DD5F8001 6 STAK 360 PROT2FLUSH ENTRNP PUSH 1F176 DC41F13F 361 CALLNP MOVEREPEAT move in any repeat characters 362 * This will make sure LASTCHAR gets put 363 * into buffer before packing. 1F177 DC41F12C 364 CALLNP PACKCHARS move remaining chars into message buffer 1F178 DC41F230 365 CALLNP PROT1SEND make sure they all went 1F179 5D1F8001 6 STAK 366 LEAVE POP 367 * --- 368 369 END of PROT2FLUSH subroutine 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 495 (PROTOCOL2)R) F 35 Protocol Level 2 Subroutines 371 372 ********************************************************************************** 373 * * 374 * Following are the routines to get characters from the * 375 * messages sent by the remote system. There are 3 flavors * 376 * of routines: get one char, get x chars, get a block of chars. * 377 * * 378 * PROT2GET will return exactly one character to the user. * 379 * GETCHARS will return a pointer to a contiguous string * 380 * of x characters (x is passed as a parameter to this routine). * 381 * * 382 * The buffer usage for this is as follows: * 383 * GETTMPBUF is normally used for unpacking messages into. GETMAX * 384 * contains the number of unpacked characters in this buffer and * 385 * GETCNT is an index to the last used character in the buffer. * 386 * REPEATCHR contains a repeat character iff REPEATCNT > 0. This * 387 * repeated character logically follows the exhaustion of GETTMPBUF. * 388 * If GETCHARS receives a request for more characters than are * 389 * currently in GETTMPBUF the contents of GETTMPBUF are moved into * 390 * SAFBUF, REPEATCHR is unpacked into SAFBUF and further unpacking * 391 * goes into SAFBUF. Any extra characters that get unpacked are * 392 * then moved into GETTMPBUF. * 393 * * 394 ********************************************************************************** 395 396 ********************************************************************************** 397 * * 398 * GETCHARS * 399 * * 400 * This subroutine will make sure there are enough * 401 * characters to satisfy the caller, then return a pointer * 402 * to the start of the first valid character the caller * 403 * can have. The characters are then logically removed * 404 * from the buffer of received characters. * 405 * Call: * 406 * CALL GETCHARS * 407 * PARVL * 408 * R0 -> first of the characters * 409 * * 410 * Eats R0:R3 * 411 * * 412 ********************************************************************************** 413 414 BLOCK GETCHARS subroutine 415 416 ENTRY GETCHARS 417 418 BEGFRAME 00178801 6 BASE 419 COUNT BSS 1 number of requested characters 00178802 6 BASE 420 HOWMUCH BSS 1 how much we have done 421 ENDFRAME 422 1F17A DD1F8003 6 STAK 423 GETCHARS ENTR PUSH 1F17B C0578801 6 BASE 424 STPVL SP,COUNT number of chars to get 425 426 * See if there are enough characters unpacked in the buffer. 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 496 (PROTOCOL2)R) F 35 Protocol Level 2 Subroutines 1F17C 604184F1 1 427 LD R1 GETPOS get the current position 1F17D 304184F0 1 428 RSB R1 GETCNT see how many are left 1F17E 64578801 1 6 BASE 429 CPR R1 SP,COUNT is there enough 1F17F FE09F185 430 JLT NOTENOUGH if not enough, send out for more 431 * \ / 432 1F180 604184F1 1 433 LD R1 GETPOS number of unpacked characters 1F181 383384EF 0 1 @ 434 LEA R0 @GETBPT(R1) make pointer to next position 1F182 18578801 1 6 BASE 435 ADD R1 SP,COUNT add in the amount we are taking 1F183 E44184F1 1 436 ST R1 GETPOS set the current position 0001F184 437 GOHOME LABEL 1F184 5D1F8003 6 STAK 438 LEAVE POP 439 * --- 440 0001F185 441 NOTENOUGH LABEL 1F185 600184F1 0 442 LD R0 GETPOS 1F186 54440000 1 IMM 443 MAX R1 0 make sure we have at least 0 chars 1F187 984184F1 1 444 ADDM R1 GETPOS make sure we keep this current 1F188 60D24000 3 1 REG 445 LD R3 R1 copy the number of chars so far 1F189 383184EF 0 0 @ 446 LEA R0 @GETBPT(R0) get pointer to position in buffer 1F18A 60818B2C 2 447 LD R2 SAFBPT where we will put the chars 1F18B FE400000 448 CMOVE move 'em in 449 * \ / 450 0001F18C 451 MORELOOP LABEL 1F18C 60018458 0 452 LD R0 REPEATCNT any repeated characters? 1F18D FA0BF196 0 453 JLEZ R0 NOREPEAT if not, don't unpack them 1F18E 60418459 1 454 LD R1 REPEATCHR 455 * \ / 456 0001F18F 457 UNREPEAT LABEL 1F18F E4568000 1 2 CACH 458 ST R1 CACH R2,0 store into buffer 1F190 D00A9F30 2 CBM 459 INC R2/NXTCHAR move to next character position 1F191 18C40001 3 IMM 460 ADD R3 1 one more char in there 1F192 64D78801 3 6 BASE 461 CPR R3 SP,COUNT enough already? 1F193 FE03F1A6 462 JEQ DONEREPEAT finish it up 1F194 FA23F18F 0 463 DRJ R0 UNREPEAT keep going 1F195 EC018458 464 STZ REPEATCNT say no more to repeat 465 * \ / 466 0001F196 467 NOREPEAT LABEL 1F196 E4D78802 3 6 BASE 468 ST R3 SP,HOWMUCH save how much we have done 1F197 DC41F1BB 469 CALLNP UNPACK unpack some more chars 1F198 60D78802 3 6 BASE 470 LD R3 SP,HOWMUCH remember how much we did 1F199 18D24000 3 1 REG 471 ADD R3 R1 add on for what we just did 1F19A 64D78801 3 6 BASE 472 CPR R3 SP,COUNT is there enough yet? 1F19B FE09F18C 473 JLT MORELOOP go back for more 474 * \ / 475 1F19C 60178801 0 6 BASE 476 LD R0 SP,COUNT get the amount wanted 1F19D 10D20000 3 0 REG 477 SUB R3 R0 determine the excess amount 1F19E 6052C000 1 3 REG 478 LD R1 R3 for CMOVE 1F19F E44184F0 1 479 ST R1 GETCNT save the count of characters 1F1A0 EC0184F1 480 STZ GETPOS reset the position to the beginning 1F1A1 38318B2C 0 0 @ 481 LEA R0 @SAFBPT(R0) R0 -> extra characters 1F1A2 608584B0 2 IMM 482 LD R2 ADR GETTMPBUF where we store the extras 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 497 (PROTOCOL2)R) F 35 Protocol Level 2 Subroutines 1F1A3 FE400000 483 CMOVE put them there 1F1A4 60018B2C 0 484 LD R0 SAFBPT point to our buffer 1F1A5 FE0FF184 485 JMP GOHOME 486 * --- 487 0001F1A6 488 DONEREPEAT LABEL 1F1A6 10040001 0 IMM 489 SUB R0 1 account for last one we took 1F1A7 E4018458 0 490 ST R0 REPEATCNT reset the count 1F1A8 60018B2C 0 491 LD R0 SAFBPT point to the start 1F1A9 FE0FF184 492 JMP GOHOME 493 * --- 494 495 END of GETCHARS subroutine 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 498 (PROTOCOL2)R) F 35 Protocol Level 2 Subroutines 497 498 ********************************************************************************** 499 * * 500 * PROT2GET * 501 * * 502 * PROT2GET returns the next character in the received * 503 * buffer. * 504 * Call: * 505 * CALLNP PROT2GET * 506 * R0 = * 507 * * 508 * Eats R0:R3 * 509 * * 510 ********************************************************************************** 511 512 BLOCK PROT2GET subroutine 513 514 ENTRY PROT2GET 515 516 BEGFRAME 517 ENDFRAME 518 1F1AA DD5F8001 6 STAK 519 PROT2GET ENTRNP PUSH 0001F1AB 520 HAVECHARS LABEL 1F1AB 600184F1 0 521 LD R0 GETPOS index into the buffer 1F1AC 640184F0 0 522 CPR R0 GETCNT beyond the end? 1F1AD FE07F1B1 523 JGE TRYREPEAT if not take one 1F1AE 603184EF 0 0 @ 524 LD R0 @GETBPT(R0) pick up a character 1F1AF D00184F1 525 INC GETPOS say we took 1 526 * \ / 527 0001F1B0 528 HAVEONE LABEL 1F1B0 5D1F8001 6 STAK 529 LEAVE POP 530 * --- 531 0001F1B1 532 TRYREPEAT LABEL 1F1B1 5C018458 533 CMZ REPEATCNT any repeats to use up? 1F1B2 FE0BF1B6 534 JLE NEEDCHARS if not then get some characters 1F1B3 60018459 0 535 LD R0 REPEATCHR use a repeat character 1F1B4 D0418458 536 DEC REPEATCNT say we took one 1F1B5 FE0FF1B0 537 JMP HAVEONE 538 * --- 539 0001F1B6 540 NEEDCHARS LABEL 1F1B6 608584B0 2 IMM 541 LD R2 ADR GETTMPBUF point to buffer to unpack into 1F1B7 DC41F1BB 542 CALLNP UNPACK and unpack the suckers 1F1B8 E44184F0 1 543 ST R1 GETCNT save the number of chars 1F1B9 EC0184F1 544 STZ GETPOS initialize our location in buffer 1F1BA FE0FF1AB 545 JMP HAVECHARS 546 * --- 547 548 END of PROT2GET subroutine 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 499 (PROTOCOL2)R) F 35 Protocol Level 2 Subroutines 550 551 ********************************************************************************** 552 * * 553 * UNPACK * 554 * * 555 * UNPACK unpacks messages from the remote machine. * 556 * It will unpack until either a repeat character is found * 557 * or the current message is exhausted. If a repeat character * 558 * is found REPEATCHR and REPEATCNT are set. * 559 * Call: * 560 * R2 -> buffer to unpack into * 561 * CALLNP UNPACK * 562 * R1 = number of chars unpacked * 563 * * 564 * Eats R0:R3 * 565 * * 566 ********************************************************************************** 567 568 BLOCK UNPACK subroutine 569 570 ENTRY UNPACK 571 572 BEGFRAME 00178801 6 BASE 573 CHARPLACE BSS 1 place to build a character 00178802 6 BASE 574 WHERE BSS 1 where to put string 575 ENDFRAME 576 1F1BB DD5F8003 6 STAK 577 UNPACK ENTRNP PUSH 1F1BC E4978802 2 6 BASE 578 ST R2 SP,WHERE save this 1F1BD 60C184AF 3 579 LD R3 P1GETPOS get location in P1GETBUF 1F1BE 64C184AE 3 580 CPR R3 P1GETCNT see if there are remaining chars 1F1BF FE09F1C2 581 JLT HAVESOME if so then don't get them 1F1C0 DC41F25E 582 CALLNP PROT1GET get some chars 1F1C1 60C40000 3 IMM 583 LD R3 0 start at the beginning 584 * \ / 585 0001F1C2 586 HAVESOME LABEL 1F1C2 60440000 1 IMM 587 LD R1 0 our character counter 588 * \ / 589 0001F1C3 590 UNPACKLOOP LABEL 1F1C3 603784AD 0 3 @ 591 LD R0 @P1GBPT(R3) get a character from message 1F1C4 6404005F 0 IMM 592 CPR R0 HIGHTEXT is it a normal text char? 1F1C5 FE05F1D8 593 JGT SPECCHAR no, it is special 1F1C6 64040020 0 IMM 594 CPR R0 LOWCHAR is it legal? 1F1C7 FE09F1D7 595 JLT TRASHCHAR ignore it if illegal character 1F1C8 10040020 0 IMM 596 SUB R0 LOWCHAR turn into a 6 bit character 1F1C9 E4338532 0 1 @ 597 ST R0 @UP6BITS(R1) put into buffer 1F1CA 18440001 1 IMM 598 ADD R1 1 another 6 bit chunk moved 1F1CB 18C40001 3 IMM 599 ADD R3 1 move up a character 1F1CC 64C184AE 3 600 CPR R3 P1GETCNT see if we have done them all 1F1CD FE09F1C3 601 JLT UNPACKLOOP continue onward 602 * \ / 603 0001F1CE 604 UNPACKDONE LABEL 1F1CE E4C184AF 3 605 ST R3 P1GETPOS save our place 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 500 (PROTOCOL2)R) F 35 Protocol Level 2 Subroutines 1F1CF 1C440006 1 IMM 606 MUL R1 6 convert to number of bits moved 1F1D0 604A41D0 1 1 CBM 607 LD R1 R1/DIVBY8 now we have a character count!! 1F1D1 E4578801 1 6 BASE 608 ST R1 SP,CHARPLACE save the count 1F1D2 60978802 2 6 BASE 609 LD R2 SP,WHERE 1F1D3 60018531 0 610 LD R0 UPBPT R0 -> where the unpacked chars are 1F1D4 FE400000 611 CMOVE put them where the user wants 1F1D5 60578801 1 6 BASE 612 LD R1 SP,CHARPLACE return the count 1F1D6 5D1F8003 6 STAK 613 LEAVE POP 614 * --- 615 0001F1D7 616 TRASHCHAR LABEL 1F1D7 FAE1F1C3 3 617 IRJ R3 UNPACKLOOP move up input pointer and keep going 618 * --- 619 0001F1D8 620 SPECCHAR LABEL 1F1D8 64040061 0 IMM 621 CPR R0 REPEATBLNK is it a repeated blank? 1F1D9 FE09F1D7 622 JLT TRASHCHAR if less than this it is invalid 1F1DA FE03F1EE 623 JEQ BLANKFOUND if so 1F1DB 64040062 0 IMM 624 CPR R0 REPEATNULL zero bits? 1F1DC FE03F1F0 625 JEQ NULLFOUND OK 1F1DD 64040063 0 IMM 626 CPR R0 REPEATONES one bits? 1F1DE FE03F1F2 627 JEQ ALLONESFND yep 1F1DF 64040067 0 IMM 628 CPR R0 REPEATCHAR+3 is it within the valid repeat char range 1F1E0 FE05F1D7 629 JGT TRASHCHAR if not then trash it 630 * \ / 631 1F1E1 10040064 0 IMM 632 SUB R0 REPEATCHAR pick out the high 2 bit's value 1F1E2 E409B021 0 6 ZBM 633 ST R0 SP,CHARPLACE/HIGH2BITS start building our word 1F1E3 18C40001 3 IMM 634 ADD R3 1 move to next input char 1F1E4 603784AD 0 3 @ 635 LD R0 @P1GBPT(R3) pick up the next character 1F1E5 10040020 0 IMM 636 SUB R0 LOWCHAR turn into a valid char 1F1E6 E409B461 0 6 ZBM 637 ST R0 SP,CHARPLACE/LOW6BITS finish building our char 1F1E7 60178801 0 6 BASE 638 LD R0 SP,CHARPLACE get the character 639 * \ / 640 0001F1E8 641 FINISHSPEC LABEL 1F1E8 E4018459 0 642 ST R0 REPEATCHR save the character 1F1E9 18C40001 3 IMM 643 ADD R3 1 move to the count character 1F1EA 603784AD 0 3 @ 644 LD R0 @P1GBPT(R3) pick up the count 1F1EB 10040020 0 IMM 645 SUB R0 LOWCHAR remove bias 1F1EC E4018458 0 646 ST R0 REPEATCNT save it 1F1ED FAE1F1CE 3 647 IRJ R3 UNPACKDONE 648 * --- 649 0001F1EE 650 BLANKFOUND LABEL 1F1EE 60040020 0 IMM 651 LD R0 BLANK 1F1EF FE0FF1E8 652 JMP FINISHSPEC finish processing 653 * --- 654 0001F1F0 655 NULLFOUND LABEL 1F1F0 60040000 0 IMM 656 LD R0 NULL 1F1F1 FE0FF1E8 657 JMP FINISHSPEC finish processing 658 * --- 659 0001F1F2 660 ALLONESFND LABEL 1F1F2 600400FF 0 IMM 661 LD R0 ALLONES 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 501 (PROTOCOL2)R) F 35 Protocol Level 2 Subroutines 1F1F3 FE0FF1E8 662 JMP FINISHSPEC finish processing 663 * --- 664 665 END of UNPACK subroutine 666 667 END of Protocol level 2 routines 1366 INPUT PROTOCOL1 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 502 (PROTOCOL1)R) F 36 Protocol Level 1 Subroutines 3 4 ********************************************************************************** 5 * * 6 * Protocol level 1 handles the actual sending of messages * 7 * between machines. The message header is constucted, the * 8 * checksum computed, and then the message is shipped. On the * 9 * receiving end message checksums are checked, enquiries, NAKs, * 10 * and ACKs are dealt with, and the entire message text is handed * 11 * up to level 2 (PROT2). We also deal with handing out buffers * 12 * to both the PROT2 send routine to build text messages in, and * 13 * the RDU interactive data gatherer to put received characters * 14 * into. * 15 * * 16 * Our connection with the RDU is as follows: * 17 * Sending messages to the remote machine we set SHIPBPT to * 18 * point to our buffer being sent, set CPI to indicate the number * 19 * of chars being sent, and rely on SHIPNOP to empty the buffer. * 20 * We must add a CR to the end of every message sent. * 21 * Receiving messages from the remote machine, RESPCHEK * 22 * will call RDUTOXFER when XFERFLAG is set and there are incoming * 23 * characters. When the a CR is found among the incoming characters * 24 * we put the buffer being filled into the finished queue and start * 25 * a new buffer. Also we don't start keeping characters until a * 26 * message start character has been received. * 27 * * 28 * We deal with the remote comm as follows: * 29 * - Every good message with text which we receive gets ACKed. * 30 * - Every message with text that is not the next expected * 31 * text message gets NAKed. * 32 * - Every message with a bad text checksum gets NAKed. * 33 * - Any other error causes us to send an ENQuire character. * 34 * - ACKs and NAKs both consist of a special character with * 35 * the last good message number added on. If this number * 36 * is out of range we send an ENQuire. * 37 * - A NAK causes us to send all messages beyond msg num. * 38 * - An ACK allows us to return message being ACKed buffer * 39 * to free message buffer list. * 40 * - If ENQuire we respond as follows: * 41 * - If NEW field <> NIL+, send ENQuire. * 42 * - IF = * 43 * THEN ACK last msg received * 44 * ELSE NAK last msg ACKed+1, = * 45 * last msg ACKed+1. * 46 * * 47 * Note that on every normal message going out (one containing * 48 * text) we set the ACK field to acknowledge the last text message * 49 * we received from the remote machine. Under this scheme the same * 50 * message can be ACKed more than once. We will only free the buffer * 51 * if the ACKed message is the first one in the queue. * 52 * * 53 ********************************************************************************** 54 55 BLOCK Protocol Level 1 routines 56 57 ENTRY SENDTERM 58 ENTRY RDUTOXFER 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 503 (PROTOCOL1)R) F 36 Protocol Level 1 Subroutines 59 ENTRY PROT1SEND 60 ENTRY PROT1GET 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 504 (PROTOCOL1)R) F 36 Protocol Level 1 Subroutines 62 63 ********************************************************************************** 64 * * 65 * SENDTERM * 66 * * 67 * Send characters to the through the interactive line * 68 * to the remote machine. Breaks are checked for in this * 69 * routine and if one came in we call XFERBRK to handle it. * 70 * Call: * 71 * CALL SENDTERM * 72 * PAR characters to send * 73 * PARVL how many to send * 74 * * 75 * Eats R0:R3 * 76 * * 77 ********************************************************************************** 78 79 BLOCK SENDTERM subroutine 80 81 ENTRY SENDTERM 82 83 BEGFRAME 84 ENDFRAME 85 1F1F4 DD1F8001 6 STAK 86 SENDTERM ENTR PUSH 1F1F5 C101A884 87 STP SHIPBPT where stuff is to be moved from 1F1F6 C041A911 88 STPVL CPI how much there is to move 89 1F1F7 D181A8E0 90 CLRT UBREAK did a break come in? 1F1F8 FE0DF200 91 JNE HANDLEIT if so see what to do 92 * \ / 93 0001F1F9 94 IGNOREBRK LABEL 1F1F9 D041A911 95 DEC CPI only want index to last char 0001F1FA 96 CLEANOUT LABEL 1F1FA DC41BC7E 97 CALLNP SHIPNOP send them off 1F1FB 5C01A911 98 CMZ CPI make sure sending buffer is clear 1F1FC FE07F1FA 99 JGE CLEANOUT if not then clean it out 1F1FD 5C01A912 100 CMZ CPO make sure sending buffer is clear 1F1FE FE07F1FA 101 JGE CLEANOUT if not then clean it out 102 * \ / 103 1F1FF 5D1F8001 6 STAK 104 LEAVE POP 105 * --- 106 0001F200 107 HANDLEIT LABEL 1F200 DC41F0C3 108 CALLNP XFERBRK go to common break processor 1F201 FE0FF1F9 109 JMP IGNOREBRK if user wants to continue 110 * --- 111 112 END of SENDTERM subroutine 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 505 (PROTOCOL1)R) F 36 Protocol Level 1 Subroutines 114 115 ********************************************************************************** 116 * * 117 * RDUTOXFER * 118 * * 119 * The RDU calls this routine when it has received some * 120 * characters from the remote machine and the flag is set * 121 * indicating we are in a file transfer. * 122 * Each character must be checked for a terminator (CR) * 123 * and if a terminator is found we end the current message, * 124 * set the length into the element, put the message element * 125 * onto the end of the received queue, and start a new message. * 126 * We don't start keeping characters for a message until * 127 * a start character is found. * 128 * Call: * 129 * R1 = number of chars (must be 1 or more) * 130 * R2 -> where they are * 131 * CALLNP RDUTOXFER * 132 * * 133 * Eats R0:R2 * 134 * * 135 ********************************************************************************** 136 137 BLOCK RDUTOXFER subroutine 138 139 ENTRY RDUTOXFER 140 141 BEGFRAME 00178801 6 BASE 142 COUNTER BSS 1 count of chars we are receiving 143 ENDFRAME 144 1F202 DD5F8002 6 STAK 145 RDUTOXFER ENTRNP PUSH 1F203 38968000 2 2 CACH 146 LEA R2 CACH R2,0 make into a character pointer 1F204 E4578801 1 6 BASE 147 ST R1 SP,COUNTER save number of chars 0001F205 148 FROMTHETOP LABEL 1F205 5C018465 149 CMZ STARTFLAG has a start character been sighted? 1F206 FE03F210 150 JEQ NEEDSTART if not, wait for it 151 * \ / 152 0001F207 153 RTXLOOP LABEL 1F207 BC418535 1 154 INCL R1 RCVBUFPOS get position in buffer 1F208 60168400 0 2 @R 155 LD R0 @R2 pick up a character 1F209 D0928000 2 REG 156 INCP R2 bump up pointer to incoming chars 1F20A 6404000D 0 IMM 157 CPR R0 MSGENDCHAR is it the terminator? 1F20B FE03F219 158 JEQ ENDTHISBUF if so start a new message buffer 1F20C E4338533 0 1 @ 159 ST R0 @RCVBPT(R1) put into our buffer 1F20D D0578801 6 BASE 160 DEC SP,COUNTER one less incoming char 1F20E FE05F207 161 JGT RTXLOOP keep going until we reach zero 162 * \ / 163 0001F20F 164 GETOUT LABEL 1F20F 5D1F8002 6 STAK 165 LEAVE POP 166 * --- 167 0001F210 168 NEEDSTART LABEL 1F210 60168400 0 2 @R 169 LD R0 @R2 pick up a character 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 506 (PROTOCOL1)R) F 36 Protocol Level 1 Subroutines 1F211 6404007E 0 IMM 170 CPR R0 MSGSTARTCH is it the start char? 1F212 FE0DF215 171 JNE NOTSTART if so then get going 1F213 EDC18465 172 STW STARTFLAG 1F214 FE0FF207 173 JMP RTXLOOP start packing a message 174 * --- 175 0001F215 176 NOTSTART LABEL 1F215 D0928000 2 REG 177 INCP R2 move to next character 1F216 D0578801 6 BASE 178 DEC SP,COUNTER one more character processed 1F217 FE05F210 179 JGT NEEDSTART keep looking 1F218 FE0FF20F 180 JMP GETOUT or else get out of here 181 * --- 182 0001F219 183 ENDTHISBUF LABEL 1F219 60018534 0 184 LD R0 RCVMSGBUF R0 -> beginning of the buffer 1F21A 10440004 1 IMM 185 SUB R1 MSGHDRLEN subtract the header size 1F21B E44800A0 1 0 ZBM 186 ST R1 R0,MSGLEN save the length of the text 1F21C EC081C10 0 ZBM 187 STZ R0,MSGPROC message has not been processed 1F21D 60418464 1 188 LD R1 MSGRCVEND R1 -> end of incoming msg list 1F21E E4085F10 0 1 ZBM 189 ST R0 R1,MSGLINK link ours in 1F21F E4018464 0 190 ST R0 MSGRCVEND put in pointer to the end 191 192 * Set up a new receiving buffer. 1F220 EC018465 193 STZ STARTFLAG no start char yet 1F221 D1418535 194 STMW RCVBUFPOS reset our position in the buffer 1F222 60018467 0 195 LD R0 MSGRCVLIST R0 -> first message buffer on free list 1F223 FA31F22D 0 196 JZA R0 DIEYOUPIG cannot run out of buffers 1F224 60481F10 1 0 ZBM 197 LD R1 R0,MSGLINK R1 -> next message buffer in list 1F225 E4418467 1 198 ST R1 MSGRCVLIST keep list current 1F226 EC081F10 0 ZBM 199 STZ R0,MSGLINK wipe out this link 1F227 E4018534 0 200 ST R0 RCVMSGBUF save pointer to buffer we grabbed 1F228 38160004 0 0 CACH 201 LEA R0 R0,MSGSTART R0 -> where message should start 1F229 E4018533 0 202 ST R0 RCVBPT save character pointer 1F22A D0578801 6 BASE 203 DEC SP,COUNTER one less incoming char 1F22B FE0BF20F 204 JLE GETOUT if out of chars, then leave 1F22C FE0FF205 205 JMP FROMTHETOP take it... 206 * --- 207 0001F22D 208 DIEYOUPIG LABEL 1F22D DC41F0F8 209 CALLNP XFERTIDY clean things up 1F22E 6005EE4D 0 IMM 210 LD R0 ADR ERM565 "Out of buffer..." 1F22F FE0FBE35 211 JMP RDUERR get out of here 212 * --- 213 214 END of RDUTOXFER subroutine 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 507 (PROTOCOL1)R) F 36 Protocol Level 1 Subroutines 216 217 ********************************************************************************** 218 * * 219 * PROT1SEND * 220 * * 221 * Sends the current message to the remote machine and * 222 * sets pointers to buffer for next message to be built in. * 223 * It is expected that level 2 has packed the characters in * 224 * the text into the required format. * 225 * PROT2MSG -> message element given to protocol 2 * 226 * P1PBPT -> first character in message text * 227 * P1PUTPOS = number of characters in buffer * 228 * Call: * 229 * CALLNP PROT1SEND * 230 * Returns: * 231 * P1PBPT -> start of text for next message * 232 * P1PUTPOS = index to first open location in message text * 233 * PROt2MSG -> beginning of message element * 234 * * 235 * Eats R0:R4 * 236 * * 237 ********************************************************************************** 238 239 BLOCK PROT1SEND subroutine 240 241 ENTRY PROT1SEND 242 243 BEGFRAME 244 ENDFRAME 245 1F230 DD5F8001 6 STAK 246 PROT1SEND ENTRNP PUSH 1F231 6101845A 4 247 LD R4 PROT2MSG R4 -> start of message element 248 249 * Pick up the length 1F232 600184AC 0 250 LD R0 P1PUTPOS number of text chars 1F233 E40900A0 0 4 ZBM 251 ST R0 R4,MSGLEN save this 252 253 * Make the header 1F234 6004007E 0 IMM 254 LD R0 MSGSTARTCH our start indicator 1F235 E4170004 0 4 CACH 255 ST R0 R4,MSGSTART in it goes 256 1F236 6001845E 0 257 LD R0 LASTWEACK get last message we ACKed 1F237 18040040 0 IMM 258 ADD R0 MSGACKACK turn into a complete ACK char 1F238 E4170005 0 4 CACH 259 ST R0 R4,MSGACK put in the ACK field 260 1F239 BC01845F 0 261 INCL R0 LASTSENT get next message number to send 1F23A 64040007 0 IMM 262 CPR R0 MAXSENTMSG is it within range? 1F23B FE0BF23E 263 JLE GOODNUM if so keep going 1F23C EC01845F 264 STZ LASTSENT reset it 1F23D 60040000 0 IMM 265 LD R0 0 0001F23E 266 GOODNUM LABEL 1F23E E4091440 0 4 ZBM 267 ST R0 R4,MSGNUM so we will remember 1F23F 18040040 0 IMM 268 ADD R0 MSGNEWTEXT add in the new text char 1F240 E4170006 0 4 CACH 269 ST R0 R4,MSGNEW set the new text field 270 1F241 DC41F308 271 CALLNP HDRCKSUM compute checksum for header 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 508 (PROTOCOL1)R) F 36 Protocol Level 1 Subroutines 1F242 E4170007 0 4 CACH 272 ST R0 R4,MSGHDRCKSM put in the checksum 273 274 * Add on the text checksum 1F243 DC41F2F1 275 CALLNP CHECKSUMIT checksum the text portion 1F244 608184AC 2 276 LD R2 P1PUTPOS get number of chars in text 1F245 E41B1008 0 42 CACH 277 ST R0 R4,MSGTEXT(R2) put first char of checksum onto message 1F246 E45B1009 1 42 CACH 278 ST R1 R4,MSGTEXT(1)(R2) put second char of checksum onto message 279 280 * Ship it 1F247 6004000D 0 IMM 281 LD R0 MSGENDCHAR terminator for the message 1F248 E41B100A 0 42 CACH 282 ST R0 R4,MSGTEXT(2)(R2) tack onto the end 1F249 18840007 2 IMM 283 ADD R2 MSGHDRLEN+3 include header, checksum, and terminator 1F24A DC01F1F4 284 CALL SENDTERM send it out 1F24B 41170004 4 CACH 285 PAR R4,MSGSTART the start of the message to send 1F24C 40528000 2 REG 286 PARVL R2 how long it is 287 1F24D 60018462 0 288 LD R0 MSGSENDEND R0 -> end of list of messages sent 1F24E E5081F10 4 0 ZBM 289 ST R4 R0,MSGLINK link our latest message to the end 1F24F E5018462 4 290 ST R4 MSGSENDEND keep pointer to end of list 291 292 * Initialize a new buffer to give the user. 1F250 60018466 0 293 LD R0 MSGSNDLIST pick up pointer to a new message buffer 1F251 FA31F25B 0 294 JZA R0 PROT1ERR error if we ran out 1F252 60481F10 1 0 ZBM 295 LD R1 R0,MSGLINK get pointer to next message buffer 1F253 E4418466 1 296 ST R1 MSGSNDLIST and call it the start of the list 1F254 EC081F10 0 ZBM 297 STZ R0,MSGLINK make sure we don't keep extra links 1F255 E401845A 0 298 ST R0 PROT2MSG save pointer to message we give PROT2 1F256 38160008 0 0 CACH 299 LEA R0 R0,MSGTEXT return pointer to start of text location 1F257 E40184AB 0 300 ST R0 P1PBPT set where it can always be found 1F258 EC0184AC 301 STZ P1PUTPOS initialize the position 1F259 DC41F26C 302 CALLNP PROCESSNOT process any messages that came in 1F25A 5D1F8001 6 STAK 303 LEAVE POP 304 * --- 305 0001F25B 306 PROT1ERR LABEL 1F25B DC41F0F8 307 CALLNP XFERTIDY clean things up 1F25C 6005EE4D 0 IMM 308 LD R0 ADR ERM565 "Out of buffer..." 1F25D FE0FBE35 309 JMP RDUERR get out of here 310 * --- 311 312 END of PROT1SEND subroutine 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 509 (PROTOCOL1)R) F 36 Protocol Level 1 Subroutines 314 315 ********************************************************************************** 316 * * 317 * PROT1GET * 318 * * 319 * Gets a new message buffer with text. Sets * 320 * up pointers and initializes index, count, etc. * 321 * Breaks are check for and handled here. * 322 * Call: * 323 * CALLNP PROT1GET * 324 * Returns: * 325 * P1GETCNT = number of chars in text * 326 * P2RCVMSG -> message element given to level 2 * 327 * P1GETPOS = 0 (position in buffer) * 328 * * 329 * Eats R0:R4 * 330 * * 331 ********************************************************************************** 332 333 BLOCK PROT1GET subroutine 334 335 ENTRY PROT1GET 336 337 BEGFRAME 338 ENDFRAME 339 1F25E DD5F8001 6 STAK 340 PROT1GET ENTRNP PUSH 1F25F D181A8E0 341 CLRT UBREAK did a break come in? 1F260 FE0DF26A 342 JNE HAVEBREAK if so see what to do 343 * \ / 344 0001F261 345 WHATBRK LABEL 1F261 61018468 4 346 LD R4 P2RCVMSG R4 -> message element being returned 1F262 DC41F26F 347 CALLNP PROCESSMSG get a message and handle any processing 1F263 604900A0 1 4 ZBM 348 LD R1 R4,MSGLEN number of chars in text 1F264 E44184AE 1 349 ST R1 P1GETCNT save the number of chars 1F265 E5018468 4 350 ST R4 P2RCVMSG save pointer to message element for receive 1F266 38170008 0 4 CACH 351 LEA R0 R4,MSGTEXT R0 -> first char in message 1F267 E40184AD 0 352 ST R0 P1GBPT set up pointer for P2's use 1F268 EC0184AF 353 STZ P1GETPOS set position in message 1F269 5D1F8001 6 STAK 354 LEAVE POP 355 * --- 356 0001F26A 357 HAVEBREAK LABEL 1F26A DC41F0C3 358 CALLNP XFERBRK go to common break processor 1F26B FE0FF261 359 JMP WHATBRK if user wants to continue 360 * --- 361 362 END of PROT1GET subroutine 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 510 (PROTOCOL1)R) F 36 Protocol Level 1 Subroutines 364 365 ********************************************************************************** 366 * * 367 * PROCESSMSG * 368 * * 369 * Processes all messages from the remote machine until * 370 * one is found containing text. All of the nasty little things * 371 * like NAKs, ACKs, checksum verification, etc. are handled here. * 372 * Also returning of message elements to the available buffers * 373 * is done here. Once a message has been ACKed we can return * 374 * the message element to the free send buffer queue. Whenever * 375 * we reach here we assume that the last message given out can * 376 * give its element up. Also once we process any non-text * 377 * containing messages their elements can be returned. * 378 * Call: * 379 * R4 -> message element being returned (or 0) * 380 * CALLNP PROCESSMSG * 381 * R4 -> beginning of message element * 382 * * 383 * PROCESSNOT processes waiting messages until no more * 384 * are left, or one with text is found. * 385 * Call: * 386 * CALLNP PROCESSNOT * 387 * * 388 * Eats R0:R4 * 389 * * 390 ********************************************************************************** 391 392 BLOCK PROCESSMSG subroutine 393 394 ENTRY PROCESSMSG 395 ENTRY PROCESSNOT 396 397 BEGFRAME 00178801 6 BASE 398 FIRSTTIME BSS2 1 starting time for waiting for message 399 ENDFRAME 400 00000010 BYTE 401 TEXTBIT EQU BIT 0 1 sez we want new text 402 1F26C DD5F8003 6 STAK 403 PROCESSNOT ENTRNP PUSH 1F26D EC0BC010 7 CBM 404 STZ R7/TEXTBIT say no new text desired 1F26E FE0FF276 405 JMP NODEPOSIT 406 * --- 407 1F26F DD5F8003 6 STAK 408 PROCESSMSG ENTRNP PUSH 1F270 EDCBC010 7 CBM 409 STW R7/TEXTBIT say we want new text 1F271 FB31F276 4 410 JZA R4 NODEPOSIT not returning one for a deposit 411 * \ / 412 0001F272 413 RETURNMSG LABEL 1F272 EC091C10 4 ZBM 414 STZ R4,MSGPROC clear processed bit 1F273 60018467 0 415 LD R0 MSGRCVLIST R0 -> list of free receiving buffers 1F274 E4091F10 0 4 ZBM 416 ST R0 R4,MSGLINK link onto ours 1F275 E5018467 4 417 ST R4 MSGRCVLIST add to the list 418 * \ / 419 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 511 (PROTOCOL1)R) F 36 Protocol Level 1 Subroutines 0001F276 420 NODEPOSIT LABEL 1F276 61018463 4 421 LD R4 MSGRCVBEG R4 -> received message queue beginning 1F277 FB31F2A7 4 422 JZA R4 WAIT4MESS if none here, wait for one 423 * \ / 424 0001F278 425 UNLINKIT LABEL 1F278 60091F10 0 4 ZBM 426 LD R0 R4,MSGLINK get pointer to next message 1F279 E4018463 0 427 ST R0 MSGRCVBEG unlink us 1F27A FA33F27D 0 428 JNZA R0 HAVEMESS continue on if more messages 1F27B 60058463 0 IMM 429 LD R0 ADR MSGRCVBEG R4 -> beginning of queue 1F27C E4018464 0 430 ST R0 MSGRCVEND make end point to beginning 431 * \ / 432 0001F27D 433 HAVEMESS LABEL 1F27D EC091F10 4 ZBM 434 STZ R4,MSGLINK don't want unnecessary pointers 1F27E 5C091C10 4 ZBM 435 CMZ R4,MSGPROC has the message already been processed 1F27F FE0DF29C 436 JNE SEEIFKEEP message has been processed, should we keep it? 1F280 DC41F308 437 CALLNP HDRCKSUM compute checksum for header 1F281 64170007 0 4 CACH 438 CPR R0 R4,MSGHDRCKSM see if checksum matches 1F282 FE0DF2BE 439 JNE ENQUIRE if not then NAK this message 1F283 DC41F2C6 440 CALLNP DOACK do the ACK sort of stuff 1F284 FE0FF2BE 441 JMP ENQUIRE message was screwy 442 1F285 60170006 0 4 CACH 443 LD R0 R4,MSGNEW check for new text 1F286 64040040 0 IMM 444 CPR R0 MSGNEWTEXT is it within range? 1F287 FE09F2BE 445 JLT ENQUIRE if not, ENQire about the message 1F288 64040050 0 IMM 446 CPR R0 MSGNEWNIL if less than this, we have new text 1F289 FE07F272 447 JGE RETURNMSG no new text for us, return msg element 1F28A 10040040 0 IMM 448 SUB R0 MSGNEWTEXT get actual text message number 1F28B 64018460 0 449 CPR R0 NEXTRCVMSG is it the next one we should receive? 1F28C FE0DF2C0 450 JNE NAKIT if not then nak the SOB 451 452 * Verify the checksum 1F28D 600900A0 0 4 ZBM 453 LD R0 R4,MSGLEN R0 = # of text chars including checksum 1F28E 10040002 0 IMM 454 SUB R0 MSGCHKSUML don't want checksum length included 1F28F FA09F2C0 0 455 JLTZ R0 NAKIT lost some of the text if this is negative 1F290 E40900A0 0 4 ZBM 456 ST R0 R4,MSGLEN set the actual length of the text 1F291 DC41F2F1 457 CALLNP CHECKSUMIT check out the check sum 1F292 608900A0 2 4 ZBM 458 LD R2 R4,MSGLEN 1F293 641B1008 0 42 CACH 459 CPR R0 R4,MSGTEXT(R2) see if first char of checksum matches 1F294 FE0DF2C0 460 JNE NAKIT oops 1F295 645B1009 1 42 CACH 461 CPR R1 R4,MSGTEXT(R2)(1) see if second char of checksum matches 1F296 FE0DF2C0 462 JNE NAKIT NAK the sucker if it does not match 463 * \ / 464 1F297 60018460 0 465 LD R0 NEXTRCVMSG pick up number of this message 1F298 E401845E 0 466 ST R0 LASTWEACK this is the one we are ACKing 1F299 DC01F32F 467 CALL SENDABLOCK acknowldege this message 1F29A 40440040 IMM 468 PARVL MSGACKACK 1F29B EDC91C10 4 ZBM 469 STW R4,MSGPROC say this has been processed 470 * \ / 471 0001F29C 472 SEEIFKEEP LABEL 1F29C F7C1F2A2 7 473 JBT R7/TEXTBIT KEEPIT do we want a message text? 1F29D 60018463 0 474 LD R0 MSGRCVBEG get pointer to head of list 1F29E E4091F10 0 4 ZBM 475 ST R0 R4,MSGLINK link onto ours 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 512 (PROTOCOL1)R) F 36 Protocol Level 1 Subroutines 1F29F E5018463 4 476 ST R4 MSGRCVBEG put ours on head of list 1F2A0 FA33F2A2 0 477 JNZA R0 KEEPIT jump if not end of list too 1F2A1 E5018464 4 478 ST R4 MSGRCVEND make end point to ours too 479 * \ / 480 0001F2A2 481 KEEPIT LABEL 1F2A2 BC018460 0 482 INCL R0 NEXTRCVMSG next one we receive should be higher 1F2A3 64040007 0 IMM 483 CPR R0 MAXSENTMSG is it time to circle around 1F2A4 FE0BF2A6 484 JLE NOWAIT 1F2A5 EC018460 485 STZ NEXTRCVMSG circularity is such fun 0001F2A6 486 NOWAIT LABEL 1F2A6 5D1F8003 6 STAK 487 LEAVE POP 488 * --- 489 0001F2A7 490 WAIT4MESS LABEL 1F2A7 F3C1F2A6 7 491 JBF R7/TEXTBIT NOWAIT don't wait for a text message 1F2A8 60040060 0 IMM 492 LD R0 URRAWDATE get current time 1F2A9 09040000 IMM 493 UREQ 0 1F2AA E6978801 236 BASE 494 ST2 R2 SP,FIRSTTIME save as our timer 495 * \ / 496 0001F2AB 497 BACK4MORE LABEL 1F2AB DC41BC7E 498 CALLNP SHIPNOP talk to the remote machine 1F2AC 61018463 4 499 LD R4 MSGRCVBEG R4 -> received message queue beginning 1F2AD FB33F278 4 500 JNZA R4 UNLINKIT we now have a message, unlink it 1F2AE 6001F38B 0 501 LD R0 RESPBINDX how much reponse we received 1F2AF 64040010 0 IMM 502 CPR R0 MAXRESPS see if a full boat 1F2B0 FE03F2AB 503 JEQ BACK4MORE if so then go back for more 504 * \ / 505 1F2B1 60040060 0 IMM 506 LD R0 URRAWDATE get current time 1F2B2 09040000 IMM 507 UREQ 0 1F2B3 12978801 236 BASE 508 SUB2 R2 SP,FIRSTTIME subtract our starting time 1F2B4 64C18457 3 509 CPR R3 XFERTO have we reached the max? 1F2B5 FE05F2C3 510 JGT TIMEDOUT if so then croak 511 * \ / 512 1F2B6 60040140 0 IMM 513 LD R0 URDELAY wait a bit 1F2B7 60440002 1 IMM 514 LD R1 2 how long to delay 1F2B8 60840020 2 IMM 515 LD R2 UINTBREAK allow breaks to interrupt us 1F2B9 09040000 IMM 516 UREQ 0 1F2BA FA4DF2BC 1 517 JNEZ R1 GOTABREAK jump if break occured during delay 1F2BB FE0FF2AB 518 JMP BACK4MORE go wait some more 519 * --- 520 0001F2BC 521 GOTABREAK LABEL 1F2BC DC41F0C3 522 CALLNP XFERBRK deal with the break 1F2BD FE0FF2AB 523 JMP BACK4MORE see if we got a message 524 * --- 525 0001F2BE 526 ENQUIRE LABEL 1F2BE DC41F31E 527 CALLNP DOENQUIRE handle the damn enquiry 1F2BF FE0FF272 528 JMP RETURNMSG don't need this message element 529 * --- 530 0001F2C0 531 NAKIT LABEL 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 513 (PROTOCOL1)R) F 36 Protocol Level 1 Subroutines 1F2C0 DC01F32F 532 CALL SENDABLOCK send a block with a NAK 1F2C1 40440050 IMM 533 PARVL MSGACKREJ the char to send 1F2C2 FE0FF272 534 JMP RETURNMSG 535 * --- 536 537 * The remote comm is not sending us any messages. Croak!! 0001F2C3 538 TIMEDOUT LABEL 1F2C3 DC41F0F8 539 CALLNP XFERTIDY cleanup 1F2C4 6005EE5E 0 IMM 540 LD R0 ADR ERM567 "Remote comm timeout exceeded." 1F2C5 FE0FBE35 541 JMP RDUERR bail out 542 * --- 543 544 END of PROCESSMSG subroutine 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 514 (PROTOCOL1)R) F 36 Protocol Level 1 Subroutines 546 547 ********************************************************************************** 548 * * 549 * DOACK * 550 * * 551 * DOACK deals with the possible things that can occur * 552 * in the ACK field of a message. * 553 * Call: * 554 * R4 -> message * 555 * CALLNP DOACK * 556 * * 557 * Eats R0:R3 * 558 * * 559 ********************************************************************************** 560 561 BLOCK DOACK subroutine 562 563 ENTRY DOACK 564 565 BEGFRAME 00178801 6 BASE 566 TEMPR4 BSS 1 temp for R4 567 ENDFRAME 568 1F2C6 DD5F8002 6 STAK 569 DOACK ENTRNP PUSH 1F2C7 60170005 0 4 CACH 570 LD R0 R4,MSGACK need to see it what type we have 1F2C8 64040040 0 IMM 571 CPR R0 MSGACKACK is it an ACK? 1F2C9 FE09F2CE 572 JLT BADRESP can't be less than this 1F2CA 64040050 0 IMM 573 CPR R0 MSGACKREJ how 'bout a NAK 1F2CB FE09F2CF 574 JLT ITSANACK if less than this it is an ACK 1F2CC 64040062 0 IMM 575 CPR R0 MSGACKENQ maybe just a curious message 1F2CD FE09F2E5 576 JLT REJECTED if less than this, must be a NAK 577 * \ / 578 579 * ACK field had bullshit character in it or was an enquiry. 0001F2CE 580 BADRESP LABEL 0001F2CE 581 ALLDONE LABEL 1F2CE 5D1F8002 6 STAK 582 LEAVE POP 583 * --- 584 0001F2CF 585 ITSANACK LABEL 1F2CF 10040040 0 IMM 586 SUB R0 MSGACKACK R0 = message being ACKed 1F2D0 64040007 0 IMM 587 CPR R0 MAXSENTMSG is it within our range? 1F2D1 FE05F2CE 588 JGT BADRESP error return 1F2D2 6041845F 1 589 LD R1 LASTSENT highest number we should be getting ACKed 1F2D3 6081845D 2 590 LD R2 LASTACK last message we had ACKed 1F2D4 DC41F310 591 CALLNP CHECKRANGE is it within our range 1F2D5 FE0FF2CE 592 JMP BADRESP if not then enquire 1F2D6 6401845D 0 593 CPR R0 LASTACK have we already been ACKed? 1F2D7 FE03F2E4 594 JEQ NOTFOUND if so it won't be in the list 595 * \ / 596 1F2D8 E401845D 0 597 ST R0 LASTACK save our last ACK 1F2D9 60818461 2 598 LD R2 MSGSENDBEG R2 -> oldest unacknowledged message 1F2DA 64089440 0 2 ZBM 599 CPR R0 R2,MSGNUM is this the ACKed message? 1F2DB FE0DF2E4 600 JNE NOTFOUND did not find it 601 * \ / 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 515 (PROTOCOL1)R) F 36 Protocol Level 1 Subroutines 602 1F2DC 60089F10 0 2 ZBM 603 LD R0 R2,MSGLINK get link to next message 1F2DD E4018461 0 604 ST R0 MSGSENDBEG make the new first element 1F2DE FA33F2E1 0 605 JNZA R0 NOTFIRST 1F2DF 60058461 0 IMM 606 LD R0 ADR MSGSENDBEG 1F2E0 E4018462 0 607 ST R0 MSGSENDEND so link onto end will work 0001F2E1 608 NOTFIRST LABEL 1F2E1 60018466 0 609 LD R0 MSGSNDLIST 1F2E2 E4089F10 0 2 ZBM 610 ST R0 R2,MSGLINK link onto ours 1F2E3 E4818466 2 611 ST R2 MSGSNDLIST add onto the list 612 * \ / 613 0001F2E4 614 NOTFOUND LABEL 1F2E4 FBE1F2CE 7 615 IRJ R7 ALLDONE 616 * --- 617 0001F2E5 618 REJECTED LABEL 1F2E5 10040050 0 IMM 619 SUB R0 MSGACKREJ R0 = last message remote received 1F2E6 64040007 0 IMM 620 CPR R0 MAXSENTMSG is it within our range? 1F2E7 FE05F2CE 621 JGT BADRESP error return 1F2E8 6041845F 1 622 LD R1 LASTSENT highest number we should be getting ACKed 1F2E9 6081845D 2 623 LD R2 LASTACK last message we had ACKed 1F2EA DC41F310 624 CALLNP CHECKRANGE is it within our range 1F2EB FE0FF2CE 625 JMP BADRESP if not then enquire 1F2EC E401845D 0 626 ST R0 LASTACK call this our last ACK 1F2ED E5178801 4 6 BASE 627 ST R4 SP,TEMPR4 since we promised to keep this safe 1F2EE DC41F345 628 CALLNP SENDALL send all messages since LASTACK 1F2EF 61178801 4 6 BASE 629 LD R4 SP,TEMPR4 we kept our promise 1F2F0 FBE1F2CE 7 630 IRJ R7 ALLDONE 631 * --- 632 633 END of DOACK subroutine 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 516 (PROTOCOL1)R) F 36 Protocol Level 1 Subroutines 635 636 ********************************************************************************** 637 * * 638 * CHECKSUMIT * 639 * * 640 * This subroutine calculates the checksum of the text portion * 641 * of a message. * 642 * Call: * 643 * R4 -> start of message element * 644 * (R4,MSGLEN = number of chars in text) * 645 * CALLNP CHECKSUMIT * 646 * R0 = checksum (first char) * 647 * R1 = checksum (second char) * 648 * * 649 * Eats R0:R2 * 650 * * 651 ********************************************************************************** 652 653 BLOCK CHECKSUMIT subroutine 654 655 ENTRY CHECKSUMIT 656 657 BEGFRAME 658 ENDFRAME 659 00003E10 BYTE 660 ODDBIT EQU BIT 31 on if word is odd 661 1F2F1 DD5F8001 6 STAK 662 CHECKSUMIT ENTRNP PUSH 1F2F2 60040000 0 IMM 663 LD R0 0 start the sum word empty 1F2F3 38490102 1 4 ZBM 664 LEA R1 R4,MSGTEXTW/CHARS01 make pointer to halfword chunks 1F2F4 608900A0 2 4 ZBM 665 LD R2 R4,MSGLEN number of chars in message 1F2F5 F2BFF2F8 2 666 JBF R2/ODDBIT HAVEPOINTER jump if even number of chars 667 * \ / 668 669 * adjust for odd byte count 1F2F6 60170008 0 4 CACH 670 LD R0 R4,MSGTEXT pick up the first char 1F2F7 38491102 1 4 ZBM 671 LEA R1 R4,MSGTEXT(1)/CHARS01 make pointer to next two chars 672 * \ / 673 674 * R1 => string to checksum, R2 = byte count (even) 0001F2F8 675 HAVEPOINTER LABEL 1F2F8 608A81F0 2 2 CBM 676 LD R2 R2/BITS 0:30 convert byte count to half-word count 1F2F9 FE0FF2FB 677 JMP INTOLOOP start at end of loop 678 * --- 679 0001F2FA 680 CHECKLOOP LABEL 1F2FA 181A5400 0 12 @R 681 ADD R0 @R1(R2) add in a halfword 0001F2FB 682 INTOLOOP LABEL 1F2FB FAA7F2FA 2 683 JDR R2 CHECKLOOP move down 1F2FC FE0FF2FF 684 JMP FINISHIT done 685 * --- 686 687 * loop to fold checksum into two bytes 0001F2FD 688 FINISHLOOP LABEL 1F2FD 7804FFFF 0 IMM 689 AND R0 0FFFF only want lower half kept 1F2FE 18124000 0 1 REG 690 ADD R0 R1 add back into the checksum 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 517 (PROTOCOL1)R) F 36 Protocol Level 1 Subroutines 0001F2FF 691 FINISHIT LABEL 1F2FF 604A0100 1 0 CBM 692 LD R1 R0/CHARS01 pick up the high order half of word 1F300 FA4DF2FD 1 693 JNEZ R1 FINISHLOOP keep going until zero 694 * \ / 695 696 * make checksum bytes printable 1F301 604A3080 1 0 CBM 697 LD R1 R0/CH3 R1 = second char of checksum 1F302 600A2080 0 0 CBM 698 LD R0 R0/CH2 R0 = first char of checksum 1F303 7804003F 0 IMM 699 AND R0 CHARMASK keep within range 1F304 18040020 0 IMM 700 ADD R0 LOWCHAR make printable 1F305 7844003F 1 IMM 701 AND R1 CHARMASK keep within range 1F306 18440020 1 IMM 702 ADD R1 LOWCHAR make printable 1F307 5D1F8001 6 STAK 703 LEAVE POP return 704 * --- 705 706 END of CHECKSUMIT subroutine 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 518 (PROTOCOL1)R) F 36 Protocol Level 1 Subroutines 708 709 ********************************************************************************** 710 * * 711 * HDRCKSUM * 712 * * 713 * Compute checksum of message header. * 714 * Call: * 715 * R4 -> message element * 716 * CALLNP HDRCKSUM * 717 * R0 = checksum (printable char) * 718 * Eats R0 * 719 * * 720 ********************************************************************************** 721 722 BLOCK HDRCKSUM subroutine 723 724 ENTRY HDRCKSUM 725 726 BEGFRAME 727 ENDFRAME 728 1F308 DD5F8001 6 STAK 729 HDRCKSUM ENTRNP PUSH 1F309 60170004 0 4 CACH 730 LD R0 R4,MSGSTART start with the start character 1F30A 74170005 0 4 CACH 731 XOR R0 R4,MSGACK mix in the acknowledgement 1F30B 74170006 0 4 CACH 732 XOR R0 R4,MSGNEW and the new field 1F30C 74040055 0 IMM 733 XOR R0 HDRCKSMCHR and finally the special character 1F30D 7804003F 0 IMM 734 AND R0 CHARMASK make sure it is within range 1F30E 18040020 0 IMM 735 ADD R0 LOWCHAR make it a legal char 1F30F 5D1F8001 6 STAK 736 LEAVE POP 737 * --- 738 739 END of HDRCKSUM subroutine 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 519 (PROTOCOL1)R) F 36 Protocol Level 1 Subroutines 741 742 ********************************************************************************** 743 * * 744 * CHECKRANGE * 745 * * 746 * Verify that a number is within given boundaries. * 747 * We allow for the circularness of the mod type of funky * 748 * sort of not always increasing form of message numbers. * 749 * Call: * 750 * R0 = number we are checking * 751 * R1 = high end of range * 752 * R2 = low end of range * 753 * CALLNP CHECKRANGE * 754 * JMP number was out of range * 755 * * 756 * Eats no registers. * 757 * * 758 ********************************************************************************** 759 760 BLOCK CHECKRANGE subroutine 761 762 ENTRY CHECKRANGE 763 764 BEGFRAME 765 ENDFRAME 766 1F310 DD5F8001 6 STAK 767 CHECKRANGE ENTRNP PUSH 1F311 64528000 1 2 REG 768 CPR R1 R2 is high high or low? 1F312 FE05F319 769 JGT HIGHISHIGH 1F313 64128000 0 2 REG 770 CPR R0 R2 is value greater than the low bounds 1F314 FE07F317 771 JGE OK if so then things are ok 1F315 64124000 0 1 REG 772 CPR R0 R1 then it must be less or equal to the high 1F316 FE05F318 773 JGT NOTOK oops 0001F317 774 OK LABEL 1F317 19C40001 7 IMM 775 ADD R7 1 good return 0001F318 776 NOTOK LABEL 1F318 5D1F8001 6 STAK 777 LEAVE POP 778 * --- 779 0001F319 780 HIGHISHIGH LABEL 1F319 64124000 0 1 REG 781 CPR R0 R1 is it within the high end? 1F31A FE05F318 782 JGT NOTOK oops 1F31B 64128000 0 2 REG 783 CPR R0 R2 is it within the low end? 1F31C FE07F317 784 JGE OK 1F31D FE0FF318 785 JMP NOTOK oops 786 * --- 787 788 END of CHECKRANGE subroutine 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 520 (PROTOCOL1)R) F 36 Protocol Level 1 Subroutines 790 791 ********************************************************************************** 792 * * 793 * DOENQUIRE * 794 * * 795 * Respond to an ENQuiry. * 796 * - If NEW field <> NIL+, send ENQuire. * 797 * - IF = * 798 * THEN ACK last msg received * 799 * ELSE NAK last msg ACKed+1, = * 800 * last msg ACKed+1. * 801 * Call: * 802 * R4 -> message element * 803 * CALLNP DOENQUIRE * 804 * * 805 * Eats R0:R3 * 806 * * 807 ********************************************************************************** 808 809 BLOCK DOENQUIRE subroutine 810 811 ENTRY DOENQUIRE 812 813 BEGFRAME 814 ENDFRAME 815 1F31E DD5F8001 6 STAK 816 DOENQUIRE ENTRNP PUSH 1F31F 60170006 0 4 CACH 817 LD R0 R4,MSGNEW 1F320 10040050 0 IMM 818 SUB R0 MSGNEWNIL get next text msg number 1F321 FA09F329 0 819 JLTZ R0 SENDENQ send an enquiry if negative num 1F322 64040007 0 IMM 820 CPR R0 MAXSENTMSG is it within the high range 1F323 FE05F329 821 JGT SENDENQ if not then send enquiry 1F324 64018460 0 822 CPR R0 NEXTRCVMSG is it the one we are expecting 1F325 FE0DF32C 823 JNE SENDNAK if not then NAK some messages 1F326 DC01F32F 824 CALL SENDABLOCK ACK the last message we received 1F327 40440040 IMM 825 PARVL MSGACKACK 826 * \ / 827 0001F328 828 DONEHERE LABEL 1F328 5D1F8001 6 STAK 829 LEAVE POP 830 * --- 831 0001F329 832 SENDENQ LABEL 1F329 DC01F32F 833 CALL SENDABLOCK 1F32A 40440062 IMM 834 PARVL MSGACKENQ the enquire char 1F32B FE0FF328 835 JMP DONEHERE 836 * --- 837 0001F32C 838 SENDNAK LABEL 1F32C DC01F32F 839 CALL SENDABLOCK 1F32D 40440050 IMM 840 PARVL MSGACKREJ a rejection 1F32E FE0FF328 841 JMP DONEHERE 842 * --- 843 844 END of DOENQUIRE subroutine 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 521 (PROTOCOL1)R) F 36 Protocol Level 1 Subroutines 846 847 ********************************************************************************** 848 * * 849 * SENDABLOCK * 850 * * 851 * Send a simple message block with just a header. * 852 * The NEWTEXT field is always set to NIL. * 853 * Call: * 854 * CALL SENDABLOCK * 855 * PARVL * 856 * * 857 * Eats R0:R3 * 858 * * 859 ********************************************************************************** 860 861 BLOCK SENDABLOCK subroutine 862 863 ENTRY SENDABLOCK 864 865 BEGFRAME 00178801 6 BASE 866 SAVER4 BSS 1 temp for R4 867 ENDFRAME 868 1F32F DD1F8002 6 STAK 869 SENDABLOCK ENTR PUSH 1F330 C0520000 0 REG 870 STPVL R0 1F331 E5178801 4 6 BASE 871 ST R4 SP,SAVER4 save this 872 * \ / 873 1F332 61058B24 4 IMM 874 LD R4 ADR SHORTMSG R4 -> short message element 1F333 64040062 0 IMM 875 CPR R0 MSGACKENQ is this an enquiry 1F334 FE03F336 876 JEQ ASIS if so put in as is 1F335 1801845E 0 877 ADD R0 LASTWEACK add in the last message we ACKed 0001F336 878 ASIS LABEL 1F336 E4170005 0 4 CACH 879 ST R0 R4,MSGACK set in the ACK field 1F337 6004007E 0 IMM 880 LD R0 MSGSTARTCH get the start character 1F338 E4170004 0 4 CACH 881 ST R0 R4,MSGSTART and put it there 1F339 6001845F 0 882 LD R0 LASTSENT last message sent 1F33A 18040051 0 IMM 883 ADD R0 MSGNEWNIL+1 char indicates no new text 1F33B E4170006 0 4 CACH 884 ST R0 R4,MSGNEW let them know the next text msg number 1F33C DC41F308 885 CALLNP HDRCKSUM compute the header checksum 1F33D E4170007 0 4 CACH 886 ST R0 R4,MSGHDRCKSM put it there 1F33E 6004000D 0 IMM 887 LD R0 MSGENDCHAR terminator for the message 1F33F E4170008 0 4 CACH 888 ST R0 R4,MSGTEXT tack onto the end 1F340 DC01F1F4 889 CALL SENDTERM send it out 1F341 41170004 4 CACH 890 PAR R4,MSGSTART the start of the message to send 1F342 40440005 IMM 891 PARVL MSGHDRLEN+1 the message length 1F343 61178801 4 6 BASE 892 LD R4 SP,SAVER4 1F344 5D1F8002 6 STAK 893 LEAVE POP 894 * --- 895 896 END of SENDABLOCK subroutine 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 522 (PROTOCOL1)R) F 36 Protocol Level 1 Subroutines 898 899 ********************************************************************************** 900 * * 901 * SENDALL * 902 * * 903 * Sends all messages from last one ACKed to the * 904 * last message we sent. * 905 * Call: * 906 * CALLNP SENDALL * 907 * * 908 * Eats R0:R4 * 909 * * 910 ********************************************************************************** 911 912 BLOCK SENDALL subroutine 913 914 ENTRY SENDALL 915 916 BEGFRAME 917 ENDFRAME 918 1F345 DD5F8001 6 STAK 919 SENDALL ENTRNP PUSH 1F346 61018461 4 920 LD R4 MSGSENDBEG R4 -> beginning of message send list 1F347 FB31F353 4 921 JZA R4 ALLSENT if none there 0001F348 922 SENDLOOP LABEL 1F348 6001845E 0 923 LD R0 LASTWEACK last message we ACKed 1F349 18040040 0 IMM 924 ADD R0 MSGACKACK add on the ACK value 1F34A E4170005 0 4 CACH 925 ST R0 R4,MSGACK set this field 1F34B DC41F308 926 CALLNP HDRCKSUM compute the header checksum 1F34C E4170007 0 4 CACH 927 ST R0 R4,MSGHDRCKSM set this field 928 1F34D 604900A0 1 4 ZBM 929 LD R1 R4,MSGLEN get the message length 1F34E 18440007 1 IMM 930 ADD R1 MSGHDRLEN+MSGCHKSUML+1 include header, checksum, CR 1F34F DC01F1F4 931 CALL SENDTERM send it out 1F350 41170004 4 CACH 932 PAR R4,MSGSTART the start of the message to send 1F351 40524000 1 REG 933 PARVL R1 how long it is 1F352 FB37F348 4 934 LJNA R4 SENDLOOP keep going though list 935 * \ / 936 0001F353 937 ALLSENT LABEL 1F353 5D1F8001 6 STAK 938 LEAVE POP 939 * --- 940 941 END of SENDALL subroutine 942 943 END of Protocol Level 1 routines 1367 1368 END of file transfer 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 523 F 0 Protocol Level 1 Subroutines 179 180 ********************************************************************************** 181 * * 182 * This is the beginning of the SSU/RDU line protocol section. * 183 * * 184 ********************************************************************************** 185 186 INPUT ENPROT 2 BLOCK start of MF code 3 4 5 ENTRY BREAKLOW to set baud rate low 6 ENTRY BRKMASK break interrupt mask 7 ENTRY CH0 8 ENTRY CH2 9 ENTRY CH3 10 ENTRY FAILCOUNT to display number of transmission errors 11 ENTRY MHLINK link in this list 12 ENTRY SYNECOUNT to display number of synchronization errors 13 ENTRY GRESP retrieve response from SSU 14 ENTRY ICURUCR microcode revision 15 ENTRY INTERCODE error code on interrupt 16 ENTRY INTERPC main line pc on interrupt 17 ENTRY INTREGSPC error sub code on interrupt 18 ENTRY INTERSUBCD error sub code on interrupt 19 ENTRY IODIAL to dial phone and validate session 20 ENTRY IOINIT initializer for line protocol and encrypt 21 ENTRY IOPWRRESET to transmit power reset and give up session 22 ENTRY IORDYMSG to prepare message to be sent 23 ENTRY IOTERM to disconnect 24 ENTRY IODROP drop session and release talker 25 ENTRY NOPINST 26 ENTRY RESPBUFFER response buffer 27 ENTRY RESPBUFFH head of buffer 28 ENTRY RESPBINDX response item count 29 ENTRY SIMWBRKS to set up interrupt mask with breaks 30 ENTRY SIMNOBRKS to set up interrupt mask with no breaks 31 ENTRY TIMEOUTPC error address for interrupts 32 ENTRY TRACE trace subroutine 33 ENTRY TRACEINST 34 ENTRY XMIT routine to send msg to SSU 35 36 FILESTAT 37 INPUT RFPDESC fetch in the interface description 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 524 (RFPDESC) F 38 RFP Line Protocol Routines 2 3 ********************************************************************************** 4 * * 5 * This routine supplies the underlying line protocol * 6 * and encryption routines for the remote diagnostic facility. * 7 * * 8 * Unsolicited input: The nature of this program environment is * 9 * somewhat unusual and several things must be remembered. The * 10 * SSU is expecting messages from this program at intervals not * 11 * to exceed 45 seconds. However, it is possible for there to * 12 * be many error retries on a long request. In order to be safe, * 13 * if the operator makes no request within 10 seconds, a NOP * 14 * should be sent to keep the line busy. * 15 * In order to allow timing to occur, this code provides an * 16 * interrupt processing routine. If an input is desired, but * 17 * there is no certainty that it will occur (the normal case), * 18 * the program must call for a URSETTIMIN interrupt and store * 19 * the timeout address in TIMEOUTPC before doing the FRREAD. * 20 * If the FRREAD completes and the time interrupt is no * 21 * longer needed, store a zero into TIMEOUTPC. If the interrupt * 22 * does occur, the interrupt routine will ignore it. * 23 * If the FRREAD does not complete and the time interrupt * 24 * occurs, the interrupt routine will save the main routines * 25 * PC in INTERPC, the interrupt code in INTERCODE, and the * 26 * interrupt sub-code in INTERSUBCD and return to the error * 27 * address in TIMEOUTPC. * 28 * * 29 * Interface information: * 30 * Initialization: When the user program is started, it must * 31 * set up a stack area pointer in R6 and call IOINIT. The * 32 * IOINIT routine will configure the RDS machine and select * 33 * the proper interrupt mask. * 34 * Call: * 35 * CALLNP IOINIT * 36 * * 37 * * 38 * Terminal break processing: When the RDU program has no interest * 39 * in break processing, the interrupt should be de-selected. This * 40 * may be done by: * 41 * CALLNP SIMNOBRKS * 42 * When the RDU program is working in portzero mode and breaks * 43 * must be passed on to the remote machine, the break interrupt * 44 * should be reselected. This may be done by: * 45 * CALLNP SIMWBRKS * 46 * * 47 * Routines provided to the user program. * 48 * * 49 * IODIAL - dial phone number and validate session. * 50 * CALL IODIAL * 51 * PAR * 52 * PARV * 53 * PARV * 54 * PARVL * 55 * * 56 * Eats R0:R3 * 57 * * 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 525 (RFPDESC) F 38 RFP Line Protocol Routines 58 * IODONTDIAL - connect to a local RFP and validate session * 59 * CALL IODONTDIAL * 60 * PARV2 * 61 * PARV * 62 * PARVL * 63 * * 64 * Eats R0:R3 * 65 * * 66 * BAUDSET - to set baud rate. (Presently not an entry) * 67 * * 68 * IORDYMSG - encrypts and otherwise prepares a message to * 69 * be transmitted. * 70 * The remote machine may require a significant amount of time * 71 * to accomplish certain operations (such as scan and fill). * 72 * It is the callers responsibility to supply the estimated * 73 * amount of time that each operation will take. * 74 * CALL IORDYMSG * 75 * PARV * 76 * PARV class of request * 77 * PARV slot (or subcommand) * 78 * PARVL 32 bit data word, includes BCM, etc * 79 * MH block> * 80 * * 81 * XMIT - send the message to the SSU. * 82 * This takes the indicated MH block and sends out the * 83 * encrypted message. * 84 * R4=> MH block * 85 * CALLNP XMIT * 86 * * 87 * GRESP - get back the response. * 88 * The routine expects to receive back up to 16 response * 89 * words from the RFP. Each word is examined to see if it is * 90 * a terminating response. The caller must also check each * 91 * response to see how many were actually returned. * 92 * R4=> MH block * 93 * CALL GRESP * 94 * PARVL ADR
* 95 * * 96 * * 97 * * 98 * IOTERM - send terminate session * 99 * CALL IOTERM * 100 * PARVL ADR * 101 * * 102 * * 103 * IODROP - drop session and release talker * 104 * When the session is dropped due to lost communications or * 105 * a powerreset, the talker unit must be freed. (This function * 106 * is performed automatically within IOTERM). * 107 * CALLNP IODROP * 108 * * 109 * * 110 * * 111 * If this code is waiting for a response from the remote * 112 * machine, it is possible for a user break to arrive. This * 113 * cannot be ignored, since it would either be lost or prevent * 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 526 (RFPDESC) F 38 RFP Line Protocol Routines 114 * further delays from occuring. The user program must therefore * 115 * provide a routine to receive notice of these breaks. * 116 * When we encounter a break, we will execute a: * 117 * CALLNP RFPBREAK indicate to user that operator hit break * 118 * * 119 * * 120 * Message block: A variable called MB contains the message * 121 * to be transmitted. The plaintext message * 122 * occupies only part of this block. Indirect * 123 * pointers are available to: * 124 * SLOT - pointer name - AMBSLOT * 125 * DATA word - AMBDATA * 126 * BCM field - AMBBCM * 127 * Memory address field (within DATA) - AMBMA * 128 * See the RFP document for a description of the * 129 * fields, the command and response formats, and * 130 * other information. * 131 * Response buffer: A 32 word variable called RESPBUFFER holds * 132 * all of the responses in ascending order. Each * 133 * response is allocated a double word. Within each * 134 * double word: Bits 8:11 contain the class, * 135 * Bits 12:15 contain the slot, and Bits 32:63 * 136 * (the second word) contain the data word. * 137 * Note that the data word has been moved from * 138 * the location where it was held when it arrived in * 139 * MB. This is to avoid problems extracting it. * 140 * See the file "XDEFS" for symbolic names for these fields. * 141 * * 142 * * 143 ********************************************************************************** 38 INPUT DEFS get in the definitions 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 527 (DEFS)T) F 39 RFP Line Protocol Routines 2 3 ********************************************************************************** 4 * * 5 * General purpose definitions. * 6 * * 7 ********************************************************************************** 8 00000080 BYTE 9 CH0 EQU BITS 0:7 character zero 00001080 BYTE 10 CH1 EQU BITS 8:15 character one 00002080 BYTE 11 CH2 EQU BITS 16:23 character two 00003080 BYTE 12 CH3 EQU BITS 24:31 character three 00001F30 BYTE 13 FLDCHARS EQU BITS 15:1 character address part of pointer 000003E8 ABS 14 MSECS EQU 1000 number of milliseconds in one second 00000030 ABS 15 L EQU 48 size of message block 00000003 ABS 16 ROUNDS EQU 3 number of rounds that the encryptor runs 00000006 ABS 17 MBENCSIZE EQU 6 size of encrypted message (chars) 00000008 ABS 18 MBSIZE EQU MBENCSIZE+2 size of complete transmitted message 00000001 ABS 19 SOH EQU 001 start of header 00000002 ABS 20 STX EQU 002 ASCII start of text 00000003 ABS 21 ETX EQU 003 ASCII end of text 0000000F ABS 22 SI EQU 00F ASCII shift in 00000015 ABS 23 NAK EQU 015 ASCII NAK 000000DF ABS 24 LOWBIAS EQU 0DF to convert to upper case 25 26 ********************************************************************************** 27 * These timeout values are used to recover from transmission * 28 * errors. If the line has become totally unusable, the long * 29 * interval timeout will cause us to disconnect. If the line is * 30 * giving errors, the short interval will allow us to recover and * 31 * try again. * 32 * These values are determined by the corresponding * 33 * values in the SSU: * 34 * 1) short interval timeout. * 35 * If the SSU sees none of the characters that * 36 * we send, then we can resend immediately. * 37 * If the SSU sees an input character, it allows * 38 * 2 seconds for the remainder of a message to * 39 * arrive. If it does not arrive, it resets and * 40 * starts looking for input again. If the SSU * 41 * sees a bad message, it waits 2 seconds, then * 42 * cleans out its input buffer and sends a NAK. * 43 * We must be sure to see the NAK. This determines * 44 * the necessary timeout value. Also, the system * 45 * 'rounds' down the value (i.e. a value of 4 may * 46 * actually provide only 3.001 seconds of delay). * 47 * 2) long interval timeout. * 48 * The SSU disconnects the phone link if no valid * 49 * command is received for 120 seconds. * 50 * 3) Note that there are also timeout values defined in * 51 * the TIMER routine in the command processor section * 52 * of the RDU. They are PORTZTO and NORMALTO. * 53 ********************************************************************************** 54 1F354 00000002 55 EMPTYTO VFD 2 interval before emptying buffer 1F355 00000004 56 SHINTO VFD 4 short interval timeout (seconds) 1F356 00000005 57 NAKTO VFD 5 time to wait after a NAK 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 528 (DEFS)T) F 39 RFP Line Protocol Routines 1F357 0000005A 58 LINTO VFD 90 long interval timeout (seconds) 00003410 BYTE 59 PORTSDTR EQU BIT 26 turn on data terminal ready/data set ready 00003810 BYTE 60 PORTSRTS EQU BIT 28 turn on request to send/clear to send 61 62 ********************************************************************************** 63 * * 64 * Variable definition area * 65 * * 66 ********************************************************************************** 67 68 ********************************************************************************** 69 * * 70 * The Transmitted MSN is the MSN for the last message * 71 * that was constructed and encrypted. We may be receiving * 72 * responses to older messages with different MSNs, so the * 73 * encryptor is passed the proper MSN to use. * 74 * * 75 ********************************************************************************** 76 0001F358 77 XMITMSN BSS 1 holds the message sequence number 78 79 ********************************************************************************** 80 * * 81 * The encryptor relies on MSN being immediately in front of FSD * 82 * so that the byte indexes from 0 to 9 cover MSN(0), MSN(1), and * 83 * the FSD bytes in order. * 84 * * 85 ********************************************************************************** 86 0001F359 87 MSN BSS 1 holds the message sequence number 0001F35A 88 WFSD BSS 0 word address for following 0201F35A 89 FSD BSSC 8 holds fixed session data 0001F35C 90 PARAMETER BSS 1 index to random number table 91 92 ********************************************************************************** 93 * * 94 * Message Block * 95 * This is a working buffer for the message being built * 96 * and encrypted. These buffers hold the message block as it * 97 * is being manipulated by the encryptor. * 98 * The old data read is saved for debugging and error * 99 * analysis. Also, as soon as an outgoing message is encrypted, it * 100 * is moved to an MH block to free up the encrypt-decrypt buffer. * 101 * * 102 ********************************************************************************** 103 0001F35D 104 MB BSS 0 holds message being worked on 0201F35D 105 MBMSN BSSC 1 holds message sequence number 4201F35D 106 MBENC BSSC MBENCSIZE holds encrypted part 8201F35E 107 MBICS EQU MBENC(MBENCSIZE-1) holds internal (encrypted) checksum C201F35E 108 MBOCS BSSC 1 holds external checksum 109 110 ********************************************************************************** 111 * Message Holder blocks * 112 * These blocks hold the messages that have been prepared for * 113 * transmission. The corresponding MSN and extra time * 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 529 (DEFS)T) F 39 RFP Line Protocol Routines 114 * allowance are stored along with the encrypted message. * 115 ********************************************************************************** 116 0001F35F 117 CURXMHB BSS 1 points to next MHB to be send 0001F360 118 NEXTMHB BSS 1 points to next MHB to be filled 119 0001F361 120 MHPROTO BASE R4 prototype for Message Holder block 1F361 0001F366 121 MHLINK PTR MHB1 link to next block 00170801 4 BASE 122 MHMB BSS2 1 last transmitted message ciphertext 00090013 4 ZBM 123 MHACTIVE BSSB 1 one if active (cleared when response rcvd 00090213 4 ZBM 124 MHSENT BSSB 1 set if this msg has been transmitted 125 BSSB 6 filler 00091183 4 ZBM 126 MHXTIM BSSB 24 last transmitted message extra time required 00170804 4 BASE 127 MHMSN BSS 1 last transmitted message MSN 128 DRCT 129 1F366 0001F36B 130 MHB1 PTR MHB2 131 BSS 4 132 1F36B 0001F370 133 MHB2 PTR MHB3 134 BSS 4 135 1F370 0001F375 136 MHB3 PTR MHB4 137 BSS 4 138 1F375 0001F37A 139 MHB4 PTR MHB5 140 BSS 4 141 1F37A 0001F37F 142 MHB5 PTR MHB6 143 BSS 4 144 1F37F 0001F384 145 MHB6 PTR MHB7 146 BSS 4 147 1F384 0001F361 148 MHB7 PTR MHPROTO link list into circle 149 BSS 4 150 151 ********************************************************************************** 152 * * 153 * The following buffer is provided to gather up all of * 154 * the response words from any given request. Each succeeding * 155 * response is placed into the next doubleword. Each request * 156 * starts filling at the buffer beginning. * 157 * * 158 ********************************************************************************** 159 0001F389 160 LASTRMB BSS2 1 last received message ciphertext 161 0001F38B 162 RESPBINDX BSS 1 count of entries in the buffer 1F38C 52202020 163 RESPBUFFH ASCII 1,R 0001F38D 164 RESPBUFFER BSS2 MAXRESPS enough room for the maximum number of returns 165 166 ********************************************************************************** 167 * * 168 * Buffers for the state save routine. The response * 169 * fetcher will save all of the good messages in a group * 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 530 (DEFS)T) F 39 RFP Line Protocol Routines 170 * so that we don't require all messages to be good on * 171 * the same transmission. * 172 * The STSVSTAT array will hold a small integer * 173 * indicating what is saved and where: * 174 * 0 - nothing saved * 175 * 1 - a failing message is stored in STSVAR0 * 176 * 2 - failing messages are in both STSVAR0 and STSVAR1 * 177 * 3 - a good message is stored in STSVAR0 * 178 * The code that manages these saved messages will even go * 179 * so far as to try averaging three bad messages trying to avoid * 180 * another retry. However, it should be remembered that * 181 * this averaging will not help against a sync error (a lost * 182 * or extra character). It does not hurt in that case, however, * 183 * so we leave it in for the help it does give. * 184 * * 185 ********************************************************************************** 186 0001F3AD 187 STSVSTAT BSS MAXRESPS holds the status for its ordinal 0001F3BD 188 STSVAR0 BSS2 MAXRESPS holds a good or the first bad response 0001F3DD 189 STSVAR1 BSS2 MAXRESPS holds the second bad response 190 191 ********************************************************************************** 192 * * 193 * The following is the buffer that receives the * 194 * initial call up response. We will verify several * 195 * items that are returned by the SSU into this buffer. * 196 * Each field is named to aid in program readability. * 197 * * 198 ********************************************************************************** 199 0001F3FD 200 ICURESP LABEL initial call-up response 0001F3FD 201 ICURSSUSN BSS 1 SSU serial number 0001F3FE 202 ICURSSN BSS 1 system serial number 0001F3FF 203 ICURXFSD BSS2 0 following two words XORed into FSD 0201F3FF 204 ICURCPI BSSC 1 control panel indicators 4201F3FF 205 ICUROSI BSSC 1 other state information 8201F3FF 206 ICURDATE BSSC 6 current date-time 0201F401 207 ICURUCR BSSC 1 microcode revision level 4201F401 208 ICURCS BSSC 1 checksum 00000012 ABS 209 ICURSIZE EQU DISPC ICURESP size of initial call-up response 210 211 212 * buffer for the autodialer phone number 213 00000040 ABS 214 MAXDIALSTR EQU 64 length of dialer buffer 0001F402 215 DIALERBUFW LABEL so we have a word address, too 216 BSSC MAXDIALSTR the actual buffer 217 218 * Table to hold the pseudo random numbers. Since the generator 219 * that we use can only generate them in the forward direction, 220 * and we need to use them in the reverse direction, we generate 221 * all of the numbers then use them in the reverse order. 222 0001F412 223 PRNTABLE BSS L*ROUNDS space for one PRN for each bit exchange 224 225 * site information 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 531 (DEFS)T) F 39 RFP Line Protocol Routines 226 0001F4A2 227 SIRATE BSS 1 0 - low, 1 - high, or 0001F4A3 228 SIFONE BSS 1 pointer to system data phone number 0001F4A4 229 SIKEY BSS2 1 key for remote system 0001F4A6 230 SICLASS BSS 1 call class for site 231 232 * Global control variables 233 0001F4A7 234 LASTGOOD BSS2 1 time of last good response 235 0001F4A9 236 RDULUN BSS 1 unit for configuration files 0001F4AA 237 DIALLUN BSS 1 unit for autodialer to be used on 0001F4AB 238 TALKLUN BSS 1 unit for modem to remote machine 239 0001F4AC 240 TALKINDEX BSS 1 holds index to modem that we hold 241 0001F4AD 242 FAILCOUNT BSS 1 counts errors on this link 0001F4AE 243 SYNECOUNT BSS 1 counts sync errors 244 245 ********************************************************************************** 246 * * 247 * These tables hold the information about the configuration * 248 * of modems and dialers at this RDF site. This table is * 249 * build by the configuration section of the IOINIT routine. * 250 * * 251 ********************************************************************************** 252 00000020 ABS 253 MODTABMAX EQU 32 maximum number of modems allowed 00000008 ABS 254 MODADDL EQU 8 number of words for a modem address 255 0001F4AF 256 DIALNAME BSS2 MODTABMAX table of dialers corresponding to modems 0001F4EF 257 MODNAME BSS2 MODTABMAX table of ports available for dialout 0001F52F 258 MODSPEED BSS MODTABMAX table of allowable speeds 0001F54F 259 MODADD BSS MODADDL*MODTABMAX table of dialer addresses (to send dialer) 0001F64F 260 MODCLASS BSS MODTABMAX table of modem classes 261 0001F66F 262 MODTABINDX BSS 1 holds total number of modems configured 263 264 ********************************************************************************** 265 * * 266 * Baud rate constants for the communication link * 267 * For SSU microcode revisions 15 and earlier, the SSU always * 268 * expected the initial callup phase to be at 150 baud if remote * 269 * and 2400 baud if local. SSU microcode revisions 16 and later * 270 * measure the length of the initial break and set the initial baud * 271 * rates as appropriate. * 272 * In the older versions of the RDU program, the only baud * 273 * rate options were 'LOW', which retained the 150 or 2400 baud * 274 * initial rate, and 'HIGH', which used the baud rate change * 275 * command to change the baud rate to 1200 baud (for remote) or * 276 * 9600 baud (for local). * 277 * The newer versions of the RDU program still allow this * 278 * format. However, since Hayes compatible modems do not allow the * 279 * baud rate to be changed after it is once set, the current RDU * 280 * program allows a specific baud rate to appear in the SITEFILE. * 281 * The break length is matched to this baud rate and all * 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 532 (DEFS)T) F 39 RFP Line Protocol Routines 282 * communications are at the specified rate. * 283 * * 284 ********************************************************************************** 285 0001F670 286 SLOW BSS 1 holds the low rate for this type of access 0001F671 287 FAST BSS 1 holds the high rate 0001F672 288 CURRENTRAT BSS 1 holds the current baud rate 0001F673 289 BREAKLEN BSS 1 holds length of break to send 290 00000096 ABS 291 RMTLOBAUD EQU 150 low baud rate for remote access 000004B0 ABS 292 RMTHIBAUD EQU 1200 high baud rate for remote access 00000960 ABS 293 LCLLOBAUD EQU 2400 low baud rate for local access 00002580 ABS 294 LCLHIBAUD EQU 9600 high baud rate for local access 295 296 297 * Block for equip operations that equip ports 298 0001F674 299 EQUIPBLOCK LABEL 1F675 00000000 300 VFD 0,0 volume name 1F676 00000000 301 VFD 0 system name 1F678 00000000 302 VFD 0,0 password 303 1F679 6FA664B3 304 PAK12 HARDWARE account name 1F67B B6740200 305 PAK6 SYS project 1F67D 00000000 306 VFD 0,0 password 307 1F67E A29DA8F2 308 PORTNAME PAK12 PORTxx (impure) file name 1F680 B980D7C0 309 PAK6 TERM extension 1F682 00000000 310 VFD 0,0 password 311 1F683 00000000 312 VFD 0 reserved for access 313 314 ********************************************************************************** 315 * Here are all of the definitions concerning the interrupt * 316 * processing. * 317 ********************************************************************************** 318 80200000 ABS 319 EVENTMASK EQU 080200000 interrupt enable and timer interrupt 02000000 ABS 320 BRKMASK EQU 002000000 terminal break interrupt 00400000 ABS 321 PATHMASK EQU 000400000 path data interrupt 322 0001F684 323 INTVECTOR LABEL the interrupt vector for user interrupts 1F684 0001F686 324 PTR REGBUFFER => where the interrupted routine registers are stored 1F685 0001F86B 325 PTR INTCODE => the interrupt routine 326 0001F686 327 REGBUFFER BSS 12 hold area for the registers 0001F68E 328 INTREGSPC EQU REGBUFFER(8) PC in the interrupt registers 329 0001F692 330 INTERPC BSS 1 main line PC at time of interrupt 0001F693 331 INTERCODE BSS2 1 code and sub-code for interrupt 0001F694 332 INTERSUBCD EQU INTERCODE(1) sub-code part 333 1F695 00000000 334 TIMEOUTPC VFD 0 pc to use on interrupts 335 336 ********************************************************************************** 337 * * 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 533 (DEFS)T) F 39 RFP Line Protocol Routines 338 * For tracing events we store a call to the TRACE subroutine * 339 * in the following location. Otherwise it is just a NOP. * 340 * * 341 ********************************************************************************** 342 FEC00000 ABS 343 NOPINST EQU 0FEC00000 1F696 FEC00000 344 TRACEINST VFD NOPINST trace instruction 345 346 ********************************************************************************** 347 * Pointers * 348 * Here are grouped all of the pointers to the message * 349 * buffer. * 350 ********************************************************************************** 351 352 * Encrypt/Decrypt pointers 353 1F697 B049F359 354 AMSNLO10 PTR MSN/BIT 22 points to low 10 bits of MSN by bit 1F698 820DF359 355 AMSFSD PTR MSN/CH2 points to MSN, FSD bytes 1F699 D189F359 356 AMSNLO6 PTR MSN/BITS 26:31 pointer to MSN right 6 bits 1F69A 4049F35D 357 AMBB PTR MB/BIT 8 bit pointer to message block 1F69B 4189F35D 358 AMBC PTR MB/BITS 8:13 pointer to message block by SUBS6 element 359 360 * Pointers for use by the line protocol routines 361 1F69C 020DF35D 362 AMBMSN PTR MBMSN ptr to message sequence number field 0001F69C 363 AMBCHR EQU AMBMSN ptr to total message by characters 1F69D 420DF35D 364 AMBENC PTR MBENC ptr to encrypted part of message 1F69E 820DF35E 365 AMBICS PTR MBICS ptr to internal checksum 1F69F C20DF35E 366 AMBOCS PTR MBOCS ptr to outer checksum 367 368 * Pointers for use by the command processors 369 1F6A0 4109F35D 370 AMBCLASS PTR MB/BITS 8:11 pointer to the class field 00001020 BYTE 371 MOREBITS EQU BITS 8:9 bits in MB, if both 0, expect another response 1F6A1 6109F35D 372 AMBSLOT PTR MB/BITS 12:15 pointer to the slot number field 1F6A2 8009F35D 373 AMBDATA PTR MB/BITS 16:47 pointer to the data word 374 375 * Pointers for initial call-up response 376 1F6A3 020DF3FD 377 AICUR PTR ICURESP/CH0 pointer by characters 1F6A4 420DF401 378 AICURCS PTR ICURCS pointer to checksum 1F6A5 1049F3FF 379 AICURCPIEN PTR ICURCPI/BIT 26 ptr to RFP enabled bit 39 INPUT TRACE get in the trace routine 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 534 (TRACE)) F 40 RFP Line Protocol Routines 2 3 * Currently defined events are: 00000001 ABS 4 TDE01 EQU 01 IORDYMSG 5 * R0=data, R1=class, R2=slot 6 00000002 ABS 7 TDE02 EQU 02 IORDYMSG 8 * R0:R1=encrypted data, R2=MSN 9 00000003 ABS 10 TDE03 EQU 03 XMIT 11 * R0=return address, R1=callers return address 12 00000004 ABS 13 TDE04 EQU 04 beginning of GRESP 14 * R0=error address, R1=excess time, R2=callers address 15 00000005 ABS 16 TDE05 EQU 05 READRESP 17 * R0,R1= encrypted input, R2= number of chars 18 00000006 ABS 19 TDE06 EQU 06 CHKCS 20 * R0,R1=decrypted input 21 22 *TDE08 EQU 08 unused 23 0000000A ABS 24 TDE0A EQU 0A EMPTYBUF 25 0000000D ABS 26 TDE0D EQU 0D SENDBREAK 27 0000000E ABS 28 TDE0E EQU 0E RECVICR 29 * R0,R1=first 8 chars of response, R2=number of chars 30 00000014 ABS 31 TDE14 EQU 014 BADRCV in GRESP 32 * R0:R1=LASTRMB, R2=STSVSTAT 33 00000016 ABS 34 TDE16 EQU 016 CHKCS error 35 36 BLOCK block to enclose the TRACE routine 37 38 ENTRY TRACE entry point 39 40 ********************************************************************************** 41 * * 42 * This buffer is used to build the trace elements before * 43 * writing them to the session log. We put a blank as the first * 44 * char in the buffer for forms control, and a tilde (~) to make * 45 * it easier to pick these records out of the log. * 46 * * 47 ********************************************************************************** 48 0000002E ABS 49 TRACELEN EQU 46 size of buffer 0001F6A6 50 TRACEBUFW LABEL 1F6A5 0000007E 51 VFDC " ","~" 8201F6A6 52 TRACEBUFF BSSC TRACELEN-2 buffer to build trace element 1F6B2 820DF6A6 53 TRACEWRD1 PTR TRACEBUFF(0) where to put word 1 1F6B3 C20DF6A8 54 TRACEWRD2 PTR TRACEBUFF(9) where to put word 2 1F6B4 020DF6AB 55 TRACEWRD3 PTR TRACEBUFF(18) where to put word 3 1F6B5 420DF6AD 56 TRACEWRD4 PTR TRACEBUFF(27) where to put word 4 1F6B6 820DF6AF 57 TRACEWRD5 PTR TRACEBUFF(36) where to put word 5 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 535 (TRACE)) F 40 RFP Line Protocol Routines 58 59 ********************************************************************************** 60 * * 61 * TRACE routine. * 62 * This code records a trace event. This routine will log * 63 * the return address, an event code, the contents of R0:R2, * 64 * and the second word of the time. * 65 * We only reach here if a call has been stored into the * 66 * trace instruction. * 67 * Call: * 68 * CALLNP TRACE * 69 * NOP * 70 * No registers are destroyed. * 71 * stack required = 5 * 72 * * 73 ********************************************************************************** 74 00000001 ABS 75 SAVER0 EQU 1 save area for R0 00000002 ABS 76 SAVER1 EQU 2 save area for R1 00000003 ABS 77 SAVER2 EQU 3 save area for R2 00000004 ABS 78 SAVER3 EQU 4 save area for R3 00000005 ABS 79 STAKSIZE EQU 5 size of stack 80 00000080 BYTE 81 EVENTBITS EQU BITS 0:7 bits of word that event code goes into 82 1F6B7 DD5F8005 6 STAK 83 TRACE ENTRNP STAK SP,STAKSIZE 1F6B8 E6178801 016 BASE 84 ST2 R0 SP,SAVER0 save these registers 1F6B9 E6978803 236 BASE 85 ST2 R2 SP,SAVER2 save these registers 1F6BA 6044002C 1 IMM 86 LD R1 TRACELEN-2 size of buffer minus control chars 1F6BB 6081F6B2 2 87 LD R2 TRACEWRD1 R2 -> first word position in buffer 1F6BC FE580020 88 CFILL " " lots and lots of blanks 1F6BD 6013C000 0 7 REG 89 LD R0 R7 get the caller's address 1F6BE 6057C800 1 7 BASE 90 LD R1 R7,0 pick up the event code 1F6BF E44A0080 1 0 CBM 91 ST R1 R0/EVENTBITS add in to the call address 1F6C0 DC01B61A 92 CALL HEXTOCHAR put into output buffer 1F6C1 41520000 0 REG 93 PARV R0 what to pack 1F6C2 4011F6B2 @ 94 PARL @TRACEWRD1 where to put it 1F6C3 60D38000 3 6 REG 95 LD R3 SP R3 -> stack 1F6C4 DC01B61A 96 CALL HEXTOCHAR put into output buffer 1F6C5 4156C801 3 BASE 97 PARV R3,SAVER0 what to pack 1F6C6 4011F6B3 @ 98 PARL @TRACEWRD2 where to put it 1F6C7 DC01B61A 99 CALL HEXTOCHAR put into output buffer 1F6C8 4156C802 3 BASE 100 PARV R3,SAVER1 what to pack 1F6C9 4011F6B4 @ 101 PARL @TRACEWRD3 where to put it 1F6CA DC01B61A 102 CALL HEXTOCHAR put into output buffer 1F6CB 4156C803 3 BASE 103 PARV R3,SAVER2 what to pack 1F6CC 4011F6B5 @ 104 PARL @TRACEWRD4 where to put it 1F6CD 60040060 0 IMM 105 LD R0 URRAWDATE get request code 1F6CE 09040000 IMM 106 UREQ 0 get the system time 1F6CF DC01B61A 107 CALL HEXTOCHAR put into output buffer 1F6D0 4152C000 3 REG 108 PARV R3 what to pack 1F6D1 4011F6B6 @ 109 PARL @TRACEWRD5 where to put it 1F6D2 6044002E 1 IMM 110 LD R1 TRACELEN number of chars 1F6D3 6085F6A6 2 IMM 111 LD R2 ADR TRACEBUFW where they are 1F6D4 DC41CC3B 112 CALLNP LOGWRITETF put them in the log 1F6D5 62178801 016 BASE 113 LD2 R0 SP,SAVER0 restore R0:R1 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 536 (TRACE)) F 40 RFP Line Protocol Routines 1F6D6 62978803 236 BASE 114 LD2 R2 SP,SAVER2 restore these registers 1F6D7 5D1F8005 6 STAK 115 LEAVE STAK SP,STAKSIZE return to caller 116 * --- 117 118 END of TRACE routine 40 INPUT LINEPROTO get the line protocol handlers 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 537 (LINEPROTO) F 41 RFP Line Protocol Routines 2 3 BLOCK for message preparation routine 4 5 ENTRY IORDYMSG to checksum and encrypt a message 6 7 ********************************************************************************** 8 * * 9 * This routine is called when a message is to be * 10 * transmitted to the remote machine. This routine gets a * 11 * message ready for transmission by calculating the internal * 12 * checksum, doing the encryption, and calculating the * 13 * external (transmission) checksum. The message is copied * 14 * into the current transmit Message Holder element. Note * 15 * that R4 is destroyed during parameter passing. * 16 * Call: * 17 * CALL IORDYMSG * 18 * PARV * 19 * PARV * 20 * PARV * 21 * PARVL <32 bit data part> * 22 * Eats R0:R3, R4=> MH block * 23 * stack required = 7 * 24 * 1 + MAX( TRACE(5), RSTLNGTIMR(6), * 25 * INTCS(1), MFENCRYPT(3), EXTCS(1) ) * 26 * * 27 ********************************************************************************** 28 1F6D8 DD1F8001 6 STAK 29 IORDYMSG ENTR STAK SP,1 1F6D9 6101F360 4 30 LD R4 NEXTMHB load pointer to next available block 1F6DA C1491183 4 ZBM 31 STPV R4,MHXTIM save extra time required 1F6DB C151F6A0 @ 32 STPV @AMBCLASS 1F6DC C151F6A1 @ 33 STPV @AMBSLOT 1F6DD C051F6A2 @ 34 STPVL @AMBDATA 1F6DE 6051F6A0 1 @ 35 LD R1 @AMBCLASS ** for trace 1F6DF 6091F6A1 2 @ 36 LD R2 @AMBSLOT ** for trace 1F6E0 5D41F696 37 XCT TRACEINST record our presence here 1F6E1 FEC00001 38 NOP TDE01 indicate event 39 1F6E2 BC01F358 0 40 INCL R0 XMITMSN advance the message serial number 1F6E3 E4170804 0 4 BASE 41 ST R0 R4,MHMSN and save in the block 1F6E4 DC41FCAA 42 CALLNP INTCS do the internal checksum 1F6E5 E411F69E 0 @ 43 ST R0 @AMBICS emplace internal checksum 44 1F6E6 DC01FCD1 45 CALL MFENCRYPT encrypt the block 1F6E7 40570804 4 BASE 46 PARVL R4,MHMSN pass MSN to use 47 1F6E8 6081F358 2 48 LD R2 XMITMSN get the message sequence number 1F6E9 7C8400C0 2 IMM 49 IOR R2 0C0 put on the extra bits 1F6EA E491F69C 2 @ 50 ST R2 @AMBMSN and place into message 51 1F6EB DC41FCB2 52 CALLNP EXTCS do the external checksum 1F6EC E411F69F 0 @ 53 ST R0 @AMBOCS emplace external checksum 54 1F6ED 6201F35D 01 55 LD2 R0 MB get the prepared message 1F6EE E6170801 014 BASE 56 ST2 R0 R4,MHMB put into the transmit buffer 1F6EF 5D41F696 57 XCT TRACEINST record our presence here 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 538 (LINEPROTO) F 41 RFP Line Protocol Routines 1F6F0 FEC00002 58 NOP TDE02 indicate event 59 1F6F1 60170800 0 4 BASE 60 LD R0 R4,MHLINK get link to next available block 1F6F2 E401F360 0 61 ST R0 NEXTMHB and save 1F6F3 EDC90013 4 ZBM 62 STW R4,MHACTIVE indicate active message available 63 1F6F4 DC41F882 64 CALLNP RSTLNGTIMR reset the long interval timer 1F6F5 5D1F8001 6 STAK 65 LEAVE STAK SP,1 return to caller 66 * --- 67 68 END of message preparation 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 539 (LINEPROTO) F 41 RFP Line Protocol Routines 70 71 BLOCK routine to do the actual transmitting 72 73 ENTRY XMIT routine to transmit MB to the SSU 74 75 ********************************************************************************** 76 * * 77 * This code sends the 8 character message out of the * 78 * current MH block. * 79 * Additionally, if this is a re-transmission, we note * 80 * that the subsequent active messages will need to be * 81 * resent also. * 82 * Call: * 83 * R4 => MH block * 84 * CALLNP XMIT * 85 * * 86 * eats R0:R2 * 87 * stack required = 7 * 88 * 2 + max ( TRACE (5) ) * 89 * * 90 ********************************************************************************** 91 00000001 ABS 92 XR4SAVE EQU 1 place to save R4 93 1F6F6 DD5F8002 6 STAK 94 XMIT ENTRNP STAK SP,2 1F6F7 E5178801 4 6 BASE 95 ST R4 SP,XR4SAVE save the MH block pointer 96 0001F6F8 97 XMLP LABEL 1F6F8 6013C000 0 7 REG 98 LD R0 R7 ** for trace (return address) 1F6F9 60578800 1 6 BASE 99 LD R1 SP,0 ** for trace (their caller) 1F6FA 5D41F696 100 XCT TRACEINST record our presence here 1F6FB FEC00003 101 NOP TDE03 indicate event 1F6FC 60040042 0 IMM 102 LD R0 FRWRITEB indicate binary write (no forms control) 1F6FD 60440008 1 IMM 103 LD R1 MBSIZE get the buffer size 1F6FE 38970801 2 4 BASE 104 LEA R2 R4,MHMB and the buffer address 1F6FF 0881F4AB 105 FREQ TALKLUN output to the modem port 1F700 FA09F707 0 106 JLTZ R0 XMITERR jump on some type of error 1F701 EDC90213 4 ZBM 107 STW R4,MHSENT set marker indicating transmitted 1F702 61170800 4 4 BASE 108 LD R4 R4,MHLINK have a look at the next block 1F703 5C090013 4 ZBM 109 CMZ R4,MHACTIVE is it a currently active message 1F704 FE0DF6F8 110 JNE XMLP if so, this is a retransmit, re-fill the pipeline 111 1F705 61178801 4 6 BASE 112 LD R4 SP,XR4SAVE restore the MH block pointer 1F706 5D1F8002 6 STAK 113 LEAVE STAK SP,2 return to caller 114 * --- 115 0001F707 116 XMITERR LABEL 1F707 00000000 117 HALT 0 don't know any reason why should get error 118 * --- 119 120 END of transmit code 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 540 (LINEPROTO) F 41 RFP Line Protocol Routines 122 123 BLOCK send message and receive response 124 125 ENTRY GRESP receive response from SSU 126 127 ********************************************************************************** 128 * * 129 * This routine demands responses from the remote * 130 * machine. It attempts to read up to 16 responses stopping * 131 * as soon as a response comes back indicating that there are * 132 * no further response messages to come (either error or an * 133 * ACK with the last bit on). * 134 * When we enter this code, we assume that XMIT has been * 135 * called to send the message. In the case of errors, however, * 136 * we will call XMIT for the necessary retransmission. * 137 * This routine uses the extra time allowed parameter in * 138 * two ways: 1, we allow that much extra time for the first * 139 * response. 2, we add the extra time to the ultimate * 140 * time-out value. We only add it once, since the RFP will * 141 * only do the work once. (If we get back a no response * 142 * because the request was not received, or we lost the NAK, * 143 * by rights we would need to add another extra interval. * 144 * Sorry! ) * 145 * If a response that comes in is bad, we look to see if * 146 * we got a good response on a prior attempt. If so, we will * 147 * use it. If we have on hand three bad responses, we average * 148 * them together and check to see if that is a winner. If we * 149 * get a good response, and we have a prior good response, we * 150 * ensure that they are the same. This will allow recovery * 151 * from sync errors. * 152 * Call: * 153 * R4 => MH block * 154 * CALL GRESP * 155 * PARVL ADR * 156 * * 157 * On return, RESPBUFFER contains all of the * 158 * responses received, and RESPBINDX contains a * 159 * count of entries therin. * 160 * Eats R0:R3 * 161 * stack required = 10 * 162 * 4 + MAX( EMPTYBUF(1), XMIT (6), READRESP (6), * 163 * CHKCS (6), TRACE (5), LONGTIMER(1) ) * 164 * * 165 ********************************************************************************** 166 00000010 BYTE 167 BADFLAG EQU BIT 0 flag to indicate at least one response was bad 00000210 BYTE 168 ENDFLAG EQU BIT 1 flag to indicate that this response is last 169 00000001 ABS 170 SMSERAD EQU 1 error address holder on stack 00000002 ABS 171 SMSR5SAV EQU 2 place to save R5 00000003 ABS 172 SMSTKSZ EQU 3 size of stack 173 1F708 DD1F8003 6 STAK 174 GRESP ENTR STAK SP,SMSTKSZ 1F709 C0578801 6 BASE 175 STPVL SP,SMSERAD save the error address 176 1F70A 60491183 1 4 ZBM 177 LD R1 R4,MHXTIM ** for trace 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 541 (LINEPROTO) F 41 RFP Line Protocol Routines 1F70B 6093C000 2 7 REG 178 LD R2 R7 ** for trace (callers address) 1F70C 5D41F696 179 XCT TRACEINST record our presence here 1F70D FEC00004 180 NOP TDE04 indicate event 181 1F70E 60440040 1 IMM 182 LD R1 MAXRESPS*CPW get size of saved message status buffer 1F70F 6085F3AD 2 IMM 183 LD R2 ADR STSVSTAT and its address for... 1F710 FE580000 184 CFILL 000 ...the clearing operation 185 1F711 60040000 0 IMM 186 LD R0 0 sign extension 1F712 60491183 1 4 ZBM 187 LD R1 R4,MHXTIM get the indicated excess time 1F713 1E0403E8 01 IMM 188 MUL2 R0 MSECS convert to milliseconds 1F714 9A01F4A7 01 189 ADD2M R0 LASTGOOD update to prevent premature timeout 190 1F715 E5578802 5 6 BASE 191 ST R5 SP,SMSR5SAV save this register 192 0001F716 193 RETRY LABEL 1F716 61440000 5 IMM 194 LD R5 0 start at response buffer beginning 1F717 EC0BC020 7 CBM 195 STZ R7/(BADFLAG+ENDFLAG) indicate no bad response yet 1F718 60491183 1 4 ZBM 196 LD R1 R4,MHXTIM get the indicated excess time 1F719 1841F355 1 197 ADD R1 SHINTO increase by allowed minimum 1F71A FE0FF71C 198 JMP FIRSTREAD go into main loop 199 * --- 200 201 ********************************************************************************** 202 * * 203 * This is the loop that gathers in the responses. * 204 * Transmissions from the SSU are divided into one or more * 205 * responses of 8 characters each, each of which has its own * 206 * checksums. Therefore, we process each such response * 207 * separately. In the case of multiple responses, we keep track * 208 * of the ones that we have received correctly, and do not demand * 209 * another perfect transmission of that particular response. * 210 * * 211 ********************************************************************************** 212 0001F71B 213 ANORESPW LABEL 1F71B 60440002 1 IMM 214 LD R1 2 allow only two seconds for other than first response 0001F71C 215 FIRSTREAD LABEL 1F71C DC41F788 216 CALLNP READRESP read in a response 1F71D FE0FF75B 217 JMP BADXMIT jump if SSU NAKed or timed out 0001F71E 218 SAVATTEMPT LABEL 1F71E DC41FC94 219 CALLNP CHKCS decrypt and check checksums 1F71F FE0FF73D 220 JMP BADRCV jump if check sum didn't check 221 * \ / this response checks good. See about... 222 * ...saving a copy in case of a retry. 1F720 6201F389 01 223 LD2 R0 LASTRMB get the still encrypted response 1F721 60ABF3AD 2 5 224 LD R2 STSVSTAT(R5) see what we already have saved 1F722 68840003 2 IMM 225 UCPR R2 3 check for a good response already saved 1F723 FE0DF72B 226 JNE DOSTORE jump if a good response is not already held 1F724 6A2BF3BD 01 5 227 UCPR2 R0 STSVAR0(R5) is this 'good' response the same as before? 1F725 FE03F759 228 JEQ CHECKLAST yes, we'll take it 229 * \ / oops, looks like a sync error 1F726 E62BF3DD 01 5 230 ST2 R0 STSVAR1(R5) so save this response in other place 1F727 60840002 2 IMM 231 LD R2 2 get code to say that both are bad responses 1F728 E4ABF3AD 2 5 232 ST R2 STSVSTAT(R5) and indicate such in status array 0001F729 233 MARKOUT LABEL indicate that we do not have a good... 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 542 (LINEPROTO) F 41 RFP Line Protocol Routines 1F729 EDCBC010 7 CBM 234 STW R7/BADFLAG ...entry in this position 1F72A FE0FF733 235 JMP LASTUNK now, continue the loop 236 * --- 237 0001F72B 238 DOSTORE LABEL 1F72B E62BF3BD 01 5 239 ST2 R0 STSVAR0(R5) save the good response in this array 1F72C 60840003 2 IMM 240 LD R2 3 get code to say good response here 1F72D E4ABF3AD 2 5 241 ST R2 STSVSTAT(R5) and place into array 1F72E 6001F35D 0 242 LD R0 MB get the first half of the MB 243 * (contains Class and Slot) 1F72F 6051F6A2 1 @ 244 LD R1 @AMBDATA get the data word 1F730 E62BF38D 01 5 245 ST2 R0 RESPBUFFER(R5) and put reformatted response into buffer 0001F731 246 NOACTION LABEL 247 * come here with last decrypted response in R0:R1 1F731 5C0A1020 0 CBM 248 CMZ R0/MOREBITS check the last and error bits 1F732 ED8BC210 7 CBM 249 STLNE R7/ENDFLAG set end if last or error is true 0001F733 250 LASTUNK LABEL come here if no good response in this 251 * position. We will try for another and time out 252 * if this should have been last. 1F733 19440001 5 IMM 253 ADD R5 1 advance store index to next response 1F734 65440010 5 IMM 254 CPR R5 MAXRESPS compare with number expected 1F735 FE07F737 255 JGE ALLBACK jump if all expected responses have arrived 1F736 F3C3F71B 7 256 JBF R7/ENDFLAG ANORESPW if this message not last, go try another fetch 257 * \ / terminating class, abnormal termination of response stream 0001F737 258 ALLBACK LABEL 1F737 F7C1F75C 7 259 JBT R7/BADFLAG BADXMITA jump if this was not a good run 1F738 E541F38B 5 260 ST R5 RESPBINDX save count of good entries for callers 1F739 EC090013 4 ZBM 261 STZ R4,MHACTIVE indicate no longer outstanding msg 1F73A EC090213 4 ZBM 262 STZ R4,MHSENT and not sent either 1F73B 61578802 5 6 BASE 263 LD R5 SP,SMSR5SAV restore this register 1F73C 5D1F8003 6 STAK 264 LEAVE STAK SP,SMSTKSZ return 265 * --- 266 267 ********************************************************************************** 268 * * 269 * We come here when the current response has a checksum error. * 270 * We will look to see if we have saved an earlier, error-free, * 271 * version of this response. If so, we continue on without marking * 272 * that a retry is necessary. * 273 * If not, we save this response on the chance that three * 274 * bad responses can be averaged together to make a good response. * 275 * * 276 ********************************************************************************** 277 0001F73D 278 BADRCV LABEL 1F73D D001F4AD 279 INC FAILCOUNT keep the statistic 1F73E 6201F389 01 280 LD2 R0 LASTRMB get the ciphertext form of this message 1F73F 60ABF3AD 2 5 281 LD R2 STSVSTAT(R5) see what is currently on file 1F740 5D41F696 282 XCT TRACEINST record our presence here 1F741 FEC00014 283 NOP TDE14 indicate event 1F742 78840003 2 IMM 284 AND R2 3 chop off impossible bits 1F743 5CA5F744 2 285 LDPC STSVJTAB(R2) and go to correct place 286 * --- 287 0001F744 288 STSVJTAB LABEL 1F744 0001F748 289 PTR SAVE1 nothing saved now, save this as bad 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 543 (LINEPROTO) F 41 RFP Line Protocol Routines 1F745 0001F74B 290 PTR SAVE2 one saved now, save this too 1F746 0001F74E 291 PTR DOAVE two saved, average these three 1F747 0001F759 292 PTR CHECKLAST a good one saved, just go for next 293 0001F748 294 SAVE1 LABEL 1F748 E62BF3BD 01 5 295 ST2 R0 STSVAR0(R5) save this message 1F749 EDEBF3AD 5 296 STW STSVSTAT(R5) and indicate we have a single bad one 1F74A FE0FF729 297 JMP MARKOUT mark as a failure on this pass 298 * --- 299 0001F74B 300 SAVE2 LABEL 1F74B E62BF3DD 01 5 301 ST2 R0 STSVAR1(R5) save this message 1F74C D02BF3AD 5 302 INC STSVSTAT(R5) and indicate that we now have two bad ones 1F74D FE0FF729 303 JMP MARKOUT mark as a failure on this pass 304 * --- 305 0001F74E 306 DOAVE LABEL 1F74E 7A2BF3BD 01 5 307 AND2 R0 STSVAR0(R5) find where CUR and #0 both have ones 1F74F 6281F389 23 308 LD2 R2 LASTRMB get another copy of current message 1F750 7AABF3DD 23 5 309 AND2 R2 STSVAR1(R5) find where CUR and #1 both have ones 1F751 7E148000 0123 PAIR 310 IOR2 R0 PAIR R2 combine with other combination 1F752 62ABF3BD 23 5 311 LD2 R2 STSVAR0(R5) get #0 message 1F753 7AABF3DD 23 5 312 AND2 R2 STSVAR1(R5) find where #0 and #1 both have ones 1F754 7E148000 0123 PAIR 313 IOR2 R0 PAIR R2 a one in any pair is a winner 1F755 E601F35D 01 314 ST2 R0 MB save to be decrypted 1F756 E601F389 01 315 ST2 R0 LASTRMB save as if we just received it 1F757 EC2BF3AD 5 316 STZ STSVSTAT(R5) indicate that we have nothing 1F758 FE0FF71E 317 JMP SAVATTEMPT go see if it is good 318 * --- 319 0001F759 320 CHECKLAST LABEL 1F759 622BF38D 01 5 321 LD2 R0 RESPBUFFER(R5) get the already present good response 1F75A FE0FF731 322 JMP NOACTION go do other housekeeping 323 * --- 324 0001F75B 325 BADXMIT LABEL 1F75B D001F4AE 326 INC SYNECOUNT count up as sync error 0001F75C 327 BADXMITA LABEL 1F75C DC41F887 328 CALLNP LONGTIMER check for long interval exhaustion 1F75D FE0FF761 329 JMP DODISC if so, go to disconnect 1F75E DC41F7B2 330 CALLNP EMPTYBUF clean out any garbage characters 1F75F DC41F6F6 331 CALLNP XMIT send message to SSU 1F760 FE0FF716 332 JMP RETRY give it another try if within limits 333 * --- 334 0001F761 335 DODISC LABEL 1F761 61D78801 7 6 BASE 336 LD R7 SP,SMSERAD get the error return address 1F762 E541F38B 5 337 ST R5 RESPBINDX save count of good entries for callers 1F763 EC090013 4 ZBM 338 STZ R4,MHACTIVE indicate no longer outstanding msg 1F764 EC090213 4 ZBM 339 STZ R4,MHSENT and not sent either 1F765 61578802 5 6 BASE 340 LD R5 SP,SMSR5SAV restore this register 1F766 5D1F8003 6 STAK 341 LEAVE STAK SP,SMSTKSZ and return thereto 342 * --- 343 344 END of send message and receive response 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 544 (LINEPROTO) F 41 RFP Line Protocol Routines 346 347 BLOCK receive initial callup response routines 348 349 ENTRY RECVICR receive the initial callup response 350 351 ********************************************************************************** 352 * * 353 * This code fetches in the response to an initial callup * 354 * break. We give an error return if something is obviously * 355 * wrong. We check for wrong number of characters, terminal * 356 * read error, and checksum failure. * 357 * This routine reads characters from the remote machine * 358 * (connected to TALKLUN). Since the terminating character * 359 * group consists of all characters, we specify a read with * 360 * a null buffer. Every character will come back as a * 361 * terminator. Framing errors and the like are ignored, they * 362 * will show up when we checksum the message. * 363 * * 364 * Call: * 365 * CALLNP RECVICR to receive the initial callup response * 366 * JMP ERROR jump if a bad response * 367 * * 368 * Eats R0:R3 * 369 * stack required = 6 * 370 * 1 + MAX( TRACE(5), EMPTYBUF(1), CHECKICUR(2) ) * 371 * * 372 ********************************************************************************** 373 1F767 DD5F8001 6 STAK 374 RECVICR ENTRNP STAK SP,1 375 1F768 D341F3FD 376 STMW2 ICURESP clear buffer to aid in trace analysis 377 1F769 6041F355 1 378 LD R1 SHINTO load amount of time expected 1F76A 60040141 0 IMM 379 LD R0 URSETTIMIN get code for select interrupt 1F76B 09040000 IMM 380 UREQ 0 go set up timer interrupt 1F76C EC01F693 381 STZ INTERCODE indicate no interrupt code yet 1F76D 6005F77D 0 IMM 382 LD R0 ADR BADREADI get error address 1F76E E401F695 0 383 ST R0 TIMEOUTPC now save the interrupt PC. This 384 * is done after the UREQ in case 385 * an earlier leftover interrupt comes 386 * through 1F76F 60C40000 3 IMM 387 LD R3 0 load an initial index 0001F770 388 READAGAIN LABEL 1F770 60040031 0 IMM 389 LD R0 FRREADB get the code for read 1F771 60440000 1 IMM 390 LD R1 0 indicate buffer size 1F772 0881F4AB 391 FREQ TALKLUN go to read the next character 392 1F773 E4B7F6A3 2 3 @ 393 ST R2 @AICUR(R3) place it into the buffer 1F774 18C40001 3 IMM 394 ADD R3 1 advance the index 1F775 64C40012 3 IMM 395 CPR R3 ICURSIZE have we received the whole response? 1F776 FE09F770 396 JLT READAGAIN jump back for another char if not 397 * \ / 1F777 EC01F695 398 STZ TIMEOUTPC indicate no interrupt pending anymore 1F778 60040142 0 IMM 399 LD R0 URCLRTIMIN now clear interrupt request 1F779 09040000 IMM 400 UREQ 0 1F77A DC41FCBA 401 CALLNP CHECKICUR check the response checksum 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 545 (LINEPROTO) F 41 RFP Line Protocol Routines 1F77B FE0FF782 402 JMP NOGOOD jump if it is not good 1F77C 19C40001 7 IMM 403 ADD R7 1 advance return address to good return 0001F77D 404 BADREADI LABEL timeout, give error return 1F77D 6201F3FD 01 405 LD2 R0 ICURESP pick up the first 8 chars for trace 1F77E 6092C000 2 3 REG 406 LD R2 R3 copy the character count 1F77F 5D41F696 407 XCT TRACEINST record our presence here 1F780 FEC0000E 408 NOP TDE0E indicate code 1F781 5D1F8001 6 STAK 409 LEAVE STAK SP,1 return to caller 410 * --- 411 0001F782 412 NOGOOD LABEL 413 * absorb any left over characters to 414 * ensure recovery from sync errors. 1F782 6041F354 1 415 LD R1 EMPTYTO load shortest amount of time 1F783 60840000 2 IMM 416 LD R2 0 mask for interrupting conditions 1F784 60040140 0 IMM 417 LD R0 URDELAY call for a plain delay 1F785 09040000 IMM 418 UREQ 0 wait for any garbage to show up 1F786 DC41F7B2 419 CALLNP EMPTYBUF clean out anything that arrived 420 1F787 FE0FF77D 421 JMP BADREADI now done, return bad to caller 422 * --- 423 424 END of initial response reader 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 546 (LINEPROTO) F 41 RFP Line Protocol Routines 426 427 BLOCK routines to get normal responses 428 429 ENTRY READRESP just gets correct number of characters 430 431 ********************************************************************************** 432 * * 433 * Routine to read the response from the SSU. * 434 * This routine sets up a time interval (as specified by * 435 * the caller) and waits for the first character to arrive. * 436 * It is checked for a NAK. If the first character is not a * 437 * NAK, we set up an additional short interval and read 7 * 438 * more characters to complete the response. Any timeout * 439 * gives the error return. * 440 * This routine reads characters from the remote machine * 441 * (connected to TALKLUN). Since the terminating character * 442 * group consists of all characters, we specify a read with * 443 * a null buffer. Every character will come back as a * 444 * terminator. Framing errors and the like are ignored, they * 445 * will show up when we checksum the message. * 446 * Call: * 447 * R1 = total time to give for first response character * 448 * R4 => MH block * 449 * CALLNP READRESP * 450 * * 451 * Eats R0:R3 * 452 * stack required = 6 * 453 * 1 + max ( EMPTYBUF(1), TRACE(5) ) * 454 * * 455 ********************************************************************************** 456 1F788 DD5F8001 6 STAK 457 READRESP ENTRNP STAK SP,1 458 * R1 = time to allow for first character 1F789 60040141 0 IMM 459 LD R0 URSETTIMIN get code for select interrupt 1F78A 09040000 IMM 460 UREQ 0 go set up timer interrupt 1F78B EC01F693 461 STZ INTERCODE indicate no interrupt code yet 1F78C 6005F7A6 0 IMM 462 LD R0 ADR JCOPYEXIT get error address 1F78D E401F695 0 463 ST R0 TIMEOUTPC now save the interrupt PC. This 464 * is done after the UREQ in case 465 * an earlier leftover interrupt comes 466 * through 1F78E 60040031 0 IMM 467 LD R0 FRREADB get the code for read 1F78F 60440000 1 IMM 468 LD R1 0 indicate buffer size 1F790 0881F4AB 469 FREQ TALKLUN go to read the first character 470 * character returned in R2 1F791 E491F69C 2 @ 471 ST R2 @AMBCHR store char into message (byte 0) 1F792 64840015 2 IMM 472 CPR R2 NAK check for an ascii nak 1F793 FE03F7AC 473 JEQ BADREADM jump if so, pretend message bad 474 1F794 60440002 1 IMM 475 LD R1 2 time to allow for each char other than first 1F795 60040141 0 IMM 476 LD R0 URSETTIMIN get code for select interrupt 1F796 09040000 IMM 477 UREQ 0 go set up timer interrupt 1F797 EC01F693 478 STZ INTERCODE indicate no interrupt code yet 1F798 6005F7A6 0 IMM 479 LD R0 ADR JCOPYEXIT get error address 1F799 E401F695 0 480 ST R0 TIMEOUTPC now save the interrupt PC. This 481 * is done after the UREQ in case 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 547 (LINEPROTO) F 41 RFP Line Protocol Routines 482 * an earlier leftover interrupt comes 483 * through 1F79A 60C40001 3 IMM 484 LD R3 1 load the store index (and counter) 485 0001F79B 486 NEXTCHAR LABEL 1F79B 60040031 0 IMM 487 LD R0 FRREADB get the code for read 1F79C 60440000 1 IMM 488 LD R1 0 indicate buffer size 1F79D 0881F4AB 489 FREQ TALKLUN go to read the next character 490 * character returned in R2 1F79E E4B7F69C 2 3 @ 491 ST R2 @AMBCHR(R3) store character into message 1F79F 18C40001 3 IMM 492 ADD R3 1 advance the index 1F7A0 64C40008 3 IMM 493 CPR R3 MBSIZE have we received the whole response? 1F7A1 FE09F79B 494 JLT NEXTCHAR jump back for another char if not 495 * \ / fall through when complete message here 1F7A2 EC01F695 496 STZ TIMEOUTPC indicate no interrupt pending anymore 1F7A3 60040142 0 IMM 497 LD R0 URCLRTIMIN now clear interrupt request 1F7A4 09040000 IMM 498 UREQ 0 1F7A5 19C40001 7 IMM 499 ADD R7 1 advance to good return 0001F7A6 500 JCOPYEXIT LABEL 1F7A6 6201F35D 01 501 LD2 R0 MB get the stuff that we just read 1F7A7 E601F389 01 502 ST2 R0 LASTRMB and save for debugging of line problems 1F7A8 6092C000 2 3 REG 503 LD R2 R3 R2 is index into chars 1F7A9 5D41F696 504 XCT TRACEINST record our presence here 1F7AA FEC00005 505 NOP TDE05 indicate code 1F7AB 5D1F8001 6 STAK 506 LEAVE STAK SP,1 return to caller 507 * --- 508 509 ********************************************************************************** 510 * * 511 * We arrive here when we have received a NAK. Due to * 512 * the possibility of syncronization errors, we delay until * 513 * the SSU times out. At that time, it will clear its input * 514 * buffer of any garbage that might have arrived (e. g. the * 515 * eighth character of a legitimate message if it earlier * 516 * received a garbage character). This ensures that we * 517 * recover from sync errors and don't forever receive the * 518 * last character from a previous try and the newest 7. * 519 * Starting with Rev 12 SSU microcode, the SSU will delay * 520 * and clear its input buffer when it sends a NAK. However, * 521 * there are still ways that sync errors can occur. * 522 * * 523 ********************************************************************************** 524 0001F7AC 525 BADREADM LABEL we have received a NAK 526 * absorb any left over characters to 527 * ensure recovery from sync errors. 1F7AC 6041F356 1 528 LD R1 NAKTO get delay, big enough to ensure 529 * timeout of SSU after it sends a NAK 1F7AD 60840000 2 IMM 530 LD R2 0 mask for interrupting conditions 1F7AE 60040140 0 IMM 531 LD R0 URDELAY call for a plain delay 1F7AF 09040000 IMM 532 UREQ 0 wait for any garbage to show up 1F7B0 DC41F7B2 533 CALLNP EMPTYBUF clean out anything that arrived 1F7B1 FE0FF7A6 534 JMP JCOPYEXIT exit when done 535 * --- 536 537 END of routines to acquire the normal response 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 548 (LINEPROTO) F 41 RFP Line Protocol Routines 539 540 BLOCK routine to empty the input unit buffer 541 542 ENTRY EMPTYBUF routine to empty input buffer 543 544 ********************************************************************************** 545 * * 546 * The empty buffer routine is provided to ensure that * 547 * a transaction starts with an empty buffer. This is * 548 * necessary in case a noise character is received, since * 549 * without it the RDS and RFP would stay out of sync until * 550 * a timeout occurred. Note that the EMPTYBUF routine does * 551 * not wait at all for any extra input. This means that if * 552 * we have had an error that could be a sync error (but is * 553 * not already a timeout) we must allow a little time for * 554 * any stray characters to arrive before calling EMPTYBUF. * 555 * Call: * 556 * * 557 * CALLNP EMPTYBUF * 558 * * 559 * Registers Used: R0-R2 * 560 * Stack Required: 1 * 561 * * 562 ********************************************************************************** 563 1F7B2 DD5F8001 6 STAK 564 EMPTYBUF ENTRNP STAK SP,1 1F7B3 5D41F696 565 XCT TRACEINST record this historic event 1F7B4 FEC0000A 566 NOP TDE0A 567 * \ / 1F7B5 600401B1 0 IMM 568 LD R0 FRTFLSHI input buffer flush 1F7B6 0881F4AB 569 FREQ TALKLUN from remote system 570 * clear all msg sent bits 1F7B7 60130000 0 4 REG 571 LD R0 R4 get pointer to current element 0001F7B8 572 EBSLP LABEL 1F7B8 D1880213 0 ZBM 573 CLRT R0,MHSENT clear the 'sent' bit here 1F7B9 FE03F7BB 574 JEQ EBACT no change, done 1F7BA FA37F7B8 0 575 LJNA R0 EBSLP move to next element 576 * --- 0001F7BB 577 EBACT LABEL 1F7BB 5D1F8001 6 STAK 578 LEAVE STAK SP,1 return to caller 579 * --- 580 581 END of empty input buffer routine 41 INPUT MSGMAKERS routines that construct messages 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 549 (MSGMAKERS) F 42 RFP Line Protocol Routines 2 3 BLOCK misc utility routines 4 5 ENTRY IOINIT to set up our stuff 6 ENTRY SIMWBRKS to select interrupts with breaks 7 ENTRY SIMNOBRKS to select interrupts with no breaks 8 9 ********************************************************************************** 10 * * 11 * This routine sets up the configuration of the RDF machine * 12 * and initializes the interrupt mask. * 13 * Call: * 14 * CALLNP IOINIT * 15 * * 16 * Registers Used: R0-R3 * 17 * Stack Required: ?? * 18 * * 19 ********************************************************************************** 20 1F7BC DD5F8001 6 STAK 21 IOINIT ENTRNP STAK SP,1 1F7BD DC41F927 22 CALLNP CONFIGRDU set up the field service modem data 1F7BE 600400EA 0 IMM 23 LD R0 URPSETREG+0A specify setting of the interrupt mask 1F7BF 60430040 1 IMM 24 LD R1 EVENTMASK indicate what events we can cope with 1F7C0 09040000 IMM 25 UREQ 0 and issue the request 1F7C1 600400EB 0 IMM 26 LD R0 URPSETREG+0B specify setting of the interrupt address 1F7C2 6045F684 1 IMM 27 LD R1 ADR INTVECTOR get pointer to vector 1F7C3 09040000 IMM 28 UREQ 0 and issue request 1F7C4 5D1F8001 6 STAK 29 LEAVE STAK SP,1 return to caller 30 * --- 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 550 (MSGMAKERS) F 42 RFP Line Protocol Routines 32 33 ********************************************************************************** 34 * * 35 * These routines are provided to select interrupts either * 36 * including or excluding terminal breaks. * 37 * Call: * 38 * CALLNP SIMWBRKS call for break and timer interrupts * 39 * CALLNP SIMNOBRKS call for only timer interrupts * 40 * * 41 * Registers Used: R0-R1 * 42 * Stack Required: 1 * 43 * * 44 ********************************************************************************** 45 1F7C5 DD5F8001 6 STAK 46 SIMWBRKS ENTRNP STAK SP,1 1F7C6 60040080 0 IMM 47 LD R0 URSSINTARM specify setting of interrupt mask 1F7C7 60420400 1 IMM 48 LD R1 BRKMASK include break interrupt bit 1F7C8 09040000 IMM 49 UREQ 0 and set new mask 1F7C9 5D1F8001 6 STAK 50 LEAVE STAK SP,1 51 * --- 52 1F7CA DD5F8001 6 STAK 53 SIMNOBRKS ENTRNP STAK SP,1 1F7CB 60040081 0 IMM 54 LD R0 URSCINTARM specify clearing of interrupt mask 1F7CC 60420400 1 IMM 55 LD R1 BRKMASK must turn off breaks 1F7CD 09040000 IMM 56 UREQ 0 and set new mask 1F7CE 5D1F8001 6 STAK 57 LEAVE STAK SP,1 58 * --- 59 END of utility routines 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 551 (MSGMAKERS) F 42 RFP Line Protocol Routines 61 62 BLOCK routines to generate messages 63 64 ENTRY BAUDSET set baud rate as requested 65 ENTRY IODROP drop session and release talker 66 ENTRY IONOP entry to send a NOP 67 ENTRY IOPWRRESET to set a power reset and give up session 68 ENTRY IOTERM generate a termination message 69 ENTRY SETBAUD changes baud rate 70 ENTRY VALMESSAGE generate a validate message 71 72 ********************************************************************************** 73 * * 74 * The validate message is constructed in the MB buffer * 75 * and sent demanding an ACK back. * 76 * Call: * 77 * CALL VALMESSAGE * 78 * PARVL ADR * 79 * * 80 * On error return, R0 = 0 if long interval timeout, * 81 * R0 = 1 if protocol goofup, * 82 * maybe wrong microcode rev. * 83 * Eats R0:R4 * 84 * stack required = 12 * 85 * 2 + MAX( IORDYMSG(6), GRESP(10), ACKCHKER(1) ) * 86 * XMIT (6) ) * 87 * * 88 ********************************************************************************** 89 00000001 ABS 90 VMSERAD EQU 1 stack location for error address 00000002 ABS 91 VMSSZ EQU 2 size of stack 92 1F7CF DD1F8002 6 STAK 93 VALMESSAGE ENTR STAK SP,VMSSZ 1F7D0 C0578801 6 BASE 94 STPVL SP,VMSERAD save the error address 1F7D1 DC01F6D8 95 CALL IORDYMSG checksum and encrypt the message 1F7D2 41440000 IMM 96 PARV 0 indicate no extra time needed 1F7D3 41440006 IMM 97 PARV KLAS6 pass message class 1F7D4 41440000 IMM 98 PARV 0 slot (unused) 1F7D5 4041F7E1 99 PARVL VALMSG and data 1F7D6 DC41F6F6 100 CALLNP XMIT send message to SSU 1F7D7 DC01F708 101 CALL GRESP now receive the response 1F7D8 4045F7DE IMM 102 PARVL ADR DISCNEEDED failed to get response 1F7D9 DC41F85C 103 CALLNP ACKCHKER process ack 1F7DA FE0FF7DC 104 JMP INVACK give error if not a good ack 1F7DB 5D1F8002 6 STAK 105 LEAVE STAK SP,VMSSZ 106 * --- 107 0001F7DC 108 INVACK LABEL we have received a funny ACK 1F7DC 60040001 0 IMM 109 LD R0 1 so indicate in error code 1F7DD FE0FF7DF 110 JMP GIVERR and return to error return 111 * --- 112 0001F7DE 113 DISCNEEDED LABEL 1F7DE 60040000 0 IMM 114 LD R0 0 get marker for long interval timeout 0001F7DF 115 GIVERR LABEL 1F7DF 61D78801 7 6 BASE 116 LD R7 SP,VMSERAD get the error return address 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 552 (MSGMAKERS) F 42 RFP Line Protocol Routines 1F7E0 5D1F8002 6 STAK 117 LEAVE STAK SP,VMSSZ return to error address 118 * --- 119 1F7E1 002AAAAA 120 VALMSG VFD BCM6VAL*XMSGBCM+002AAAAA validate message (BCM=0, MA=2AAAAA) 121 122 ********************************************************************************** 123 * * 124 * This routine is called whenever the RDU realizes that its * 125 * session has been dropped, either by a power reset or by an error. * 126 * The talker is released so that another dial-in may take place. * 127 * * 128 ********************************************************************************** 129 1F7E2 DD5F8001 6 STAK 130 IODROP ENTRNP STAK SP,1 1F7E3 DC41FC78 131 CALLNP RELTALKER release the talker unit we had 1F7E4 5D1F8001 6 STAK 132 LEAVE STAK SP,1 then return to caller 133 * --- 134 135 ********************************************************************************** 136 * * 137 * A power reset message is constructed and transmitted. * 138 * We presume that nothing comes back. * 139 * Call: * 140 * CALLNP IOPWRRESET * 141 * * 142 * Eats R0:R4 * 143 * stack required = 7 * 144 * 1 + MAX( IORDYMSG(6), EMPTYBUF(1), XMIT(6) ) * 145 * * 146 ********************************************************************************** 147 00000001 ABS 148 PRRSSZ EQU 1 size of stack 149 1F7E5 DD5F8001 6 STAK 150 IOPWRRESET ENTRNP STAK SP,PRRSSZ 1F7E6 DC01F6D8 151 CALL IORDYMSG checksum and encrypt the message 1F7E7 41440000 IMM 152 PARV 0 extra time required 1F7E8 41440005 IMM 153 PARV KLAS5 pass message class 1F7E9 41440000 IMM 154 PARV 0 slot (unused) 1F7EA 4041F7EE 155 PARVL PRRMSG and data 1F7EB DC41F7B2 156 CALLNP EMPTYBUF clear out incoming buffer 1F7EC DC41F6F6 157 CALLNP XMIT this should do it 1F7ED 5D1F8001 6 STAK 158 LEAVE STAK SP,PRRSSZ 159 * --- 160 1F7EE 50000000 161 PRRMSG VFD BCMPWRRST*XMSGBCM power reset message (BCM=5, MA=0) 162 163 ********************************************************************************** 164 * * 165 * A no-op message is constructed in the MB buffer * 166 * and sent demanding an ACK back. * 167 * Call: * 168 * CALL IONOP * 169 * PARVL ADR * 170 * * 171 * On error return, R0 = 0 if long interval timeout, * 172 * R0 = 1 if protocol goofup, * 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 553 (MSGMAKERS) F 42 RFP Line Protocol Routines 173 * maybe wrong microcode rev. * 174 * Eats R0:R4 * 175 * stack required = 12 * 176 * 2 + MAX( IORDYMSG(6), GRESP(10), ACKCHKER(1) ) * 177 * XMIT (6) ) * 178 * * 179 ********************************************************************************** 180 00000001 ABS 181 INOPERAD EQU 1 stack location for error address 00000002 ABS 182 INOPSZ EQU 2 size of stack 183 1F7EF DD1F8002 6 STAK 184 IONOP ENTR STAK SP,INOPSZ 1F7F0 C0578801 6 BASE 185 STPVL SP,INOPERAD save the error address 1F7F1 DC01F6D8 186 CALL IORDYMSG checksum and encrypt the message 1F7F2 41440000 IMM 187 PARV 0 indicate no extra time needed 1F7F3 41440006 IMM 188 PARV KLAS6 pass message class 1F7F4 41440000 IMM 189 PARV 0 slot (unused) 1F7F5 4041F801 190 PARVL NOPMSG and data 1F7F6 DC41F6F6 191 CALLNP XMIT send message to SSU 1F7F7 DC01F708 192 CALL GRESP now receive the response 1F7F8 4045F7FE IMM 193 PARVL ADR UNHOOK failed to get response 1F7F9 DC41F85C 194 CALLNP ACKCHKER process ack 1F7FA FE0FF7FC 195 JMP NOTVACK jump if not a valid ack 1F7FB 5D1F8002 6 STAK 196 LEAVE STAK SP,INOPSZ 197 * --- 198 0001F7FC 199 NOTVACK LABEL 1F7FC 60040001 0 IMM 200 LD R0 1 get marker for invalid ack 1F7FD FE0FF7FF 201 JMP GVERRTN and return 202 * --- 203 0001F7FE 204 UNHOOK LABEL 1F7FE 60040000 0 IMM 205 LD R0 0 get marker for timeout 0001F7FF 206 GVERRTN LABEL 1F7FF 61D78801 7 6 BASE 207 LD R7 SP,INOPERAD get the error return address 1F800 5D1F8002 6 STAK 208 LEAVE STAK SP,INOPSZ return to error address 209 * --- 210 1F801 10000000 211 NOPMSG VFD BCM6NOP*XMSGBCM NOP (BCM = 1, MA = 0 ) 212 213 ********************************************************************************** 214 * * 215 * The terminate message is constructed in the MB buffer * 216 * and sent demanding an ACK back. * 217 * Call: * 218 * CALL IOTERM * 219 * PARVL ADR * 220 * * 221 * On error return, R0 = 0 if long interval timeout, * 222 * R0 = 1 if protocol goofup, * 223 * maybe wrong microcode rev. * 224 * Eats R0:R4 * 225 * stack required = 12 * 226 * 2 + MAX( IORDYMSG(6), GRESP(10), ACKCHKER(1) ) * 227 * XMIT (6) ) * 228 * * 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 554 (MSGMAKERS) F 42 RFP Line Protocol Routines 229 ********************************************************************************** 230 00000001 ABS 231 TRMERAD EQU 1 stack location for error address 00000002 ABS 232 TRMSSZ EQU 2 size of local stack 233 1F802 DD1F8002 6 STAK 234 IOTERM ENTR STAK SP,TRMSSZ 1F803 C0578801 6 BASE 235 STPVL SP,TRMERAD save the error address 1F804 DC01F6D8 236 CALL IORDYMSG checksum and encrypt the message 1F805 41440000 IMM 237 PARV 0 indicate no extra time needed 1F806 41440006 IMM 238 PARV KLAS6 pass message class 1F807 41440000 IMM 239 PARV 0 slot (unused) 1F808 4041F815 240 PARVL TRMMSG and data 1F809 DC41F6F6 241 CALLNP XMIT send message to SSU 1F80A DC01F708 242 CALL GRESP now receive the response 1F80B 4045F812 IMM 243 PARVL ADR DISCNDD failed to get response 1F80C DC41F85C 244 CALLNP ACKCHKER process ack 1F80D FE0FF810 245 JMP IOBADACK jump on back ACK 0001F80E 246 THEEXIT LABEL 1F80E DC41FC78 247 CALLNP RELTALKER release the unit that we used 1F80F 5D1F8002 6 STAK 248 LEAVE STAK SP,TRMSSZ 249 * --- 250 0001F810 251 IOBADACK LABEL 1F810 60040001 0 IMM 252 LD R0 1 get the bad ack marker 1F811 FE0FF813 253 JMP IOGVERR return the error code 254 * --- 255 0001F812 256 DISCNDD LABEL 1F812 60040000 0 IMM 257 LD R0 0 get code to indicate timeout 0001F813 258 IOGVERR LABEL 1F813 61D78801 7 6 BASE 259 LD R7 SP,TRMERAD get the error return address 1F814 FE0FF80E 260 JMP THEEXIT return via release path to error return 261 * --- 262 1F815 30000000 263 TRMMSG VFD BCM6TERM*XMSGBCM terminate message (BCM=3) 264 265 ********************************************************************************** 266 * * 267 * The SETBAUD routine is called right after initial setup * 268 * to set the baud rate up to the high rate if that will work for this * 269 * site. * 270 * Call: * 271 * CALL SETBAUD * 272 * PARVL ADR * 273 * * 274 * Eats R0:R4 * 275 * Stack Required: 15 * 276 * 2 + Max ( BAUDSET (13) ) * 277 * * 278 ********************************************************************************** 279 00000001 ABS 280 SBDERAD EQU 1 stack location for error address 00000002 ABS 281 SBDSSZ EQU 2 size of local stack 282 1F816 DD1F8002 6 STAK 283 SETBAUD ENTR STAK SP,SBDSSZ 1F817 C0578801 6 BASE 284 STPVL SP,SBDERAD save the error address 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 555 (MSGMAKERS) F 42 RFP Line Protocol Routines 285 * \ / 1F818 6001F4A2 0 286 LD R0 SIRATE get rate specification 1F819 64040001 0 IMM 287 CPR R0 1 does the rate need to be changed? 1F81A FE0DF81E 288 JNE SETBXIT jump if not 1F81B DC01F821 289 CALL BAUDSET otherwise, set rate up 1F81C 4141F671 290 PARV FAST use the appropriate high baud rate 1F81D 4045F81F IMM 291 PARVL ADR SETBAUDER pass error address 292 * \ / 0001F81E 293 SETBXIT LABEL 1F81E 5D1F8002 6 STAK 294 LEAVE STAK SP,SBDSSZ 295 * --- 296 0001F81F 297 SETBAUDER LABEL 1F81F 61D78801 7 6 BASE 298 LD R7 SP,SBDERAD get the error address 1F820 5D1F8002 6 STAK 299 LEAVE STAK SP,SBDSSZ return to error location 300 * --- 301 302 ********************************************************************************** 303 * * 304 * The change baud rate command is constructed and transmitted, * 305 * and the local baud rate is changed to match when the response * 306 * comes back. * 307 * Call: * 308 * CALL BAUDSET * 309 * PARV * 310 * PARVL ADR * 311 * * 312 * On error return, R0 = 0 if long interval timeout, * 313 * R0 = 1 if protocol goofup, * 314 * maybe wrong microcode rev. * 315 * Eats R0:R4 * 316 * stack required = 13 * 317 * 3 + MAX( IORDYMSG(6), GRESP(10), ACKCHKER(1) ) * 318 * XMIT (6) ) * 319 * * 320 ********************************************************************************** 321 00000001 ABS 322 BLWERAD EQU 1 stack location for error address 00000002 ABS 323 BSRATE EQU 2 stack location to save requested rate 00000003 ABS 324 BLWSSZ EQU 3 size of local stack 325 1F821 DD1F8003 6 STAK 326 BAUDSET ENTR STAK SP,BLWSSZ 1F822 C1578802 6 BASE 327 STPV SP,BSRATE save the requested rate 1F823 C0578801 6 BASE 328 STPVL SP,BLWERAD save the error address 1F824 60978802 2 6 BASE 329 LD R2 SP,BSRATE get the rate 1F825 7C81F83E 2 330 IOR R2 BSBCM make into appropriate SSU command 1F826 DC01F6D8 331 CALL IORDYMSG checksum and encrypt the message 1F827 41440000 IMM 332 PARV 0 indicate no extra time needed 1F828 41440006 IMM 333 PARV KLAS6 pass message class 1F829 41440000 IMM 334 PARV 0 slot (unused) 1F82A 40528000 2 REG 335 PARVL R2 and data 1F82B DC41F6F6 336 CALLNP XMIT send message to SSU 1F82C DC01F708 337 CALL GRESP now receive the response 1F82D 4045F83B IMM 338 PARVL ADR HANGUP no valid response received 1F82E DC41F85C 339 CALLNP ACKCHKER process ack 1F82F FE0FF839 340 JMP BSGIVERR jump if not a good ack 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 556 (MSGMAKERS) F 42 RFP Line Protocol Routines 341 1F830 60040119 0 IMM 342 LD R0 FRTSETRATE command to set both input and output rate 1F831 60578802 1 6 BASE 343 LD R1 SP,BSRATE get the indicated baud rate 1F832 E441F672 1 344 ST R1 CURRENTRAT save as current one 1F833 0881F4AB 345 FREQ TALKLUN and change rate 346 1F834 60040140 0 IMM 347 LD R0 URDELAY need delay to allow garbage char to come back 1F835 60440001 1 IMM 348 LD R1 1 time interval can be very short 1F836 60840000 2 IMM 349 LD R2 0 want nothing to cause premature termination 1F837 09040000 IMM 350 UREQ 0 do the wait 351 1F838 5D1F8003 6 STAK 352 LEAVE STAK SP,BLWSSZ 353 * --- 354 0001F839 355 BSGIVERR LABEL 1F839 60040001 0 IMM 356 LD R0 1 get code to indicate bad ack 1F83A FE0FF83C 357 JMP BSRTNERR and go to error return 358 * --- 359 0001F83B 360 HANGUP LABEL 1F83B 60040000 0 IMM 361 LD R0 0 get code to indicate long interval timeout 0001F83C 362 BSRTNERR LABEL 1F83C 61D78801 7 6 BASE 363 LD R7 SP,BLWERAD get the error address 1F83D 5D1F8003 6 STAK 364 LEAVE STAK SP,BLWSSZ and return there 365 * --- 366 1F83E 20000000 367 BSBCM VFD BCM6RATE*XMSGBCM to make rate command 368 369 END of message constructors 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 557 (MSGMAKERS) F 42 RFP Line Protocol Routines 371 372 BLOCK routine to reset baud rate to low by sending break 373 374 ENTRY BREAKLOW to set to low baud rate 375 376 ********************************************************************************** 377 * * 378 * The SSU has provisions for resetting to a low baud rate * 379 * if a communications line cannot handle a previously selected * 380 * high rate. What we do is to send a break to the RFP. * 381 * Assuming that the MSN is not 0 (which implies an initial * 382 * callup) the SSU will respond with an ACK. * 383 * If the MSN on the ACK is the same as our current one, * 384 * that means that the RFP was receiving our messages and * 385 * trying to respond to them. If the MSN on the ACK is the * 386 * previous one, that means that the RFP never saw our newer * 387 * messages. * 388 * Call: * 389 * CALL BREAKLOW * 390 * PARVL ADR * 391 * * 392 * stack required = 8 * 393 * 2 + MAX( EMPTYBUF(1), SENDBREAK(6), READRESP(6), * 394 * CHKCS(6) ) * 395 * * 396 ********************************************************************************** 397 00000001 ABS 398 BKLERAD EQU 1 stack location for error address 00000002 ABS 399 BKLSSZ EQU 2 local stack size 400 1F83F DD1F8002 6 STAK 401 BREAKLOW ENTR STAK SP,BKLSSZ 1F840 C0578801 6 BASE 402 STPVL SP,BKLERAD save the error address 403 * \ / 1F841 DC41F7B2 404 CALLNP EMPTYBUF clear out any garbage characters in our input buffer 1F842 DC41FA0B 405 CALLNP SENDBREAK okay, now we're ready for a response 406 * \ / 1F843 6041F355 1 407 LD R1 SHINTO indicate normal time for response 1F844 DC41F788 408 CALLNP READRESP so go fetch it 1F845 FE0FF85A 409 JMP BADONE nak or time out 1F846 6011F69C 0 @ 410 LD R0 @AMBMSN get the message serial number byte 1F847 7804003F 0 IMM 411 AND R0 03F leave only right 6 bits 1F848 6411F699 0 @ 412 CPR R0 @AMSNLO6 is it the current serial number? 1F849 FE03F84F 413 JEQ TRYDECODE jump if so, try to decode message 1F84A 1807FFFF 0 IMM 414 ADD R0 -1 back up to earlier number 1F84B 7804003F 0 IMM 415 AND R0 03F leave only right 6 bits 1F84C 6411F699 0 @ 416 CPR R0 @AMSNLO6 is it the previous number? 1F84D FE03F852 417 JEQ XDECODE jump if previous, try decoding with that number 1F84E FE0FF85A 418 JMP BADONE jump if we have a protocol screwup or bad transmission 419 * --- 420 0001F84F 421 TRYDECODE LABEL 1F84F DC41FC94 422 CALLNP CHKCS call for verification of CS and decode 1F850 FE0FF857 423 JMP FAIL jump if the message was not good 1F851 5D1F8002 6 STAK 424 LEAVE STAK SP,BKLSSZ return, successfully slowed down 425 * --- 426 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 558 (MSGMAKERS) F 42 RFP Line Protocol Routines 0001F852 427 XDECODE LABEL 1F852 D041F359 428 DEC MSN back the SN up to the previous number 1F853 DC41FC94 429 CALLNP CHKCS try for decode with that number 1F854 FE0FF856 430 JMP INCFAIL jump if it failed 1F855 5D1F8002 6 STAK 431 LEAVE STAK SP,BKLSSZ return, successful set ack to low rate 432 * --- 433 0001F856 434 INCFAIL LABEL 1F856 D001F359 435 INC MSN restore the MSN to what it was last 0001F857 436 FAIL LABEL 1F857 00800000 437 STOP 0 *** don't yet know what to do 438 * \ / 439 1F858 61D78801 7 6 BASE 440 LD R7 SP,BKLERAD load the error address 1F859 5D1F8002 6 STAK 441 LEAVE STAK SP,BKLSSZ return to caller 442 * --- 443 0001F85A 444 BADONE LABEL 1F85A 61D78801 7 6 BASE 445 LD R7 SP,BKLERAD load the error address 1F85B 5D1F8002 6 STAK 446 LEAVE STAK SP,BKLSSZ and return there 447 * --- 448 449 END of set back to low rate 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 559 (MSGMAKERS) F 42 RFP Line Protocol Routines 451 452 BLOCK acknowledge processing 453 454 ENTRY ACKCHKER to process a returning ack 455 456 ********************************************************************************** 457 * * 458 * The remote machine can give back quite a number of * 459 * responses even when the normal response is an ACK. * 460 * The responses that we will allow are: * 461 * Class 6 - ACK, no further chars acceptable * 462 * Class 7 - ACK, can accept more chars for OS * 463 * Class 0A - bus error is being asserted by some device * 464 * We will give the error return on any other response, including: * 465 * Class 8 - illegal command * 466 * Class 9 - no response from device (not okay if expecting ACK) * 467 * This routine has the job of classifying what came back * 468 * and acting accordingly. * 469 * Call: * 470 * CALLNP ACKCHKER * 471 * * 472 * * 473 * Eats R0 * 474 * stack required = 1 * 475 * * 476 ********************************************************************************** 477 1F85C DD5F8001 6 STAK 478 ACKCHKER ENTRNP STAK SP,1 1F85D 6011F6A0 0 @ 479 LD R0 @AMBCLASS pick up the class 1F85E 64040007 0 IMM 480 CPR R0 RKLAS7 is it the expected response? 1F85F FE03F867 481 JEQ OKAYACK it is an ack, go check for more info 1F860 64040006 0 IMM 482 CPR R0 RKLAS6 is it the expected response? 1F861 FE03F867 483 JEQ OKAYACK it is an ack, go check for more info 1F862 64040002 0 IMM 484 CPR R0 RKLAS2 is it a multiple character response ack? 1F863 FE03F867 485 JEQ OKAYACK it is an ack, go check for more info 1F864 6404000A 0 IMM 486 CPR R0 RKLASA is it a bus error? 1F865 FE03F869 487 JEQ BUSERR jump if so 1F866 5D1F8001 6 STAK 488 LEAVE STAK SP,1 unknown class returned when ACK expected 489 * --- 490 0001F867 491 OKAYACK LABEL 1F867 6011F6A1 0 @ 492 LD R0 @AMBSLOT get the slot field for further decode 1F868 FA31F869 0 493 JZA R0 STRATEACK jump if nothing special 494 * \ / ignore chars from OS, they are unexpected 495 0001F869 496 STRATEACK LABEL 0001F869 497 BUSERR LABEL 1F869 19C40001 7 IMM 498 ADD R7 1 1F86A 5D1F8001 6 STAK 499 LEAVE STAK SP,1 return to caller 500 * --- 501 502 END of acknowledge checker 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 560 (MSGMAKERS) F 42 RFP Line Protocol Routines 504 505 BLOCK the timer routines 506 507 ENTRY INTCODE interrupt routine 508 ENTRY LONGTIMER to check the long interval timer 509 ENTRY RSTLNGTIMR to reset the long interval timer 510 511 ********************************************************************************** 512 * * 513 * This is the code that does the interrupt processing. * 514 * Basically, we replace the PC in the interrupt registers with * 515 * the error address from TIMEOUTPC. We also save the old PC * 516 * in INTERPC, the error code in INTERCODE, and the error * 517 * sub-code in INTERSUBCD. * 518 * Note that if TIMEOUTPC is 0, the interrupt has been * 519 * canceled and we return from the interrupt as if nothing happened. * 520 * If the interrupt is for a break, the routine RFPBREAK is * 521 * called. The interrupt routine is then resumed. * 522 * * 523 ********************************************************************************** 524 0001F86B 525 INTCODE LABEL 1F86B 64840025 2 IMM 526 CPR R2 UINTTIMINT how about a timeout? 1F86C FE03F879 527 JEQ INTTIME process that 1F86D 64840023 2 IMM 528 CPR R2 UINTNEPATH is this a path interrupt 1F86E FE03F87D 529 JEQ INTPATH jump if that is the case 1F86F 64840020 2 IMM 530 CPR R2 UINTBREAK check for a break 1F870 FE03F87B 531 JEQ INTBREAK jump if it is 0001F871 532 INTPROC LABEL 1F871 EC120000 0 REG 533 STZ R0 ready to check int address 1F872 E001F695 0 534 EXCH R0 TIMEOUTPC get address and shut off 1F873 FA03F877 0 535 JEQZ R0 INTDONE jump if no need to honor now 1F874 E001F68E 0 536 EXCH R0 INTREGSPC alter PC for return 1F875 E401F692 0 537 ST R0 INTERPC save old PC in case of interest 1F876 E681F693 23 538 ST2 R2 INTERCODE also save R2,R3 for use 0001F877 539 INTDONE LABEL 1F877 60040082 0 IMM 540 LD R0 URINTRTN get request for interrupt return 1F878 0905F686 IMM 541 UREQ ADR REGBUFFER return using this set of registers 542 * --- 543 0001F879 544 INTTIME LABEL 1F879 EDD1AC08 @ 545 STW @TOFLAG set timeout bit 1F87A FE0FF871 546 JMP INTPROC then merge in 547 * --- 548 0001F87B 549 INTBREAK LABEL 1F87B DC41BCD9 550 CALLNP RFPBREAK call break processor routine 1F87C FE0FF877 551 JMP INTDONE then we are done here 552 * --- 553 0001F87D 554 INTPATH LABEL 1F87D EDD1AC09 @ 555 STW @PDFLAG indicate path data interrupt 1F87E 60040081 0 IMM 556 LD R0 URSCINTARM clear path data interrupts 1F87F 60420080 1 IMM 557 LD R1 PATHMASK the bit to clear 1F880 09040000 IMM 558 UREQ 0 1F881 FE0FF871 559 JMP INTPROC go directly to process this 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 561 (MSGMAKERS) F 42 RFP Line Protocol Routines 560 * --- 561 562 ********************************************************************************** 563 * * 564 * This routine stores a reference for the long interval * 565 * timeout function. * 566 * Call: * 567 * CALLNP RSTLNGTIMR * 568 * * 569 * Eats R0:R3 * 570 * stack required = 6 * 571 * * 572 ********************************************************************************** 573 1F882 DD5F8001 6 STAK 574 RSTLNGTIMR ENTRNP STAK SP,1 1F883 60040060 0 IMM 575 LD R0 URRAWDATE function for time 1F884 09040000 IMM 576 UREQ 0 get the current raw date 1F885 E681F4A7 23 577 ST2 R2 LASTGOOD set into reference holder 1F886 5D1F8001 6 STAK 578 LEAVE STAK SP,1 return to caller 579 * --- 580 581 ********************************************************************************** 582 * * 583 * This routine is called to check for excessive time * 584 * without a successful transfer. The way that this works * 585 * is this: * 586 * Each time that a successful operation occurs we put * 587 * the current rawdate into LASTGOOD. Every time before we * 588 * start a new operation that must wait for a response from * 589 * the RFP we come here to see if it has been longer than * 590 * 90 seconds since LASTGOOD. This way we can do arbitrary * 591 * recovery actions and remain certain that we will timeout. * 592 * This presumes that each operation that waits for the * 593 * RFP has its own interrupt set up for the short interval * 594 * that it expects to wait. * 595 * Call: * 596 * CALLNP LONGTIMER * 597 * * 598 * * 599 * Eats R0:R3 * 600 * stack required = 1 * 601 * * 602 ********************************************************************************** 603 1F887 DD5F8001 6 STAK 604 LONGTIMER ENTRNP STAK SP,1 1F888 60040060 0 IMM 605 LD R0 URRAWDATE get the request code 1F889 09040000 IMM 606 UREQ 0 request the system time 1F88A 1281F4A7 23 607 SUB2 R2 LASTGOOD make interval from last good operation 1F88B 6001F357 0 608 LD R0 LINTO long interval time out value 1F88C 1C040400 0 IMM 609 MUL R0 1024 convert to milliseconds 1F88D 64D20000 3 0 REG 610 CPR R3 R0 check for exhaustion of long interval timer 611 * (1024 is a 'long' second ... 612 * ensures that long intervals for 613 * test can use left immediate) 1F88E FE05F890 614 JGT NORETRY jump if so, we have exhausted our patience 1F88F 19C40001 7 IMM 615 ADD R7 1 advance to the skip (good) return 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 562 (MSGMAKERS) F 42 RFP Line Protocol Routines 0001F890 616 NORETRY LABEL 1F890 5D1F8001 6 STAK 617 LEAVE STAK SP,1 618 * --- 619 620 END of the timer routines 42 INPUT DIALER to do the telephone work 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 563 (DIALER) F 43 RFP Line Protocol Routines 2 3 BLOCK code to set up a new session 4 5 ENTRY IODIAL entry to set up a new session 6 ENTRY IODONTDIAL entry to set up a new session (direct connection) 7 8 ********************************************************************************** 9 * * 10 * IODIAL and IODONTDIAL * 11 * These routines do the following part of an initial system * 12 * callup: * 13 * 1) If IODONTDIAL, equip link port and skip to step 6 * 14 * 2) Set up an available outbound modem on TALKLUN * 15 * 3) Acquire access to the dialer * 16 * 4) Dial the outgoing phone number * 17 * 5) Release the dialer * 18 * 6) Set up the response timer * 19 * 7) Send a break * 20 * 8) Wait for the first character of the response * 21 * 9) Reset timer and wait for remainder of response * 22 * 10) Generate a validate message, encrypt it, and transmit it * 23 * 11) Set the final baud rate * 24 * 12) Log entry ? * 25 * Call: * 26 * CALL IODIAL * 27 * PAR * 28 * PARV * 29 * PARV * 30 * PARVL * 31 * * 32 * 0 => no error * 33 * 1 => RFP not enabled * 34 * 2 => looks like wrong password * 35 * 3 => no response * 36 * 4 => no available modem or dialer * 37 * 5 => error during dialing * 38 * Eats R0:R3 * 39 * OR * 40 * CALL IODONTDIAL * 41 * PARV2 * 42 * PARV * 43 * .... remainder same * 44 * stack required = 15 * 45 * 1 + MAX( EQTALKER (3), EQDIALUNIT(1), DIALIT (2), * 46 * RSTLNGTIMR(6), LONGTIMER (1), EMPTYBUF(1), * 47 * SENDBREAK (6), RECVICR (6), GENKEY (1), * 48 * VALMESSAGE(9), IORDYMSG (6), IONOP (9), * 49 * SETBAUD (14), SETBRKLEN (1) ) * 50 * * 51 ********************************************************************************** 52 00000001 ABS 53 DIASSZ EQU 1 size of local stack 00000010 BYTE 54 REBREAK EQU BIT 0 R7 flag whether multiple SENDBREAKs 55 1F891 DD1F8001 6 STAK 56 IODONTDIAL ENTR STAK SP,DIASSZ 1F892 C341F67E 57 STPV2 PORTNAME save the direct port name 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 564 (DIALER) F 43 RFP Line Protocol Routines 1F893 C141F4A2 58 STPV SIRATE link baud rate 1F894 C241F4A4 59 STPV2L SIKEY save the site key 60 * \ / 1F895 DC01F9DE 61 CALL SETRATES set communication rates 1F896 41440960 IMM 62 PARV LCLLOBAUD local low rate 1F897 40442580 IMM 63 PARVL LCLHIBAUD local high rate 64 * \ / 1F898 DC01F9FC 65 CALL SETBRKLEN calculate length of break 1F899 40440000 IMM 66 PARVL 0 indicate local 1F89A FE0FF8DD 67 JMP ABANDON indicate can't continue 68 * \ / 1F89B DC01FC4F 69 CALL EQTALKUNIT hook up the lun 1F89C 4241F67E 70 PARV2L PORTNAME pass in the direct link port name 1F89D FE0FF8DD 71 JMP ABANDON indicate can't use port indicated 1F89E FE0FF8B8 72 JMP NODIALNTRY go share code 73 * --- 74 1F89F DD1F8001 6 STAK 75 IODIAL ENTR STAK SP,DIASSZ 1F8A0 C101F4A3 76 STP SIFONE save pointer to phone number 1F8A1 C141F4A2 77 STPV SIRATE link baud rate indicator 1F8A2 C141F4A6 78 STPV SICLASS save the class code 1F8A3 C241F4A4 79 STPV2L SIKEY save the site key 80 * \ / 1F8A4 DC01F9DE 81 CALL SETRATES set communication rates 1F8A5 41440096 IMM 82 PARV RMTLOBAUD remote low rate 1F8A6 404404B0 IMM 83 PARVL RMTHIBAUD remote high rate 84 * \ / 1F8A7 DC01F9FC 85 CALL SETBRKLEN calculate length of break 1F8A8 40440001 IMM 86 PARVL 1 indicate dialout 1F8A9 FE0FF8DD 87 JMP ABANDON indicate can't continue 88 * \ / 1F8AA DC41FC2F 89 CALLNP EQTALKER get an available modem port 1F8AB FE0FF8DD 90 JMP ABANDON give up if no available talking port 1F8AC FE0FF8BD 91 JMP HAYESMODEM jump if hayes type modem 1F8AD FE0FF8C1 92 JMP VADICMODEM jump if racal vadic 3451 modem 93 * \ / 1F8AE DC41FC0B 94 CALLNP EQDIALUNIT get the dialer 1F8AF FE0FF8DC 95 JMP ABANDONX give up if can't get the dialer 1F8B0 DC41FC7F 96 CALLNP TELLMODEM tell user what modem was used 1F8B1 DC41FA30 97 CALLNP DIALIT dial the phone number 1F8B2 FE0FF8DF 98 JMP DIALERROR jump if dialer not happy 1F8B3 DC41FC74 99 CALLNP RELDIALER release the dialer 100 * \ / 0001F8B4 101 DIALDELAY LABEL 1F8B4 60040140 0 IMM 102 LD R0 URDELAY delay while waiting for the line 1F8B5 60440002 1 IMM 103 LD R1 2 allow 2 seconds for line to clear up 1F8B6 60840000 2 IMM 104 LD R2 0 delay terminators (none) 1F8B7 09040000 IMM 105 UREQ 0 and do the delay 106 * \ / 0001F8B8 107 NODIALNTRY LABEL 1F8B8 EC01F4AD 108 STZ FAILCOUNT restart statistics for this dialup 1F8B9 EC01F4AE 109 STZ SYNECOUNT this one too 1F8BA DC41F882 110 CALLNP RSTLNGTIMR reset the long interval timer 1F8BB EC0BC010 7 CBM 111 STZ R7/REBREAK init the break flag 1F8BC FE0FF8C8 112 JMP SKIPFIRST skip timetest to save time 113 * --- 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 565 (DIALER) F 43 RFP Line Protocol Routines 114 0001F8BD 115 HAYESMODEM LABEL 1F8BD DC41FC7F 116 CALLNP TELLMODEM tell user what modem was used 1F8BE DC41FAB2 117 CALLNP DIALHAYES dial using a hayes compatable modem 1F8BF FE0FF8E0 118 JMP DIALERR1 jump if error 1F8C0 FE0FF8B4 119 JMP DIALDELAY allow line to settle 120 * --- 121 0001F8C1 122 VADICMODEM LABEL 1F8C1 DC41FC7F 123 CALLNP TELLMODEM tell user what modem was used 1F8C2 DC41FBA1 124 CALLNP DIALVADIC dial using racal vadic 3451 modem 1F8C3 FE0FF8E0 125 JMP DIALERR1 jump if error 1F8C4 FE0FF8B4 126 JMP DIALDELAY allow line to settle 127 * --- 128 0001F8C5 129 TRYICURAGN LABEL 1F8C5 EDCBC010 7 CBM 130 STW R7/REBREAK say we had to send extra break 1F8C6 DC41F887 131 CALLNP LONGTIMER check for timeout of the long interval 1F8C7 FE0FF8E3 132 JMP GIVEUPX give up this attempt 133 * \ / 0001F8C8 134 SKIPFIRST LABEL 1F8C8 DC41F7B2 135 CALLNP EMPTYBUF remove any garbage from the buffer 1F8C9 DC41FA0B 136 CALLNP SENDBREAK send a break to the remote machine 1F8CA DC41F767 137 CALLNP RECVICR set up to receive the initial callup response 1F8CB FE0FF8C5 138 JMP TRYICURAGN try again if error 1F8CC 5C11F6A5 @ 139 CMZ @AICURCPIEN is the RFP enabled? 1F8CD FE03F8EC 140 JEQ NOTENABLED jump if not 1F8CE F7C1F8D9 7 141 JBT R7/REBREAK CANTCHEK skip clock check on multi-break 1F8CF DC41F8FD 142 CALLNP REPORTCLOK tattle on the users clock 0001F8D0 143 KEEPON LABEL 1F8D0 DC41FCC8 144 CALLNP GENKEY initialize the key for this session 1F8D1 DC01F7CF 145 CALL VALMESSAGE generate the validation message 1F8D2 4045F8E6 IMM 146 PARVL ADR ASSUMEPWW error address 147 * \ / 148 149 ********************************************************************************** 150 * * 151 * Here we send one good message before we change the baud * 152 * rate, if that is necessary. * 153 * * 154 ********************************************************************************** 155 1F8D3 DC01F7EF 156 CALL IONOP send a NOP 1F8D4 4045F8E3 IMM 157 PARVL ADR GIVEUPX bail out if error 158 * \ / 1F8D5 DC01F816 159 CALL SETBAUD move the baud rate up if okay 1F8D6 4045F8E3 IMM 160 PARVL ADR GIVEUPX error address for long interval timeout 1F8D7 60040000 0 IMM 161 LD R0 0 indicate no error 1F8D8 5D1F8001 6 STAK 162 LEAVE STAK SP,DIASSZ return to caller 163 * --- 164 165 * we can't reliably check the remote clock when more than 166 * one "break" was sent to establish the connection 0001F8D9 167 CANTCHEK LABEL 1F8D9 6005F8EF 0 IMM 168 LD R0 ADR NCCMESS "(unable to check remote clock -- transmission errors)" 1F8DA DC41B88A 169 CALLNP OUT print neat message 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 566 (DIALER) F 43 RFP Line Protocol Routines 1F8DB FE0FF8D0 170 JMP KEEPON continue 171 * --- 172 0001F8DC 173 ABANDONX LABEL 1F8DC DC41FC78 174 CALLNP RELTALKER release the talker unit that we had 175 * \ / 0001F8DD 176 ABANDON LABEL 1F8DD 60040004 0 IMM 177 LD R0 4 load code indicating modem or dialer not available 1F8DE 5D1F8001 6 STAK 178 LEAVE STAK SP,DIASSZ return to error address 179 * --- 180 0001F8DF 181 DIALERROR LABEL 1F8DF DC41FC74 182 CALLNP RELDIALER release the dialer 0001F8E0 183 DIALERR1 LABEL 1F8E0 DC41FC78 184 CALLNP RELTALKER release the talker unit that we had 1F8E1 60040005 0 IMM 185 LD R0 5 load code indicating dialer error 1F8E2 5D1F8001 6 STAK 186 LEAVE STAK SP,DIASSZ return to error address 187 * --- 188 0001F8E3 189 GIVEUPX LABEL 1F8E3 DC41FC78 190 CALLNP RELTALKER release the talker unit that we had 1F8E4 60040003 0 IMM 191 LD R0 3 load indicating long interval timeout 1F8E5 5D1F8001 6 STAK 192 LEAVE STAK SP,DIASSZ return to error address 193 * --- 194 0001F8E6 195 ASSUMEPWW LABEL 1F8E6 EC01F695 196 STZ TIMEOUTPC indicate no interrupt pending anymore 1F8E7 60040142 0 IMM 197 LD R0 URCLRTIMIN and clear interrupt requests 1F8E8 09040000 IMM 198 UREQ 0 1F8E9 DC41FC78 199 CALLNP RELTALKER release the talker unit that we had 1F8EA 60040002 0 IMM 200 LD R0 2 indicate that we seem to have the wrong PW 1F8EB 5D1F8001 6 STAK 201 LEAVE STAK SP,DIASSZ return to error address 202 * --- 203 0001F8EC 204 NOTENABLED LABEL 1F8EC DC41FC78 205 CALLNP RELTALKER release the unit, since we can't talk 1F8ED 60040001 0 IMM 206 LD R0 1 indicate reason (RFP not enabled) 1F8EE 5D1F8001 6 STAK 207 LEAVE STAK SP,DIASSZ return to caller 208 * --- 209 1F8EF 28756E61 210 NCCMESS TEXTZ "(unable to check remote clock -- transmission errors)" 211 212 END of the setup routine 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 567 (DIALER) F 43 RFP Line Protocol Routines 214 215 BLOCK Report Clock 216 217 ENTRY REPORTCLOK to tattle on user clock errors 218 219 ********************************************************************************** 220 * * 221 * This routine will give the RDU operator a short message * 222 * if the victim SSU has a time stored that is very far from from * 223 * our host system has. * 224 * Note that the initial callup response provides the customer * 225 * machine time. It is the time from when we first sent a break to * 226 * the remote machine (or when he first saw it). We compare that * 227 * time to the current time (when we have completely received the * 228 * message). This routine should not be called if the break had to * 229 * be retransmitted, because we could be considerably in error. * 230 * If this message is printed, the clock should be checked * 231 * against an accurate source. * 232 * * 233 ********************************************************************************** 234 00000001 ABS 235 HOLDTIME EQU 1 location on stack to hold time difference 00000002 ABS 236 RPCSSZ EQU 2 size of local stack 237 1F8FD DD5F8002 6 STAK 238 REPORTCLOK ENTRNP STAK SP,RPCSSZ 1F8FE 60040060 0 IMM 239 LD R0 URRAWDATE get function for time 1F8FF 09040000 IMM 240 UREQ 0 and get the systems time 1F900 6201F3FF 01 241 LD2 R0 ICURXFSD get customers clock 1F901 78040FFF 0 IMM 242 AND R0 0FFF mask off non-clock part 1F902 32148000 0123 PAIR 243 RSB2 R0 PAIR R2 subtract his from ours 244 * R0,R1 = - 1F903 120401F4 01 IMM 245 SUB2 R0 500 allow a little for transmission delay 1F904 160403E8 01 IMM 246 DIV2 R0 MSECS convert to seconds 1F905 E4578801 1 6 BASE 247 ST R1 SP,HOLDTIME save in temp 1F906 70124000 0 1 REG 248 LDN R0 R1 seconds won't overflow 1F907 54124000 0 1 REG 249 MAX R0 R1 absolute value in R0, signed in R1 1F908 E401A8ED 0 250 ST R0 VALUE save the positive version 1F909 6404000A 0 IMM 251 CPR R0 10 allow ten second variation 1F90A FE09F915 252 JLT RPCEXIT jump out if within 10 seconds 253 * \ / 1F90B DC41B86F 254 CALLNP BLANKOUT clear the output buffer 1F90C 6005F916 0 IMM 255 LD R0 ADR CLKMSG get pointer to message 1F90D DC41B87B 256 CALLNP MESSMOVE and move it into buffer 1F90E DC41B62D 257 CALLNP DECOUT convert VALUE to decimal in buffer 1F90F 6005F91F 0 IMM 258 LD R0 ADR FASTMSG => 'fast' 1F910 5C178801 6 BASE 259 CMZ SP,HOLDTIME check the sign 1F911 FE09F913 260 JLT USEFSTMSG jump if customer clock fast 1F912 6005F923 0 IMM 261 LD R0 ADR SLOWMSG => 'slow' 0001F913 262 USEFSTMSG LABEL 1F913 DC41B87B 263 CALLNP MESSMOVE and append this to buffer 1F914 DC41B886 264 CALLNP OUTO now print the buffer full 0001F915 265 RPCEXIT LABEL 1F915 5D1F8002 6 STAK 266 LEAVE STAK SP,RPCSSZ return to caller 267 * --- 268 1F916 43757374 269 CLKMSG TEXTZ "Customer clock is approximately " 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 568 (DIALER) F 43 RFP Line Protocol Routines 1F91F 20736563 270 FASTMSG TEXTZ " seconds fast" 1F923 20736563 271 SLOWMSG TEXTZ " seconds slow" 272 273 END of Report Clock 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 569 (DIALER) F 43 RFP Line Protocol Routines 275 276 BLOCK RDU configuration 277 278 ENTRY CONFIGRDU to set up RDU configuration 279 280 ********************************************************************************** 281 * * 282 * This routine is to be called at initialization time. * 283 * It reads a file called "DIALFILE.TEXT". Each record in this * 284 * file has the format: * 285 * ,|,, * 286 * ", * 287 * This informs the RDU program where the modems are, how * 288 * to make the dialer dial the correct line, and which line to use. * 289 * * 290 ********************************************************************************** 291 1F927 DD5F8001 6 STAK 292 CONFIGRDU ENTRNP STAK SP,1 1F928 6005F95F 0 IMM 293 LD R0 ADR DIALFILE => configuration file name 1F929 E401A8E5 0 294 ST R0 BUFPT save ptr to file name 1F92A DC41BD4A 295 CALLNP FILEGET try to equip the file 1F92B FA0DF966 0 296 JNEZ R0 ERRNRDUF no RDU information file 1F92C E441F4A9 1 297 ST R1 RDULUN save unit number used 1F92D 60C40000 3 IMM 298 LD R3 0 get initial index into config tables 299 * \ / 0001F92E 300 ANOTHRMDM LABEL come here to process the next record 1F92E E4C1F66F 3 301 ST R3 MODTABINDX preserve current index as maximum 1F92F DC01BD85 302 CALL READFILE call to read the record 1F930 4041F4A9 303 PARVL RDULUN indicate the unit from which to read 1F931 FA09F96A 0 304 JLTZ R0 ERRFAU jump if bad data 1F932 FA05F95D 0 305 JGTZ R0 ENDMDMCNF jump on end of data 306 * \ / 1F933 6001A8E5 0 307 LD R0 BUFPT get pointer to buffer 1F934 60080080 0 0 ZBM 308 LD R0 R0,0/CH0 pick up first character in buffer 1F935 6404002A 0 IMM 309 CPR R0 "*" is it a snowflake? 1F936 FE03F92E 310 JEQ ANOTHRMDM jump if so to ignore comment record 311 * \ / 1F937 DC41B33C 312 CALLNP FETCHAP fetch the modem name 1F938 F2AFF971 2 313 JBF R2/TALPH ERRFRMT1 jump if not alpha type 1F939 DC41B451 314 CALLNP PACKER convert to PAK12 1F93A E627F4EF 01 3 315 ST2 R0 MODNAME(R3) store the modem port name 316 * \ / 1F93B DC41B346 317 CALLNP FETCHITMF fetch the rate indicator 1F93C F6AFF940 2 318 JBT R2/TALPH HAVEHILOW jump if older style 1F93D F2ADF975 2 319 JBF R2/TNUM ERRFRMT2 jump if bad deal 1F93E E427F52F 0 3 320 ST R0 MODSPEED(R3) remember rate 1F93F FE0FF946 321 JMP GETITEM3 continue onward 322 * --- 323 0001F940 324 HAVEHILOW LABEL 1F940 EDE7F52F 3 325 STW MODSPEED(R3) default to high rate 1F941 6401F9DC 0 326 CPR R0 ASCHIGH is the specifier indeed 'high'? 1F942 FE03F946 327 JEQ GETITEM3 jump if it is, leave default setting 1F943 EC27F52F 3 328 STZ MODSPEED(R3) now try low rate 1F944 6401F9DD 0 329 CPR R0 ASCLOW is the specifier 'low'? 1F945 FE0DF979 330 JNE ERRFRMT3 jump if not good 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 570 (DIALER) F 43 RFP Line Protocol Routines 331 * \ / 0001F946 332 GETITEM3 LABEL 1F946 DC41B33C 333 CALLNP FETCHAP fetch the dialer name 1F947 F2AFF97D 2 334 JBF R2/TALPH ERRFRMT4 jump if not alpha type 1F948 DC41B451 335 CALLNP PACKER convert to PAK12 1F949 E627F4AF 01 3 336 ST2 R0 DIALNAME(R3) store the dialer port name 337 * \ / 1F94A DC41B33C 338 CALLNP FETCHAP fetch the modem address 1F94B F2A9F981 2 339 JBF R2/TSTR ERRFRMT5 jump if not string type 1F94C 6041A8ED 1 340 LD R1 VALUE get the string length 1F94D 64440020 1 IMM 341 CPR R1 32 string must not be longer than 32 chars 1F94E FE05F981 342 JGT ERRFRMT5 jump out if so 1F94F 6005A830 0 IMM 343 LD R0 ADR SBUFFW where the string is 1F950 1CC40008 3 IMM 344 MUL R3 MODADDL adjust for size of entry 1F951 38A7F54F 2 3 345 LEA R2 MODADD(R3) where to move address to 1F952 14C40008 3 IMM 346 DIV R3 MODADDL return to normal 1F953 FE400000 347 CMOVE move em out 1F954 EC168000 2 CACH 348 STZ CACH R2,0 terminate the string 349 * \ / 1F955 DC41B342 350 CALLNP FETCHDN get the class code 1F956 F2ADF985 2 351 JBF R2/TNUM ERRFRMT6 jump if not a number 1F957 E427F64F 0 3 352 ST R0 MODCLASS(R3) save the class 353 * \ / 1F958 18C40001 3 IMM 354 ADD R3 1 advance the index 1F959 64C40020 3 IMM 355 CPR R3 MODTABMAX see if too big 1F95A FE0BF92E 356 JLE ANOTHRMDM jump if we can handle another 357 * \ / The space reserved for buffers is gone 1F95B 6005F989 0 IMM 358 LD R0 ADR TABOFLOMSG put out overflow message 1F95C DC41B88A 359 CALLNP OUT and continue 360 * \ / 0001F95D 361 ENDMDMCNF LABEL 1F95D DC41F96D 362 CALLNP FREERDULUN release the unit 1F95E 5D1F8001 6 STAK 363 LEAVE STAK SP,1 Return to caller 364 * --- 365 1F95F 52454D4F 366 DIALFILE TEXT "REMOTE.RFP:DIALFILE.TEXT " 367 0001F966 368 ERRNRDUF LABEL no RDU information file 1F966 6005F997 0 IMM 369 LD R0 ADR NOFILEMSG load address of 'could not equip' message 370 * \ / 0001F967 371 FATALERR LABEL 1F967 DC41B88A 372 CALLNP OUT and print it 1F968 60040078 0 IMM 373 LD R0 URSTOPA get code for abnormal termination 1F969 09040000 IMM 374 UREQ 0 tell system it's quits 375 * --- 376 0001F96A 377 ERRFAU LABEL bad data read from file 1F96A DC41F96D 378 CALLNP FREERDULUN Release the unit 1F96B 6005F99E 0 IMM 379 LD R0 ADR FAUMSG load address of 'file abnormal' message 1F96C FE0FF967 380 JMP FATALERR and go share code 381 * --- 382 1F96D DD5F8001 6 STAK 383 FREERDULUN ENTRNP STAK SP,1 to release the unit 1F96E 60040060 0 IMM 384 LD R0 FRUNEQUIP get the request 1F96F 0881F4A9 385 FREQ RDULUN let it go 1F970 5D1F8001 6 STAK 386 LEAVE STAK SP,1 and return to caller 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 571 (DIALER) F 43 RFP Line Protocol Routines 387 * --- 388 0001F971 389 ERRFRMT1 LABEL modem name in record not alpha 1F971 6005F9A7 0 IMM 390 LD R0 ADR PREMES load address of header message 1F972 DC41B88A 391 CALLNP OUT and print it 1F973 6005F9B1 0 IMM 392 LD R0 ADR MESERFRMT1 and continue message 1F974 FE0FF967 393 JMP FATALERR go to print the error 394 * --- 395 0001F975 396 ERRFRMT2 LABEL high/low name in record not alpha 1F975 6005F9A7 0 IMM 397 LD R0 ADR PREMES load address of header message 1F976 DC41B88A 398 CALLNP OUT and print it 1F977 6005F9B7 0 IMM 399 LD R0 ADR MESERFRMT2 and continue message 1F978 FE0FF967 400 JMP FATALERR go to print the error 401 * --- 402 0001F979 403 ERRFRMT3 LABEL high/low field was neither 1F979 6005F9A7 0 IMM 404 LD R0 ADR PREMES load address of header message 1F97A DC41B88A 405 CALLNP OUT and print it 1F97B 6005F9C0 0 IMM 406 LD R0 ADR MESERFRMT3 and continue message 1F97C FE0FF967 407 JMP FATALERR go to print the error 408 * --- 409 0001F97D 410 ERRFRMT4 LABEL dialer name in record not alpha 1F97D 6005F9A7 0 IMM 411 LD R0 ADR PREMES load address of header message 1F97E DC41B88A 412 CALLNP OUT and print it 1F97F 6005F9C8 0 IMM 413 LD R0 ADR MESERFRMT4 and continue message 1F980 FE0FF967 414 JMP FATALERR go to print the error 415 * --- 416 0001F981 417 ERRFRMT5 LABEL modem address not string 1F981 6005F9A7 0 IMM 418 LD R0 ADR PREMES load address of header message 1F982 DC41B88A 419 CALLNP OUT and print it 1F983 6005F9CE 0 IMM 420 LD R0 ADR MESERFRMT5 and continue message 1F984 FE0FF967 421 JMP FATALERR go to print the error 422 * --- 423 0001F985 424 ERRFRMT6 LABEL class code is not number 1F985 6005F9A7 0 IMM 425 LD R0 ADR PREMES load address of header message 1F986 DC41B88A 426 CALLNP OUT and print it 1F987 6005F9D5 0 IMM 427 LD R0 ADR MESERFRMT6 and continue message 1F988 FE0FF967 428 JMP FATALERR go to print the error 429 * --- 430 1F989 7461626C 431 TABOFLOMSG TEXTZ "table overflow reading DIALFILE. Ignoring remainder." 1F997 436F756C 432 NOFILEMSG TEXTZ "Could not equip DIALFILE" 1F99E 4449414C 433 FAUMSG TEXTZ "DIALFILE is abnormal/unavailable" 434 1F9A7 466F726D 435 PREMES TEXTZ "Format error in modem info record - " 1F9B1 6D6F6465 436 MESERFRMT1 TEXTZ "modem name not alpha" 1F9B7 62616420 437 MESERFRMT2 TEXTZ "bad value for rate specification" 1F9C0 68696768 438 MESERFRMT3 TEXTZ "high/low indicator was neither" 1F9C8 6469616C 439 MESERFRMT4 TEXTZ "dialer name not alpha" 1F9CE 6D6F6465 440 MESERFRMT5 TEXTZ "modem address not string" 1F9D5 636C6173 441 MESERFRMT6 TEXTZ "class code is not number" 442 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 572 (DIALER) F 43 RFP Line Protocol Routines 1F9DC 48494748 443 ASCHIGH ASCII 1,HIGH 1F9DD 4C4F5720 444 ASCLOW ASCII 1,LOW 445 446 END of configuration code 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 573 (DIALER) F 43 RFP Line Protocol Routines 448 449 BLOCK 450 ENTRY SETRATES initialize the communication baud rates 451 ENTRY SETBRKLEN routine to calculate break length 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 574 (DIALER) F 43 RFP Line Protocol Routines 453 454 ********************************************************************************** 455 * * 456 * This routine sets up the FAST and SLOW communication baud * 457 * rates depending on the value of SIRATE. * 458 * Call: * 459 * CALL SETRATES * 460 * PARV * 461 * PARVL * 462 * * 463 * Registers Used: R0-R2 * 464 * Stack Required: 1 * 465 * * 466 ********************************************************************************** 467 1F9DE DD1F8001 6 STAK 468 SETRATES ENTR STAK SP,1 1F9DF C1524000 1 REG 469 STPV R1 slow rate 1F9E0 C0528000 2 REG 470 STPVL R2 fast rate 471 * \ / 1F9E1 6001F4A2 0 472 LD R0 SIRATE get the rate specification 1F9E2 64040001 0 IMM 473 CPR R0 1 old style specification 1F9E3 FE0BF9E8 474 JLE SAVERATES jump if it is 1F9E4 E401F670 0 475 ST R0 SLOW slow ... 1F9E5 E401F672 0 476 ST R0 CURRENTRAT ... current ... 1F9E6 E401F671 0 477 ST R0 FAST ... and fast are all the same 1F9E7 5D1F8001 6 STAK 478 LEAVE STAK SP,1 479 * --- 480 0001F9E8 481 SAVERATES LABEL 1F9E8 E441F670 1 482 ST R1 SLOW set the slow rate 1F9E9 E441F672 1 483 ST R1 CURRENTRAT save slow as current one 1F9EA E481F671 2 484 ST R2 FAST and the fast rate 1F9EB 5D1F8001 6 STAK 485 LEAVE STAK SP,1 486 * --- 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 575 (DIALER) F 43 RFP Line Protocol Routines 488 489 ********************************************************************************** 490 * * 491 * This routine calculates the length of break that must be * 492 * sent by SENDBREAK based on the desired initial rate. * 493 * A positive length indicates that an actual break should be * 494 * used. All table entries are assembled positive. However, in * 495 * some circumstances, the link cannot support variable length * 496 * breaks. In this case, a negative length may be entered in the * 497 * table to indicate that the specified number of nulls should be * 498 * sent. SSU microcode versions of 16 and later will recognize a * 499 * string of nulls as a break. * 500 * The SENDBREAK sends all breaks at the baud rate that has * 501 * been determined for the link. * 502 * The SSU counts 4 ms periods while processing breaks and * 503 * expects break lengths to be one of four values. These values * 504 * are 078, 058, 048, or 038 for the available rates from lowest * 505 * to highest. These lengths are translated into character times * 506 * by the math in the table entries, as follows: * 507 * length (in 4 ms units) * 4 * baud rate (in bits per second) * 508 * divided by 10 (bits per character) divided by 1000 (ms per second). * 509 * Call: * 510 * CALL SETBRKLEN * 511 * PARVL <0 if local, 1 if dialout> * 512 * * 513 * Registers Used: R0-R2 * 514 * Stack Required: 1 * 515 * * 516 ********************************************************************************** 517 0001F9EC 518 LCLTBL BASE R1 00164800 1 BASE 519 BAUDPART LABEL 1F9EC 00000960 520 VFD 2400 lowest rate is 2400 1F9ED 000012C0 521 VFD 4800 1F9EE 00002580 522 VFD 9600 1F9EF 00004B00 523 VFD 19200 highest local rate 00000004 ABS 524 TBLSZ EQU DISPW BAUDPART 00164804 1 BASE 525 LENPART LABEL 1F9F0 00000073 526 vfd 078*4*2400/10/1000 char times at 2400 baud = 480 ms 1F9F1 000000A8 527 vfd 058*4*4800/10/1000 char times at 4800 baud = 352 ms 1F9F2 00000114 528 vfd 048*4*9600/10/1000 char times at 9600 baud = 288 ms 1F9F3 000001AE 529 vfd 038*4*19200/10/1000 char times at 19200 baud = 224 ms 530 DRCT 531 0001F9F4 532 DIALTBL LABEL 1F9F4 00000096 533 VFD 150 lowest baud rate for dialout 1F9F5 0000012C 534 VFD 300 1F9F6 000004B0 535 VFD 1200 1F9F7 00000960 536 VFD 2400 537 * 1F9F8 00000007 538 vfd 078*4*150/10/1000 char times at 150 baud = 480 ms 1F9F9 0000000A 539 vfd 058*4*300/10/1000 char times at 300 baud = 352 ms 1F9FA 00000022 540 vfd 048*4*1200/10/1000 char times at 1200 baud = 288 ms 1F9FB 00000035 541 vfd 038*4*2400/10/1000 char times at 2400 baud = 224 ms 542 1F9FC DD1F8001 6 STAK 543 SETBRKLEN ENTR STAK SP,1 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 576 (DIALER) F 43 RFP Line Protocol Routines 1F9FD C0520000 0 REG 544 STPVL R0 pick up local/dialout switch 1F9FE 3841F9EC 1 545 LEA R1 LCLTBL pick up local table pointer 1F9FF FA03FA01 0 546 JEQZ R0 LEAVELCL jump if actually local 1FA00 3841F9F4 1 547 LEA R1 DIALTBL else load dialout table pointer 0001FA01 548 LEAVELCL LABEL 1FA01 60840003 2 IMM 549 LD R2 TBLSZ-1 load counter for loop 1FA02 6001F670 0 550 LD R0 SLOW load initial baud rate 0001FA03 551 SBCPRLP LABEL 1FA03 641C5000 0 12 BASE 552 CPR R0 R1,BAUDPART(R2) check for a baud rate match 1FA04 FE03FA07 553 JEQ SBFND jump when found 1FA05 FAA7FA03 2 554 JDR R2 SBCPRLP loop back for next entry 1FA06 FE0FFA0A 555 JMP ERREXIT 0001FA07 556 SBFND LABEL 1FA07 601C5004 0 12 BASE 557 LD R0 R1,LENPART(R2) load number of character times 1FA08 E401F673 0 558 ST R0 BREAKLEN and save for SENDBREAK routine 1FA09 19C40001 7 IMM 559 ADD R7 1 advance to happy return 1FA0A 5D1F8001 6 STAK 560 ERREXIT LEAVE STAK SP,1 561 * --- 562 563 END 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 577 (DIALER) F 43 RFP Line Protocol Routines 565 566 BLOCK routine to send a break to the remote machine 567 568 ENTRY SENDBREAK to send a break to the remote machine 569 570 ********************************************************************************** 571 * * 572 * This code sends a break to the remote machine over the * 573 * TALKER unit. * 574 * The SSU has a defect in break recognition due to the * 575 * use of the 8251 kludge USART. We need a delay after a * 576 * break to give the microcode time to recognize the break. * 577 * This is only a problem if we send down characters during * 578 * the refractory period following the break (but before the * 579 * SSU microcode has recognized it). We unconditionally do * 580 * the delay to be safe. Also, at one time the CIA microcode * 581 * failed to restore the line to marking following a BREAK. * 582 * The dwell forces a marking line in any event. * 583 * The SETBRKLEN routine calculated the break length * 584 * and type of break. We either issue an FRTBREAK request * 585 * for the specified count, or issue an FRTWRITEB for the * 586 * indicated number of characters. * 587 * Call: * 588 * CALL SENDBREAK * 589 * Eats R0:R1 * 590 * stack required = 6 * 591 * 1 + TRACE(5) * 592 * * 593 ********************************************************************************** 594 1FA0B DD5F8001 6 STAK 595 SENDBREAK ENTRNP STAK SP,1 1FA0C 6041F673 1 596 LD R1 BREAKLEN get the required break length 597 * \ / 1FA0D 5D41F696 598 XCT TRACEINST record our presence here 1FA0E FEC0000D 599 NOP TDE0D indicate code 600 * \ / 601 1FA0F FA49FA16 1 602 JLTZ R1 SBNULLS jump if we are to send nulls 1FA10 600401B5 0 IMM 603 LD R0 FRTBREAK get code for transmitting a break 1FA11 0881F4AB 604 FREQ TALKLUN and issue against the port 605 * \ / 0001FA12 606 SBDELAY LABEL 1FA12 600401B4 0 IMM 607 LD R0 FRTDELAY get function for delay (dwell) 1FA13 6044000C 1 IMM 608 LD R1 12 indicate time interval (milliseconds) 1FA14 0881F4AB 609 FREQ TALKLUN and issue to the talker 610 * \ / 611 1FA15 5D1F8001 6 STAK 612 LEAVE STAK SP,1 return to caller 613 * --- 614 0001FA16 615 SBNULLS LABEL 1FA16 70524000 1 1 REG 616 LDN R1 R1 make into a positive count 1FA17 3881FA1B 2 617 LEA R2 NULLBUF address of nulls to send 1FA18 60040042 0 IMM 618 LD R0 FRWRITEB request for binary write 1FA19 0881F4AB 619 FREQ TALKLUN issue to the talker 1FA1A FE0FFA12 620 JMP SBDELAY 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 578 (DIALER) F 43 RFP Line Protocol Routines 621 * --- 622 1FA1E 00000000 623 NULLBUF VFD 0,0,0,0 1FA22 00000000 624 VFD 0,0,0,0 1FA26 00000000 625 VFD 0,0,0,0 1FA2A 00000000 626 VFD 0,0,0,0 627 628 END of the send break routine 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 579 (DIALER) F 43 RFP Line Protocol Routines 630 631 BLOCK routine to send a dwell 632 633 ENTRY SENDDWELL to send dwell to remote machine 634 635 ********************************************************************************** 636 * * 637 * This code sends a 6 second long dwell to the remote machine. * 638 * We send this when there might be a syncronization error in * 639 * the communications. This ensures that the remote machine * 640 * will time out and flush any garbage from its buffer. * 641 * * 642 * stack required = 1 * 643 * * 644 ********************************************************************************** 645 1FA2B DD5F8001 6 STAK 646 SENDDWELL ENTRNP STAK SP,1 647 1FA2C 600401B4 0 IMM 648 LD R0 FRTDELAY get function for delay (dwell) 1FA2D 60441770 1 IMM 649 LD R1 6*MSECS indicate the time interval 1FA2E 0881F4AB 650 FREQ TALKLUN and issue to the talker 651 1FA2F 5D1F8001 6 STAK 652 LEAVE STAK SP,1 return to caller 653 * --- 654 655 END of send dwell 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 580 (DIALER) F 43 RFP Line Protocol Routines 657 658 BLOCK routine to do the dialing 659 660 ENTRY DIALIT to do the dialing on the autodialer port 661 ENTRY DIALHAYES to do the dialing on a Hayes compatible modem 662 ENTRY DIALVADIC to do the dialing on a Vadic 3451 modem 663 664 ********************************************************************************** 665 * * 666 * This is the routine for dialing out using a Racal-Vadic * 667 * VA831A. It takes the remote systems phone number and * 668 * formats it for transmission to the auto-dialer. * 669 * The data sent to the dialer is in ASCII and goes out over a * 670 * regular RS 232 port. The format of the string sent to the dialer * 671 * is as follows: * 672 * * 673 * STX (02) start of dialing * 674 * "0"+*4+ part of address * 675 * "0"+ modem address * 676 * phone number . . . * 677 * "0"+ for any number of digits * 678 * "<" end of number, optional, * 679 * causes immediate release of dialer * 680 * "=" tandem dial code * 681 * SI (0F) send characters to dialer * 682 * ETX (03) end of text * 683 * * 684 * In the event of a failure of some sort, a SOH (01) * 685 * character may be sent as an abort. * 686 * * 687 * The data returned from the dialer is: * 688 * "A" DSS (Data Set Status, means successful completion) * 689 * "B" ACR (abandon call and retry) * 690 * "D" framing error * 691 * "E" parity error * 692 * "F" RAM overflow * 693 * "G" DLO (data line occupied) * 694 * * 695 * This routine waits for up to 90 seconds (DIALTIME) for a * 696 * response character to come back from the modem. If the response * 697 * is not "A" (happy) we go to the error return with an error * 698 * message pointer. * 699 * A busy SSU phone line will cause the dialer to ACR after * 700 * about 60 seconds (stupid dialer!). Not the same as DLO, which * 701 * happens when the modem that we are asked to dial for is already * 702 * engaged in a call. * 703 * The user breaking out of the dialing sequence results in * 704 * the dialer being unusable for about 40 seconds while it resets * 705 * (dialing attempts initiated during this period get ACR). * 706 * We have seen the dialer fail to recognize the SSU answering * 707 * the phone. This causes the full DIALTIME timeout. * 708 * Call: * 709 * CALLNP DIALIT * 710 * JMP * 711 * * 712 * Registers Used: R0:R3 * 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 581 (DIALER) F 43 RFP Line Protocol Routines 713 * Stack Required: 7 * 714 * * 715 * 1 + Max ( DIALRXMIT (1), DIALRWAIT (6), DLRABANDON (6) ) * 716 * * 717 ********************************************************************************** 718 1FA30 DD5F8001 6 STAK 719 DIALIT ENTRNP STAK SP,1 1FA31 600401B1 0 IMM 720 LD R0 FRTFLSHI flush lingering responses 1FA32 0881F4AA 721 FREQ DIALLUN from the dialer 722 * \ / 1FA33 6085F402 2 IMM 723 LD R2 ADR (DIALERBUFW) address dialer buffer 1FA34 60040002 0 IMM 724 LD R0 STX start of text character 1FA35 E4168000 0 2 CACH 725 ST R0 CACH R2,0 place into buffer 1FA36 38968001 2 2 CACH 726 LEA R2 CACH R2,1 advance buffer pointer 727 * \ / 1FA37 60C1F4AC 3 728 LD R3 TALKINDEX get index for which modem we have 1FA38 1CC40008 3 IMM 729 MUL R3 MODADDL adjust for entry size 1FA39 3827F54F 0 3 730 LEA R0 MODADD(R3) address of address characters for this modem 1FA3A 60440020 1 IMM 731 LD R1 MODADDL*CPW maximum length of address 1FA3B DA1C0800 0 1 732 SRCHI R0 R1 NULL look for terminator 1FA3C 30440020 1 IMM 733 RSB R1 MODADDL*CPW how many chars before NULL 734 * \ / 1FA3D 3827F54F 0 3 735 LEA R0 MODADD(R3) regenerate address 1FA3E DA880800 2 01 736 MOVE R2 R0 R1 move the modem address 737 * \ / 1FA3F 6001F4A3 0 738 LD R0 SIFONE site phone number 1FA40 60440040 1 IMM 739 LD R1 MAXDIALSTR maximum string length 1FA41 DA1C0800 0 1 740 SRCHI R0 R1 NULL look for string end 1FA42 30440040 1 IMM 741 RSB R1 MAXDIALSTR calculate phone string length 742 * \ / 1FA43 6001F4A3 0 743 LD R0 SIFONE site phone number, again 1FA44 DA880800 2 01 744 MOVE R2 R0 R1 move the phone number 745 * \ / 1FA45 6005FA4F 0 IMM 746 LD R0 ADR (DIALTEXT) characters to initiate dialing 1FA46 60440003 1 IMM 747 LD R1 3 three characters worth 1FA47 DA880800 2 01 748 MOVE R2 R0 R1 move 'em out! 749 * \ / 1FA48 DC41FA50 750 CALLNP DIALRXMIT now send string out 1FA49 DC41FA69 751 CALLNP DIALRWAIT wait for dialer response 1FA4A FE0FFA4D 752 JMP TROUBLEXIT bail out if error found 1FA4B 19C40001 7 IMM 753 ADD R7 1 advance to skip return 1FA4C 5D1F8001 6 STAK 754 LEAVE STAK SP,1 755 * --- 756 0001FA4D 757 TROUBLEXIT LABEL 1FA4D DC41FA59 758 CALLNP DLRABANDON stop the attempt 1FA4E 5D1F8001 6 STAK 759 LEAVE STAK SP,1 760 * --- 761 0001FA4F 762 DIALTEXT LABEL 1FA4E 00000000 763 VFDC SI,ETX,NULL 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 582 (DIALER) F 43 RFP Line Protocol Routines 765 766 ********************************************************************************** 767 * * 768 * Routine to transmit the dialer buffer to the auto-dialer. * 769 * Hopefully errors will get seen when checking the dialer response. * 770 * Call: * 771 * * 772 * CALLNP DIALRXMIT * 773 * * 774 * Registers Used: R0:R2 * 775 * Stack Required: 1 * 776 * * 777 ********************************************************************************** 778 1FA50 DD5F8001 6 STAK 779 DIALRXMIT ENTRNP STAK SP,1 1FA51 6005F402 0 IMM 780 LD R0 ADR (DIALERBUFW) address dialer buffer 1FA52 60440040 1 IMM 781 LD R1 MAXDIALSTR maximum buffer length 1FA53 DA1C0800 0 1 782 SRCHI R0 R1 NULL search for the string end 1FA54 30440040 1 IMM 783 RSB R1 MAXDIALSTR calculate string length 784 * \ / 1FA55 60040042 0 IMM 785 LD R0 FRWRITEB get a write binary request 1FA56 6085F402 2 IMM 786 LD R2 ADR (DIALERBUFW) address dialer buffer 1FA57 0881F4AA 787 FREQ DIALLUN send to dialer 1FA58 5D1F8001 6 STAK 788 LEAVE STAK SP,1 return 789 * --- 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 583 (DIALER) F 43 RFP Line Protocol Routines 791 792 ********************************************************************************** 793 * * 794 * Routine to transmit an abort to the auto-dialer. * 795 * Call: * 796 * * 797 * CALLNP DLRABANDON * 798 * * 799 * Registers Used: R0:R2 * 800 * Stack Required: 6 * 801 * * 802 * 1 + Max ( OUT (5) ) * 803 * * 804 ********************************************************************************** 805 1FA59 DD5F8001 6 STAK 806 DLRABANDON ENTRNP STAK SP,1 1FA5A 60040042 0 IMM 807 LD R0 FRWRITEB get a write binary request 1FA5B 60440001 1 IMM 808 LD R1 1 we are sending a single character 1FA5C 6085FA62 2 IMM 809 LD R2 ADR DLRSOHPTR get pointer to the SOH (abort) character 1FA5D 0881F4AA 810 FREQ DIALLUN send to dialer 1FA5E FA07FA61 0 811 JGEZ R0 DLRXFINE jump if all is well 1FA5F 6005FA63 0 IMM 812 LD R0 ADR XMITMESS Unable to transmit 1FA60 DC41B88A 813 CALLNP OUT tell user the problem 814 * \ / 0001FA61 815 DLRXFINE LABEL 1FA61 5D1F8001 6 STAK 816 LEAVE STAK SP,1 return 817 * --- 818 0001FA62 819 DLRSOHPTR LABEL Character to send to dialer for abort 1FA61 00000001 820 VFDC SOH 1FA63 556E6162 821 XMITMESS TEXTZ "Unable to reset dialer." 822 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 584 (DIALER) F 43 RFP Line Protocol Routines 824 825 ********************************************************************************** 826 * * 827 * Routine to wait for the dialer response. * 828 * Call: * 829 * * 830 * CALLNP DIALRWAIT * 831 * JMP * 832 * * 833 * Registers Used: R0:R3 * 834 * Stack Required: 6 * 835 * * 836 * 1 + Max ( OUT (5) ) * 837 * * 838 ********************************************************************************** 839 0000005A ABS 840 DIALTIME EQU 90 time to wait for dialer response (seconds) 00000003 ABS 841 DIALCHKINT EQU 3 time between checks for response 842 1FA69 DD5F8001 6 STAK 843 DIALRWAIT ENTRNP STAK SP,1 1FA6A 60C4001D 3 IMM 844 LD R3 DIALTIME/DIALCHKINT-1 number of times to try this loop 845 * \ / 0001FA6B 846 MOREDELAY LABEL 1FA6B 60040140 0 IMM 847 LD R0 URDELAY do a short delay 1FA6C 60440003 1 IMM 848 LD R1 DIALCHKINT for this many seconds 1FA6D 60840000 2 IMM 849 LD R2 0 no early fallout conditions 1FA6E 09040000 IMM 850 UREQ 0 wait here 851 * \ / 1FA6F 60048030 0 IMM 852 LD R0 FRREAD+XRSUSPERR read with no suspend 1FA70 60440000 1 IMM 853 LD R1 0 indicate buffer length 1FA71 0881F4AA 854 FREQ DIALLUN get the character from the dialer 1FA72 FA09FA7B 0 855 JLTZ R0 XREQERR jump if xreq error 856 * \ / 1FA73 788400DF 2 IMM 857 AND R2 LOWBIAS ensure upper case 1FA74 10840041 2 IMM 858 SUB R2 "A" remove bias 1FA75 FA8DFA77 2 859 JNEZ R2 DIALRERR jump out if dialer error 1FA76 FBE1FA81 7 860 IRJ R7 DLREXIT advance return address and leave 861 * --- 862 0001FA77 863 DIALRERR LABEL 1FA77 50840007 2 IMM 864 MIN R2 MAXDLRERR limit damage 1FA78 6025FA81 0 2 865 LD R0 DIALERRTAB(-1)(R2) pick up error message pointer 1FA79 DC41B88A 866 CALLNP OUT print the helpful(?) message 1FA7A 5D1F8001 6 STAK 867 LEAVE STAK SP,1 and split 868 * --- 869 0001FA7B 870 XREQERR LABEL 1FA7B 780403FF 0 IMM 871 AND R0 03FF mask off to the error code 1FA7C 640400AD 0 IMM 872 CPR R0 XREQERSUSP verify no-suspend error 1FA7D FE0DFA7F 873 JNE GIVEUNKERR give unknown error 1FA7E FAE7FA6B 3 874 JDR R3 MOREDELAY no luck this round, continue 875 * \ / 0001FA7F 876 GIVEUNKERR LABEL 1FA7F 6001FAAA 0 877 LD R0 DLRERRMUNK get pointer to unknown error 1FA80 DC41B88A 878 CALLNP OUT print the helpful(?) message 879 * \ / 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 585 (DIALER) F 43 RFP Line Protocol Routines 0001FA81 880 DLREXIT LABEL 1FA81 5D1F8001 6 STAK 881 LEAVE STAK SP,1 882 * --- 883 0001FA82 884 DIALERRTAB LABEL 1FA82 0001FA89 885 PTR DLRERRMB ACR - (abandon call and retry) 1FA83 0001FAAA 886 PTR DLRERRMUNK unknown error 1FA84 0001FA91 887 PTR DLRERRMD framing error 1FA85 0001FA97 888 PTR DLRERRME parity error 1FA86 0001FA9D 889 PTR DLRERRMF RAM overflow 1FA87 0001FAA3 890 PTR DLRERRMG DLO (data line occupied) 1FA88 0001FAAA 891 PTR DLRERRMUNK unknown error 00000007 DISP 892 MAXDLRERR EQU DISP DIALERRTAB 893 1FA89 6469616C 894 DLRERRMB TEXTZ "dialer - abandon call and retry" 1FA91 6469616C 895 DLRERRMD TEXTZ "dialer - framing error" 1FA97 6469616C 896 DLRERRME TEXTZ "dialer - parity error" 1FA9D 6469616C 897 DLRERRMF TEXTZ "dialer - RAM overflow" 1FAA3 6469616C 898 DLRERRMG TEXTZ "dialer - data line occupied" 1FAAA 6469616C 899 DLRERRMUNK TEXTZ "dialer - unknown error" 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 586 (DIALER) F 43 RFP Line Protocol Routines 901 902 ********************************************************************************** 903 * * 904 * This routine takes the remote systems phone number and * 905 * formats it for transmission to the auto-dialing Hayes type * 906 * modem. * 907 * The data sent to the modem is in ASCII and goes out over a * 908 * regular RS232 port. Note that Hayes modems will select a * 909 * protocol based on the baud rate at which they are commanded. * 910 * E.g. if you send all of these dialing commands at 300 baud, * 911 * the modem will use Bell 103 protocol. Therefore, before * 912 * dialing we set the desired baud rate and send strings to reset * 913 * and initialize the modem. * 914 * The format of the strings sent to the modem is as follows: * 915 * * 916 * Initialize: * 917 * "ATV0" digit result codes * 918 * "ATE0" no command echo * 919 * "AT&D2" command mode/hangup DTR low * 920 * Dialing: * 921 * "ATDTphone number" dial sequence itself * 922 * Reset: * 923 * Set DTR Low FrtSetTrns (#11F) * 924 * "ATZ" reset the modem * 925 * * 926 * In the event of a failure of some sort, the DTR signal is * 927 * set low. This should cause the modem to hangup and enter command * 928 * mode. From there a "ATZ" should pretty much reset things. Note * 929 * that for 1200 baud modems this will not work correctly since they * 930 * can not hangup when DTR is set low. (AT&D2 is an illegal command * 931 * to the 1200 bps modem) * 932 * The short (terse) form of the result code is an ASCII digit * 933 * or digits followed by a carriage return (CR) with definitions as * 934 * follows: * 935 * * 936 * "0" command executed without errors * 937 * "1" carrier signal detected (300 baud) * 938 * "2" ring signal detected * 939 * "3" carrier lost or never heard * 940 * "4" error in the command line * 941 * "5" carrier detected at 1200 baud * 942 * "6" no dial tone * 943 * "7" busy * 944 * "8" no anwser * 945 * "9" undefined * 946 * "10" connect 2400 * 947 * * 948 * This routine waits for up to 90 seconds (DIALTIME) for * 949 * response characters to come back from the modem. If the response * 950 * is not good we print an error message and exit via the error * 951 * return. * 952 * Call: * 953 * CALLNP DIALHAYES * 954 * JMP * 955 * * 956 * Registers Used: R0:R3 * 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 587 (DIALER) F 43 RFP Line Protocol Routines 957 * Stack Required: 8 * 958 * * 959 * 1 + Max ( HAZINIT (7), HAZINIT (7), HAZABANDON (7) ) * 960 * * 961 ********************************************************************************** 962 1FAB0 41544454 963 DIALCHARS TEXTZ "ATDT" dialing characters 964 1FAB2 DD5F8001 6 STAK 965 DIALHAYES ENTRNP STAK SP,1 1FAB3 DC41FAD2 966 CALLNP HAZINIT initialize the modem 1FAB4 FE0FFAD0 967 JMP TROUBLXIT jump if problems 968 * \ / 1FAB5 6085F402 2 IMM 969 LD R2 ADR (DIALERBUFW) will hold dialer string 1FAB6 60440004 1 IMM 970 LD R1 4 dial command length 1FAB7 6005FAB0 0 IMM 971 LD R0 ADR (DIALCHARS) dialing characters 1FAB8 DA880800 2 01 972 MOVE R2 R0 R1 973 * \ / 1FAB9 60C1F4AC 3 974 LD R3 TALKINDEX get index for which modem we have 1FABA 1CC40008 3 IMM 975 MUL R3 MODADDL adjust for entry size 1FABB 3827F54F 0 3 976 LEA R0 MODADD(R3) address of address characters for this modem 1FABC 60440020 1 IMM 977 LD R1 MODADDL*CPW maximum length of address 1FABD DA1C0800 0 1 978 SRCHI R0 R1 NULL look for terminator 1FABE 30440020 1 IMM 979 RSB R1 MODADDL*CPW how many chars before NULL 980 * \ / 1FABF 3827F54F 0 3 981 LEA R0 MODADD(R3) regenerate address 1FAC0 DA880800 2 01 982 MOVE R2 R0 R1 move the modem address 983 * \ / 1FAC1 6001F4A3 0 984 LD R0 SIFONE site phone number 1FAC2 60440040 1 IMM 985 LD R1 MAXDIALSTR maximum phone string length 1FAC3 DA1C0800 0 1 986 SRCHI R0 R1 NULL search for the end 1FAC4 30440040 1 IMM 987 RSB R1 MAXDIALSTR phone string length 988 * \ / 1FAC5 6001F4A3 0 989 LD R0 SIFONE site phone number address 1FAC6 DA880800 2 01 990 MOVE R2 R0 R1 append the phone number 991 * \ / 1FAC7 6004000D 0 IMM 992 LD R0 CR fetch a carriage return 1FAC8 E4168000 0 2 CACH 993 ST R0 CACH R2,0 place on the end 1FAC9 EC168001 2 CACH 994 STZ CACH R2,1 mark the string end 995 * \ / 1FACA DC01FB79 996 CALL HAYESWRITE output to the modem 1FACB 4001F402 997 PARL DIALERBUFW string to output 1FACC DC41FB24 998 CALLNP HAZWAIT wait for modem response 1FACD FE0FFAD0 999 JMP TROUBLXIT bail out if error found 1000 * \ / 1FACE 19C40001 7 IMM 1001 ADD R7 1 advance to good return 1FACF 5D1F8001 6 STAK 1002 LEAVE STAK SP,1 1003 * --- 1004 0001FAD0 1005 TROUBLXIT LABEL 1FAD0 DC41FB04 1006 CALLNP HAZABANDON stop the attempt 1FAD1 5D1F8001 6 STAK 1007 LEAVE STAK SP,1 1008 * --- 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 588 (DIALER) F 43 RFP Line Protocol Routines 1010 1011 ********************************************************************************** 1012 * * 1013 * Routine to initialize the Hayes modem. Most important * 1014 * here is to make sure the modem hangs up when the modem unit * 1015 * gets closed. This is accomplished by telling the modem * 1016 * to hangup when the DTR signal is set from high to low. * 1017 * Call: * 1018 * CALLNP HAZINIT * 1019 * * 1020 * Registers Used: R0:R2 * 1021 * Stack Required: 7 * 1022 * * 1023 * 1 + Max ( HAYESWRITE (1), HAZGETOK (2), OUT (6) ) * 1024 * * 1025 ********************************************************************************** 1026 1FAD2 DD5F8001 6 STAK 1027 HAZINIT ENTRNP STAK SP,1 1FAD3 60040119 0 IMM 1028 LD R0 FRTSETRATE command to set both input and output rate 1FAD4 6041F670 1 1029 LD R1 SLOW get the proper baud rate 1FAD5 0881F4AB 1030 FREQ TALKLUN change our rate 1031 * \ / 1FAD6 DC01FB79 1032 CALL HAYESWRITE reset to factory defaults 1FAD7 4001FAF1 1033 PARL HAZFACRESET string to do it 1FAD8 60040140 0 IMM 1034 LD R0 URDELAY wait for command to finish 1FAD9 60440002 1 IMM 1035 LD R1 2*WAIT1SEC 2 seconds of delay 1FADA 60840000 2 IMM 1036 LD R2 0 no events to wait for 1FADB 09040000 IMM 1037 UREQ 0 pause a moment 1038 * \ / 1FADC DC01FB79 1039 CALL HAYESWRITE return digit completion code 1FADD 4001FAF8 1040 PARL HAZDIGITCODE string to do it 1FADE 60040140 0 IMM 1041 LD R0 URDELAY wait for command to finish 1FADF 60440002 1 IMM 1042 LD R1 2*WAIT1SEC 2 seconds of delay 1FAE0 60840000 2 IMM 1043 LD R2 0 no events to wait for 1FAE1 09040000 IMM 1044 UREQ 0 pause a moment 1045 * \ / 1FAE2 DC01FB79 1046 CALL HAYESWRITE turn off command echo 1FAE3 4001FAF3 1047 PARL HAZECHOOFF string to do it 1FAE4 60040140 0 IMM 1048 LD R0 URDELAY wait for command to finish 1FAE5 60440002 1 IMM 1049 LD R1 2*WAIT1SEC 2 seconds of delay 1FAE6 60840000 2 IMM 1050 LD R2 0 no events to wait for 1FAE7 09040000 IMM 1051 UREQ 0 pause a moment 1052 * \ / 1FAE8 600401B1 0 IMM 1053 LD R0 FRTFLSHI flush any input characters 1FAE9 0881F4AB 1054 FREQ TALKLUN from the modem 1055 * \ / 1FAEA DC01FB79 1056 CALL HAYESWRITE hangup on DTR low 1FAEB 4001FAF5 1057 PARL HAZDISCDTR string to do it 1FAEC DC41FB82 1058 CALLNP HAZGETOK look for OK response 1FAED FE0FFAFA 1059 JMP HAZBADINIT jump if timed out 1FAEE FE0FFAFA 1060 JMP HAZBADINIT unexpected response 1061 * \ / 1FAEF 19C40001 7 IMM 1062 ADD R7 1 advance to good return 1FAF0 5D1F8001 6 STAK 1063 LEAVE STAK SP,1 return to caller 1064 * --- 1065 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 589 (DIALER) F 43 RFP Line Protocol Routines 0001FAF1 1066 HAZFACRESET LABEL 1FAF1 00000000 1067 VFDC "A","T","&","F",CR,NULL 1068 0001FAF3 1069 HAZECHOOFF LABEL 1FAF3 00000000 1070 VFDC "A","T","E","0",CR,NULL 1071 0001FAF5 1072 HAZDISCDTR LABEL 1FAF6 00000000 1073 VFDC "A","T","&","D","2","&","C","1",CR,NULL 1074 0001FAF8 1075 HAZDIGITCODE LABEL 1FAF8 00000000 1076 VFDC "A","T","V","0",CR,NULL 1077 0001FAFA 1078 HAZBADINIT LABEL 1FAFA 6005FAFD 0 IMM 1079 LD R0 ADR (BADINTMSG) unable initialize mode 1FAFB DC41B88A 1080 CALLNP OUT output for viewing 1FAFC 5D1F8001 6 STAK 1081 LEAVE STAK SP,1 1082 * --- 1083 1FAFD 556E6162 1084 BADINTMSG TEXTZ "Unable to initialize modem." 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 590 (DIALER) F 43 RFP Line Protocol Routines 1086 1087 ********************************************************************************** 1088 * * 1089 * Routine to abort the current operation on the modem. * 1090 * Call: * 1091 * * 1092 * CALLNP HAZABANDON * 1093 * * 1094 * Registers Used: R0:R2 * 1095 * Stack Required: 7 * 1096 * * 1097 * 1 + Max ( HAYESWRITE (1), HAZGETOK (2), OUT (6) ) * 1098 * * 1099 ********************************************************************************** 1100 0000000A ABS 1101 RESETCNT EQU 10 attempts at reset 00000001 ABS 1102 WAIT1SEC EQU 1 one second 1103 1FB04 DD5F8001 6 STAK 1104 HAZABANDON ENTRNP STAK SP,1 1FB05 6004011F 0 IMM 1105 LD R0 FRTSETTRNS reset transmitters 1FB06 60440000 1 IMM 1106 LD R1 0 clear DTR and CTS 1FB07 0881F4AB 1107 FREQ TALKLUN on the modem port 1FB08 FA09FB1B 0 1108 JLTZ R0 NOTRESET unable to reset 1109 * \ / 1FB09 60C4000A 3 IMM 1110 LD R3 RESETCNT initialize time out counter 0001FB0A 1111 HAZRESET LABEL 1FB0A 60040140 0 IMM 1112 LD R0 URDELAY delay some time 1FB0B 60440001 1 IMM 1113 LD R1 WAIT1SEC just a second 1FB0C 60840000 2 IMM 1114 LD R2 0 no event mask 1FB0D 09040000 IMM 1115 UREQ 0 see ya in a second 1116 * \ / 1FB0E DC01FB79 1117 CALL HAYESWRITE hangup line 1FB0F 4001FB16 1118 PARL HAYESHANGUP string to do it 1FB10 DC41FB82 1119 CALLNP HAZGETOK look for OK response 1FB11 FE0FFB1A 1120 JMP ONEMORETIME jump if timed out 1FB12 FE0FFB1A 1121 JMP ONEMORETIME unexpected response 1122 * \ / 1FB13 DC01FB79 1123 CALL HAYESWRITE reset modem 1FB14 4001FB18 1124 PARL HAYESRESET string to do it 1FB15 5D1F8001 6 STAK 1125 LEAVE STAK SP,1 all went well 1126 * --- 1127 0001FB16 1128 HAYESHANGUP LABEL 1FB16 00000000 1129 VFDC "A","T","H",CR,NULL 0001FB18 1130 HAYESRESET LABEL 1FB18 00000000 1131 VFDC "A","T","&","F",CR,NULL 1132 0001FB1A 1133 ONEMORETIME LABEL 1FB1A FAE3FB0A 3 1134 DRJ R3 HAZRESET try again 1135 * \ / 0001FB1B 1136 NOTRESET LABEL 1FB1B 6005FB1E 0 IMM 1137 LD R0 ADR (HAZRESETERR) modem is not speaking 1FB1C DC41B88A 1138 CALLNP OUT tell the user 1FB1D 5D1F8001 6 STAK 1139 LEAVE STAK SP,1 just exit 1140 * --- 1141 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 591 (DIALER) F 43 RFP Line Protocol Routines 1FB1E 556E6162 1142 HAZRESETERR TEXTZ "Unable to reset modem." 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 592 (DIALER) F 43 RFP Line Protocol Routines 1144 1145 ********************************************************************************** 1146 * * 1147 * Routine to wait for the dialer response. * 1148 * Call: * 1149 * CALLNP HAZWAIT * 1150 * JMP * 1151 * * 1152 * Registers Used: R0:R3 * 1153 * Stack Required: 7 * 1154 * * 1155 * 2 + Max ( OUT (5) ) * 1156 * * 1157 ********************************************************************************** 1158 00178801 6 BASE 1159 HAZ1STCH EQU SP,1 stack location to save a byte 00000046 ABS 1160 HAZRETRIES EQU 70 number of retries 1161 1FB24 DD5F8002 6 STAK 1162 HAZWAIT ENTRNP STAK SP,2 1FB25 D1578801 6 BASE 1163 STMW SP,HAZ1STCH initialize packed value 1FB26 60C40046 3 IMM 1164 LD R3 HAZRETRIES number of times to try this loop 1165 * \ / 0001FB27 1166 HAZLOOP LABEL 1FB27 60040140 0 IMM 1167 LD R0 URDELAY do a short delay 1FB28 60440002 1 IMM 1168 LD R1 WAIT1SEC*2 for this many seconds 1FB29 60840000 2 IMM 1169 LD R2 0 no early fallout conditions 1FB2A 09040000 IMM 1170 UREQ 0 wait here 1171 * \ / 1FB2B 60048030 0 IMM 1172 LD R0 FRREAD+XRSUSPERR read and DO NOT suspend 1FB2C 60440000 1 IMM 1173 LD R1 0 indicate buffer length 1FB2D 0881F4AB 1174 FREQ TALKLUN get character from modem 1FB2E FA09FB4D 0 1175 JLTZ R0 HAZXREQERR jump if some kind of error 1176 * \ / 1FB2F 6484000D 2 IMM 1177 CPR R2 CR got our carriage return? 1FB30 FE03FB3B 1178 JEQ HAZFEOL jump if we found an EOL 1FB31 6484003A 2 IMM 1179 CPR R2 ":" ignore any characters higher 1FB32 FE07FB50 1180 JGE HAZAGAIN jump if unknown character 1FB33 10840030 2 IMM 1181 SUB R2 "0" remove bias 1FB34 60178801 0 6 BASE 1182 LD R0 HAZ1STCH retrieve current value 1FB35 FA09FB38 0 1183 JLTZ R0 HAZPFIRST jump if first char 1FB36 1C04000A 0 IMM 1184 MUL R0 10 do a decimal pack 1FB37 18920000 2 0 REG 1185 ADD R2 R0 add the current digit 0001FB38 1186 HAZPFIRST LABEL 1FB38 E4978801 2 6 BASE 1187 ST R2 SP,HAZ1STCH save packed value 1FB39 60C4000A 3 IMM 1188 LD R3 10 reinitialize counter 1FB3A FE0FFB27 1189 JMP HAZLOOP and go look for another char 1190 * --- 1191 0001FB3B 1192 HAZFEOL LABEL 1FB3B 60978801 2 6 BASE 1193 LD R2 HAZ1STCH retrieve packed value 1FB3C 5084000D 2 IMM 1194 MIN R2 MAXHAZTAB limit code 1FB3D 5CA5FB3F 2 1195 LDPC HAYESTAB(R2) deal with it 1196 * --- 1197 1FB3E 0001FB51 1198 VFD ADR HAZUNKERR -1 - no digits found 0001FB3F 1199 HAYESTAB LABEL 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 593 (DIALER) F 43 RFP Line Protocol Routines 1FB3F 0001FB51 1200 VFD ADR HAZUNKERR 0 - unexpected code 1FB40 0001FB54 1201 VFD ADR HAZCONNECT 1 - connection established 1FB41 0001FB50 1202 VFD ADR HAZAGAIN 2 - ring detected 1FB42 0001FB56 1203 VFD ADR HAZBLOWN 3 - no carrier 1FB43 0001FB51 1204 VFD ADR HAZUNKERR 4 - error in command line 1FB44 0001FB54 1205 VFD ADR HAZCONNECT 5 - connect @ 1200 baud 1FB45 0001FB58 1206 VFD ADR HAZNDTERR 6 - no dial tone 1FB46 0001FB5A 1207 VFD ADR HAZBSYERR 7 - line busy 1FB47 0001FB5C 1208 VFD ADR HAZNOAERR 8 - no answer 1FB48 0001FB54 1209 VFD ADR HAZCONNECT 9 - connection established (2400) 1FB49 0001FB54 1210 VFD ADR HAZCONNECT 10 - connection established (2400) 1FB4A 0001FB51 1211 VFD ADR HAZUNKERR 11 - unknown code 1FB4B 0001FB54 1212 VFD ADR HAZCONNECT 12 - connection established (9600) 0000000D DISP 1213 MAXHAZTAB EQU DISP HAYESTAB 1FB4C 0001FB51 1214 VFD ADR HAZUNKERR 13 - code out of range 1215 0001FB4D 1216 HAZXREQERR LABEL 1FB4D 780403FF 0 IMM 1217 AND R0 03FF mask off to the error code 1FB4E 640400AD 0 IMM 1218 CPR R0 XREQERSUSP verify no-suspend error 1FB4F FE0DFB51 1219 JNE HAZUNKERR give unknown error 0001FB50 1220 HAZAGAIN LABEL 1FB50 FAE7FB27 3 1221 JDR R3 HAZLOOP no luck this round, continue 1222 * \ / 0001FB51 1223 HAZUNKERR LABEL 1FB51 6001FB5E 0 1224 LD R0 HAZMSGUNK say unknown error 0001FB52 1225 HAZGIVEMSG LABEL 1FB52 DC41B88A 1226 CALLNP OUT print the helpful(?) message 1FB53 5D1F8002 6 STAK 1227 LEAVE STAK SP,2 return 1228 * --- 1229 0001FB54 1230 HAZCONNECT LABEL 1FB54 19C40001 7 IMM 1231 ADD R7 1 advance to good return 1FB55 5D1F8002 6 STAK 1232 LEAVE STAK SP,2 return 1233 * --- 1234 0001FB56 1235 HAZBLOWN LABEL 1FB56 6005FB64 0 IMM 1236 LD R0 ADR (HAZMSGNOC) no carrier 1FB57 FE0FFB52 1237 JMP HAZGIVEMSG print message 1238 * --- 1239 0001FB58 1240 HAZNDTERR LABEL 1FB58 6005FB69 0 IMM 1241 LD R0 ADR (HAZMSGNDT) no dial tone 1FB59 FE0FFB52 1242 JMP HAZGIVEMSG print message 1243 * --- 1244 0001FB5A 1245 HAZBSYERR LABEL 1FB5A 6005FB6F 0 IMM 1246 LD R0 ADR (HAZMSGBSY) line busy 1FB5B FE0FFB52 1247 JMP HAZGIVEMSG print message 1248 * --- 1249 0001FB5C 1250 HAZNOAERR LABEL 1FB5C 6005FB74 0 IMM 1251 LD R0 ADR (HAZMSGNOA) no answer 1FB5D FE0FFB52 1252 JMP HAZGIVEMSG print message 1253 * --- 1254 1FB5E 6D6F6465 1255 HAZMSGUNK TEXTZ "modem - unknown error" 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 594 (DIALER) F 43 RFP Line Protocol Routines 1FB64 6D6F6465 1256 HAZMSGNOC TEXTZ "modem - no carrier" 1FB69 6D6F6465 1257 HAZMSGNDT TEXTZ "modem - no dial tone" 1FB6F 6D6F6465 1258 HAZMSGBSY TEXTZ "modem - line busy" 1FB74 6D6F6465 1259 HAZMSGNOA TEXTZ "modem - no answer" 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 595 (DIALER) F 43 RFP Line Protocol Routines 1261 1262 ********************************************************************************** 1263 * * 1264 * Routine to send command string to the modem. * 1265 * Call: * 1266 * CALL HAYESWRITE/VADICWRITE * 1267 * PARL * 1268 * * 1269 * Registers Used: R0:R2 * 1270 * Stack Required: 1 * 1271 * * 1272 ********************************************************************************** 1273 0001FB79 1274 VADICWRITE LABEL 1FB79 DD1F8001 6 STAK 1275 HAYESWRITE ENTR STAK SP,1 1FB7A C0128000 2 REG 1276 STPL R2 get command address 1277 * \ / 1FB7B 60128000 0 2 REG 1278 LD R0 R2 copy for search 1FB7C 60440040 1 IMM 1279 LD R1 MAXDIALSTR maximum search length 1FB7D DA1C0800 0 1 1280 SRCHI R0 R1 NULL look for a 1FB7E 30440040 1 IMM 1281 RSB R1 MAXDIALSTR calculate string length 1FB7F 60040042 0 IMM 1282 LD R0 FRWRITEB write request 1FB80 0881F4AB 1283 FREQ TALKLUN just hope it gets out 1FB81 5D1F8001 6 STAK 1284 LEAVE STAK SP,1 return to caller 1285 * --- 1 Assembler C9101 BTI 8000 Remote Diagnostic Utility A9207a 24-Jul-92 15:15 PAGE 596 (DIALER) F 43 RFP Line Protocol Routines 1287 1288 ********************************************************************************** 1289 * * 1290 * Routine to check response from the modem. * 1291 * Call: * 1292 * * 1293 * CALLNP HAZGETOK * 1294 * JMP