DEVEXTUG.DOC OS/8 Device Extensions User's Guide DISCLAIMER This document file was created by scanning the original document and then editing the scanned text. As much as possible, the original text format was restored. Some format changes were made to insure this document would print on current laser printers using 60 lines per page. The original spelling and grammar has been preserved. 1-Nov-1996 OS/8 Device Extensions User's Guide Order No. AA-D319A-TA ABSTRACT This document describes the software support for the KT8A Memory Management Option and the RX02 and RL01 devices. SUPERSESSION/UPDATE INFORMATION: This manual is an update of sections of the OS/8 Handbook (DEC-S8-OSHBA-A-D). OPERATING SYSTEM AND VERSION: OS/8 V3D ---------------------------------------------------------------------- | To order additional copies of this document, contact the Software | | Distribution Center, Digital Equipment Corporation, Maynard, | | Massachusetts 01754 | ---------------------------------------------------------------------- digital equipment corporation - maynard, massachusetts First Printing, December 1978 The information in this document is subject to change without notice and should not be construed as a commitment by Digital Equipment Corporation. Digital Equipment Corporation assumes no responsibility for any errors that may appear in this document. The software described in this document is furnished under a license and may only be used or copied in accordance with the terms of such license. No responsibility is assumed for the use or reliability of software on equipment that is not supplied by DIGITAL or its affiliated companies. Copyright (c) 1978 by Digital Equipment Corporation The postage-prepaid READER'S COMMENTS form on the last page of this document requests the user's critical evaluation to assist us in pre- paring future documentation. The following are trademarks of Digital Equipment Corporation: DIGITAL DECsystem-10 MASSBUS DEC DECtape OMNIBUS PDP DIBOL OS/8 DECUS EDUSYSTEM PHA UNIBUS FLIP CHIP RSTS COMPUTER LABS FOCAL RSX COMTEX INDAC TYPESET-8 DDT LAB-8 TYPESET-11 DECCOMM DECSYSTEM-20 TMS-11 ASSIST-MM RTS-8 ITPS-10 VAX VMS SBI DECnet IAS CONTENTS Page 1.0 INTRODUCTION AND OVERVIEW 1 1.1 Distribution Media 3 1.2 The RESORC Program 3 1.3 Changes in BASIC and FORTRAN IV for RL01 and RX02 Users 3 1.4 System-Wide Changes for Users with the KT8A 4 1.5 Changes in PIP for RL01, RX02, and VXA0 4 1.6 The BOOT.SV Program 4 1.7 Changes in FUTIL 4 2.0 BOOTSTRAP AND BUILD INSTRUCTIONS 5 3.0 THE KT8A MEMORY MANAGEMENT OPTION 7 3.1 128K Monitor and CCL Commands -- SAVE, ODT, and MEMORY 8 3.1.1 The SAVE Command 8 3.1.2 The ODT Command 10 3.1.3 The CCL Memory Command 12 3.2 128K PAL8 13 3.2.1 The FIELD Pseudo-Operator 14 3.2.2 Specifying Data and Instruction Fields -- CDF and CIF 14 3.2.3 The ABSLDR 16 3.3 Determining Memory-Size at Run-Time 16 3.4 The VXA0 Extended-Memory Device 18 3.5 The SAVECB Program 18 4.0 THE RX02 DUAL-DENSITY DISKETTE 20 4.1 RX02 Device Names 20 4.2 Formatting Diskettes for RX02 20 4.3 RX01 and RX02 Compatibility 21 4.4 Interleaving 21 4.5 Using RXCOPY with RX02 23 4.5.1 Formatting Diskettes with RXCOPY 23 4.5.2 RXCOPY Options 23 5.0 THE RL01 DISK 24 5.1 System Description 24 5.1.1 Disk Format 27 5.1.2 RL8A Controller Format 27 5.1.3 Instruction Set 29 5.1.4 OS/8 Data Space 30 5.1.5 Converting Block Numbers to Hardware Disk Addresses 31 5.2 Handler Description 32 5.3 Loading and Bootstrap Procedure 33 5.3.1 Loading the RL01 Disk Pack 34 5.3.2 Booting from BOOT.SV 35 5.3.3 Booting from the Console Switches 35 iii CONTENTS (Cont.) Page 5.3.4 ROM Bootstrap Switch Settings 35 5.4 Operating Instructions 35 5.4.1 Disk Formatting 36 5.5 System Building 41 APPENDIX A RX02 BOOTSTRAP PROGRAM A-1 APPENDIX B RL01 BOOTSTRAP PROGRAM B-1 INDEX Index-1 FIGURES FIGURE 1 Memory-Size Subroutine 17 2 Devices A, B, C on RL01 Disk 25 TABLES TABLE 1 Device Extensions Modules 1 2 RX02 Bootstrap 5 3 RL01 Bootstrap 6 4 128K ODT Command Summary 10 5 Field Specifications for 128K MEMORY Command 13 6 RX01-RX02 Compatibility 21 7 OS/8 Single Density Diskette Interleave Scheme 22 8 OS/8 Double Density Diskette Interleave Scheme 22 9 RL01 Handler Information 33 10 RLFRMT Formatter Messages 38 iv 1.0 INTRODUCTION AND OVERVIEW The OS/8 V3D Device Extensions support the following new devices under OS/8. o The KT8A Memory Management Option (limited support) o The RL01 Disk and Controller o The RX02 Double-Density Diskette and Controller In addition, the Extensions package is a support release for RTS/8 V3 and MACREL/LINK Version 2, both of which can use the extended memory provided by the KT8A. RTS/8 V3 also supports the RL01 and RX02. The Extensions package is a superset of some OS/8 modules. It remains completely compatible with OS/8 V3D and contains the modules listed in Table 1. Table 1 Device Extensions Modules ---------------------------------------------------------------------- | System Programs: | |--------------------------------------------------------------------| | Name | New Version | Comment | | | Number | | |------------------|---------------|---------------------------------| | OS8 MONITOR | 3S | system head, capable of | | | | being run from the device, | | | | supports 128K words of | | | | memory | | | | | | ABSLDR.SV | 6A | loads binary and image code | | | | into fields >7 | | | | | | PAL8.SV | 13A | uses fields >7 | | | | | | CCL.SV | 7A | CCL MEMORY command | | | | recognizes up to 128K words | | | | available in system | | | | | | PIP.SV | 14A | works with RL01, RX02, VXA0, | | | | and new system head | | | | | | RESORC.SV | 4A | includes RL01, RX02, and | | | | VXA0 | | | | | | BOOT.SV | 7A | includes primary bootstrap | | | | for RL01, RX02, and VXA0 | | | | | | RXCOPY.SV | 5A | formats single or double | | | | density diskettes, copies | | | | single density to single | | | | density and double density | | | | to double density | ---------------------------------------------------------------------- (continued on next page) 1 Table 1 (Cont.) Device Extensions Modules ---------------------------------------------------------------------- | System Programs: | |--------------------------------------------------------------------| | Name | New Version | Comment | | | Number | | |------------------|---------------|---------------------------------| | | | | | FUTIL.SV | 8A | recognizes new core control | | | | block format for programs | | | | in extended memory | ---------------------------------------------------------------------- Device Upgrade Kit Modules ---------------------------------------------------------------------- | Patches: (to be added with LOAD and SAVE commands) | |--------------------------------------------------------------------| | Name | New Version | Comment | | | Number | | |------------------|---------------|---------------------------------| | BPAT.BN | | Patch for BASIC | | | | | | FPAT.BN | | Patch for FORTRAN IV | |--------------------------------------------------------------------| | Handlers: (to be inserted with BUILD) | |--------------------------------------------------------------------| | RLSY.BN | | RL01 System Handler | | | | | | RL0.BN | | | | | | | | RL1.BN | | | | | | | | RL2.BN | | | | | | | | RL3.BN | | | | | | | | RLC.BN | | | | | | | | VXSY.BN | | VXA0 System Handler | | | | | | RXSY1.BN | | RX01 System Handler | | | | | | RXSY2.BN | | RX02 System Handler | | | | | | RXNS.BN | | RX01-RX02 Non-system Handler | ---------------------------------------------------------------------- This manual assumes that the user is familiar with the material in the following documents: OS/8 Handbook (DEC-S8-OSHBA-A-D) ________________________________ OS/8 Handbook Update (DEC-S8-OSHBA-A-DN4) _________________________________________ OS/8 Software Support Manual (DEC-S8-OSSMB-A-D) _______________________________________________ KT8A Memory Management Control User's Guide (EK-KTO8A-UG-001) _____________________________________________________________ RL8A Disk Controller Maintenance Manual (EK-RL8A-TM-001) ________________________________________________________ 2 1.1 Distribution Media The OS/8 Device Extensions are distributed on the following media. RX02 diskette RL01 disk RK05 disk TD8E DECtape 1.2 The RESORC Program The new RESORC program lists the system and non-system handlers for the RX02 and RL01 devices. In addition, it lists a special handler -- called VXA0 -- that enables you to use the extended memory provided by the KT8A as though it were a separate device. RESORC now has an overlay structure, enabling a user who buys the source program to enter information on user-written handlers. 1.3 Changes in BASIC and FORTRAN IV for RL01 and RX02 Users RL01 and RX02 users must add the following patches to the BASIC and FORTRAN IV run-time systems so that these programs recognize and properly allocate space in memory for the second page of the system handlers. To patch the BASIC run-time system, enter the following commands. .LOAD SYS:BRTS.SV/I _ .LOAD dev:BPAT.BN _ .SAVE SYS:BRTS.SV _ where dev is the distribution device BPAT.BN is the BASIC patch To patch the FORTRAN IV run-time system, enter the following commands. .LOAD SYS:FRTS.SV/I _ .LOAD dev:FPAT.BN _ .SAVE SYS:FRTS.SV _ where dev is the distribution device FPAT.BN is the FORTRAN IV patch 3 1.4 System-Wide Changes for Users with the KT8A KT8A users must ensure that user-written programs and user-written handlers do not contain the following combination of instruction steps. CIF /Change instruction field IOT /Any PDP8 IOT instruction JMP I /The instruction that does the CIF If you enable the KT8A and turn on the interrupts (for example, to run OS/8 as a background task under RTS8), the KT8A hardware will return to the wrong place on traps between the CIF and JMP I instructions. 1.5 Changes in PIP for RL01, RX02, and VXA0 The new-version of PIP recognizes the RL01, RX02, and VXA0 devices. PIP sets the proper length for directories on the ZERO command and determines whether it is dealing with a double-density or single-density diskette. PIP also recognizes the new Monitor head. If you attempt to use the Y option on the old version of PIP to move the new system head, PIP responds with the error message BAD SYSTEM HEAD _______________ 1.6 The BOOT.SV Program The BOOT.SV program now includes a primary bootstrap for RL01, RX02, and VXA0. The format is .BOOT dd or .BOOT /dd where dd is a legal OS/8 device specification, including RL, RX, or VX. 1.7 Changes in FUTIL The new version of the OS/8 file utility program FUTIL recognizes the new Core Control Block format for user-programs in extended memory. For a complete description of FUTIL, see the OS/8 Handbook Update. ____________________ 4 2.0 BOOTSTRAP AND BUILD INSTRUCTIONS Since the Extensions package includes the system head, you can bootstrap the RX01, RX02, RL01, or RK05 distribution medium as a system device. Table 2 and Table 3 contain the bootstraps for the RX02 and RL01 device. The bootstraps for the RK05 disk and the TD8E DECtape are included in Chapter 1 of the OS/8 ____ Handbook. _________ The new handlers must be inserted into OS/8 with the BUILD program. For information on adding handlers to OS/8, see the BUILD chapter in the OS/8 Handbook. _____________ NOTE The console instructions in Tables 2 and 3 describe a PDP8-A. For other PDP8 computers, see the OS/8 Handbook. _____________ Table 2 RX02 Bootstrap ---------------------------------------------------------------------- | 1. Press in order the MD and DISP buttons to display memory data | | in the octal readout. | | | | 2. Press in order 0 and LXA to select memory field 0. | | | | 3. Press in order 20 and LA to start loading instructions at | | location 20. | | | | 4. Deposit the following octal values, terminating each value | | with D NEXT. | | | | 00020 1061 | | 00021 1046 | | 00022 0060 | | 00023 3061 | | 00024 7327 | | 00025 1061 | | 00026 6751 | | 00027 7301 | | 00030 4053 | | 00031 4053 | | 00032 7004 | | 00033 6755 | | 00034 5054 | | 00035 6754 | | 00036 7450 | ---------------------------------------------------------------------- (continued on next page) 5 Table 2 (Cont.) RX02 Bootstrap ---------------------------------------------------------------------- | 00037 5020 | | 00040 1061 | | 00041 6751 | | 00042 1061 | | 00043 0046 | | 00044 1032 | | 00045 3060 | | 00046 0360 | | 00047 4053 | | 00050 3002 | | 00051 2050 | | 00052 5047 | | 00053 0000 | | 00054 6753 | | 00055 5033 | | 00056 6752 | | 00057 5453 | | 00060 0420 | | 00061 0020 | | | | 5. After you have deposited all the values, press 0033 and LA to | | start the program at location 33. | | | | 6. To start the bootstrap program, press INIT and RUN. | ---------------------------------------------------------------------- Table 3 RL01 Bootstrap ---------------------------------------------------------------------- | 1. Press in order the MD and DISP buttons to display memory data | | in the octal readout. | | | | 2. Press, in order, 0 and LXA to select memory field 0. | | | | 3. Press, in order, 1 and LA to start loading instructions at | | address 1. | | | | 4. Deposit the octal values given below, following each value | | with D NEXT. | | | | Address Contents | | | | 00001 6600 | | 00002 7201 | | 00003 4027 | | 00004 1004 | | 00005 4027 | ---------------------------------------------------------------------- (continued on next page) 6 Table 3 (Cont.) RL01 Bootstrap ---------------------------------------------------------------------- | 00006 6615 | | 00007 7002 | | 00010 7012 | | 00011 6615 | | 00012 0025 | | 00013 7004 | | 00014 6603 | | 00015 7325 | | 00016 4027 | | 00017 7332 | | 00020 6605 | | 00021 1026 | | 00022 6607 | | 00023 7327 | | 00024 4027 | | 00025 0377 | | 00026 7600 | | 00027 0000 | | 00030 6604 | | 00031 6601 | | 00032 5031 | | 00033 6617 | | 00034 5427 | | 00035 5001 | | | | 5. After all values are deposited, press, in order, 0001 and LA | | to allow the program to start at location 1. | | | | 6. Press, in order, INIT and RUN to start the bootstrap program. | ---------------------------------------------------------------------- The complete RX02 and RL01 bootstrap programs are listed in Appendix A and B. 3.0 THE KT8A MEMORY MANAGEMENT OPTION The OS/8 V3D Device Extensions provide limited support for the KT8A Memory Extension and Management Option, which increases the amount of allowable memory in PDP8 systems from 32K to a maximum of 128K words. The KT8A supports all available sizes of continuous memory from 32K to 128K. System programs, devices, and languages that run in 32K under OS/8 will also operate with the new monitor. In addition, systems with the KT8A and 128K software support will run user-written programs in memory fields 0 to 37. OS/8 high-level languages and system programs, however, do not make use of memory greater than 32K words. 7 This section describes the OS/8 commands and PAL8 instructions that allow you to run user-written programs in fields 0 through 37. In addition, it includes a subroutine for finding the amount of memory available at run-time and describes a program that enables you to change the Core Control Block of a program in complex SAVE operations. This section also notes current software restrictions on the use of the extended memory. For a description of the KT8A device, including operating and programming instructions, see the KT8A Memory Management Control ________________________________ User's Guide (EK-KT08A-UG-001). ____________ 3.1 128K Monitor and CCL Commands -- SAVE, ODT, and MEMORY The SAVE and ODT monitor commands now support fields 0 to 37. The CCL MEMORY command finds the highest field available in hardware up to field 37. MEMORY also limits the available fields in software, but this feature is currently restricted to 32K. NOTE The OS/8 Monitor currently requires that all user-written programs contain at least one segment (l-page minimum) below 32K. 3.1.1 The SAVE Command - The SAVE command makes a memory-image file of the program currently in memory, assigns it a name, and saves it on a device. You can specify areas in memory that you want to save in fields from 0 to 37. The format of the command, including all optional arguments, is SAVE device:file.ex ffnnnn-ffmmmm,ffpppp;ffssss=cccc where ffnnnn is a 6-digit octal number representing a field from 0 to 37 (ff) and the first address of a continuous portion of memory you want to save. ffmmmm is the final address (in the same field) of the section of memory you want to save. ffpppp is a 6-digit octal number representing the field and address of one location in memory. If you specify a single address on an even-numbered page in the command, SAVE writes the entire page on which the location 8 occurs. If you specify an odd-numbered page, SAVE also saves the preceding page. ;ffssss is a 6-digit octal number representing the field and starting address of the program you are saving. =cccc is a 4-digit octal number representing the contents of the Job Status Word for the program. (See below.) If you omit the extension on the file name, SAVE appends .SV. If you omit the other arguments, SAVE finds the locations it requires in the current Core Control Block. (For a discussion of the Core Control Block, see the OS/8 Handbook and the OS/8 Software Support Manual.) _____________ ____________________________ The SAVE command places the following restriction on arguments in the command line. o You must specify the output device. SAVE does not default to DSK. o The first and last location of a segment in memory (ffnnnn-ffmmmm) that you wish to SAVE must both exist in the same field. You may not cross field boundaries. In the following example, both entries specify field 22. .SAVE SYS:EXAMPL 220055-220643 o When you specify an area on a page, SAVE takes the entire page. If you call for another part of that page in the same command line, SAVE sends a BAD ARGS error message to the terminal informing you that it has already saved the page. .SAVE RXA1:FLOP 120077-120122, 120146-120177 The first argument writes locations 77 to 122 in field 12 on to RXA1 and calls the file FLOP.SV. The second argument, which specifies locations on the same page, produces the error message BAD ARGS ________ o Do not SAVE locations 7600-7777 in fields 0, 1, and 2. The resident Monitor code resides in these areas of memory. To avoid accidently destroying a portion of the Monitor, restrict SAVE operations involving 7600 to fields above 2. o If you specify an address on an odd-numbered page, SAVE can save it only if it also saves the preceding page. The system does this automatically. If you wish to specify more locations in a SAVE command than you can fit in a single command line, use the SAVECB program described in Section 3.5. 9 NOTE The Monitor START command currently accepts field specifications in the range of 0 to 7 only. 3.1.2 The ODT Command - ODT accepts and returns 6-digit addresses in the following commands. ffnnnn/ ffnnnnB ffnnnnG where ff is a field from 0 to 37 nnnn is a location The D and F command allow you to specify fields in the range of 0 to 37. To indicate the first eight fields, type a single octal digit (0-7). Note that this is a change from previous versions of ODT, which required you to enter field specifications as multiples of 10 (for example, field 2 as 20). Table 4 summarizes all of the OS/8 128K ODT commands. For complete information on ODT, see the chapter on the ODT program in the OS/8 Handbook. Table 4 128K ODT Command Summary ---------------------------------------------------------------------- | Command | Operation | |-----------------|--------------------------------------------------| | ffnnnn/ | Open location ffnnnn, where ff is a field from 0 | | | to 37. ODT displays the contents of the | | | location, prints a space, and waits for you to | | | enter a new value for the location or close the | | | location. If you omit ff, ODT assumes field 0. | | | | | | Reopen the most recently opened location. | | | | | nnnn; | Deposit nnnn in the currently opened location, | | | close the location, and open the next location | | | in the sequence for modification. The semicolon | | | (;) lets you deposit a series of octal values in | | | sequential locations. To skip locations in the | | | sequence, type a semicolon for each location you | | | wish to leave unchanged. | ---------------------------------------------------------------------- (continued on next page) 10 Table 4 (Cont.) 128K ODT Command Summary ---------------------------------------------------------------------- | Command | Operation | |-----------------|--------------------------------------------------| | RETURN key | Close the currently open location. | | | | | LINE FEED key | Close the currently open location, open the next | | | location in the sequence for modification, and | | | display its contents. | | | | | n+ | Open the current location plus n and display the | | | contents. | | | | | n- | Open the current location minus n and display | | | the contents. | | | | | uparrow or | Close the location, read its contents as a | | circumflex | memory-reference instruction and open the | | | location it points to, displaying its contents. | | | | | | o ODT makes no distinction between | | | instruction op-codes when you use this | | | command. It treats all op-codes as | | | memory-reference instructions. | | | | | o Take care when you use this command with | | | indirectly referenced auto-index | | | registers. If you use the command in | | | this way, the contents of the auto-index | | | register is incremented by one. Check | | | to see that the register contains the | | | proper value before proceeding. | | | | | (underline) | Close the current location, read the contents as | | | a twelve-bit address, and open that location for | | | modification, displaying its contents. | | | | | ffnnnnB | Establish a breakpoint at location ffnnnn, where | | | ff indicates a field from 0 to 37. ODT permits | | | only one breakpoint at a time. | | | | | ffnnnnG | Transfer control of the program to location | | | ffnnnn, where the first two digits (95) | | | represent a memory field. | | | | | B | Remove the breakpoint, if one exists. | | | | | A | Open for modification the location in which ODT | | | stored the contents of the accumulator when it | | | encountered the breakpoint. | ---------------------------------------------------------------------- (continued on next page) 11 Table 4 (Cont.) 128K ODT Command Summary ---------------------------------------------------------------------- | Command | Operation | |-----------------|--------------------------------------------------| | L | Open for modification the location in which ODT | | | stored the contents of the Link when it | | | encountered the last breakpoint. | | | | | M | Open the Search Mask location, initially set to | | | 7777. To change the Search Mask, type a new | | | value into the location. | | | | | M | Open the lower search-limit location. Type in | | | the location (four octal digits) where the | | | search will terminate. | | | | | M | Open the upper search-limit location. Type in | | | the location (four octal digits) where the | | | search will terminate. | | | | | nnnnW | Search the portion of memory defined by the | | | upper and lower limits for the octal value nnnn. | | | The search must be restricted to a single memory | | | field. See the F command. | | | | | D | Open for modification the location containing | | | the data field (0 to 37) that was in effect at | | | the last breakpoint. To change the field, enter | | | a number from 0 to 37. | | | | | F | Open for modification the word containing the | | | field (0 to 37) used by ODT in the last W or | | | uparrow command (search or indirect addressing) | | | or in the last breakpoint, depending on which | | | occurred most recently. To modify this | | | location, enter a number from 0 to 37. | | | | CTRL/O | Interrupt a lengthy search output and wait | | | for the next ODT command. | | | | | DELETE key | Cancel a number previously typed, up to the | | | last non-numeric character entered. ODT responds | | | with a question mark, after which you enter the | | | correct location. | ---------------------------------------------------------------------- 3.1.3 The CCL Memory Command - The MEMORY command finds the highest field available in hardware up to field 37. It also limits the available fields in software, but this feature is currently restricted to 32K words. 12 The format of the command is MEMORY or MEMORY nn where nn is an octal number in the range of 0 to 37 representing the number of 4K fields available to OS/8. Table 5 lists all the values of n (memory fields in octal) and the corresponding memory-size. Table 5 Field Specifications for 128K MEMORY Command --------------------------------------- | n | Words of Memory | |----------|--------------------------| | 0 | all available memory | | 1 | 8K | | 2 | 12K | | 3 | 16K | | 4 | 20K | | 5 | 24K | | 6 | 28K | | 7 | 32K | --------------------------------------- To limit memory, enter the highest file you want to make available to OS/8 in the command line. For example, the following command limits the available memory to 16K words. .MEM 3 _ To find the amount of memory that OS/8 is using, type the command with no argument. .MEMORY _ 12K OF 32K MEMORY _________________ In this example, MEMORY prints the information that a 32K system been limited to 12K words. MEMORY caused the execution of the CCL.SV program. 3.2 128K PAL8 The following PAL8 instructions accept field specifications in the range of 0 to 37, permitting you to run programs in areas above 32K 13 3.2.1 The FIELD Pseudo-Operator - The pseudo-op FIELD instructs PAL8 to output a field setting so that it can recognize more than one memory field. The format of this pseudo-op is FIELD ff where ff is an integer, a previously defined symbol, or an expression in the range 0 to 37. FIELD causes the PAL8 assembler to output a field setting from 0 to 37 during the second pass of assembly. This setting, which appears as the high-order bits of the location counter in the program listing, tells the ABSLDR which field to load information into. For example, the following FIELD pseudo-op specifies memory field 26. The next line sets the location counter to begin at 400. Note that the FIELD instruction must precede the starting location. FIELD 26 /CORRECT EXAMPLE *400 The following example is incorrect and will not generate the code you want. *400 FIELD 26 /INCORRECT EXAMPLE 3.2.2 Specifying Data and Instruction Fields -- CDF and CIF - The CDF and CIF instructions let you specify field 0 to 37 as data and instruction fields. Entering the argument requires knowledge of the bit arrangement of these two instructions. A CDE B CDF 6201 110 010 000 001 CIF 6202 110 010 000 010 Bits A CDE B indicate the data or instruction field that the program will jump to at the next indirect JMP or JMS. (The positioning of ABCDE is eccentric as ACDEB maintains compatibility between KT8A and existing 32K systems.) To specify a field from 0 to 7, you use bits CDE only. The format of the instruction is CDF or CIF n0 where n0 is an octal number that PAL8 ORs with the instruction code 14 n is an octal digit from 0 to 7 (bits CDE) For example, this instruction CDF 60 specifies field 6 by causing PAL8 to do the following OR. A CDE B Instruction code 6201 110 010 000 001 Argument 60 000 000 110 000 _______________________ 6261 110 010 110 001 To specify a field from 10 to 17, use bits CDE and set bit B. The format of the instruction is CDF or CIF n4 where n4 is an octal number that PAL8 ORs with the instruction code n is an octal value from 0 to 7 (bits CDE) 4 is an octal value indicating a field range of 10 to 17 (sets bit B) For example, this instruction CDF 64 indicates field 16. Keep in mind that to call for fields above field 7 (above 32K) with CDF and CIF, you must first load the KT8A Extended Mode Register with the LXM instruction. For example, the following code deposits (7777 in field 12, location 1000. LXM CDF 24 TAD (7777 DCA I (1000 To specify a field from 20 to 27, use bits CDE and set bit A. The format is CDF or CIF ln0 where ln0 is an octal number that PAL8 ORs with the instruction l is an octal value indicating field range 20 to 27 (sets A) 15 n a value from 0 to 7 (bits CDE) For example, this instruction CDF 160 indicates field 26. To specify a field from 30 to 37, use bits CDE and set bit A and The format is CDF or CIF ln4 where ln4 is an octal number that PAL8 ORs with the instruction l...4 are octal values indicating a field range of 30 to 37 (set bits A and B) n is an octal digit in the range 0 to 7 (bits CDE) For example, this instruction CDF 164 specifies field 36 One way to avoid confusion with this unusual bit configuration is to define high fields with convenient mnemonics. For example: F36=164 CDF F36 3.2.3 The ABSLDR - The ABSLDR will load information into any field from 0 to 37 that you specify in the FIELD pseudo-op. However, the ABSLDR option /n is restricted to fields 0 to 7 only. The =ffnnnn option sets the starting address of the program in memory to ffnnnn, where ff is a field from 0 to 37 and nnnn is a location. If you omit the option or specify 0, the ABSLDR inserts a starting address of 0200 in field 0. 3.3 Determining Memory-Size at Run-Time It is frequently helpful to know the amount of memory currently available to the program you are running. The sub-routine in Figure 1 determines the amount of memory available in a 128K system at run-time. The program returns a value in the range of 0 to 40 to indicate the first non-existent field in the system. 16 To use this routine above 32K, you must first load the Extended Mode Register with the LXM instruction. For complete information on the Extended Mode Register, see the KT8A Memory Management Control User's ______________________________________ Guide. _____ ---------------------------------------------------------------------- | /SUBROUTINE TO DETERMINE MEMORY SIZE PAL8-V10A 04-AUG-78 | | | | /SUBROUTINE TO DETERMINE MEMORY SIZE | | /THIS SUBROUTINE WORKS ON ANY PDP-8 FAMILY | | /COMPUTER. THE VALUE, FROM 1 TO 40 OCTAL, | | /OF THE FIRST NON-EXISTENT MEMORY FIELD IS | | /RETURNED IN THE AC. | | | | /NOTE -- THIS ROUTINE MUST BE PLACED IN FIELD 0 | | | | 00200 0000 CORE, 0 | | 00201 7300 CLA CLL | | 00202 6201 COR0, CDF 0 /(NEEDED FOR PDP-8L) | | 00203 1242 TAD CORSIZ /GET FIELD TO TEST | | 00204 0222 AND COR37 /MASK USEFUL BITS | | 00205 7112 CLL RTR /TRANSFORMS | | 00206 7012 RTR /"37" TO "174" | | 00207 7002 BSW /FOR CDF | | 00210 7430 SZL | | 00211 1243 TAD C4 | | 00212 0235 AND COREX | | 00213 3214 DCA . +1 /SET UP CDF TO FIELD | | 00214 6201 COR1, CDF /CDF IS PROCESSED HERE | | 00215 1640 TAD I CORLOC /SAVE CURRENT CONTENTS | | 00216 7000 COR2, NOP /(HACK FOR PDP-8!) | | 00217 3214 DCA COR1 | | 00220 1216 TAD COR2 /7000 IS A "GOOD" PATTERN | | 00221 3640 DCA I CORLOC | | 00222 0037 COR37, 37 /(HACK FOR PDP-8.,NO-OP) | | 00223 1640 TAD I CORLOC /TRY TO READ BACK 7000 | | 00224 7400 CORX, 7400 /(HACK FOR PDP-8.,NO-OP) | | 00225 1224 TAD CORX /GUARD AGAINST "WRAP-AROUND"| | 00226 1241 TAD CORV /TAD (1400) | | 00227 7640 SZA CLA | | 00230 5235 JMP COREX /NON-EXISTENT FIELD EXIT | | 00231 1214 TAD COR1 /RESTORE CONTENTS DESTROYED | | 00232 3640 DCA I CORLOC | | 00233 2242 ISZ CORSIZ /TRY NEXT HIGHER FIELD | | 00234 5202 JMP CORO | | 00235 6201 COREX, CDF /LEAVE WITH DATA FIELD 0 | | 00236 1242 TAD CORSIZ /1ST NON-EXISTENT FIELD | | 00237 5600 JMP I CORE | | 00240 0224 CORLOC, CORX /ADDRESS TO TEST IN EACH | | / FIELD | | 00241 1400 CORV, 1400 /7000+7400+1400=0 | | 00242 0001 CORSIZ, 1 /CURRENT FIELD TO TEST | | 00243 0004 C4, 4 | ---------------------------------------------------------------------- Figure 1 Memory-Size Subroutine 17 3.4 The VXA0 Extended-Memory Device The VXA0 device handler enables you to use the extended memory provided by the KT8A as though it were a separate device. You call VXA0 in the same way that you call any system device. For example, this command .COPY VXA0:SAMPLE+ THAT / BOOTED OK $ A-2 APPENDIX B RL01 BOOTSTRAP PROGRAM AC0001=CLA IAC AC0003=CLA CLL CML IAC RAL AC0006=CLA CLL CML IAC RTL AC2000=CLA CLL CML RTR 00001 6600 BOOT, RLDC /CLEAR CONTROLLER REGISTERS 00002 7201 AC0001 /CLEAR DRIVE REGISTERS 00003 4027 JMS IO 00004 1004 TAD /AC=1004 (BYTE MODE READ HEADER /FUNCTION). NOTE THAT THIS WORD /MUST BE AT LOC 0004! 00005 4027 JMS IO /READ NEXT HEADER IN ORDER TO /FIND OUT CURRENT CYLINDER 00006 6615 RRSI /READ HEADER BYTE #1 00007 7002 BSW /GET LSB OF CYLINDER 00010 7012 RTR 00011 6615 RRSI /READ HEADER BYTE #2 00012 0025 AND C377 00013 7004 RAL /CONSTRUCT CYLINDER ADDRESS 00014 6603 RLCA /USE IT AS DIFFERENCE WORD TO /SEEK TO CYLINDER 0, SURFACE 0 00015 7325 AC0003 /AC=SEEK FUNCTION 00016 4027 JMS IO /SEEK TO TRACK 0 00017 7332 AC2000 /AC=SECTOR 20 (OS8 BLOCK 0) 00020 6605 RLSA /LOAD SECTOR ADDRESS 00021 1026 TAD C7600 00022 6607 RLWC /LOAD WORD COUNT FOR 1 PAGE 00023 7327 AC0006 /READ FUNCTION 00024 4027 JMS IO /READ SECONDARY BOOTSTRAP /READING IN SECONDARY BOOTSTRAP PREVENTS "IO" FROM /RETURNING. CONTROL CONTINUES IN SECONDARY BOOTSTRAP. 00025 0377 C377, 377 00026 7600 C7600, 7600 B-1 RL01 BOOTSTRAP PROGRAM /SUBROUTINE TO DO I/O TO DISK 00027 0000 IO, 0 00030 6604 RLCB /EXECUTE THE FUNCTION 00031 6601 RLSD /WAIT UNTIL DONE /NOTE: THIS WORD AND NEXT /ONE MUST BE LOCATED HERE /IN ORDER TO MATCH UP WITH /SIMILAR INSTRUCTIONS CON- /TAINED IN THE SECONDARY /BOOTSTRAP. 00032 5031 JMP .-1 00033 6617 RLSE 00034 5427 JMP I IO /NO ERROR; RETURN 00035 5001 JMP BOOT /ERROR: TRY AGAIN B-2 INDEX ABSLDR, 16 FIELD pseudo-operator, use with extended memory, 14 FORTRAN, patch for FRTS, 3 Bad-block mapping, FUTIL, 4 on RL01, 24 BASIC, patch for BRTS, 3 BATCH, Hardware disk address, use with RL01, 24 RL01, 30 BOOT program, 4, 35 Bootstraps, for RL01, 6 for RX02, 5 Instruction set, BUILD program, 5, 41 RL01, 29 IOT instructions, use with KT8A, 4 CDF instruction, use with extended memory, 14 CIF instruction, KT8A, 7-16 use with extended memory, 14 Command registers, RL01, 27-29 Core Control Block, Loading instructions, altering with SAVECB, 18 RL01, 34 use with FUTIL, 4 LXM instruction, 15 Data space, Memory address register, RL01, 30 RL01, 27 Device names, MEMORY command, 12 RL01, 24 Monitor head, RX02, 20 moving with PIP, 4 Disk format, RL01, 25, 35 Distribution media, 3 ODT, use with extended memory, 10-12 Extended mode register, 15 INDEX-1 INDEX (Cont.) PAL8, ROM bootstrap, use with extended memory, for RL01, 35 13-16 RX01 diskette, Patches, compatibility with RX02, 21 for BRTS, 3 formatting with RXCOPY, 23 for FRTS, 3 interleave scheme, 21 PIP, 4 RX02 diskette, device names, 20 formatting with RXCOPY, 20, 23 interleave scheme for dual RESORC, 3 density, 22 Restrictions on extended memory, for ABSLDR, 16 for MEMORY, 12 for Monitor, 8 SAVE command, for START, 10 use with extended memory, 8-9 RL8A controller format, 27-29 SAVECB program, 18 RLFRMT, 36 Sector address register, 28 messages, 38-40 START command, RL01 disk, 24-41 restrictions on use, 10 bad-block mapping, 24 bootstrapping, 6, 33 building a system on, 41 command registers, 27-29 VXA0 device, 18 data space, 30 devices A, B, and C, 25 disk format, 27, 38 handlers, 32 Word-count register, 28 hardware disk addresses, 30 instruction set, 29 loading instructions, 34 memory address register, 27 RL8A controller, 27-29 RLFRMT, 36 ROM bootstrap, 35 sector address register, 28 word-count register, 28 Index-2 OS/8 Device Extensions User's Guide AA-D319A-TA READER'S COMMENTS NOTE: This form is for document comments only. DIGITAL will use comments submitted on this form at the company's discretion. If you require a written reply and are eligible to receive one under Software Performance Report (SPR) service, submit your comments on an SPR form. Did you find this manual understandable, usable, and well-organized? Please make suggestions for improvement. ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ Did you find errors in this manual? If so, specify the error and the page number. ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ Please indicate the type of user/reader that you most nearly represent. [] Assembly language programmer [] Higher-level language programmer [] Occasional programmer (experienced) [] User with little programming experience [] Student programmer [] Non-programmer interested in computer concepts and capabilities Name______________________________________Date________________________ Organization__________________________________________________________ Street________________________________________________________________ City__________________________State_____________Zip Code______________ or Country +-+-+-+-+-+-+-+ +---------------+ |d|i|g|i|t|a|l| | FIRST CLASS | +-+-+-+-+-+-+-+ | PERMlT NO. 33 | | MAYNARD. MASS.| +---------------+ ======== ======== ------------------------------------------ ======== | BUSINESS REPLY MAIL | ======== | FIRST CLASS PERMIT NO.33 MAYNARD MASS. | ======== ------------------------------------------ ======== ======== POSTAGE WILL BE PAID BY ADDRESSEE ======== ======== ======== ======== RT/C SOFTWARE PUBLICATIONS ML 5-5/E45 ======== DIGITAL EQUIPMNT CORPORATION ======== 146 MAIN STREET ======== MAYNARD, MASSACHUSETTS 01754 ======== -----------------Do Not Tear - Fold Here and Staple-------------------