LIMITED WARRANTY The International Business Machines Corporation warrants this IBM Personal Computer Product to be in good working order for a period of 90 days from the date of purchase from IBM or an authorized IBM Personal Computer dealer. Should this Product fail to be in good working order at any time during this 90-day warranty period, IBM wilL at its option, repair or replace this Product at no additional charge except as set forth below. Repair parts and replacement Products will be furnished on an exchange basis and will be either reconditioned or new. All replaced parts and Products become the property of IBM. This limited warranty does not include service to repair damage to the Product resulting from accident, disaster, misuse. abuse, or non-IBM modification of the Product. Limited Warranty service may be obtained by delivering the Product during the 90-day warranty period to an authorized IBM Personal Computer dealer or IBM Service Center and providing proof of purchase date. If this Product is delivered by mail, you agree to insure the Product or assume the risk of loss or damage in transit, to prepay shipping charges to thc warranty service location and to use the original shipping container or equivalent. Contact an authorized IBM Personal Computer dealer or write to IBM Personal Computer. Sales and Service, P.O. Box I328-W, Boca Raton, Florida 33432. for further information. ALL EXPRESS AND IMPLIED WARRANTIES FOR THIS PRODUCT INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE LIMITED IN DURATION TO A PERIOD OF 90 DAYS FROM THE DATE OF PURCHASE, AND NO WARRANTIES, WHETHER EXPRESS OR IMPLIED, WILL APPLY AFTER THIS PERIOD. SOME STATES DO NOT ALLOW LIMITATIONS ON HOW LONG AN IMPLIED WARRANTY LASTS. SO THE ABOVE LIMIT ATIONS MA Y NOT APPLY TO YOu. IF THIS PRODUCT IS NOT IN GOOD WORKING ORDER AS WARRANTED ABOVE, YOUR SOLE REMEDY SHALL BE REPAIR OR REPLACEMENT AS PROVIDED ABOVE. IN NO EVENT WILL IBM BE LIABLE TO YOU FOR ANY DAMAGES, INCLUDING ANY LOST PROFITS, LOST SAVINGS OR OTHER INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF OR INABILITY TO USE SUCH PRODUCT, EVEN IF IBM OR AN AUTHORIZED IBM PERSONAL COMPUTER DEALER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES, OR FOR ANY CLAIM BY ANY OTHER PARTY. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMIT A TION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR CONSUMER PRODUCTS, SO THE ABOVE LIMITATIONS OR EXCLUSIONS MAY NOT APPLY TO YOU. THIS WARRANTY GIVES YOU SPECIFIC LEGAL RIGHTS, AND YOU MAY ALSO HAVE OTHER RIGHTS WHICH MAY VARY FROM STATE TO ST ATE. - - -- - -- -------- -- - - --_.- - - -- - --- --- -- Personal Computer XT Hardware Reference Library Technical Reference FEDERAL COMMUNICATIONS COMMISSION RADIO FREQUENCY INTERFERENCE STATEMENT W ARNIN G: This equipment has been certified to comply with the limits for a Class B computing device, pursuant to Subpart J of Part 15 of FCC rules, Only peripherals (computer input/output devices, terminals, printers, etc.) certified to comply with the Class B limits may be attached to this computer. Operation with non-certified peripherals is likely to result in interference to radio and TV reception. Notice: As sold by the manufacturer, the IBM Prototype Card does not require certification under the FCC's rules for Class B devices. The user is responsible for any interference to radio or TV reception which may be caused by a user-modified prototype card. CAUTION: This product is equipped with a UL-listed and CSA-certified plug for the user's safety. It is to be used in conjunction with a properly grounded 115 Vac receptacle to avoid electrical shock. Revised Edition (April 1983) Changes are periodically made to the information herein; these changes will be incorporated in new editions of this publication. Products are not stocked at the address below. Requests for copies of this product and for technical information about the system should be made to your authorized IBM Personal Computer dealer. A Reader's Comment Form is provided at the back of this publication. If this form has been removed, address comments to: IBM Corp., Personal Computer, P.O. Box 1328-C, Boca Raton, Florida 33432. IBM may use or distribute any of the information you supply in any way it believes appropriate without incurring any obligations whatever. © Copyright International Business Machines Corporation, 1981, 1982, 1983 PREFACE The IBM Personal Computer XT Technical Reference manual describes the hardware design and provides interface information for the IBM Personal Computer XT. This publication also has information about the basic input/output system (BIOS) and programming support. The information in this publication is both introductory and for reference, and is intended for hardware and software designers, programmers, engineers, and interested persons who need to understand the design and operation of the computer. You should be familiar with the use of the Personal Computer XT, and you should understand the concepts of computer architecture and programming. This manual has two sections: "Section 1: Hardware" describes each functional part of the system. This section also has specifications for power, timing, and interface. Programming considerations are supported by coding tables, command codes, and registers. "Section 2: ROM BIOS and System Usage" describes the basic input/output system and its use. This section also contains the software interrupt listing, a BIOS memory map, descriptions of vectors with special meanings, and a set of low memory maps. In addition, keyboard encoding and usage is discussed. The publication has seven appendixes: Appendix A: ROM BIOS Listings Appendix B: 8088 Assembly Instruction Set Reference Appendix C: Of Characters, Keystrokes, and Color Appendix D: Logic Diagrams Appendix E: Specifications Appendix F: Communications Appendix G: Switch Settings A glossary and bibliography are included. iii Prerequisite Publication: Guide to Operations for the IBM Personal Computer XT Part Number 6936810 Suggested Reading: BASIC for the IBM Personal Computer Part Number 6025010 Disk Operating System (DOS) for the IBM Personal Computer Part Number 6024061 Hardware Maintenance and Service for the IBM Personal Computer XT Part Number 6936809 MACRO Assembler for the IBM Personal Computer Part Number 6024002 Related publications are listed in the bibliography. iv TABLE OF CONTENTS Section 1: Hardware IBM Personal Computer XT System Unit ............. 1-3 IBM Personal Computer Math Coprocesser ............ 1-25 IBM Keyboard .................................... 1-65 IBM Expansion Unit ............................... 1-71 IBM SO CPS Printers .............................. I-S1 IBM Printer Adapter ............................... 1-107 IBM Monochrome Display and Printer Adapter ........ 1-113 IBM Monochrome Display .......................... 1-121 IBM Color/Graphics Display Adapter ................ 1-123 IBM Color Display ................................ 1-149 IBM 5-W' Diskette Drive Adapter ................... 1-151 IBM 5-W' Diskette Drive ........................... 1-175 Diskettes ......................................... 1-177 IBM Fixed Disk Drive Adapter ...................... 1-179 IBM 10MB Fixed Disk Drive ....................... 1-195 IBM Memory Expansion Options .................... 1-197 IBM Game Control Adapter ......................... 1-203 IBM Prototype Card ............................... 1-209 IBM Asynchronous Communications Adapter. . . . . . . . .. 1-215 IBM Binary Synchronous Communications Adapter ..... 1-245 IBM Synchronous Data Link Control (SDLC) Communication Adapter .......................... 1-265 IBM Communications Adapter Cable ................. 1-295 Section 2:ROM BIOS and System Usage ROM BIOS ....................................... 2-2 Keyboard Encoding and Usage ...................... 2-11 Appendix A: ROM BIOS Listings .............. A-I System BIOS ..................................... A-2 Fixed Disk BIOS .................................. A-S5 Appendix B: 8088 Assembly Instruction Set Reference ................................. B-1 v Appendix C: Of Characters, Keystrokes, and Colors .................................... C-l Appendix D: Logic Diagrams ................... D-l System Board ..................................... D-2 Type 1 Keyboard ................................. D-12 Type 2 Keyboard ................................. D-14 Expansion Board .................................. D-15 Extender Card .................................... D-16 Receiver Card .................................... D-19 Printer ........................................... D-22 Printer Adapter ................................... D-25 Monochrome Display Adapter ...................... D-26 Color/Graphics Monitor Adapter .................... D-36 Color Display .................................... D-42 Monochrome Display .............................. D-44 5-Y -0 § § > > 6 6N Ln~'-- > 0 0 LO'-""'"- N + (9 (9 + +(9(9+ '<:j""MN"-" V" M" C"\I" -"" C c r:: c C C C c 0::0::0::0:: 0::0::0::0:: ~ \kh{ B u '" > 0C: '" c C 0 0 u '"Q) t: E ... .... "E '"s Q) -" ....0 > '" 0 0 Ci c e: U Q) 8u (J)eD c.. .<: Q) u 0 e: e: U -" e: 0 :::!: St;; ~ Ci u -0 ... CD B 0 u .n c.. Q) x S Q) .... ~ 0 LL c.. e: c :J 0 E': " 1;; > s0 Q) Ulc.. Power Supply and Connectors System Unit 1-23 Over-Voltage/Over-Current Protection Voltage Nominal Vac Type Protection Rating Amps 110 Fuse 5 Power On/Off Cycle: When the supply is turned off for a minimum of 1.0 second, and then turned on, the power-good signal will be regenerated. The power-good signal indicates that there is adequate power to continue processing. If the power goes below the specified levels, the power-good signal triggers a system shutdown. This signal is the logical AND of the dc output-voltage sense signal and the ac input voltage fail signal. This signal is TTL-compatible up-level for normal operation or down-level for fault conditions. The ac fail signal causes power-good to go to a down-level when any output voltage falls below the regulation limits. The dc output-voltage sense signal holds the power-good signal at a down level (during power-on) until all output voltages have reached their respective minimum sense levels. The power-good signal has a tum-on delay of at least 100 ms but no greater than 500ms. The sense levels of the dc outputs are: Output Minimum Sense Voltage Nominal Maximum (Vdc) (Vdc) (Vdc) (Vdc) +5 +4.5 +5.0 +5.5 -5 -4.3 -5.0 -5.5 +12 +10.8 +12.0 +13.2 -12 -10.2 -12.0 -13.2 1-24 System Unit IBM Personal Computer Math Coprocessor The IBM Personal Computer Math Coprocessor enables the IBM Personal Computer to perform high speed arithmetic, logarithmic functions, and trigonometric operations with extreme accuracy. The coprocessor works in parallel with the processor. The parallel operation decreases operation time by allowing the coprocessor to do mathematical calculations while the processor continues to do other functions. The first five bits of every instruction opcode for the coprocessor are identical (11011 binary). When the processor and the coprocessor see this instruction opcode, the processor calculates the address, of any variables in memory, while the coprocessor checks the instruction. The coprocessor will then take the memory address from the processor if necessary. To access locations in memory, the coprocessor takes the local bus from the processor when the processor finishes its current instruction. When the coprocessor is finished with the memory transfer, it returns the local bus to the processor. The IBM Math Coprocessor works with seven numeric data types divided into the three classes listed below. • Binary integers (3 types) • Decimal integers (1 type) • Real numbers (3 types) Coprocessor 1-25 Programming Interface The coprocessor extends the data types, registers, and instructions to the processor. The coprocessor has eight 80-bit registers which provide the equivalent capacity of 40 16-bit registers found in the processor. This register space allows constants and temporary re.sults to be held in registers during calculations, thus reducing memory access and improving speed as well as bus availability. The register space can be used as a stack or as a fixed register set. When used as a stack, only the top two stack elements are operated on: when used as a fixed register set, all registers are operated on. The Figure below shows representations of large and small numbers in each data type. Data Type Bits Significant Approximate Range (decimal) Digits (Decimal) Word Integer 16 4 ·32,768 source 0 1 ST C") E ~ :>- .. 'III ~ Data latch co ::0 ::0 ~ CI) r and Disable ~ 2Z2 Circuits EXT DISABLE ~ 00-07 Data - Buffer T -DlR ENABLE L Bus Direction and Enable f- Control ---- Extender Card Block Diagram ---- 1-76 Expansion Unit Receiver Card The receiver card is a four-plane card that fits in expansion slot 8 of the expansion unit. The receiver card redrives the I/O channel to provide sufficient power for additional options and to avoid capacitive effects. Directional control logic is contained on the receiver card to resolve contention and direct data flow on the I/O channel. Steering signals are transmitted back over the expansion cable for use on the extender card. Receiver Card Programming Considerations Several registers associated with the expansion option are programmable and readable for diagnostic purposes. The following figure indicates the locations and functions of the registers on the receiver card. Location Function Memory FXXXX(*) Write to memory to latch address bits Port 214 Write to latch data bus bits (DO - 07) Port 214 Read data bus bits (DO - D7) Port 215 Read high-order address bits (A8 - A 15) Port 215 Read low-order address bits (AD - A7) (*) Example: Write to memory location F123:4=OO Read Port 215 =12 Read Port 216 =34 (All values in hex) The expansion unit is automatically enabled upon power-up. The expansion unit and the system unit will be written to, if the expansion unit is not disabled when writing to FXXXX. However, the system unit and the expansion unit are read back separately. Expansion Unit 1-77 ,....-- ,....-- Control Bus Control Bus 'l// '/. Buffer ~ Bus Direction ~ and Enable Control - L [ .... = 0: 0: 00-07 Data Bus Buffer '"" >< ~ 1jl c· = U :::I C""> 0: ~ ~ :::I N <0 ~ Z Data latch ... -y Circuit rz .. ~ .. 1/0 Address ~ ~~ Decode ~ Control Signal AO·A19 '7 Address r/// Buffer "--- '---- Receiver Card Block Diagram 1-78 Expansion Unit Expansion Unit Interface Information The extender card and receiver card rear-panel connectors are the same. Pin and signal assignments for the extender and receiver cards are shown below. 21 \@ ................... @]J.1 42 @ • • • • • • • • • • • • • • • • • • • @ 22 62 @ • • • • • • • • • • • • • • • • • • @ 43 Pin Signal Pin Signal Pin Signal 1 +E IRQ6 22 +E D5 43 +E IRQ7 2 +E DRQ2 23 +E DRQl 44 +E D6 3 +E DIR 24 +E DRQ3 45 +E I/O CH RDY 4 +E ENABLE 25 RESERVED 46 +E IRQ3 5 +E ClK 26 +E ALE 47 +E D7 6 -E MEM IN EXP 27 +E T/C 48 +E 01 7 +E A17 28 +E RESET 49 -E I/O CH CK 8 +E A16 29 +EAEN 50 +E IRQ2 9 +EA5 30 +E A19 51 +E 00 10 -E OACKO 31 +E A14 52 +E 02 11 +E A15 32 +E A12 53 +E 04 12 +E All 33 +E A18 54 +E IRQ5 13 +EA10 34 -E MEMR 55 +E IRQ4 14 +EA9 35 -E MEMW 56 +E 03 15 +E Al 36 +EAO 57 GND 16 +EA3 37 -E OACK3 58 GNO 17 -E OACKl 38 +EA6 59 GND 18 +E A4 39 -E lOR 60 GNO 19 -E OACK2 40 +EA8 61 GND 20 -E lOW 41 +EA2 62 GND 21 +E A13 42 +EA7 E = Extended Connector Specifications Expansion Unit 1-79 Notes: 1-80 Expansion Unit IBM 80 CPS Printers The IBM 80 CPS (characters-per-second) Printers are self-powered, stand-alone, tabletop units. They attach to the system unit through a parallel signal cable, 6 feet in length. The units obtain ac power from a standard wall outlet (120 Vac). The printers are 80 cps, bidirectional, wire-matrix devices. They print characters in a 9 by 9 dot matrix with a 9-wire head. They can print in a compressed mode of 132 characters per line, in a standard mode of 80 characters per line, in a double width, compressed mode of 66 characters per line, and in a double width mode of 40 characters per line. The printers can print double-size characters and double-strike characters. The printers print the standard ASCII, 96-character, uppercase and lowercase character sets. A printer without an extended character set also has a set of 64 special block graphic characters. The IBM 80 CPS Graphics Printer has additional capabilities including: an extended character set for international languages, subscript, superscript, an underline mode, and programmable graphics. The printers can also accept commands setting the line-feed control desired for the application. They attach to the system unit through the printer adapter or the combination monochrome display and printer adapter. The cable is a 25-lead shielded cable with a 25-pin D-shell connector at the system unit end, and a 36-pin connector at the printer end. Printers 1·81 (1 ) Print Method: Serial-impact dot matrix (2) Print Speed: 80 cps (3) Print Direction: Bidirectional with logical seeking (4) Number of Pins in Head: 9 (5) Line Spacing: 1/16 inch (4.23 mm) or programmable (6) Pri nti ng Characteristics Matrix: 9x9 Character Set: Full 96-character ASCII with descenders plus 9 international characters/symbols. Graphic Character: See "Additional Printer Specifications" (7) Printing Sizes Maximum Characters characters per inch per inch Normal: 10 80 Double Width: 5 40 Compressed: 16.5 132 Double Width-Compressed: 8.25 66 (8) Media Handling: Paper Feed: Adjustable sprocket pin feed Paper Width Range: 4 inch (101.6 mm) to 10 inch (254 mm) Copies: One original plus two carbon copies (total thickness not to exceed 0.012 inch (0.3 mm)). Minimum paper thickness is 0.0025 inch (0.064 mm). Paper Path: Rear (9) Interfaces: Standard: Parallel 8-bit Data and Control Lines (10) Inked Ribbon: Color: Black Type: Cartridge Life Expecta ncy: 3 million characters (11) Environmental Conditions Operating Temperature Range: 41 to 95° F (5 to 35° C) Operating Humidity: 10 to 80% non-condensing (12) Power Requirement: Voltage: 120 Vac, 60 Hz Current: 1 A maximum Power Consumption: 100 VA maximum (13) Physical Characteristics: Height: 4.2 inches (107 mm) Width: 14.7 inches (374 mm) Depth: 12.0 inches (305 mm) Weight: 12 pounds (5.5 kg) Printer Specifications 1-82 Printers (6) Printing Characteristics: IBM 80 CPS Matrix Printer Graphics 64 block characters. IBM 80 CPS Graphics Printer (6) Printing Characteristics: Extra Character Set. Set 1 Additional ASCII numbers 160 to 175 contain European characters. Numbers 176 to 223 contain graphic characters .. Numbers 224 to 239 contain selected Greek characters. Numbers 240 to 255 contain math and extra symbols. Set 2 The difference in set 2 are ASCII numbers 3, 4, 5, 6, and 21. ASCII numbers 128 to 175 contain European characters. Graphics There are 20 block characters and programmable graphics. (7) Printing Sizes: Maximum Characters characters per inch per line Subscript: 10 80 Superscript: 10 80 Additional Printer Specifications Printers 1-83 Setting the DIP Switches There are two DIP switches on the control circuit board. In order to satisfy the user's specific requirements, desired control modes are selectable by the DIP switches. The functions of the switches and their preset conditions at the time of shipment are as shown in the following figures. DIP Switch 2 DIP Switch 1 Location of Printer DIP Switches Switch Factory-Set Number Function On Off Condition 1-1 Not Applicable - - On 1-2 CR Print Only Print & On Line Feed 1-3 Buffer Full Print Only Print & Off Line Feed 1-4 Cancel Code Invalid Valid Off 1-5 Delete Code Invalid Valid On 1-6 Error Sounds Does Not On Sound 1-7 Character Generator NA Graphic Off (Graphic Pattern Select) Patterns Select 1-8 SLCT IN Signal Fixed Fixed Not Fixed On Internally Functions and Conditions of DIP Switch 1 (Matrix) 1-84 Printers Switch Factory-Set Number Function On Off Condition 2-1 Not Applicable On 2-2 Not Applicable On 2-3 Auto Feed XT Signal Fixed Not Fixed Off Internally Internally 2-4 Coding Table Select N.A. Standard Off Functions and Conditions of DIP Switch 2 (Matrix) Switch Factory-Set Number Function On Off Condition 1 -1 Not Applicable - - On 1-2 CR Print Only Print & On Line Feed 1-3 Buffer Full Print Only Print & Off Line Feed 1-4 Cancel Code Invalid Valid Off 1-5 Not Applicable - - On 1-6 Error Buzzer Sound Does Not On Sound 1-7 Character Generator Set 2 Set 1 Off 1-8 SLCT IN Signal Fixed Not Fixed On Internally Internally Functions and Conditions of DIP Switch 1 (Graphics) Switch Factory-Set Number Function On Off Condition 2-1 Form Length 12 Inches 11 Inches Off 2-2 Line Spacing 1/8 Inch 1/6 Inch Off 2-3 Auto Feed XT Signal Fixed Not Fixed Off Internally Internally 2-4 1 Inch Skip Over Perforation Valid Not Valid Off Functions and Conditions of DIP Switch 2 (Graphics) Printers 1-85 Parallel Interface Description Specifications: • Data transfer rate: 1000 cps (maximum) • Synchronization: By externally-supplied STROBE pulses. • Handshaking ACKNLG or BUSY signals. • Logic level: Input data and all interface control signals are compatible with the TTL level. Connector: Plug: 57-30360 (Amphenol) Connector pin assignment and descriptions of respective interface signals are provided on the following pages. Data transfer sequence: BUSY--"" ACKNLG 0.5 fJS (Minimum) DATA--~ STROBE ---f---. 0.5 fJS (Minimum) 0.5 fJS (Minimum) Parallel Interface Timing Diagram 1-86 Printers Signal Return Pin No. Pin. No. Signal Direction Description 1 19 STROBE In STROBE pulse to read data in. Pulse width must be more than 0.5 f.1S at receiving terminal. The signal level is normally ·'high"; read-in of delta is performed at the "low" level of this signal. 2 20 DATA 1 In These signals represent 3 21 DATA 2 In information of th e 1st to 4 22 DATA 3 In 8th bits of parallel data 5 23 DATA 4 In respectively. Each signal 6 24 DATA 5 In is at "high" level when 7 25 DATA 6 In data is logical "1" and 8 26 DATA 7 In "low" when logical "0." 9 27 DATA 8 In 10 28 ACKNLG Out Approximately 5 f.1S pulse; "low" indicates that data has been received and the printer is ready to accept other data. 11 29 BUSY Out A "high" signal indicates that the printer cannot receive data. The signal becomes "high" in the following cases: 1. During data entry. 2. During printing operation. 3. In "offline" state. 4. During printer error status. Connector Pin Assignment and Descriptions of Interface Signals (Part 1 of 3) Printers 1-87 Signal Return Pin No. Pin No. Signal Direction Description 12 30 PE Out A "high" signal indicates that the printer is out of paper. 13 - SLCT Out This signal indicates that the printer is in the selected state. 14 - AUTO In With this signal being at FEED XT "low" level, the paper is automatically fed one line after printing. (The signal level can be fixed to "low" with DIP SW pin 2-3 provided on the control circuit board.) 15 - NC Not used. 16 - OV Logic GND level. 17 - CHASSIS- - Printer chassis GND. In GND the printer, the chassis GND and the logic GND are isolated from each other. 18 - NC - Not used. 19-30 - GND - "Twisted- Pair Return" signal; GND level. 31 - INT In When the level of this signal becomes "low" the printer controller is reset to its initial state and the print buffer is cleared. This signal is normally at "high" level, and its pulse width must be more than 50 f.lS at the receiving terminal. Connector Pin Assignment and Descriptions of Interface Signals (Part 2 of 3) 1-88 Printers Signal Return Pin No. Pin No. Signal Direction Description 32 ERROR Out The level of this signal becomes "low" when the printer is in "Paper End" state, "Offline" state and "Error" state. 33 - GND - Same as with pin numbers 19 to 30. 34 - NC - Not used. 35 Pulled up to +5 Vdc through 4.7 k-ohms resistance. 36 - SLCTIN In Data entry to the pri nter is possible only when the level of this signal is "low". (Internal fixing can be carried out with DIP SW 1 -8. The condition at the time of shipment is set "low" for this signaL) Notes: 1. "Direction" refers to the direction of signal flow as viewed from the printer. 2. "Return" denotes "Twisted-Pair Return" and is to be connected at signal-ground level. When wiring the interface, be sure to use a twisted-pair cable for each signal and never fail to complete connection on the return side. To prevent noise effectively, these cables should be shielded and connected to the chassis of the system unit and printer, respectively. 3. All interface conditions are based on TTL level. Both the rise and fall times of each signal must be less than 0.2 j1S. 4. Data transfer must not be carried out by ignoring the ACKNLG or BUSY signal. (Data transfer to this printer can be carried out only after confirming the ACKNLG signal or when the level of the BUSY signal is "low.") Connector Pin Assignment and Descriptions of Interface Signals (Part 3 of 3) Printers 1-89 Printer Modes for the IBM 80 CPS Printers The IBM 80 CPS Graphics Printer can use any of the combinations listed below, and the print mode can be changed at any place within a line. The IBM 80 CPS Matrix Printer cannot use the Subscript, Superscript, or Underline print modes. The Double Width print mode will affect the entire line with the matrix printer. The allowed combinations of print modes that can be selected are listed in the following table. Modes can be selected and combined if they are in the same vertical column. Printer Modes Normal X X X Compressed X X X Emphasized X X X Double Strike X X X Subscript X X X Superscript X X X Double Width X X X X X X X X X Underline X X X X X X X X X 1-90 Printers Printer Control Codes On the following pages you will find complete codes for printer characters, controls, and graphics. You may want to keep them handy for future reference. The printer codes are listed in ASCII decimal numeric order (from NUL which is 0 to DEL which is 127). The examples given in the Printer Function descriptions are written in the BASIC language. The "input" description is given when more information is needed for programming considerations. ASCII decimal values for the printer control codes can be found under "Printer Character Sets." The descriptions that follow assume that the printer DIP switches have not been changed from their factory settings. Printers 1·91 Printer Code Printer Function NUL Null Used with ESC B and ESC D as a list terminator. NUL is also used with other printer control codes to select options (for example, ESC S). Example: LPRINT CHR$ (0); BEL Bell Sounds the printer buzzer for 1 second. Example: LPRINT CHR$ (7); HT Horizontal Tab Tabs to the next horizontal tap stop. Tab stops are set with ESC D. No tab stops are set when the printer is powered on. (Graphics Printer sets a tab stop every 8 columns when powered on.) Example: LPRINT CHR$ (9); LF Line Feed Spaces the paper up one line. Line spacing is 1 16-inch unless reset by ESC A. ESC 0, ESC 1, ESC 2 or ESC 3. Example: LPRINT CHR$(1 0); VT Vertical Tab Spaces the paper to the next vertical tab position. (Graphics Printer does not allow vertical tabs to be set; therefore, the VT code is treated as LF.) Example: LPRINT CHR$ (11); FF Form Feed Advances the paper to the top of the next page. Note: The location of the paper, when the printer is powered on, determines the top of the page. The next top of page is 11 inches from that position. ESC C can be used to change the page length. Example: LPRINT CHR$ (12); CR Carriage Return Ends the line that the printer is on and prints the data remaining in the printer buffer. (No Line Feed operation takes place.) Note: IBM Personal Computer BASIC adds a Line Feed unless 128 is added [for example, CHR$ (141 )). Example: LPRINTCHR$ (13); 1-92 Printers Printer Code Printer Function so Shift Out (Double Width) Changes the printer to the Double Width print mode. Note: A Carriage Return. Line Feed or DC4 cancels Double Width print mode. Example: LPRINT CHR$(14); SI Shift In (Compressed) Changes the printer to the Compressed Character print mode. Example: LPRINT CHR$(15); DC1 Device Control 1 (Printer Selected) (Graphics Printer ignores DC1) Printer accepts data from the system unit. Printer DIP switch 1-8 must be set to the Off pOSition. Example: LPRINT CHR$(17); DC2 Device Control 2 (Compressed Off) Stops printing in the Compressed print mode. Example: LPRINT CHR(18); DC3 Device Control 3 (Printer Deselected) (Graphics Printer ignores DC3) Printer does not accept data from the system unit. The system unit must have the printer select line low. and DIP switch 1-8 must be in the Off position. Example: LPRINT CHR$(19); DC4 Device Control 4 (Double Width Off) Stops printing in the Double Width print mode. Example: LPRINT CHR$(20); CAN Cancel Clears the printer buffer. Control codes. except SO. remain in effect. Example: LPRINT CHR$ (24); ESC Escape Lets the printer know that the next data sent is a printer command. (See the following list of commands.) Example: LPRINT CHR$(27); Printers 1-93 Printer Code Printer Function ESC- Escape Minus (Underline) Format: ESC -;n; (Graphics Printer only) ESC - followed by a 1, prints all of the following data with an underline. ESC - followed by a 0 (zero), cancels the Underline print mode. Example: LPRINT CHRS(27);CHRS(45);CHRS(1); ESCO Escape Zero (1 18-lnch Line Feeding) Changes paper feeding to 1/8 inch. Example: LPRINT CHRS(27);CHRS(48); ESC 1 Escape One (7 n2-lnch Line Feeding) Changes paper feed to 7/72 inch. Example: LPRINT CHRS(27);CHRS(49); ESC2 Escape Two (Starts Variable Line Feeding) ESC 2 is an execution command for ESC A. If no ESC A command has been given, line feeding returns to 1/6-inch. Example: LPRINT CHRS(27);CHRS(50); ESC3 Escape Three (Variable Line Feeding) Format: ESC 3;n; (Graphics Printer only) Changes the paper feeding to n/216-inch. The example below sets the paper feeding to 54/216 (1/4) inch. The value of n must be between 1 and 255. Example: LPRINT CHRS(27);CHRS(51 );CHRS(54); ESC 6 Escape Six (Select Character Set 2) (Graphics Printer only) Selects character set 2. (See "Printer Character Set 2. ") Example: LPRINT CHRS(27);CHRS(54); ESC7 Escape Seven (Select Character Set 1.) (Graphics Printer only) Selects character set 1. (See "Printer Character Set 1. ") Character set 1 is selected when the printer is powered on or reset. Example: LPRINT CHRS(27);CHR$(55); ESC8 Escape Eight (Ignore Paper End) Allows the printer to print to the end of the paper. The printer ignores the Paper End switch. Example: LPRINT CHRS(27);CHRS(56); 1-94 Printers Printer Code Printer Function ESC 9 Escape Nine (Cancel Ignore Paper End) Cancels the Ignore Paper End command. ESC 9 is selected when the pri nter is powered on or reset. Example: LPRINT CHR$(27);CHR$(57); ESC < Escape Less Than (Home Head) (Graphics Printer only) The print head Will return to the left margin to print the line following ESC <. This will occur for one line only. Example: LPRINT CHR$(27);CHR$(60); ESCA Escape A (Sets Variable Line Feeding) Format: ESC A;n; Escape A sets the line-feed to n/72-inch. The example below tells the printer to set line feeding to 24/72-inch. ESC 2 must be sent to the printer before the line feeding will change. For example, ESC A;24 (text) ESC 2 (text). The text following ESC A;24 will space at the previously set line-feed increments. The text following ESC 2 will be printed with new line-feed increments of 24/72-inch. Any increment between 1/72 and 85/72 may be used. Example: LPRINT CHR$(27);CHR$(65);CHR$(24);CHR$(27);CHR$(50); ESC B Escape B (Set Vertical Tabs) Format: ESC B;n, ;n 2 ; ... n k ;NUL; (Graphics Printer ignores ESC B) Sets vertical tab stop positions. Up to 64 vertical tab stop positions are recognized by the printer. The n's, in the format above, are used to indicate tab stop positions. Tab stop numbers must be received in ascending numeric order. The tab stop numbers will not become valid until the NUL code is entered. Once vertical tab stops are established, they will be valid until new tab stops are specified. (If the printer is reset or powered Off, set tab stops are cleared.) If no tab stop is set, the Vertical Tab command behaves as a Line Feed command. ESC B followed only by NUL will cancel tab stops. The form length must be set by the ESC C command prior to setting tabs. Example: LPRINT CHR$(27);CHR$(66);CHR$( 1O);CHR$(20);CHR$(40);CHR$(O); Printers 1-95 Printer Code Printer Function ESCC Escape C (Set Lines per Page) Format: ESC C;n; Sets the page length. The ESC C command must have a value following it to specify the length of page desired. (Maximum form length for the printer is 127 lines.) The example below sets the page length to 55 lines. The printer defaults to 66 lines per page when powered on or reset. Example: LPRINT CHR$(27);CHR$(67);CHR$(55); Escape C (Set Inches per Page) Format: ESC C;n;m; (Graphics Printer only) Escape C sets the length of the page in inches. This command requires a value of 0 (zero) for n, and a value between 1 and 22 for m. Example: LPRINT CHR$(27);CHR$(67);CHR$(0);CHR$(12); ESCD Escape D (Set Horizontal Tab Stops) Format: ESC D;n,;n 2 ; ... n k ;NUL; Sets the horizontal tab stop positions. The example below shows the horizontal tab stop positions set at printer column positions of 10,20, and 40. They are followed by CHR$(O), the NUL code. They must also be in ascending numeric order as shown. Tab stops can be set between 1 and 80. When in the Compressed print mode, tab stops can be set up to 132. The maximum number of tabs that can be set is 112. The Graphics Printer can have a maximum of 28 tab stops. The HT (CHR$(9)) is used to execute a tab operation. Example: LPRINT CHR$(27);CHR$(68);CHR$( 10)CHR$(20)CHR$(40);CHR$(0); ESC E Escape E (Emphasized) Changes the printer to the Emphasized print mode. The speed of the printer is reduced to half speed during the Emphasized print mode. Example: LPRINT CHR$(27);CHR$(69); ESC F Escape F (Emphasized Off) Stops printing in the Emphasized print mode. Example: LPRINT CHR$(27);CHR$(70); ESCG Escape G (Double Strike) Changes the printer to the Double Strike print mode. The paper is spaced 1/216 of an inch before the second pass of the print head. Example: LPRINT CHR$(271;CHR$(71); 1-96 Printers Printer Code Printer Function ESC H Escape H (Double Strike Off) Stops printing in the Double Strike mode. Example: LPRINT CHR$(27);CHR$(72); ESC J Escape J (Set Variable Line Feeding) Format: ESC J;n; (Graphics Printer only) When ESC J is sent to the printer. the paper will feed in increments of n/216 of an inch. The value of n must be between 1 and 255. The example below gives a line feed of 50/216-inch. ESC J is canceled after the line feed takes place. Example: LPRINT CHR$(27);CHR$(74);CHR$(50); ESC K Escape K (480 Bit-Image Graphics Mode) Format ESC K;n,;n 2 ;v,;v2 ; ... v k; (Graphics Printer only) Changes from the Text mode to the Bit-Image Graphics mode. n, and n 2 are one byte. which specify the number of bit-image data bytes to be transferred. v, through vk are the bytes of the bit-image data. The number of bit-image data bytes (k) is equal to n, +256n 2 and cannot exceed 480 bytes. At every horizontal position. each byte can print up to 8 vertical dots. Bit-image data may be mixed with text data on the same line. Note: Assign values to n, and n 2 as follows: n, represents values from 0 - 255. n 2 represents values from 0 - 1 x 256. MSB is most significant bit and LSB is least significant bit. MSB LSB 15 14 13 12 11 10 9 8 2 2 222 2 2 L n, MSB LSB 7 6 5 4 3 2 o 2 2 2 2 2 2 2 2 Printers 1-97 Data sent to the printer. Text (20 characters) Bit-image data In text mode, 20 characters in text mode correspond to 120 bit-image positions (20 x 6 = 120). The printable portion left in Bit-Image mode is 360 dot positions (480 ~ 120 = 360). Data sent to the printer. Data A IESC Kin, I n I Data B I Data C I ESC I Kin, I n I Data 0 2 2 Text data I Length of data I ~~t~ge I data Text data I Length of data I ~~t~ge data ~---------480 bit-image dot positions _ _ _ _ _ _ _ _~I Example: TYPE B:GRAPH.TXT 1 'OPEN PRINTER IN RANDOM MODE WITH LENGTH OF 255 2 OPEN "LPTl:" AS #1 3 WIDTH "LPTl :",255 4 PRINT #1 ,CHRS(13);CHR$(1 0); 5 SLASH$=CHRS(l )+CHR$(02)+CHRS(04)+CHR$(08) 6 SLASHS=SLASHS+CHRS(16)+CHR$(32)+CHRS(64)+CHRS(128)+CHR$(0) 7 GAP$=CHRS(O)+CHR$(O)+CHR$(O) 8 NDOTS=480 9 'ESC K N1 N2 10 PRINT #1 ,CHR$(27);"K";CHR$(NDOTS MOD 256);CHR$(FIX (NDOTS1256)); 11 ' SEND NDOTS NUMBER OF BIT IMAGE BYTES 12 FOR 1=1 TO NDOTS/ 12 'NUMBER OF SLASHES TO PRINT USING GRAPHICS 13 PRINT #1 ,SLASH$;GAP$; 14 NEXT I 15 CLOSE 16 END This example will give you a row of slashes printed in the 480 Bit-Image mode. 1-98 Printers Printer Code Printer Function ESC L Escape L (960 Bit-Image Graphics Mode) Format: ESC L;n,;n 2 ;v,;v2 ; ... v k, (Graphics Printer only) Changes from the Text mode to the Bit-Image Graphics mode. The input is similar to ESC K. The 960 Bit-Image mode prints al half the speed of the 4BO Bit-Image Graphics mode, but can produce a denser graphic image. The number of bytes of bit-image Data (k) is n, + 256n 2 but cannot exceed 960. n, is in the range of 0 to 255. ESC N Escape N (Set Skip Perforation) Format ESC N;n; (Graphics Printer only) Sets the Skip Perforation function. The number following ESC N sets the value for the number of lines of Skip Perforation. The example shows a 12-line skip perforation. This will print 54 lines and feed the paper 12 lines. The value of n must be between 1 and 127. ESC N must be reset anytime the page length (ESC C) is changed. Example: CHR$(27);CHR$(7B);CHR$(12); ESC 0 Escape 0 (Cancel Skip Perforation) (Graphics Printer only) Cancels the Skip Perforation function. Example: LPRINT CHR$(27);CHR$(79); ESC S Escape S (Subscript/Superscript) Format: ESC S;n; (Graphics Printer only) Changes the printer to the Subscript print mode when ESC S is followed by a 1, as in the example below. When ESC S is followed by a 0 (zero), the printer will print in the Superscript print mode. Example: LPRINT CHR$(27);CHR$(83);CHR$(1); ESC T Escape T (Subscript/Superscript Off) (Graphics Printer only) The printer stops printing in the Subscript or Superscript print mode. Example: LPRINT CHR$(27);CHR$(84); ESC U Escape U (Unidirectional Printing) Format: ESC U;n; (Graphics Printer only) The printer will print from left to right following the input of ESC U; 1. When ESC U is followed by a 0 (zero). the left to right printing operation is canceled. The Unidirectional print mode (ESC U) ensures a more accurate print-start position for better print quality. Example: LPRINT CHR$(27);CHR$(85);CHR$(1); Printers 1-99 Printer Code Printer Function ESCW Escape W (Double Width) Format: ESC W;n; (Graphics Printer only) Changes the printer to the Double Width print mode when ESC W is followed by a 1. This mode is not canceled by a line-feed operation and must be canceled with ESC W followed by a 0 (zero). Example: LPRINT CHR$(27);CHR$(87);CHR$(1); ESCY Escape Y (960 Bit-Image Graphics Mode Normal Speed) Format: ESC Y n,;n 2 ;v,;v 2 ; ... vk ; (Graphics Printer only) Changes from the Text mode to the 960 Bit-Image Graphics mode. The printer prints at normal speed during this operation and cannot print dots on consecutive dot positions. The input of data is similar to ESC L. ESC Z Escape Z (1920 Bit-Image Graphics Mode) Format: ESC Z;n,;n 2 ;v,;v2 ; ... v k ; (Graphics Printer only) Changes from the Text mode to the 1920 Bit-Image Graphics mode. The input is similar to the other Bit-Image Graphics modes. ESC Z can print only every third dot position. DEL Delete (Clear Printer Buffer) (Graphics Printer ignores DEL) Clears the printer buffer. Control codes, except SO, still remain in effect. DIP switch 1-5 must be in the Off position. Example: LPRINT CHR$(127); 1-100 Printers o 1 234 5 6 7 8 9 INULI I I I I IBELI I I HT I~: I~ I~: ~: H:1"I~+~ D~ I 20 21 22 23 24 25 26 27 28 29 IDrAl I ICANI I esc I~I"I: ~I~I;; ;'I~ :" I;I~I: :1: ~ ~ ;I~ ; 50 51 52 53 54 55 56 57 58 59 121314 516 7 8 91: ; I~I: ; ;1; ~I; ~I~ ~ 70 71 72 73 74 75 76 77 78 79 IFIGH IIJ KllMlrulo 80 81 82 83 84 85 86 87 88 89 IplQ 90 91 ulvwlxlv R S T 92 93 94 95 96 97 98 99 IzI[ \ I] -I' I I I 100 101 102 103 A 104 105 106 a b c 107 108 109 Idle fig il kl'H h j I~I~ ';I~'~ ':I'~" :1:1:1 I': I'~ I': I'[' ';' I'J I': I~;LI~~"LI "" I Matrix Printer Character Set (Part 1 of 2) Printers 1-101 00000808BO 8888088880 0080080000 O~~~~~~~~~ ~~9~~ ~~~~ ~ '" ", ~~~~~~~ ~ ~~~~~~~ ~~~~i~~~~~ 210 211 212 213 214 215 216 217 216 219 ~=~~~~~~~~ i'" illDDDDDD Matrix Printer Character Set (Part 2 of 2) 1-102 Printers Graphics Printer Character Set 1 (Part 1 of 2) Printers 1-103 .., x ){ I• « » :::1 : ~~ ~:: ,.::..... ::: I: ~ '-- Graphics Printer Character Set 1 (Part 2 of 2) 1-104 Printers Graphics Printer Character Set 2 (Part 1 of 2) Printers 1-105 130 131 132 133 134 135 136 137 138 139 , e a a a a ~ e e e I 0 ., ~ X' I• « » :::···1-I: ~~ r- ::: I: ~ !:-;;- Graphics Printer Character Set 2 (Part 2 of 2) 1-106 Printers IBM Printer Adapter The printer adapter is specifically designed to attach printers with a parallel port interface, but it can be used as a general input/output port for any device or application that matches its input/output capabilities. It has 12 TTL-buffer output points, which are latched and can be written and read under program control using the processor In or Out instruction. The adapter also has five steady-state input points that may be read using the processor's In instructions. In addition, one input can also be used to create a processor interrupt. This interrupt can be enabled and disabled under program control. Reset from the power-on circuit is also ORed with a program output point, allowing a device to receive a power-on reset when the processor is reset. The input/output signals are made available at the back of the adapter through a right-angled, PCB-mounted, 25-pin, D-shell connector. This connector protrudes through the rear panel of the system or expansion unit, where a cable may be attached. When this adapter is used to attach a printer, data or printer commands are loaded into an 8-bit, latched, output port, and the strobe line is activated, writing data to the printer. The program then may read the input ports for printer status indicating when the next character can be written, or it may use the interrupt line to indicate "not busy" to the software. The output ports may also be read at the card's interface for diagnostic loop functions. This allows faults to be isolated between the adapter and the attaching device. This same function is also part of the combination IBM Monochrome Display and Printer Adapter. A block diagram of the printer adapter is on the next page. Printer Adapter 1-107 8 25-Pin D-Shell Bus Buffer Data Latch Connector 8 8 ~ r-t' Enable ,..... Clock . ; Trans- ceiver - 8 r DIR mJ Read ----+ Data AEN Write Data Write Control Read Status Read ~ontrol Command Decoder Control Bus O.C. Buffers Latch Drivers SLCTIN 4 Enable 5 ..... Clock STROBE ~ ~ ,.....~ AUTO 5 FDXT INIT Enable ERROR -po ~ ~ Clear SLCT PE ACK Reset BUSY Printer Adapter Block Diagram 1-108 Printer Adapter Programming Considerations The printer adapter responds to five I/O instructions: two output and three input. The output instructions transfer data into 2 latches whose outputs are presented on pins of a 25-pin D-shell connector. Two of the three input instructions allow the processor to read back the contents of the two latches. The third allows the processsor to read the real time status of a group of pins on the connector. A description of each instruction follows. IBM Monochrome Display & Printer Adapter Printer Adapter Output to address hex 3BC Output to address hex 378 Bit 7 I Bit 6 I Bit 5 I Bit 4 Bit 3 I Bit 2 I Bit 1 I Bit 0 Pin 9 Pin 8 Pin 7 Pin 6 Pin 5 Pin 4 Pin 3 Pin 2 The instruction captures data from the data bus and is present on the respective pins. These pins are each capable of sourcing 2.6 rnA and sinking 24 rnA. It is essential that the external device not try to pull these lines to ground. Printer Adapter 1·109 IBM Monochrome Display & Printer Adapter Printer Adapter Output to address hex 3BE Output to address hex 37A Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 IRQ Pin 17 Pin 16 Pin 14 Pin 1 Enable This instruction causes the latch to capture the five least significant bits of the data bus. The four least significant bits present their outputs, or inverted versions of their outputs, to the respective pins shown above. If bit 4 is written as 1, the card will interrupt the processor on the condition that pin 10 transitions high to low. These pins are driven by open collector drivers pulled to +5 Vdc through 4.7 k-ohm resistors. They can each sink approximately 7 rnA and maintain 0.8 volts down-level. IBM Monochrome Display & Printer Adapter Printer Adapter Input from address Hex 3BC Input from address hex 378 This command presents the processor with data present on the pins associated with the out to hex 3BC. This should normally reflect the exact value that was last written to hex 3BC. If an external device should be driving data on these pins (in violation of usage groundrules) at the time of an input, this data will be ORed with the latch contents. 1-110 Printer Adapter IBM Monochrome Display & Printer Adapter Printer Adapter Input from address hex 3BD Input from address hex 379 This command presents realtime status to the processor from the pins as follows. IBM Monochrome Display & Printer Adapter Printer Adapter Input from address hex 3BE Input from address hex 37A This instruction causes the data present on pins 1, 14, 15, 17, and the IRQ bit to read by the processor. In the absence of external drive applied to these pins, data read by the processor will exactly match data last written to hex 3BE in the same bit positions. Note that data bits 0-2 are not included. If external drivers are dotted to these pins, that data will be ORed with data applied to the pins by the hex 3BE latch. Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 IRQ P1ii"T'7 Pin 16 Pli'i14 Pin 1 Enable Por=O Por=l Por=O Por=l Por=l These pins assume the states shown after a reset from the processor. Printer Adapter 1-111 Rear Panel 25-Pin D-Shell Connector 0 • 14 • • • • 25 Connector 0 Note: All outputs are software-generated. and all inputs are real-time signals (not latched). At Standard TTL levels Signal Adapter Name Pin Number ~Strobe '1 1 +Data Bit 0 2 +Data Bit 1 3 +Data Bit 2 4 +Data Bit 3 5 +Data Bit 4 6 +Data Bit 5 7 +Data Bit 6 8 Printer +Data Bit 7 9 Printer ~ Acknowledge 10 Adapte " +Busy '--' 11 +P.End (out of paper) " 12 +Select~ 13 ~Auto Feed 14 ~ Error ~ 15 ~ Initialize Printer "v 16 ~ Select Input 17 Ground 18-25 Connector Specifications 1-112 Printer Adapter IBM Monochrome Display and Printer Adapter This chapter has two functions. The first is to provide the interface to the IBM Monochrome Display. The second provides a parallel interface for the IBM CPS Printer. This second function is fully discussed in the "IBM Printer Adapter" section. The monitor adapter is designed around the Motorola 6845 CRT controller module. There are 4K bytes of static memory on the adapter which is used for the display buffer. This buffer has two ports and may be accessed directly by the processor. No parity is provided on the display buffer. Two bytes are fetched from the display buffer in 553 ns, providing a data rate of 1.8M bytes/second. The monitor adapter supports 256 different character codes. An 8K-byte character generator contains the fonts for the character codes. The characters, values, and screen characteristics are given in "Appendix C: Of Characters, Keystrokes, and Color." This monitor adapter, when used with a display containing P39 phosphor, will not support a light pen. Where possible, only one low-power Schottky (LS) load is present on any I/O slot. Some of the address bus lines have two LS loads. No signal has more than two LS loads. Characteristics of the monitor adapter are listed below: • 80 by 25 screen • Direct-drive output • 9 by 14 character box • 7 by 9 character • 18 kHz monitor • Character attributes Monochrome Adapter 1-113 (10) (10) • (12) Processo r . Address Memory 2K Memory 2K Memory Address (11 ) - Character Code Attribute ~ Multiplexer Processo r Data Data Bus Gating - (8) (8) Character Clock (8) BDO-7 Octal L_l- . J Octal MA Latch Latch Lt-o I RA Character Generator • Attribute Decode -- (4) AO MC6845 Chip --. CRTC '. Select DOTCLK Timing Signals -- Shift Register I 1 Video Serial Dots . Process Logic r HSYNC, VSYNC, CURSOR, DISPEN Character Clock J ~ Monitor Direct Drive Outputs IBM Monochrome Adapter Block Diagram 1-114 Monochrome Adapter Programming Considerations The following table summarizes the 6845 internal data registers, their functions, and their parameters. For the IBM Monochrome Display, the values must be programmed into the 6845 to ensure proper initialization of the device. IBM Monochrome Register Register Program Display Number File Unit (Address in hexl RO Horizontal Total Characters 61 R1 Horizontal Displayed Characters 50 R2 Horizontal Sync Position Characters 52 R3 Horizontal Sync Width Characters F R4 Vertical Total Character Rows 19 R5 Vertical Total Adjust Scan Line 6 R6 Vertical Displayed Character Row 19 R7 Vertical Sync Position Character Row 19 RS Interlace Mode -------- 02 R9 Maximum Scan Line Scan Line D Address R10 Cursor Start Scan Line B R11 Cursor End Scan Line C R12 Start Address (HI -------- 00 R13 Start Address (LI -------- 00 R14 Cursor (HI -------- 00 R15 Cursor (LI -------- 00 R16 Reserved -------- -- R17 Reserved -------- -- To ensure proper initialization, the first command issued to the attachment must be to send to CRT control port 1 (hex 3B8), a hex 01, to set the high-resolution mode. If this bit is not set, then the processor access to the monochrome adapter must never occur. If the high-resolution bit is not set, the processor will stop running. System configurations that have both an IBM Monochrome Display Adapter and Printer Adapter, and an IBM Color/Graphics Monitor Adapter, must ensure that both adapters are properly initialized after a power-on reset. Damage to either display may occur if not properly initialized. Monochrome Adapter 1-115 The IBM Monochrome Display and Printer Adapter supports 256 different character codes. In the character set are alphanumerics and block graphics. Each character in the display buffer has a corresponding character attribute. The character code must be an even address, and the attribute code must be an odd address in the display buffer. 7 6 5 4 3 2 o Character Code Even Address (M) 7 6 5 4 3 2 o BL I R G I B Attribute Code Odd Address (M+1) I I I Foreground Intensity Background Blink The adapter decodes the character attribute byte as defined above. The blink and intensity bits may be combined with the foreground and background bits to further enhance the character attribute functions listed below. Background Foreground R G B R G B Function 0 0 0 0 0 0 Non- Display 0 0 0 0 0 1 Underline 0 0 0 1 1 1 White Character/Black Background 1 1 1 0 0 0 Reverse Video 1-116 Monochrome Adapter The 4K display buffer supports one screen of 25 rows of 80 characters, plus a character attribute for each display character. The starting address of the buffer is hex BOOOO. The display buffer can be read from using DMA; however, at least one wait-state will be inserted by the processor. The duration of the wait-state will vary, because the processor/monitor access is synchronized with the character clock on this adapter. Interrupt level 7 is used on the parallel interface. Interrupts can be enabled or disabled through the printer control port. The interrupt is a high-level active signal. The figure below breaks down the functions of the I/O address decode for the adapter. The I/O address decode is from hex 3BO through hex 3BF. The bit assignment for each I/O address follows: 1/0 Register Address Function 380 Not Used 381 Not Used 382 Not Used 383 Not Used 384* 6845 Index Register 385* 6845 Data Register 3B6 Not Used 3B7 Not Used 3B8 CRT Control Port 1 3B9 Reserved 3BA CRT Status Port 3BB Reserved 3BC Parallel Data Port 3BD Printer Status Port 3BE Printer Control Port 3BF Not Used *The 6845 Index and Data Registers are used to program the CRT controller to interface the high-resolution IBM Monochrome Display. I/O Address and Bit Map Monochrome Adapter 1-117 Bit Number Function 0 +High Resolution Mode 1 Not Used 2 Not Used 3 +Video Enable 4 Not Used 5 +Enable Blink 6,7 Not Used 6845 CRT Control Port 1 (Hex 388) Bit Number Function 0 +Horizontal Drive 1 Reserved 2 Reserved 3 +Black/White Video 6845 CRT Status Port (Hex 38A) 1-118 Monochrome Adapter Rear Panel 9-Pin Monochrome Display Connector 6 9 Connector At Standard TTL Levels Ground 1 Ground 2 Not Used 3 Not Used 4 IBM IBM Monochrome Not Used 5 Monochrome Display +Intensity 6 Display and Printer Adapter +Video 7 +Horizontal 8 -Vertical 9 Note: Signal voltages are 0.0 to 0.6 Vdc at down level and +2.4 to 3.5 Vdc at high level. Connector Specifications Monochrome Adapter 1-119 Notes: 1-120 Monochrome Adapter IBM Monochrome Display The high-resolution IBM Monochrome Display attaches to the system unit through two cables approximately 3 feet (914 millimeters) in length. One cable is a signal cable that contains the direct drive interface from the IBM Monochrome Display and Printer Adapter. The second cable provides ac power to the display from the system unit. This allows the system-unit power switch to also control the display unit. An additional benefit is a reduction in the requirements for wall outlets to power the system. The display contains an 11-~ inch (283 millimeters), diagonal 90° deflection CRT. The CRT and analog circuits are packaged in an enclosure so the display may either sit on top of the system unit or on a nearby tabletop or desk. The unit has both brightness and contrast adjustment controls on the front surface that are easily accessible to the operator. Monochrome Display 1-121 Operating Characteristics Screen • High-persistence green phosphor (P 39). • Etched surface to reduce glare. • Size is 80 characters by 25 lines. • Character box is 9 dots wide by 14 dots high. Video Signal • Maximum bandwidth of 16.257 MHz. Vertical Drive • Screen refreshed at 50 Hz with 350 lines of vertical resolution and 720 lines of horizontal resolution. Horizontal Drive • Positive-level, TTL-compatibility at a frequency of 18.432 kHz. 1·122 Monochrome Display IBM Color/Graphics Monitor Adapter The IBM Color/Graphics Monitor Adapter is designed to attach to the IBM Color Display, to a variety of television-frequency monitors, or to home television sets (user-supplied RF modulator is required for home television sets). The adapter is capable of operating in black-and-white or color. It provides three video interfaces: a composite-video port, a direct-drive port, and a connection interface for driving a user-supplied RF modulator. In addition, a light pen interface is provided. The adapter has two basic modes of operation: alphanumeric (AIN) and all-points-addressable graphics (APA). Additional modes are available within the AIN and APA modes. In the AIN mode, the display can be operated in either a 40-column by 25-row mode for a low-resolution monitor or home television, or in an 80-column by 25-row mode for high-resolution monitors. In both modes, characters are defined in an 8-wide by 8-high character box and are 7-wide by 7-high, with one line of descender for lowercase characters. Both uppercase and lowercase characters are supported in all modes. The character attributes of reverse video, blinking, and highlighting are available in the black-and-white mode. In the color mode, sixteen foreground and eight background colors are available for each character. In addition, blinking on a per-character basis is available. The monitor adapter contains 16K bytes of storage. As an example, a 40-column by 25-row display screen uses 1000 bytes to store character information, and 1000 bytes to store attribute/color information. This would mean that up to eight display screens can be stored in the adapter memory. Similarly, in an 80-column by 25-row mode, four display screens may be stored in the adapter. The entire 16K bytes of storage on the display adapter are directly addressable by the processor, which allows maximum software flexibility in managing the screen. Color Graphics Adapter 1-123 In A/N color modes, it is also possible to select the color of the screen's border. One of sixteen colors can be selected. In the APA mode, there are two resolutions available: a medium-resolution color graphics mode (320 PELs by 200 rows) and a high-resolution black-and-white graphics mode (640 PELs by 200 rows). In the medium-resolution mode, each picture element (PEL) may have one of four colors. The background color (color 0) may be any of the 16 possible colors. The remaining three colors come from one of the two software-selectable palettes. One palette contains green/red/ brown; the other contains cyan/magenta/white. The high-resolution mode is available only in black-and-white because the entire 16K bytes of storage in the adapter is used to define the on or off state of the PELs. The adapter operates in noninterlace mode at either 7 or 14 MHz, depending on the mode of operation selected. In the A/N mode, characters are formed from a ROM character generator. The character generator contains dot patterns for 256 different characters. The character set contains the following major groupings of characters: • 16 special characters for game support • 15 characters for word-processing editing support • 96 characters for the standard ASCII graphics set • 48 characters for foreign-language support • 48 characters for business block-graphics support (allowing drawing of charts, boxes, and tables using single and double lines) • 16 selected Greek characters • 15 selected scientific-notation characters 1-124 Color Graphics Adapter The color/graphics monitor adapter function is packaged on a single card. The direct-drive and composite-video ports are right-angle mounted connectors on the adapter, and extend through the rear panel of the unit. The direct-drive video port is a 9-pin D-shell female connector. The composite-video port is a standard female phono-jack. The display adapter is implemented using a Motorola 6845 CRT controller device. This adapter is highly programmable with respect to raster and character parameters. Therefore, many additional modes are possible with clever programming of the adapter. . A block diagram of the color/graphics adapter is on the following page. Color Graphics Adapter 1-125 -- N I C/'I Processo Address Address Latch Display .... Buffer (16K Bytes) ~. r-- Input Buffer L.. Processol Data (") o . 0' .., . --r 4 Output f--- ..,o Latch Address Data Data ..g Processor 6845 1-+ Latch I-- Latch Latch e: Data ~ CRT (') [I> > t Graphics Serializer .. Color ~ R 1--+ G Q. ~ "0 ..... ,. ,-----to Encoder ~B ~ .., f!l Character Alpha Generator ROM r--------. Serializer f----J Palette/ ~ Overscan Horizontal Mode Timing L Composite Color ~ Vertical 4 Generator --.- Generator Control & Control Color/Graphics Monitor Adapter Block Diagram Descriptions of Major Components Motorola 6845 CRT Controller This device provides the necessary interface to drive a raster-scan CRT. Mode Set Register This is a general-purpose, programmable, I/O register. It has I/O ports that may be individually programmed. Its function in this attachment is to provide mode selection and color selection in the medium-resolution color-graphics mode. Display Buffer The display buffer resides in the processor-address space, starting at address hex B8000. It provides 16K bytes of dynamic read/write memory. A dual-ported implementation allows the processor and the graphics control unit to access the buffer. The processor and the CRT control unit have equal access to this buffer during all modes of operation, except in the high-resolution alphanumeric mode. In this mode, only the processor should access this buffer during the horizontal-retrace intervals. While the processor may write to the required buffer at any time, a small amount of display interference will result if this does not occur during the horizontal-retrace intervals. Character Generator This attachment utilizes a ROM character generator. It consists of 8K bytes of storage that cannot be read from or written to under software control. This is a general-purpose ROM character generator with three different character fonts. Two character fonts are used on the color/graphics adapter: a 7-high by 7-wide double-dot font and a 5-wide by 7-high single-dot font. The font is selected by a jumper (P3). The single-dot font is selected by inserting the jumper; the double-dot font is selected by removing the jumper. Color Graphics Adapter 1-127 Timing Generator This generator produces the timing signals used by the 6845 CRT controller and by the dynamic memory. It also resolves the processor/graphic controller contentions for accessing the display buffer. Composite Color Generator This generator produces base band video color information. Alphanumeric Mode Every display-character position in the alphanumeric mode is defmed by two bytes in the regen buffer (a part of the monitor adapter), not the system memory. Both the color/graphics and the monochrome display adapter use the following 2-byte character/attribute format. Display-Character Code Byte Attribute Byte 17 6 5 4 3 2 1 0 7 6 5 4 3 2 1 01 The functions of the attribute byte are defined by the following table: Attribute Function Attribute Byte 7 8 5 4 3 2 1 0 B R G B I R G B FG Background Foreground Normal B 0 0 0 I 1 i 1 Reverse Video B 1 1 1 I 0 0 0 Nondisplay (Black) B 0 0 0 I 0 0 0 Nondisplay (White) B 1 1 1 I 1 1 1 I = Highlighted Foreground (Character) B = Blinking Foreground (Character) 1-128 Color Graphics Adapter The attribute byte definitions are: 7 6 543 2 1 0 \ B\ R G B \1\ R G B \ I 11-----.. Foreground Color Intensity Background Color Blinking In the alphanumeric mode, the display mode can be operated in either a low-resolution mode or a high-resolution mode. The low-resolution alphanumeric mode has the following features: • Supports home color televisions or low-resolution monitors • Displays up to 25 rows of 40 characters each • ROM character generator that contains dot patterns for a maximum of 256 different characters • Requires 2,000 bytes of read/write memory (on the adapter) • Character box is 8-high by 8-wide • Two jumper-controlled character fonts are available: 5-wide by 7-high single-dot character font with one descender 7-wide by 7-high double-dot character font with one descender • One character attribute for each character Color Graphics Adapter 1-129 The high-resolution alphanumeric mode has the following features: • Supports the IBM Color Display or other color monitor with direct-drive input capability • Supports a black-and-white composite-video monitor • Displays up to 25 rows of 80 characters each • ROM displays generator that contains dot patterns for a maximum of 256 different characters • Requires 4,000 bytes ofread/write memory (on the adapter) • Character box is 8-high by 8-wide • Two jumper-controlled character fonts are available: 5-wide by 7-high single-dot character font with one descender 7-wide by 7-high double-dot character font with one descender • One character attribute for each character Monochrome vs Color/Graphics Character Attributes Foreground and background colors are defined by the attribute byte of each character, whether using the IBM Monochrome Display and Printer Adapter or the IBM Color/Graphics Monitor Adapter. The following table describes the colors for each adapter: Attribute Byte Monochrome Color/Graphics 7 6 5 4 3 2 1 0 Display Adapter Monitor Adapter B R G B I R G B Background Character Background Character FG Background Foreground Color Color Color Color B 0 0 0 I 1 1 1 Black White Black White B 1 1 1 I 0 0 0 White Black White Black B 0 0 0 I 0 0 0 Black Black Black Black B 1 1 1 I 1 1 1 White White White White 1-130 Color Graphics Adapter The monochrome display adapter will produce white characters on a white background with any other code. The color/graphics adapter will change foreground and background colors according to the color value selected. The color values for the various red, green, blue, and intensity bit settings are given in the table below. R G B I Color 0 0 0 0 Black 0 0 1 0 Blue 0 1 0 0 Green 0 1 1 0 Cyan 1 0 0 0 Red 1 0 1 0 Magenta 1 1 0 0 Brown 1 1 1 0 White 0 0 0 1 Gray 0 0 1 1 Light Blue 0 1 0 1 Light Green 0 1 1 1 Light Cyan 1 0 0 1 Light Red 1 0 1 1 Light Magenta 1 1 0 1 Yellow 1 1 1 1 White (High Intensity) Code written with an underline attribute for the IBM Monochrome Display, when executed on a color/graphics monitor adapter, will result in a blue character where the underline attribute is encountered. Also, code written on a color/graphics monitor adapter with blue characters will be displayed as white characters on a black background, with a white underline on the IBM Monochrome Display. Remember that not all monitors recognize the intensity (I) bit. Color Graphics Adapter 1-131 Graphics Mode The IBM Color/Graphics Monitor Adapter has three modes available within the graphics mode. They are low-resolution color graphics, medium-resolution color graphics, and high-resolution color graphics. However, only medium- and high-resolution graphics are supported in ROM. The following table summarizes the three modes. Horizontal Vertical Number of Colors Available (PELs) (Rows) (Includes Background Color) Low Resolution 160 100 16 (Includes black-and-white) Medium 320 200 4 Colors Total Resolution 1 of 16 for Background and 1 of Green, Red, or Brown or 1 of Cyan, Magenta, or White High Resolution 640 200 Black-and-white only Low-Resolution Color-Graphics Mode The low-resolution mode supports home television or color monitors. This mode is not supported in ROM. It has the following features: • Contains a maximum of 100 rows of 160 PELs, with each PEL being 2-high by 2-wide • Specifies 1 of 16 colors for each PEL by the I, R, G, and B bits • Requires 16,000 bytes of read/write memory (on the adapter) • Uses memory-mapped graphics 1-132 Color Graphics Adapter Medium-Resolution Color-Graphics Mode The medium-resolution mode supports home televisions or color monitors. It has the following features: • Contains a maximum of 200 rows of 320 PELs, with each PEL being 1-high by 1-wide • Preselects one of four colors for each PEL • Requires 16,000 bytes ofread/write memory (on the adapter) • Uses memory-mapped graphics • Formats 4 PELs per byte in the following manner: 7 6 5 4 3 2 o C1 CO C1 CO C1 CO C1 CO First Second Third Fourth Display Display Display Display PEL PEL PEL PEL • Organizes graphics storage in two banks of 8,000 bytes, using the following format: Memory Address (in hex) Function B8000 Even Scans (0,2,4, ... 198) 8,000 bytes B9F3F Not Used BAOOO Odd Scans (1,3,5 ... 199) 8,000 Bytes BBF3F Not Used BBFFF Address hex B8000 contains PEL instruction for the upper-left corner of the display area. Color Graphics Adapter 1-133 • Color selection is determined by the following logic: C1 co Function 0 0 Dot takes on the color of 1 of 16 preselected background colors 0 1 Selects first color of preselected Color Set 1 or Color Set 2 1 0 Selects second color of preselected Color Set 1 or Color Set 2 1 1 Selects third color of preselected Color Set 1 or Color Set 2 Cl and CO will select 4 of 16 preselected colors. This color selection (palette) is pre loaded in an I/O port. The two colors are: Color Set 1 Color Set 2 Color 1 is Green Color 1 is Cyan Color 2 is Red Color 2 is Magenta Color 3 is Brown Color 3 is White The background colors are the same basic 8 colors as defined for low-resolution graphics, plus 8 alternate intensities defined by the intensity bit, for a total of 16 colors, including black and white. 1-134 Color Graphics Adapter High-Resolution Black-and-White Graphics Mode The high-resolution mode supports color monitors. This mode has the following features: • Contains a maximum of 200 rows of 640 PELs, with each PEL being I-high by I-wide. • Supports black-and-white mode only. • Requires 16,000 bytes ofread/write memory (on the adapter). • Addressing and mapping procedures are the same as medium-resolution color graphics, but the data format is different. In this mode, each bit in memory is mapped to a PEL on the screen. • Formats 8 PELs per byte in the following manner: l71s1514J31211101 First Display PEL J Second Display PEL Third Display PEL Fourth Display PEL Fifth Display PEL Sixth Display PEL Seventh Display PEL Eighth Display PEL Color Graphics Adapter 1-135 Description of Basic Operations In the alphanumeric mode, the adapter fetches character and attribute information from its display buffer. The starting address of the display buffer is programmable through the 6845, but it must be an even address. The character codes and attributes are then displayed according to their relative positions in the buffer. Memory Address (in hex) Display Buffer B8000 (Even) Character Code A Starting B8001 Address Attribute A B8002 (Example of a 40 by 25 Screen) Character Code B AB B8003 Attribute B X B87CE Character Code X Video Screen Last B87CF Address Attribute X The processor and the display control unit have equal access to the display buffer during all the operating modes, except the high-resolution alphanumeric mode. During this mode, the processor should access the display buffer during the vertical retrace time. If it does not, the display will be affected with random patterns as the processor is using the display buffer. In the alphanumeric mode, the characters are displayed from a prestored ROM character generator that contains the dot patterns of all the displayable characters. In the graphics mode, the displayed dots and colors (up to 16K bytes) are also fetched from the display buffer. The bit configuration for each graphics mode is explained in "Graphics Mode." 1-136 Color Graphics Adapter I R G B Color 0 0 0 0 Black 0 0 0 1 Blue 0 0 1 0 Green 0 0 1 1 Cyan 0 1 0 0 Red 0 1 0 1 Magenta 0 1 1 0 Brown 0 1 1 1 White 1 0 0 0 Gray 1 0 0 1 Light Blue 1 0 1 0 Light Green 1 0 1 1 Light Cyan 1 1 0 0 Light Red 1 1 0 1 Light Magenta 1 1 1 0 Yellow 1 1 1 1 High Intensity White Note: "I" provides extra luminance (brightness) to each available shade. This results in the light colors listed above, except for monitors that do not recognize the "I" bit. Summary of Available Colors Programming Considerations Programming the 6845 CRT Controller The 6845 has 19 accessible internal registers, which are used to define and control a raster-scan CRT display. One of these registers, the Index register, is actually used as a pointer to the other 18 registers. It is a write-only register, which is loaded from the processor by executing an 'out' instruction to I/O address hex 3D4. The five least significant bits of the I/O bus are loaded into the Index register. In order to load any of the other 18 registers, the Index register is first loaded with the necessary pointer; then the Data Register is loaded with the information to be placed in the selected register. The Data Register is loaded from the processor by executing an Out instruction to I/O address hex 3D5. The following table defines the values that must be loaded into the 6845 CRT Controller registers to control the different modes of operation supported by the attachment: Color Graphics Adapter 1-137 40 by 25 80 by 25 Address Register Register Alpha- Alpha- Graphic Register Number Type Units lID numeric numeric Modes 0 RO Horizontal Character Write 38 71 38 Total Only 1 R1 Horizontal Character Write 28 50 28 Displayed Only 2 R2 Horizontal Character Write 2D 5A 2D Sync Position Only 3 R3 Horizontal Character Write OA OA OA Sync Width Only 4 R4 Vertical Total Character Write 1F 1F 7F Row Only 5 R5 Vertical Total Scan Write 06 06 06 Adjust Line Only 6 R6 Vertical Character Write 19 19 64 Displayed Row Only 7 R7 Vertical Character Write 1C 1C 70 Sync Position Row Only 8 R8 Interlace - Write 02 02 02 Mode Only 9 R9 Maximum Scan Write 07 07 01 Scan line Line Only Address A R10 Cursor Start Scan Write 06 06 06 Line Only B R11 Cursor End Scan Write 07 07 07 Line Only C R12 Start - Write 00 00 00 Address (H) Only D R13 Start - Write 00 00 00 Address (L) Only E R14 Cursor - Read! XX XX XX Address (H) Write F R15 Cursor - Read! XX XX XX Address (L) Write 10 R16 light Pen (H) - Read XX XX XX Only 11 R17 Light Pen (L) - Read XX XX XX Only Note: Ail register values are given in hexadecimal 6845 Register Description 1-138 Color Graphics Adapter Programming the Mode Control and Status Register The following I/O devices are defined on the color/graphics adapter. Hex Address A9 A8 A7 A6 A5 A4 A3 A2 Al AD Function of Register 3D8 1 1 1 1 0 1 1 0 0 0 Mode Control Register (DO) 3D9 1 1 1 1 0 1 1 0 0 1 Color Select Register (DO) 3DA 1 1 1 1 0 1 1 0 1 0 Status Register (D1) 3DB 1 1 1 1 0 1 1 0 1 1 Clear Light Pen Latch 3DC 1 1 1 1 0 1 1 1 0 0 Preset Light Pen Latch 3D4 1 1 1 1 0 1 0 Z Z 0 6845 Index Register 3D5 1 1 1 1 0 1 0 Z Z 1 6845 Data Register 3DO 1 1 1 1 0 1 0 Z Z 0 6845 Registers 3D1 1 1 1 1 0 1 0 Z Z 1 6845 Registers Z = don't care condition Color Graphics Adapter 1-139 Color-Select Register This is a 6-bit output-only register (cannot be read). Its I/O address is hex 3D9, and it can be written to by using the 8088 I/O Out command. Bit 0 Selects B (Blue) Border Color in 40 x 25 Alphanumeric Mode Selects B (Blue) Background Color in 320 x 200 Graphics Mode Selects B (Blue) Foreground Color in 640 x 200 Graphics Mode Bit 1 Selects G (Green) Border Color in 40 x 25 Alphanumeric Mode Selects G (Green) Background Color in 320 x 200 Graphics Mode Selects G (Green) Foreground Color in 640 x 200 Graphics Mode Bit 2 Selects R (Red) Border Color in 40 x 25 Alphanumeric Mode Selects R (Red) Background Color in 320 x 200 Graphics Mode Selects R (Red) Foreground Color in 640 x 200 Graphics Mode Bit 3 Selects I (Intensified) Border Color in 40 x 25 Alphanumeric Mode Selects I (Intensified) Background Color in 320 x 200 Graphics Mode Selects I (Intensified) Foreground Color in 640 x 200 Graphics Mode Bit 4 Selects Alternate. Intensified Set of Colors in Graphics Mode Selects Background Colors in the Alphanumeric Mode Bit 5 Selects Active Color Set in 320 x 200 Graphics Mode Bit 6 Not Used Bit 7 Not Used Bits 0, 1, 2, 3 These bits select the screen's border color in the 40 x 25 alphanumeric mode. They select the screen's background color (CO-Cl) in the medium-resolution (320 by 200) color-graphics mode. Bits 4 This bit, when set, will select an alternate, intensified set of colors. Selects background colors in the alphanumeric mode. Bit 5 This bit is only used in the medium-resolution (320 by 200) color-graphics mode. It is used to select the active set of screen colors for the display. 1-140 Color Graphics Adapter When bit 5 is set to 1, colors are determined as follows: C1 co Set Selected 0 0 Background (Defined by bits 0-3 of port hex 309) 0 1 Cyan 1 0 Magenta 1 1 White When bit 5 is set to 0, colors are determined as follows: C1 co Set Selected 0 0 Background (Defined by bits 0-3 of port hex 309) 0 1 Green 1 0 Red 1 1 Brown Mode-Select Register This is a 6-bit output-only register (cannot be read). Its I/O address is hex 3D8, and it can be written to using the 8088 I/O Out command. The following is a description of the register's functions: Bit 0 80 x 25 Alphanumeric Mode Bit 1 Graphics Select Bit 2 Black/White Select Bit 3 Enable Video Signal Bit 4 High-Resolution (640 x 200) Black/White Mode Bit 5 Change Background Intensity to Blink Bit Bit 6 Not Used Bit 7 Not Used Color Graphics Adapter 1-141 Bit 0 A 1 selects 80 by 25 alphanumeric mode A 0 selects 40 by 25 alphanumeric mode Bit 1 A 1 selects 320 by 200 graphics mode A 0 selects alphanumeric mode Bit 2 A 1 selects black-and-white mode A 0 selects color mode Bit 3 A 1 enables the video signal at certain times when modes are being changed. The video signal should be disabled when changing modes. Bit 4 A 1 selects the high-resolution (640 by 200) black-and-white graphics mode. One color of 8 can be selected on direct-drive sets in this mode by using register hex 3D9. Bit 5 When on, this bit will change the character background intensity to the blinking attribute function for alphanumeric modes. When the high-order attribute bit is not selected, 16 background colors (or intensified colors) are available. For normal operation, this bit should be set to 1 to allow the blinking function. 1-142 Color Graphics Adapter Mode Register Summary Bits 0 1 2 3 4 5 a a 1 1 0 1 40 x 25 Alphanumeric Black-and-White 0 0 0 1 a 1 40 x 25 Alphanumeric Color 1 0 1 1 a 1 80 x 25 Alphanumeric Black-and-White 1 0 0 1 0 1 80 x 25 Alphanumeric Color 0 1 1 1 0 z 320 x 200 Black-and-White Graphics 0 1 0 1 0 z 320 x 200 Color Graphics 0 1 1 1 1 z 640 x 200 Black-and-White Graphics Ud=: - 1 : Enable Blink Attribute - 640 x 200 Black-and-White Enable Video Signal Select Black-and-White Mode L -_ _ _ _ _ _ _--.~ L -_ _ _ _ _ _ _ _ _ _ Select 320 x 200 Graphics " - - - - - - - - - - - - - 80 x 25 Alphanumeric Select z = don't care condition Note: The low-resolution (160 by 100) mode requires special programming and is set up as the 40 by 25 alphanumeric mode. Status Register The status register is a 4-bit read-only register. Its I/O address is hex 3DA, and it can be read using the 8088 I/O In instruction. The following is a description of the register functions: Bit 0 Display Enable Bit 1 Light-Pen Trigger Set Bit 2 Light-Pen Switch Made Bit 3 Vertical Sync Bit 4 Not Used Bit 5 Not Used Bit 6 Not Used Bit 7 Not Used Color Graphics Adapter 1-143 Bit 0 This bit, when active, indicates that a regen buffer memory access can be made without interfering with the display. Bit 1 This bit, when active, indicates that a positive-going edge from the light-pen has set the light pen's trigger. This trigger is reset upon power-on and may also be cleared by performing an I/O Out command to hex address 3DB. No specific data setting is required; the action is address-activated. Bit 2 The light-pen switch status is reflected in this status bit. The switch is not latched or debounced. A 0 indicates that the switch is on. Bit 3 This bit, when active, indicates that the raster is in a vertical retrace mode. This is a good time to perform screen-buffer updating. Sequence of Events for Changing Modes 1. Determine the mode of operation. 2. Reset 'video enable' bit in mode-select register. 3. Program 6845 to select mode. 4. Program mode/color select registers including re-enabling video. 1-144 Color Graphics Adapter Memory Requirements The memory used by this adapter is self-contained. It consists of 16K bytes of memory without parity. This memory is used as both a display buffer for alphanumeric data and as a bit map for graphics data. The regen buffer's address starts at hex B8000. Read/Write Memory Address Space (in hex) 01000 System Read/Write Memory AOOOO B8000 Display Buffer 128K Reserved (16K Bytes) Regen Area BCOOO CODOO Color Graphics Adapter 1-145 Rear Panel 25-Pin D-Shel\ Connector o • • 25 • • • • • • • • • • • • • • • • • • • 14 o At Standard TTL Levels Ground 1 Ground 2 Red 3 Green 4 IBM Color D isplay Color/G raphics or other Dire ct-Drive Blue 5 Direct-D rive Monitor Intensity 6 Adapter Reserved 7 Horizontal Drive 8 Vertical Drive 9 Composite Phono Jack Hookup to Monitor Composite Video Signal of Approximately 1.5 Volts Video Color/G raphics Peak to Peak Amplitude 1 Monitor Composi te Jack Chassis Ground 2 Connector Specifications (Part 1 of 21 1-146 Color Graphics Adapter P1 (4-Pin Berg Strip) P2 (6-Pin Berg Strip) for RF Modulator for Light-Pen Color / Graphics Adapter +12 Volts 1 - (key) Not Used 2 RF Color/G raphics Mo dulator Composite Video Output 3 Adapter Logic Ground 4 RF Modulator Interface - Light Pen Input 1 (key) Not Used 2 Lig ht - Light Pen Switch 3 Color/ Graphics Pe n Chassis Ground 4 Adapter +5 Volts 5 +12 Volts 6 Light Pen Interface Connector Specifications (Part 2 of 2) Color Graphics Adapter 1-147 Notes: 1-148 Color Graphics Adapter IBM Color Display The IBM Color Display attaches to the system unit by a signal cable that is approximately 5 feet (1.5 meters) in length. This signal cable provides a direct-drive interface from the IBM Color/Graphics Monitor Adapter. A second cable provides ac power to the display from a standard wall outlet. The display has its own power control and indicator. The display will accept either 120-volt 60-Hz, or 220-volt 50-Hz power. The power supply in the display automatically switches to match the applied power. The display has a 13-inch (340 millimeters) CRT. The CRT and analog circuits are packaged in an enclosure so the display may sit either on top of the system unit or on a nearby tabletop or desk. Front panel controls and indicators include: Power-On control, Power~On indicator, Brightness and Contrast controls. Two additional rear.,.panel controls are the Vertical Hold and Vertical Size controls. Color Display 1-149 Operating Characteristics Screen • High contrast (black) screen. • Displays up to 16 colors, when used with the IBM Color/Graphics Monitor Adapter. • Characters defined in an 8-high by 8-wide matrix. Video Signal • Maximum video bandwidth of 14 MHz. • Red, green, and blue video signals and intensity are all independent. Vertical Drive • Screen refreshed at 60 Hz with 200 vertical lines of resolution. Horizontal Drive • Positive-level, TTL-compatibility, at a frequency of 15.75 kHz. 1·150 Color Display IBM 5-1/4" Diskette Drive Adapter The 5-1/4 inch diskette drive adapter fits into one of the expansion slots in the system unit. It attaches to one or two diskette drives through an internal, daisy-chained flat cable that connects to one end of the drive adapter. The adapter has a connector at the other end that extends through the rear panel of the system unit. This connector has signals for two additional external diskette drives; thus, the 5-1/4 inch diskette drive adapter can attach four 5-1/4 inch drives - two internal and two external. The adapter is designed for double-density, MFM-coded, diskette drives and uses write precompensation with an analog phase-lock loop for clock and data recovery. The adapter is a general-purpose device using the NEe }.LPD765 compatible controller. Therefore, the diskette drive parameters are programmable. In addition, the attachment supports the diskette drive's write-protect feature. The adapter is butTered on the I/O bus and uses the system board's direct memory access (DMA) for record data transfers. An interrupt level is also used to indicate when an operation is complete and that a status condition requires processor attention. In general, the 5-1/4 inch diskette drive adapter presents a high-level command interface to software I/O drivers. A block diagram ofthe 5-1/4 inch diskette drive adapter is on the following page. Diskette Adapter 1-151 -- , VI N "'1 Clock and Timing ,. ~ Write Precompensate r--c> Write Data Circuit Circuit o-. '"~ ~ :::: .- 1 I .. Write Data ~ I"- ~ ~r - - ~ Data .... Read Data <}- r-- > 0. VCO SYNC-= Separator I- ~ J' ...... -" .... STD.DATA ~ ...-1 '0 ..... ..... Data Windoll\< ~ rr ""I NEC Step ...... Floppy ~ Buffer !'v- r ' Disk Controller l/'" Direction Write Enable -{> Head Select l/'" Index ....- Write Protect rr ~ -"''-J Track 0 r" iRes~t -B Drive A Motor On Digital ~ Port -C Control Decoder f--D Drive A Select INTR. ( 'l I-- B I--C I--D l/"" J.-I- 5-1/4 Inch Diskette Drive Adapter Block Diagram Functional Description From a programming point of view, this attachment consists of an 8-bit digital-output register in parallel with an NEe ,uPD765 or equivalent floppy disk controller (FDe). In the following description, drive numbers 0, 1, 2, and 3 are equivalent to drives A, B, e, and D. Digital-Output Register The digital-output register (DOR) is an output-only register used to control drive motors, drive selection, and feature enable. All bits are cleared by the I/O interface reset line. The bits have the following functions: Bits 0 and 1 These bits are decoded by the hardware to select one drive if its motor is on: Bit I 0 Drive o 0 o (A) o 1 1 (B) 1 0 2 (e) 1 1 3 (D) Bit 2 The FDe is held reset when this bit is clear. It must be set by the program to enable the FDe. Bit 3 This bit allows the FDe interrupt and DMA requests to be gated onto the I/O interface. If this bit is cleared, the interrupt and DMA request I/O interface drivers are disabled. Bits 4, 5, 6, and 7 These bits control, respectively, the motors of drives 0, 1,2 (A, B, e), and 3 (D). If a bit is clear, the associated motor is off, and the drive cannot be selected. Diskette Adapter 1-153 Floppy Disk Controller The floppy disk controller (FDC) contains two registers that may be accessed by the main system processor: a status register and a data register. The 8-bit main status register contains the status information of the FDC and may be accessed at any time. The 8-bit data register (actually consisting of several registers in a stack with only one register presented to the data bus at a time) stores data, commands, parameters, and provides floppy disk drive (FDD) status information. Data bytes are read from or written to the data register in order to program or obtain results after a particular command. The main status register may only be read and is used to facilitate the transfer of data between the processor and FDC. The bits in the main status register (hex 34F) are defined as follows: Bit Number Name Symbol Description DBO FDD A Busy DAB FDD number 0 is in the Seek mode. DB' FDD B Busy DBB FDD number' is in the Seek mode. DB2 FDD C Busy DCB FDD number 2 is in the Seek mode. DB3 FDD D Busy DDB FDD number 3 is in the Seek mode. DB4 FDC Busy CB A read or write command is in process. DB5 Non-DMA NDM The FDC is in the non-DMA mode. Mode DB6 Data Input! DIO Indicates direction of data transfer Output between FDC and processor. If DIO = ",", then transfer is from FDC data register to the processor. If DIO = "0", then transfer is from the processor to the FDC data register. DB7 Request for ROM Indicates data register is ready to send Master or receive data to or from the processor. Both bits DIO and ROM should be used to perform the handshaking functions of ··ready" and "direction" to the processor. 1-154 Diskette Adapter The FDC is capable of performing 15 different commands. Each command is initiated by a multi-byte transfer from the processor, and the result after execution of the command may also be a multi-byte transfer back to the processor. Because of this multi-byte interchange of information between the FDC and the processor, it is convenient to consider each command as consisting of three phases: Command Phase The FDC receives all information required to perform a particular operation from the processor. Execution Phase The FDC performs the operation it was instructed to do. Result Phase After completion of the operation, status and other housekeeping information is made available to the processor. Diskette Adapter 1-155 Programming Considerations The following tables define the symbols used in the command summary, which follows. Symbol Name Description AO Address Line 0 AO controls selection of main status register (AO = 0) or data register (AO = 1). C Cylinder Number C stands for the current/selected cylinder (track) number of the medium. D Data D sta nds for the data pattern that is going to be written into a sector. D7-DO Data Bus 8-bit data bus, where 07 stands for a most significant bit, and DO stands for a least significant bit. DTL Data Length When N is defined as 00, DTL stands for the data length that users are going to read from or write to the sector. EOT End of Track EOT stands for the final sector number on a cylinder. GPL Gap Length GPL stands for the length of gap 3 (spacing between sectors excluding VCO sync field). H Head Address H stands for head number 0 or 1, as specified in ID field. HD Head HD stands for a selected head number 0 or 1. (H = HD in all command words.) HLT Head Load Time HL T stands for the head load time in the FDD (4 to 512 ms in 4-ms increments). HUT Head Unload Time HUT stands for the head unload time after a read or write operation has occurred (0 to 480 ms in 32-ms increments). MF FM or MFM Mode If MF is low, FM mode is selected; if it is high, MFM mode is selected only if MFM is implemented. MT Multi- Track If MT is high, a multi-track operation is to be performed. (A cylinder under both HDO and HD1 will be read or written.) N Number N stands for the number of data bytes written in a sector. Symbol Descriptions (Part 1 of 2) 1-156 Diskette Adapter Symbol Name Description NCN New Cylinder NCN stands for a new cylinder number, Number which is going to be reached as a result of the seek operation. (Desired position of the head.) ND Non-DMA Mode ND stands for operation in the non-DMA mode. PCN Present Cylinder PCN stands for cylinder number at the Number completion of sense-interrupt-status command indicating the position of the head at present time. R Record R stands for the sector number, which will be read or written. R/W Read/Write R/W stands for either read (R) or write (W)signal. SC Sector SC indicates the number of sectors per cylinder. SK Skip SK stands for skip deleted-data address mark. SRT Step Rate Time SRT stands for the stepping rate for the FDD (2 to 32 ms in 2-ms increments). STO Status 0 ST 0-3 stand for one of four registers that ST 1 Status 1 store the status information after a ST 2 Status 2 command has been executed. This ST 3 Status 3 information is available during the result phase after command execution. These registers should not be confused with the main status register (selected by AO =0). ST 0-3 may be read only after a command has been executed and contain information relevant to that particular command. STP Scan Test During a scan operation, if STP =1, the data in contiguous sectors is compared byte-by-byte with data sent from the processor (or DMA), and if STP =2, then alternate sectors are read and compared. usa, Unit Select US stands for a selected drive number US1 encoded the same as bits 0 and 1 of the digital output register (DOR). Symbol Descriptions (Part 2 of 2) Diskette Adapter 1-157 Command Summary In the following table, 0 indicates "logical 0" for that bit, 1 means "logical 1," and X means "don't care." Oata Bus Phase R/W 07 06 05 04 03 02 01 00 Remarks Command W Read Data MT MF SK 0 a , , a Command Codes W X X X X X HD US, usa w C Sector ID information W H prior to command W R execution. W N W EDT W GPL W DTL Execution Data tra nsfer between the FDD and main system. Result R STa Status information R ST' after command R ST 2 execution. R C Sector 10 information R H after command R R execution. R N Command W MT MF SK 0 , , Read Deleted Data a a Command Codes W X X X X X HD US1 usa w C Sector ID information W H prior to command W R execution. W N W EDT W GPL W DTL Execution Data tra nsfer between the FDD and main system. Result R STa Status information R ST' after command R ST 2 execution. R C Sector ID information R H after command R R execution. R N 1-158 Diskette Adapter Data Bus Phase R/W 07 06 05 04 03 02 01 DO Remarks Write Data Command W MT MF 0 0 0 1 0 1 Command Codes W X X X X X HD US1 USC W C Sector ID information W H to command W R execution. W N W EOT W GPL W DTL Execution Data tra nsfer between the main system and FDD. Result R STO Status information R ST 1 after command R ST 2 execution. R C Sector ID information R H after command R R execution. R N Write Deleted Data Command W MT MF 0 0 1 0 0 1 Command Codes W X X X X X HD US1 USC W C Sector ID information W H prior to command W R execution. W N W EOT W GPL W DTL Execution Data transfer between FDD and main system. Result R STO Status ID information R ST 1 after command R ST 2 execution. R C Sector ID information R H after command R R execution. R N Diskette Adapter 1-159 Oata Bus Phase R/W 07 06 05 04 03 02 D1 00 Remarks Read a Track Command W 0 MF SK 0 0 0 1 0 Command Codes W X X X X X HO US1 usa w C Sector 10 information W H prior to command W R execution. W N W EDT W GPL W OTL Execution Data tra nsfer between the FOO and main system. FOC reads all of cylinder's contents from index hole to EDT. Result R STO Status information R ST 1 after command R ST 2 execution. R C Sector 10 information R H after command R R execution. R N Read 10 Command W 0 MF 0 0 1 0 1 0 Command Codes W X X X X X HO US1 usa Execution The first correct 10 information on the cylinder is stored in data register. Result R STO Status information R ST 1 after command R ST 2 execution. R C Sector 10 information R H during execution R R phase. R N 1-160 Diskette Adapter Oata Bus Phase R/W 07 06 05 04 03 02 01 00 Remarks Command W a MF a , , Format a Track a a a Command Codes W X X X X X HO US, usa w N Bytes/Sector W SC Sector /T rack W GPL Gap 3 W 0 filler byte. Execution FOC formats an entire cylinder. Result R STa Status information R ST' after command R ST 2 execution. R C In this case, the 10 R H information has no R R meaning. R N Command W MT MF SK , Scan Equal a a a Command Codes W X X X X X HO US, usa w C Sector 10 information W H prior to command W R execution. W N W EOT W GPL W STP Execution Data compared between the FOO and the main system. Result R STa Status information R ST' after command R ST 2 execution. R C Sector 10 information R H after Command R R execution. R N Diskette Adapter 1-161 Oata Bus Phase R/W 07 06 05 04 03 02 01 00 Remarks Scan Low or Equal Command W MT MF SK 1 1 0 0 1 Command Codes W X X X X X HD USl usa W C Sector ID information W H prior to command W R execution. W N W EOT W GPL W STP Execution Data compared between the FDD and main system. Result R STO Status information R ST 1 after command R ST 2 execution. R C Sector 10 information R H after command R R execution. R N Scan High or Equal Command W MT MF SK 1 1 1 0 1 Command Codes W X X X X X HD USl usa W C Sector ID information W H prior to command W R execution. W N W EOT W GPL W STP Execution Data compared between the FDD and main system. Result R STO Status information R ST 1 after command R ST 2 execution. R C Sector 10 information R H after command R R execution. R N 1-162 Diskette Adapter Data Bus Phase R/W 07 06 05 04 03 02 01 DO Remarks Recalibrate Command W a 0 a 0 0 1 1 1 Command Codes W X X X X X 0 USl usa Execution Head retracted to No Result track a Phase Sense I nterrupt Status Command W a a 0 a 1 a a 0 Command Codes Result R STO Status information at R PCN the end of seek operation about the FOC Specify Command W a a 0 a a a Command Codes W -SRT HUT- W ---HLT NO No Result Phase Sense Drive Status Command W a a a a a 1 0 0 Command Codes W X X X X X HO USl usa Result R ST 3 Status information about FOO. Seek Command W a a a 0 1 Command Codes W X X X X X HO USl usa w NCN Execution Head is positioned over proper cylinder on diskette. No Result Phase Invalid Command W Invalid Codes Invalid command codes (NoOp - FOC goes into standy state). Result R STa STO = 80. Diskette Adapter 1-163 Bit No. Name Symbol Description 07 07 =Oand 06 =0 Interrupt IC Normal termination of command (NT). Code Command was completed and properly executed. 06 07 = 0 and 06 = 1 Abnormal termination of comma nd (AT). Execution of command was started, but was not successfully completed. 07 = 1 and 06 = 0 Invalid command issue (I C). Command that was issued was never started. 07 = 1 and 06 = 1 Abnormal termination because, during command execution, the ready signal from FOO changed state. 05 Seek End SE When the FOC completes the seek command, this flag is set to 1 (high). 04 Equipment EC If a fault signal is received from the Check FOO, or if the track 0 signal fails to occur after 77 step pulses (recalibrate command), then this flag is set. 03 Not Ready NR When the FOO is in the not-ready state and a read or write command is issued. this flag is set. If a read or write command is issued to side 1 of a single-sided drive, then this flag is set. D2 Head Address HO This flag is used to indicate the state of the head at interrupt. 01 Un it Select 1 US 1 These flags are used to indicate a drive 00 Unit Select 0 US 0 unit number at interrupt. Command Status Register 0 1-164 Diskette Adapter Bit No. Name Symbol Description D7 End of EN When the FDC tries to access a sector Cylinder beyond the final sector of a cylinder, this flag is set. D6 Not used. This bit is always 0 (low). D5 Data Error DE When the FDC detects a CRC error in either the ID field or the data field, this flag is set. D4 Over Run OR If the FDC is not serviced by the main system during data transfers within a certain time interval, this flag is set. D3 Not used. This bit is always 0 (low). D2 No Data ND During execution of a read data, write deleted data, or scan command, if the FDC ca nnot find the sector specified in the ID register, this flag is set. During execution of the read ID command, if the FDC cannot read the ID field without an error, then this flag is set. During the execution of the read a cylinder command, if the starting sector cannot be found, then this flag is set. D1 Not Writable NW During execution of a write data, write deleted data, or format-a-cylinder command, if the FDe detects a write-protect signal from the FDD, then this flag is set. DO Missing MA If the FDC cannot detect the ID address Address mark, this flag is set. Also, at the same Mark time, the MD (missing address mark in the data field) of status register 2 is set. Command Status Register 1 Diskette Adapter 1-165 Bit No. Name Symbol Description D7 - - Not used. This bit is always 0 (low). D6 Control Mark CM During execution of the read data or scan command, if the FDC encounters a sector that contains a deleted data address mark, this flag is set. D5 Data Error in DD If the FDC detects a CRC error in the data, Data Field then this flag is set. D4 Wrong WC This bit is related to the ND bit, and when Cylinder the contents of C on the medium are different from that stored in the ID register, this flag is set. D3 Scan Equal SH During execution of the scan command, if Hit the condition of "equal" is satisfied, this flag is set. D2 Scan Not SN During execution of the scan command, Satisfied if the FDC cannot find a sector on the cylinder that meets the condition, then this flag is set. D1 Bad Cylinder BC This bit is related to the ND bit, and when the contents of C on the medium are different from that stored in the ID register, and the contents of C is FF, then this flag is set. DO Missing MD When data is read from the medium, if Address Mark the FDC cannot find a data address mark in Data Field or deleted data address mark, then this flag is set. Command Status Register 2 1-166 Diskette Adapter Bit No. Name Symbol Description D7 Fault FT This bit is the status of the fault signal from the FDD. D6 Write WP Th is bit is the status of the Protected write· protected signal from the FDD. D5 Ready RY This bit is the status of the ready signal from the FDD. D4 Track a TO This bit is the status of the track a signal from the FDD. D3 Two Side TS Th is bit is the status of the two-side signal from the FDD. D2 Head Address HD This bit is the status of the side-select signal from the FDD. D1 Unit Select 1 US 1 This bit is the status of the unit-select-1 signal from the FDD. DO Unit Select a usa This bit is the status of the unit-select-O signal from the FDD. Command Status Register 3 Programming Summary FDC Data Register 1/0 Address Hex 3F5 FDC Main Status Register 1/0 Address Hex 3F4 Digital Output Register 1/0 Address Hex 3F2 Bit a Drive 00: DR #A 10: DR #C 1 Select 01 : DR #B 11 : DR #D 2 Not FDC Reset 3 Enable INT & DMA Requests 4 Drive A Motor Enable 5 Drive B Motor Enable 6 Drive C Motor Enable 7 Drive D Motor Enable All bits cleared with channel reset. ope Registers Diskette Adapter 1-167 FDC Constants (in hex) N: 02 GPL Format: 05 SC: 08 GPLRIW: 2A HUT: F HLT: 01 SRT: C (6 ms track-to-track) Drive Constants Head Load 35 ms Head Settle 15 ms Motor Start 250ms Comments • Head loads with drive select, wait HD load before R/W. • Following access, wait HD settle time before R/W. • Drive motors should be off when not in use. Only A or Band CorD may run simultaneously. Wait motor start time before R/W. • Motor must be on for drive to be selected. • Data errors can occur while using a home television as the system display. Locating the TV too close to the diskette area can cause this to occur. To correct the problem, move the TV away from, or to the opposite side of the system unit. System I/O Channel Interface All signals are TTL-compatible: Most Positive Up Level 5.5 Vdc Least Positive Up Level 2.7 Vdc Most Positive Down Level 0.5 Vdc Least Positive Down Level -0.5 Vdc 1-168 Diskette Adapter The following lines are used by this adapter. + DO-7 (Bidirectional, load: 1 74LS, driver: 74LS 3-state). These eight lines form a bus by which all commands, status, and data are transferred. Bit 0 is the low-order bit. +AO-9 (Adapter input, load: 174LS) These ten lines form an address bus by which a register is selected to receive or supply the byte transferred through lines DO-7. Bit 0 is the low-order bit. +AEN (Adapter input, load: 1 74LS) The content of lines AO-9 is ignored if this line is active. -lOW (Adapter input, load: 1 74LS) The content of lines DO-7 is stored in the register addressed by lines AO-9 or DACK2 at the trailing edge of this signal. -lOR (Adapter input, load: 1 74LS) The content of the register addressed by lines AO-9 or DACK2 is gated onto lines DO-7 when this line is active. -DACK2 (Adapter input, load: 274LS) This line being active degates output DRQ2, selects the FDC data register as the source/destination of bus DO-7, and indirectly gates T /C to IRQ6. +T/C (Adapter input, load: 4 74LS) This line and DACK2 being active indicates that the byte of data for which the DMA count was initialized is now being transferred. +RESET (Adapter input, load: 1 74LS) An up level aborts any operation in process and clears the digital output register (DaR). Diskette Adapter 1-169 +DRQ2 (Adapter output, driver: 74LS 3-state) This line is made active when the attachment is ready to transfer a byte of data to or from main storage. The line is made inactive by DACK2 becoming active or an I/O read of the FDC data register. +IRQ6 (Adapter output, driver: 74LS 3-state) This line is made active when the FDC has completed an operation. It results in an interrupt to a routine which should examine the FDC result bytes to reset the line and determine the ending condition. Drive A and B Interface All signals are TTL-compatible: Most Positive Up Level 5.5 Vdc Least Positive Up Level 2.4 Vdc Most Positive Down Level 0.4 Vdc Least Positive Down Level -0.5 Vdc All adapter outputs are driven by open-collector gates. The drive(s) must provide termination networks to Vcc (except motor enable, which has a 2000-ohm resistor to Vcc). Each adapter input is terminated with a ISO-ohm resistor to Vcc. Adapter Outputs -Drive Select A and B (Driver: 7438) These two lines are used by drives A and B to degate all drivers to the adapter and receivers from the attachment (except motor enable) when the line associated with a drive is inactive. 1-170 Diskette Adapter -Motor Enable A and B (Driver: 7438) The drive associated with each of these lines must control its spindle motor such that it starts when the line becomes active and stops when the line becomes inactive. -Step (Driver: 7438) The selected drive moves the read/write head one cylinder in or out per the direction line for each pulse present on this line. -Direction (Driver: 7438) F or each recognized pulse of the step line, the read/write head moves one cylinder toward the spindle if this line is active, and away from the spindle if inactive. -Head Select (Driver: 7438) Head 1 (upper head) will be selected when this line is active (low). -Write Data (Driver: 7438) F or each inactive to active transition of this line while write enable is active, the selected drive causes a flux change to be stored on the diskette. -Write Enable (Driver: 7438) The drive disables write current in the head unless this line is active. Diskette Adapter 1-171 Adapter Inputs -Index The selected drive supplies one pulse per diskette revolution on this line. - Write Protect The selected drive makes this line active if a write-protected diskette is mounted in the drive. -Track 0 The selected drive makes this line active if the read/write head is over track O. -Read Data The selected drive supplies a pulse on this line for each flux change encountered on the diskette. 1-172 Diskette Adapter 34-Pin Keyed Edge Connector Component Side Note: Lands 1-33 (odd numbers) are on the back of the board. Lands 2-34 (even numbers) are on the front. or component side. Land At Standard TTL Levels Number - Ground-Odd Numbers 1-33 r-- Unused 2.4.6 Index 8 Motor Enable A 10 Drive Select B 12 Drive Select A 14 Motor Enable B 16 Dis kette Direction (Stepper Motor) 18 Driv e On ves Step Pulse 20 Ada pter Write Data 22 Write Enable 24 Track 0 26 Write Protect 28 Read Data 3() Select Head 1 32 Unused 34 - '--- Connector Specifications (Part 1 of 2) Diskette Adapter 1-173 37-Pin D-Shell Connector Rear Panel o 20 cc c. • .cO • • c~ c Q • • 37 0 Pin At Standard TTL Levels Number - r- Unused 1-5 Index 6 Motor Enable C 7 Drive Select D 8 Drive Select C 9 Motor Enable D 10 Ex ternal Direction (Stepper Motor) 11 Drive Dr ives Step Pulse 12 Adap ter Write Data 13 Write Enable 14 Track 0 15 Write Protect 16 Read Data 17 Select Head 1 18 Ground 20-37 - ' - Connector Specifications (Part 2 of 2) 1-174 Diskette Adapter IBM 5-1/4" Diskette Drive The system unit has space and power for one or two 5-1/4 inch diskette drives. A drive can be single-sided or double-sided with 40 tracks for each side, is fully self-contained, and consists of a spindle drive system, a read positioning system, and a read/write/erase system. The diskette drive uses modified frequency modulation (MFM) to read and write digital data, with a track-to-track access time of 6 milliseconds. To load a diskette, the operator raises the latch at the front of the diskette drive and inserts the diskette into the slot. Plastic guides in the slot ensure the diskette is in the correct position. Closing the latch centers the diskette and clamps it to the drive hub. After 250 milliseconds, the servo-controlled dc drive motor starts and drives the hub at a constant speed of 300 rpm. The head positioning system, which consists of a 4-phase stepper-motor and band assembly with its associated electronics, moves the magnetic head so it comes in contact with the desired track of the diskette. The stepper-motor and band assembly uses one-step rotation to cause a one-track linear movement of the magnetic head. No operator intervention is required during normal operation. During a write operation, a 0.013-inch (0.33 millimeter) data track is recorded, then tunnel-erased to 0.012 inch (0.030 millimeter). If the diskette is write-protected, a write-protect sensor disables the drive's circuitry, and an appropriate signal is sent to the interface. Data is read from the diskette by the data-recovery circuitry, which consists of a low-level read amplifier, diiferentiator, zero-crossing detector, and digitizing circuits. All data decoding is done by an adapter card. The diskette drive also has the following sensor systems: 1. The track 00 switch, which senses when the head/carriage assembly is at track 00. Diskette Drive 1-175 2. The index sensor, which consists of an LED light source and phototransistor. This sensor is positioned so that when an index hole is detected, a digital signal is generated. 3. The write-protect sensor disables the diskette drive's electronics whenever a write-protect tab is applied to the diskette. For interface information, refer to "IBM 5-1/4" Diskette Drive Adapter" earlier in this section. Media Industry-compatible 5-1/4 inch diskette Tracks per inch 48 Number of tracks 40 Dimensions Height 3.38 inches (85.85 mm) Width 5.87 inches (149.1 0 mrn) Depth 8.00 inches (203.2 mrn) Weight 4.50 pounds (2.04 kg) Temperature (Exclusive of media) Operating 50 0 F to 11 2 0 F (10 0 C to 44 0 C) Non operating -40 0 F to 140 0 F (-40 0 C to 60 0 C) Relative humidity (Exclusive of media) Operating 20% to 80% (non condensing) Non operating 5% to 95% (non condensing) Seek Time 6 ms track-to-track Head Settling Time 15 ms (last track addressed) Error Rate 1 per 109 (recoverable) 1 per 10 '2 (non recoverable) 1 per 106 (seeks) Head Life 20,000 hours (normal use) Media Life 3.0 x 106 passes per track Disk Speed 300 rpm +/- 1.5% (long term) Instantaneous Speed Variation +/- 3.0% Start/Stop Time 250 rns (maximum) Transfer Rate 250K bits/sec Recording Mode MFM Power +12 Vdc +/- 0.6 V, 900 rnA average +5 Vdc +/- 0.25 V, 600 mA average Mechanical and Electrical Specifications 1-176 Diskette Drive Diskettes The IBM 5-1/4" Diskette Drive uses a standard 5.25-inch (133.4-millimeter) diskette. For programming considerations, single-sided, double-density, soft-sectored diskettes are used for single-sided drives. Double-sided drives use double-sided, double-density, soft-sectored diskettes. The figure below is a simplified drawing of the diskette used with the diskette drive. This recording medium is a flexible magnetic disk enclosed in a protective jacket. The protected disk, free to rotate within the jacket, is continuously cleaned by the soft fabric lining of the jacket during normal operation. Read/write/erase head access is made through an opening in the jacket. Openings for the drive hub and diskette index hole are also provided. 0.140 Inch (~.56 I 1 I __ I 0.25 ± 0.01 Inch mm)-ll-f6.30 ± 0.25 mm) J -..:- .r:; E Sealed Protective Jacket Oxide Coated Mylar Disk ............. "\ \ gE ---0, I @ : : It) 5.25 Inch 66 1(133.4mm) +1 +1 / I I o ~ liner / co CD m Me·co ~5.25Inch_' , - ( 1 3 3 . 4 millf'l Head I Aperture Recording Medium Diskettes 1-177 Notes: 1-178 Diskettes IBM Fixed Disk Drive Adapter The fixed disk drive adapter attaches to one or two fixed disk drive units, through an internal daisy-chained flat cable (data/control cable). Each system supports a maximum of one fixed disk drive adapter and two fixed disk drives. The adapter is buffered on the I/O bus and uses the system board direct memory access (DMA) for record data transfers. An interrupt level also is used to indicate operation completion and status conditions that require processor attention. The fixed disk drive adapter provides automatic II-bit burst error detection and correction in the form of 32-bit error checking and correction (ECC). The device level control for the fixed disk drive adapter is contained on a ROM module on the adapter. A listing of this device level control can be found in "Appendix A: ROM BIOS Listings. " WARNING: The last cylinder on the fixed disk drive is reserved for diagnostic use. Diagnostic write tests will destroy any data on this cylinder. Fixed Disk Controller The disk controller has two registers that may be accessed by the main system processor: a status register and a data register. The 8-bit status register contains the status information of the disk controller, and can be accessed at any time. The 8-bit data register (actually consisting of several registers in a stack with only one register presented to the data bus) stores data, commands, parameters, and provides the disk controller's status information. Data bytes are read from, or written to the data register in order to program or obtain the results after a particular command. The status register is a read-only register, and is used to help the transfer of data between the processor and the disk controller. The controller-select pulse is generated by writing to port address hex 322. Fixed Disk Adapter 1-179 . ..... ..... 00 o '"Ij ><. (1) 0.. Serializer I oen_. Deserializer J2 ~ > 0.. Serdes ECC Data Separator TO } Drives ~ "0 ..... (1) 1/0 '"l Edge Connector Data Bus DB7-DBO' Control Sector r---"""-...., Buffer 8-Bit Processor Fixed Disk Drive Adapter Block Diagram Programming Considerations Status Register At the end of all commands from the system board, the disk controller returns a completion status byte back to the system boarq. This byte informs the system unit if an error occurred during the execution of the command. The following shows the format of this byte. 6 5 4 3 2 o o d o o o e o Bits 0, 1, 2, 3, 4, 6, 7 These bits are set to zero. Bit 1 When set, this bit shows an error has occurred during command execution. Bit 5 This bit shows the logical unit number of the drive. If the interrupts are enabled, the controller sends an interrupt when it is ready to transfer the status byte. Busy from the disk controller is unasserted when the byte is transferred to complete the command. Sense Bytes If the status register receives an error (bit 1 is set), then the disk controller requests four bytes of sense data. The format for the four bytes is as follows: Bits 7 6 5 4 3 2 1 0 Byte 0 Byte 1 Address Valid 0 Error Type I Error Code 0 0 d Head Number Byte 2 Cylinder High Sector Number Byte 3 Cylinder Low Remarks d = drive Fixed Disk Adapter 1-181 Byte 0 Bits 0, 1,2,3 Error code. Byte 0 Bits 4, 5 Error type. Byte 0 Bit 6 Set to 0 (spare). Byte 0 Bit 7 The address valid bit. Set only when the previous command required a disk address, in which case it is returned as a 1; otherwise, it is a O. The following disk controller tables list the error types and error codes found in byte 0: Error Type Error Code Bits 5 4 3 2 1 0 Description 0 0 0 0 0 0 The controller did not detect any error during the execution of the previous operation. 0 0 0 0 0 1 The controller did not detect an index signal from the drive. 0 0 0 0 1 0 The controller did not get a seek-complete signal from the drive after a seek operation (for all non-buffered step seeks). 0 0 0 0 1 1 The controller detected a write fault from the drive during the last operation. 0 0 0 1 0 0 After the controller selected the drive, the drive did not respond with a ready signal. 0 0 0 1 0 1 Not used. 0 0 0 1 1 0 After stepping the maximum number of cylinders, the controller did not receive the track 00 signa I from the drive. 0 0 0 1 1 1 Not used. 0 0 1 0 0 0 The drive is still seeking. This status is reported by the Test Drive Ready command for an overlap seek condition when the drive has not completed the seek. No time-out is measured by the controller for the seek to complete. 1-182 Fixed Disk Adapter Error Type Error Code Bits 5 4 3 2 1 0 Description 0 1 0 0 0 0 ID Read Error: The controller detected an ECC error in the target ID field on the disk. 0 1 0 0 0 1 Data Error: The controller detected an uncorrectable ECC error in the target sector during a read operation. 0 1 0 0 1 0 Address Mark: The controller did not d'etect the target address mark (AM) on the disk. 0 1 0 0 1 1 Not used. 0 1 0 1 0 0 Sector Not Found: The controller found the correct cylinder and head, but not the target sector. 0 1 0 1 0 1 Seek Error: The cyli nder or head address (either or both) did not compare with the expected target address as a resu It of a seek. 0 1 0 1 1 0 Not used. 0 1 0 1 1 1 Not used. 0 1 1 0 0 0 Correctable Data Error: The controller detected a correctable ECC error in the target field. 0 1 1 0 0 1 Bad Track: The controller detected a bad track flag during the last operation. No retries are attempted on this error. Fixed Disk Adapter 1-183 Error Type Error Code Bits 5 4 3 2 1 0 Description 1 a a a a a Invalid Command: The controller has received an invalid command from the system unit. 1 a 0 a a 1 Illegal Disk Address: The controller detected an address that is beyond the maximum range. Error Type Error Code Bits 5 4 3 2 1 0 Description 1 1 a a a a RAM Error: The controller detected a data error during the RAM sector-buffer diagnostic test. 1 1 a a a 1 Program Memory Checksum Error: During this internal diagnostic test, the controller detected a program-memory checksum error. 1 1 a a 1 a ECC Polynominal Error: During the controller's internal diagnostic tests, the hardware ECC generator failed its test. 1-184 Fixed Disk Adapter Data Register The processor specifies the operation by sending the 6-byte device control block (DCB) to the controller. The figure below shows the composition of the DCB, and defines the bytes that make up the DCB. Bits 7 6 5 4 3 2 1 0 Byte 0 Command Class I Opcode Byte 1 0 I 0 d I Head Number Byte 2 Cylinder High Sector Number Byte 3 Cylinder Low Byte 4 Interleave or Block Count Byte 5 Control Field Byte 0 - Bits 7, 6, and 5 identify the class of the command. Bits 4 through 0 contain the Opcode command. Byte 1 - Bit 5 identifies the drive number. Bits 4 through 0 contain the disk head number to be selected. Bits 6 and 7 are not used. Byte 2 - Bits 6 and 7 contain the two most significant bits of the cylinder number. Bits 0 through 5 contain the sector number. Byte 3 - Bits 0 through 7 are the eight least significant bits of the cylinder number. Byte 4 - Bits 0 through 7 specify the interleave or block count. Byte 5 - Bits 0 through 7 contain the control field. Fixed Disk Adapter 1-185 Control Byte Byte 5 is the control field of the DCB and allows the user to select options for several types of disk drives. The format of this byte is as follows: Bits 7 6 5 4 3 2 0 Remarks a 0 0 0 s s s r = retries s = step option a = retry option on data ECC error Bit 7 Disables the four retries by the controller on all disk-access commands. Set this bit only during the evaluation of the performance of a disk drive. Bit 6 If set to 0 during read commands, a reread is attempted when an ECC error occurs. If no error occurs during reread, the command will complete with no error status. If this bit is set to 1, no reread is attempted. Bits 5, 4, 3 Set to O. Bits 2, 1, 0 These bits define the type of drive and select the step option. See the following figure. Bits 2. 1. 0 0 0 0 This drive is not specified and defaults to 3 milliseconds per step. 0 0 1 N/A 0 1 0 N/A 0 1 1 N/A 1 0 0 200 microseconds per step. 1 0 1 70 microseconds per step (specified by BIOS). 1 1 0 3 milliseconds per step. 1 1 1 3 milliseconds per step. 1-186 Fixed Disk Adapter Command Summary Command Data Control Block Remarks Test Drive Bit 7 6 5 4 3 2 1 0 d = drive (0 or 1) Ready Byte 0 0 0 010 0 0 0 0 x = don't care (Class 0, Byte 1 0 0 dlx x x x x Bytes 2, 3,4, 5 = don't Opcode 00) care Recalibrate Bit 7 6 5 4 3 2 1 0 d = drive (0 or 1) (Class 0, Byte 0 0 0 010 0 0 0 1 x = don't care Opcode 01) Byte 1 0 0 dlx x x x x r = retries Byte 5 r 0 0 0 0 s s s s = Step Option Bytes 2, 3, 4 = don't care Reserved This Opcode is not (Class 0, used. Opcode 02) Request Sense Bit 7 6 5 4 3 2 1 0 d = drive (0 or 1 ) Status Byte 0 0 0 010 0 0 1 1 x = don't care (Class 0, Byte 1 0 0 d x x I x x x Bytes 2, 3,4,5 = don't Opcode 03) care Format Drive Bit 7 6 5 4 3 2 1 0 d = drive (0 or 1 ) (Class 0, Byte 0 0 0 01 0 0 1 0 0 r = retries Opcode 04) Byte 1 0 0 d I Head Number s = step option Byte 2 ch 10 0 0 0 0 0 ch = cylinder high Byte 3 Cylinder Low Byte 4 0 0 01 Interleave Interleave: 1 to 16 Byte 5 r 0 0 0 0 s s s for 512-byte sectors Ready Verify Bit 7 6 5 4 3 2 1 0 d = drive (0 or 1 ) (Class 0, Byte 0 0 0 01 0 0 1 0 1 r = retries Opcode 05) Byte 1 0 0 I d Head Number s = step option Byte 2 ch I Sector Number a = retry option on Byte 3 Cylinder Low data ECC Byte 4 Block Count ch = cylinder high ByteS r a 0 0 0 s s s Fixed Disk Adapter 1-187 Command Data Control Block Remarks Format Track Bit 7 6 5 a 4 3 2 1 d = drive (0 or 1 ) (Class 0, Byte a a a 010 a 1 1 a r = retries Opcode 06) Byte 1 a a d I Head Number s = step option Byte 2 ch I a 0 0 0 0 0 ch =cylinder high Byte 3 Cylinder Low Byte 4 0 a 01 Interleave Interleave: 1 to 16 Byte 5 r 0 0 0 0 s s s for 512-byte sectors Format Bad Bit 7 6 5 4 3 2 1 0 d = drive (0 or 1) Track Byte 0 0 0 01 0 0 1 1 1 r = retries (Class 0, Byte 1 0 0 d I Head Number s = step option Opcode 07) Byte 2 ch 10 0 0 0 0 0 ch = cylinder high Byte 3 Cylinder Low Byte 4 0 0 01 Interleave Interleave: 1 to 16 Byte 5 r a 0 a a s s s for 512-byte sectors Read Bit 7 6 5 4 3 2 1 0 d = drive (0 or 1 ) (Class 0, Byte 0 0 0 01 0 1 0 0 a r = retries Opcode 08) Byte 1 0 0 d Head Number I a = retry option on Byte 2 ch I Sector Number data ECC error Byte 3 Cylinder Low s = step option Byte 5 r a 0 0 0 s s s ch =cylinder high Reserved This Opcode is not (Class 0, used (Opcode 09) Write Bit 7 6 5 4 3 2 1 0 d = drive (0 or 1 ) (Class 0, Byte 0 0 0 01 0 1 0 1 0 r = retries Opcode aA) Byte 1 0 0 d I Head Number s = step option Byte 2 ch I Sector Number ch = cylinder high Byte 3 Cylinder Low Byte 4 Block Count Byte 5 r 0 0 0 0 s s s Seek Bit 7 6 5 4 3 2 1 0 d = drive (0 or 1 ) (Class 0, Byte a 0 0 01 0 1 0 1 1 r = retries Opcode OB) Byte 1 0 0 d I Head Number s = step option Byte 2 ch 10 0 0 0 a 0 x = don't care Byte 3 Cylinder Low ch = cylinder high Byte 4 x x x x x x x x Byte 5 r 0 0 a 0 s s s 1-188 Fixed Disk Adapter Command Data Control Block Remarks Initialize 4 3 2 0 Bytes 1, 2, 3,4,5 = Drive 0 0 0 don't care Characteristics* (Class 0, Opcode OC) Read ECC Burst 4 3 2 0 Bytes 1, 2, 3,4,5 = Error Length 0 0 don't care (Class 0, Opcode OD) Read Data from 4 3 2 0 Bytes 1, 2, 3, 4, 5 = Sector Buffer 0 0 don't care (Class 0, Opcode OE) Write Data to 4 3 2 0 Bytes 1, 2, 3, 4, 5 = Sector Buffer 0 don't care (Class 0, Ope ode OF) RAM 4 3 2 1 0 Bytes 1, 2, 3, 4, 5 = Diagnostic 0 0 0 0 0 don't care (Class 7, Opcode 00) Reserved This Opcode is not (Class 7, used Opcode 01) Reserved This Opcode is not (Class 7, used Opcode 02) *Initialize Drive Characteristics: The DCB must be followed by eight additional bytes. Maximum number of cylinders (2 bytes) Maximum number of heads (1 byte) Start reduced write current cylinder (2 bytes) Start write precompensation cylinder (2 bytes) Maximum ECC data burst length (1 byte) Fixed Disk Adapter 1-189 Command Data Control Block Remarks Drive Bit 7 6 5 4 3 2 1 0 d - drive (0 or 1 ) Diagnostic Byte 0 1 1 1 10 0 0 1 1 s = step option (Class 7, Byte 1 0 0 d Ix x x x x r = retries Opcode 03) Byte 2 x x x x x x x x x = don't care Byte 3 x x x x x x x x Byte 4 x x x x x x x x Byte 5 r 0 0 0 0 s s s Controller Bit 7 6 5 4 3 2 1 0 Bytes 1, 2, 3, 4, 5 = Internal Byte 0 1 1 1 10 0 1 0 0 don't care Diagnostics (Class 7, Opcode 04) Read Long* Bit 7 6 5 4 3 2 1 0 d = (0 or 1) (Class 7, Byte 0 1 1 1 10 0 1 0 1 s = step option Opcode 05) Byte 1 0 0 d I Head Number r = retries Byte 2 ch J Sector Number ch =cylinder high Byte 3 Cylinder Low Byte 4 Block Count Byte 5 r 0 0 0 0 s s s Write Long** Bit 7 6 5 4 3 2 0 1 d = drive (0 or 1) (Class 7, Byte 0 1 1 1 10 0 1 1 0 s = step option Opcode 06) Byte 1 0 0 d I Head Number r = retries Byte 2 ch I Sector Number ch = cylinder high Byte 3 Cylinder Low Byte 4 Block Count Byte 5 r 0 0 0 0 s s s *Returns 512 bytes plus 4 bytes of ECC data per sector. **Requires 512 bytes plus 4 bytes of ECC data per sector. 1-190 Fixed Disk Adapter Programming Summary The two least-significant bits of the address bus are sent to the system board's I/O port decoder, which has two sections. One section is enabled by the I/O read signal (- lOR) and the other by the I/O write signal (-lOW). The result is a total of four read/write ports assigned to the disk controller board. The address enable signal (AEN) is asserted by the system board when DMA is controlling data transfer. When AEN is asserted, the I/O port decoder is disabled. The following figure is a table of the four read/write ports: R/W Port Address Function Read 320 Read data (from controller to system unit). Write 320 Write data (from system unit to controller). Read 321 Read controller hardware status. Write 321 Controller reset. Read 322 Reserved. Write 322 Generate controller-select pulse. Read 323 Not used. Write 323 Write pattern to DMA and interrupt mask register. Fixed Disk Adapter 1-191 System I/O Channel Interface The following lines are used by the disk controller: AO-AI9 Positive true 20-bit address. The least-significant 10 bits contain the I/O address within the range of hex 320 to hex 323 when an I/O read or write is executed by the system unit. The full 20 bits are decoded to address the read-only storage (ROS) between the addresses of hex C8000 and C9FFF. DO-D7 Positive 8-bit data bus over which data and status information is passed between the system board and the controller. lOR Negative true signal that is asserted when the system board reads status or data from the controller under either programmed I/O or DMA control. lOW Negative true signal that is asserted when the system board sends a command or data to the controller under either programmed I/O or DMA control. AEN Positive true signal that is asserted when the DMA in the system board is generating the I/O Read (- lOR) or I/O Write (- lOW) signals and has control of the address and data buses. RESET Positive true signal that forces the disk controller to its initial power-up condition. IRQ 5 Positive true interrupt request signal that is asserted by the controller when enabled to interrupt the system board on the return ending status byte from the controller. DRQ 3 Positive true DMA-request signal that is asserted by the controller when data is available for transfer to or from the controller under DMA control. This signal remains active until the system board's DMA channel activates the DMA-acknowledge signal (-DACK 3) in response. DACK 3 This signal is true when negative, and is generated by the system board DMA channel in response to a DMA request (DRQ 3). 1-192 Fixed Disk Adapter Pin 34 _ _ ~--; Pin 20 Pin 1 Pin 2 Position 5 has No Pin Pin 1 (for Cable Orientation) Signal Pin Number Ground - Odd Numbers 1-33 Reserved 4,16,30,32 -Reduced Write Current 2 -Write Gate 6 -Seek Complete 8 -Track 00 10 -Write Fault 12 Disk Disk -Head Select 2 0 14 Drive Drive Connector -Head Select 21 18 Connector J1 -Index 20 J1 -Ready 22 -Step 24 -Drive Select 1 26 -Drive Select 2 28 -Direction In 34 Signal Pin Number Ground 2,4,6,8,12,16,20 Drive Select 1 Reserved 3, 7 Spare 9, 10, 5 (No Pin) oisk Ground 11 Disk orive MFM Write Data 13 Adapter Connector -MFM Write Data 14 Connecto J 2 or J3 Ground 15 J2 or J3 MFM Read Data 17 -MFM Read Data 18 Ground 19 Fixed Disk Adapter Interface Specifications Fixed Disk Adapter 1-193 Notes: 1-194 Fixed Disk Adapter IBM 10MB Fixed Disk Drive The disk drive is a random-access storage device that uses two non-removable 5-1/4 inch disks for storage. Each disk surface employs one movable head to service 306 cylinders. The total formatted capacity of the four heads and surfaces is 10 megabytes (1 7 sectors per track with 512 bytes per sector and a total of 1224 tracks). An impact-resistant enclosure provides mechanical and contamination protection for the heads, actuator, and disks. A self-contained recirculating system supplies clean air through a 0.3-micron filter. Thermal isolation of the stepper and spindle motor assemblies from the disk enclosure results in a very low temperature rise within the enclosure. This isolation provides a greater off-track margin and the ability to perform read and write operations immediately after power-up with no thermal stabilization delay. Fixed Disk Drive 1-195 Media Rigid media disk Number of Tracks 1224 Track Density 345 tracks per inch Dimensions Height 3.25 inches (8255 mm) Width 5.75 inches (146.05 mm) Depth 8.0 inches (203.2 mm) Weight 4.6 Ib (208 kg) Temperature Operating 40°F to 122°F (4°C to 50°C) Non operating -40°F to 140°F (-40°C to 60°C) Relative Hu midity Operating 8% to 80% (non condensing) Maximum Wet Bulb 78° F (26° C) Shock Operating 10 Gs Non operating 20 Gs Access Time 3 ms track-to-track Average Latency 8.33 ms Error Rates Soft Read Errors 1 per 10 10 bits read Hard Read Errors 1 per 10 12 bits read Seek Errors 1 per 106 seeks Design Life 5 years (8,000 hours MTF) Disk Speed 3600 rpm ±1 % Transfer Rate 5.0 M bits/sec Recording Mode MFM Power +12 Vdc ± 5% 1.8 A (4.5 A maximum) +5 Vdc == 5% 0.7 A (1.0 A maximum) Maximum Ripple 1% with equivalent resistive load Mechanical and Electrical Specifications 1-196 Fixed Disk Drive IBM Memory Expansion Options Three memory expansion options and a memory module kit are available for the IBM Personal Computer XT. They are the 32KB, 64KB, and 64/256KB Memory Expansion Options and the 64KB Memory Module Kit. The base system has a standard 128K of RAM on the system board. One or two memory module kits can be added, providing the system board with 192K or 256K of RAM. The base 64/256K option has a standard 64K of RAM. One, two, or three 64K memory module kits may be added, providing the 64/256K option with 128K, 192K, or 256K of RAM. A maximum of 256K or RAM can be installed on the system board as modules without using any of the system unit expansion slots or expansion options. The system board must be populated to the maximum 256K of RAM before any memory expansion options can be installed. An expansion option must be configured to reside at a sequential 32K or 64K memory address boundary within the system address space. This is done by setting DIP switches on the option. The 32K and 64K options both use 16K by 1 bit memory modules, while the 64/256K option uses 64K by 1 bit memory modules. On the 32K and 64/256K options, 16-pin industry-standard parts are used. On the 64K option, stacked modules are used resulting in a 32K by 1 bit, 18-pin module. This allows the 32K and 64K options to have approximately the same physical size. All memory expansion options are parity checked. If a parity error is detected, a latch is set and an I/O channel check line is activated, indicating an error to the processor. In addition to the memory modules, the memory expansion options contain the following circuits: bus buffering, dynamic memory timing generation, address multiplexing, and card-select decode logic. Dynamic-memory refresh timing and address generation are functions that are performed on the system board and made available in the I/O channel for all devices. Memory Expansion Options 1-197 To allow the system to address 32K, 64K, or 64/256K memory expansion options, refer to "Appendix G: Switch Settings" for the proper memory expansion option switch settings. Operating Characteristics The system board operates at a frequency of 4.77 MHz, which results in a clock cycle of 210 ns. Normally four clock cycles are required for a bus cycle so that an 840-ns memory cycle time is achieved. Memory-write and memory-read cycles both take four clock cycles, or 840 ns. General specifications for memory used on all cards are: 16K by 1 Bit 32K by 1 Bit 64K by 1 Bit Access 250 ns 250 ns 200 ns Cycle 410 ns 410 ns 345 ns Memory Module Description Both the 32K and the 64K options contain 18 dynamic memory modules. The 32K memory expansion option utilizes 16K by 1 bit modules, and the 64K memory expansion option utilizes 32K by 1 bit modules. The 64/256K option has four banks of 9 pluggable sockets. Each bank will accept a 64K memory module kit, consisting of 9 (64K by 1) modules. The kits must be installed sequentially into banks 1, 2, and 3. The base 64/256K option comes with modules installed in bank 0, providing 64K of memory. One, two, or three 64K bits may be added, upgrading the option to 128K, 192K, or 256K of memory. 1-198 Memory Expansion Options The 16K by 1 and the 32K by 1 modules require three voltage levels: +5 Vdc, -5 Vdc, and + 12 Vdc. The 64K by 1 modules require only one voltage level of + 5 Vdc. All three memory modules require 128 refresh cycles every 2 ns. Absolute maximum access times are: 16K by 1 Bit 32K by 1 Bit 64K by 1 Bit From RAS 250 ns 250 ns 200 ns From CAS 165 ns 165 ns 115 ns 16K by 1 Bit Module 32K by 1 Bit Module 64K by 1 Bit Module Pin (used on 32K option) (used on 64K option) (used on 64/256K option) 1 -5 Vdc -5 Vdc N/C 2 Data In** Data In*' Data In''' 3 -Write -Write -Write 4 -RAS -RAS 0 -RAS 5 AO -RAS 1 AO 6 A2 AO A2 7 A1 A2 A1 8 +12 Vdc A1 +5 Vdc 9 +5 Vdc +12 Vdc A7 10 A5 +5 Vdc A5 11 A4 A5 A4 12 A3 A4 A3 13 A6 A3 A6 14 Data Out*' A6 Data Out'" 15 -CAS Data Out" -CAS 16 17 GND * -CAS 1 -CAS 0 . GND 18 * GND * *16K by 1 and 64K by 1 bit modules have 16 pins. **Data In and Data Out are tied together (three-state bus). **'Data In and Data Out are tied together on Data Bits 0-7 (three-state bus). Memory Module Pin Configuration Memory Expansion Options 1-199 Switch-Configurable Start Address Each card has a small DIP module, that contains eight switches. The switches are used to set the card start address as follows: Number 32K and 64K Options 64/256K Options 1 ON: A 19=0; OFF: A 19=1 ON:A19=0; OFF:A19=1 2 ON: A18=0; OFF: A18=1 ON: A18=0; OFF: A18=1 3 ON: A 17=0; OFF: A 17=1 ON: A17=0; OFF: A17=1 4 ON: A 16=0; OFF: A 16=1 ON: A16=0; OFF: A16=1 5 ON: A 15=0; OFF: A 15=1 * ON: Select 64K 6 Not used ON Select 128K 7 Not used ON: Select 192K 8 Used only in 64K RAM Card* ON: Select 256K *Switch 8 may be set on the 64K memory expansion option to use only half the memory on the card (that is, 32K). If switch 8 is on, all 64K is accessible. If switch 8 is off, address bit A 15 (as set by switch 5) is used to determine which 32K are accessible, and the 64K option behaves as a 32K option. DIP Module Start Address Memory Option Switch Settings Switch settings for all memory expansion options are located in "Appendix G: Switch Settings." 1-200 Memory Expansion Options The following method can be used to determine the switch settings for the 32K memory expansion option. Starting Address = xxxK =Decimal value 32K IxxxK Convert decimal value to binary Bit ....... .4 3 2 0 Bit value ... 16 8 4 2 1 Switch I;' , ,. )0001 bit .....- - - - 0 .....- - - - - - 2 (off = logical 1) L..-------3 L.-._ _ _ _ _ _ _ 4 The following method can be used to determine the switch settings for the 64K memory expansion option. Starting Address = xxxK =Decimal value 64K IxxxK Convert decimal value to binary Bit ........ 3 2 1 0 Bit value ... 8 4 2 1 Switch bit '------0 ' - - - - - - - - - 2 (off = logical 1) L.-._ _ _ _ _ _ _ 3 Memory Expansion Options 1-201 The following method can be used to determine the switch settings for the 64/256K memory expansion option. Starting Address = xxxK =Decimal value 64K /xxxK Convert decimal value to binary Bit ........ 3 2 1 0 Bit value ... 8 4 2 1 Switch Amount of memory installed on option ~--256K ' - - - - - 192K (on = logical 1) ~----128K 64K bit '-------0 L..._ _ _ _ _ _ _ 2 (off = logical 1) ~-------3 1-202 Memory Expansion Options IBM Game Control Adapter The game control adapter allows up to four paddles or two joy sticks to be attached to the system. This card fits into one of the system board's or expansion board's expansion slots. The game control interface cable attaches to the rear of the adapter. In addition, four inputs for switches are provided. Paddle and joy stick positions are determined by changing resistive values sent to the adapter. The adapter plus system software converts the present resistive value to a relative paddle or joy stick position. On receipt of an output signal, four timing circuits are started. By determining the time required for the circuit to time-out (a function of the resistance), the paddle position can be determined. This adapter could be used as a general purpose I/O card with four analog (resistive) inputs plus four digital input points. A9-A o I 10 '\/ .. -.. AEN .. r Instruction Decode Convert Resistance Digital A K.... Resistive Input 4 I 10W .... Pulse 10R .. r - r--- f4- Typical Frequency 833 Hz 07-00 A Data Bus A .... 8 Buffer/ Driver K. 4 Digital Inputs V'- r-... 4 I • ' ... Game Control Adapter Block Diagram Game Control Adapter 1-203 Functional Description Address Decode The select on the game control adapter is generated by two 74LS138s as an address decoder. AEN must be inactive while the address is hex 201 in order to generate the select. The select allows a write to fire the one-shots or read to give the values of the trigger buttons and one-shot outputs. Data Bus Buffer/Driver The data bus is buffered by a 74LS244 buffer/driver. For an In from address hex 201, the game control adapter will drive the data bus; at all other times, the buffer is left in the high impedance state. Trigger Buttons The trigger button inputs are read by an In from address hex 201. A trigger button is on each joy stick or paddle. These values are seen on data bits 7 through 4. These buttons default to an open state and are read as 1. When a button is pressed, it is read as O. Software should be aware that these buttons are not debounced in hardware. Joy Stick Positions The joy stick position is indicated by a potentiometer for each coordinate. Each potentiometer has a range from 0 to 100 k-ohms that varies the time constant for each of the four one-shots. As this time constant is set at different values, the output of the one-shot will be of varying durations. All four one-shots are fired at once by an Out to address hex 201. All four one-shot outputs will go true after the fire pulse and will remain high for varying times depending on where each potentiometer is set. These four one-shot outputs are read by an In from address hex 201 and are seen on data bits 3 through O. 1-204 Game Control Adapter I/O Channel Description A9-AO: Address lines 9 through 0 are used to address the game control adapter. D7-DO: Data lines 7 through 0 are the data bus. IOR,IOW: I/O read and I/O write are used when reading from or writing to an adapter (In, Out). AEN: When active, the adapter must be inactive and the data bus driver inactive. +5 Vdc: Power for the game control adapter. GND: Common ground. AI9-AlO: Unused. MEMR,MEMW: Unused. DACKO-DACK3: Unused. IRQ7-IRQ2: Unused. DRQ3-DRQ1: Unused. ALE, TIC: Unused. CLK,OSC: Unused. I/O CHCK: Unused. I/O CHRDY: Unused. RESETDRV: Unused. -5 Vdc, + 12 Vdc, -12 Vdc: Unused. Game Control Adapter 1-205 Interface Description The game control adapter has eight input lines, four of which are digital inputs and 4 of which are resistive inputs. The inputs are read with one In from address hex 201. The four digital inputs each have a 1 k-ohm pullup resistor to +5 Vdc. With no drives on these inputs, a 1 is read. For a 0 reading, the inputs must be pulled to ground. The four resistive pullups, measured to +5 Vdc, will be converted to a digital pulse with a duration proportional to the resistive load, according to the following equation: Time = 24.2 fLsec + 0.011 (r) fLsec The user must first begin the conversation by an Out to address hex 201. An In from address hex 201 will show the digital pulse go high and remain high for the duration according to the resistance value. All four bits (bit 3-bit 0) function in the same manner; their digital pulse will all go high simultaneously and will reset independently according to the input resistance value. Bit 7 Bit 6 I Bit 5 I Bit 4 Bit 3 Bit 2 I Bit 1 I Bit a Digital Inputs Resistive Inputs The typical input to the game control adapter is a set of joy sticks or game paddles. The joy sticks will typically be a set of two (A and B). These will have one or two buttons each with two variable resistances each, with a range from 0 to 100 k-ohms. One variable resistance will indicate the X-coordinate and the other variable resistance will indicate the Y-coordinate. This should be attached to give the following input data: Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit a B-#2 B-#1 A-#2 A-#1 B-Y B-X A-Y A-X Button Button Button Button Coordinate Coordinate Coordinate Coordinate 1-206 Game Control Adapter The game paddles will have a set of two (A and B) or four (A, B, C, and D) paddles. These will have one button each and one variable resistance each, with a range of a to 100 k-ohms. This should be attached to give the following input data: Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 D C B A D C B A Button Button Button Button Coordinate Coordinate Coordinate Coordinate Refer to "Joy Stick Schematic Diagram" for attaching game controllers. 15-Pin Male D-Shell Connector -- ----, , Joy Sticl< B Joy Stick A ,---- - - - - - - - ----, .... r---------------. I /- X-Coordinate X-Coordinate I 9 I. J r-Button J V -Coordinate , 112 5 • V -Coordinate I I. 6 I 1 13 • I I '. 114 7 ,I , , I I I. • I 8 L _____________ JI 115 \ • IL _____________ .J '-- -----"." Note: Potentiometer for X- and V-Coordinates has a range of 0 to 100 k-ohms. Button is normally open; closed when pressed. Joy Stick Schematic Diagram Game Control Adapter 1-207 Rear Panel 15-Pin D-Shell Connector o 9 • 5 o At Standard TTL Levels Adapter Voltage Pin No. +5Vdc 1 Button 4 2 Position 0 3 Ground 4 Ground 5 Position 1 6 Button 5 7 External Game Co ntrol +5Vdc 8 Devices Adapter +5Vdc 9 Button 6 10 Position 2 11 Ground 12 Position 3 13 Button 7 14 +5Vdc 15 Connector Specifications 1-208 Game Control Adapter IBM Prototype Card The prototype card is 4.2 inches (106.7 millimeters) high by 13.2 inches (335.3 millimeters) long and plugs into an expansion unit or system unit expansion slot. All system control signals and voltage requirements are provided through a 2 by 31 position card-edge tab. The card contains a voltage bus (+ 5 Vdc) and a ground bus (0 Vdc). Each bus borders the card, with the voltage bus on the back (pin side) and the ground bus on the front (component side). A system interface design is also provided on the prototype card. The prototype card can also accommodate a D-shell connector if it is needed. The connector size can range from a 9 to a 37 position connector. Note: Install all components on the component side of the prototype card. The total width of the card including components should not exceed 0.500 inch (12.7 millimeters). If these specifications are not met, components on the prototype card may touch other cards plugged into adjacent slots. Prototype Card 1-209 Bit 0-7 Data Bus 8 E1 Data Bus E3 8 E4 ~---I-J E6 Bus Direction Buffer Buffered l Data Bus E1 0 Transceiver 1/0 ReadlWrite Memory ReadlWrite Spare-E18 Address Bit 0 Buffered Address Address Bit 2 lines Address Bit 3 E2 Address Bit 9 Address E5 Buffer 6 Address Enable 1---1------11/0 Address ~a-~ E11 ~+-----fDecode Logic -1/0 Decode (Hex 300 - 31 F Inclusive) Prototype Card Block Diagram 1-210 Prototype Card I/O Channel Interface The prototype card has two layers screened onto it (one on the front and one on the back). It also has 3,909 plated through-holes that are 0.040 inch (10.1 millimeters) in size and have a 0.060 inch (1.52 millimeters) pad, which is located on a 0.10 inch (2.54 millimeters) grid. There are 37 plated through-holes that are 0.048 inch (1.22 millimeters) in size. These holes are located at the rear of the card (viewed as if installed in the machine). These 37 holes are used for a 9 to 37 position D-shell connector. The card also has 5 holes that are 0.125 inch (3.18 millimeters) in size. One hold is located just above the two rows of D-shell connector holes, and the other four are located in the corners of the board (one in each corner). Prototype Card Layout The component side has the ground bus [0.05 inch (1.27 millimeters) wide] screened on it and card-edge tabs that are labeled Al through A31. 2~l D-Shell Connector Pin Positions ! Card-Edge Tabs Hole for Option Retaining Bracket Component Side Prototype Card 1-211 The component side also has a silk screen printed on it that is used as a component guide for the I/O interface. Component Side The pin side has a +5 Vdc bus [0.05 inch (1.27 millimeters) wide] screened onto it and card-edge tabs that are labeled B 1 through B31. Hole for Option +5 Vdc Bus Retaining Bracket D-Shell Connector Pin Positions Hole for Option Card-Edge Tabs Retaining Bracket Pin Side 1-212 Prototype Card Each card-edged tab is connected to a plated through-hole by a 0.012-inch (0.3-millimeter) land. There are three ground tabs connected to the ground bus by three 0.0 12-inch (0.3 millimeter) lands. Also, there are two +5 Vdc tabs connected to the voltage bus by two 0.012-inch (0.3 millimeter) lands. For additional interfacing information, refer to "I/O Channel Description" and "I/O Channel Diagram" in this manual. Also, the "Prototype Card Interface Logic Diagram" is in Appendix D of this manual. If the recommended interface logic is used, the list of TTL type numbers listed below will help you select the necessary components. Component TTL Number Description U1 74LS245 Octal Bus Transceiver U2,U5 74LS244 Octal Buffers Line Driver/Line Receivers U4 74LS04 Hex Inverters U3 74LS08 Quadruple 2 - Input Positive - AND Gate U6 74LS02 Quadruple 2 - Input Positive - NOR Gate U7 74LS21 Dual 4 - Input Positive - AND Gate C1 10.0 /iF Tantalum Capacitor C2,C3,C4 0.047 /iF Ceramic Capacitor System Loading and Power Limitations Because of the number of options that may be installed in the system, the I/O bus loading should be limited to one Schottky TTL load. If the interface circuitry on the card is used, then this requirement is met. Refer to the power supply information in this manual for the power limitations to be observed. Prototype Card 1-213 Prototype Card External Interface If a connector is required for the card function, then you should purchase one of the recommended connectors (manufactured by Amp) or equivalent listed below: Connector Size Part Number (Amp) 9-pin D-shell (Male) 205865-1 9-pin D-shell (Female) 205866-1 15-pin D-shell (Male) 205867-1 15-pin D-shell (Female) 205868-1 25-pin D-shell (Male) 205857-1 25-pin D-shell (Female) 205858-1 37-pin D-shell (Male) 205859-1 37-pin D-shell (Female) 205860-1 The following example shows a 15-pin, D-shell, female connector attached to a prototype card. Option Retaining Bracket --- ~ • •• •• 9 • • • •• • • • • 15 8 ~ --- 0 15-Pin D-Shell Female Connector Component Side 1-214 Prototype Card IBM Asynchronous Communications Adapter The asynchronous communications adapter system control signals and voltage requirements are provided through a 2 by 31 position card edge tab. Two jumper modules are provided on the adapter. One jumper module selects either RS-232C or current-loop operation. The other jumper module selects one of two addresses for the adapter, so two adapters may be used in one system. The adapter is fully programmable and supports asynchronous communications only. It will add and remove start bits, stop bits, and parity bits. A programmable baud rate generator allows operation from 50 baud to 9600 baud. Five, six, seven or eight bit characters with 1, 1-1/2, or 2 stop bits are supported. A fully prioritized interrupt system controls transmit, receive, error, line status and data set interrupts. Diagnostic capabilities provide loopback functions of transmit/receive and input/output signals. The heart of the adapter is a INS8250 LSI chip or functional equivalent. Features in addition to those listed above are: • Full double buffering eliminates need for precise synchronization. • Independent receiver clock input. • Modem control functions: clear to send (CTS), request to send (RTS), data set ready (DSR), data terminal ready (DTR), ring indicator (RI), and carrier detect. • False-start bit detection. • Line-break generation and detection. All communications protocol is a function of the system microcode and must be loaded before the adapter is operational. All pacing of the interface and control signal status must be handled by the system software. The following figure is a block diagram of the asynchronous communications adapter. Asynchronous Adapter 1-215 Chip Address Bus Address Select Decode Data Bus Interrupt 8250 4 - - - - - - - . . . : . - - - - - - - 1 Asynchronous Communications t - - - - . ! Element A 25-Pin D-Shell Connector Asynchronous Communications Adapter Block Diagram Modes of Operation The different modes of operation are selected by programming the 8250 asynchronous communications element. This is done by selecting the I/O address (hex 3F8 to 3FF primary, and hex 2F8 to 2FF secondary) and writing data out to the card_ Address bits AO, AI, and A2 select the different registers that define the modes of operation_ Also, the divisor latch access bit (bit 7) of the line control register is used to select certain registers_ 1-216 Asynchronous Adapter 1/0 Decode (in Hex) Primary Alternate Adapter Adapter Register Selected DLAB State 3F8 2F8 TX Buffer DLAB=O (Write) 3F8 2F8 RX Buffer DLAB=O (Read) 3F8 2F8 Divisor Latch LSB DLAB=1 3F9 2F9 Divisor Latch MSB DLAB=1 3F9 2F9 Interrupt Enable Register 3FA 3FA Interrupt Identification Registers 3FB 2FB Line Control Register 3FC 2FC Modem Control Register 3FD 2FD Line Status Register 3FE 2FE Modem Status Register I/O Decodes Hex Address 3FB to 3FF and 2FB to 2FF A9 AS A7 A6 AS A4 A3 A2 A1 AO DLAB Register 1 1/0 1 1 1 1 1 x x x 0 0 0 0 Receive Buffer (read), Transmit Holding Reg. (write) 0 0 1 0 Interrupt Enable 0 1 0 x Interrupt Identification 0 1 1 x Line Control 1 0 0 x Modem Control 1 0 1 x Line Status 1 1 0 x Modem Status 1 1 1 x None 0 0 0 1 Divisor Latch (LSB) 0 0 1 1 Divisor Latch (MSB) Note: Bit 8 will be logical 1 for the adapter designated as primary or a logical 0 for the adapter designated as alternate (as defined by the address jumper module on the adapter). A2, A1 and AO bits are "don't cares" and are used to select the different register of the communications chip. Address Bits Asynchronous Adapter 1-217 Interrupts One interrupt line is provided to the system. This interrupt is IRQ4 for a primary adapter or IRQ 3 for an alternate adapter, and is positive active. To allow the communications card to send interrupts to the system, bit 3 of the modem control register must be set to 1 (high). At this point, any interrupts allowed by the interrupt enable register will cause an interrupt. The data format will be as follows: DO D1 02 D7 Transmit Start Data Marking Bit Data bit 0 is the first bit to be transmitted or received. The adapter automatically inserts the start bit, the correct parity bit if programmed to do so, and the stop bit (1, 1-1/2, or 2 depending on the command in the line-control register). Interface Description The communications adapter provides an EIA RS-232C-like interface. One 25-pin D-shell, male type connector is provided to attach various peripheral devices. In addition, a current loop interface is also located in this same connector. A jumper block is provided to manually select either the voltage interface, or the current loop interface. The current loop interface is provided to attach certain printers provided by IBM that use this particular type of interface. Pin 18 + receive current loop data Pin 25 - receive current loop return Pin 9 + transmit current loop return Pin 11 - transmit current loop data 1-218 Asynchronous Adapter t +5Vdc I Transmit Circuit I 49.9 QIom ~A,!~_m________-.. Pin 9 Tx Data----~vvv- .. Pin 11 +5 Vdc I Receive Circuit OPTO Isolator 5.6 k·Ohm Pin 18 ....- - t -... . - X ) - - - Rx Data Pin 25 +---+-...1 +5Vdc Current Loop Interface The voltage interface is a serial interface. It supports certain data and control signals, as listed below. Pin 2 Transmitted Data Pin 3 Received Data Pin 4 Request to Send Pin 5 Clear to Send Pin 6 Data Set Ready Pin 7 Signal Ground Pin 8 Carrier Detect Pin 20 Data Terminal Ready Pin 22 Ring Indicator The adapter converts these signals to/from TTL levels to EIA voltage levels. These signals are sampled or generated by the communications control chip. These signals can then be sensed by the system software to determine the state of the interface or peripheral device. Asynchronous Adapter 1-219 Voltage Interchange Information Interface Interchange Voltage Binary State Signal Condition Control Function Positive Voltage = Binary (0) = Spacing =On Negative Voltage = Binary (1) = Marking =Off Invalid Levels +15Vdc _ _ _ _ _ _ _ _ _ _ _ _ _ On Function +3Vdc _ _ _ _ _ _ _ _ _ _ _ _ _ OVdc Invalid Levels -3Vdc _ _ _ _ _ _ _ _ _ _ _ _ _ Off Function -15Vdc _ _ _ _ _ _ _ _ _ _ _ _ Invalid Levels The signal will be considered in the "marking" condition when the voltage on the interchange circuit, measured at the interface point, is more negative than - 3 Vdc with respect to signal ground. The signal will be considered in the "spacing" condition when the voltage is more positive than +3 Vdc with respect to signal ground. The region between +3 Vdc and -3 Vdc is defined as the transition region, and considered an invalid level. The voltage that is more negative than -15 Vdc or more positive than + 15 Vdc will also be considered an invalid level. During the transmission of data, the "marking" condition will be used to denote the binary state" 1" and "spacing" condition will be used to denote the binary state "0." For interface control circuits, the function is "on" when the voltage is more positive than +3 Vdc with respect to signal ground and is "off" when the voltage is more negative than -3 Vdc with respect to signal ground. 1- 220 Asynchronous Adapter INS8250 Functional Pin Description The following describes the function of all INS8250 input/output pins. Some of these descriptions reference internal circuits. Note: In the following descriptions, a low represents a logical 0 (0 Vdc nominal) and a high represents a logical 1 (+ 2.4 Vdc nominal). Input Signals Chip Select (CSO, CSl, CS2), Pins 12-14: When CSO and CSI are high and CS2 is low, the chip is selected. Chip selection is complete when the decoded chip select signal is latched with an active (low) address strobe (ADS) input. This enables communications between the INS8250 and the processor. Data Input Strobe (DISTR, DISTR) Pins 22 and 21: When DISTR is high or DISTR is low while the chip is selected, allows the processor to read status information or data from a selected register of the INS8250. Note: Only an active DISTR or DISTR input is required to transfer data from the INS8250 during a read operation. Therefore, tie either the DISTR input permanently low or the DISTR input permanently high, if not used. Data Output Strobe (DOSTR, DOSTR), Pins 19 and 18: When DOSTR is high or DOSTR is low while the chip is selected, allows the processor to write data or control words into a selected register of the INS8250. Note: Only an active DOSTR or DOSTR input is required to transfer data to the INS8250 during a write operation. Therefore, tie either the DOSTR input permanently low or the DOSTR input permanently high, if not used. Address Strobe (ADS), Pin 25: When low, provides latching for the register select (AO, AI, A2) and chip select (CSO, CSI, CS2) signals. Asynchronous Adapter 1-221 Note: An active ADS input is required when the register select (AO, AI, A2) signals are not stable for the duration of a read or write operation. If not required, tie the ADS input permanently low. Register Select (AO, AI, A2), Pins 26-28: These three inputs are used during a read or write operation to select an INS8250 register to read from or write to as indicated in the table below. Note that the state of the divisor latch access bit (DLAB), which is the most significant bit of the line control register, affects the selection of certain INS8250 registers. The DLAB must be set high by the system software to access the baud generator divisor latches. DLAB A2 A1 AO Register a a a a Receiver Buffer (Read), Transmitter Holding Register (Write) a a a 1 Interrupt Enable X a 1 a Interrupt Identification (Read Only) X a 1 1 Li ne Control X 1 a a Modem Control X 1 a 1 Line Status X 1 1 a Modem Status X 1 1 1 None 1 a a a Divisor Latch (Least Significant Bit) 1 a a 1 Divisor Latch (Most Significant Bit) Master Reset (MR), Pin 35: When high, clears all the registers (except the receiver buffer, transmitter holding, and divisor latches), and the control logic of the INS8250. Also, the state of various output signals (SOUT, INTRPT, OUT 1, OUT 2, RTS, DTR) are affected by an active MR input. Refer to the "Asynchronous Communications Reset Functions" table. Receiver Clock (RCLK), Pin 9: This input is the 16 x baud rate clock for the receiver section of the chip. Serial Input (SIN), Pin 10: Serial data input from the communications link (peripheral device, modem, or data set). 1-222 Asynchronous Adapter Clear to Send (CTS), Pin 36: The CTS signal is a modem control function input whose condition can be tested by the processor by reading bit 4 (CTS) of the modem status register. Bit o (DCTS) of the modem status register indicates whether the CTS input has changed state since the previous reading of the modem status register. Note: Whenever the CTS bit of the modem status register changes state, an interrupt is generated if the modem status interrupt is enabled. Data Set Ready (DSR), Pin 37: When low, indicates that the modem or data set is ready to establish the communications link and transfer data with the INS8250. The DSR signal is a modem-control function input whose condition can be tested by the processor by reading bit 5 (DSR) of the modem status register. Bit 1 (DDSR) of the modem status register indicates whether the DSR input has changed since the previous reading of the modem status register. Note: Whenever the DSR bit ofthe modem status register changes state, an interrupt is generated if the modem status interrupt is enabled. Received Line Signal Detect (RLSD), Pin 38: When low, indicates that the data carrier had been detected by the modem or data set. The RLSD signal is a modem-control function input whose condition can be tested by the processor by reading bit 7 (RLSD) of the modem status register. Bit 3 (DRLSD) of the modem status register indicates whether the RLSD input has changed state since the previous reading of the modem status register. Note: Whenever the RLSD bit of the modem status register changes state, an interrupt is generated if the modem status interrupt is enabled. Asynchronous Adapter 1-223 Ring Indicator (RI), Pin 39: When low, indicates that a telephone ringing signal has been received by the modem or data set. The RI signal is a modem-control function input whose conditon can be tested by the processor by reading bit 6 (RI) of the modem status register. Bit 2 (TERI) of the modem status register indicates whether the RI input has changed from a low to high state since the previous reading of the modem status register. Note: Whenever the RI bit of the modem status register changes from a high to a low state, an interrupt is generated if the modem status register interrupt is enabled. VCC, Pin 40: +5 Vdc supply. VSS, Pin 20: Ground (0 Vdc) reference. Output Signals Data Terminal Ready (DTR), Pin 33: When low, informs the modem or data set that the INS8250 is ready to communicate. The DTR output signal can be set to an active low by programming bit 0 (DTR) of the modem control register to a high level. The DTR signal is set high upon a master reset operation. Request to Send (RTS), Pin 32: When low, informs the modem or data set that the INS8250 is ready to transmit data. The RTS output signal can be set to an active low by programming bit 1 (RTS) of the modem control register. The RTS signal is set high upon a master reset operation. Output 1 (OUT 1), Pin 34: User-designated output that can be set to an active low by programming bit 2 (OUT 1) of the modem control register to a high level. The OUT 1 signal is set high upon a master reset operation. Output 2 (OUT 2), Pin 31: User-designated output that can be set to an active low by programming bit 3 (OUT 2) of the modem control register to a high level. The OUT 2 signal is set high upon a master reset operation. 1-224 Asynchronous Adapter Chip Select Out (CSOUT), Pin 24: When high, indicates that the chip has been selected by active CSO, CSl, and CS2 inputs. No data transfer can be initiated until the CSOUT signal is a logical 1. Driver Disable (DDIS), Pin 23: Goes low whenever the processor is reading data from the INS8250. A high-level DDIS output can be used to disable an external transceiver (if used between the processor and INS8250 on the D7-DO data bus) at all times, except when the processor is reading data. Baud Out (BAUDOUT), Pin 15: 16 x clock signal for the transmitter section of the INS8250. The clock rate is equal to the main reference oscillator frequency divided by the specified divisor in the baud generator divisor latches. The BAUDOUT may also be used for the receiver section by typing this output to the RCLK input of the chip. Interrupt (INTRPT), Pin 30: Goes high whenever anyone of the following interrupt types has an active high condition and is enabled through the IER: receiver error flag, received data available, transmitter holding register empty, or modem status. The INTRPT signal is reset low upon the appropriate interrupt service or a master reset operation. Serial Output (SOUT), Pin 11: Composite serial data output to the communications link (peripheral, modem, or data set). The SOUT signal is set to the marking (logical 1) state upon a master reset operation. Input/Output Signals Data Bus (D7-DO), Pins 1-8: This bus comprises eight tri-state input/output lines. The bus provides bidirectional communications between the INS8250 and the processor. Data, control words, and status information are transferred through the D7-DO data bus. External Clock Input/Output (XTALl, XTAL2), Pins 16 and 17: These two pins connect the main timing reference (crystal or signal clock) to the INS8250. Asynchronous Adapter 1-225 Programming Considerations The INS8250 has a number of accessible registers. The system programmer may access or control any of the INS8250 registers through the processor. These registers are used to control INS8250 operations and to transmit and receive data. A table listing and description of the accessible registers follows. RegisterISignal Reset Control Reset State Interrupt Enable Register Master Reset All Bits Low (0-3 Forced and 4-7 Perma nent) Interrupt Identification Master Reset Bit 0 is High, Bits 1 and 2 Low Register Bits 3- 7 are Permanently Low Line Control Register Master Reset All Bits Low Modem Control Register Master Reset All Bits Low Line Status Register Master Reset Except Bits 5 and 6 are High Modem Status Register Master Reset Bits 0-3 Low Bits 4- 7 - Input Signal SOUT Master Reset High INTRPT (RCVR Errors) Read LSR/MR Low INTRPT (RCVR Data Ready) Read RBR/MR Low INTRPT (RCVR Data Ready) Read IIRI Low Write THR/MR INTRPT (Modem Status Read MSR/MR Low Changes) OUT2 Master Reset High RTS Master Reset High DTR Master Reset High OUT 1 Master Reset High Asynchronous Communications Reset Functions 1-226 Asynchronous Adapter Line-Control Register The system programmer specifies the format of the asynchronous data communications exchange through the line-control register. In addition to controlling the format, the programmer may retrieve the contents of the line-control register for inspection. This feature simplifies system programming and eliminates the need for separate storage in system memory of the line characteristics. The contents of the line-control register are indicated and described below. I: B~ 7 6 5 4 3 2 1 0 II Woed L,""h 5,1,,, BI, 0 IWL501 Word Length Select Bit 1 (WLS1) Number of Stop Bits (STB) L...-_ _ _ _..... Parity Enable (PEN) '----------l~ Even Parity Select (EPS) L...-_ _ _ _ _ _ _..... Stick Parity L...-_ _ _ _ _ _ _ _ _ ~ Set Break ' - - - - - - - - - - - - - Divisor Latch Access Bit (DLAB) Line-Control Register (LCR) Bits 0 and 1: These two bits specify the number of bits in each transmitted or received serial character. The encoding of bits 0 and 1 is as follows: Bit 1 BitO Word Length 0 0 5 Bits 0 1 6 Bits 1 0 7 Bits 1 1 8 Bits Asynchronous Adapter 1-227 Bit 2: This bit specifies the number of stop bits in each transmitted or received serial character. If bit 2 is a logical 0, one stop bit is generated or checked in the transmit or receive data, respectively. If bit 2 is logical 1 when a 5-bit word length is selected through bits 0 and I, 1-1/2 stop bits are generated or checked. If bit 2 is logical 1 when either a 6-, 7-, or 8-bit word length is selected, two stop bits are generated or checked. Bit 3: This bit is the parity enable bit. When bit 3 is a logical 1, a parity bit is generated (transmit data) or checked (receive data) between the last data word bit and stop bit of the serial data. (The parity bit is used to produce an even or odd number of 1 's when the data word bits and the parity bit are summed.) Bit 4: This bit is the even parity select bit. When bit 3 is a logical 1 and bit 4 is a logical 0, an odd number of logical 1's is transmitted or checked in the data word bits and parity bit. When bit 3 is a logical 1 and bit 4 is a logical 1, an even number of bits is transmitted or checked. Bit 5: This bit is the stick parity bit. When bit 3 is a logical 1 and bit 5 is a logical 1, the parity bit is transmitted and then detected by the receiver as a logical 0 if bit 4 is a logical 1, or as a logical 1 if bit 4 is a logical O. Bit 6: This bit is the set break control bit. When bit 6 is a logical 1, the serial output (SOUT) is forced to the spacing (logical 0) state and remains there regardless of other transmitter activity. The set break is disabled by setting bit 6 to a logical O. This feature enables the processor to alert a terminal in a computer communications system. Bit 7: This bit is the divisor latch access bit (DLAB). It must be set high (logical 1) to access the divisor latches of the baud rate generator during a read or write operation. It must be set low (logical 0) to access the receiver buffer, the transmitter holding register, or the interrupt enable register. 1-228 Asynchronous Adapter Programmable Baud Rate Generator The INS8250 contains a programmable baud rate generator that is capable of taking the clock input (1.8432 MHz) and dividing it by any divisor from 1 to (2 16-1). The output frequency of the baud generator is 16 x the baud rate [divisor # = (frequency input)/(baud rate x 16)]. Two 8-bit latches store the divisor in a 16-bit binary format. These divisor latches must be loaded during initialization in order to ensure desired operation of the baud rate generator. Upon loading either of the divisor latches, a 16-bit baud counter is immediately loaded. This prevents long counts on initial load. Hex Address 3F8 DLAB = 1 Bit 7 6 5 4 3 2 o 1_: I IL--=: 1..-_ _ _ _ _ _ _ _ B;10 Bit1 Bit 2 Bit 3 L -_ _ _ _ _ _ _ _ ~ Bit 4 1..-_ _ _ _ _ _ _ _ _ _. . . Bit 5 '--------------~ Bit 6 L -_ _ _ _ _ _ _ _ _ _ _ _ _ _ ~ Bit 7 Divisor Latch Least Significant Bit (DLL) Asynchronous Adapter 1·229 Hex Address 3F9 DLAB = 1 Bit 7 6 5 4 3 2 o Bit 8 Bit 9 Bit 10 1..-_________ Bit 11 Bit 12 1..------------_... Bit 13 ' - - - - - - - - - - - - - - - _ Bit 14 ' - - - - - - - - - - - - - - - - - - Bit 15 Divisor Latch Most Significant Bit (DLM) The following figure illustrates the use of the baud rate generator with a frequency of 1.8432 MHz. For baud rates of 9600 and below, the error obtained is minimal. Note: The maximum operating frequency of the baud generator is 3.1 MHz. In no case should the data rate be greater than 9600 baud. Desired Divisor Used Percent Error Baud to Generate Difference Between Rate 16x Clock Desired and Actual (Decimal) (Hex) 50 2304 900 - 75 1536 600 - 110 1047 417 0.026 134.5 857 359 0.058 150 768 300 - 300 384 180 - 600 192 OCO - 1200 96 060 - 1800 64 040 - 2000 58 03A 0.69 2400 48 030 - 3600 32 020 - 4800 24 018 - 7200 16 010 - 9600 12 OOC - Baud Rate at 1.843 MHz 1-230 Asynchronous Adapter Line Status Register This 8-bit register provides status information on the processor concerning the data transfer. The contents of the line status register are indicated and described below: Hex Address 3FD I: Bit 7 6 5 4 3 2 o I I D,," R"dy (DR) Overrun Error (OR) Parity Error (PE) ' - - - - - - - - Framing Error (FE) L.-_ _ _ _ _ _ _ _~ Break Interrupt (BI) L--_ _ _ _ _ _ _ _ _ _. . Transmitter Holding Register Empty (THRE) '--------------~ Tx Shift Register Empty (TSRE) ' - - - - - - - - - - - - - - - -. . =0 Line Status Register (LSR) Bit 0: This bit is the receiver data ready (DR) indicator. Bit 0 is set to a logical 1 whenever a complete incoming character has been received and transferred into the receiver buffer register. Bit o may be reset to a logical 0 either by the processor reading the data in the receiver buffer register or by writing a logical 0 into it from the processor. Bit 1: This bit is the overrun error (OE) indicator. Bit 1 indicates that data in the reciever buffer register was not read by the processor before the next character was transferred into the receiver buffer register, thereby destroying the previous character. The OE indicator is reset whenever the processor reads the contents of the line status register. Bit 2: This bit is the parity error (PE) indicator. Bit 2 indicates that the received data character does not have the correct even or odd parity, as selected by the even parity-select bit. The PE bit is set to a logical 1 upon detection of a parity error and is reset to a logical 0 whenever the processor reads the contents of the line status register. Asynchronous Adapter 1-231 Bit 3: This bit is the framing error (FE) indicator. Bit 3 indicates that the received character did not have a valid stop bit. Bit 3 is set to a logical 1 whenever the stop bit following the last data bit or parity is detected as a zero bit (spacing level). Bit 4: This bit is the break interrupt (BI) indicator. Bit 4 is set to a logical 1 whenever the received data input is held in the spacing (logical 0) state for longer than a full word transmission time (that is, the total time of start bit + data bits + parity +stop bits). Note: Bits 1 through 4 are the error conditions that produce a receiver line status interrupt whenever any of the corresponding conditions are detected. Bit 5: This bit is the transmitter holding register empty (THRE) indicator. Bit 5 indicates that the INS8250 is ready to accept a new character for transmission. In addition, this bit causes the INS8250 to issue an interrupt to the processor when the transmit holding register empty interrupt enable is set high. The THRE bit is set to a logical 1 when a character is transferred from the transmitter holding register into the transmitter shift register. The bit is reset to logical 0 concurrently with the loading of the transmitter holding register by the processor. Bit 6: This bit is the transmitter shift register empty (TSRE) indicator. Bit 6 is set to a logical 1 whenever the transmitter shift register is idle. It is reset to logical 0 upon a data transfer from the transmitter holding register to the transmitter shift register. Bit 6 is a read-only bit. Bit 7: This bit is permanently set to logical O. Interrupt Identification Register The INS8250 has an on-chip interrupt capability that allows for complete flexibility in interfacing to all the popular microprocessors presently available. In order to provide minimum software overhead during data character transfers, the INS8250 prioritizes interrupts into four levels: receiver line status (priority 1), received data ready (priority 2), transmitter holding register empty (priority 3), and modem status (priority 4). 1-232 Asynchronous Adapter Information indicating that a prioritized interrupt is pending and the type of prioritized interrupt is stored in the interrupt identification register. Refer to the "Interrupt Control Functions" table. The interrupt identification register (IIR), when addressed during chip-select time, freezes the highest priority interrupt pending, and no other interrupts are acknowledged until that particular interrupt is serviced by the processor. The contents of the IIR are indicated and described below. Hex Address 3FA Bit 7 6 5 432 o II I~\ 0 '""""p""d,,"If Interrupt 10 Bit (0) Interrupt 10 Bit (1 ) =0 '---------- = 0 '-----------~ = 0 L--_ _ _ _ _ _ _ _.._. = 0 L..-_ _ _ _ _ _ _ _ _ _.._. = 0 Interrupt Identification Register (/I R) Bit 0: This bit can be used in either a hard-wired prioritized or polled environment to indicate whether an interrupt is pending and the IIR contents may be used as a pointer to the appropriate interrupt service routine When bit 0 is a logical 1, no interrupt is pending and polling (if used) is continued. Bits 1 and 2: These two bits of the IIR are used to identify the highest priority interrupt pending as indicated in the "Interrupt Control Functions" table. Bits 3 through 7: These five bits of the IIR are always logical O. Asynchronous Adapter 1-233 Interrupt 10 Register Interrupt Set and Reset Functions Priority Interrupt Interrupt Interrupt Bit 2 Bit 1 BitO Level Type Source Reset Control 0 0 1 None None - 1 1 0 Highest Receiver Overrun Error Reading the Line Status or Line Status Parity Error Register or Framing Error or Break Interrupt 1 0 0 Second Received Receiver Reading the Data Available Data Available Receiver Buffer Register 0 1 0 Third Transmitter Transmitter Reading the IIR Holding Holding Register (if Register Register source of Empty Empty interrupt) or Writing into the Transmitter Holding Register 0 0 0 Fourth Modem Clear to Send Reading the Status or Modem Status Data Set Ready Register or Ring Indicator or Received Line Signal Direct Interrupt Control Functions 1-234 Asynchronous Adapter Interrupt Enable Register This eight-bit register enables the four types of interrupt of the INS8250 to separately activate the chip interrupt (INTRPT) output signal. It is possible to totally disable the interrupt system by resetting bits 0 through 3 of the interrupt enable register. Similarly, by setting the appropriate bits of this register to a logical 1, selected interrupts can be enabled. Disabling the interrupt system inhibits the interrupt identification register and the active (high) INTRPT output from the chip. All other system functions operate in their normal manner, including the setting of the line status and modem status registers. The contents of the interrupt enable register are indicated and described below: Hex Address 3F9 DLAB = 0 o L: ~ Bit 7 6 5 4 3 2 I 1 '''hi' D", Ava ilable Interrupt 1 = Enable Tx Holding Register Empty Interrupt 1..-___ 1 = Enable Receive line Status Interrupt L..-_ _ _ _~ 1 = Enable Modem Status Interrupt 1..------- == 00 L..-_ _ _ _ _ _ _. . . L -_ _ _ _ _ _ _ _ _ = 0 L..-_ _ _ _ _ _ _ _ _ _ _ = 0 Interrupt Enable Register (JERI Bit 0: This bit enables the received data available interrupt when set to logical 1. Bit 1: This bit enables the transmitter holding register empty interrupt when set to logical 1. Bit 2: This bit enables the receiver line status interrupt when set to logical 1. Asynchronous Adapter 1-235 Bit 3: This bit enables the modem status interrupt when set to logical 1. Bits 4 through 7: These four bits are always logical O. Modem Control Register This eight-bit register controls the interface with the modem or data set (or peripheral device emulating a modem). The contents of the modem control register are indicated and described below: Hex Address 3FC Bit 76543 2 o II I L~ D""eem'",' ""dy(DTR( Request to Send (RTS) Out 1 Out 2 ' - - - - - - - - Loop '---------~ = 0 L...-_ _ _ _ _ _ _ _ _ = 0 '------------~ = 0 Modem Control Register (MCR) Bit 0: This bit controls the data terminal ready (DTR) output. When bit 0 is set to logical 1, the DTR output is forced to a logical O. When bit 0 is reset to a logical 0, the DTR output is forced to a logical 1. Note: The DIR output of the INS8250 may be applied to an EIA inverting line driver (such as the DS1488) to obtain the proper polarity input at the succeeding modem or data set. Bit 1: This bit controls the request to send (RTS) output. Bit 1 affects the RTS output in a manner identical to that described above for bit O. 1-236 Asynchronous Adapter Bit 2: This bit controls the output 1 (OUT 1) signal, which is an auxiliary user-designated output. Bit 2 affects the OUT 1 output in a manner identical to that described above for bit O. Bit 3: This bit controls the output 2 (OUT 2) signal, which is an auxiliary user-designated output. Bit 3 affects the OUT 2 output in a manner identical to that described above for bit O. Bit 4: This bit provides a loopback feature for diagnostic testing of the INS8250. When bit 4 is set to logical 1, the following occurs: the transmitter serial output (SOUT) is set to the marking (logical 1) state; the receiver serial input (SIN) is disconnected; the output of the transmitter shift register is "looped back" into the receiver shift register input; the four modem control inputs (CTS, DRS, RLSD, and RI) are disconnected; and the four modem control outputs (DTR, RTS, OUT I, and OUT 2) are internally connected to the four modem control inputs. In the diagnostic mode, data that is transmitted is immediately received. This feature allows the processor to verify the transmit- and receive-data paths of the INS8250. In the diagnostic mode, the receiver and transmitter interrupts are fully operational. The modem control interrupts are also operational but the interrupts' sources are now the lower four bits of the modem control register instead of the four modem control inputs. The interrupts are still controlled by the interrupt enable register. The INS8250 interrupt system can be tested by writing into the lower four bits of the modem status register. Setting any of these bits to a logical 1 generates the appropriate interrupt (if enabled). The resetting of these interrupts is the same as in normal INS8250 operation. To return to normal operation, the registers must be reprogrammed for normal operation and then bit 4 of the modem control register must be reset to logical O. Bits 5 through 7: These bits are permanently set to logical O. Asynchronous Adapter 1-237 Modem Status Register This eight-bit register provides the current state of the control lines from the modem (or peripheral device) to the processor. In addition to this current-state information, four bits of the modem status register provide change information. These bits are set to a logical 1 whenever a control input from the modem changes state. They are reset to logical 0 whenever the processor reads the modem status register. The content of the modem status register are indicated and described below: Hex Address 3FE Bit 7 6 5 432 a I Ii: 0"" c,,,"" S'"d(DCTS, Delta Data Set Ready (DDSR) Trailing Edge Ring Indicator (TERI) L..-_ _ _ _ _ _ Delta Rx Line Signal Detect (DRLSD) ' - - - - - - - -... Clear to Send (CTS) ' - - - - - - - - - _ Data Set Ready (DSR) L..-_ _ _ _ _ _ _ _ _ _ Ring Indicator (RI) L..-_ _ _ _ _ _ _ _ _ _ _ Receive Line Signal Detect (RLSD) Modem Status Register (MSR) 1-238 Asynchronous Adapter Bit 0: This bit is the delta clear to send (DCTS) indicator. Bit 0 indicates that the CTS input to the chip has changed state since the last time it was read by the processor. Bit 1: This bit is the delta data set ready (DDSR) indicator. Bit 1 indicates that the DRS input to the chip has changed since the last time it was read by the processor. Bit 2: This bit is the trailing edge of ring indicator (TERI) detector. Bit 2 indicates that the RI input to the chip has changed from an on (logical 1) to an off (logical 0) condition. Bit 3: This bit is the delta received line signal detector (DRLSD) indicator. Bit 3 indicates that the RLSD input to the chip has changed state. Note: Whenever bit 0, 1, 2, or 3 is set to a logical 1, a modem status interrupt is generated. Bit 4: This bit is the complement of the clear to send (CTS) input. If bit 4 (LOOP) of the MCR is set to a logical 1, this is equivalent to RTS in the MCR. Bit 5: This bit is the complement of the data set ready (DSR) input. If bit 4 of the MCR is set to a logical 1, this bit is equivalent to DTR in the MCR. Bit 6: This bit is the complement of the ring indicator (RI) input. If bit 4 of the MCR is set to a logical 1, this bit is equivalent to OUT 1 in the MCR. Bit 7: This bit is the complement of the received line signal detect (RLSD) input. If bit 4 of the MCR is set to a logical 1, this bit is equivalent to OUT 2 of the MCR. Asynchronous Adapter 1-239 Receiver Buffer Register The receiver buffer register contains the received character as defined below: Hex Address 3F8 DLAB = 0 Read Only Bit 7 6 543 2 o ~ I ~ Data BitO ~ DataBitl Data Bit 2 Data Bit 3 1---------1..- Data Bit 4 ' - - - - - - - - -.... Data Bit 5 ' - - - - - - - - - - - - . . . . Data Bit 6 '---------------i..- Data Bit 7 Receiver Buffer Register (RBR) Bit 0 is the least significant bit and is the first bit serially received. 1-240 Asynchronous Adapter Transmitter Holding Register The transmitter holding register contains the character to be serially transmitted and is defined below: Hex Address 3F8 DLAB = a Write Only Bit 7 6 5 432 a I~ ~~: ~:~: ::~~ Data Bit2 Data Bit 3 Data Bit 4 '------------'~ Data Bit 5 ' - - - - - - - - - - - - - Data Bit 6 ' - - - - - - - - - - - - - - Data Bit 7 Transmitter Holding Register (THR) Bit 0 is the least significant bit and is the first bit serially transmitted. Asynchronous Adapter 1-241 Selecting the Interface Format and Adapter Address The voltage or current loop interface and adapter address are selected by plugging the programmed shunt modules with the locator dots up or down. See the figure below for the configurations. Module Position Module Position for Primary Asynchronous for Alternate Asynchronous Adapter Adapter D D o D Asynchronous Com m u n i ca ti 0 n s L1.U.L.U.J.J..Lu;<'l..U..1.L.U.J.J..LL.1..J.Jc.Lf-L.J..U..u.J Adapter Current loop Voltage Interface Interface Dot Up Dot Down 1-242 Asynchronous Adapter Rear Panel 25-Pin D-Shell • 25 • • • • • • • • • • • 4 At Standard RS-232C Levels o (With Exception of Current Loops) Description Pin NC 1 Transmitted Data 2 Received Data 3 Request to Send 4 Clear to Send 5 Data Set Ready 6 Signal Ground 7 Received Line Signal Detector 8 +Transmit Current Loop Data 9 NC 10 -Transmit Current Loop Data 11 NC 12 Asynchr onous External NC 13 Commun ications Device Adapter NC 14 (RS-232 C) NC 15 NC 16 NC 17 +Receive Current Loop Data 18 NC 19 Data Terminal Ready 20 NC 21 Ring Indicator 22 NC 23 NC 24 -Receive Current Loop Return 25 Note: To avoid inducing voltage surges on interchange circuits. signals from interchange circuits shall not be used to drive inductive devices. such as relay coils. Connector Specifications Asynchronous Adapter 1-243 Notes: 1- 244 Asynchronous Adapter Binary Synchronous Communications Adapter The binary synchronous communications (BSC) adapter is a 4-inch high by 7 .5-inch wide card that provides an RS232C-compatible communication interface for the IBM Personal Computer. All system control, voltage, and data signals are provided through a 2- by 3 I-position card-edge tab. External interface is in the form of EIA drivers and receivers connected to an RS232C, standard 25-pin, D-shell connector. The adapter is programmed by communication software to operate in binary synchronous mode. Maximum transmission rate is 9600 bits per second (bps). The heart of the adapter is an Intel 825lA Universal Synchronous/Asynchronous Receiver/Transmitter (USART). An Intel 8255A-5 programmable peripheral interface (PPI) is also used for an expanded modem interface, and an Intel 8253-5 programmable interval timer provides time-outs and generates interrupts. The following is a block diagram of the BSe adapter. TIMER EIA Drivers/ 8253 Receivers - Data Syste m Comm unication Bus Equip ment ' I I i I Data Bus F:z Z '//, rl I I I I Control USART I I I I I I I I I I ~ i8251A I I I I I I I I Address ~ I Programmable I I I I I I - ~l L.J Peripheral L.J Interface --- f---- >-= f-- '--- % " '//,'///); 8255A5 BSC Adapter Block Diagram Bse Adapter 1-245 Functional Description 8251A Universal Synchronous/Asynchronous Receiver/Transmitter The 8251A operational characteristics are programmed by the system unit's software, and it can support virtually any form of synchronous data technique currently in use. In the configuration being described, the 8251A is used for IBM's binary synchronous communications (BSC) protocol in half-duplex mode. Operation of the 8251 A is started by programming the communications format, then entering commands to tell the 8251A what operation is to be performed. In addition, the 8251A can pass device status to the system unit by doing a Status Read operation. The sequence of events to accomplish this are mode instruction, command instruction, and status read. Mode instruction must follow a master reset operation. Commands can be issued in the data block at any time during operation of the 8251A. A block diagram of the 8251A follows: TxD TxRDY TxE TxC RxD RxRDY RxC INTERNAL SYNDET DATA BUS 8251A Block Diagram 1-246 BSC Adapter Data Bus Buffer The system unit's data bus interfaces the 8251A through the data bus buffer. Data is transferred or received by the buffer upon execution of input or output instructions from the system unit. Control words, command words, and status information are also transferred through the data bus buffer. Read/Write Control Logic The read/write control logic controls the transfer of information between the system unit and the 8251A. It consists of pins designated as RESET, CLK, WR, RD, C/D, and CS. RESET: The Reset pin is gated by Port B, bit 4 of the 8255, and performs a master reset of the 8251 A. The minimum reset pulse width is 6 clock cycles. Clock-cycle duration is determined by the oscillator speed of the processor. CLK (Clock): The clock generates internal device timing. No external inputs or outputs are referenced to CLK. The input is the system board's bus clock of 4.77 MHz. WR (Write): An input to WR informs the 8251A that the system unit is writing data or control words to it. The input is the WR signal from the system-unit bus. RD (Read): An input to RD informs the 8251A that the processing unit is reading data or status information from it. The input is the RD signal from the system-unit bus. c/n (Control/Data): An input on this pin, in conjunction with the WR and RD inputs, informs the 8251A that the word on the data bus is either a data character, a control word, or status information. The input is the low-order address bit from the system board's address bus. CS (Chip Select): A low on the input selects the 8251A. No reading or writing will occur unless the device is selected. An input is decoded at the adapter from the address information on the system-unit bus. BSC Adapter 1-247 Modem Control The 8251A has the following input and output control signals which are used to interface the transmission equipment selected by the user. DSR (Data Set Ready): The DSR input port is a general-purpose, I-bit, inverting input port. The 8251 A can test its condition with a Status Read operation. CTS (Clear to Send): A low on this input enables the 8251 A to transfer serial data if the TxEnable bit in the command byte is set to 1. If either a TxEnable off or CTS off condition occurs while the transmitter is in operation, the transmitter will send all the data in the USART that was written prior to the TxDisable command, before shutting down. DTR (Data Terminal Ready): The DTR output port is a general-purpose, I-bit, inverting output port. It can be set low by programming the appropriate bit in the command instruction word. RTS (Request to Send): The RTS output signal is a general-purpose, I-bit, inverting output port. It can be set low by programming the appropriate bit in the Command Instruction word. Transmitter Buffer The transmitter buffer accepts parallel data from the data-bus buffer, converts it to a serial bit stream, and inserts the appropriate characters or bits for the BSC protocol. The output from the transmit buffer is a composite serial stream of data on the falling edge of Transmit Clock. The transmitter will begin transferring data upon being enabled, if CTS = 0 (active). The transmit data (TxD) line will be set in the marking state upon receipt of a master reset, or when transmit enable/CTS is off and the transmitter is empty (TxEmpty). 1-248 BSC Adapter Transmitter Control Transmitter Control manages all activities associated with the transfer of serial data. It accepts and issues the following signals, both externally and internally, to accomplish this function: TxRDY (Transmitter Ready): This output signals the system unit that the transmitter is ready to accept a data character. The TxRDY output pin is used as an interrupt to the system unit (Level 4) and is masked by turning off Transmit Enable. TxRDY is automatically reset by the leading edge of a WR input signal when a data character is loaded from the system unit. TxE (Transmitter Empty): This signal is used only as a status register input. TxC (Transmit Clock): The Transmit Clock controls the rate at which the character is to be transmitted. In synchronous mode, the bit-per-second rate is equal to the TxC frequency. The falling edge of TxC shifts the serial data out of the 8251A. Receiver Buffer The receiver accepts serial data, converts it to parallel format, checks for bits or characters that are unique to the communication technique, and sends an "assembled" character to the system unit. Serial data input is received on the RxD (Receive Data) pin, and is clocked in on the rising edge of RxC (Receive Clock). Receiver Control This control manages all receiver-related activites. The parity-toggle and parity-error flip-flop circuits are used for parity-error detection, and set the corresponding status bit. BSC Adapter 1-249 RxRDY (Receiver Ready): This output indicates that the 8251A has a character that is ready to be received by the system unit. RxRDY is connected to the interrupt structure of the system unit (Interrupt Level 3). With Receive Enable off, RxRDY is masked and held in the reset mode. To set RxRDY, the receiver must be enabled, and a character must finish assembly and be transferred to the data output register. Failure to read the received character from the RxRDY output register before the assembly of the next Rx Data character will set an overrun-condition error, and the previous character will be lost. RxC (Receiver Clock): The receiver clock controls the rate at which the character is to be received. The bit rate is equal to the actual frequency of RxC. SYNDET (Synchronization Detect): This pin is used for synchronization detection and may be used as either input or output, programmable through the control word. It is reset to output-mode-low upon reset. When used as an output (internal synchronization mode), the SYNDET pin will go to 1 to indicate that the 8251A has found the synchronization character in the receive mode. If the 8251 A is programmed to use double synchronization characters (bisynchronization, as in this application), the SYNDET pin will go to 1 in the middle of the last bit of the second synchronization character. SYNDET is automatically reset for a Status Read operation. 8255A-5 Programmable Peripheral Interface The 8255A-5 is used on the BSC adapter to provide an expanded modem interface and for internal gating and control functions. It has three 8-bit ports, which are defined by the system during initialization of the adapter. All levels are considered plus active unless otherwise indicated. A detailed description of the ports is in "Programming Considerations" in this section. 1-250 BSC Adapter 8253-5 Programmable Interval Timer The 8253-5 is driven by a divided-by-two system-clock signal. Its outputs are used as clocking signals and to generate inactivity timeout interrupts. These level 4 interrupts occur when either of the timers reaches its programmed terminal counts. The 8253-5 has the following outputs: Timer 0: Not used for synchronous-mode operation. Timer 1: Connected to port A, bit 7 of the 8255 and Interrupt Level 4. Timer 2: Connected to port A, bit 6 of the 8255 and Interrupt Level 4. Operation The complete functional definition of the BSC adapter is programmed by the system software. Initialization and control words are sent out by the system to initialize the adapter and program the communications format in which it operates. Once programmed, the BSC Adapter is ready to perform its communication functions. Transmit In synchronous transmission, the TxD output is continuously at a mark level until the system sends its first character, which is a synchronization character to the 8251A. When the CTS line goes on, the first character is serially transmitted. All bits are shifted out on the falling edge of TxC. When the 8251A is ready to receive another character from the system for transmission, it raises TxRDY, which causes a level-4 interrupt. BSC Adapter 1-251 Once transmission has started, the data stream at the TxD output must continue at the TxC rate. If the system does not provide the 8251A with a data character before the 8251A transmit buffers become empty, the synchronization characters will be automatically inserted in the TxD data stream. In this case, the TxE bit in the status register is raised high to signal that the 8251A is empty and that synchronization characters are being sent out. (Note that this TxE bit is in the status register, and is not the TxE pin on the 8251A). TxE does not go low when SYNC is being shifted out. The TxE status bit is internally reset by a data character being written to the 8251A. Receive In synchronous reception, the 8251A will achieve character synchronization, because the hardware design of the BSC adapter is intended for internal synchronization. Therefore, the SYNDET pin on the 8251A is not connected to the adapter circuits. For internal synchronization, the Enter Hunt command should be included in the first command instruction word written. Data on the RxD pin is then sampled in on the rising edge of RxC. The content of the RxD buffer is compared at every bit boundary with the first SYNC character until a match occurs. Because the 8251A has been programmed for two synchronization characters (bisynchronization), the next received character is also compared. When both SYNC characters have been detected, the 8251A ends the hunt mode and is in character synchronization. The SYNDET bit in the status register (not the SYNDET pin) is then set high, and is reset automatically by a Status Read. Once synchronization has occurred, the 8251A begins to assemble received data bytes. When a character is assembled and ready to be transferred to memory from the 8251A, it raises RxRDY, causing an interrupt level 3 to the system. If the system has not fetched a pevious character by the time another received character is assembled (and an interrupt-level 3 issued by the adapter), the old character will be overwritten, and the overrun error flag will be raised. All error flags can be reset by an error reset operation. 1-252 BSC Adapter Programming Considerations Before starting data transmission or reception, the BSC adapter is programmed by the system unit to define control and gating ports, timer functions and counts, and the communication environment in which it is to operate. Typical Programming Sequence The 8255A-5 programmable peripheral interface (PPI) is initialized for the proper mode by selecting address hex 3A3 and writing the control word. This defines port A as an input, port B as an output for modern control and gating, and port C for 4-bit input and 4-bit output. The bit descriptions for the 8255A-5 are shown in the following figures. Using an output to port C, the adapter is then set to wrap mode, disallow interrupts, and gate external clocks (address=3A2H, data=ODH). The adapter is now isolated from the communication interface, and initialization continues. Through bit 4 of 8255 Port B, the 8251A reset pin is brought high, held, then dropped. This resets the internal registers of the 8251A. BSC Adapter 1-253 8255 Port A Assignments Address: hex 3AO for BSe Input Port hex 380 for Alternate BSe Bit 7 6543210 III I 1_1~_4.~~: Ei~::~n~n~~~:~~~~~Xr~~ ~~::J~~erface I - : 0 = Clear-to-Send is on from Interface L-_ _ _ _ _ _ _ _Oscillating = Receive Clock Active 1 =TxROY Active L -_ _ _ _ _ _ _ _ _ _ _ _ 1 = Timer 2 Output Active L-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1 = Timer 1 Output Active 8255 Port B Assignments Address: hex 3A 1 for BSe Output Port hex 381 for Alternate BSe Bit 7 6 5 4 3 2 o I I I ~ 0 ~ T"," "" 0,. """,IR.. '0'0"", 0= Turn on Select Standby 0= Turn on Test 1 = Not Used 1 = Reset 8251A L.._ _ _ _ _ _ _ _ _ _ _ 1 = Gate Timer 2 L.._ _ _ _ _ _ _ _ _ _ __._ 1 = Gate Timer 1 L-_ _ _ _ _ _ _ _ _ _ _ _ _ _ 1 = Gate Timers 1 and 2 to Interrupt Level 4 8255 Port e Assignments Address: hex 3A2 for BSe hex 382 for Alternate BSe Bit 7 6 4 3 2 1 0 I L.... I I I __-:_- 1 = Gate Internal Clock IOutput Bit) __ 1 = Gate External Clock IOutput Bit) L . - 1 = Electronic Wrap IOutput Bit) L-_ _ _ _ _ _ 0 = Enable Timer 1 and 2, Interrupt 6 and Receive Interrupt 3 L _ _ _ _ _ _ _ _ _ Oscillating = Receive Data Iinput Bit) I -_ _ _ _ _ _ _ _ ___+_ Oscillating = Timer 0 Output Iinput Bit) L _ _ _ _ _ _ _ _ _ _ _..... 0 = Test Indicate Active IInput Bit) L _ _ _ _ _ _ _ _ _ _ _ _ _ _ 0 = BSC Adapter The 8253-5 programmable interval timer is used in the synchronous mode to provide inactivity time-outs to interrupt the system unit after a preselected period of time has elapsed from the start of a communication operation. Counter 0 is not used for synchronous operation. Counters 1 and 2 are connected to interrupt-level 4, and are programmed to terminal-count values, which will provide the desired time delay before a level-4 interrupt is generated. These interrupts will indicate to the system software that a predetermined period of time has elapsed without a TxRDY (level 4) or RxRDY (level 3) interrupt being sent to the system unit. 1-254 BSC Adapter The modes for each counter are programmed by selecting each timer-register address and writing the correct control word for counter operation to the adapter. The mode for counters 1 and 2 is set to O. The terminal-count values are loaded using control-word bits D4 and D5 to select "load." The 8253-5 Control Word format is shown in the following chart. Control Word Format Address hex 3A7 07 06 05 04 03 02 01 DO I SC1 I sca I I RL1 RLOI M21 Ml I MO I BCO\ Definition of Control SC - Select Counter: SCl SCO a 0 Select Cou nter a 0 1 Select Counter 1 1 a Select Counter 2 1 1 Illegal RL - Read/Load: RL1 RLO 0 a Counter Latching operation 1 a Read/Load most significant byte only a 1 Read/Load least significant byte only 1 1 Read/Load least significant byte first, then most significant byte M - Mode: M2 Ml MO IaIaI I Terminal Count a Mode a I Interrupt BCD: a Binary Counter 16-bits 1 Binary Coded Decimal (BCD) Counter (4 Decades) 8253-5 Control Word Format BSC Adapter 1-255 8251A Programming Procedures After the support devices on the BSC adapter are programmed, the 8251A is loaded with a set of control words that define the communication environment. The control words are split into two formats, mode instruction, and command instruction. Both the mode and command instructions must conform to a specified sequence for proper device operation. The mode instruction must be inserted immediately after a reset operation, before using the 8251A for data communications. The required synchronization characters for the defined communication technique are next loaded into the 8251A (usually hex 32 for BSC). All control words written to the 8251A after the mode instruction will load the command instruction. Command instructions can be written to the 8251A at any time in the data block anytime during the operation of the 8251A. To return to the mode instruction format, the master reset bit in the command instruction word can be set to start an internal reset operation which automatically places the 8251A back into the mode instruction format. Command instructions must follow the mode instructions or synchronization characters. The following diagram is a typical data block, showing the mode instruction and command instruction. 3A9 c/o = 1 Mode Instruction 1 3A9 c/o = 1 SYNC Character 1 3A9 c/o = 1 SYNC Character 2 3AG c/o = 1 Command Instruction It II 3AB c/o = 0 Data 3A9 c/o =1 Command Instruction 3AB c/o =0 " Data 3A9 c/o = 1 Command Instruction Typical Data Block 1-256 BSC Adapter Mode Instruction Definition The mode instruction defines the general operational characteristics of the 8251A. It follows a reset operation (internal or external). Once the mode instruction has been written to the 8251A by the system unit, synchronization characters or command instructions may be written to the device. The following figure shows the format for the mode instruction. Mode Instruction Format Address: Hex 3A9 for BSe Hex 389 for Alternate BSe Bit 7 6 5 4 [I I 3 2 l-y 1 0 (Always 01 I No> U""AlM,, Not Used 0) Character Length Bit - - - - - - ., Character Length Bit - - - - - 1 I 1 ~ ~,i', ,..bl. 1 ; Even Parity 5 Bits 1; SYNDET is an Input 0 1 6 Bits 0; Double SYNC Character 1 0 7 Bits 1 1 8 Bits Bit 0 Not used; always 0 Bit 1 Not used; always 0 Bit 2 and These two bits are used together to define the character Bit 3 length. With 0 and 1 as inputs on bits 2 and 3, character lengths of 5,6, 7, and 8 bits can be established, as shown in the preceding figure. Bit 4 In the synchronous mode, parity is enabled from this bit. A 1 on this bit sets parity enable. Bit 5 The parity generation/check is set from this bit. For BSC, even parity is used by having bit 5 = 1. Bit 6 External synchronization is set by this bit. A 1 on this bit establishes synchronization detection as an input. Bit 7 This bit establishes the mode of character synchronization. A 0 is set on this bit to give double character synchronization. BSC Adapter 1-257 Command-Instruction Format The command-instruction format defines a status word that is used to control the actual operation of the 8251A. Once the mode instruction has been written to the 8251A, and SYNC characters loaded, all further "Control Writes" to I/O address hex 3A9 or hex 389 will load a command instruction. Data is transferred by accessing two I/O ports on the 8251A, ports 3A8 and 388. A byte of data can be read from port 3A8 and can be written to port 388. Address: Hex 3A9 for SSC Hex 389 for Alternate sse Bit 7 6 5 4 3 2 1 0 ~ Transmit Enable I I Data Terminal Ready Receive Enable I I Send Break Character Error Reset Request to Send Internal Reset Enter Hunt Mode Command Instruction Format Bit 0 The Transmit Enable bit sets the function of the 8251A to either enabled (1) or disabled (0). Bit 1 The Data Terminal Ready bit, when set to 1 will force the data terminal output to O. This is a one-bit inverting output port. Bit 2 The Receive Enable bit sets the function to either enable the bit (1), or to disable the bit (0). Bit 3 The Send Break Character bit is set to 0 for normal BSC operation. Bit 4 The Error Reset bit is set to 1 to reset error flags from the command instruction. Bit 5 A 1 on the Request to Send bit will set the output to O. This is a one-bit inverting output port. 1-258 BSC Adapter Bit 6 The Internal Reset bit when set to 1 returns the 8251A to mode-instruction format. Bit 7 The Enter Hunt bit is set to 1 for BSC to enable a search for synchronization characters. Status Read Definition In telecommunication systems, the status of the active device must often be checked to determine if errors or other conditions have occurred that require the processor's attention. The 8251A has a status read facility that allows the system software to read the status of the device at anytime during the functional operation. A normal read command is issued by the processor with 1/0 address hex 3A9 for BSC, and hex 389 for Alternate BSC to perform a status read operation. The format for a status read word is shown in the figure below. Some of the bits in the status read format have the same meanings as external output pins so the 8251A can be used in a completely polled environment or in an interrupt-driven environment. Address: Hex 3A9 for BSe Hex 389 for Alternate BSC - Bit 0 ~ TxRDY (See Note Below) 1 ~ RxRDY 2 ~ TxEmpty 3 ~ Parity Error (PE Flag On when a Parity Error Occurs) 4 ~ Overrun Error (OE Flag On when Overrun Error Occurs) 5 ~ Framing Error (Not Used for Synchronous Communications) 6 .. SYNDET 7 . Data Set Ready (I ndicates that DSR is at 0 Level) Note: TxRDY status bit does not have the same meaning as the 8251A TxRDY output pin. The former is not conditioned by CTS and TxEnable. The latter is conditioned by both CTS and TxEnable. Status Read Format BSC Adapter 1-259 Bit 0 See the Note in the preceding figure. Bit 1 An output on this bit means a character is ready to be received by the computer's 8088 microprocessor. Bit 2 A 1 on this bit indicates the 8251A has no characters to transmit. Bit 3 The Parity Error bit sets a flag when errors are detected. It is reset by the error reset in the command instruction. Bit 4 This bit sets a flag when the computers 8088 microprocessor does not read a character before another one is presented. The 8251A operation is not inhibited by this flag, but the overrun character will be lost. Bit 5 Not used Bit 6 SYNDET goes to 1 when the synchronization character is found in receive mode. For BSC, SYNDET goes high in the middle of the last bit of the second synchronization character. Bit 7 The Data Set Ready bit is a one bit inverting input. It is used to check modem conditions, such as data-set ready. Interface Signal Information The BSC adapter conforms to interface signal levels standardized by the Electronics Industry Association (EIA) RS232C Standard. These levels are shown in the following figure. Additional lines, not standardized by the EIA, are pins 11, 18, and 25 on the interface connector. These lines are designated as Select Standby, Test, and Test Indicate. Select Standby is used to support the switched network backup facility of a modem that provides this option. Test and Test Indicate support a modem wrap function on modems that are designated for business-machine, controlled-modem wraps. 1-260 BSC Adapter Driver EIA RS232C/CCITT V24·V28 Signal Levels +15 Vdc Active/Data ~ 0 +5 Vdc +5 Vdc Invalid Level ·5 Vdc ·5 Vdc I nactive/ Data ~ 1 ·15 Vdc Receiver EIA RS232C/CCITT V24·V28 Signal Levels +25 Vdc Active/Data ~ 0 +3 Vdc +3 Vdc Invalid Level ·3 Vdc ·3 Vdc I nactive/Data ~ 1 ·25 Vdc Interface Voltage Levels BSC Adapter 1-261 Interrupt Information Interrupt Level 4: Transmitter Ready Counter 1 Counter 2 Interrupt Level 3: Receiver Ready The following chart is a device address summary for the primary and alternate modes of the binary synchronous communications adapter. Hex Address Device Register Name Function Primary Alternate 3AO 380 8255 Port A Data I nternal/External Sensing 3A1 381 8255 Port B Data External Modem Interface 3A2 382 8255 Port C Data I nternal Control 3A3 383 8255 Mode Set 8255 Mode Initialization 3A4 384 8253 Counter 0 LSB Not Used in Synch Mode 3A4 384 8253 Counter 0 MSB Not Used in Synch Mode 3A5 385 8253 Counter 1 LSB I nactivity Time-Outs 3A5 385 8253 Counter 1 MSB I nactivity Time-Outs 3A6 386 8253 Counter 2 LSB I nactivity Time-Outs 3A6 386 8253 Counter 2 MSB I nactivity Time-Outs 3A7 387 8253 Mode Register 8253 Mode Set 3A8 388 8251 Data Select Data 3A9 389 8251 Command/Status Mode/Command USART Status Device Address Summary 1-262 BSC Adapter Rear Panel 25-Pin D-Shell • • 25 • • • CI • • • • CI .CI 0 • • • • • • • CI~ • • Cl Q • • • • • • • 14 0 Signal Name - Description Pin No Connection 1 Transmitted Data 2 Received Data 3 Request to Send 4 Clear to Send 5 Data Set Ready 6 Signal Ground 7 Received Line Signal Detector 8 No Connection 9 No Connection 10 Binary External Select Standby* 11 Synchron ous Device No Connection 12 Communi cations No Connection 13 Adapter No Connection 14 Transmitter Signal Element Timing 15 No Connection 16 Receiver Signal Element Timing 17 Test (IBM Modems Only)* 18 No Connection 19 Data Terminal Ready 20 No Connection 21 Ring Indicator 22 Data Signal Rate Selector 23 No Connection 24 Test Indicate (IBM Modems Only)* 25 *Not standardized by EIA (Electronics Industry Association). Connector Specifications BSC Adapter 1-263 Notes: 1-264 BSC Adapter IBM Synchronous Data Link Control (SDLC) Communications Adapter The SDLC communications adapter system control, voltage, and data signals are provided through a 2 by 31 position card edge tab. Modem interface is in the form of EIA drivers and receivers connecting to an RS232C standard 25-pin, D-shell, male connector. The adapter is programmed by communications software to operate in a half-duplex synchronous mode. Maximum transmission rate is 9600 bits per second, as generated by the attached modem or other data communication equipment. The SDLC adapter utilizes an Intel 8273 SDLC protocol controller and an Intel 8255A-5 programmable peripheral interface for an expanded external modem interface. An Intel 8253 programmable interval timer is also provided to generate timing and interrupt signals. Internal test loop capability is provided for diagnostic purposes. The figure below is a block diagram of the SDLC communications adapter. Data .f4---=D,....a-t;;;.a-=--=--.., ....."' ...IIS255A- 5 Bus Buffer System EIA Bus Drivers DeE Receivers Address Address Decode Modem logic Status Change logic SDLC Communications Adapter Block Diagram SDLC Adapter 1-265 The 8273 SDLC protocol control module has the following key features: • Automatic frame check sequence generation and checking. • Automatic zero bit insertion and deletion. • TTL compatibility. • Dual internal processor architecture, allowing frame level command structure and control of data channel with minimal system processor intervention. The 8273 SDLC protocol controller operations, whether transmission, reception, or port read, are each comprised of three phases: Command Commands and/or parameters for the required operation are issued by the processor. Execution Executes the command, manages the data link, and may transfer data to or from memory utilizing direct memory access (DMA), thus freezing the processor except for minimal interruptions. Result Returns the outcome of the command by returning interrupt results. Support of the controller operational phases is through internal registers and control blocks ofthe 8273 controller. 1-266 SDLC Adapter 8273 Protocol Controller Structure The 8273 module consists of two major interfaces: the processor interface and the modem interface. A block diagram of the 8273 protocol controller module follows. Registers Txl/R Command Rxl/R Parameter Reset Status Result Data DB07 Bus Buffer TxD TxC TxD RQ . - - - - - - - - , TxDACK----~ DPiI 0-0-- 32 x ClK RxDRQ-----. t - - -.. RTS RxDACK-----, Control PB'4 TxlNT logic D-o--CTS RxlNT .......---CD RD Read WR Write DMA Control logic A, RESET r~'----,.-- RxD 0---- RxC CS-----' ClK-----~ L..-_ _ _ FLAG DET Internal Data Bus - - Processor Interface Modem Interface 8273 SDLC Protocol Control Block Diagram SDLC Adapter 1-267 Processor Interface The processor interface consists of four major blocks: the control/read/write logic (C/R/W), internal registers, data transfer logic, and data bus buffers. Control/Read/Write Logic The control/read/write logic is used by the processor to issue commands to the 8273. Once the 8273 receives and executes a command, it returns the results using the C/R/W logic. The logic is supported by seven registers which are addressed by AO, AI, RD, and WR, in addition to CS. AO and Al are the two low-order bits of the adapter address-byte. RD and WR are the processor read and write signals present on the system control bus. CS is the chip select, also decoded by the adapter address logic. The table below shows the address of each register using the C/R/W logic. Address Inputs Control Inputs Register AO Al CS WR RD 0 0 0 0 1 Command 0 0 0 1 0 Status 0 1 0 0 1 Parameter 0 1 0 1 0 Result 1 0 0 0 1 Reset 1 0 0 1 0 Txl/R 1 1 0 0 1 None 1 1 0 1 0 Rxl/R 8273 SDLC Protocol Controller Register Selection 1-268 SDLC Adapter 8273 Control/ReadlWrite Registers Command Operations are initialized by writing the appropriate command byte into this register. Status This register provides the general status of the 8273. The status register supplies the processor/adapter handshaking necessary during various phases of the 8273 operation. Parameter Additional information that is required to process the command is written into this register. Some commands require more than one parameter. Immediate Result Commands that execute immediately (Result) produce a result byte in this register, to be read by the processor. Transmit Interrupt Results of trans.mit operations are passed to Results (TxI/R) the processor from this register. This result generates an interrupt to the processor when the result becomes available. Receiver Interrupt Results of receive operations are passed to Results (Rx/I/R) the processor from this register. This result generates an interrupt to the processor when the result becomes available. Reset This register provides a software reset function for the 8273. The other elements of the C/R/W logic are the interrupt lines (RxINT and TxINT). Interrupt priorities are listed in the "Interrupt Information" table in this section. These lines signal the processor that either the transmitter or the receiver requires service (results should be read from the appropriate register), or a data transfer is required. The status of each interrupt line is also reflected by a bit in the status register, so non-interrupt driven operation is. also possible by the communication software examining these bits periodically. SDLe Adapter 1-269 Data Interfaces The 8273 supports two independent data interfaces through the data transfer logic: received data and transmitted data. These interfaces are programmable for either DMA or non-DMA data transfers. Speeds below 9600 bits-per-second mayor may not require DMA, depending on the task load and interrupt response time of the processor. The processor DMA controller is used for management of DMA data transfer timing and addressing. The 8273 handles the transfer requests and actual counts of data-block lengths. DMA level 1 is used to transmit and receive data transfers. Dual DMA support is not provided. Elements of Data Transfer Interface TxDRQ/RxDRQ This line requests a DMA to or from memory and is asserted by the 8273. TxDACK/RxDACK This line notifies the 8273 that a request has been granted and provides access to data regions. This line is returned by the DMA controller (DACK 1 on the system unit control bus is connected to TxDACK/RxDACK on the 8273). RD (Read) This line indicates data is to be read from the 8273 and placed in memory. It is controlled by the processor DMA controller. WR (Write) This line indicates if data is to be written to the 8273 from memory and is controlled by the processor DMA controller. To request a DMA transfer, the 8273 raises the DMA request line. Once the DMA controller obtains control of the system bus, it notifies the 8273 that the DRQ is granted by returning DACK, and WR or RD, for a transmit or receive operation, respectively. The DACK and WR or RD signals transfer data between the 8273 and memory, independent of the 8273 chip-select pin (CS). This "hard select" of data into the transmitter or out of the receiver alleviates the need for the normal transmit and receive data registers, addressed by a combination of address lines, CS, and WRorRD. 1-270 SDLC Adapter Modem Interface The modem interface of the 8273 consists of two major blocks: the modem control block and the serial data timing block. Modem Control Block The modem control block provides both dedicated and user-defined modem control function. EIA inverting drivers and receivers are used to convert TTL levels to EIA levels. Port A is a modem control input port. Bits PAO and PAl have dedicated functions. 8273 Port A (Modem Control Input Port) Bit PA 7 6 543 2 o PAO Clear to Send PA 1 Ca rrier Detect PA2 Data Set Ready PA3 CTS Change PA4 DSR Change L---'----'_ _ _ _ _ _ _ _ _ Not Used Bit PAO This bit reflects the logical state of the clear to send (CTS) pin. The 8273 waits until CTS is active before it starts transmitting a frame. If CTS goes inactive while transmitting, the frame is aborted and the processor is interrupted. A CTS failure will be indicated in the appropriate interrupt-result register. Bit PAl This bit reflects the logical state of the carrier detect pin (CD). CD must be active in sufficient time for reception of a frame's address field. If CD is lost (goes inactive) while receiving a frame, an interrupt is generated with a CD failure result. Bit PA2 This bit is a sense bit for data set ready (DSR). Bit PA3 This bit is a sense bit to detect a change in CTS. SDLC Adapter 1-271 Bit PA4 This bit is a sense bit to detect a change in data set ready. Bits PAS to P A 7 These bits are not used and each is read as a 1 for a read port A command. Port B is a modem control output port. Bits PBO and PBS are dedicated function pins. 8273 Port B (Modem Control Output Port) Bit PB 7 6 5 4 3 2 0 II I~L~ PBO - R"",. to S,nd PB1 . Reserved PB2 . Data Terminal Ready PB3 . Reserved L...-_ _ _ _ _ _ PB4 - Reserved L -_ _ _ _ _ _ _~ PB5· Flag Detect L...-_ _ _ _ _ _ _ _~ PB6 . Not Used L...-_ _ _ _ _ _ _ _ _ _ _ _ PB7 . Not Used Bit PBO This bit represents the logical state of request to send (RTS). This function is handled automatically by the 8273. Bit PB 1 Reserved. Bit PB2 Used for data terminal ready. Bit PB3 Reserved. Bit PB4 Reserved. Bit PBS This bit reflects the state of the flag detect pin. This pin is activated whenever an active receiver sees a flag character. Bit PB6 Not used. Bit PB7 Not used. 1-272 SDLC Adapter Serial Data Timing Block The serial data timing block is comprised of two sections: the serial data logic and the digital phase locked loop (DPLL). Elements of the serial data logic section are the data pins TxD (transmitted data output) and RxD (received data input), and the respective clocks. The leading edge of TxC generates new transmitted data and the trailing edge of RxC is used to capture the received data. The figure below shows the timing for these signals. RxC---" RxD 8273 SOLC Protocol Controller Transmit/Receive Timing The digital phase locked loop provided on the 8273 controller module is utilized to capture looped data in proper synchronization during wrap operations performed by diagnostics. SDLC Adapter 1-273 8255A-5 Programmable Peripheral Interface The 8255A-5 contains three eight bit ports. Descriptions of each bit of these ports are as follows: 8255A-5 Port A Assignments' Hex Address 380 Bit 7 6 5 4 3 2 1 0 ~ 0= Ring Indicator is on from Interface o = Data Carrier Detect is on from Interface Oscillating = Transmit Clock Active 0= Clear to Send is on from Interface Oscillating = Receive Clock Active 1 = Modem Status Changed 1 = Timer 2 Output Active 1 = Timer 1 Output Active *Port A is defined as an input port 8255A-5 Port B Assignments' Hex Address 381 Bit 7 6 5 4 3 2 1 0 ~ 0= Turn On Data Signal Rate Select at Modem Interface 0= Turn On Select Standby at Modem Interface 0= Turn On Test 1 = Reset Modem Status Changed Logic 1 = Reset 8273 1 = Gate Timer 2 1 = Gate Timer 1 1 = Enable Level 4 Interrupt *Port B is defined as an output port 1-274 SDLC Adapter 8255A-5 Port C Assignments* Hex Address 382 Bit 7 6 5 4 3 2 1 0 III ~ ~ 1 G". I "W",I Clock ,0",,", .;,' 1 = Gate External Clock (Output Bit) 1 = Electronic Wrap (Output Bit) 0= Gate Interrupts 3 and 4 (Output Bit) Oscillating = Receive Data (Input Bit) Oscillating = Timer 0 Output (Input bit) 0= Test Indicate Active (Input Bit) Not Used *Port C is defined for internal control and gating functions. It has three input and four output bits. The four output bits are defined during initialization, but only three are used. 8253-5 Programmable Interval Timer The 8253-5 is driven by a processor clock signal divided by two_ It has the following output: Timer a Programmed to generate a square wave signal, used as an input to timer 2_ Also connected to 8253 port C, bit 5_ Timer 1 Connected to 8255 port A, bit 7, and interrupt level 4. Timer 2 Connected to 8255 port A, bit 6, and interrupt level 4. Programming Considerations The software aspects of the 8273 involve the communication of both commands from the processor to the 8273 and the return of results of those commands from the 8273 to the processor. Due to the internal processor architecture of the 8273, this system unit/8273 communication is basically a form of interprocessor communication, and must be considered when programming for the SDLC communications adapter. SDLC Adapter 1-275 The protocol for this interprocessor communication is implemented through use of handshaking supplied in the 8273 status register. The bit definitions of this register are shown below. 8273 Status Register Format Hex Address 388 Bit 7 6 5 4 3 2 1 0 III ~ T"RA I ~ T,INT R,,"" Av.;I.bI, RxlRA 1 = RxlNT Result Available TxlNT 1 = Tx Interrupt RxlNT 1 = Rx Interrupt L...-_ _ _ _ _ CRBF 1 = Command Result Buffer Full ' - - - - - - - - CPBF 1 = Command Parameter Buffer Full ' - - - - - - - - - CBF 1 = Command Buffer Full ' - - - - - - - - - CBSY 1 = Command Busy Bit 0 This bit is the transmitter interrupt result available (TxIRA) bit. This bit is set when the 8273 places an interrupt-result byte in the TxI/R register, and reset when the processor reads the TxI/R register. Bit 1 This bit is the receiver interrupt result available (RxIRA) bit. It is the corresponding result-available bit for the receiver. It is set when the 8273 places an interrupt-result byte in the RxI/R register and reset when the processor reads the register. Bit 2 This bit is the transmitter interrupt (TxINT) bit and reflects the state of the TxINT pin. TxINT is set by the 8273 whenever the transmitter needs servicing, and reset when the processor reads the result or performs the data transfer. 1-276 SDLC Adapter Bit 3 This bit is the receiver interrupt (RxINT) bit and is identical to the TxINT, except action is initiated based on receiver interrupt-sources. Bit 4 This bit is the command result buffer full (CRBF) bit. It is set when the 8273 places a result from an immediate-type command in the result register, and reset when the processor reads the result or pelforms the data transfer. Bit 5 This bit is the command parameter buffer full (CPBF) bit and indicates that the parameter register contains a parameter. It is set when the processor deposits a parameter in the parameter register, and reset when the 8273 accepts the parameter. Bit 6 This bit is the command buffer full (CBF) bit and, when set, it indicates that a byte is present in the command register. This bit is normally not used. Bit 7 This bit is the command busy (CBSY) bit and indicates when the 8273 is in the command phase. It is set when the processor writes a command into the command register, starting the command phase. It is reset when the last parameter is deposited in the parameter register and accepted by the 8273, completing the command phase. SDLC Adapter 1-277 Initializing the Adapter (Typical Sequence) Before initialization ofthe 8273 protocol controller, the support devices on the card must be initialized to the proper modes of operation. Configuration of the 8255A-5 programmable peripheral interface is accomplished by selecting the mode-set address for the 8255 (see the "SDLC Communications Adapter Device Addresses" table later in this section) and writing the appropriate control word to the device (hex 98) to set ports A, B, and C to the modes described previously in this section. Next, a bit pattern is output to port C which disallows interrupts, sets wrap mode on, and gates the external clock pins (address = hex 382, data = hex OD). The adapter is now isolated from the communications interface. Using bit 4 of port B, the 8273 reset line is brought high, held and then dropped. This resets the internal registers of the 8273. The 8253-5's counter 1 and 2 terminal-count values are now set to values which will provide the desired time delay before a level 4 interrupt is generated. These interrupts may be used to indicate to the communication software that a pre-determined period of time has elapsed without a result interrupt (interrupt level 3). The terminal count-values for these counters are set for any time delay which the programmer requires. Counter 0 is also set at this time to mode 3 (generates square wave signal, used to drive counter 2 input). To setup the counter modes, the address for the 8253 counter mode register is selected (see the "SDLC Communications Adapter Device Addresses" table, later in this section), and the control word for each individual counter is written to the device separately. The control-word format and bit definitions for the 8253 are shown below. Note that the two most-significant bits of the control word select each individual counter, and each counter mode is defined separately. Once the support devices have been initialized to the proper modes and the 8273 has been reset, the 8273 protocol controller is ready to be configured for the operating mode that defines the communications environment in which it will be used. 1-278 SDLC Adapter Control Word Format D7 D6 D5 D4 D3 D2 D, Do I SC1 I sca I RL 1 I RLa I M2 I M1 I Ma 1 BCD I Definitions of Control SC - Select Counter: SC1 sca a a Select Counter a a 1 Select Counter 1 1 a Select Counter 2 1 1 Illegal RL - Read/Load: RL 1 RLO a a Counter Latching operation 1 a Read/Load most significant byte (MSB) a 1 Read/Load least significant byte (LSB) 1 1 Read/Load least significant byte first, then most significant byte. M - Mode: M2 M1 Ma Mode a a a Mode a a a 1 Mode 1 X 1 a Mode 2 X 1 1 Mode 3 1 a a Mode 4 1 a 1 Mode 5 BCD: a Binary Counter 16-bits 1 Binary Coded Decimal (BCD) Counter (4 Decades) 8253-5 Programmable Interval Timer Control Word SDLC Adapter 1-279 Initialization/Configuration Commands The initialization/configuration commands manipulate internal registers of the 8273, which define operating modes. After chip reset, the 8273 defaults to all l's in the mode registers. The initialization/configuration commands either set or reset specified bits in the registers depending on the type of command. One parameter is required with the commands. The parameter is actually the bit pattern (mask) used by the set or reset command to manipulate the register bits. Set commands perform a logical OR operation of the parameter (mask) of the internal register. This mask contains l's where register bits are to be set. Zero (O's) in the mask cause no change to the corresponding register bit. Reset commands perform a logical AND operation of the parameter (mask) and internal register. The mask 0 is reset to register bit, and 1 to cause no change. The following are descriptions of each bit of the operating, serial I/O, one-bit delay, and data transfer mode registers. Operating Mode Register 8273 Operating Mode Register Format Bit 7 6 5 4 3 2 1 0 III ~ 11 ~= Two ~ Flog ","om Mod, Preframe Sync Characters 1 = Buffered Mode 1 = Enable Early Tx Interrupt L -_ _ _~ 1 = EOP Interrupt Enable ' - - - - - -.... 1 = HDLC Abort Enable L..-_ _ _ _ _. . . . Not Used ' - - - - - - - -.... Not Used 1-280 SDLC Adapter Bit 0 If bit 0 is set to aI, flags are sent immediately if the transmitter was idle when the bit was set. If a transmit or transmit-transparent command was active, flags are sent immediately after transmit completion. This mode is ignored if loop transmit is active or the one-bit-delay mode register is set for one-bit delay. If bit 0 is reset (to 0), the transmitter sends idles on the next character boundary if idle or, after transmission is complete, if the transmitter was active at bit-O reset time. Bit 1 If bit 1 is set to aI, the 8273 sends two characters before the first flag of a frame. These characters are hex 00 ifNRZI is set or hex 55 ifNRZI is not set. (See "Seriall!O Mode Register," for NRZI encoding mode format.) Bit 2 If bit 2 is set to aI, the 8273 buffers the first two bytes of a received frame (the bytes are not passed to memory). Resetting this bit (to 0) causes these bytes to be passed to and from memory. Bit 3 This bit indicates to the 8273 when to generate an end-of-frame interrupt. If bit 3 is set, an early interrupt is generated when the last data character has been passed to the 8273. Ifthe processor responds to the early interrupt with another transmit command before the final flag is sent, the final-flag interrupt will not be generated and a new frame will begin when the current frame is complete. Thus, frames may be sent separated by a single flag. A reset condition causes an interrupt to be generated only following a final flag. Bit 4 This is the EOP-interrupt-mode function and is not used on the SDLC communications adapter. This bit should always be in the reset condition. Bit 5 This bit is always reset for SDLC operation, which causes the 8273 protocol controller to recognize eight ones (0 1 1 1 1 1 1 1 1) as an abort character. SDLC Adapter 1-281 Serial I/O Mode Register 8273 Serial 1/0 Mode Register Format Bit 7 6 5 4 3 2 1 0 ~ I L.. 1 NRZI Mode = L----:. 1 Clock Loopback = 1 = Data Loopback Not Used ' - - - - - - Not Used 1...-_ _ _ _...... Not Used 1...-_ _ _ _ _ _ Not Used ' - - - - - - - -__ Not Used Bit 0 Set to 1, this bit specifies NRZI encoding and decoding. Resetting this bit specifies that transmit and receive data be treated as a normal positive-logic bit stream. Bit 1 When bit 1 is set to 1, the transmit clock is internally routed to the receive-clock circuitry. It is normally used with the loopback bit (bit 2). The reset condition causes the transmit and receive clocks to be routed to their respective 8273 I/O pins. Bit 2 When bit 2 is set, the transmitted data is internally routed to the received data circuitry. The reset condition causes the transmitted and received data to be routed to their respective 8273 I/O pins. Data Transfer Mode Register 8273 Data Transfer Mode Register Format Bit 7 6 5 4 3 2 1 0 IIIIIII ~ L.. 1 = Interrupt Data Transfers _·L.-·I...-I·L.-·L.-·L.-·L.-_a Not Used 1-282 SDLC Adapter When the data transfer mode register is set, the 8273 protocol controller will interrupt when data bytes are required for transmission, or are available from a reception. If a transmit or receive interrupt occurs and the status register indicates that there is no transmit or receive interrupt result, the interrupt is a transmit or receive data request, respectively. Reset of this register causes DMA requests to be performed with no interrupts to the processor. One- Bit Delay Mode Register 8273 One-Bit Delay Mode Register Format Bit 7 6 5 4 3 2 1 a I I I I I I I I: . - Not Used 1 = One-Bit Delay Enable When one-bit delay is set, the 8273 retransmits the received data stream one-bit delayed. Reset of this bit stops the one-bit delay mode. The table below is a summary of all set and reset commands associated with the 8273 mode registers. The set or reset mask used to define individual bits is treated as a single parameter. No result or interrupt is generated by the 8273 after execution of these commands. Hex Register Command Code Parameter One-Bit Delay Mode Set A4 Set Mask Reset 64 Reset Mask Data Transfer Mode Set 97 Set Mask Reset 57 Reset Mask Operating Mode Set 91 Set Mask Reset 51 Reset Mask Serial liD Mode Set AO Set Mask Reset 60 Reset Mask 8273 SOLC Protocol Controller Mode Register Commands SDLC Adapter 1-283 Command Phase Although the 8273 is a full duplex device, there is only one command register. Thus, the command register must be used for only one command sequence at a time and the transmitter and receiver may never be simultaneously in a command phase. The system software starts the command phase by selecting the 8273 command register address and writing a command byte into the register. The following table lists command and parameter information for the 8273 protocol controller. If further information is required by the 8273 prior to execution of the command, the system software must write this information into the parameter register. 1-284 SDLC Adapter Command Result Completion Command Description (Hex) Parameter Results Port Interrupt Set One-Bit Delay A4 Set Mask None - No Reset One-Bit Delay 64 Reset Mask None - No Set Data Transfer 97 Set Mask None - No Mode Reset Data Transfer 57 Reset Mask None - No Mode Set Operating Mode 91 Set Mask None - No Reset Operating Mode 51 Reset Mask None - No Set Serial 110 Mode AO Set Mask None - No Reset Serial 110 Mode 60 Reset Mask None - No General Receive CO BO,B1 RIC,RO,R1, RXIIR Yes A,C Selective Receive C1 BO, B1, A1, RIC,RO,R1, RXIIR Yes A2 A,C Receive Disable C5 None None - No Transmit Frame C8 LO,L1,A,C TIC TXIIR Yes Transmit Transparent C9 LO,L1 TIC TXIIR Yes Abort Transmit Frame CC None TIC TXIIR Yes Abort Transmit CD None TIC TXIIR Yes Transparent Read Port A 22 None Port Value Result No Read Port B 23 None Port Value Result No Set Port B Bit A3 Set Mask None - No Reset Port B Bit 63 Reset Mask None - No 8273 Command Summary Key 80 - Least significant byte of the receiver buffer length. 81 - Most significant byte of the receiver buffer length. LO - Least significant byte of the Tx frame length. 11 - Most significant byte of the Tx frame length. Al - Receive frame address match field one. A2 - Receive frame address match field two. A - Address field of received frame. If non-buffered mode is specified, this result is not provided. C - Control field of received frame. If non-buffered mode is specified, this result is not provided. RXIIR - Receive interrupt result register. TXIIR - Transmit interrupt result register. RO - Least significant byte of the length of the frame received. Rl - Most significant byte of the length of the frame received. RIC - Receiver interrupt result code. TIC - Transmitter interrupt result code. 8273 SDLC Protocol Controller Commands SDLC Adapter 1-285 A flowchart of the command phase is shown below. Handshaking of the command and parameter bytes is accomplished by the CBSY and CPBF bits of the status register. A command may not be written if the 8273 is busy (CBSY = 1). The original command will be overwritten if a second command is issued while CBSY = 1. The flowchart also indicates a parameter buffer full check. The processor must wait until CPBF = 0 before writing a parameter to the parameter register. Previous parameters are overwritten and lost if a parameter is written while CPBF = 1. No End of Command Phase 8273 SOLC Protocol Controller Command Phase Flowchart 1-286 SDLC Adapter Execution Phase During the execution phase, the operation specified by the command phase is performed. IfDMA is utilized for data transfers, no processor involvement is required. For interrupt-driven transfers the 8273 raises the appropriate INT pin (TxINT or RxINT). When the processor responds to the interrupt, it must determine the cause by examining the status register and the associated IRA (interrupt result available) bit of the status register. If IRA = 0, the interrupt is a data transfer request. If IRA = 1, an operation is complete and the associated interrupt result register must be read to determine completion status. Result Phase During the result phase, the 8273 notifies the processor of the outcome of a command execution. This phase is initiated by either a successful completion or error detection during execution. Some commands such as reading or writing the I/O ports provide immediate results. These results are made available to the processor in the 8273 result register. Presence of a valid immediate result is indicated by the CRBF (command result buffer full) bit of the status register. Non-immediate results deal with the transmitter and receiver. These results are provided in the TxIlR (transmit interrupt result) or Rxl/R (receiver interrupt result) registers, respectively. The 8273 notifies the processor that a result is available with the TxlRA and RxlRA bits of the status register. Results consist of one-byte result interrupt code indicating the condition for the interrupt and, if required, one or more bytes supplying additional information. The "Result Code Summary" table later in this section provides information on the format and decode of the transmitter and receiver results. The following are typical frame transmit and receive sequences. These examples assume DMA is utilized for data transfer operations. SDLC Adapter 1-287 Transmit Before a frame can be transmitted, the DMA controller is supplied, by the communication software, the starting address for the desired information field. The 8273 is then commanded to transmit a frame (by issuing a transmit frame command). After a command, but before transmission begins, the 8273 needs some more information (parameters). Four parameters are required for the transmit frame command; the frame address field byte, the frame control field byte, and two bytes which are the least significant and most significant bytes of the information field byte length. Once all four parameters are loaded, the 8273 makes RTS (request to send) active and waits for CTS (clear to send) to go active from the modern interface. Once CTS is active, the 8273 starts the frame transmission. While the 8273 is transmitting the opening flag, address field, and control field, it starts making transmitter DMA requests. These requests continue at character (byte) boundaries until the pre-loaded number of bytes of information field have been transmitted. At this point, the requests stop, the FCS (frame check sequence) and closing flag are transmitted, and the TxINT line is raised, signaling the processor the frame transmission is complete and the result should be read. Note that after the initial command and parameter loading, no processor intervention was required (since DMA is used for data transfers) until the entire frame was transmitted. General Receive Receiver operation is very similar. Like the initial transmit sequence, the processor's DMA controller is loaded with a starting address for a receive data buffer and the 8273 is commanded to receive. Unlike the transmitter, there are two different receive commands; a general receive, where all received frames are transferred to memory, and selective receive, where only frames having an address field matching one of two preprogrammed 8273 address fields are transferred to memory. 1-288 SDLC Adapter (This example covers a general receive operation.) After the receive command, two parameters are required before the receiver becomes active; the least significant and most significant bytes of the receiver buffer length. Once these bytes are loaded, the receiver is active and the processor may return to other tasks. The next frame appearing at the receiver input is transferred to memory using receiver DMA requests. When the closing flag is received, the 8273 checks the PCS and raises its RxINT line. The processor can then read the results, which indicate if the frame was error-free or not. (If the received frame had been longer than the pre-loaded buffer length, the processor would have been notified of that occurrence earlier with a receiver error interrupt). Like the transmit example, after the initial command, the processor is free for other tasks until a frame is completely received. Selective Receive In selective receive, two parameters (AI and A2) are required in addition to those for general receive. These parameters are two address match bytes. When commanded to selective receive, the 8273 passes to memory or the processor only those frames having an address field matching either Al or A2. This command is usually used for secondary stations with A I designating the secondary address and A2 being the "all parties" address. If only one match byte is needed, A 1 and A2 should be equal. As in general receive, the 8273 counts the incoming data bytes and interrupts the processor if the received frame is larger than the preset receive buffer length. SDLC Adapter 1-289 Result Code Summary Hex Code Result Status After Interrupt T OC Early Transmit Interrupt Transmitter Active r OD Frame Transmit Complete Idle or Flags a OE DMA Underrun Abort n OF Clear to Send Error Abort s 10 Abort Complete Idle or Flags m i t R XO A 1 Match or General Receive Active e Xl A2 Match Active c 03 CRC Error Active e 04 Abort Detected Active i 05 Idle Detected Disabled v 06 EOP Detected Disabled e 07 Frame Less Than 32 Bits Active 08 DMA Overrun Disabled 09 Memory Buffer Overflow Disabled OA Carrier Detect Failure Disabled OB Receiver Interrupt Overrun Disabled Note: X decodes to number of bits in partial byte received. The first two codes in the receive result code table result from the error free reception of a frame. Since SDLC allows frames of arbitrary length (> 32 bits), the high order bits of the receive result report the number of valid received bits in the last received information field byte. The chart below shows the decode of this receive result bit. X Bits Received in Last Byte E All Eight Bits of Last Byte 0 BitO Only 8 Bitl-BitO 4 Bit2-BitO C Bit3-BitO 2 Bit4-BitO A Bit5-BitO 6 Bit6-BitO 1-290 SDLC Adapter Address and Interrupt Information The following tables provide address and interrupt information for the SDLC adapter: Hex Code Device Register Name Function 380 8255 Port A Data Internal/External Sensing 381 8255 Port B Data External Modem Interface 382 8255 Port C Data Internal Control 383 8255 Mode Set 8255 Mode Initialization 384 8253 Counter 0 LSB Square Wave Generator 384 8253 Counter 0 MSB Square Wave Generator 385 8253 Counter 1 LSB Inactivity Time-Outs 385 8253 Counter 1 MSB Inactivity Time-Outs 386 8253 Counter 2 LSB Inactivity Time-Outs 386 8253 Counter 2 MSB Inactivity Time-Outs 387 8253 Mode Register 8253 Mode Set 388 8273 Comma nd/Status Out=Command In=Status 389 8273 Parameter /Result Out=Parameter In=Status 38A 8273 Transmit INT Status DMA/INT 38B 8273 Receive INT Status DMA/INT 38C 8273 Data DPC (Direct Program Control) SD LC Communications Adapter Device Addresses Interrupt Level 3 Transmit/Receive Interrupt Interrupt Level 4 Timer 1 Interrupt Timer 2 Interrupt Clear to Send Changed Data Set Ready Changed DMA Level One is used for Transmit and Receive Interrupt Information SDLC Adapter 1-291 Interface Information The SDLC communications adapter conforms to interface signal levels standardized by the Electronics Industries Association RC-232C Standard. These levels are shown in the figure below. Additional lines used but not standardized by EIA are pins 11, 18, and 25. These lines are designated as select standby, test and test indicate, respectively. Select Standby is used to support the switched network backup facility of a modem providing this option. Test and test indicate support a modem wrap function on modems which are designed for business machine controlled modem wraps. Two jumpers on the adapter (PI and P2) are used to connect test and test indicate to the interface, if required (see Appendix D for these jumpers). C Drivers Receivers +15VdC~ +25VdC Active Level: Data = 0 +5Vdc ~ +3 Vdc -5Vdc ~ Invalid Level Inactive Level: Data = 1 C - 3 VdC -15VdC~ -25 Vdc 1-292 SDLC Adapter Rear Panel 25-Pin D-Shell Connector • 25 • • • • • •• • • • • 14 0 Signal Name - Description Pin No Connection 1 Transmitted Data 2 Received Data 3 Request to Send 4 Clear to Send 5 Data Set Ready 6 Signal Ground 7 Received Line Signal Detector 8 No Connection 9 No Connection 10 Synchro nous External Select Standby' 11 Data Lin k Device No Connection 12 Control No Connection Commun ications 13 Adapter No Connection 14 Transmitter Signal Element Timing 15 No Connection 16 Receiver Signal Element Timing 17 Test (IBM Modems Only)' 18 No Connection 19 Data Terminal Ready 20 No Connection 21 Ring Indicator 22 Data Signal Rate Selector 23 No Connection 24 Test Indicate (IBM Modems Only)' 25 'Not standardized by EIA (Electronics Industry Association). Connector Specifications SDLC Adapter 1-293 Notes: 1-294 SDLC Adapter IBM Communications Adapter Cable The IBM Communications Adapter Cable is a ten foot cable for connection of an IBM communications adapter to a modem or other RC-232C DCE (data communications equipment). It is fully shielded and provides a high quality, low noise channel for interface between the communications adapter and DCE. The connector ends are 25-pin D-shell connectors. All pin connections conform with the EIA RS-232C standard. In addition, connection is provided on pins 11, 18 and 25. These pins are designated as select standby, test and test indicate, respectively, on some modems. Select standby is used to support the switched network backup facility, if applicable. Test and test indicate support a modem wrap function on modems designed for business machine controlled modem wraps. Communications Cable 1-295 The IBM Communications Adapter Cable connects the following pins on the 25-pin D-shell connectors. 14 14 Communications Modem Adapter Connector Connector 13 25 25 13 Communications Modem Adapter Connector Connector Pin # Name Pin # NC Outer Cable Shield 1 2 Transmitted Data 2 3 Received Data 3 4 Request to Send 4 5 Clear to Send 5 6 Data Set Ready 6 7 Signal Ground (Inner Lead Shields) 7 8 Received Line Signal Detector 8 NC NC NC NC 11 Select Standby 11 NC NC NC NC NC NC 15 Transmitter Signal Element Timing 15 NC NC 17 Receiver Signal Element Timing 17 18 Test 18 NC NC 20 Data Terminal Ready 20 NC NC 22 Ring Indicator 22 23 Data Signal Rate Selector 23 NC NC 25 Test Indicate 25 Connector Specifications 1-296 Communications Cable SECTION 2: ROM BIOS AND SYSTEM USAGE ROM BIOS ........................................ 2-2 Keyboard Encoding and Usage ....................... 2-11 ROM BIOS 2-1 ROM BIOS The basic input/output system (BIOS) resides in ROM on the system board and provides device level control for the major I/O devices in the system. Additional ROM modules may be located on option adapters to provide device level control for that option adapter. BIOS routines enable the assembly language programmer to perform block (disk and diskette) or character-level I/O operations without concern for device address and operating characteristics. System services, such as time-of-day and memory size determination, are provided by the BIOS. The goal is to provide an operational interface to the system and relieve the programmer of the concern about the characteristics of hardware devices. The BIOS interface insulates the user from the hardware, thus allowing new devices to be added to the system, yet retaining the BIOS level interface to the device. In this manner, user programs become transparent to hardware modifications and enhancements. The IBM Personal Computer MACRO Assembler manual and the IBM Personal Computer Disk Operating System (DOS) manual provide useful programming information related to this section. A complete listing of the BIOS is given in Appendix A. Use of BIOS Access to BIOS is through the 8088 software interrupts. Each BIOS entry point is available through its own interrupt, which can be found in the "8088 Software Interrupt Listing." The software interrupts, hex 10 through hex lA, each access a different BIOS routine. For example, to determine the amount of memory available in the system, INT 12H will invoke the BIOS routine for determining memory size and will return the value to the caller. 2-2 ROM BIOS Parameter Passing All parameters passed to and from the BIOS routines go through the 8088 registers. The prolog of each BIOS function indicates the registers used on the call and the return. For the memory size example, no parameters are passed. The memory size, in lK byte increments, is returned in the AX register. If a BIOS function has several possible operations, the AH register is used at input to indicate the desired operation. For example, to set the time of day, the following code is required: MOV AH,l ;function is to set time of day. MOV CX,HIG~_COUNT ;establish the current time. MOV DX,LOW _COUNT INT lAH ;set the time. To read the time of day: MOV AH,O ;function is to read time of day. INT lAH ;read the timer. Generally, the BIOS routines save all registers except for AX and the flags. Other registers are modified on return only if they are returning a value to the caller. The exact register usage can be seen in the prolog of each BIOS function. ROM BIOS 2·3 Address Interrupt (Hex) Number Name BIOS Entry 0-3 0 Divide by Zero D11 4-7 1 Single Step D11 8-B 2 Nonmaskable NMI INT - C-F 3 Breakpoint D11 10-13 4 Overflow D11 14-17 5 Pri nt Screen PRINT_SCREEN 18-1 B 6 Reserved D11 1 D-1 F 7 Reserved D11 20-23 8 Time of Day TIMERJNT 24-27 9 Keyboard KBJNT 28-2B A Reserved D11 2C-2F B Communications D11 30-33 C Communications D11 34-37 D Disk D11 38-3B E Diskette DISKJNT 3C-3F F Pri nter D11 40-43 10 Video VIDEO_IO 44-47 11 Equipment Check EQUIPMENT 48-4B 12 Memory MEMORY_SIZE_DETERMINE 4C-4F 13 Diskette/Disk DISKETIEJO 50-53 14 Communications RS232_IO 54-57 15 Cassette CASSETIEJO 58-5B 16 Keyboard KEYBOARD_IO 5C-5F 17 Pri nter PRINTERJO 60-63 18 Resident BASIC F600:0000 64-67 19 Bootstrap BOOT_STRAP 68-6B 1A Time of Day TIME_OF_DAY 6C-6F 1B Keyboard Break DUMMY_RETURN 70-73 1C Timer Tick DUMMY_RETURN 74-77 1D Video Initialization VIDEO]ARMS 78-7B 1E Diskette Parameters DISK_BASE 7C-7F 1F Video Graphics Chars 0 8088 Software Interrupt Listing 2-4 ROM BIOS Vectors with Special Meanings Interrupt Hex I B - Keyboard Break Address This vector points to the code to be exercised when the Ctrl and Break keys are pressed on the keyboard. The vector is invoked while responding to the keyboard interrupt, and control should be returned through an lRET instruction. The power-on routines initialize this vector to point to an IRE T instruction, so that nothing will occur when the Ctrl and Break keys are pressed unless the application program sets a different value. Control may be retained by this routine, with the following problems. The Break may have occurred during interrupt processing, so that one or more End of Interrupt commands must be sent to the 8259 controller. Also, all I/O devices should be reset in case an operation was underway at that time. Interrupt Hex Ie - Timer Tick This vector points to the code to be executed on every system- clock tick. This vector is invoked while responding to the timer interrupt, and control should be returned through an IRE T instruction. The power-on routines initialize this vector to point to an lRET instruction, so that nothing will occur unless the application modifies the pointer. It is the responsibility of the application to save and restore all registers that will be modified. Interrupt Hex ID - Video Parameters This vector points to a data region containing the parameters required for the initialization of the 6845 on the video card. Note that there are four separate tables, and all four must be reproduced if all modes of operation are to be supported. The power-on routines initialize this vector to point to the parameters contained in the ROM video routines. ROM BIOS 2-5 Interrupt Hex 1E - Diskette Parameters This vector points to a data region containing the parameters required for the diskette drive. The power-on routines initialize the vector to point to the parameters contained in the ROM diskette routine. These default parameters represent the specified values for any IBM drives attached to the machine. Changing this parameter block may be necessary to reflect the specifications of the other drives attached. Interrupt Hex IF - Graphics Character Extensions When operating in the graphics modes of the IBM Color/Graphics Monitor Adapter (320 by 200 or 640 by 200), the read/write character interface will form the character from the ASCII code point, using a set of dot patterns. The dot patterns for the first 128 code points are contained in ROM. To access the second 128 code points, this vector must be established to point at a table of up to 1K bytes, where each code point is represented by eight bytes of graphic information. At power-on, this vector is initialized to 000:0, and it is the responsibility of the user to change this vector if the additional code points are required. Interrupt Hex 40 - Reserved When an IBM Fixed Disk Drive Adapter is installed, the BIOS routines use interrupt hex 40 to revector the diskette pointer. Interrupt Hex 41 - Fixed Disk Parameters This vector points to a data region containing the parameters required for the fixed disk drive. The power-on routines initialize the vector to point to the parameters contained in the ROM disk routine. These default parameters represent the specified values for any IBM Fixed Disk Drives attached to the machine. Changing this parameter block may be necessary to reflect the specifications of the other fixed disk drives attached. 2-6 ROM BIOS Other Read/Write Memory Usage The IBM BIOS routines use 256 bytes of memory starting at absolute hex 400 to hex 4FF. Locations hex 400 to 407 contain the base addresses of any RS-232C cards attached to the system. Locations hex 408 to 40F contain the base addresses of the printer adapter. Memory locations hex 300 to 3FF are used as a stack area during the power-on initialization, and bootstrap, when control is passed to it from power-on. If the user desires the stack in a different area, the area must be set by the application. Address Interrupt (Hex) (Hex) Function 80-83 20 DOS Program Terminate 84-87 21 DOS Function Call 88-8B 22 DOS Terminate Address 8C-8F 23 DOS Ctrl Break Exit Address 90-93 24 DOS Fata I Error Vector 94-97 25 DOS Absolute Disk Read 98-9B 26 DOS Absolute Disk Write 9C-9F 27 DOS Terminate, Fix In Storage AO-FF 28-3F Reserved for DOS 100-17F 40-5F Reserved 180-19F 60-67 Reserved for User Software Interrupts 1AO-1 FF 68-7F Not Used 200-217 80-85 Reserved by BASIC 218-3C3 86-FO Used by BASIC Interpreter while BASIC is running 3C4-3FF F1-FF Not Used BASIC and DOS Reserved Interrupts ROM BIOS 2-7 Address (Hex) Mode Function 400-48F ROM BIOS See BIOS Listing 490-4EF Reserved 4FO-4FF Reserved as Intra-Application Communication Area for any application 500-5FF Reserved for DOS and BASIC 500 DOS Print Screen Status Flag Store O-Print Screen Not Active or Successful Print Screen Operation 1 -Print Screen In Progress 255-Error Encountered during Print Screen Operation 504 DOS Single Drive Mode Status Byte 510-511 BASIC BASIC's Segment Address Store 512-515 BASIC Clock Interrupt Vector Segment: Offset Store 516-519 BASIC Break Key Interrupt Vector Segment: Offset Store 51 A-51 D BASIC Disk Error Interrupt Vector Segment: Offset Store Reserved Memory Locations If you do DEF SEG (Default workspace segment): Offset (Hex Value) Length Line number of current line being executed 2E 2 Line number of last error 347 2 Offset into segment of start of program text 30 2 Offset into segment of start of variables 358 2 (end of program text 1-1) Keyboard buffer contents 6A 1 if O-no characters in buffer if 1 -characters in buffer Character color in graphics mode 4E 1 Set to 1, 2, or 3 to get text in colors 1 to 3. Do not set to O. (Default = 3) Example 100 Print PEEK (&H2E) + 256*PEEK (&H2F) ) L H 100 I Hex 64 I Hex 00 I BASIC Workspace Variables 2-8 ROM BIOS Starting Address in Hex 00000 BIOS Interrupt Vectors 00080 Available Interrupt Vectors 00400 BIOS Data Area 00500 User Read/Write Memory caooo Disk Adapter FOOOO Read Only Memory FEOOO BIOS Program Area BIOS Memory Map BIOS Programming Hints The BIOS code is invoked through software interrupts. The programmer should not "hard code" BIOS addresses into applications. The internal workings and absolute addresses within BIOS are subject to change without notice. If an error is reported by the disk or diskette code, you should reset the drive adapter and retry the operation. A specified number of retries should be required on diskette reads to ensure the problem is not due to motor start-up. When altering I/O port bit values, the programmer should change only those bits which are necessary to the current task. Upon completion, the programmer should restore the original environment. Failure to adhere to this practice may be incompatible with present and future applications. ROM BIOS 2-9 Adapter Cards with System-Accessible ROM Modules The ROM BIOS provides a facility to integrate adapter cards with on board ROM code into the system. During the POST, interrupt vectors are established for the BIOS calls. After the default vectors are in place, a scan for additional ROM modules takes place. At this point, a ROM routine on the adapter card may gain control. The routine may establish or intercept interrupt vectors to hook themselves into the system. The absolute addresses hex C8000 through hex F4000 are scanned in 2K blocks in search of a valid adapter card ROM. A valid ROM is defined as follows: Byte 0: Hex 55 Byte 1: HexAA Byte 2: A length indicator representing the number of 512 byte blocks in the ROM (length/512). A checksum is also done to test the integrity of the ROM module. Each byte in the defined ROM is summed modulo hex 100. This sum must be 0 for the module to be deemed valid. When the POST identifies a valid ROM, it does a far call to byte 3 of the ROM (which should be executable code). The adapter card may now perform its power-on initialization tasks. The feature ROM should return control to the BIOS routines by executing a far return. 2·10 ROM BIOS Keyboard Encoding and Usage Encoding The keyboard routine provided by IBM in the ROM BIOS is responsible for converting the keyboard scan codes into what will be termed "Extended ASCII." Extended ASCII encompasses one-byte character codes with possible values of 0 to 255, an extended code for certain extended keyboard functions, and functions handled within the keyboard routine or through interrupts. Character Codes The following character codes are passed through the BIOS keyboard routine to the system or application program. A "-1" means the combination is suppressed in the keyboard routine. The codes are returned in AL. See Appendix C for the exact codes. Also, see "Keyboard Scan Code Diagram" in Section 1. Key Number Base Case Upper Case Ctrl Alt 1 Esc Esc Esc -1 2 1 ! -1 Note 1 3 2 @ Nul (000) Note 1 Note 1 4 3 # -1 Note 1 5 4 $ -1 Note 1 6 5 % -1 Note 1 7 6 1\ RS(030) Note 1 8 7 & -1 Note 1 9 8 * -1 Note 1 10 9 ( -1 Note 1 11 0 ) -1 Note 1 12 - - US(031 ) Note 1 13 = + -1 Note 1 14 Backspace (008) Backspace (008) Del (127) -1 15 -1(009) I-(Note 1) -1 -1 16 q Q DCl (017) Note 1 17 w W ETB (023) Note 1 Character Codes (Part 1 of 3) Keyboard Encoding 2-11 Key Number Base Case Upper Case Ctrl Alt 18 e E ENO (005) Note 1 19 r R DC2 (018) Note 1 20 t T DC4 (020) Note 1 21 Y Y EM (025) Note 1 22 u U NAK (021) Note 1 23 i I HT (009) Note 1 24 a 0 SI (015) Note 1 25 p P DLE (016) Note 1 26 [ 1 Esc (027) -1 27 1 l GS (029 -1 28 CR CR LF (010) -1 29 Ctrl -1 -1 -1 -1 30 a A SOH (001) Note 1 31 s S DC3 (019) Note 1 32 d D EOT (004) Note 1 33 f F ACK (006) Note 1 34 9 G BEL (007) Note 1 35 h H BS (008) Note 1 36 j J LF (010) Note 1 37 k K VT (011) Note 1 38 I L FF (012) Note 1 39 -1 -1 40 " -1 -1 41 ~ -1 -1 42 Shift -1 -1 -1 -1 I 43 \ I FS (028) -1 44 z Z SUB (026) Note 1 45 x X CAN (024) Note 1 46 c C ETX (003) Note 1 47 v V SYN (022) Note 1 48 b B STX (002) Note 1 49 n N SO (014) Note 1 50 m M CR (013) Note 1 51 < -1 -1 52 > -1 -1 53 / 7 -1 -1 54 Shift -1 -1 -1 -1 55 * (Note 2) (Note 1) -1 56 Alt -1 -1 -1 -1 57 SP SP SP SP 58 -1 -1 -1 -1 Caps Lock 59 Nul (Note 1) Nul (Note 1) Nul (Note 1) Nul (Note 1) 60 Nul (Note 1) Nul (Note 1) Nul (Note 1) Nul (Note 1) 61 Nul (Note 1) Nul (Note 1) Nul (Note 1) Nul (Note 1) 62 Nul (Note 1) Nul (Note 1) Nul (Note 1) Nul (Note 1) 63 Nul (Note 1) Nul (Note 1) Nul (Note 1) Nul (Note 1) 64 Nul (Note 1) Nul (Note 1) Nul (Note 1) Nul (Note 1) Character Codes (Part 2 of 3) 2-12 Keyboard Encoding Key Number Base Case Upper Case Ctrl Alt 65 Nul (Note 1) Nul (Note 1) Nul (Note 1) Nul (Note 1) 66 Nul (Note 1) Nul (Note 1) Nul (Note 1) Nul (Note 1) 67 Nul (Note 1) Nul (Note 1) Nul (Note 1) Nul (Note 1) 68 Nul (Note 1) Nul (Note 1) Nul (Note 1) Nul (Note 1) 69 Num lock -1 -1 Pause (Note 2) -1 70 -1 -1 Break (Note 2) -1 Scroll lock Notes: 1. Refer to "Extended Codes" in this section. 2. Refer to "Special Handling" in this section. Character Codes (Part 3 of 3) Keys 71 to 83 have meaning only in base case, in Num Lock (or shifted) states, or in Ctrl state. It should be noted that the shift key temporarily reverses the current Num Lock state. Key Num Number lock Base Case Ait Ctrl 71 7 Home (Note 1) -1 Clear Screen 72 8 t (Note 1) -1 -1 73 9 Page Up (Note 1) -1 Top of Text and Home 74 - - - - --- -- - -- - -- - --- - -- -1 -1 75 4 --(Note 1) -1 Reverse Word (Note 1) 76 5 -1 -1 -1 77 6 -(Note 1) -1 Advance Word (Note 1) 78 79 80 81 + 2 3 1 + , End (Note 1) (Note 1) Page Down (Note 1 ) -1 -1 -1 -1 -1 Erase to EOl (Note 1) -1 Erase to EOS (Note 1) 82 0 Ins -1 -1 83 Del (Notes 1,2) Note 2 Note 2 Notes: 1 . Refer to "Extended Codes" in this section. 2. Refer to "Special Handling" in this section. Keyboard Encoding 2-13 Extended Codes Extended Functions F or certain functions that cannot be represented in the standard ASCII code, an extended code is used. A character code of 000 (Nul) is returned in AL. This indicates that the system or application program should examine a second code that will indicate the actual function. Usually, but not always, this second code is the scan code of the primary key that was pressed. This code is returned in AH. Second Code Function 3 15 16-25 30-38 - Nul Character Alt Q, W, E, R, T, Y, U, I, 0, P AltA, S, 0, F, G, H, J, K, l 44-50 AltZ, X, C, V, B, N, M 59-68 F1 to F1 0 Function Keys Base Case 71 Home 72 t 73 75 77 79 --- Page Up and Home Cursor End 80 81 t Page Down and Home Cursor 82 Ins (Insert) 83 Del (Delete) 84-93 F11 to F20 (Upper Case F1 to F1 0) 94-103 F21 to F30 (Ctrl F1 to F1 0) 104-113 F31 to F40 (Alt F1 to F1 0) 114 Ctrl PrtSc (Start/Stop Echo to Printer) 115 Ctrl-(Reverse Word) 116 Ctrl-(Advance Word) 117 Ctrl End[Erase to End of Line (EOl)] 118 Ctrl PgDn [Erase to End of Screen (EOS)] 119 Ctrl Home (Clear Screen and Home) 120-131 Alt 1,2,3,4,5,6,7,8,9,0, -, = (Keys 2-13) 132 Ctrl PgUp (Top 25 Lines of Text and Home Cursor) Keyboard Extended Functions 2-14 Keyboard Encoding Shift States Most shift states are handled within the keyboard routine, transparent to the system or application program. In any case, the current set of active shift states are available by calling an entry point in the ROM keyboard routine. The following keys result in altered shift states: Shift This key temporarily shifts keys 2-13,15-27,30-41,43-53,55, and 59-68 to upper case (base case ifin Caps Lock state). Also, the Shift key temporarily reverses the Num Lock or non-Num-Lock state of keys 71-73, 75, 77, and 79-83. Ctrl This key temporarily shifts keys 3, 7, 12, 14, 16-28, 30-38,43-50, 55,59-71,73,75,77,79, and 81 to the Ctrl state. Also, the Ctrl key is used with the Alt and Del keys to cause the "system reset" function, with the Scroll Lock key to cause the "break" function, and with the Num Lock key to cause the "pause" function. The system reset, break, and pause functions are described in "Special Handling" on the following pages. Alt This key temporarily shifts keys 2-13,16-25,30-38,44-50, and 59-68 to the Alt state. Also, the Alt key is used with the Ctrl and Del keys to cause the "system reset" function described in "Special Handling" on the following pages. ° The Alt key has another use. This key allows the user to enter any character code from to 255 into the system from the keyboard. The user holds down the Alt key and types the decimal value of the characters desired using the numeric keypad (keys 71-73, 75-77, and 79-82). The Alt key is then released. If more than three digits are typed, a modulo-256 result is created. These three digits are interpreted as a character code and are transmitted through the keyboard routine to the system or application program. Alt is handled internal to the keyboard routine. Keyboard Encoding 2-15 Caps Lock This key shifts keys 16-25, 30-38, and 44-50 to upper case. A second depression of the Caps Lock key reverses the action. Caps Lock is handled internal to the keyboard routine. Scroll Lock This key is interpreted by appropriate application programs as indicating use of the cursor-control keys should cause windowing over the text rather than cursor movement. A second depression of the Scroll Lock key reverses the action. The keyboard routine simply records the current shift state of the Scroll Lock key. It is the responsibility of the system or application program to perform the function. Shift Key Priorities and Combinations If combinations of the Alt, Ctrl, and Shift keys are pressed and only one is valid, the precedence is as follows: the Alt key is first, the Ctrl key is second, and the Shift key is third. The only valid combination is Alt and Ctrl, which is used in the "system reset" function. Special Handling System Reset The combination of the Alt, Ctrl, and Del keys will result in the keyboard routine initiating the equivalent of a "system reset" or "reboot." System reset is handled internal to the keyboard. Break The combination of the Ctrl and Break keys will result in the keyboard routine signaling interrupt hex lA. Also, the extended characters CAL = hex 00, AH = hex 00) will be returned. 2-16 Keyboard Encoding Pause The combination of the Ctrl and Num Lock keys will cause the keyboard interrupt routine to loop, waiting for any key except the Num Lock key to be pressed. This provides a system- or application-transparent method of temporarily suspending list, print, and so on, and then resuming the operation. The "unpause" key is thrown away. Pause is handled internal to the keyboard routine. Print Screen The combination of the Shift and PrtSc (key 55) keys will result in an interrupt invoking the print screen routine. This routine works in the alphanumeric or graphics mode, with unrecognizable characters printing as blanks. Other Characteristics The keyboard routine does its own buffering. The keyboard buffer is large enough to support a fast typist. However, if a key is entered when the buffer is full, the key will be ignored and the "bell" will be sounded. Also, the keyboard routine suppresses the typematic action of the following keys: Ctrl, Shift, Alt, Num Lock, Scroll Lock, Caps Lock, and Ins. Keyboard Encoding 2-17 Keyboard Usage This section is intended to outline a set of guidelines of key usage when performing commonly used functions. Function Key(s) Comment Home Cursor Home Editors; word processors Return to outermost menu Home Menu driven applications Move cursor up t Full screen editor, word processor Page up, scroll backwards 25 PgUp Editors; word processors lines and home - Move cursor left - - Key 75 Text, command entry Move cursor right Text, command entry Scroll to end of text End Editors; word processors Place cursor at end of line Move cursor down ~ Full screen editor, word processor Page down, scroll forward Pg Dn Editors; word processors 25 lines and home Start/Stop insert text at Ins Text, command entry cursor, shift text right in buffer Delete character at cursor Del Text, command entry Destructive backspace - - Key 14 Text, command entry Tab forward --t Text entry Tab reverse 14- Text entry Clear screen and home Ctrl Home Command entry Scroll up t In scroll lock mode Scroll down J In scroll lock mode Scroll left Scroll right --- In scroll lock mode In scroll lock mode Delete from cursor to EOL Ctrl End Text, command entry Exit/Escape Esc Editor, 1 level of menu, and so on Start/Stop Echo screen to Ctrl PrtSc Any time printer (Key 55) --- Delete from cursor to EOS Ctrl PgDn Text, command entry Advance word Ctrl Text entry Reverse word Ctrl Text entry Window Right Ctrl When text is too wide to fit screen Window Left Enter insert mode Ctrl Ins - When text is too wide to fit screen Line editor Keyboard· Commonly Used Functions (Part 1 of 2) 2-18 Keyboard Encoding Function Key(s) Comment Exit insert mode Ins Line editor Cancel current line Esc Command entry, text entry Suspend system (pause) Ctrl Stop list, stop program, and so on Num Lock Resumes on any key Break interrupt Ctrl Break Interrupt current process System reset Alt Ctrl Reboot Del Top of document and home Ctrl PgUp Editors, word processors cursor Sta ndard function keys Fl-Fl0 Primary function keys Secondary function keys Shift Fl-Fl0 Extra fu nction keys if lOa re not Ctrl Fl-Fl0 sufficient Alt Fl-Fl 0 Extra function keys Alt Keys Used when templates are put 2-13 along top of keyboard (1-9,0,-,=) Extra function keys Alt A-Z Used when function starts with same letter as one of the alpha keys Keyboard - Commonly Used Functions (Part 2 of 2) Keyboard Encoding 2-19 Function Key Carriage return -J Line feed Ctrl -J Bell Ctrl G Home Home Cursor up ~t -- - Cursor down Cursor left Cursor right - Advance one word Ctrl Reverse one word Ctrl Insert Ins Delete Del Clear screen Ctrl Home Freeze output Ctrl Num Lock Tab advance ---I Stop execution (break) Ctrl Break Delete current line Esc Delete to end of line Ctrl End Position cursor to end of line End DOS Special Functions Function Key Suspend Ctrl Num Lock Echo to printer Ctrl PrtSc (Key 55 any case) Stop echo to pri nter Ctrl PrtSc (Key 55 any case) Exit current function (break) Ctrl Break Backspace ..- Key 14 Line feed Ctrl...J Cancel line Esc Copy character F1 o r - Copy until match F2 Copy remaining F3 Skip character Del Skip until match F4 Enter insert mode Ins Exit insert mode Ins Make new line the template F5 String separator in REPLACE F6 End of file in keyboard input F6 BASIC Screen Editor Special Fun~tions 2-20 Keyboard Encoding APPENDIX A: ROM BIOS LISTINGS Line Page Number System ROM BIOS Equates .............................. . A-2 12 8088 Interrupt Locations ............... . A-2 35 Stack ................................ . A-2 67 Data Areas ........................... . A-2 76 Power-On Self-Test .................... . A-5 239 Boot Strap Loader ..................... . A-20 1408 I/O Support Asynchronous Communications (RS-232C) ......................... . A-21 1461 Keyboard .......................... . A-24 1706 Diskette ............................ . A-34 2303 Printer ............................. . A-44 3078 Display ............................ . A-46 3203 System Configuration Analysis Memory Size Determination .......... . A-71 5052 Equipment Determination ............. . A-71 5083 Graphics Character Generator ........... . A-77 5496 Time of Day .......................... . A-79 5630 Print Screen .......................... . A-81 5821 Fixed Disk ROM BIOS Fixed Disk I/O Interface ................ A-84 1 Boot Strap Loader ...................... A-89 399 System BIOS A-I LOC OBJ LINE SOURCE $TITLEIBIOS FOR THE IBN PERSQHAL COMPUTER xTl 1 -- --------- ---- ---- ----- ----- -- ----------. ----------------- ----- THE BrOS ROUTINES ARE MEANT TO BE ACCESSED THROUGH SOFTWARE INTERRUPTS ONLY. ANY ADDRESSES PRESENT IN THE LISTINGS ARE INCLUDED ONLY FOR COMPLETENESS. NOT FOR REFERENCE. APPLICATIQHS WHICH REFERENCE ABSOlUTE ADDRESSES WITllIN THE CODE SEGMENT VIOLATE THE STRUC~E ANO DESIGN OF BIOS. 10 i ---------- --------------------------- - ---- ---- --- ---- - ----- -- --- 11 12 • ----- ----- - -------- - - ----- - ---- ------ --- 13 EQUATES ; ------------------- -------- ------------- "15 EOU .OH ; 8255 PORT A ADOR OObO OObl I. PORT_A PORT_B EOU .,H i 8255 FORT B AODR 00b2 17 PORT_C EOU .2H ; 8255 FORT C ADDR 00b3 18 CNO_PORT EOU .3H 0020 ,. INTAOO EOU ZOH ; 8259 PORT INTAOl 21H 8259 PORT 0021 0020 " 21 Eor EOU EOU ZOH i EQU .OH 0040 0043 " 23 TIMER TIM_eTL EOU .3H ; 8253 TIMER CONTROL PORT ADDR 0040 24 TIMERO EOU ,OH ; 8253 TIMER/CNTER 0 PORT AODR 0001 25 THINT EOU 01 ; TIMER 0 INH! RECVD tuSK 0008 2. OMA08 EOU 00 I DNA STATUS REG PORT ADDR 0000 27 OMA EOU 00 ; DMA CH. 0 ADDR. REG PORT ADDR 0540 28 MAX_PERIO~ EOU 540H MIN_PERIOD 0410 OObO " 30 KBD_IN EOU EOU 410H .OH ; KEYBOARD DATA IN ADDR PORT 0002 31 KBOINT EOU 02 I KEYBOARD INTR MASK 0060 32 KB_DATA EOU .OH i KEYBOARD SCAN CODE PORT 0061 KB_CTL EOU .,H ; CONTROL BITS FOR KEYBOARD SENSE DATA "3. 35 ,--- ------ --- ------ ---------------- ------ 36 B088 INTERRUPT LOCATIONS 37 1----------------------- - -- ---------- - --- 3. 39 ABSO SEGMENT AT 0 0000 .0 LABEL BYTE oooe ORG 2*. 0008 "42 LABEL WORD 0014 03 ORG 5*' 0014 0020 •• .5 ORG .-. LABEL WORD 0020 0020 •• •7 LABEL LABEL WORD DwaRD 0040 .8 ORG lOHII4 0040 0074 ••50 LABEL IDH*4 WORD 0074 51 LABEL DWDRD ; POINTER TO VIDEO PARMS 0060 52 OR. 18H*4 0060 53 LABEL WORD ENTRY POINT FOR CASSETIE BASIC 0078 5. 01EH!'i4 INTERRUPT 1 EH 0078 55 007C 5. DRG OlFH*4 I LOCATION OF POINTER 007C 57 I POINTER TO EXTENSION 0400 5. ORG 400H 5. ., 0400 DATA_AREA LABEL BYTE I ABSOLUTE LOCATION OF DATA SEGMENT 0400 60 DATA_WORD LABEL WORD 0500 ORG 0500H 0500 .2 HFG_ TEST_RTN LABEL FAR 7COO .3 DRG 7eOOH 7COO •• 65 BOOT_LOCN ABSO ENDS LABEL FAR •• 67 • ---- ---------- ---- --------- ___ --- ______________ _ 6e. ; STACK -- USED DURING INITIALIZATION ONLY 69 i ------ --- ------------------------------ ________ _ 70 71 STACK SEGMEIH AT 30H 0000 1128 OW 128 DUPI? J 0100 73 TOS LABEL ,",ORO 74 STACK ENDS 75 76 1---------------------------------------- 77 ROM BIOS DATA AREAS A-2 System BIOS LOC OBJ LINE SOURCE 78 ; -- -------------------------------------- 7' eo DATA SEGMENT AT 40H 0000 (4 81 RS232_BASE DW 4 DUP!?) ; ADDRESSES Of RSZ32: ADAPTERS ???? 0008 (4 82 PRIHTER_BASE DW 4 OUP!?) I ADDRESSES OF PRINTERS .... 0010 ???? 83 EG/UIPJLAG OW ; INSTALLED HA.RDWARE 0012 ?1 84 MFG_TST OB I IHITIALIZA lION flAG 0013 ???? 85 MEMORY_SIZE OW I MEMORY SIZE IN K BYTES 0015 ?? 8. HFG_ERR_FLAG DB I SCRATCHPAD FOR MANUFACTlJIUNG 0016 ?? 87 DB I ERROR CODES 8B 8' 1----------- -------------- -- ---------- --- .0 KEYBOARD DATA AREAS 91 ------ -- -- --------------------------- 92 0017 ?? KBJlAG DB " .4 OS 1----- SHIFT FLAG EQUATES WITHIN KB_FUG 0050 •• .7 INS_STATE EOU 8DH I INSERT STATE IS ACTIVE 0040 98 CAPS_STATE EQU 4DH I CAPS LOCK STATE HAS BEEN TOGGLED 0020 0010 •• lDO HUM_STATE SCROll_STATE EOU EOU 20H IOH I tU1 LOCK STATE HAS BEEN TOGGLED ; SCROLL LOCK STATE HAS BEEN TOGGLED 0008 101 ALT_SHIFT EOU OSH I ALTERNATE SHIFT KEY DEPRESSED 0004 102 eTL_SHIFT EOU D4H ; CONTROL SHIFT KEY DEPRESSED 0002 103 LEFT_SHIFT EOU D2H I LEFT SHIFT KEY DEPRESSED 0001 lD4 RIGHT_SHIFT EOU D1H ; RIGHT SHIFT KEY DEPRESSED 105 0018 ?? lD6 KBJLAG_l DB ; SECOND eYTE OF KEYBOARD STArus 107 0080 ID8 INS_SHIFT EOU 80H ; INSERT KEY IS DEPRESSED 0040 ID' CAPS_SHIFT EOU 40H ; CAPS LOCK KEY IS DEPRESSED OOZO 110 WN_SHIFT EOU 20H ; NUt1 LOCK KEY IS DEPRESSED 0010 III SCROLL_SHIFT EQU IOH I SCROLL LOCK KEY IS DEPRESSED 0008 112 HOLD_STATE EOU 08H I SUSPEND KEY HAS BEEN TOGGLED 113 0019 ?? 114 AlT_INPUT DB j STORAGE FOR ALTERNATE KEYPAD ENTRY 001A ???? 115 BUFFER_HEAD OW I POINTER TO HEAD OF KEYBOARD BUFFER ODIC ???? 11. BUFFER_TAIL OW I POINTER TO TAIL OF KEYBOARD BUFFER ODIE (16 117 KB_BUFFER OW 16 DUP(?) i ROOM fOR IS ENTRIES .... DOlE 116 KB_BUFFER_EI'O LABEL WORD 11' "0 1------ HEAD = TAIL INDICATES THAT THE BUFFER IS EI1PTY 0045 '" "2 HUt1JEY EOU .9 ; SCAN CODE FOR HUMBER LOCK OD . . "3 SCROLL_KEY EOU 7D I SCROLL LOCK KEY 0036 "4 ALT_KEY EOU 56 ; ALTERNATE SHIfT KEY SCAN CODE 0010 "5 CTlJEY EOU 2. I SCAN CODE fOR CONTROL KEY OOlA OOZA ". 127 CAPS_KEY LEFT]EY EOU EOU 56 42 I SCAN CODE FOR SHIFT LOCK j SCAN CODE FOR lEFT SHIFT 0036 "8 RIGHT_KEY EOU 54 I SCAN CODE FOR RIGHT SHIFT 0052 12. INS]EY EOU 82 ; SCAN CODE fOR INSERT KEY 0053 130 DEL_KEY EOU B3 ; SCAN CODE FOR DELETE KEY 131 132 ; ---------------------------- ------------ 133 DISKETTE DATA AREAS 134 ; --------------------- ------------------- OOlE ?? 135 SEEK....SnTUS DB I DRIVE RECALIBRATION STATUS 13. ; BIT 3-0 = DRIVE 3-0 NEEDS RECAl 137 I BHORE NEXT SEEK IF BIT IS =0 136 0080 13' INT_FlAG EOU 080H ; INTERRUPT OCCURRENCE FLAG 003F ?? 140 HOTOR_STATUS DB I HOTOR STATUS 141 I BIT 3-D = DRIve 3-0 IS CURRENTLY 142 I RUNNING 143 ; BIT 7 = CURRENT OPERATION IS A WRITE. 144 REQUIRES DEu'Y 145 0040 ?? 146 HOTOR_COUNT DB I TIME OUT COUNTER FOR DRIVE TURN OFF 0025 147 MOTOR_WAIT EQU 37 ; .2 SECS OF COUNTS FOR HOTOR TURN OFF 148 System BIOS A-3 LOC OBJ LINE SOURCE 0041 ?? 14. DISKETIE_STAlUS DB I RETlIRN CODE 51 .... TIJS BYTE 0080 150 TIME_OUT EQU 60H j ATTACHMENT FAILED TO RESPOt&J 0040 151 BAD_SEEK E.., 40H I SEEK OPERATION FAILED 0020 152 BAD_NEC E.., 20H ; NEC CONTROLLER HAS FAILED 0010 153 BAD_CRC EOU 10H j BAD CRe ON DISKETTE READ 0009 154 OHA_BOUNDARY EQU O'H j ATTEMPT TO OMA ACROSS 64K BOl.lt«)ARY 000& 155 BAD_DMA E.., .6H j DHA OVERRUN ON OPERATION 0004 156 RECORD_HOTJND EOU '4H I REQUESTED SECTOR NOT FOLtm 0003 157 ~ITE_PROTECT EQU .3H ; WRITE ATTEMPTED ON ~ITE PROT DISK 0002 156 BAD_AOOR_HARK EOU OZH j ADDRESS MARK NOT FOUND 0001 IS' BAD_tHO EOU OIH I BAD COMMAND PASSED TO DISKETTE I/O I •• 0042 17 ,., NEC_STATUS DB 7 DUP(?) j STATUS BYTES FROM NEC .. ,.2 163 ; ----------------- ------------- ---------- 164 VIDEO DISPLAY DATA AREA. 165 1--------------- ------------------------- 0049 11 I •• CRT_HOOE DB I C~RENT CRT HODE 004.\ ???? 167 CRT_COlS ow ; NUMBER OF COLUMNS ON SCREEN 004C ?'?'?? ,.6 CRT_LEN OW , LENGTH OF REGEN IN BHES 004E ???? 16. CRT_START ow j STARTING ADDRESS IN REGEN BUFFER 0050 (6 170 CURSOR_POSN ow 8 DUP{?) ; CURSOR FOR EACH OF UP TO 8 PAGES 0060 ???? 171 CURSOR_HODE ow j CURRENT CURSOR MODE SETTING 006t ?? 172 ACTIVE_PAGE DB ; CURRENT PAGE BEING DISPLAYED 0063 ???? 173 AOOR_6845 ow j 8ASE ADORESS FOR ACTIVE DISPLAY CARD 0065 ?? 174 CRT_MODE_SET DB i CURRENT SETTING OF THE 3X8 REGISTER 006b ?? 175 CRT_PALETTE DB ; CURRENT PAlETTE SETTING COLOR CARD 17. 177 ;---------------------------------------- 176 POST DATA AREA. 179 i ---------------------------------------- 0067 n'?? ISO IO_ROM_INlT ow I PNTR TO OPTIONAL 110 ROM INIT ROUTINE 0069 ???? 161 IO_ROM_SEG ow ; POINTER TO IO ROM SEGMENT 0068 ?? 162 INTRJLAG DB ; FLAG TO INDICATE AN INTERRUPT HAPPEND 163 184 i ----------------------- ----------------- 185 TIMER DATA. AREA 166 ; ----- ----------------------------------- 006C ???? 167 TIMER - LOW 'W I LOW WORD OF TIMEI<' COllHT 006E ???? ,.6 TIMER_HIGH ow ; HIGH WORD OF TIMER COUNT 0070 ?? 16. TIMER_OFL DB ; TIMER HAS ROLLED OVER SINCE lAST READ 16 '" 191 J COUNTS_SEC J COUNTS_MIN EOU EOU 1092: 192 COUNTS_HOUR E,," 65543 ,.3 , COUNTS_DAY EOU 1573040 = 1600BOH "4 195 1---------- -------- --------- ---------- --- 196 SYSTEH DATA AREA 197 i ----------------------------- ----------- 0071 ?? ,.6 BIOS_BREAK DB I BIT 7=1 IF BREAK KEY HAS BEEN HIT 0072 ???? ,.9 RESETJLAG ow I WORD=lZ34H IF KEYBOARD RESET UNDERWAY 200 i --------------------------- ------------- 201 FIXED DISK DATA AREAS 2.02. ; ------------ ------ --------- --- ---------- 0074 ???? 203 ow 0076 ???? 204 ow 205 1------------ ------------------------------ ------------ 2.06 PRINTEI<' ANO RS232 TIME-OUT VARIABLES 207 i ---------- -------------------------------------------- 0078 (4 2.6 4DUP(?1 007C (4 20' 40UP(?) 210 ; --------------------------- ------------- HI ADDITIONAL KEYBOAI<'D DATA AREA 212 ; ------------------ --------- ------------- 0080 ???? 213 BUFFER_STAI<'T OW 0082 ???? 214 BUFFER_END DW 215 DATA Et-mS 216 1---------------------------------------- 217 EXTRA DATA AREA 218 ; ---------------------------------------- A-4 System BIOS LOC OBJ LINE SOURCE 0000 ?? ". XXDATA SEGMENT AT SOH '" 221 STATUS_BYTE XXDATA ENDS DB 222 1---------------------------------------- 223 YIDEO DISPLAY BUFFER 224 1---------------------___ ---------- ------ Z25 VIDEO_RAM SEGMENT AT DeaDaH 0000 ZZ6 REGEN LASE L BYTE 0000 ZZ7 REGENW LABEl WORD 0000 (16364 "8 DB 16384 DUP(?) zz. ENDS 230 1--------------------____ ------------___ _ 231 ROM RESIDENT COOE 232 ,------------------- ____________________ • 233 COOE SEGMENT AT OFOOOH 0000 (57344 DB 57344 DUP(? I ; FILL LOWEST 56K Zl' EOOO 31353031353132 Zl6 DB '1501512 eOPR. IBM 1981' I COPYRIGHT NOTICE 20434FS0522E20 49424020313938 " "7 "8 2:39 1---------------------------------------________ _ 240 INITIAL RELIABILITY TESTS -- PHASE 1 241 ; ------------------------- ______________________ _ 242 '"3 ASSL/J"IE CS:COOE .SS:CODE, ES:ABSO ,os :OATA '44 245 1-----------------------________________ _ 246 DATA DEFINITIONS 247 i ---------------------------------------_ 248 E016 07EO Z4, el ow I RETURN ADDRESS E018 7EEl 250 ez ow I RETURN ADDRESS FOR DUMMY STACK '51 fCU. 204B42204F48 252 FlB DB , KB 01<',13 1 KB FOR MEMORY SIZE E020 00 253 254 i -------.------------------------------------------------------------- 255 LOAD A BLOCK OF TEST CODE THROUGH THE KEYBOARD PORT 256 F~ I1ANUFACTUING TEST. 257 THIS ROUTINE WILL lOAD A TEST (I'IAX lENGTH=FAFFH) THROUGH 258 THE KEYBOARD PORT. CODE WILL BE LOADED AT LOCATION 259 DODO: 0500. AFTER LOADING, CotITROL WILL BE TRANSFERED 260 TO LOCATION 0000:0500. STACK WIll BE lOCATED JUST BELOW 261 THE TEST CODE. THIS ROUTINE ASSut1ES THAT THE FRIST 2: 262 BYTES TRANSFER ED CONTAIN THE COUNT OF BYTES TO BE LOADED 263 {BYTE I=COUtIT LOW. BYTE 2=COUNT HI.) 264 1--------------------------------------------------------------------- Z65 266 1----- FIRST, GET THE COUNT Z67 fOU '68 MF6_Boon feu ESHlA 26. CAll SP_TEST I GET COlM" lOW E024 SAFB Z70 MOV SH.al I SAVE IT E026 E80ElA Z71 CALL SP_TEST ; GET COUNT HI E029 BAfB 27Z MOV CH.Bl E02B BACF '73 MOV Cl,BH .I ex tiOW HAS COUNT f02D Fe:: Z74 elD I SET DIlL FLAG TO INCRIHENT E02E FA Z7. ell EOlF BFOOOS Z76 MOV DI.OSOOH I SET TARGET OFFSET (05=0000) f032 BOFD Z77 I10V Al.ofDH I UNt1ASK 'VB INTERRUPT E034 E621 278 OUT INTAOl,Al E036 aOOA Z7. I10V AL,OA.H .I SEND READ INT. REQUEST REG. CHD E038 E620 E03A 8"6100 '.0 2., OUT MOV INTAOO,Al DX,blH I SET UP PORT B ADDRESS f03D B8CC4C 2., I10V BX,4CCCH I CONTROL BITS FOR PORT B E040 8402 ,"3 MOV AH,02H I K/B REqUEST PEt-ilING MASK [042 Z84 1ST: E042 BAC! 285 HOV Al,Sl E044 ~E '86 OUT DX,Al I TOGGLE K/B CLOCK System BIOS A-5 LDC DBJ LINE SOURCE E04-S SAC7 E047 EE f048 4" .. ,a7 , 2.0 ,.. TSTl: MOV OUT OEe Al.BH OX.Al ox I POINT OX AT AODR. 60 (KB DATA) E049 E049 E420 ,.1 IN AL,lNTAoa ; GET IRR REG f048 22C4 2., ANO Al,AH ; KB REQUEST PENDING? f040 74FA 20' JZ TST! ; LOOP TILL DATA PRESENT E04F EC 204 IN AL.DX l GET OA.TA E050 AA 20S STOSB 1 STORE IT E051 42 29. INC ox ; POINT OX BACK AT PORT B (61) E052 E2EE 207 LOOP TST ; LOOP TILL ALL BYTES READ 2 •• E054 E"00050000 2.0 JMP ; FAR JUMP TO CODE THAT WAS JUST 3D. I LOADED 301 302: ; ------------ ---------------------------- 303 8088 PROCESSOR TEST 304 ~ DESCRIPTION 305 VERIFY 6088 FLAGS, REGISTERS 306 AND CONDITIONAL JUMPS 307 ; ------ -- ---- -- -- ------ --- ------ -- - -- ---- 30. ASSUME CS: CODE ,OS; NOTHING. ES :NOTHING .SS:NOTHING E056 300 ORG OE05BH Eose 310 RESET LABEL FAR E056 FA EOSC B4D5 '11 312 START: CLI MOV AH.005H i DISABLE INTERRUPTS ; SET SF. CF. ZF. AND AF FLAGS ON EOSE 9E 313 SAHF EOSF 734C 314 JNC ERROl ; GO TO ERR ROUTINE IF CF NOT SET f061 754A 31S JNZ ERROl ; GO TO ERR ROUTINE IF ZF NOT SET E063 7648 31. JNP ERROl ; GO TO ERR ROUTINE IF PF HOT SET f065 7946 317 JNS ERROl ; GO TO ERR ROUTINE IF SF NOT SET fD67 9F 31. LAHF ; LOAD FLAG IMAGE TO AH f068 BI05 31. MOV CL,S ; LOAD CNT REG WIlli SHIFT CNT fObA OlEC 320 SHR AH,CL ; SHIFT Af INTO CARRY BIT POS f06C 733F 321 JNC ERROl ; GO TO ERR ROUTINE IF AF NOT SET E06E 8040 32. HOV AL.40H ; SET THE OF FLAG ON E070 ODED E072 7139 '" 324 SHt JNO AL.l ERROl ; SETUP FOR TESTING I GO TO ERR ROUTINE IF OF HOT SET E074 32E4 32S XOR AH.AH ; SET AH ::: 0 f076 9E 32. SAHF i CLEAR SF. CF, ZF. AND PF E077 7634 327 JBE ERRO 1 ; GO TO ERR ROUTINE IF CF ON 32. ; GO TO ERR ROUTINE IF ZF ON E079 7832- 32. JS ERROl i GO TO ERR ROUTINE IF SF ON E078 7A30 E07D 9F ". "I JP LAHF ERROl ; GO TO ERR ROUTINE IF PF ON ; LOAD F LAG IMAGE TO AH f07E B105 332 Mav n.s i LOAD CNT REG WITH SHIFT CNT ED8D 02EC 333 SHR AH ,CL ; SHIFT AF' INTO CARRY BIT pas E082 7229 334 JC ERROl ; GO TO ERR ROUTINE IF ON E084 DOEct 33S SHL AH,I i CHECK TtlAT OF' IS CLEAR E086 70::':5 33. JO ERROl ; GO TO ERR ROUTINE IF OH 337 338 ;----- REAO/WRITE THE 8088 GENERAL AND SEGMENTATION REGISTERS 339 WITH ALL ONE'S AHO ZEROES'S. '40 f088 B8FFFF 341 I10V AX.OFFFFH I SEruP ONE'S PATTERN IN AX E086 F9 '42 5TC Eoac 8E08 343 C8: MaV OS.AX ; WRITE PATTERN TO ALL REGS EOSE eCCB 344 MaV BX,DS E090 8EC3 '4S I10V ES,BX EOn 8CCI E094 8E01 '4. 347 MOV MaV CX,ES SS,CX E096 8C02 348 MOV OX,SS E098 8BE2: 340 I10V SP,OX E09A 8BEe 35. MOV BP,SP E09C BaFS 351 MOV SI,BP f09E SBFE 352 MOV DI,SI fOAO 7307 '53 JNC C9 i TsnA EOA2: 33e7 354 XOR AX.DI I PATTERN MAKE IT THRU ALL REGS EOA4 7507 35S JNZ ERROl I NO - GO TO ERR ROUTINE EOA6 Fa 35. eLe EOA7 fBEl '57 JMP C8 EOA9 358 C9: I TSTU [OA9 OBC7 35. OR AX,DI I ZERO PATTERN MAKE IT THRU,? EDAB 7401 '.0 JZ CIO I YES - 60 TO NEXT TEST EOAD F4 36' ERROl: HLT ; HALT SYSTEM 362 i -------- -------------------------------- 363 ROS CHECKSUM TEST I A-6 System BIOS LOC OBJ LINE SOURCE 3•• J DESCRIPTION 36S A CHECKSUH IS DnNE FOR mE 8K 3•• ROS HOOULE CONTAINING POD .tJ.I) 3.7 BIOS. 368 ; -- -------------------------------------- EOAE 36. CIO: 370 I ZERO IN AL ALREADY EOAE EUO 371 OUT OAOH,AL I DISABLE tf11 INTERRUP:rs EOBO E683 37. CUT 831ItAL I IHITIALZE DHA PAGE REG. E082: BADSn 371 MOV DX,3118H £OB5 EE '70 OUT DX,AL I DISABLE COLOR VIDEO E086 FEeo 37. INC AL E088 82M 37. HOV DL.DBSH [OBA EE 377 OUT DX,Al I DISABLE BIN VIDEO. EN HIGH RES .. Eoee 8089 "8 HOV AL.89H ; SET 8255 FOR B I A=OUT, C=IN EoeD £663 EOBF BOAS ,". CUT HOV CI1D_PORT,AL AL,lOlOOlOlB 3.1 I ENABLE PARITY CHECKERS AND EOCI E661 3.2 CUT PORT_B.AL ; PULL KB CLOCK HI, TRI-STATE EOC3 B001 EOtS £660 , .. ,.3 3•• 386 HOV CUT AL.OIH PORT_A.Al I KEYBOARD INPUTS. ENABLE HIGH I BAt« OF SIoIITCHE5->PORT C(o-3) I <><><><><><><><><><><><> I <><><>CHECKPOINT 1<><><> EOC1 Btn 3.7 tIOV Ax.es I SETUP 5S seG REG EOC9 eEOO 3•• HOV 55.AX EOCB SEDS, 3•• HOV DS,AX i SET UP DATA SEG TO POINT TO 39. J ROM ADDRESS EOCD FC 391 CLD I SET DIRECTION FLAG TO INC. EOCE BBOOEO EODl BC16EO E004 E91B18 3" , 3'3 , .... ASSUf1E MOV MOV JMP SS:CODE BX,OEOOOH SP.OFFSET Cl ROS_CHECKSU1 I SETUP STARTING RDS ADDR ; SETUP RETURN ADDRESS ,., .... E007 7504 3•• Cll: JNE ERROl ; HALT SYSTEM IF ERRDR , 1------------ ---- -- ------------------------ ------- -- -- --- 8237 DMA INI:TIALIZATION CH.u..!EL REGISTER TEST , i DESCRIPTION ....•••,, DISABLE THE 8237 DttA CONTROLLER. VERIFY THAT •• 1 TII1ER 1 FlJiCTIONS OK. WRITEIREAD THE CLJ;!RENT "'DDRESS ,AND WORD COUNT REGISTERS FOR AlL CHA!+IELS. INITIALIZE AtIJ START OHA FOR MEMORY ••• REFRESH • ••• 4 •• j ---- - - -- -- --- ---- -- -- -- - ----- ------------- -------------- •• 7 j----- DISABLE DMA CONTROLLER ••• [009 B002 Eooa £660 ••• .1. HOY OUT AL,oZH PORT_A.AL I <><><><><><><><><><><><> , <><><>CHECKPOINT 2<><><> EOOO 8004 '11 tIOV AL.04 I DISABLE DtIA CONTROLLER EODF E608 .1. CUT DMAOS.AL 413 .1. i----- VERIFY THAT TIMER 1 FlJIICTIONS tI( '1' EOEl B054 .1. HOV AL • .54H I SEL TII'IER 1.lSB.t1ODE t EOEl E643 '17 CUT TII1ER+3,AL EOE5 SACI .1. HOV AL.CL I SET INITIAl TIMER CNT TO 0 EO£7 E641 EO£9 ... .1. C12~ OUT TII1ER+l.AL I TlI1ERl_BITS_ON EOE9 B040 EOE8 E643 ... '21 HOV OUT AL,40H TlI1ER+3 .... L I LATCH TlHER 1 CotIIT ...••• EOED eOFBFF 423 CHP Bl.OFFH ; YES - SEE IF ALL BITS GO OFF EOFO 7407 4.4 JE tl3 i TIHERl_BITS_OFF EOF2 E"l IN "'l,TIHER+l J READ TIMER 1 CCMMT ...••• [OF4 0...08 OR IL.AL 1 ALL BITS ON IN TII1ER! £OF6 E2Fl .27 LOOP tl' I TlI1ER!l_BITS_ON EOFS F4 HCT I TIMER 1 FAILURE, HALT SYS EOF9 C13: I TIKERl_BITS_DFF EOF9 eAC3 EOFe 2BC9 ." 431 ..... tIOV AL.Bt CX,CX J SET TIMER 1 CNT EOFD' £641 (OFF ." 4" C11t: CUT TIMER+l,AL J TIKER_LOOP (OFF B040 .3. I10V AL.Q.OH i UTCH TIMER 1 COUNT ElOl E643 '3' CUT TIHER+3 "t,L n03 90 43. NOP 1 DELAY FOR TIMER ...... E104 90 4" NOP E105 £441 4. . IN Al.TIMER+! J READ TIMER 1 COUNT EI07 2208 ANa BL.AL EI09 7403 JZ tl. i WRAP_DHA..R!EG System BIOS A-7 LOC OBJ LINE SOURCE HOB E2F2 441 lOOP C14 I TIMER_LOOP E100 F4 442 HLT I HALT SYSTEM 443 444 ;----- INITIALIZE TIMER 1 TO REFRESH MEMORY 445 flOE B003 446 CI5: NOV AL,03H i <><><><><><><><><><> EllO E660 447 OUT PORT_A,AL i <><><>CHECKPOINT 3<><><> 448 I WRAP _DNA_REG El12 E600 44. OUT ONA+DOH .Al i SEND MASTER CLEAR TO DNA 450 451 ; ----- WRAP DNA CHANNELS ADDRESS ANO COUNT REGISTERS 452 E114 BOFf 453 NOV AL,OfFH i WRITE PATTERH FF TO ALL REGS f116 SACS 454 t16: NOV BL,Al i SAVE PATTERN FOR COMPARE EllS SAF8 455 MOV BH,AL EllA 890800 456 NOV ex,s J SETUP LOOP CNT EllD 8AOOOO '57 NOV aX.OM I SETUP I/O PORT ADOR OF REG El20 EE 45. CI7: OUT OX,Al i WRITE PATTERN TO REG I LSB El21 50 459 PUSH AX I SATlSIFY 8237 110 TIMINGS El22 EE .60 OUT aX,AL NS8 OF 16 BIT REG E123 eOOl 461 NOV Al,OlH At. TO ANOTHER PAT BEFORE RO El2S EC '62 IN Al,DX I READ I6-BIT DIiA CH REG. L5B El26 8AEO 463 NOV AH.AL SAVE LSB OF lo-BIT REG E128 EC 464 IN AL,OX ; READ MSB OF OMA CH REG £129 3B08 465 CH" eX,AX ; PATTERN READ AS WRITTEN? El2B 7401 466 JE C18 J YES - CHECK NEXT REG El20 F4 467 HLT ; NO - HALT THE SYSTEI1 El2E 4.8 CIS: ; NXT_OHA_CH E12E 42 46. INC OX ; SET I/O PORT TO NEXT CH REG E12F E2EF 470 lOOP C17 ; WRITE PATTERN TO NEXT REG E131 FEtO 471 INC AL ; SET PATTERN TO 0 E133 74El .n JZ C16 I WRITE TO CHANNEL REGS .73 • 74 ;----- INITIALIZE AND START OI1A FOR I1EMORY REFRESH . 475 E135 eEes 476 MOV oS,ex 1 5ET UP ABSO INTO OS AND ES El37 8EC3 477 NOV ES,BX 47. ASSUME DS:ABSO, ES :ABSO El39 BOFF 47. MOV .l.l,OFFH I SET CNT OF 64K FOR REFRESH EI3B E601 480 OUT OMA+I,Al EnD 50 .81 PUSH AX EI3E E601 '82 OUT CNA+I,Al E140 BOS8 463 NOV Al,058H I SET OMA MODE,CH Q,RD.,AUOTINT EI42 E60B 464 OUT DI1A+OBH,AL ; WRITE DMA MODE REG El44 BODO 4B5 NOV AL,O I ENABLE DMA CONTROLLER El46 8AE8 466 NOV CH,AL ; SET COUNT HIGH:::OO El48 E608 467 OUT DMA+8,AL ; SETUP 011A COMMAND REG E14A 50 488 PUSH AX El4B E60A 4 •• OUT CMA+I0,Al I ENABLE OMA CH 0 E140 8012 490 NOV Al.18 ; START TIMER 1 E14F E641 Elsl B041 EI53 E60B El55 50 .., 491 492 •• 4 OUT NOV OUT PUSH TIMEIHl,AL Al,41H OHA+OBH.AL AX ; SET MODE FOR CHANNEL I ElS6 £408 4.5 IH AL,OMA ... 08 I GET DNA STATUS ElSa 2410 49. AHO AL,OOOlOOOOB J IS TIMER REQUEST THERE? EISA 7401 4.7 JZ C18C , {IT SHOULD'T BEl EISC F4 4 •• HLT I HALT SYS.(HOT TIMER 1 OUTPUll E150 8042 E1SF E60B ••• 500 else: HOV OUT Al.42H OMA+OBH,AL , SET MODE FOR CHAt-tNEl 2 E161 8043 501 NOV AL.43H I SET MODE FOR CHAI<><><><><><><><><><><> "5 E184 £660 Elab 25C9 ". 5V Cl4A: OUT SUB PORT_A.AL CX,CX ; CHECKPOINT 4<><><> ; BASE RAM FAILURE - HANG E188 E2FE E18A 8608 ".". C248: LOOP XCHG C24B BL,AL ; flIPPING BETWEEN 04 A.ND I FAILING BIT PATTERN Else EBF6 530 JMP C24A E18E 531 E18E 2BCO 532 SUB AX,AX ; MAKE AX=DOOO £190 F3 533 REP STOSW I STORE 6K WORDS OF DODO £191 A6 fl92 53. HOW_BIG: fIn 891£72:04 535 HOV OATA_WORD[OFFSET RESET]LAGJ,BX ;. RESTORE RESET flAG £196 BAO004 53. HOV DX,0400H ; SET POINTER TO JUST>16KB £199 B81000 537 HOV eX,16 ; BASIC COUNT OF 16K fl9C E19C 8EC2 ". 53. FILL_lOOP: HOV ES,DX ; SET SEG_ REG_ £19£ 2BFF 540 SUB 01,01 £IAO 8855.6.A 541 HOV AX.OAA5SH ; TEST PATTERN flA3 88C8 54' HOV eX.AX ;. SAVE PATTERN EIA5 268905 543 HOV ES: [01 I,AX j SEND PATTERN TO MEM_ flAB BOOF 544 HOV AL,OFH I PUT SOMETHING IN Al flAA 268B05 545 HOV AX,ES:[OIl ; GET PATTERN ElAD 33Cl 54. XOR AX.CX ; COMPARE PATTERNS ElAF 7511 547 JHZ HOW_BIG_Et--Il ;. GO END IF NO COMPARE £IBl 890020 54. HOV CX,2000H ; SET COUNT FOR 8K WORDS ElB4 F3 54. REP STaSio! I FILL 8K WORDS f185 AB ElBb 81C20004 550 ADD DX.400H POINT TO NEXT 16KB BLOCK ElBA 83C310 551 ADD BX,16 ; BlR1P COUNT BY 16K8 EIBD BOFEAD 5" CHP OH,OAOH ; TOP OF RAM AREA YET? (AOOOO) EICO 750A 553 JHZ FILL_LOOP £ltZ 554 HOW_BIG_END : EIC2 891£1304 555 HOV ;. SA.VE MEHORY SIZE 55. 557 ; ----- SETUP STACK SEG AND SP 55. E It6 B83000 559 HOV AX.STACK , GET STACK VALUE ElC9 8EoO 5.0 HOV SS,A.X , SET THE STACK UP flce 8COODl 5., HOV SP.OFFSET TOS I STACK 15 REAOY TO GO 562 1-------- ------------------------------------------- ----- 563 INITIALIZE THE 8259 INTERRUPT CONTROLLER CHIP 564 ;. --------- ---------- --- ----- ------------------------ ----- flCE 6013 565 C25: HOV AL.13H ; ICWI - EDGE, SNGL, leW,. f100 E620 5 •• OUT INnOD ,AL £102 8008 5.7 HOV AL.e: I SETUP lCIoI2 .- INT TYPE 8 (8-F) flDft £621 568 OUT INTA01.,l,l E106 B009 5.' HOV AL.9 ; SETUP lew. - BUFFRD ,8066 HOOE EIDB £621 570 OUT INTAOl,AL fIDA BOFF 571 HOV Al,OFFH ; MASK AlL INTS. OFF EIOC E621 5n OUT INTAOl.AL ; (VIDEO ROUTINE ENABLES INTS.I 573 574 ;----- SET UP THE INTERRUPT VECTORS TO TEMP INTERRUPT 575 flOE IE 576 PUSH OS fIDF B92000 577 MOV eX,32 ; FILL ALL 32 INTERRUPTS E1E2 2BFF 57' SUB 01.01 ; FIRST INTERRUPT LOCATION £1£4 8EC7 579 HOV EStDl ; SET ES=OOOO ALSO fl£6 8823FF 5.0 03: MOV AX,OFFSET 011 • MOVE ADDR OF INTR !'ROC TO TBL EIE9 AB EIEA ecce 5.' 5., STOSW NOV Ax.es I GET AODR OF INTR PROC SEG EIEe As 5'3 STOSW ElED ElF7 584 LOOP 03 i VECTBLO 585 586 ;----- ESTABLISH BIOS SUBROUTINE CALL INTERRUPT VECTORS 5.7 ElEF BF4000 58' MOV DI.OFFSET VIDEO_INT ; SETUP ADDR TO INTR AR EA EIF2 DE 58' PUSH es EIFJ IF 5.0 POP os ; SETUP ADOR Of VECTOR TABLE EIF4 ecoe 5., MaV AX,OS I SET AX=SEGHENT ElF6 BE03FF90 5., HOV 5I.OFFSET VECTOR_TABlE+16 ; START WITH VIDEO ENTRY System BIOS A-9 LOC OBJ LINE SOURCE Elf A B91000 593 HOV CX,16 ElFD AS 5.4 03": HOVSW ; MOVE VECTOR TABLE TO RAM EIFE 47 >95 INC 01 ; SKIP SEGHENT POINTER EIFF 47 5.6 INC 01 E200 EZfB 5?7 LOOP D3.A. 598 ; ----------- ---- ------------- - - ------------------ 599 DETERMINE CONFIGURATION AND MFG. MODE 600 ; ------ --- ------- --------- --- ------------- ------- 601 E202 IF b" POP OS EZ:03 IE b03 PUSH OS ; RECOVER DATA SEG [204 E462 604 IN AL.PORT~C ; GET SWITCH INFO E206 2.40F b05 AND AL.OOOOlllIB ; ISOLATE SWITCHES E208 8AEO 60b HOV AH,AL ; SAVE E20A BOAD b07 HOV ALolOIOllOiB ; ENABLE OTHER BANK OF SHS. HOC E661 608 OUT PORT~B.AL EZOE 90 b09 NOP ElOF E462 blO IN E211 8104 bll MOY Cl.4 E213 02eo 612 ROl .U.Cl ; ROTATE TO HIGH NIBBLE E215 24FO 6\3 ANO ALollllOOOOB ; ISOLATE E217 OAC4 614 OR AL.AH ; COMBINE WITH OTHER BANK E219 2AE4 b15 SUB AH.AH ElIB .0.31004 b16 MOY OATA_WORO[OFFSET EQUIPJLAGJ,AX ; SAVE SWITCH INFO fZlE 6099 617 HOV Al.99H H20 E663 bl8 OUT CHO_PORT ,AL E222 E80518 619 CALL KBD_RESET ; SEE IF HfG. JUMPER IN E225 80FBAA 6" CHP BL.OAAH ; KEYBOARD PRESENT? E228 7418 6" JE Eb E22.A 80FB65 6" eMP BL,06SH I LOAD HFG. TEST REQUEST? E2.20 7503- 623 JNE 03B E22F E9EfFD 6" JMP MfG_BOOT GO TO BOOTSTRAP IF SO E232 B038 62:5 03B: HOV AL.36H E234 E661 6,6 OUT PORT_B.AL E2.36 90 E237 90 6" 628 HOP HOP E238 [460 6,. IN AL.PORT_A E23A 24FF 630 ANO AL.OFFH ; WAS OAT.A LINE GROUNDED EZ3C 7504 631 JNZ E6 E2.3E FE061204 6" DATA_AREA( OFFSET MFG_TST 1 ; SET MANUFACTURING TEST FLAG b" 634 ; ----- ----. ---- ------------- ----- ------ ---- -- -------- - --- 635 INITIALIZE AND START CRT CONTROLLER (6645) 636 TEST VIDEO READ/WRITE STORAGE. 637 ; DESCRIPTION 636 RESET THE VIDEO ENABLE SIGNAL. 6J9 SELECT ALPHAHUNERIC MODE. 40 • ~5. B & W. 640 READ/WRITE DATA PATTERNS TO STG. CHECK STG 641 ADDRESSABIlITY. 64~ ERROR :;" 1 LONG AND 2: SHORT BEEPS 643 ; -- -- ------ -- -- ----- -------- _. --------------- --- ---- ----- E242 644 E6: E242 .0.11004 645 MOV AX,DATA_WORD (OFfSET EQUIP JLAG 1 I GET SENSE SWITCH INFO E245 50 646 PUSH AX ; SAVE IT E246 B030 6.7 MOV AL.30H E248 .0.31004 648 MOV DATA_WORD[OFFSET EQUIP]LAGI.AX E246 2AE4 64. SUB AH.AH E24D COlO 650 INT 10" , SEti) INIT TO BIW CARD E24f B020 651 HOV AL.2:0H E251 A31004 652 HOV E254 2AE4 653 SUB AH.AH ; AND INIT COLOR CARD [256 COlO 654 INT LOH E25e 58 655 POP AX I RECOVER REAL SWITCH INFO E259 A31004 656 MOV DATA_WORD(OFFSET EQUIP_FLAG1.AX ; RESTORE IT 657 I AND CONTINUE Ezse 2430 658 'NIl AL.30H ; ISOLATE VIDEO SWS ElSE 750.0. 65' JHZ E7 I VIDEO SWS SET TO O? E260 BF400Q 660 MOV DI.OFFSET VIDEO_INT I SET INT lOH TO DUt1t1Y E2.63 C7054BFF 661 MOV IDIJ,OFFSET OUtV1Y_RETURN , RETURN IF NO VIDEO CARD E267 E9AOOO 662 JHP i BYPASS VIDEO TEST E26A 663 E7: E26A 3e30 b64 eHP Al.30H I B/It! CARD ATTACHED? Ezoe 7408 665 JE E8 I YES - SET MODE FOR BIW CARD E26E FEC4 666 INC AH ; SET COLOR MODE FOR COLOR CO E270 3(20 667 eHP AL, ~OH ; 80X25 MODE SELECTED? E272 7502- 668 JHE E8 I NO - SET MODE FOR 40X25 E274 8403 66. MOV AH , 3 I SET HOOE fOR aoxts A-tO System BIOS LaC OBJ LINE SOURCE EZ7, 86r:O 670 fa: XCHG AH.AL ; SET_HOOE: E2.76 50 671 PUSH AX I SAVE VIDEO MODE ON STACK E279 2,0,£4 672 SUB AH.AH , INITIALIZE TO ALPHANI.R1ERIC 110 E278 COlO 673 INT 10H ; CAll VIDEO_IO £270 56 674 POP AX , RESTORE VIDEO SENSE SWS IN AH EHE 50 675 PUSH AX I RESolVE VALUE E27F B9D060 676 I10V Bx.oeOOOH ; BEG VIDEO RAM ADOR B/W CD E282: SABaOl 677 HOV DX.3BSH ; MODE REG FOR B/w E285 890008 678 HOV CX,Z046 ; RAM WORD CNT FOR 6/W CO E288 8001 679 MOV Al.1 I SET MODE FOR Bioi CARD ElBA BOFCJO 680 CNP AH.30H , B/W VIDEO CARD ATTACHED? E280 7409 681 JE £9 ; YES - GO TEST VIDEO STG E26F B788 68' MOV BH.088H ; BEG VIDEO RAM ADDR COLOR CO E291 8,0,0603 683 MOV OX.308H ; MODE REG FOR COLOR CD E294 6520 684 MOV CH,20H j RAM WORD CtIT FOR COLOR CD E296 FEte 685 OfC Al ; SET HODE TD 0 FOR COLOR CD E298 686 E9: ; TEST_VIDEO_STS: E298 EE E299 813E72043412 E29F 8EC3 .8. .87 6.9 OUT eMP HOV OX.AL J DISABLE VIDEO FOR COLOR CD OATA_WORO[OFFSET RESETJUGJ,I2:34H ; POD INlT BY KIID RESET? ES.BX ; POINT ES TO VIDEO RAH STS E2AI 7407 f2A3 8EDB f2A5 Efle7Dl £2A8 7546 . 6'0 691 ., .93 6.4 JE MOV ASSUHE CAll JNE E10 OS,BX DS:NOntING,ES:NOTHING STGTST_CNT E17 I YES - SKIP VIDEO RAM TEST , POINT OS TO VIDEO RAM STG ; GO TEST VIDEO R/W STG ; RIN 5TG FAILURE .. BEEP SPK 695 ; ---- --- ---------------------------------- ------- 696 SETUP VIDEO DATA ON SCREEN FOR VIDEO 697 LINE TEST. 696 ; DESCRIPTION 699 ENABLE VIDEO SIGNAL At.[! SET HOOE. 700 DISPLAY A HOOIZONTAL BAR ON SCREEN. 701 ; ----------------------------------------- ------- f2A ... 702 EIO: E2AA 58 703 POP AX , GET VIDEO SENSE SWS (AH) flAB 50 704 PUSH AX ; SAVE IT EZAC 6400 705 HOV AH.O ; ENABLE VIDEO AND SET MOOE E2AE COlO 70. INT 10H , VIDEO E260 682070 707 HOV AX,7020H I ~T BLANKS IN REVERSE VIDEO 70. 709 710 E253 EBII 711 JMP SHORT EIDA E2C3 712 ORG OE2:C3H E2C3 E99915 713 JMP NHI_INT 714 E2(6 715 EI0A: E2:C6 2BFF 71. SUB 01.01 ; SETUP STARTING LOC E2C8 892800 717 MOV CX,40 ; NO. OF BLANKS TO DISPLAY E2CB F3 718 REP STOSIo! I WRITE VIDEO STORAGE E2ee AS 719 1---- --- --------------------------------- 720 CRT INTERFACE LINES TEST 72: 1 ; DESCRIPTION 12Z SENSE ON/OFF TRANSITION OF THE 123 VIDEO ENA.BlE AND HORIZONTAL 724 SYNC LINES. 725 EzeD 58 726 POP AX I GET VIDEO SENSE SW INFO EleE 50 727 PUSH AX I SAVE IT E2CF 80FC30 728 CMP AH,30H I B/N CARD ATTACHED"? E202 BABA03 72. I10V DX.03BAH I SETUP ADOR OF Bioi STATUS PORT E205 7403 no JE Ell ; YES - GO TEST LINES E207 SADA03 731 NOV OX.03[)AH ; COLOR CARD IS ATTACHED HOA n2 Ell: I LIHE_TST: E2DA 8408 733 MOV ...H.8 fZOC 734 Ell: EZOC 26e9 735 SUB ex,cx E2DE 736 Ell: EZOE EC 737 IN Al,DX j READ CRT STATUS PORT E20F 22C4 738 AND Al,AH I CHECK VIoEO/HORZ LINE HEI 7504 73. JHZ E14 ; ITS ON - CHECK If IT GOES OFF E2E3 E2:F9 740 LOOP E13 ; LOOP TI Ll ON OR TIMEOUT E2f5 E609 741 JMP SHOOT E17 I GO PRINT ERROR HSG E2f7 74' E14: EZE7 2:6C9 743 .LOI ex.cx E2E9 744 E15: E2E9 EC 745 IN AL.oX I READ CRT STATUS PORT System BIOS A-II LaC OBJ LINE SOURCE ElEA 2:2.C4 74. AND AL.AH ; CHECK VIDEOIHORl LINE E2fC 7411 747 JZ E16 I ITS ON - CHECK NEXT LINE ElEE ElF9 748 LOOP El5 ; lOOP IF OFF TILL IT GOES ON E2FO 74. E17: I CRT_ERR: E2fO IF 750 PDP OS ElFl IE 751 PUSH OS EHZ C606150006 752 MOV DS:MFG_ERRJlAG,06H ; < >< >< >(RT ERR CHKPT. 06< >< >< > E2F7 BA0201 ,.3 MOV DX,102H E2FA E8DB16 754 CALL ERR_BEEP j GO BEEP SPEAKER E2FO EB06 755 JMP SHORT E 18 E2FF 75. E16: ; NXT_LINE: E2FF BI03 757 HOV CL.3 ; GET N[XT BIT TO CHECK nOI DlEC 758 SH' AH.Cl £303 7507 75. JHZ El2 I GO CHECK HORIZONTAL LINE nos 7.0 E18: i DISPLAY_CURSOR: nos 58 7.1 POP AX I GET VIDEO SENSE SWS I AH) nOb 8400 EJoe COlO 7.' 7.3 MOV IHT "H.D IOH ; SET MODE AND DISPLAY CURSOR ; CALL VIDEO I/O PROCEDURE noA. 764 noll. BACOCO 765 MOV OX,oeaDOH nOD 76. ElBA: nOD 8ED.&. 7.7 MOV os.ox E30F 260B 768 SUB BX,BX nIl 8801 7.' MaV AX,leX] i GET FIRST Z LOCATIONS n13 53 770 PUSH ax E314 56 771 POP ex I LET BUS SETTLE DIS 3055"A 77' CMP AX, O.t.AS5H ; PRESENT? nIB 7505 773 JNl El8B j NO? GO LOOK FOR OTHER MODULES nlA £8361& 77' CALL RON_CHECK ; GO SCAN MODULE E3lD £B04 775 JMP SHORT EIBC EllF 77. E188: E31F 81(25000 777 ADD OX,0080H j POINT TO NEXT 2K BLOCK E323 778 ElBC: E323 81FAOOC8 77. eMP OX,OC800H ; TOP OF VIDEO ROM AREA YET? E327 7CE4 780 JL El8A i GO SCAN FOR ANOTHER MODULE 781 782 8259 INTERRUPT CONTROLLER TEST 78l i DESCRIPTION 784 READ/WRITE THE INTERRUPT MASK REGISTER (IMR I 785 Wlnl ALL ONES AND ZEROES. ENABLE SYSTEM 766 INTERRUPTS. MASK DEVICE INTERRUPTS OFF. CHECK 767 FOR HOT INTERRUPTS I UNEXPECTED). 786 ----- -------------- ----- -- -- - --- -------- - ---------- 76. ASS\Jt1E os: A8S0 790 POP OS 791 792 i----- TEST THE INR REGISTEI.! ,.3 EJU C606150405 794 e21A: MOV 795 j <><><><><><><><><><><><> 796 i <><><>CHECKPDINT 5<><><> E3ZF BOOO 797 MOV AL,O j SET IHR TO ZERO El31 E6Zl 798 OUT INTAOl,AL E333 £421 79' IH AL,ImAOl i READ IHR £335 OACO 800 OR AL,Al j IMR = O? E337 7518 801 JHZ D. ; GO TO ERR ROUTINE IF NOT 0 E339 BaFF 80. MOV AL.OFFH j DISABLE DEVICE INTERRUPTS EHB E621 803 OUT INTAOl,AL j WRITE TO II1R E33D E421 80. IH AL,INTAQI j READ It1R E33F 0401 80S ADO AL,l j ALL INR BIT ON? E341 7511 80. IN' O. j NO - GO TO ERR ROUTINE 807 808 j ----- CHECK FOO HOT INTERRUPTS 80. 810 j----- INTERRUPTS ARE MASKED OFF. CHECK THAT NO INTERRUPTS OCCUR. 811 n43 "26B04 81Z MOV DATA_AREA(OFFSET INTRJLAG1.AL ; CLEAR INTERRUPT FLAG n46 FB 813 STI ; ENABLE EXTERNAL INTERRUPTS E347 2BC9 81' SUB cX,CX j WAIT 1 SEC FOR ANY INTRS mAT E349 815 04: E349 E2FE 81. LOOP 04 I MIGHT OCCUR E34B 817 05: E348 E2FE 818 lOOP D5 B40 803£680400 81' eMP OATA_AREA(OFFSET IHTR_FlAG1,OOH j 010 ANY INTERRUPTS OCCUR? £352 7409 8" JZ 07 I NO - GO TO NEXT TEST £354 821 06: E354 BEFFF890 8" MOV 51 ,OffSET EO ; DISPLAY 101 ERROR A-12 System BIOS LOC OBJ LINE SOURCE E3S6 E84E16 623 E356 FA 624 eLI Else F4 6'5 HlT I HALT THE SYSTEM 826 ; - ----------------------- -- ------- -- - '-- - - -- -------- 827 8253 TIMER CHECKOUT 828 ; DESCRIPTION 829 VERIFY THAT THE SYSTEM TIMER (0) DOESN'T COUHT 830 TOO FAST OR TOO SLOW. 831 ; ~~--------------- --------- ------ ---------- -------------- E35D 632 07: E350 C606150402 6ll MOV 634 I <><><> 635 ; TIMER CHECKPOINT 121 E3b2 BOFf 636 MaY Al,OFEH I MASK ALL INTRS EXCEPT lVl 0 E364 E621 637 OUT INTAOl,AL I WRITE THE 8259 IMR E366 8010 636 MOY AL,OOOIOOOOB I SE l TIM O. lSB, MODE 0, BINARY E3b8 E643 639 OUT TIM_CTL.Al I ~ITE TIMER CONTROL MODf REG ElbA 891600 640 MOV CX,16H I SET PGM lOOP CNT E'360 8ACI 641 MaY AL,Cl ; SET TIMER 0 CNT REG E 36F E640 642 OUT TIMERO,AL ; WRITE TIMER 0 CNT REG E371 643 08: E371 F606660401 644 TEST OATA_AREA[OFFSET IHTRJlAG1,OlH 645 ; DID TIMER 0 INTERRUPT OCCLR? E376 7504 64. JHZ D9 ; YES - CHECK TIMER OP FOR SLOW TIME E376 Ei!:F7 647 LOOP 08 I WAIT FOR INTR FOR SPECIFIED TIME E37A fB08 646 JMP D6 I TIMER 0 INTR DIDN T OCCUR ERR E37C 649 09: E37C BlOC 650 NOV Cl,12 SET PGM lOOP CNT E37E BOFF .51 MOV AL.OFFH I WRITE TIMER 0 CNT REG E380 E640 65' OUT TIMERO,AL E382 C606680400 653 NOV DATA_AREAl OFFSET INTR]LAGJ.O I RESET IHTR RECEIVED FLAG E387 SOFE 65' NOY AL,OFEH ; REENABLE TINER a INTERRUTS E389 E621 ass OUT INTAOl,Al El8B 65. 010: E38B F6066B0401 657 TEST DATA_AREA[ OFFSET IHTRJ LAG I. OIH I DID TINER 0 INTERRUPT OCCUR? E390 7St2 656 JNZ 06 ; YES - TIMER CNTIHG TOO FAST, ERR E392 ElF7 659 lOOP 010 ; WAIT FOR INTR FOR SPECIfIED TIME 6.0 861 ;----- SETUP TIMER 0 TO MODE 3 E394 BOFF 6.' 6.3 MQY Al.OFFH I DISABLE A.LL DEVICE INTERRUPTS E396 E621 664 OUT INTA01.Al E398 8036 865 NOY Al,36H I SEL TIM O,lSB,MSB,t100E 3 E39A E643 666 OUT TIHER+3.AL ; WRITE TIMER MODE REG E39C BOOO 667 MaY Al.O E39E E640 666 OUT TIMER,Al ; WRlTE lSB TO TIMER 0 REG E3AO E640 669 OUT TIHER.Al ; WRITE I1SB TO TIMER 0 REG 870 1------------------------------------------------ 871 KEYBOARD TEST 872: ; DESCRIPTION 873 RESET THE KEYBOARD AHa CHECK THAT SCAN 874 CODE AA' IS RETURNED TO THE CPU. 875 CHECK FOR STUCK KEYS. 876 ; -------------------------~---------------------- E3A2 677 TSTl2: E3A2 8099 676 HOY Al,99H I SET 8255 HOOE A,C=IN B=ooT E3A4 E663 679 OUT CMD_PORT,Al f3A6 401004 860 NOY Al.DATA_AREA[OFFSET EQUIPJLAGJ E3A9 2401 661 AND Al.OI J TEST CHAMBER? DAB 7431 66' JZ .7 I BYPASS IF SO E3AD 803E120401 663 eMP DATA_AREAr OFFSET MfG_ TST 1,1 ; MANUFACTURING TEST ttODE? E382 742A 66' J' F7 YES - SKIP KEYBOARD TEST E3B4 E87316 665 CAll KBD_RESET 1 ISSUE RESET TO KEYBRD DB7 E31E 666 JCXZ f6 J PRINT ERR MSG IF NO INTERRUPT E389 8049 687 MOV AL.49H ENABLE KE)'BOARO ElBB E661 668 OUT DBC SOFBAA 669 eMP Bl.OAAH i SCAN CODE AS EXPECTED,? nco 7515 690 JHE F6 J NO - DISPLAY ERROR MSG 691 892 ; ----- CHECK FOR STUCK KEYS 693 EX2 Boca 69. MOV Al,OCBH ; ClR KBD, SET ClK LINE HIGH E3C4 E661 695 OUT PORT_B,Al nCb 8048 8.6 NOY Al,46H 1 ENABLE KBD,CLK IN NEXT BYTE f3e8 E661 697 OUT PORT_B,Al EX" 28C9 696 sue cX,ex f3ee 699 F!i: System BIOS A-13 LOC OBJ LINE SOURCE Elee E2FE ElCE £460 ...'01 lOOP IN FS "'L.KBD_IN ~ DELAY FDR A ~IlE I CHECK FOR STUCK KEYS £3DO XOO .. 2 CHP AL,O I SCAN CODE = 01 E3D2 740'" E304 E88415 ...,,, JE CALL F7 XPC_BYTE ~ YES - CONTINUE TESTING I CONVERT ANJ PRINT £307 E3D7 8£4CEC90 ... .. 5 F6: HOV SI,OfFSET Fl I GET "5G ADDA .., E30B £6CB15 .. 7 CALL E_HSG f PRINT I1SG ON SCREEN . .8 j ---~ - - - - - - - - - - . - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - SETUP HARDWARE INT. VECTOR TABLE 91. 1------------------------------------------------ E3DE '11 F7: .,. f30E IE 912 PUSH OS E3DF ZBCO '13 SUB AX,AX ElE1 6EtO HOV ES,AX ElE3 890600 915 HOV eX,OB I GET VECTOR tNT £3£6 DE 91' PUSH CS I SETUP OS SEG REG ElE7 IF 917 pop OS £3E8 BEF3FE90 .. 8 HOV SI,OFFSET VECTOR.TABLE f3EC 8F2000 .19 HOY DI,OFFSET INT.PTR ElEF E3EF AS '2' .21 F7A: HOVSW £3FO 47 '22 INC 01 i SKIP OVER SEGMENT E3Fl 47 .23 INC 01 £3F2 £2F8 '24 LOOP F7' ElF4 IF .2. .25 '27 POP OS i ----- SET UP OTHER INTERRUPTS ....S NECESSARY .28 £3F5 C7D6DB005FF8 .2' HOV NI1I.PTR,OFFSET NHI.INT ; NHI INTERRUPT E3FB C7061400S4fF 93. HOV INT5.PTR ,OFFSET PRINT.SCREEN I PRINT SCREEN E401 C706620000F6 931 HOV BASIC.PTR+2,OF600H i SEGHENT FOR CASSETTE BASIC 932 933 ;----- SETUP TIMER 0 TO BLINK LED IF I1ANUFACTURING TEST MODE 93. £407 803E120401 935 eMP DATA.AREA[OFFSET HFG_TSTl,OlH J HFG. TEST HODE? E"OC 750 ... £40E C70670003CF9 ,'" 937 JNZ HOY EXP_IO WORD PRT( ICH-4I,OFFSET BlINIClNT; SETUP TIttER INTR TO SLIt« LED £414 BOfE 938 HOY AL,OFEH I ENABLE TIMER INTERRUPT £416 E621 ... 93' 941 OUT ; EXPANSION I/O BOX TEST INTAOl,A.L 942 CHECK TO SEE IF EXPANSION BOX PRESENT - IF INSTAllED, 943 TEST DATA AN) ADDRESS BUSES TO I/O BOX 944 ERROR='180l' ... 945 1---------------------------------------------------------------- j----- DETERMINE IF BOX IS PRESENT ., 947 948 £418 EXP.10: I (CARD WAS ENABLED EARLIERI £418 BAI002 95. HOV OX,02l0H ; CONTROL PORT ADDRESS E"IB 885555 .51 HOV AX,5555H J SET DATA PATTERN £41E EE '52 OUT DX,AL £41F 8001 .53 HOV AL,OIH ; HAKE AL DIFFERENT £421 EC '54 IN AL.OX ; RECOVER DATA £422 3AC4 955 CHP AL,AH ; REPLY? £424 7544 os. JHE El' j NO RESPONSE, GO TO NEXT TEST £426 F7DD 957 NOT AX j HAKE DA TA=AAAA £428 EE £429 BOOI .5.,.. '58 OUT HOV DX,AL AL.OlH J RECOVER DATA £42B EC E4at 3AC4 ,., IN CHP AL.OX AL,AH £42£ 753A '.2 JNE El. ...'.5 ..3 £430 ,.. '.7 i ----- CHECK ADDRESS BUS EXPZ: ., £430 B50100 HOV BX,DOOlH £433 BA1502 968 HOV DX.0215H ; LOAD HI ADDR. REG ADDRESS £436 B91000 HOV CX,0016 J GO ACROSS 16 BITS £439 97. EXP): £439 2£8807 '71 I10V CS:(BXI,AL J WRITE ADDRESS FOOOO+BX E43C 90 '72 NOP E43D EC 973 IH AL.DX J READ ADOR. HIGH £43E 3AC7 97' eMP AL,BH £440 7521 975 JHE EXP.ERR J GO ERROR IF ttISCQt1PARE £442 42 '7' INC DX j OX=Z16H (ADDR. lOW REG) A-14 System BIOS LOC OBJ LINE SOURCE E443 EC 977 IN AL.DX E444 3AC3 978 CNP Al.BL I COMPARE TO lOW A.DDRESS E446 751B 979 JHE EXP_ERR E448 4A 980 DEC OX ; OX BACK TO ,lSH £449 DIEl 981 SHL 8X.1 E448 ElEt 98' LOOP EX?3 , lOOP TILL 'I' WALKS ACROSS BX 9a3 98' ;----- CHECK DATA BUS 985 E440 690800 986 MOV eX.OODB I DO 8 TIMES E450 BODI 987 NOV AL,O! E4SZ 4A 9a8 OEC OX ; MAKE OX=2.14H IDATA BUS REG) £453 .89 EXP4: E453 8AEO 990 NOV AH.A.l ; SAVE DATA. BUS VALUE E455 EE 991 OUT QX,Al I SEND VALUE TO REG £456 BOOI 992 NOV AL.OlH E4sa EC 993 IN AL,DX ; RETRIVE VAL.UE FROM REG E459 3,A,C4 99. CMP AL,A.H ; = TO SAVED VALUE E458 7506 995 JHE SHORT EXP_ERR £450 ODED 996 SHL AL,I ; FORM NEW DATA PATTERN E45F ElF, 997 lOOP EXP4 ; LOOP TILL BIT WALKS ACROSS AL E461 feD7 998 JMP SHORT E19 ; GO ON TO NEXT TEST E463 999 EX?_ERR: E463 BEOFF990 1000 MDV 5I.OFFSET F3C E467 E83Fl5 1001 CAll E_MSG 1002: J ---------- --- -------------- •. ---------------------------- 1003 ADDITIONAL REAO/WRITE STORAGE TEST 1004 ; DESCRIPTION 1005 WIHTE!J;!EAD DATA PATTERNS TO ANY READ/WRITE 1006 STORAGE AFTER THE FIRST 32:K. STORAGE 1007 ADDRESSABILITY IS CHECKED. 1008 ; -------------------------------------------------------- 1009 ASSUME OS:DATA E46A 1010 E19: E46A E8EC15 1011 CALL DDS E460 IE 1012 PUSH OS E46E 1013 HO: E46E 813E72003412 1014 CMP RESETJLAG,1234H I WARN START? E474 7503 1015 JHE E20A I CONTINUE TEST IF NOT E476 E99FOO 1016 JMP ROM_SCAN ; GO TO NEXT ROUTINE IF SO E479 1017 HOA: E479 681000 1018 MOV AX.16 • STARTING .A.m. OF MEMORY OK E47C EB28 1019 JMP SHORT PRT_srz J POST MESSAGE E47E 1020 E206: E47E 8BIEl300 1021 MOV ex. MEMORY_SIZE I GET MEM. SIZE WORD E482 83E8IO 1022 SUB ex. Ie. ; 1ST 16K ALREADY DONE E485 8104 1023 MOV Cl.04H E487 03EB 1024 SH. BX.CL ; DIVIDE BY 16 E489 8Bce 1025 MOV ex.ex I SAVE COUNT OF 16K BLOCKS E488 6BOO04 1026 MOV BX.0400H I SET PTR. TO RAM SEGMEHT:>16K E48E 1027 E21: E48E 8EOB 1028 HOV OS.BX J SET SEG. REG E490 8EC3 1029 NOV ES.BX E492 81C30004 1030 ADD 8X.0400H ; POINT TO NEXT 16K E496 52 1031 PUSH OX E497 51 1032 PUSH CX ; SAVE WORK REGS E498 53 1033 PUSH ex E499 50 1034 PUSH AX E49A 890020 1035 MOV cx.zoaOH ; SET COUNT FOR 8K WORDS £49D E8CFOl 1036 CALL STGTST_CNT E4AO 754C 1037 JHZ EllA I GO PRINT ERROR E4A2 58 1038 POP AX ; RECOVER TESTED HEM tM1EIER E4A3 051000 1039 ADD .lX,16 E4,6,6 1040 PRT_SIZ: E4.6.6 50 1041 PUSH AX E4A7 BBOAOO 1042 MOV eX.10 ; SET UP FOR DECIMAL CONVERT E4AA 890300 1043 MOV CX.3 J OF 3 NIBBLES E4AD 1044 DECIMAL_lOOP: E4AD 3302 1045 XO. OX.OX E4AF F7F3 1046 DIV ex , DIVIDE BY 10 E481 80CA30 1047 OR Dl.30H ; MAKE INTO ASCII E484 52 1048 PUSH OX , SAVE E4B5 E2F6 1049 LOOP DECIMAL_LOOP £4B7 890300 1050 MOV CX,3 E4BA 1051 PRT_DEC_ LOOP: E4BA 58 1052 pop AX I RECOVER A NUMBER E4BB E80EI4 1053 CALL PRT_HEX System BIOS A-IS LaC OBJ LINE SOURCE E46E HFA. 1054 E4eo 890700 1055 MOV CX,7 E4C3 BEIAEO 1056 MOV 51,OFF5ET F3B PRINT ' KB OK' E4Cb 1057 E4C6 2ESA04 1058 Al,CS: lSI J E4C9 46 1059 INC S1 E4eA E8CF14 1060 CAll PR!_HEX [4CD ElF7 1061 LOOP KB_lOOP E4CF 58 1062 POP AX ; RECOVER WORK REGS £400 3CI000 1063 CMP AX , 16 ; FIRST PASS,? E403 74A9 1064 JE E20B E405 56 1065 POP 6X £406 S9 1066 POP ex [407 SA 1~67 POP ox £408 E264 1068 LOOP E2l lOOP TILL ALL MEM. CHECKED E4DA. BOOA 1069 HOV Al,10 E4DC E8BD14 1070 CALL PRT_HEX LINE FEED 1071 1072 1----- DMA Teo SHOULD BE ON BY NOW - SEE IF IT IS 1073 E40F [408 1074 AL,DMA+08H E4E1 2:401 1075 AHO AL,OOOOOOOIB I Teo STATUS BIT ON? E4E1 7533 1076 JHZ I GO ON WITH NEXT TEST IF OK £4E; IF 1077 POP os [4E6 C606150003 1078 MOV ; <:><:><><><><><><><><><><><> E4EB E966FE 1079 JMP 06 ; POST 101 ERROR M56 AND HALT 1080 1081 1----- PRINT FAILING ADDRESS AND XOR'EO PATTERN IF DATA COMPARE ERI(oR 1062 E4EE 8AE8 1063 EZIA: MOV CH,AL ; SAVE FAILING BIT PATTERN E4FO BOOO 1084 MOV AL,n ; CARR AGE RETUR~ E4FZ f8A714 1085 CALL PRT_HEX E4F5 BOOA 1086 MOV AL.lo E4F7 E8A214 1087 CALL PRT _HEX E4FA 58 1088 POP AX ; RECOVER AMT. OF GOOD MEM. E4-FB 83C406 1089 ADO 513,6 ; BALANCE STACK E4FE eCOA 1090 MOV DX,ns ; GET FAILING SEGMENT E500 IF 1091 POP as ESDI IE Ion PUSH OS E502 A,31300 1093 HeV MEMORY_SIZE.AX i LOAD MEM. SIZE WORD TO SHOW 1094 ; HOW MUCH MEM. WORKING Es05 88361500 1095 ; <><><><><><><><><><><><><> 1096 I <><>CHECKPOINTS 08->"0<><> [509 ESCEIA 1097 CALL PRT_SEG ; PRINT IT ESOC BACS 1098 MOV Al,CH I GET FAILING BIT PATTERN ESOE E87A14 1099 CALL XPC_BYTE i CONVERT AND PRINT CODE E511 BE04F990 1100 MOV 51 ,OFFSET El I sETUP ADDRESS OF ERROR MS6 E515 E89114 1101 ; PRINT ERROR M5G 1102: i ---- ---- - - ---------- --- -- -- --------- - -- ---- ------------ --------- 1103 I CHECK FOR OPTIONAL ROM FROM C8000->F4000 IN ZK BLOCKS 1104 fA VALID MODULE HAS '5SAA' IN THE FIRST 2 LOCATIONS, 1105 LEHGTH INDICATOR (LENGTH/S121 IN THE 3D LOCATION AHO 1106 TEST/INIT. COOE STARTING IN THE 4TH LOCATION.) 1107 ; ---------------------------------------------- ------ ------------ E518 1108 E518 BAooce 1109 NOV ox.ocaOOH I SET BEGINNING ADDRESS E51B 1110 ROH_SCAN_l: E51B BEDA 1111 MOV OS,QX ESlo 2BDB 1112 SUB BX,BX ; SET BX=OOOO ESIF 8B07 1113 HOV AX, [BX] ; GET 1ST WORD FRON MODULE [521 53 1114 PUSH BX £522 56 1115 POP BX ; BUS SETTlING E523 3055A.'" 1116 eM? AX, OAA55H ; = TO 10 WORD? E526 7506 1117 JNZ NEXT_ROM I PROCEED TO NEXT ROM IF NOT E528 [82814 111a CALL ROM_CHECK ; GO CHECK OUT MODULE E528 E80590 1119 JMP ARE_WE_DONE I CHECK FOR END OF RON SPACE E52:E 1120 ES2E 81C28DOO 1121 ADD OX. OOBOH I POINT TO NEX'f 2K ADDRESS E532: 1122 £532 61FAOOF6 1123 eMP ox. OF600H I AT F6000 YEn £536 7eE3 11Z4 JL ROH_SC ... N....1 I GO CHECK ANOTHER ADO. IF NOT £538 E60190 llzS JMP BASE_ROM_CHK ; GO CHECK BASIC ROM 1126 ; ----- ------------------------------------------------------- -------- ---- 112:7 I A CHECKSUM IS DONE FOR THE 4 ROS MODULES CONTAINING BASIC CODE l1Z8 1--------------------- -- ----- ------------------ ---- ---------------------- [536 1129 BASE_ROH_CHK: E538 6404 1130 MaV AH,4 I NO. OF ROS MODULES TO CHECK A-16 System BIOS LOC OBJ LINE SOURCE ..'" £530 2608 E53F 8EDA 1131 1132 1133 E4: SUB MOV ex ,ex os.ox ~ SETUP STARTING ROS AOOR 1134 I CHECK RQS [541 E8AE13 1135 CALL ROS_CHECKSUH E544 7403 1136 JE E5 CONTINUE IF OK E546 f88201 1137 CALL ROM_ERR POST ERROR E549 1138 £5: E549 81C20002 1139 ADD OX,OZOCH I POINT TO HEXT 8K HODULE E540 FEte 1140 DEC AH ; ANY HORE TO DO? E54F 75ft 1l<1l JNZ ,4 ; YES - CONTINUE 1142 J - ----------- ---------------------------- ------------------------ 1143 DISKETTE ATTACHMENT TEST 1144 ; DESCRIPTION 1145 CHECK IF IPl DISKETTE DRIVE IS ATTACHED TO SYSTEM. IF 1146 ATTACHED, VERIFY STATUS OF NEC FOC AFTER A RESET. ISSUE: 1147 A RECAl ANO SEEK CI'l) TO FDC A.HO CHECK STATUS. CONPLETE 1148 SYSTEM INlTULIZATlON THEN PA.SS CONTROL TO THE BOOT 1149 LOADER PROGRAM. 1150 • ---------------------------------------------- ------------------ [551 1151 £551 IF 1152 POP OS E552 MIDDD 1153 MOV AL,BYTE PTR EQUIPJLAG ; DISKETTE PRESENT? E555 2:401 1154 AND AL,OIH ; NO - BYPASS DISKETTE TEST E557 74'3E 1155 JZ Fl5 E559 1156 FlO: E559 E421 1157 IN AL, INTAOl E558 NSF 1158 AND Al.OBfH I EttABLE DISKETTE INTERRUPTS E550 E621 1159 OUT INTAOI.AL E55F 8400 1160 MOV AH.O ; RESET NEC Foe E561 8A04 1161 HOV OL,AH ; SET FOR DRIVE 0 ES63 con 1162 INT 13H ; VERIFY STATUS AFTER RESET E565 f6C4FF 1163 TEST AH.OFFH ; STATUS OK? E568 7520 1164 JNZ Fl3 J NO - Foe FAILED 1165 1166 ; - --- TURN DRIVE 0 MOTOR ON 1167 E56,6, SAFlO] 1168 MOV DX.03F:2H ; GET ADOR OF FOC CARD E56D BOlt 1169 MOV Al.ICH ; TURN MOTOR ON, EN DNA/INT E56F EE 1170 OUT Ox,AL ; WRITE FOC CONTROL REG E570 26C9 1171 SUB ex.cx E572 1172 Fll: E572 E2FE 1173 LOOP F11 I WAIT FOR 1 SECOND E574 1174 E574 E2FE 1175 LOOP F12 E576 3302 1176 XOR OX,OX ; SELECT DRIVE 0 E578 B501 1177 HOV CH,I ; SELECT TRACK 1 E57A 88163EOO 1178 HOV SEEK_STATUS,Dl E57E fBFcoe 1179 CALL SEEK ; RECAlIBIlATE DISKETTE E581 1207 1180 JC F13 ; GO TO ERR SUBROUTINE IF ERR E583 6522 1181 HOV eH,34 ; SELECT TRACK 34 E585 E8F5DB 1182 CALL SEEK ; SE EK TO TRACK 31+ E588 7307 1183 JNC F14 ; OK, nrRN MOTOR OFF E58A 1184 F13: I OSK_ERR: ES8A 6E52EC90 1185 MOV 51 ,OFFSET F3 J GET ADOR OF MSG ESSE E81814 1186 CAll E_MSG ; GO PRINT ERROR MSG 1187 1188 ;----- TURN DRIVE 0 HOTDR OFF 1189 E591 1190 ; ORO_OFF: E591 BoDe 1191 MOV AL.OCH i TURN DRIVE 0 HOTOR OFF E593 BAF203 1192 MaV DX,03F2H ; FoC tTL ADDRESS E596 EE 1193 OUT OX.AL 1194 1195 ; ----- SETUP PRINTER AND R5232 BASE ADDRESSES IF DEVICE ATTACHED 1196. [597 1197 F1S: E597 C606660000 1198 MOV INTRJlA.G.OOH ; SET STRAY INTERRUPT FLAG = 00 E59C 8EIEOO 1199 MDV SI.OFFSET KB_BUFFER ; SETUP KEYBOARD PARAHETERS E59F 89361AOO 1200 MOV BUFFER_HEAD ,51 E5A3 8936ICOO 1201 MOV BUFfER_TAIL,S! E5A7 89368000 1202 MOV BUFFER_START .51 E5AB 83C620 1203 ADD 51.32 .OEFAUlT BUFFER OF 32 BYTES ESAE 89368200 1204 MOV BUFFER_EI'I),SI E582 BF7S0D 1205 MOV DI,OFFSET PRINT_TIM_OUT ;SET DEFAULT PRINTER TIMEOUT ES65 IE 1206- PUSH OS E586 07 1207 POP ES System BIOS A-I7 LOC OBJ LINE SOURCE ES67 681414 120a HOV AX,1414H ) OI;FAUL T=20 ES6A AB 1209 STOSW Esse AS 1210 STOSW ESSC B80101 1211 MOV AX,OlOlH ;RS232 DEFAUlT=OI ESBf AB 1212 STOSW £5eo AS 1213 STOSW E5Cl £421 1214 IH Al,IHT"'OI E5C3 24fC 1215 AND AL.OFCH I ENABLE TIHER AND KB INTS ESC5 E6Zl 1216 OUT INTAOl .... l ESC7 83FDOO 1211 CMP BP.OOOOH i CHECK FOR ep= NON-ZERO 1218 ; (ERROR HAPPENED J ESCA 7419 1219 JE ) CONTINUE IF NO ERROH Esec 8A0200 1220 MOV OX.2 • 2 SHORT BEEPS (ERROR) E5CF E80614 1221 CALL ERR_BEEP E502 8E09£890 1222 MOV SI.0FFSET no ; LOAD ERROR MSG E506 E8F1l3 1223 CAll P_MSG E509 1224 E509 8400 1225 MOV AH.OO E508 CD16 IH6 INT 16H ; WAIT FOR 'Fl' KEY E500 BOFtlB 1221 CHP AH,36H E5EO 75F7 1228 JHE ERR_WAIT ESE2 EBOE9D 1229 JHP FlSA ; BYPASS ERROR E5E5 1230 ESES 803£120001 1231 eMP MFG_TST ,I I MFG HODE ESE A 7406 1232 JE FI5A ; BYPASS BEEP ESEC BMIDO 1233 HOV OX,l ; I SHORT BEEP (NO ERRORS) E5EF E8E6n 1234 CALL ERR_BEEP ESF2 AOI000 1235 F15A: MOV AL,BYTE PTR eqUIP_FLAG ; GET SWITCHES ESFS 2401 1236 AHO AL,OOOOOOOlB ; 'LOOP POST' SWITCH ON ESF7 7503 1231 JHZ F15B ; CONTINUE WITH BRING-UP ESF9 E95FfA 1238 JHP START ESFC 2AE4 1239 F158: SUB AH,AH ESFE A04900 1240 HOV AL,CRT_MODE £601 COlO 1241 IHT IOH I CLEAR SCREEN f603 1242 FISC: f603 BDA3F990 1243 MOV BP,OFfSET F4 £607 BEOOOO 1244 HOV SI,O £60A 1245 F16: PRT_BASE: £60A 2E865600 1246 MOV DX.CS:(BPl ; GET PRINTER BASE ADaR EbOE BOA" 1247 MOV AL.OAAH ; WRITE DATA TO PORT A E610 EE 1248 OUT DX.Al £611 IE 1249 PUSH OS ; BUS SETTlEING HI2 EC 1250 IN AL,DX ; READ PORT A EOI3 IF 1251 POP OS E614 JeAA 1252 CM? Al,OAAH I DATA PATTERN SAME £616 7505 1253 JNE Fl7 ; NO - CHECK NEXT PRT CD E616 895408 1254 HOV PRINTER_BASE[ 51 J ,OX ; YES - STORE PRT BASE AODR £618 46 1255 INC SI ; INCREMENT TO NEXT WORD EblC 46 1256 INC SI £610 1257 F17: f61D 45 1258 INC B. ; POINT TO NEXT BASE ADOR E61E 45 1259 IHC BP E6lF 81FOA9F9 1260 CHP SP,OFFSET f4E ; AlL POSSIBLE ADDRS CHECKED? E623 75£5 1261 JNE fl6 i PRT_BASE E625 B60000 1262 HOV BX,O ; POINTER TO RS232 TABLE E628 SAFA03 1263 MOV DX,3fAH ; CHECK IF RS232 CO 1 ATICH? E628 EC 1204 IN AL.DX ; REAO INTR ID REG E6le MFS 1265 TEST AL,OF8H £62E 7506 1266 JHZ F18 f630 C707FaD} 1267 HOV RS232_BASE[ BX 1, 3f8H ; SETUP RS2.32. CD I I AoDR £634 43 1268 INC BX E635 43 1269 INC BX £636 1270 Fl8: £636 BAFA02 1271 HOV DX.2FAH I CHECK IF RS232 CO 2. AHCH £639 EC 1272 IN AL.DX ; READ INTERRUPT 10 REG E63A MFa 1273 TEST AL,OFaH Et.3e 7506 1274 JNZ fl9 J BASE_END E63E C7Q7FaD2 1275 HOV RS232_BASE[BX1,2F8H ; SETUP RS232 CO 12 E642: 43 1276 IHC BX E643 43 1277 INC ax 1278 1279 i----- SET UP EqUIP FLAG TO INDICATE HUMBER OF PRINTERS AHO RS232 CARDS 1281) £644 1281 E644 8Bt6 1282 HOV ; SI HAS 2* NUMBER OF RS232 E646 BI03 1283 HOV ; SHIFT COUNT E648 02e8 1284 ROR • ROTATE RIGHT 3 POSITIQtiS A-I8 System BIOS LaC OBJ LINE SOURCE EMA OAC3 E64e ",1100 1285 1286 ... NOV ,U,BL BYTE PTR EQUIP_FLAG+l.Al I OR IN THE PRINTER COUNT I STORE AS SECDI'IJ BYTE EMF BAOI0, 1287 MOV DX,20tH £652 Ee lZB8 IN ,H,DX £653 90 1289 NOP £654 90 1290 NOP £655 90 1291 NOP E656 A80F 1292 TEST AL,OFH £658 7505 1,93 JNZ F20 I NO_GAME_CARD EbSA 800E110010 1294 OR BYTE PTR EQUIPJLAG+l.l6 E65F 1295 F20: ; NO_GAME_CARD: 1296 1297 ; ----- ENABLE NMI INTERRUPTS 1298 E65F £461 1299 IN AL,PORT_B ; RESET CHECK ENABLES E661 DC 30 1300 OR AL.30H £663 E661 1301 OUT PORT_B,Al E665 24CF 1302 AND Al.OCFH £667 E661 1303 OUT PORT_B.AL £669 B080 1304 NOV Al.SOH j ENAslE HNI INTERRUPTS E66B £6AO 1305 OUT OAOH,AL £660 1306 F21 : ; LOAD_BooT_STRAP; E66D C019 1307 INT 19H I GO TO THE BOOT LOADER 1308 1309 1---------------------------------------------------------------- 1310 ; THIS SUBROUTINE PERFORMS A READ/WRITE STORAGE TEST ON A BLOCK : 1311 OF STORAGE. 1312 ENTRY REQUIREMENTS: 1313 ES '" ADDRESS OF STORAGE SEGMEHT BEING TESTED 1314 OS ; ADDRESS OF STORAGE SEGMEHT BEING TESTED 1315 CX = WORD COUNT OF STORAGE BLOCK TO 8E TESTED 1316 EXIT PARAMETERS: 1317 ZERO FLAG; 0 IF STORAGE ERROR (DATA COMPARE OR PARITY 1318 CHECK. AL=O DENOTES A PARITY CHECK. ELSE AL=-XOR I ED 1319 BIT PATTERN OF THE EXPECTED DATA PATTERN VS THE ACTUAL 132:0 DATA READ. 1321 ; AX,BX,CX,DX,DI. AND 51 ARE ALL DESTROYED. 132:2 ;---------------------------------------------------------------- 1323 E66F 1324 STGTST_CHT PROC NEAR E66F FC 1325 ClO ; SET aIR FLAG TO INCREMENT E670 2BFF 1326 SUB 01,01 ) SET DI=OFFSET 0 REl TO ES REG E672 28tO 1327 SUB AX.AX i SETUP FOR O-:>Ff PATIERN TEST E674 1328 C2_1: E674 8805 132:9 MOV IOI1.AL I ON FIRST BYTE £676 8ACS 1330 MOV AL.lDI] E678 32:C4 1331 XOR AL.AH ; O.K.? E67A 7540 1332 JNZ C7 i 60 ERROR IF NOT E67C FEC4 1333 INC A>! £67E 8AC4 1334 MOV AL.AH E680 75F2: 1335 JNZ C2_1 , LOOP TILL WRAP THROUGH FF E682 8809 1336 MOV ax.ex I SAVE WORD COUNT OF BLOCK TO TEST E684 DIEl 1337 SHl BX.1 ; CONVERT TO A BYTE COUNT E686 B8AAAA 1338 MOV AX.OAAAAH I GET INITIAL DATA PATTERN TO WRITE E689 BA55FF 1339 MOV OX.OFF55H I SETUP OTHER DATA PATTERNS TO USE E68C F3 1340 REP STOSI.! ; FILL STORAGE LOCATIONS IN BLOCK E680 AB E68E E461 1341 IN AL.PORT_B E690 OC30 1342 OR AL,OOllOOOOB I TOGGLE PARITY CHECK LATCHES E692 E661 1343 OUT PORT_S.AL E694 90 1344 NOP £695 24CF 134S AND AL,llOOllllB E697 E661 1346 OUT PORT_8.AL E699 1347 C3: E699 4F 1348 OEC DI I POINT TO LAST BYTE JUST WRITTEN E69A FD 1349 STO ; SET oIR FLAG TO GO BACKWARDS E698 1350 C4: E698 BBF7 1351 MOV SI.DI i INITIALIZE DESTINATION POINTER E69D BBCB 1352 NOV ex.ax j SETUP BYTE COUNT FOR LOOP E69f 1353 CSt INNER TEST LOOP E69F AC 1354 lOD58 ; READ OLD TEST BYTE FRON STORAG~ [51 JE6A.0 32 E6AO 32C4 1355 XOR AL.AH I DATA READ AS EXPECTED ? E6AZ 7525 l356 JNE C7 I NO - GO TO ERROR ROUTINE E6A4 8AC2 1357 MOV Al.DL I GET NEXT DATA PATTERN TO WRITE E6A6 All. 1358 STOSS ; WRITE INTO lOC JUST READ [DI J+ E6-'7 EZF6 1359 lOOP C5 ; DECREHWT BYTE CDl..tfr AN) lOOP CX 1360 E6"9 22:E4 1361 AND AH.AH ; Et-IJING ZERO PATTERN WRITTEN TO ST& ? E6AB 7416 136Z JZ C6X I YES - RETURN TO CAllER WITH AL=O System BIOS A-19 LaC OBJ LINE SOURCE £6"'0 8AEO 1363 HOV AH.Al ; seTUP NEW VALUE fOR COMPARE E6AF 86H 1364 XCHG OH.DL ; MOVE NEXT DATA PATTERN TO OL E6Bl 22E4 1365 AND AH.AH ; READING ZERO PATTERN THIS PASS? E6B3 7504 1366 JNZ C6 ; CONTINUE TEST SEQUENCE TILL ZERO DATA E6BS 8.0..04 1367 MOV DL.AH ; ELSE SET ZERO FOi;l END READ PATTERN E667 EBED 1368 JMP C3 i AND HAKE FINAL BACKWARDS PASS E6B9 1369 C6: E669 Fe 1370 CLD ; SET OIR FLAG TO GO FORWARD EbBA 47 1371 INC 01 I SET POINTER TO BEG lOCA lION E6BB 74DE 1372 JZ C4 ; REAO/Wf(ITE FORWARD IN STG EbBD 4F 1373 DEC 01 ; ADJUST POINTER [bBE 6AOI00 1374 NOV DX,OOOOIH i SETUP 01 FOR PARITY BIT AND 00 FOR END E6el E806 1375 JNP C3 ; READ/WRITE BACKWARD IN STG E6e3 1376 Cf,X: E6e3 E462 1377 1M AL,PORT_C I DID A PARITY ERROR OCCUR ? E6C5 24eo 1378 AND Al,OCOH I ZERO FLAG WILL BE OFF PARITY ERROR E6C7 BODO 1379 NOV AL.OOOH ; AL=Q DATA COMPARE OK E6C9 1380 C7: EOe9 rc 1381 CLD ; SET DIRECTION FLAG TO INC E6CA C3 1382 RET 1383 STGTST_CNT ,"up 1384 ; ------------------------------- -------------------------- -------------- 1385 ; PRINT ADDRESS AND ERROR MESSAGE FOR ROM CHECKSUM ERRORS 1386 ; -- --- - - -- - - - ---- ----- ---- - - - - - - ------ ----------- -- - -- -- - - - -- -- ----- --- --- EbCB 1387 RON_ERR PROC NEAR Ebee. 52 1388 PUSH OX ; S"VE POINTER Ebce 50 1389 PUSH AX EbCD BCDA 1390 HOV DX,OS ; GET .'.OORESS POINTER E6CF 2688361500 1391 HOV ES:MFG_ERR_FLAG.DH ; <><><> 1392 ; <><><>CHECKPOINTS CO->F4<> E604 81FAOOC8 1393 CMP DX.OC800H ; CRT CARD IN ERROR? E6D8 7eOD 1394 JL ROM_ERR_BEEP ; GIVE CRT CARD FAIL BEEP EbOA. EBFDIS 1395 CALL PRT_SEG ; PRINT SEGEMENT IN ERROR HOD BEOAF99Q 1396 HOV SI.OFFSET F3A I DISPLAY ERROR HSG E6El E8C512 1397 CALL E_MSG E6E4 1398 ROM_ERR_END : E6E4 58 1399 POP AX f6ES SA 1400 pop OX E6E6 C3 1401 RET E6E7 1402 ROM_ERR_BEEP; E6E7 BAOZO 1 1403 MOV OX.OI02H i BEEP 1 LONG. 2 SHORT EbEA E8E612 1404 CALL ERR_BEEP E6EO ESfS 1405 JMP SHORT ROM_ERR_END 1407 1408 j--- INT 19 --------------------------------------------- 1409 i BOOT STRAP LOADER 1410 TRACK D. SECTOR I IS READ INTO TIlE 1411 BOOT LOCATION (SEGMENT 0, OFFSET 7COO) 1412 ANO COHTROl IS TRANSFERRED THERE. 1413 1414 IF THERE IS A HAROWARE ERROR CONTROL IS 1415 TlliEN AN ERROR 1495 OCCURRED. 1496 (AHI=3 RETURN THE CQf1MO PORT STATUS IN (AX) 1497 AH CONTAINS THE LINE STATUS 1498 BIT 7 ::: TIME OUT 1499 BIT 6 : TRANS SHIFT REGISTER EMPTY 1500 BIT 5 == TRAN HOLDING REGISTER EMPTY 1501 SIT 4 = BREAK DETECT 1502 BIT 3 ::: FRAMING ERROR 1503 BIT Z = PARITY ERROR 1504 BIT 1 : OVERRUN ERROR 1505 BIT 0 : DATA READY 1506 AL CONTAINS THE HOD EM STATUS 1507 BIT 7 : RECEIVED LINE SIGNAL DETECT ·150B BIT 6 ::: RING INDICATOR 1509 BIT 5 == OATA SET READy 1510 BIT 4 = CLEAR TO SEt-iD 1511 BIT 3 ::: DELTA RECEIVE LINE SIGNAL DETECT 1512 BIT Z = TRAILING EDGE RING DETECTOR 1513 BIT 1 = DELTA DATA SET READY 1514 BIT 0 = DELTA CLEAR TO SEND 1515 1516 lOX) = PARAMETER INDICATING WHICH RS232 CARD (O.l ALLOWEO) System BIOS A-21 LaC OBJ LINE SOURCE 1517 151a , DATA AREA RS23,_BASE CONTAINS THE BASE ADDRESS OF THE 8250 ON THE 1519 CARD LOCATION 40GH CONTAINS UP TO 4 RS232 ADDREsses POSSIBLE 1520 DATA. AREA LABEL RS232_ TII'COUT (BYTE I CONTAINS OUTER lOOP COUNT 1521 VALUE FOR TIMEOUT (OEFAUlT=l) 1522 ; OUTPUT 1523 AX MODIFIED ACCORDING TO PAR!15 OF CALL 1524 All OTHERS UNCHANGED 1525 ; - ------- --- - - -------- --------- ---- ------ -- ---------- -- ---------- -- ------ 152:6 ASSUME CS:COOE.D5:0ATA E729 1527 ORG OE72:9H E729 15;:a Al LABEL WORD ; TABLE OF INIT VALUES E729 1704 1529 ow 1047 110 BAUD Ens 0003 1530 ow 768 150 E720 8001 1531 ow 384 ; 300 E72:F CODa 1532: ow 192 I 600 E731 6000 1533 ow 96 I 12:00 E733 3000 1534 ow 46 I 2400 E73S 1800 1535 ow 24 ; 4800 E737 DeaD 1536 ow 12 ; 9600 1537 E739 1538 PROC fAR 1539 1540 ;----- VECTOR TO APPROPRIATE ROUTINE 1541 (739 Fe 1542 STI INTERRUPTS BACK ON EnA IE 1543 PUSH DS SAVE SEGMENT E73B S2 1544 PUSH OX E73C 56 1545 PUSH 51 E73D 57 1540 PUSH 01 E73E 51 1547 PUSH ex E73F 53 1548 PUSH ex E740 aBF2 1549 MOV 51 ,ox i RSZ32 VALUE TO 51 E742 aBFA 1550 MOV DI,OX E744 DIE6 1551 SHl 51.1 ; WORD OFFSET E746 EBlon 1552 CALL ODS E7 49 SB14 1553 MOV DX.RSZ32_BASE[SII ; GET BASE ADDRESS E74B 0602 1554 OR OX,OX i TEST FOR 0 BASE ADDRESS E740 7413 1555 JZ A3 ; RETURN E74F OAE4 1556 OR AH.AH ; TEST FOR (AH ):::0 E751 741t> 1557 JZ A4 ; CDI1M\..IN INIT E753 FEte 1558 DEC AH ; TEST FOR (AH1=1 E755 7445 1559 JZ AS , SEND AL E757 FEee 1560 DEC AH ; TEST FOR (AH )=2 E759 746,1, 1561 JZ A12 ; RECEIVE INTO AL ElS6 1562 A2: E756 FEee 1563 DEC AH ; TEST FOR (AH )::3 E750 750l 1564 JNZ A3 E7SF (98300 1565 JMP Al8 ; COMMUNICATION STATUS f762 1566 A3: ; RETURN FROM RS232 f762 58 1567 pop BX f763 S9 1568 POP ex E764 SF 1569 POP 01 E765 Sf 1570 POP SI E7b6 SA 1571 POP OX f767 IF 157Z POP OS E768 CF 1573 IRET ; RETURN TO CALLER. NO ACTION 1574 1575 ;----- INITIALIZE THE COHMUNICATIONS PORT 1576 E769 1577 A4: E769 8AEO 1578 "DV AH.Al ; SAVE WIT PARMS IN AH E76B 63C203 1579 ADD OX.3 ; POINT TO 8250 CONTROL REGISTER E76E 6080 1560 NOV AL.60H E770 EE 1561 OUT OX,Al ; SET OLAB=l 158Z 1583 ;----- DETERHINE BAUO RATE DIVISOR 1584 E771 SAD4 1565 NOV OL,AH I GET PARMS TO DL E773 6104 1586 MOV CL,4 E775 02e2 1587 ROL OL.CL E777 alE20Eoo 1586 ANO OX,OEH I ISOLATE THEM E77S BF29E7 1589 NOV OI,OFFSET Al ; BASE OF TABLE E77E 03FA 1590 AOO OI.DX I PUT INTO INDEX REGISTER Elea 8614 1591 MOV ; POINT TO HIGH ORDER OF OIVISOR E782 42 1592 we Ox E783 2E6A4501 1593 NOV AL.eS:[OIhl ; GET HIGH ORDER OF OIVISOR A-22 System BIOS LaC OBJ LINE SOURCE E7B7 EE 1594 OUT aX.AL I SET MS OF DIY TO 0 £788 4A 1595 DEC OX £789 2E8A05 1596 MeV AL.Sc:[aIl I GET LOW ORDER OF DIYISOR E78C EE 1597 OUT aX.AL I SET LOW OF DIVISOR nBD 83C203 1598 ADD OX,3 [790 BAC4 1599 MV AL,AH I GET PARMS BACK E792 24lF 1600 AND AL.OIFH i STRIP OFF THE BAUD BITS E794 EE 1601 OUT aX,Al J LINE CONTROL TO 8 BITS E795 44 1602 DEC OX E796 4A 1603 DEC OX £197 BOOO 1604 MOV AL.O E799 EE 1605 OUT aX.AL ; INTERRUPT ENABLES ALL OFF E79A E649 1606 JMP SHORT A16 ; COM_STATUS 1607 1606 ;----- SEND CHARACTER IN {AU OVER COMMO LINE 1609 E79C 1610 AS: e79C 50 1611 PUSH AX ; SAVE CHAR TO SEND E790 83C204 1612 ADD DX.4 J MODEM CONTROL REGISTER E1AO B003 1613 HOV AL.3 j DTR AND RTS E7A2 fE 1614 OUT OX,Al ; DATA TERMINAl READY, REQUEST TO SEND E7A3 42 1615 INC DX ; MooEH STATUS REGISTER E744 42 1616 INC OX E7AS 8730 1617 HOV BH.30H I DATA SET READY & CLEAR TO SEND E7A7 E84800 1616 CAll WAITJOR_STATUS ; ARE BOTH TRUE f7U 7408 1619 JE A. ; YES, READY TO TRANSMIT CHAR E7AC 162:0 A7: ElAC 59 1621 pop cx ElAD 6ACI 1622 MOV AL.CL I RELOAa DATA BYTE E7AF 1623 AS: E7AF 80CC60 1624 OR AH .SOH ; INDICATE TIME OUT E782 EBAE 1625 JMP A3 ; RETURN E7B4 1626 A9: ; CLEAR_TO_SEND E764 4A 1627 DEC OX I LINE STATUS REGISTER E7BS 1626 AID: E765 8720 1629 NOV BH.20H I 15 TRANSMITTER READY E7B7 E83800 1630 CALL WAIT]OR_STATUS I TEST FOR TRANSMITTER READY E7BA 75FO 1631 JNZ A7 ; RETURN WITH TIME OUT SET E7BC 1632 All: ; OUT_CHAR nec IHEADS 1633 SUB OX.s ; DATA PORT E76F 59 1634 POP CX ; RECOVER IN CX TEMPORARILY E7eo BACl 1635 MOV AL.CL ; HOYE CHAR TO AL FOR OUT. STATUS IN Nt E7C2 EE 1636 OUT aX.AL ; OUTPUT CHARACTER E7C3 EB9D 1637 JMe A3 ; RETURN 1638 1639 1----- RECEIVE CHARACTER FROM COMMa LINE 1640 E7C5 IMI ",12: E7CS 83C204 1642 ADO DX,4 I MODEM CONTROL REGISTER E7ea 6001 1643 MOV ALot i DATA TERMINAL READY E7CA EE 1644 OUT OX.AL E7eB 42 1645 INC OX ; MODEM STATUS REGISTER Elee 42 1646 INC OX nco 1647 AU: ; NAIT_DSR nco 87ZD 1648 HOV BH,20H I DATA SET READY E7CF EB2000 1649 CALL WAIT_FaR_STATUS t TEST FOR DSR E702 7508 1650 JNZ AS ; RETURN WITH ERROR E704 1651 A15: i WAlT_DSR_END E7D4 4A 1652 DEC OX j LINE STATUS REGISTER E705 1653 A16: nos 6701 1654 11011 SH.l ; RECEIVE BUFFER FULL E7D7 E81800 1655 CALL WAITJOR_STATUS ; TEST F()I;! REC. BUFF. FULL ElOA 7503 1656 JNZ A6 I SET TIME OUT ERROR ElOC 1657 A17: ; GET_CH.4.R ElOC aOE41E 1658 AND AH.OOOl1110B j TEST FOR ERR CONDITIONS ON RECV CHAR E?OF 8814 1659 MOV ; DATA PORT nEl EC 1660 IN AL.OX I GET CHARACTER FROH LINE E7E2 E97DFF 1661 JMP A3 i RETURN 1662 1663 J----- Cot1\10 PORT STATUS ROUTINE 1664 E7E5 1665 A18: E7ES 8814 1666 MOV OX ,RS232_BASE [SI J E7E7 63C205 1667 ADD OX.S ; CONTROL PORT ElEA EC 1668 IN AL,OX ; GET LINE CONTROL STATUS ElEe BAED lb69 MeV AH.AL I PUT IN AH FOR RETURN ElED 42 16070 INC OX I POINT TO MODEM STATUS REGISTER System BIOS A-23 LOC OBJ LINE SOURCE ElEE EC 1611 IN AL,DX ; GET MODEM CONTROL STATUS E7EF E970FF 1672 JMP A3 i RETURN 1673 ; ------- --- -- -- --------- ---- ------------- 1674 ; WAIT FOR STATUS ROUTINE 1675 ; 1676 ; ENTRY: 1677 BH=STATIJS BITIS) TO LOOK FOR. 1678 DX=ADOR. OF STATUS REG 1679 ; EXIT: 1680 ZERO FLAG ON = STATUS FOUND 1681 ZERO FLAG OFF = TIMEOUT. 1682 AH=LAST STATUS READ 1683 E7F, E7F2 BAS07C 1684 1685 WAIT_FOR_STATUS PROC MOV NEAR BL ,RSZ32_TIH_OUTIOI 1 , LOAD OUTER LOOP COUNT E7F5 1686 WFSO: ElFS 26C9 1687 sue CX,cx Elf7 1688 WFSl: E7f7 EC 1689 IN Al,DX ; GET STATUS EYF8 8AEO 1690 MOV AH,AL ; HOVE TO AH E7FA 22C7 1691 ANIl AL,BH I ISOLATE BITS TO TEST ElFC 3AC7 1692 CMP AL,BH ; EXACTLY = TO MASK E7FE 7408 1693 JE WFS_END ; RETURN WITH ZERO f LAG ON EBOO E2F5 1694 LOOP WFSI ; TRY AGAIN E802 FEee 1695 DEC BL E804 75Ef 1696 JHZ WFSO 1697 E806 OAFF 1698 DR BH,BH I SET ZERO FLAG OFF E808 1699 WFS_END: E808 C3 1700 RET 1701 WAITJOR_STATUS WOP 1702: ENDP 1703 E809 45525Z4FS22EZO 1704 '3D DB 'HmOR. (RESUME = Fl KEY)',13,10 ; ERROR PROMPT 28524553554045 20302022463122 2045455929 E623 00 Ea24 01 1705 1706 1---- INT 16 ------------------------------------------------------------ 1707 I KEYBOARD 110 1708 THESE ROUTINES PROVIDE KEYBOARD SUPPORT 1709 i INPUT 1710 (AH )=0 READ THE NEXT ASCII CHARACTER STRUCK FROM THE KEYBOARD 1711 RETURN THE RESULT IN (All, SCAN CODE IN (AH) 1712 (AHl=l SET THE Z FLAG TO INDICATE IF AN ASCII CHARACTER IS 1713 AVAILABLE TO BE READ. 1714 (ZF )=1 -- NO CODE AVAILABLE 1715 (Zf )=0 -- COOE IS AVAILABLE 1716 IF ZF = 0, THE NEXT CHARACTER IN THE BUFFER TO BE READ 1717 IS IN AX. AND THE ENTRY REMAINS IN THE BUFFER 1718 (AH )=2 RETURN THE CURRENT SHIFT STATUS IN AL REGISTER 1719 THE BIT SETIINGS FOR THIS CODE ARE INDICATED IN THE 1720 THE EQUATES FOR KBJLAG 1721 ; OUTPUT 1722 AS NOTED ABOVE. ONl'fAX ANO FLAGS CHANGED 1723 ALL REGISTERS PRESERVEO 1724 ;------------------------------------------------------------------------ 1725 ASSUME CS ;CODE ,OS: DATA E82E 1726 D'G OfS2EH Ea2E 1727 KEYBOARD_IO PROC FAR f82E FB 1728 ST! I INTERRUPTS BACK ON E8lF IE 1729 PUSH os i SAVE CURRENT OS E830 53 1730 PUSH BX j SAVE BX TEMPORARILY E831 E82512 1731 CALL DDS E834 OAE4 1732 DR AH,AH I AH=O E836 740A E838 FEee 1733 1734 JZ DEC " AH I ASCII_READ ; AH=l E83A 741E 1735 JZ .2 I ASCII_STATUS E83C FEee 1736 DEC AI! I AH=2 E61E 7426 1737 JZ K3 I SHIFT_STATUS E840 EelC 1738 JMP SHORT INTIO_ENO I EXIT 1739 1740 ;----- READ THE KEY TO FIGURE OUT WHAT TO DO 1741 E842 1742 Kl: I ASCII REA.[) A-24 System BIOS LOC OBJ LINE SOURCE E842 FB 1743 STI • INTE~~UPTS BACK ON DURING lOOP E843 90 1744 NOP ; AllOW AN INTER~UPT TO OCCIA'! E844 FA 1745 eLI J INTE~~UPTS BACK OFF E845 861EI.100 1746 MOV aX. BUFFER_HEAD I GET POINTER TO HEAD OF BUFFER E849 3alElCOO 1747 eMP ex,BUFFER_TAIL • TEST END Of BUFFER [840 74F3 1748 JZ Kl , LOOP UNTI l SOMETHING IN BUFFER E84f 6B07 1749 HOV AX.raX) ; GET SCAN COOE At-I) ASCII COOE E851 E81DOO 1750 CALL K4 ; MOVE POINTER TO NEXT POSITION [654 891EI.1DO 1751 MOV aUFFER_HEAO.8X ; STORE VALUE IN VARIABLE E858 E614 1752 JMP 5HO~T INTlO_END ; RETURN 1753 1754 ;----- ASCII STATUS 1755 E85A 1756 K2: f85A FA 1757 eLI I INTERRUPTS OFF E856 eBIElAOO 1758 MOV 8X.BUFFER_HE.t.D ; GET HEAD POINTER E85F 381E1COO 1759 eMP BX.BUFfE~_TAIL ; IF EQUAL (Z=l) THEN NOTHING THERE E863 a607 1760 MeV AX.IBXJ [865 FB 1761 STI ; INTERRUPTS BACK ON E866 58 1762 POP BX ; RECOVER REGISTER os E867 If E668 CA0200 1763 1764 'OP OET , J RECOVER SEGMENT ; THROW AWAY FLAGS 1765 1766 j----- SHIFT STATUS 1767 E86B 1768 K3: E86B A01700 1769 MOV AL.KBJlAG ; GET THE SHIFT STATUS FLAGS E8bE 1770 Ea6E 58 1771 BX ; RECOVER REGISTER E86F If 1772 POP OS ; RECOVER REGISTERS E870 CF 1773 I~ET I RETl/RN TO CALLER 1774 ENOP 1775 1776 ;----- INCREMENT A BUFFER POINTE~ 1777 Ea7l 1778 K4 PROt NEA~ [a7l 43 1779 INC BX ; MOVE TO NEXT WORD IN LIST E872 43 1780 INC BX E873 381E8200 1781 CMP BX.BUffER_ENO I AT END OF BUFFER? f877 7504 £879 681E8000 1782 1783 JNE HOV "5 BX.BUFFER_STA~T ; NO. CONTINUE ; YES. RESET TO BUFFER BEGINNING E87D 1784 K5: EalD C3 1785 RET 1786 K4 ENOP 1787 1788 1----- TABLE OF SHIFT KEYS AND MASK VALUES 1789 [elE 1790 K6 LABEL BYTE [e7E 52 1791 DB INS_KEY ; INSERT KEY [elf 3A 1792: DB E88D 45 E881 46 E882 38 E883 10 [884 lA 1793 OB E885 36 0006 1794 1795 K6L EI'" 1796 ;----- SHIFT_MASK_TABLE 1797 E886 179~ <7 LABEL BYTE E886 &0 179'9 DB INS_SHIFT ; INSERT MODE SHIFT EB87 40 1800 DB E888 20 [889 10 EMA 08 ESSS 04 EBBC 02 1801 OB E860 01 1802 IS03 ;----- SCAN CODE TABLES 1804 E8BE 18 1805 "8 DB 27. -1. O. -1.-1.-1. 30 ,-I fB8F FF E890 00 [891 FF [992 FF System BIOS A-25 LOC OBJ LINE SOURCE E893 FF E894 IE E895 Ff E896 FF 1806 DB -1.-1.-1,31,-1,127.-1,17 E897 FF E898 FF E899 IF f89.6. FF E698 7F E89C FF E890 11 E89E 17 1807 DB 2l, 5,18.20.25,21.9,15 E89F 05 E8AO 12 f8Al 14 E8A2 19 f8A3 15 E8A4 09 E8A5 OF f8A6 10 1808 DB 16.27,29,10,-1,1,19 fSA7 IB E8A8 10 f8A9 OA fSAA FF E8A8 01 faAC 13 EBAD 04 1S09 DB 4,6,7.8.10,11.12,-1.-1 fBAE 06 fBAF 07 E6BO 08 E881 OA f882 DB E8B3 DC ES64 FF EBBS FF EBBb FF 1810 DB -1.-1.2.8,26.24.3.22.2. E6B7 FF E8B8 Ie E8B9 lA EBBA 18 EBBB 03 EBBC 16 EBBD oz EBBE DE 1811 DB 14,13,-1.-1, -1.-1.-1.-1 f8BF 00 E8CO fF EBCl fF f6t2 FF E8C3 FF E8C4 FF Eees FF E8C6 ZO 181z DB ' ,-I E8C7 ff 1813 ;----- eTl TABLE SCAN E8C8 1814 K' LABEL BYTE EaC8 Sf 1815 DB 94,95.96,97.96,99.100,101 EaC9 SF EBtA 60 E6CB 61 Eace 62 f8CO 63 fSCE 64 EeeF 65 E8DO 66 1816 DB 102..103, -1. -1.119. -1.132..-1 E8Dl 67 EeD2. FF E803 FF E804 77 E805 FF E806 84 E807 FF E8D8 T! 1817 DB 115,-1.116.-1.117.-1,118.-1 E809 FF EaDA 74 E80B FF E80C 75 E8DO FF A-26 System BIOS LOC OBJ LINE SOURCE l~£ 76 ESDF FF E8EO FF 1818 DB -1 1819 i ----- lC TABLE E8El 182:0 010 LABEl BYTE E8El 1B 1821 DB OISH. '1234567890-= I • DSH. 09H EBEl 3132:3334353637 3839302030 EBEE 08 EeEF 09 fBfO 71776572747975 1822: DB 'qwertyuiop{ J' .COH,-I. 'udfghjkl;' .027H 696F705B5D E8FC 00 EBFO FF E8FE 6173646667686,4 686e38 E908 27 E909 60 1823 DB 60H. -1.seH •• zxcvbtw • • 1' .-1. '* .• -1. ' E90A FF E90B 5C E90t 7A786376626E60 :;>C2E2F E916 FF E917 2A E9lS FF E9l9 20 E91A FF 182:4 DB -1 1825 ; ----- UC TABLE E918 1826 K11 LABEL BYTE E9lB IB 1827 DB 27. ' !Oill& I .37 .05EH, • &*( 1_ +' .08H,0 E91C 21402324 E92:0 25 E921 Sf E9Z2 262:A28295F28 E928 08 E929 00 EnA 51574552:545955 1828 DB 'QWERTYUIOP{}' .OoH. -1. 'ASOFGHJKL:'" 494F507870 E936 00 E937 fF £938 4153444647484.1. 4B4ClA22: E943 7E 1829 DB 07EH. -1 •• I ZXCVBHH<:>? , .-1,0.-1. ' , .-1 E944 FF E94S 7C5A584356424E 4D3C3E3F E950 FF E951 00 E952 FF E953 zo E954 FF 1830 ; ----- UC TABLE SCAN E955 1831 Oil LABEL BYTE E955 54 1832 DB 84 ,85,86 .87.8~h89, 90 E956 55 E957 56 E956 57 E959 58 E9SA. 59 E95B SA E95C 58 1633 DB 91.92.93 E950 5C E95E 50 1834 ;----- A.lT TABLE SCAN E95F 1835 013 LABEL BYTE E95F 66 1836 DB 104.105.106,107,106 £960 69 E961 6A E962 6B E963 6C £%460 18~7 DB 109,110,111.112.113 E965 6E E966 6F E967 70 E968 71 1636 j----- HUH STATE TABLE E96' 1639 01. LABEL BYTE System BIOS A-27 LOC OBJ LINE SOURCE E969 3738392D343536 1840 Da , 789-456+11:30. I 28313233302'£ 1641 ; ----- BASE CASE TABLE E976 1842 K15 LABEL BYTE E976 47 1843 Da 71.72,73.-1.75.-1.77 E977 48 E978 49 E979 FF E97A 46 E978 FF E97C 40 E97D fF 1844 Da -1.79,80,81.82.83 E97E 4F E97F 50 E980 51 E981 52 E982 53 1645 1846 ;----- KEYBOARD INTERRUPT ROUTINE 1647 E987 1848 ORG OE987H E987 1849 KB_INT ""DC FAR E987 FB 1850 STI I AlLOW FUIHHER INTERRUPTS E988 50 1651 PUSH AX E9B9 53 185::: PUSH ax E98A 51 1653 PUSH ex E988 52 1854 PUSH ox E98C 56 1855 PUSH 51 E980 57 1856 PUSH DI E98E IE 1857 PUSH os E98F Db 1858 PUSH ES E990 Fe 1859 eLD ; FORWARD DIRECTION E991 E8C510 1860 CALL DDS E994 E460 1861 IN AL.KB_DATA ; READ IN TIlE CHARACTER E996 50 186::: PUSH AX j SAVE IT E997 E461 1863 IN AL.KB_eil j GET THE CONTROL PORT E999 8AEO 1664 MOV AH.AL • SAVE VALUE E998 OC60 1865 OR AL.80H I RESET BIT FOR KEYBOARD E99D E661 1866 OUT KB_CTl,AL E99F 86EO 1667 XCHG AH.A.L ; GET BACK ORIGINAL CONTROL E9Al E661 1868 OUT KB_CTl.AL ; KB HAS BEEN RESET E9A3 58 1669 POP AX I RECOVER SCAN CODE E9A4 6AEO 1670 HOV AH.Al ; SAVE SCAN CODE IN AH AlSO 1871 1872: ; ----- TEST FOR OVERRUN SCAN CODE FROM KEYBOARD 1873 E9A6 3CFF 1874 eMP AL.OfFH j IS THIS AN OVERRUN CHAR E9A6 7503 1875 JHZ K16 j NO. TEST FOR SHIFT KEY E9AA E97A02 1876 JMP K.2 I BUFFERJUlL_BEEP 1877 1878 ;----- TEST FOR SHIFT KEYS 1879 E9AO 1680 K16 : I TEST_SHIFT E9AD 247F 1881 ANO AL.07FH ; TURN OFF THE BREAK BIT E9AF DE 1882 PUSH es E9BO 07 1883 POP ES ; ESTABLISH ADDRESS OF SHIFT TABLE E981 BnEEa 1884 MOV DI.OFFSET K6 ; SHIFT KEY TABLE E9B4 B90800 HI85 HOV CX.K6L LENGTH E987 F2 1886 REPHE SCASS ; lOOK THROUGH THE TABLE FOR A MATCH E9B6 AE E989 8AC4 1887 MOV AL.AH ; RECOVER SCAN CODE E9SB 7403 1888 JE K17 ; JUMP IF MATCH FOUN[) E'ilBD E9S500 1889 JMP K25 ; IF NO MATCH. THEN SHIFT NOT FOUND 1890 1891 ;----- SHIFT KEY FOUND 1892 E9CO 81EF7FE8 1693 K17: SUS DI.OFFSET K6+1 ; ADJUST PTR TO SCAN CODE MiCH E9C4 2E6AA586E8 1894 MOV AH.CS:K7(DII j GET MASK nno AH E9C9 ABBO 1895 TEST ,H.80H I TEST FOR BREAK KEY E'ilCe 7551 1896 JNZ K23 ; BREAK_SHIFTJQUND 1897 1698 j----- SHIFT MAKE FOUND. DETERMINE SET OR TOGGLE 1899 E9CD aOFCIO 1900 eMP AH.SCROLL_SHIFT HOD 7307 1901 JAE K18 j IF SCROLL SHIFT OR ABOVE. TOGGLE KEY 1902 1903 1----- PLAIN SHIFT KEY, SET SHIFT ON A-28 System BIOS LOC OBJ LINE SOURCE 1904 E9D2 08261700 1905 DO KB_FLAG.AH J Tl.RN ON SHIFT BIT £9D6 £98000 1906 JMP K2. J INTERRUPT_RETURN 1907 1908 ;----- TOGGLED SHIFT KEY. TEST FOR 1ST MAKE OR NOT 1909 E909 1910 KI8: J SHIFT~TOGGLE E909 F60617QOO4 1911 TEST KB_FLAG. eTL_SHIFT I CHECK eTL SHIFT STATE E9DE 7565 1912 JHZ K25 i JlI1P IF eTl STATE E9EO 3C52 1913 CMP AL. INS_KEY ; CHECK FOR INSERT KEY E9E2 75Z2 1914 JHZ K22 J JlR1P IF HOT INSERT KE'f £9E4 F606170008 1915 TEST KBJLAG. ALl_SHIFT I CHECK FOR AL TERHATE SHIFT E9E9 755A 1916 JHZ K25 I JUMP IF ALTERNATE SHIFT E9EB F606170020 1917 K19: TEST KBJLAG, "AJt,-STATE I CHECK FOR BASE STATE E9FO 7500 1918 JHZ K21 I JUMP IF NUM LOCK IS ON E9F2 F606170003 1919 TEST KB_FLAG. LEFT_SHIFT+ RIGHT_SHIFT E9F7 7400 1920 JZ K22 j JlR1P IF BASE STATE 1921 E9F9 1922 K20: ; tuMERIC ZERO. NOT INSERT KEY E9F9 683052 1923 MII. 2:511 2:512 1----- ALLOW WRITE ROUTINE TO FALL INTO RW_OPN 2:513 2514 1---------------------------------------------------------------- 2515 I RI,COPN 2516 I THIS ROUTINE PERFORMS THE READIWRITE/VERIFY OPERATION 2:517 1---------------------------------------------------------------- f04A 2518 RW_OPH .ROC NEAR E04A 730a 2519 JNe J11 ; TEST FOR DMA ERROR E04C C606410009 2520 HOV DISKETTf_STATUS.DMA_BOUNOARY I SET ERROR E051 BODO 252:1 MOV AL.O i NO SECTORS TRANSFERRED E053 C3 2522 RET I RETURN TO MAIN ROUTINE E054 2523 Jll: i DO_RW_OPN E054 50 2524 PUSH AX I SAVE THE COI1HAND 2525 2526 ; ----- TURN ON THE I1OTOR ANO SElECT THE DRIVE 252:7 EOSS 51 2528 PUSH ex I SAVE THE T/S PARMS E056 eACA 2529 HOV CL.DL I GET DRIVE HUMBER AS SHIFT COUNT E058 BOOI 2530 MOV ALol j MASK FOR DETERMINING HOTOR BIT E05A D2EO 2531 SAL Al,CL j SHIFT THE MASK BIT E05C FA 2:532: eLI I NO INTERRUPTS WHILE DETERMINING 2533 I MOTOR STATUS E050 C6064000FF 2534 MOV HOTOR_COUNT I OFFH j SET LARGE COUNT D~ING OPERATION E062 84063FOO 2535 TEST AL,HOTPR_STATUS I TEST THAT MOTOR FOR OPERATING E066 7531 E068 a0263FOOFO 2536 2:537 ..., JHZ Jl' I1OTOR_STATUS , OFOH I IF R~ING, SKIP THE WAIT i TURN OFF ALL MOTOR BITS ED6D 08063FOO 2538 OR I1OTOR_STATUS.Al I TURN ON THE CLRRENT HOTDR E07l FB 2539 STI I INTERRUPTS BACK ON Eon BOlO 2540 MOV Al,IDH ; MASK BIT E074 02EO 2541 SAL Al.Cl ; DEVELOP BIT HASK FOR HOTOR ENABLE E076 OAC2 2542 OR Al.OL I GET DRIVE SE LECT BITS IN E078 neoc 2543 OR Al.OCH J NO RESET. ENABLE DHA/INT ED7A S.2 2544 PUSH OX I SAVE REG E07B BAF203 2545 HOV DX.03F2H ; CONTROL PORT ADDRESS ED7E EE 2546 OUT DX,Al ED7F SA 2547 PO. ox ; RECOVER REGISTERS 2:546 2549 ;----- WAIT FOR MOTOR IF WRITE OPERATION 2550 E060 F6063Fooao 2551 TEST MOTOR_SUTUS.60H ; IS ntIS A WRITE ED85 7412 2552 JZ J1' I NO I CONTINUE WITHOUT WAn E087 8B1400 2553 MOV BX.2:0 J GET THE HOTOR WAIT EDaA E80FOO 2554 CALL tiET_P...RM I PARAMETER EC80 OAE4 2:555 OR AH.AH ; TEST FOR NO WAIT EDSF 2556 J1Z: I TEST_WAIl_TINE eOSF 7408 2557 JZ Jl' I EXIT WITH TIHE EXPIRED ED91 2&9 2558 SUB cx.cx I SET UP 118 SECOND LOOP TIME £093 2559 J13: ED93 E2FE 2560 LOO. J13 • WAIT FOR THE REQUIRED TIME System BIOS A-37 LOC OBJ LINE SOURCE E095 FEte 2561 DEC AH I DECREMENT TIME VALUE £097 EBF6 2562 JHP J12 I ARE WE DONE YET E099 2563 J14: I MOTOR_RUNNING [099 FB 2564 STI ~ INTERRUPTS BACK ON FOR BYPASS WAIT ED9A 59 2565 pcp CX 2566 2567 ;----- DO THE SEEK OPERATION 2568 ED9B EBOFOO 2569 CALL SEEK ; MOVE TO CORRECT TRACK E09E 58 2570 POP AX I RECOVER COMMAHO E09F 8AFe 2571 HOV BH.AH j SAVE COMMAND IN 8H fOAl B600 2sn HOV DH.O ; SET NO SECTORS READ IN CASE OF ERROR EOA3 72.48 2573 JC J17 ; IF ERROR. THEN EXIT AFTER MOTOR OFF EDAS BEFOED90 2574 HOV 5I.OFFSET J17 ; DUMMY RETURN ON STACK fOR NEt_OUTPUT EDA.9 56 2575 PUSH S1 SO THAT IT WILL RETlIRN TO MOTOR OFF 2576 , LOCATION 2577 Z578 ,----- SEND OUT THE PARAMETERS TO THE CONTROLLER 2579 EDAA £89400 2sao CALL NEC_OUTPUT ; OUTPUT THE OPERATION COMMAND EDAD 8,6.6601 2581 HOV AH.[BP+l1 ; GET THE CURRENT HEAD NUMBER EOBO 00E4 2582 SAL AH.1 ; MOVE IT TO BIT 2 EOB2 DOE4 2583 SAL AH.l E064 80E404 2584- AND AH.4 I ISOLATE THAT BIT EOB7 OAE2 2.585 OR AH.DL ; OR IN THE DRIVE HUMBER EOM E88500 2586 CALL NEC~OUTPUT 2587 2586 ;----- TEST FOR FORMAT COMMAND 2.589 EDBC 80FF4D 2590 CHP SH ,04DH ; IS THIS A FORMAT OPERATION EDBF 7503 2591 JNE J1S i NO. CONTINUE WITH R/W/v EDCl E962FF 2592 JHP J10 i IF SO, HANDLE SPECIAL EOC4 2593 JIS: EDC4 8AES 2594 HOV AH.CH I CYLINDER NUtlBER EDC6 E87800 2595 CALL NEC_OUTPUT EDC9 8,0.,6601 2596 MOV AH,[BP+ll ; HEAD NUMBER fROM STACK EDCC E87200 2597 CALL NEC_OUTPUT EoeF BAEI 2598 HOV AH,CL ; SECTOR NUl1BER EoDl E&6000 2599 CALL NEC_OUTPUT ED04 880700 2600 HOV ex.7 ; BYTES/SECTOR PARM FROM BLOCK ED07 Esnoo 2601 CALL GET_PARM TO THE NEC EDDA BB0900 260i?: HOV BX.9 j EOT PARM FROM BLOCK EOoo E86COO 2603 CALL GET_PARM I TO THE NEe ED EO 880600 2.604 HOV eX.!l ; GAP LENGTH PARM FROM BLOCK EDE3 E88600 2605 CALL GET_PARM , TO THE NEC EDE6 e60000 2606 HOV ax.n ; DlL PARM FROM BLOCK 2607 J16: ; RIoI_OPNJINISH EOE9 EOE9 E68000 2608 CALL GET_PARI1 , TO THE NEt EDEC 5E 2609 POP S1 ; CAN NOW DISCARD THAT DlR1MY 2610 , RETURN ADDRESS 2611 2612 LET THE OPERATION HAPPEN 2613 EDED E84301 2614 CALL WAIT_INT ; WAIT FOR THE INTERRUPT EDFO 2615 J17: ; MOTOR_OFF EDFO 7245 2616 JC J21 , LOOK FOR ERROR EDF2 E87401 2617 CALL RESULTS I GET THE NEC STATUS EOF5 723F 2618 JC J20 , LOOK FOR ERROR 2619 2620 i ----- CHECK THE RESULTS RETURNED 6Y THE CONTROLLER 2621 EOF7 FC 2622 CLD ; SET THE CORRECT DIRECTION EOF8 BE4200 2623 HOV SI,OFFSET NEC_STATUS ; POINT TO STATUS FIELD EOFB Ae 2624 LaDS NEC_STATUS ; GET 5TO EOFC 24CO 2625 AND AL.OCOH i TEST FOR HORMAL TERI1IHATION EOFE 743B 2626 JZ J22 ; OPH_OK HOO 3C40 2627 CHP AL,040H I TEST FOR ABNORMAL TERMINATION EE02 7529 2628 JNZ J16 I NOT ABNORMAL, BAD NEC 2629 2630 1----- ABNORMAL TERMINATION. FIND OUT WHY 2631 EE04 At 2632 LDOS NEe_STATUS ; GET STl HOS DO EO 2633 SAL A.L,l ; TEST FOR EDT FOUHD EE07 B404 2634 HOV AH.RECORD_NOT]t.O EE09 7224 2635 JC J19 ; RW]AlL EEOB OOEO 2636 SAL AL.I EEOD DOEO 2637 SAL AL,! I TEST FOR CRt ERROR A-38 System BIOS lOC OBJ LINE SOURCE EEOF 8410 2638 HOV AH ,BAD_CRe EEll niC 2639 Je J1. I RW_FUl EEl3 ODED 2640 SAL Al.! I TEST fOR DMA OYERRlM EElS B408 2641 HOV AH.BAD_DHA EE17 7216 2642 Je J1' I RW]An £E19 ODED 2643 SAL Al.l EEIB OOEO 2644 SAL Al.1 I TEST FOR RECORD HOT FIXH) EE10 8404 2645 HOV AH,RECORD_.HOTJt«l EElF nOE 2646 Je J1' ; RW]AIL EE21 ODED 2647 SAL Al,! EE23 8403 2646 HOV AH. WRITE_PROTECT j TEST fOR NRITE_PRDTECT EE25 7208 2649 Je J1. I RN..FAIl. EE27 ODED 2650 SAL Al.I ; TEST MISSING ADDRESS HARK EE29 B402 2bS1 HOV AH. BAD_ADDR_HARK EE2B 1202 2652 Je J1. I RW]AIL 2653 2654 j----- NEe t1UST HAYE FAILED 2655 EElD 2656 JIB: I RW-NEC-FAIL Ef20 8420 2657 HOV AH.BAD_NEe EElF 2658 J19: I RN-FAIL 2659 DISKETTE_STATUS,AM EE2f 0&264100 E03 f87601 2660 "" CALL tAA1_TRANS ; HOW MANY WERE REALLY TRANSFERRED EE36 2661 JeD: I IU'CERR (;E36 C3 2662 OET ; RET!A:!N TO CAlLER EE3? 2663 J21: ; RIII_ERR_RES EEl7 E82FOI 2664 CALL RESULTS ; FLUSH THE RESULTS BUFFER EE3,4 Cl 2665 OET 2666 2667 ;----- OPERATION WAS SUCCESSFUL 2666 EE3B 2669 J22: ~ OPtCOK EDB E87001 2670 CALL NUH_TRANS ; HOW MANY GOT MOVED EE3E 32E4 2671 XOO AH.AH ; NO ERRORS EE40 C3 2672 RET 2673 RI'COPN ENOP 2674 ;------------------------------------------------------------------------ 2675 ; NEe_OUTPUT 2676 THIS ROUTINE SENDS A BYTE TO THE NEe CONTROLLER AFTER TESTING 2677 FOR CORRECT DIRECTION At«) CONTROLLER READY THIS ROUTINE WILL 2678 TIME OUT IF THE BYTE IS NOT ACCEPTED WITHIN A REASONABLE 2679 AMOUNT OF TIME. SETTING THE DISKETTE STATUS ON COMPLETION. 2680 INPUT 2681 (AH) BYTE TO BE OUTPlIT 2682 ; OUTPUT 2663 CY =0 SUCCESS 2664 CY = 1 FAILURE -- DISKETTE STATUS UPDATED 2665 IF A FAILURE HAS OCCURRED. THE RETURN IS HADE ONE LEVEl : 2666 HIGHER THAN THE CALLER OF NEe_OUTPUT. 2687 THIS REMOYES THE REQUIREMENT OF TESTING AFTER EYERY 2668 CALL OF NEC_OUTPUT. 2669 (AL) DESTROYED 2690 ;------------------------------------------------------------------------ Ef41 2691 NEC_OtJTPlIT PROC NEAR EE41 52 2692 PUSH OX J SAYE REGISTERS Ef42 51 2693 PUSH ex EE43 BAF403 2694 HOY DX.03F4H ; STATUS PORT EE46 33C9 2695 X"" cx.cx I COUNT FOR TIME OUT EE48 2696 J23: EE46 EC 2697 IN AL.DX ; GET STA.TUS EE49 A840 2698 TEST A.L~040H ; TEST DIRECTION BIT EE4B 740C 2699 JZ J2S I DIRECTION OK EE40 E2Ft 2700 lOOP JU EE4F 2701 J24: ; TIME_ERROR EE4F 600E410060 2702 OR DISKETTE_ST;'TUS, TIME_OUT EES4 S9 2703 POP ex EE55 5A 2704 POP OX ; SET ERROR CODE "NO RESTORE REGS EE56 58 2705 POP AX ; DISCARD THE RETURN ADORESS EE57 F9 2706 STe ; INDICATE ERROR TO CALLER EE56 C3 2707 OET EE59 2708 J25: EE59 33C9 2709 XOO Cx.cx ; RESET THE COlWT EE5B 2710 J26: EE5B EC: 2711 IN AL.DX j GET THE STATUS EESt A860 2712 TEST A.L.060H ; IS IT READY EESE 7504 2713 JHZ JZ7 I YES. GO OUTPUT EE60 E2F9 2714 LOOP J26 I COLNT DOWN ANO TRY AGAIN System BIOS A-39 LOC OBJ LINE SOURCE EE62 EBE8 2715 JMP J24 I ERROR CONO lTION EE64 2716 J27: ; OUTPUT EE64 SA-Cit 2717 MOV Al..AH I GET BYTE TO OUTPUT EE66 62F5 2718 MOV OL.OFSH I DATA PORT DFS) EE68 EE 2719 OUT DX.AL I OUTPUT niE BYTE EE69 59 2720 pop ex I RECOVER REGISTERS EE6A SA 2721 POP ox EE65 C3 2722 RET I CY = 0 FROH TEST INSTRUCTION 2723 NEe_OUTPUT ENDP 2724 I --------------- ------------------- ------------------------------ -------- 2725 I GET_PARt1 2.726 THIS ROUTINE fETCHES THE INDEXED POINTER FROM THE DISK_BASE 2727 BLOCK POINTED AT BY THE DATA VARIABLE DISK_POINTER. A BYTE FROM: 2726 THU TABLE IS THEN I10VED INTO AH I THE INDEX OF THAT BYTE BEING 2729 THE PARM IN BX 2730 I ENTRY -- 2731 ax = INDEX OF BYTE TO BE FETCHED * 2 2732 IF THE LOW BIT OF BX IS ON, THE BYTE IS I/'I1EDIATELY OUTPUT 2733 TO THE NEe CONTROLLER 2734 I EXIT -- 2735 AH = THAT BYTE FROM BLOCK 2736 ,------------------------------------------------------------------------ EE6C 2737 GET _PARM PROC NEAR EE6C IE 2736 PUSH OS I SAVE SEGMENT EE60 2BCO 2739 SUB AX,AX ; ZERO TO AX Ef6F 8E08 274t. MeV DS,AX 2741 ASSUME DS:ABSO EE71 C5367600 2742 LDS SI ,DIS~POINTER ; POINT TO BLOCK EE75 DIES 2743 SHR BX,l I DIVIDE ex BY 2, AND SET FLAG 2744 I FOR EXIT fE77 6A20 2745 MeV AH,[SI+BX) ; 6ET THE WORD EE79 iF 2746 POP OS I RESTORE SEGMENT 2747 ASSUME DS:DATA EE7,\ 72C5 2748 Je NEC_OUTPUT ; IF FLAG SET. OUTPUT TO CONTROLLER EE7e C3 2749 RET I RETURN TO CALLER 2750 GET_PARM ENOP 2751 1------------------------------------------------------------------------ 2752 I SEEK 2753 THIS ROUTINE WILL MOVE THE HEAD ON THE NAMED DRIVE TO THE 2754 NAMED TRACK. IF THE DRIVE HAS NOT BEEN ACCESSED SINCE TliE 2:755 DRIVE RESET Cot1I'\ANtl WAS ISSUED, THE DRIVE WILL BE RECALIBRATED. 2756 I INPUT 2:757 lOll !:: DRIVE TO SEEK ON 2758 I (CH) = TRACK TO SEEK TO 2:759 I OUTPUT 2760 CY ::: 0 SUCCESS 2:761 CY !:: 1 FAILURE -- DISKETTE_STATUS SET ACCORDINGLY 2.762 (AX) DESTROYED 2763 ;-----.------------------------------------------------------------------ EE70 2764 SEEK PRoe NEAR EE7D B001 2765 MeV AL,l ; ESTABLISH MASK FOR RECAL TEST EE7F 51 2:766 PUSH ex i SAVE INPUT VALUES fE80 BACA 2767 MOV CL,al ; GET DRIVE VALUE INTO CL fE82 Oleo 2:768 ROl AL,CL i SHIFT IT BY THE DRIVE VALUE Ef84 59 2769 pop ex ; RECOVER TRACK VALUE fE6S 84063EOO 2:770 TEST AL.SEEK_STATUS ; TEST FOR RECAL REQUIRED EE89 7513 2771 JHZ J2. ; NO_RECAL EEBB 06063EOO 2:772 OR SEEK_STATUS,AL ; TURN ON THE NO RECAL BIT IN FLAG EESF 6407 2773 MOV AH,07H I RECALIBRATE COt1l1AND E£91 E8ADFF 2774 CAlL NEC_OUTPUT EE94 BAH 2775 MOV AH.OL EE96 E8A8FF 2:776 CALL NEC_OUTPUT I OUTPUT THE DRIVE NUNBER EE99 E87600 2777 CALL CHK_STAT_2 I GET THE INTERUPT AND SENSE INT STATUS EE9C 1229 2778 JC J32 , SEEK_ERROR Z779 2780 1----- DRIVE IS IN SYHCH WITH CONTROllER I SEEK TO TRACK 2781 EE9E 2:78Z J2:8: EE9E B40F 2783 MOV AH.OFH I SEEK Cot1t1AND TO NEC EfAO E89EFF 2:784 CALL NEC_OUTPlIT EEA3 BAH 27&5 MOV AH.DL I DRIVE NUMBER EEAS E899FF 2786 CALL NEC_OUTPUT EfAS 6.6.E5 2787 MOV AH.CH I TRACK NUHBER fEAA E894FF 2:786 CAll NEC_OUTPUT EEAD E66200 2789 CALL CHK_STAT_2 I GET ENDING INTERRUPT AND 2:790 ; SENSE STATUS Z791 A-40 System BIOS lOC OSJ LINE SOURCE 2:792 ; ----- WAIT FOR HEAD SETTLE 2793 EEBD 9C 2794 PUSHF I SAVE STATUS FLAGS EEBI BB1200 2795 HOV BX.18 I GET HEAD SETTLE PARMETER EEB4 E8B5FF 2796 CAL.l GET_PARM fEB7 51 2797 PUSH CX I SAVE REGISTER fE68 2798 J29: ; HEAD_SETTLE EEBS 892602 2799 MOV tX,5S0 j 1 HS lOOP HBB OAE4 2800 OR AH,AH ; TEST FOR TIME EXPIRED EEBD 7406 2601 JZ JlI EESF Z802 J30: EESF E2FE 2803 LOOP J30 I DELAY FOR 1 ttS EECI FEee 2804 DEC AH ; DECREMENT THE CottfT fEtl fBF3 2805 JHP J29 ; DO IT SOHE HORE EEtS 2806 J31: fEtS S9 2807 POP ex o RECOVER STATE EEC6 90 2808 POPF HC7 2809 J32; I SEEK_ERROR EEt7 C3 2610 RET ; RETURN TO CALLER 2811 SEEK ENilP 2812 ;-------------------------------------------------------------.---------- 2813 ; DHA_SETUP 2814 THIS ROUTINE SETS UP THE OHA FOR READIWRITE/VERIFY OPERATIONS. 2815 ; INPUT 2816 (All = MODE BYTE FOR THE DNA. 2817 rES:BX) - ADDRESS TO READ/WRITE THE DATA 2818 , OUTPUT 2819 (AX) DESTROYED 2820 ------------------------------------------------------------------------ ;: EEC8 2821 DNA_SETUP PROC HEAR EEce 51 2822 PUSH CX ;. SAVE TIfE REGISTER EEC9 FA 282:3 CLI I NO MORE nrrERIWPTS EECA fbOC 2624 alIT DHA+12.At ;. SET THE FIRST/lAST f / f EECC 50 2625 PUSH AX EECD 58 2:82:6 POP AX EECE EbOB 2:827 OUT DMA+ll.At i OUTPUT THE HOOE BYTE EEOO 6CCO 2828 HOV AX,ES ;. GET THE ES VALUE EED2 BI04 2829 HOV Cl.4 ; SHIFT COUNT EE04 OKO 2830 ROL AX,CL ;. ROTATE LEFT EE06 8AE8 2631 I10V CH.AL ;. GET HIGHEST NYBLE OF ES TO CH EED8 24FO 2832 AND At,OFOH i ZERO THE LOW NYBBlE fROH SEGHEKT EEDA 03e3 2:833 ADO Ax.ax ; TEST FOR CARRY fROM ADDITION EEOC 7302 2834 JHe J3l EEDE FECS 2635 INC eH ;. CARRY MEANS HIGH 4 BITS tlJST BE INC EEEO 2836 J33: EEEO 50 2837 PUSH AX ; SAVE START ADDRESS EEEI E604 Z638 OUT DMA+4.Al ;. OUTPUT LOW ADDRESS EEE3 8AC,,- Z639 MOV AL.AH EEES E604 2840 OUT DMA+4.AL ;: OUTPUT HIGH ADDRESS EEE7 8ACS Z641 HOV Al,CH ; GET HIGH 4 BITS EEE9 240F Z84Z AHa At.OFH EEEB E681 Z843 OUT 081H"U ; OUTPUT THE HIGH 4 BITS TO 2844 ; THE pAGE REGISTER 2645 2:846 i ----- DETERMINE COUHT 2:647 EEED 8AE6 2:848 I10V AH.OH ;. NUtlBER OF SECTORS EEEF 2ACO 2849 sua At.AL , TIMES 256 IUTO AX EEFI DIE8 2850 SHR AX,1 ;. SECTORS .. 128 INTO AX EEF3 50 2851 PUSH AX EEF4 00060(1 EEf7 E872FF 2852 2853 MOV CALL """ GET~PAJ!11 ; GET TliE BYTES/SECTOR PAR" EEFA 8ACC 2854 I10V CL,AH , USE AS SHIFT CCIlR« (0=128. l=ZS6 ETC) EEfC 58 2855 POP AX EEfO 03EO 2856 SHL AX.CL ~ nJLTIPLY BY CORRECT AI1DlIfT EEFf 48 2857 DEC AX J -I FOR DHA VAlUE EfOO 50 2858 PUSH AX ; SAVE COUNT VALUE EFOt E605 2859 OUT DHA+S.AL ; lOW BYTE OF COLtlT Ef03 8AC4 266. I10V AL.AH EF05 E605 .861 OUT DMA+5 ••U ; HIGH BYTE Of COltIT Ef07 F8 2862 STI ; INTERRUPTS 8ACK ON H08 59 2863 POP CX o RECOVER COl.lfT VAlUE EF09 58 2864 POP AX I RECOVER ADDRESS VALUE HOA 03Cl 2865 ADO AX.CX ; ADD. TEST FOR 64K OVERFLOW EFOC 59 2866 POP CX j RECOVER REGISTER EFOD B002 2667 MOV Al.2 ; HOOE FOR 8237 eyof E60.&. 2868 OUT Df1A+IO.A.l ; INITIALIZE THE DISIEX F3A4 01E6 3989 SAL 51.1 J * Z FOR WORD OFFSET F3A6 684450 3990 MOV AX. [SI+OFFSET CURSOP~POSNJ ; GET ROW/COLUMN OF THU PAGE FlA9 330B 3991 XDR 8x.ex J SET START ADDRESS TO ZERO F3AB E306 3992 JeXl P5 I NO_PAGE F3AD 3993 P4: ; PAGE_LOOP F3AD 031E4COO 3994 ADD BX.CFlT_LEN ; LEt-lGTH OF BUFFER F3Bl EZFA 3995 LOOP P' F3B3 3996 PS: • NO_PAGE F3B3 ESCFFE 3997 C,ilL POSITION ; DETERMINE LOCATION IN REGEN F3B6 0306 3996 ADO BX.AX ; ADD TO START OF REGEN FlBS C3 3999 RET 4000 FIt-I)_PQSITIQN ENOP 4001 ; ------------------------------- ----------- ------ 4002 ; WFHTE_AC_CLlRRENT 4003 THIS ROUTINE WRITES THE ATTRIBlTTE 4004 AND CHARACTER AT THE CURRENT CURSOR 4005 POSITION 4006 ; INPUT 4007 (AH) ::: CURRENT CRT MODE 4(108 ISH) ::: DISPLAY PAGE 4009 I CX I ::: COUNT OF CHARACTERS TO WRITE 4010 IAU ::: CHAR TO WRITE 4011 (BL I ::: ATTRIBUTE OF CHAR TO WRITE 4012 IDS) ::: DATA SEGHENT 4013 I fS) ::: REGEN SEGMENT 4014 ; OUTPUT 4015 NONE 4016 ;------------------------------------------------ F3B9 4017 wrHTE~AC~CURRENT ""DC NEAR F3B9 60FC04 FlBC 72:06 4018 4019 CH" Je AN.' P. I IS -THIS GRAPHICS F3BE 60FC07 4020 eHP AH.7 I IS THIS BW CARD F3Cl 7403 4021 JE P. F3C3 E9B201 4022 JMP GRAPHICS_WRITE F3C6 4023 P6: ; WRITE_AC_CONTINUE F3C6 6AEl 4024 HOV AH,BL I GET ATTRIBUTE TO AH Fle8 50 4025 PUSH AX I SAVE ON STACK F1C9 51 4026 PUSH ex ; SAVE WRITE COUNT F3eA E8DIFF 4027 CALL FIND_POSITION flCD 8BFB 4028 HOV DI.BX I ADDRESS TO DI REGISTER nCF S9 4029 POP CX I WRITE COUNT F3DO 58 4030 POP .X I CHARACTER IN BX REG System BIOS A-57 LOC OBJ LINE SOURCE nDl 4031 P7: 4032 4033 j----- WAIl FOR HORIZONTAL RETRACE 4034 F30l 8B166300 4035 MDV DX.ADDR_6845 ; GET BASE ADDRESS nos 83C206 4036 .00 DX.6 I POINT AT STATUS PORT F30B 4037 P8: Floe EC 4038 IN AL.DX ; GET STATUS no';! A80l 4039 TEST Al.l ; IS IT LOW nOB 75FB 4040 JNZ P6 ; WA.IT UNTI L IT IS F30C FA 4041 CLI I NO MORE INTERRUPTS flOE 4042 P9: nOE EC 4043 IN Al,DX ; GET STATUS F3DF A801 4044 TEST Al,l I IS IT HIGH F3El 74FB 4045 JZ P9 ; WAIT lINTI L IT IS F3E3 BBel 4046 MOV Ax.ax I RECOVER THE CHAR/ATTR F3E5 AS 4047 STQSW I PUT THE CHAR/ATTR F3E6 FB 4048 STI I INTERRUPTS BACK ON F3E7 E2E8 4049 LOOP P7 i A.S MANY TIMES AS REQUESTED F3E9 E9D9fD 4050 JMP VIDEO_RETURN 4051 IoIRITE_AC_CLmRENT ENDP 4052 ; ---------------------------- ----------- --------- 4053 I WRITE_C_CURRENT 4054 THIS ROUTINE WRITES THE CHARACTER AT 4055 THE CURRENT CURSOR POSITION. A.TTRIBUTE 405& UNCHANGED 4057 INPUT 4058 (AH 1 = CURRENT CRT MOOE 4059 (BH ) = DISPLAY PAGE 40&0 (CX l = COUNT OF CHARA.CTERS TO ioIRITE 'to&1 (ALI = CHA.R TO WRITE 40&2 (DSI = DATA. SEGMENT 4063 (ES) = REGEN SEGMENT 4064 ; OUTPUT 4065 NONE 4066 ;------------------------------------------------ F3Ee 4007 flEe 80FC04 4068 C"P AH.4 IS THIS GRAPHICS F3EF 7208 4069 JC PIO F3Fl 80FC07 4070 C"P AH.7 IS THIS Bioi CARD F3F4 7403 4071 JE PIO .. F3F6 E97FDl 4012 J"P GRAPHICS_WRITE F3F9 4073 PIO: F3F9 50 4074 PUSH ; SAVE ON ST,l..CK F3FA 51 4075 PUSH CX SAVE WRITE COUNT F3FB E8AOFF 4076 CALL FIND_POSITION F3FE BBFB 4077 MOV OI,BX ADDRESS TO 01 F400 59 4078 POP CX ; WRITE COUNT F401 58 4079 POP 6X j BL HAS CHAR TO WRITE F402 40ao Pll: WRITE_LOOP 4081 4082 j----- WAIT FOR HORIZONTAL RETRACE 4083 F402 88166300 4064 HOV ox • AODR_6845 I GET BASE ,l..ODRESS F406 83C206 4065 .00 OX.Eo I POINT AT STATUS PORT F409 4086 P12: F409 EC 4067 IN AL.OX I GET STATUS F40A A801 40e8 TEST AL.l • IS IT LOW F40C 75FB 4089 J"Z PlZ ; WAIT UNTI L IT IS F40E FA 4090 CLI I NO MORE INTERRUPTS F40F 4091 P13: F40F EC 4092 IN AL.DX ; GET STATUS F41D A801 4093 TEST AL.I ; IS IT HIGH f412 74fB 4094 JZ P13 • WAIT UNTIL IT IS F414 8AC3 4095 MOV AL.BL I RECOVER CHAR F416 AA 4096 STOSB I PUT THE CHAR/ATTR F417 FB 4097 STI I INTERRUPTS BACK ON F418 47 4098 INC 01 ; BUMP POINTER PAST ATTRIBUTE F419 E2E7 4099 lOOP Pll , AS MANY TIMES AS REQUESTED F41B E9A7FD 4100 JMP VIDEO_RETURN 4101 WRITE_C_CURRENT ENDP 4102 ; --------------------------- --- ---- ---- -------------------------- 4103 ; READ DOT -- WRITE DOT 4104 THESE ROUTINES WILL WRITE A DOT. OR READ THE DOT AT 4105 THE INDICATED LOCATION 4106 EHTRY -- 4107 OX = ROW (0-199) (THE ACTUAL VAlUE DEPENDS QH THE MODE 1 A-58 System BIOS LOC OBJ LINE SOURCE 4108 ex :: COLUMN ( 0-6391 ( THE VALUES ARE HOT RANGE CHECKED) 4109 At. :: DOT VALUE TO WRITE (1.2 OR '+ BITS DEPEf'«lING ON HOOE, 4110 REQ'D FOR WRITE DOT ONLY. RIGHT JUSTIFIED) 4111 BIT 7 OF AL=l INDICATES XOR TliE VALUE INTO THE LOCATIOH : 4112 os :: DATA SEGMENT 4113 E5 :: REGEN SEGMENT 4114 4115 • EXIT 4116 At. = DOT VALUE READ. RIGHT JUSTIFIED. READ ONLY 4117 ; ---------------------------------------------------------------- 4118 ASSUI1E CS;CODE.CS:OATA.ES:DATA F41E 4119 READ_DOT PROC NEAR F41E E83100 4120 CALL R3 , DETERMINE BYTE POSITION OF DOT F421 268A.04 4121 MOV AL.ES:lsIl ; GET TIlE BYTE F424 22C4 4122 AND AL,AH ) MASK OFF THE OTHER BITS IN TliE BYTE F426 02:EO 4123 SHl Al.Cl I LEFT JUSTIFY THE VALUE F428 BAtE 4124 NOV CL.DH I GET NUMBER OF BITS IN RESULT F42:A D2eo 4125 ROl AL.CL j RIGHT JUSTIFY THE RESULT F42C E996FO 412f> JMP VIDEO_RETLIRN ; RETlmN FRDM VIDEO 10 4127 ENIlP 4128 F42F 4129 WRITE_DOT PROC HEAR F42:f SO 4130 PUSH I SAVE DOT V.t.LUE F430 50 4131 PUSH "'" "" ; TWICE F431 E81EOO 4132 CALL R3 i DETERMINE BYTE POSITION OF THE DOT f434 OlES 4133 SHR AL.CL I SHIFT TO SET UP THE BITS FOR OlFTPUT F436 22C4 4134 ANII Al,AH I STRIP OFF THE OTHER BITS F438 268AOC 4135 MOV CL,ES:[SI I ; GET THE CURRENT BYTE F43B 56 4136 POP ax ; RECOVER XOR FLAG F43C F6C380 4137 TEST BL.80H iISITON F43f 7500 F441 FbD't 4138 4139 JNZ NOT R'AH ; YES. XOR THE DOT I SET THE MASK TO REMOVE THE F443 22C( 4140 AND CL.AH j INDICATED BITS F445 OACI 4141 OR Al,CL I OR IN THE NEW VALUE OF THOSE BITS F447 4142 Rl; I FINISH_DOT f447 268804 4143 MOV ES:[SIJ,AL ; RESTORE THE BYTE IN HE/'fORY F44A 58 4144 F448 E977FD 4145 POP JMP "" VIDEO_RETURN ; RETURN FROM VIDEO 10 F44E 4146 R2: ; XOR_DOT F44E 32Cl 4147 XOR AL,CL I EXCLUSIVE OR THE DOTS F450 EBFS 4148 JMP Rl i FINISH UP THE IoIOIITlHG 4149 WRITE_DOT ENDP 4150 1-------------- -------- ---------------------------------- 4151 ; THIS SUBROUTINE DETERMINES THE REGEN 8YTE LOCATION 4152 I OF THE INDICATED ROW COLUt1N VALUE IN GRAPHICS t1ODE. 4153 ENTRY -- 4154 OX = ROW VALUE (0-199) 4155 I CX = COUJrtN VALUE (0-639) 4156 I EXIT -- 4157 51 = OFfSET INTO REGEN 8UFFER FOR BYTE OF INTEREST 4158 AH = MASK TO STRIP OFF THE BITS OF INTEREST 4159 CL == BITS TO SHIFT TO RIGHT JUSTIFY THE NASK IN AH 4160 I DH == I BITS IN RESULT 4161 F45Z 4162 R3 PRoe NEA.R F452: 53 4163 PUSH BX ; SAVE BX DURING OPERATION F453 50 4164 pUSH AX ; WIll SAVE Al DURING OPERATION 4165 416f> ; ----- DETERMINE 1ST BYTE IN IDICATED ROW 8Y HUL TIPL YING ROW VAlUE BY 40 4167 j----- ( lOW BIT OF ROW DETERMINES EVEN/ODD, 60 BYTES/ROW 4168 F454 602.8 4169 MOV Al.40 F456 52 4170 PUSH ox ; SAVE ROW VALUE F457 BOE2FE 4171 ANO DL.OFEH • STRIP OFF OOD/EVEN BIT F45A F6E2: 4172: HUl Dl ; AX HAS ADDRESS OF 1ST BYTE 4173 ; OF INDICATED ROW F45C SA 4174 POP OX I RECOVER IT F450 F6C2:01 4175 TEST CL.l I TEST FOR EVEN/ODD F460 7403 F462: 05002:0 4176 4177 JZ ADD •• AX,2000H I JlJf1P IF EVEN ROW ; OFFSET TO LOCA.TION OF 000 ROWS F465 4178 R"i; ; EVEN_ROW F465 BBFO 4179 MOV 51.AX ; HOVE POINTER TO SI F467 58 4180 POP AX I RECOVER AL VALUE F468 88D1 4181 I10V DX,ex I COll.ltfl VALUE TO ox 4182 4183 J----- DETERMINE GRAPHICS HODE CURRENTLY IN EFFECT 4184 System BIOS A-59 LOC OBJ LINE SOURCE 4185 ,--- - -------------------------------------------- ---------------- 4186 ; SET UP THE REGISTERS ACCORDING TO TIiE MODE 4187 I CH = MASK FOR LOW Of COllJ1N ADDRESS ( 713 FOR HIGHIHED RES) 4188 CL = • Of ADDRESS BITS IN COLUMN VALUE I 3/2 FOR HIM) 4189 BL = MASK TO SELECT BITS fROH POINTED BYTE (80H/COM fOR HIM I 4190 8M = HUMBER OF VAllO BITS IN POINTED BYTE ( lIZ FOR HIM) 4191 ; ---------- ---------------- -------------------------------------- 4192 F4ftA BBC002 401H MOV BX,leaH F46D 890203 4194 MOV CX.302H j SET PARMS FOR MED RES F470 803E490006 4195 eMP CRT_MOOE.6 F475 7206 41% JC OS ; HAHOLE IF MED ARES F477 BB8001 4197 MOV BX,180H F47A 890307 4198 MOV eX.703H ; SET PAlms FOR HIGH RES 4199 42.00 ; ----- DETERMINE BIT OFFSET IN BYTE FROM COLUMN H.6.SK 42.01 '47D 420Z R5: F47D Z2EA 42.03 .NO CH.DL ; ADDRESS OF PEL WITHIN BYTE TO CH 4204 4205 j----- DETERMINE BYTE OFFSET FOR TtlIS LOCATION IN COLUMN 4206 F47F OlEA. 4207 SHR DX,CL I SHIFT BY CORPIECT AMOUNT F481 D3F2. 4208 ADO 51,OX ; INCREMENT THE POINTER F483 8AF7 4209 MOV DH,BH ; GET THE , OF BITS IN RESULT TO DH 4210 4211 ;----- MULTIPLY BH (VALID BITS IN BYTE) BY CH IBIT OFFSET) 4212. F465 2AC9 4213 SUB CL,CL ; ZERO INTO STORAGE LOCATION F487 4214 F487 DoC8 42.15 ROR AL.l ; LEFT JUSTIFY THE VALUE 4216 ; IN Al {FOR WRITE I F489 02CO 4217 .00 CL,CH ; ADD IN THE BIT OFFSET VALUE F488 FEef 4218 OEC BH j LOOP CONTROL F480 7SF8 4219 ONZ R. i ON EXIT, Cl HAS SHIFT COUNT 4220 ; TO RESTORE BITS F48F 8AE3 4221 HOV AH,BL ; GET HASK TO .6.H F491 D2EC 4222 SHR AH,CL ; MOVE THE HASK TO CORRECT LOCATION F493 58 4223 pcp BX ; RECOVER REG F494 C3 422:4 RET j RETURN WITH EVERYTHING SET UP 42.2:5 R3 ENDP 422ft ; --- -------------- -------- ------ --------- ------------------------ 422:7 ; SCROLL UP 4228 TIns ROUTINE SCROLLS UP THE INFORMATION ON THE CRT 4229 ; ENTRY 4230 CH,Cl = UPPER LEFT CORNER OF REGION TO StROLL 423l DH ,Ol = lOWER RIGHT CORNER OF REGION TO SCROLL 4232 BOrn OF THE ABOVE ARE IN CHARACTER POSITIONS 4233 BH = FIll VALUE FOR BLANKED LINES 42:34 Al = " LINES TO SCROLL (Al=O MEANS BLANK THE ENTIRE 4,35 FIElD) 4236 DS = DATA SEGMENT 4237 ES = REGEN SEGMENT 4238 EXIT 42:39 NOTHING, THE SCREEN IS SCROLLED 4240 j - ---------------------- ------------- ---- ---- --------- ----------- F495 4241 PROC NEAR F495 8A06 4242 BL,Al • SAVE LINE COUNT IN BL F497 8BCl 4243 AX,CX ; GET UPPER lEFT POSITION INTO AX REG 4244 4245 ; ----- USE CHARACTER SUBROUTINE FOR POSITIONING 42:46 ;----- ADDRESS RETURNED IS MULTIPLIED BY 2 FROM CORRECT VAlUE 42:47 F499 £66902 4248 F4<,JC BBF6 4249 HOV DI,AX ; SAVE RESULT AS DESTINATION ADDRESS 4250 4251 1----- DETERMINE SIZE OF WIHDOW 4252 F49E 2B01 42:53 SUB OX,CX F4AO 61C20101 4254 AOO OX,lOIH • ADJUST VALUES F4A4 00E6 4255 SAL DH.I ; MULTIPLY. ROWS BY " 4256 SINCE 8 VERT DOTS/CHAR F4.A.6 OOE6 4257 SAl DH,I ; ANO EVEN/ODD ROWS 4258 4259 j----- DETERMINE CRT HODE 4260 F4AB 803E490006 4261 eMP ; TEST FOR MEDIIJ'I RES A-60 System BIOS LOC OBJ LINE SOURCE f4AD 7304 4262 JHe R7 4263 4264 1----- MEDII.J1 RES UP '4265 F4AF DOE2 4266 SAL J • COLUMNS * 2:. SINCE 2: BYTES/CHAR F481 DIE7 4267 SAL I OFFSET *2 SINCE 2 BYTES/CHAR 4268 4269 1----- DETERMINE THE SOURCE ADDRESS IN THE BUFFER 4270 F4B3 4271 R7: I FIND_SOURCE F4B3 Db 4272 PUSH ES J GET SEGMENTS BOTH POINTING TO REGEN F4B4 IF 4273 pop OS f4SS 2AED 4274 sue CH.CH I ZERO TO HIGH OF COUNT REG F4S7 DOE] 4275 SAL BL.l ; tRJL TIPL Y NUt1BER OF LINES BY 4 F4B9 DOE3 42:76 SAL BL.l F4BB 742:0 4277 JZ RIl I If ZERO. THEN BLANK ENTIRE FIELD F46D 8AC3 4278 MOV AL.BL J GET Nt..tIBER OF LINES IN AL F4BF 8450 4279 MOV Aft.eo: ; 80 BYTES/ROW F4tl f6E4 4280 MUL AH ; DETERMINE OFfSET TO SOURCE MOV F4e3 BSF7 F4es 03FO 4261 4282 ADD Sl,DI SI,AX , J SET UP SOURCE ADD IN OFFSET TO IT F4e7 8AE6 4283 MOV AH.DH J tM1BER OF ROWS IN FIELD F4C9 2AE3 4284 sue AM.aL ; DETERMINE NUMBER TO HOVE 4285 4286 1----- LOOP THROUGH. MOVING ONE ROW AT A TIME. BOTH EVEN AND ODD FIELDS 4287 F4te 4Z68 R8: ; ROW_LOOP F4te E88000 4289 CALL R17 I HOVE ONE ROW F4CE BIEEBOlF 4290 SUB SI.20DOH-BO ; HOVE TO NEXT ROW F4D2 81EFBOIF 4291 sue DI.20DOH-80 F4D6 FEee 429Z DEC AH J NUMBER OF ROWS TO HOVE F4DS 75Fl 4293 4294 JNZ •• I CONTINUE TILL ALL HaVED 4295 ; ----- FILL IN THE VACATED LINE( S I 4296 F40A 4297 R9: J CLEAR_ENTRY F4DA 8AC7 4296 HOV AL.BH J ATTRIBUTE TO FILL WITH F4DC 4299 RIO: F4ec E88800 4300 CALL R18 ; CLEAR THAT ROW F40F 81EFBOIF 4301 SUB 01. ZOOOH-BO ; POINT TO NEXT LINE F4E3 FEee 4302 OEC BL ; NUMBER OF LINES TO FILL F4E5 75FS 4303 JHZ R10 ; CLEAR_LOOP F4E7 E90BFC 4304 JNP VIDEO_RETURN I EVERYTHING DONE F4EA 4305 R11: J BLANKJIELD F4EA BADE 4306 HOV BL.DH J SET BLANK COUNT TO 4307 J EVERYTHING IN FIELD F4EC fBEC 4308 R. I CLEAR THE FIELD 4309 ENDP 4310 ;---- ------------------------------- -- ---------.----- -- --------- - 4311 ; SCROLL DOWN 4312 THIS ROUTINE SCROllS DOWN THE INFORMATION ON THE CRT 4313 ; ENTRY 4314 CH.CL '" UPPER LEFT CORNER OF REGION TO SCROLL 4315 DH.DL =LOWER RIGHT CORNER OF REGION TO SCROLL 4316 BOTH OF THE ABOVE .... RE IN CHARACTER POSITIONS 4317 BH = FILL VALUE FOR BLANKED LINES 431B AL = I LINES TO SCROLL (AL::o-Q MEANS BLANK TliE ENTIRE 4319 FIELD I 4320 OS = DATA SEGMENT 4321 ES = REGEN SEGMENT 43Z2 ; EXIT 43Z3 NOTHING. THE SCREEN IS SCROLLED 43Ztt ; ---------------------------------------------------------------- F4EE 4325 GRAPHICS_DOIol>l PROC NEAR F4EE fO 4326 STO , SET DIRECTION F4EF 8A08 43Z7 MOV BL.AL ; SAVE LINE COUNT IN BL F4Fl 8BC2 43Z6 MOV AX.DX I GET LOWER RIGHT POSITION INTO AX REG 4329 433D J----- USE CHARACTER SUBROUTINE FOR POSITIONING 4331 ,----- ADDRESS RETl.II;!NED IS MULTIPLIED BY 2 FROM CORRECT VALUE 4332 F4F3 f60FOZ 4333 F4F6 BBFS 4334 ItOV DI.AX J SAVE RESULT AS DESTINATION ADDRESS 4335 4336 ;----- DETERMINE SIZE OF WINDOW 4337 F4F8 ZeDl 4338 SUB OX.CX System BIOS A-61 LOC OBJ LINE SOURCE f4FA 81C20101 4339 ADD DX.IOIH I ADJUST VALUES F4fE OOE6 4340 SAL OH,I ; MULTIPLY. ROWS 5Y 4 4341 , SINCE 8 VERT DOTS/CHAR FSOD 00E6 4342 SAL DH.l , At«) EVEN/ODD ROWS 4343 4344 j ----- DETERMINE CRT MODE 4345 F502 803E490006 4346 eMP CRT_MOOE .6 , TEST FOR HEDIUH RES f507 7305 4347 .lHe R12 ; FIND_SOURCE_DOWN 4348 4349 J ----- MEDIUM RES DOWN 4350 F509 00E2 4351 SAL Dl.I ; I COLUMNS * 2:. SINCE 4352 , 2: BYTES/CHAR (OffSET OK I F50B DIE7 4353 SAL 01.1 I OFFSET *2 SINCE 2: BYTES/CHAR F50D 47 435'" INC 01 ; POINT TO LAST BYTE 4355 4356 ; ----- DETERMINE THE SOURCE ADDRESS IN THE BUffER 4357 F50E 4358 R12: J FIND_SOURCE_DOWN FSOE 06 4359 PUSH ES J BOTH SEGMENTS TO REGEN F50F IF 4360 POP OS F510 ZAEO 4361 SUB CH,CH I ZERO TO HIGH OF CO~T REG FS12 81C7FOOO 4362 ADD D1,240 ; POINT TO LAST ROW OF PIXELS F516 DOn 4363 SAL Bl.l ; MULTIPl Y NUMBER OF LINES BY 4 FSIB Don 4364 SAL BL.l F51A 742E 4365 JZ R,. i IF ZERO. THEN BLANK ENTIRE fIELD F51C eAC] 4366 Mav Al,BL ; GET HUMBER OF LINES IN At FSIE 8450 4367 HOV AH,eo I 80 BYTES/ROW F5Z0 F6E4 4368 NUL AH ; DETERMINE OFFSET TO SOURCE F522 88F7 4369 Mav SI,O! ; SET UP SOURCE F524 2BFO 4370 SUB 51.AX , SUBTRACT THE OFFSET F526 8AE6 4371 Mav AH,DH i NUMBER OF ROWS IN FIELD F528 un 4372 SUB AH,eL ; DETERMINE NUMBER TO MOVE 4373 4374 ; ----- lOOP THROUGH. MOVING ONE ROW AT A TIME. BOTH EVEN AND ODD FIELDS 4375 F52A 4376 Rl3: i ROW_lOOP _DOWN F5ZA E82100 4377 CALL R'7 I MOVE ONE ROW F52D 81EE5020 4378 SUB 51.20ooH+80 ; MOVE TO NEXT ROW F531 BIEF5020 4379 SUB DI,2000H+80 F535 FEee 4380 DEC AN ; NUMBER Of ROWS TO I10VE F537 75Fl 4381 4382 JHZ "" ; CONTINUE Tl LL All MOVED 4383 ;----- FILL IN THE VACATED LINE{S) 4364 F539 4385 R14: ; CLEAR_ENTRY_DOWN F539 8AC7 4386 HOV AL.BH ; ATTRIBUTE TO FILL WITH F53B 4387 R15: i CLHR_LOOP _DOWN F536 E82900 4388 CALL RIC ; CLEAR A ROW F53E 81EF5020 4369 SUB DI.2000H+80 • POINT TO NEXT LINE F542 FECB 4390 DEC 6L ; NUMBER OF LINES TO FILL F544 75F5 4391 JHZ R'5 ; CLEAR_LOOP_DOWN F546 Fe 4392 CLO ; RESET THE DIRECTION FLAG F547 E976FC 4393 JMP VIDEO_RET~H ; EVERYTHING DONE F54A 4394 RI6: ; 6L....NKJIELO_DOWN .,. F54A MOE 4395 HOV Bt.DH ; SET BLANK COUNT TO EVERYTHING 4396 , IN FIELD FS4C E6E6 4397 JMP i CLEAR THE FIELD 4398 GRAPHICS_DOWN ENDP 4399 4400 ;----- ROUTINE TO MOVE ONE ROW Of INFORMATION 4401 FS4E 4402 R'7 PRoe NEA.R FS4E 8ACA 4403 Mav CL.Ol ; NUHBER OF BYTES IN THE ROW F550 56 440. PUSH 51 F551 57 4405 PUSH 01 ; SAVE POINTERS F552 F3 4406 REP Movse ~ MOVE THE EVEN FIELD F553 A4 F554 SF 4407 PDP 01 F555 5E 4408 POP 51 F556 81C60020 4409 ADD 5I.2000H F5SA 81C70020 4410 ADD OI.2000H ; POINT TO THE ODD FIELD F55E 56 4411 PUSH 51 F55F 57 4412 PUSH 01 i SA.VE THE POINTERS FS60 8ACA 4413 MOV (l.Ol i COUNT BACK F562 F3 4414 REP Hovse ; HOVE THE 000 FIE LD A-62 System BIOS LaC OBJ LINE SOURCE F563 A4 F564 SF 4415 pop 01 FS65 SE 4416 POP SI J POINTERS BACK F5b6 C3 4417 RET i RETURN TO CALLER 4416 "17 ENDP 4419 4420 1----- CLEAR A SINGLE ROW 4421 '5<>7 4422 R18 PRoe NEAR F567 8AC. 4423 MOV Cl,OL ;: NUteER OF B'f'TES IN FIELD F5b? 57 4424 PUSH 01 i SAVE POINTER F:S6A F3 4425 REP 51058 ; STORE THE NEW VALUE f56B A.A F56C SF 4426 POP 01 POINTER SACK F56D 81C70020 4427 ADD DI.2000H ; POINT TO OOD FIELD r571 57 4428 PUSH 01 F572 BACA 4429 MOV CL.Ol F574 F3 4430 REP 5T058 fILL THE ODD FIlELD F57S AA rS76 SF 4431 POP 01 F577 C3 4432 RET ; RETURN TO CALLER 4433 Rl8 ENOP 4434 ; ---------------------------------------------------------------- 4435 • GRAPHICS WRITE 4436 THIS ROUTINE WRITES THE ASCII CHARACTER TO THE 4437 CURRENT POSITION ON THE SCREEN. 4438 ENTRY 4439 .u :;: CHARACTER TO WRITE 4440 BL :;:: COLOR ATTRIBt1TE TO BE USED fOR FOOEGROIAI) COLOR 4441 IF BIT 7 IS SET. THE CHAR IS XOR' 0 INTO THE REGEN 4442 BUFFER (0 IS USED FOR THE BACKGROUND COLOR) 4443 ex '; NUMBER OF CHARS TO WRITE 4444 OS = DATA SEGMENT 4445 ES = REGEN SEGMENT 4446 f EXIT 4447 NOTHING IS RETURNED 4448 4449 ; GRAPHICS READ 4450 THIS ROUtINE READS THE ASCII CHARACTER AT THE cURRENT 4451 CURSOR POSITION ON lltE SCREEN BY MATCHING THE DOTS ON 4452 THE SCREEN TO THE CHARACTER GENERATOR COOE POINTS 4453 ENTRY 4454 HONE ( 0 IS ASSl.It1ED AS THE BACKGROlW COLOR 4455 I EXIT 4456 .u :;: CHARACTER READ AT THAT POSITION (0 RETURNED IF 4457 NONE FOUND I 4458 4459 FOR BOTH ROUTINES. THE IMAGES USED TO FORI't CHARS ARE 4460 CONTAINED IN ROH FOR THE 1ST 128 CHARS. TO ACCESS CHARS 4461 IN THE SECOND HALF I THE USER I'IUST INITIALIZE THE VECTOR AT 4462: I INTERRUPT lFH (LOCATION OQ07CHJ TO POINT TO THE USER 4463 SUPPLIED TABLE OF GRAPHIC IHAGES (6X8 BOXES). 4464 FAILURE TO DO so WILL CAUSE IN STRANGE RESULTS 4465 ; -- - - - -- - -- - - ------ --- -- ---- - - ---------- ----- - - - ----- - - --- -- ----- 4466 ASSLtlE CS:CODE,DS:DATA,ES:OATA F57a 4..7 GRAPHICS_WRITE PROC NEAR F57S 8400 4468 HOV AH,O I ZERO TO HIGH OF CODE POINT F57A 50 4469 PUSH IV< I SAVE CODE POINT VALUE 4lt70 4471 ;----- DETERMINE POSITION IN REGEN BUfFER TO PUT cooe POINTS 4472 F57S E8MOl 4473 CALL 526 I FIND LOCATION IN REGEN BUFFER FS7E 88F8 4474 HOV OI,AX I REGEN POINTER IN ot 4475 4476 ;----- DETERMINE REGION TO GET CODE POINTS FROM 4477 F580 58 4478 POP AX I RECOVER CODE POINT F5S1 3e60 447. CM" ALI80H I IS IT IN SECOND HALF F58] 7306 4480 JAE Sl I YES 4481 4482 ;----- IMAGE IS IN FIRST HAlF, CONTAINED IN ROM f58S BE6EFA 44.' 4484 HOV SI.OFA6EH F5B8 DE 4485 PUSH CS ; SAVE SEGMENT ON STACK F589 EBOF 4486 JHP SHORT 52 4487 4488 ;----- IMAGE IS IN SECOND HALF. IN USER RA.N System BIOS A-63 LOC OBJ LINE SOURCE 4489 FS8B 4490 51: i EXTEND_CHAR F58B 2C80 4491 SUB Al,8DH i ZERO ORIGIN FOR SECOND HAlF F58D IE 4492 PUSH DS I SAVE DATA POINTER F58E 2BF6 4493 SUB 51,SI F590 aECE 4494 MOV DS,SI I ESTABLISH VECTOR ADDRESSING 4495 ASSUHE DS:ABSO F5'n: C5367COO 449& LOS 51,EXT_PTR I GET THE OFFSET OF THE TABLE F596 aCOA 4497 MOV OX.OS j GET THE SEGMENT OF THE TABLE 4498 ASSUME DS:DATA FS9B IF 4499 POP DS j RECOVER DATA SEGMENT F599 52 4500 PUSH DX ; SAVE TABLE SEGMENT ON ST.t.CK 4501 4502 i ----- DETERHINE GRAPHICS HODE IN OPERATION 4503 F59A 4504 52: ; DETERHINE_MODE F59A OlEO 4505 SAL AX.! I MUl TIPL Y CODE POINT F59C DIED 4506 SAL AX.1 I VALUE BY a F59E OlEO 4507 SAL AX.l FSAO 03FO 4508 ADD 51.AX I 51 HAS OFFSET OF DESIRED CODES FSA2 803£490006 4509 CMP CRT_MODE .6 F5A7 IF 4510 POP OS I RECOVER TABLE POINTER SEGMENT F5A8 722C 4511 JC 57 I TEST FOR MEDIUM RESOLUTION MODE 4512 4513 ;----- HIGH RESOLUTION HODE 4514 F5AA 4515 53: I HIGH_CHAR F5AA 57 4516 PUSH DI I SAVE REGEN POINTER FSAB 56 4517 P1.iSH SI I SAVE CODE POINTER FSAC B604 4518 MOV DH,4 ; NUMBER OF TIMES THROUGH LOOP F5AE 4519 54: F5A.E At 4520 LooSB ; GET BYTE FROM CODE POINTS F5AF F6C380 4521 TEST BL,80H ; SHOULD WE USE THE FUNCTION F5B2 7516 4522 JHZ 56 I TO PUT CHAR IN FSB4 A.A. 4523 STOSB I STORE IN REGEN BUFFER F5B5 AC 452:4 LODSB F5B6 4525 55: F5B6 268885FFIF 4526 MOV ES:(OI+ZOOOH-l] ,AL ; STORE IN SECOND HALF F5B8 83C74F 452:7 AOO 01.79 i MOVE TO NEXT ROW IN REGEN F5BE FECE 4528 OEC DH ; DONE WITH LOOP FSCO 75EC 4529 JNZ S4 FSC2 Sf 4S30 pop 51 F5C3 SF 4531 POP DI I RECOVER REGEN POINTER F5C4 47 4532: INC 01 I POINT TO NEXT CHAR POSITION F5C5 E2E3 4S33 LOOP S3 I MORE CHARS TO WRITE FSC7 E9FBFB 4534 JMP VIDEO_RETLRN FSCA 4S3S 56: F5CA 2:632:0S 4536 XOR AL,ES:(OIl I EXCLUSIVE OR WITH CURRENT FSCD AA 4537 STOSB ; STORE THE CODE POINT FSCE AC 4538 LooSB ; AGAIN fOR ODD FIelD FSCF 2.63285FFIF 4S39 XOO AL,ES: (OI+2000H-l) FS04 EBEO 4540 JMP 55 I BACK TO MAINSTREAM 4541 4542 ; ----- MEDIUM RESOLUTION WRITE 4543 F5D6 4544 S7: • MED_RES_WRITE F50f:, 8A03 4545 MOV DL,BL. ; SAVE HIGH COLOR BIT F508 DIE? 4546 SAL 01,1 ; OFFSET*2 SINCE 2 BYTES/CHAR F50A E80100 4547 CALL Sl9 ; EXPAND BL TO FULL WORD Of COLOR FSDO 4548 58: ; HED_CHAR F500 57 4549 pUSH DI ; SAVE REGEN POINTER FSDE 56 4550 PUSH SI I SAVE THE CODE POINTER f5DF B604 4551 MeV OH,4 I NUMBER OF lOOPS FSEI 4552 S9: F5El AC 4553 LOOSB ; GET CODE POINT FSE2: ESOEOO 4554 CALL S2l I DOUBLE UP ALL THE BITS FSES 23C3 4555 AND Ax.ex • CONVERT THEM TO FOREGROUND 4556 , COLOR ( o BACK ) FSE7 F6C280 4557 TE5T DL,80H ; IS THIS XOR FlmCTION F5EA 7407 4558 JZ SlD ; NO. STORE IT IN A.S IT IS FSEC 263225 4559 XOR AH,ES:IDIl i DO FUNCTION WITH HALF FSEF 26324501 4560 xc. Al.ES: 101+1 J I AND WITH OTHER HA.LF F5F3 4561 S10: F5F3 268&2~ 4562 MeV ES:IDIJ.AH I STORE FIRST BYTE FSF6 26884501 4563 MOV ES:[DI+iJ.AL f STORE SECOND BYTE F5FA AC 4564 LOO 58 ; GET CODE POINT F5FB E8C500 4565 CALL S2l A-64 System BIOS LOC OBJ LINE SOURCE F5FE 23C3 4566- AND AX,BX ; CONVERT TO COLOR f600 F6C280 4567 TEST DL,60H I AGAIN. IS THIS XOR FUNCTION F603 740A 4568 JZ 511 , NO. JUST STORE THE VALUES f6D5 2632A50020 4569 XOR AH. ES: [DI+2000H I I FUNCTION WITH FIRST HALF F60A 2632850120 4570 X,", Al. ES: [OI+2001H) j ANO WITH SECOND HALF F60F 4571 511: F60F 2686ASOO20 4572: I10V fS: [DI+2DOOH ,AH I F614 2688650120 4573 MOV ES: (OI+2000H+ll,.ll 5 STORE IN SECOND PORTION OF BUFFER F61983(750 4574 ADO 01,80 J POINT TO NEXT lOCA TICH F61C FEtE 4575 DEC OH F61E 75Cl 4576 JNZ 59 I f!:HP GOING F620 5f 4577 POP 51 I RECOVER CODE PONTER F6Zl SF 4578 POP 01 I RECOVER REGEN POINTER F622 47 4579 INC 01' I POINT TO NEXT CHAR POSITION F623 47 4580 INC 01 F624 E2B7 4561 LOOP 58 ; t10RE TO WRITE F626 E99CFB 4562 JHP VIDEO_RETURN 4583 GRAPHICS_WRITE ENDP 4564 ;------------------------ 4585 ; GRAPHICS READ 4566 -------- -------- -- ; ------ F629 F629 E8D600 F6ZC 8BFO 4587 4588 4589 GRAPHICS_READ CALL HOV ... PROC SI.AX NEAR I CONVERTED TO OFFSET IN REGEN j SAVE IN SI F6ZE S3EeD8 4590 Sill SP.8 ; ALLOCATE SPACE TO SA.VE THE 4591 ; READ CODE POINT F631 8BEt 4592 I10V BP.SP , POINTER TO SAVE AREA 4593 4594 ;----- DETERMINE GRAPHICS MODES 4595 F633 803£490006 4596 CHP CRT_HOllE .6 F638 06 4597 PUSH ES F639 IF 4598 POP OS ; POINT TO REGEN SEGMENT F63A nlA 4599 JC 513 j MEOIlIt RESOLUTION 4600 4601 ;----- HIGH RESOLUTION RUD 4602 4603 ;----- GET VALUES FROM REGEN BUFFER AN) CONVERT TO CODE POINT 4604 F63C 6604 4605 HOV DH.4 i tU'fBER OF PA.SSES F63E 4606 SIZ: F63E 4607 HOV Al,{SI] I GET FIRST BYTE F640 884600 4608 MOV IBP] ,,U ; SAVE IN STORAGE AREA F643 45 4609 INC BP • NEXT LOCATION F644 8A8400Z0 4610 I10V Al.lsI-tZOOOHI ; GET LOWER REGION BYTE F648 884600 4611 HOV (BPI,AL ; ADJUST JKl STORE F64B 45 461Z INC .... BP f64C 83t650 4613 ADD 51.80 I POINTER INTO REGEN f64F FECE DEC DH I LOOP CONTROL F6;1 7SEB 4615 JNZ 512 ; DO IT SOME HaRE F653 E81790 4616 JMP SIS I GO MATCH THE SAVED CODE POINTS 4617 4618 1----- MEOIUH RESOLUTION READ 4619 F656 462:0 513: J MED_RES_READ F656 OlE6 46,1 SAL 51.1 1 OFF5ET*2 SINCE 2 BYTES/cHAR F658 B60,," 4622 HOV DH,4 , NUI1BER OF PASSES F6SA 4623 514: F6SA E88800 4624 CAll 523 i GET PAIR BYTES FROM REGEN 46,5 I INTO SINGLE SAVE F650 81C60020 46Z6 ADO 5I.2000H ; GO TO LOWER REGION F661 E88100 4627 CALL 523 ; GET THIS PAIR INTO SAVE F664 81EEBOIF 4628 SUS SI. ZOOOH-80 ; ADJUST POINTER BACK INTO UPPER F668 FEeE 4629 DEC OH F66A 7SEE 4630 JNZ 51' ; KEEP GOING UNTIL ALL 8 DONE 4631 4632 ; ----- SAVE AREA. HAS CHARACTER IN IT. HATCH IT 4633 F66C 4634 515: j FIND_CHAR F66t BF6EFA90 4635 HOV OI.OFFSET CRT_CHAR_GEN 1 ESTABLISH ADDRESSING F670 DE 4636 PUSH CS F671 07 4637 POP ES ; COOE POINTS IN CS F672 B3EDOS 4638 SUB BP.8 I A~JUST POINTER TO BEGINNING 4639 I OF SAVE AREA. F675 8BF5 4640 HOV SI.BP F677 Fe 4641 CLO ; ENSURE DIRECTION F678 BODO 4642 I10V Al.O ; CWREHT CODE POINT BEING MATCHED System BIOS A-65 LOC OBJ LINE SOURCE F67A 4643 516: f67A 16- 4644 PUSH 55 I ESTABLISH ADDRESSING TO STACK F67B IF 4645 pop OS ; FOR THE STRING COMPARE ft.7e 6"8000 4646 MOV OX.126 ; NUMBER TO TEST AGAINST F67F 4647 517: F67F 56 4648 PUSH SI I SAVE SAVE AREA POINTER F6BO 57 4649 PUSH DI I SAVE CODE POINTER F6BI 890800 4650 MOV ex.s ; t-M1BER OF BYTES TO MATCH F6B4 F3 4651 REPE CMPS8 I COMPARE THE 8 BYTES F68S Ab F686 SF 4652 pop DI ; RECOVER THE POINTERS F687 SE 465l POP SI F688 741E 4654 JZ 518 I IF ZERO FLAG SET. THEN MATCH OCCURRED Fb8A FEtO 4655 INC AL i HO MATCH, HOVE ON TO HEXT F68C 83C706 4656 AOD 01.8 I NEXT CODE POINT Fb8f 4" 4657 DEC OX I LOOP CONTROL f690 75EO 4658 JNZ S17 I DO All OF THEN 4659 4660 ;----- CHAR NOT MATCHED, HIGHT BE IN USER SUPPLIED SECOHD HALF 4661 F6n leOO 4662 CMP AL,O i Al <> 0 IF ONLY 1ST HAlF SCANNED ft.?'" 7412 466l JE 518 I IF :; 0, THEN All HAS BEEN SCANNED Fb96 28tO 4664 sua AX,AX F6098 8E08 4665 MOV DS,AX ESTABLISH ADDRESSING TO VECTOR 4666 ASSUME DS:ABSO Fl.?A C43E7COO 4667 LE5 DI,EXT_PTR ; GET POINTER F69E aceo 4668 MOV AX.ES ; SEE IF THE POINTER REALLY EXISTS F6AO OBC7 4669 OR AX.DI i IF ALL 0, THEN DeESH' T EXIST F6A2 7404 4670 JZ S18 ; He SENSE LOOKING F6A4 B080 4671 MOV Alol28 I ORIGIN FOR SECOND HALF fbA6 EBDZ. 4672 JMP 510 J, GO BACK AND TRY fOR IT 4673 ASSUME DS:DATA 4674 4675 i----- CHARACTER IS FOUND ( AL:;O IF NOT FOUND ) 4676 fbA6 4677 S18: F6AB 63C408 4678 ADO SP.8 I READJUST THE STACK, THROW AWAY SAVE F6AB E917FB 4679 JMP ; All DONE 4680 GRAPHICS_READ ENDP 4681 ;-------------------------------------------------------- 4682 ; EXPAND_HED_COLOR 4683 THIS ROUTINE EXPANDS THE LOW 2: BITS IN BL TO 46M FILL THE ENTIRE ax REGISTER 4685 ENTRY 4686 BL = COLOR TO BE USED ( LOW 2 BITS I 4687 i EXIT 468a ex :; COLOR TO BE USED ( 8 REPLICATIONS OF THE 4689 2: COLOR BITS ) 4690 ; ---- ------------------------------------------ ---------- F6AE 4691 519 PROC NEAR F6AE 80E303 4692: AND Bl,3 ; ISOLATE THE COLOR BITS f6Bl 8AO 4693 MOV AL.BL ; COPY TO AL F6B3 51 4694 PUSH CX ; SAVE REGISTER F684 890300 4695 MOV CX,3 I NUMBER OF TIHES TO DO THIS f6B7 4696 S20: FbB7 OOEO 4697 SAL AL,l F6B9 OOEO 4698 SAL AL.l ; LEFT SHIFT BY 2 F6BS OAD8 4699 OR BL,AL ; ANOTHER COLOR VERSION INTO BL F6BO E2F8 4700 LOOP S20 ; FILL ALL OF BL F6BF BAFB 4701 MOV SH.BL I FILL UPPER PORTION Ft.Cl 59 4702 POP CX I REGISTER BACK Fue2 C3 4703 RET ; ALL DONE 4704 S19 ENDP 470S 1-- -- --- ------------------------ ------------------------ 4706 I EXPAI'Il_BYTE 4707 THIS ROUTINE TAKES THE BYTE IN Al AND DOUBLES 4708 ALL OF THE BITS. TURNING THE 8 BITS INTO 4709 16 BITS. THE RESULT IS LEFT IN AX 4710 ;-------------------------------------------------------- Ft.C3 4711 521 PRDC NEAR F6C] 52 4712: PUSH OX I SAVE REGISTERS Ft.C4 51 4713 PUSH CX F6es 53 4714 PUSH BX F6C6 280l 4715 SUB OX.DX ; RESULT REGISTER F6C8 890100 4716 MDV ex.! I MASK REGISTER F6CB 4717 52:2:: F6CB 8808 4718 MOV BX.AX I BASE INTO TEttP A-66 System BIOS LOC OBJ LINE SOURCE Ft.CD U09 4719 ANIl eX,ex I USE ttASK TO EXTRACT .. BIT F6CF OB03 47Z0 OR oX,ex ; PUT INTO RESULT REGISTER P6DI DlEO 472:1 .,1L AX,. r6D3 OlEl 4722 SIll CX,1 I SHIFT BASE ANJ I1ASK 8Y 1 F6D5 8808 4723 I10V eX,AX J BASE TO TEMP F6D7 2309 4724 .NO eX,ex I EXTRACT THE SAME BIT F609 OB03 4725 OR oX,ax I PUT INTO RESULT F6DS DIEl 4726 SHl ex.! ; SHIFT ONLY MASK NON. 4727 , MOVING TO NEXT BASE F6DO 73Et 4728 JNC 522 I USE HASK BIT COMING OUT TO TERtUNATE FbDF 8BI;C: 47Z9 MOV AX.OX I RESULT TO PARI1 REGISTER F6El 5B 4730 pop BX F6E2 59 4731 pop ex I RECOVER REGISTERS F6E3 SA 4732: POP DX F6E4 C3 4733 .ET j ALL DONE 4734 521 ENDP 4735 ; ----- - -- ------------------------------------------------ 4736 I HED_READ_BYTE 4737 THIS ROUTINE lULL TAKE 2: BYTES FROM THE REGEN 4738 BUFFER. CQHPARE AGA.INST THE C~RENT FOREGROUND 4739 COLOR. AND PLACE THE CORRESPONDING otVOFF BIT 4740 PA.TTERN INTO THE CURRENT POSITION IN THE SAVE 4741 AREA 4742: ENTRY 4741 SI.OS ::: POINTER TO REGEN AREA OF INTEREST 4744 BX = EXPANDED fDREGROlJt-I) COLOR 4745 BP = POINTER TO SAVE AREA 4746 I EXIT 4747 BP IS INCREMENT AFTER SAVE 474B 1-------------------------------------------------------- f6E5 4749 sa PRoe NEAR F6ES 8"24 4750 MOV AH,[SI] • GET FIRST BYTE F6E7 811.4401 4751 MOV AL.[SI+I J ; GET SECOND BYTE F6EA B900CO 4752 MOV eX,OCOOOH ; 2 BIT I1ASK TO TEST THE ENTRIES F6ED 8200 4753 "OV OL,O ; RESULT REGISTER F6EF 4754 524: F6EF 8SCI 4755 TEST AX,CX I IS THIS SECTION BACKGRoutI)? F6Fl F8 4756 ele ; CLEAR CARRY IN HOPES TlfAT IT IS F6F2 7401 4757 JZ 52S I IF ZERO. IT IS BACKGRO\H) F6F4 F9 4758 5ye ; WASN'T, SO SET CARRY F6F5 0002 4759 525: Rel OLd ; MOVE THAT BIT INTO THE RESULT F6F7 01E9 4760 5H. eX,l F6F9 01E9 4761 5H. CXd I HOVE THE MASK TO THE RIGHT BY 2: BITS F6FB 73FZ 4762 JNt 524 ; DO IT AGA.IN IF HASK DIDN'T FA.LL OUT F6FD 885600 4763 "OV [SP]'OL ; STORE RESULT IN SAVE AREA F700 45 4764 INC BP t ADJUST POINTER F701 C3 4765 RET • ALL DONE 4766 sa ENOP 4767 ; ---- -- ------- --------- - --- - --------------------- 4768 4769 , ; V4_POSlTION THIS ROUTINE TAKES THE CURSOR POSITION 4770 CONTAINED IN THE MEHOAY LOCATION. AND 4771 CotNERTS IT INTO AN OFFSET INTO THE 4772 REGEN BUFFER, ASSUMING ONE BYTE/CHAR. 477:J FOR MEOIUN RESOlllTION GRAPHICS. 4774 THE tuMBER MUST BE DOUBLED. 4775 ; ENTRY 4776 NO REGISTERS. tfEHORY LOCATION 4777 CURSOR_POSH IS USED 477& ; EXIT 4779 AX CONTAINS OFfSET INTO REGEN BUFFER 4780 ;-------~---------------------------------------- H02 4781 52. .ROC NEAR F702 A15000 478Z HOV AX,CUR5OR_POSH ; GET CURRENT CIMSOR F70S 4783 GRAPH_POSH LABEL NEAR F705 53 4784 PUSH BX J SAVE REGISTER F706 8808 4765 MOV 8X,AX ; SAVE A COPY Of CURRENT CURSOR F70B BAC4 4786 MOV AL.A.H ; GET ROWS TO AL F70A F6264AOO 4787 "Ul BYTE PTR CRT_COLS ; MULTIPLY BY BYTES/COLlI'IN F70E DIEO 4788 SHl AX.l J MULTIPLY * 4 SINCE 4 ROWS/BYTE f710 OlEO 4789 SHl AX.! F712 ZAFF 4790 SUB SH,SH ; ISOLATE COLUMN VAlUE F714 03e3 4791 ADD Ax.BX • DETERMINE OFFSET F716 5a 4792 pop ox i RECOVER POINTER F717 C3 4793 RET ; ALL DONE 4794 52. EIilP System BIOS A-67 LOC OBJ LINE SOURCE 4795 1-------------------------------------------------· ------.--------------- 4796 ; WRITE.TTY 4797 THIS INTERFACE PROVIDES A TELETYPE LIKE INTERFACE TO THl: VIDEO 4798 CARD. THE INPUT CHARACTER IS ~ITTEN TO THE CURRENT CURSOR 4799 POSITION. AND TIlE CURSOR IS MOVED TO THE NEXT POSITION. IF THE 4800 CURSOR LEAVES THE LAST COL~ OF THE FIELD, THE COLUHH IS SET 4801 TO ZERO. AND THE ROW VAlUE IS INCREMENTED. IF THE ROW VALUE 4802 LEAVES THE FIELD. THE CURSOR IS PLACED ON THE LAST ROW, FIRST 4803 COLUMN. AND THE ENTIRE SCREEN IS SCROLLED UP ONE LINE. ItIiEN 4804 THE SCREEN IS SCROLLED up, THE ATTRIBUTE fOR FILLING THE NEWLY 4805 BLANKED LINE IS READ FROM THE CURSOR POSITION ON THE PREVIOUS 4806 LINE BEFORE TliE SCROLL, IN CHARACTER MODE. iN G~APHICS MODE, 4807 THE 0 COLOR IS USED. 4808 ENTRY 4809 (AH) = CURRENT CRT f100E 4810 (All :: CHARACTER TO BE WRITTEN 4811 NOTE THAT BACK SPACE. CAR RET, BEll AND LINE FEED ARE HANDLED 4612 AS COMMANDS RATHER TI-lAN AS DISPLAYABLE GRAPHICS 4611 (BLl :: FOREGROUND COLOR FOR CHAR WRITE IF CURRENTLY IN A 4814 GRAPHICS MODE 4615 ; EXIT 4816 ALL REGISTERS SAVED 4817 ;------------------------------------------------------------------------ 4816 ASSUME CS:COOE .05:DAT'" F7la 4619 WRITE.TTY PROC NEAR F718 50 4820 PUSH AX ; SAVE REGISTERS F719 50 4821 PUSH AX ; SAVE CHAR TO WRITE F71A 8403 4822 MOV AM,3 F71C 8A3E6200 482:3 MOV BH .ACTIVE.PAGE ; GET THE CURRENT ACTIVE PAGE Fno COlO 4820+ INT 10H ; READ THE CURRENT CURSOR POSITION F722 58 482:5 pop AX ; RECOVER CHA.R 482:6 4827 1----- OX NOW HAS THE CURRENT CURSOR POSITION 4828 F723 X08 482:9 eMP AL.6 1 IS IT .l BACKSPACE F725 7452: 4830 JE U8 I BACI<.SPACE F727 3eOD 4831 eMP AL,DDH ; IS IT CARRIAGE RETURN F729 7457 4832 JE U9 I CAR.RET FnB XOA. 4833 eMP Al,DAH ; IS IT A LINE FEED F72D 7457 4634 JE U10 I LINEJEED F72F 3C07 4835 eMP AL.D7H I IS IT A BElL F731 745A 4636 JE Ull I BELL 4837 4838 ; ----- WRITE THE CHAR TO THE SCREEN 4639 4840 F733 840A. 4641 I10V AH.ID ; WRITE CHAR ONLY F735 690100 4842 MOV CX.l I ONLY ONE CHAR F738 COlO 4843 INT 10H ; WRITE THE CHAR 4844 4645 ; ----- POSITION THE CURSOR FOR NEXT CHAR 4846 F73A FEe2: 4847 INC Ol f73C 3AI64AOO 4848 'MP OL,BYTE PTR CRT_COLS I TEST FOR COLUMN OVERFLOW F740 7533 4649 JNZ U7 ; SET_CURSOR F742 B200 4850 HOV CL.O ; COLUMN FOR CURSOR F744 SGFEIS 4651 eMP DH,Z4 F747 752:A 4852 JNZ U6 ; SET.CURSOR.INC 4853 4854 ; ----- SCROLL REQUIRED 4855 F749 4856 Ul: F749 6402 4657 HOV AH.2 F74B COlO 4856 INT 10H ; SET THE CURSOR 4859 4860 ;----- DETERMINE VALUE TO FILL WITH DURING SCROLL 4861 F740 A04900 4862 MOV Al.CRT.MOOE ; GET THE CURRENT MODE F75D 3e04 '+863 eMP AL,4 F752 7206 4864 JC U, ; READ-CURSOR F754 3C07 4865 eMP AL.7 F756 B700 4866 MOV BH.o J FILL WITH BACKGROl.H) f758 7506 4867 JNE UJ ; SCROLL-UP F75A 4866 U2: I READ-CURSOR f75A. 8408 4869 MOV AH.8 F75C COlO 4870 INT 10H ; READ CHAR/ATTR AT CURRENT CURSOR F7Sf BAFe 4871 NOV 6H,AH ) STORE IN BH 1'"760 4872 U3: I SCROLL-UP A-68 System BIOS LOC OBJ LINE SOURCE n60 eaOl06 487' ""V AX.60tH j SCROll ONE lINE F763 ,Be9 4874 SUB cX,CX j UPPER LEFT CORNER F765 8618 4675 MOV DH,24 I LOWER RIGHT ROW F767 8.t.164AOO 4676 "OV OL.BYTE PTR CRT_COlS J lOWER RIGHT COLUMN F76B FEe.. 4677 DEC DL f?60 4876 U4' I VIDEO-CALL-RETURN F76D CDIO 4879 IHT 10H I SCROLL UP THE SCREEN f76F 4880 U5: I nV-RETURN F76F 58 4881 POP AX I RESTORE THE CHARACTER F770 E952FA 4882 J"P VIDEO_RETURN I RETURN TO CALLER F773 4863 U6: I SET-CLRSOR-IHC F773 FEC6 46e4 INC DH j HEXT ROW f775 4885 U7: J SET-CURSOR F775 8402 F777 EBF4 4." 4887 "OV J"P AH,2 U4 I ESTABLISH THE NEW CURSOR 4868 4889 ;----- 8J,CK SPACE FOUH!) 4890 f779 4891 us: f779 SOFADO 4892 C"P Dl.o I ALREADY AT Et() OF LINE f77C 74F7 4893 JE U7 ; SET_CURSOR F77!;: FECA 4894 DEC DL I NO -- JUST HOVE IT BACK F7eD EBF3 4895 J"P U7 1 SET_CURSOR 4896 4897 1----- CARRIAGE RETURN FOUND 4898 F78t 4899 U9: F7et 8200 4900 "OV OL,O ; MOVE TO FIRST COll..t1H F784 EBEF 4901 JMP U7 1 SET_CURSOR 4902 4903 ; ----- LINE FEED FOUND 4904 F7a6 4905 U10: F7ab BOFEla 4906 C"P DH.24 i BOTTOH OF SCREEN F789 75E6 4907 JHE U6 ; YES, SCROLL THE SCREEN F7aa EBBC 4908 JMP Ul J NO, JUST SET THE CURSOR 4909 4910 ;----- BEll FOlH) 4911 F7eD 4912 U11: F760 B302 4913 HOV BL.2 i SET UP COUNT FOR BEEP F78F E67602 4914 CALL BEEP J SOUND THE POD Bell F792 fBDB 4915 US J TTY_RETURN 4916 EHOP 4917 J ---------------------------------------------------------------- 4918 • LIGHT PEN 4919 THIS ROUTINE TESTS THE LIGHT PEN SWITCH ANO THE LIGHT 4920 PEN TRIGGER. IF 80TH ARE SET, THE LOCATION OF THE LIGHT: 4921 PEN IS DETERMINED. OTHERWISE. A RElURN WITH NO 49a INFORMATION IS HADE. 4923 ; ON EXIT 4924 (AH) = 0 IF NO LIGHT PEN INFORMATION IS AVAILABLE 4925 ex.ex,DX ARE DESTROYED 4926 (AH) = 1 IF LIGHT PEN IS AVAILABLE 4927 (OH,OU = ROW.COLUMN OF CURRENT LIGHT PEN 4928 POSITION 4929 (CH) = RASTER POSITION 4930 (ex) = BEST GUESS AT PIXEL HORIZONTAL POSITION : 4931 1---------------------------------------------------------------- 4932 ASSUHE CS:CODE,OS:DATA 4933 j----- SUBTRACT_TABLE F794 4934 VI LABEL 8YTE F794 03 4935 08 3,3.5.5.3,3,3,4 , F795 03 F796 05 F797 05 F79B 03 F799 03 F79A 03 F79B Oct F79C 4936 PRot NEAR 4937 4936 1----- WAIT FOR LIGHT PEN TO BE DEPRESSED 4939 F79C 6400 4940 MOV AH,O J SET NO LIGHT PEN RETURN CODE F79E 88166300 4941 MOV DX.ADDR_6845 , GET BASE ADDRESS OF 6845 F7A2 83(:206 4942 ADD DX.6 I POINT TO STATUS REGISTER System BIOS A-69 LOC OBJ LINE SOURCE FlA.5 EC 4943 IN AL.DX I GET STATUS REGISTER FlAb A804 4944 .TE5T AL.4 ; TEST LIGHT PEN SWITCH F7A8 757E 4945 JNZ V6 j troT SET. RETURN 4946 4947 ;----- NOlo! TEST FOR LIGHT PEN TRIGGER 4948 F7AA AaDZ 4949 TEST AL t 2 TEST LIGHT PEN TRIGGER F7AC 7503 4950 JNZ V7A RETURN WITHOUT RESETTING TRIGGER F7U £98100 4951 JM" V7 4952 4953 ; ----- TRIGGER HAS BEEN SET. READ THE VALUE IN 4954 F7B1 4955 V7A: F761 6410 4956 MOV AH.16 I LIGHT PEN REGISTERS ON 6845 4957 4958 • ----- INPUT REGS POINTED TO BY AH. AND CONVERT TO ROW COLUMN IN OX 4959 F763 88166300 4960 tfOV DX.ADDR_6845 I ADDRESS REGISTER FOR 6845 F787 SAC4 4~61 MOV .... L,AH ; REGISTER TO READ F789 EE 4962 OUT DX.AL ; SET IT UP F7BA 42 4963 INC OX ; DATA REGISTER F7BB EC 4964 IN Al,OX I GET THE VALUE F7BC BAEe 4965 MOV CH.AL ; SAVE IN CX F7BE 4A 4966 DEC OX ; ADDRESS REGISTER F7BF FEC4 4967 INC AH F7el 8AC4 4968 MOV AL,AH ; SECOND DATA REGISTER F7C3 EE 4969 OUT OX.Al F7C4 42 4970 INC OX ; POINT TO DATA REGISTER F7e5 EC 4971 IN AL,DX • GET SECOND DATA VALUE F7C6 8AE5 4972 MOV AH,CH • AX HAS INPUT VALUE 4973 4974 ; ----- AX HAS THE VAlUE READ IN FRaN THE 6845 4975 f7e8 8AIE4900 4976 MOV BL.CRT_MOOE F7ee ZAFF 4977 SUB BH,SH ; HODE VALUE TO 6X F7eE 2E8A.9F94F7 4978 MOV ElL,CS:Vl[BX) ; DETERMINE AMOUNT TO SUBTRACT F7D3 28C3 4979 sue AX.SX • TAKE IT AWAY F7DS 881E4EOO 49e.0 I10V ex, CRT_START F7D9 DlEB 4981 SH. Bl<,l F70B 2Be3 4982 SUB AX.BX F7DD 7902 4983 JNS v. ; IF POSITIVE. DETERtlINE MODE F70F 25CO 4984 SUB AX,AX ; <0 PLAYS AS 0 4985 4986 ;----- DETERMINE MODE OF OPERATION 4987 F7Et 4988 V2: ; OETERMINE~HOOE F7El BI03 4989 MOV CL.3 i SET *8 SHIFT COUNT F7E3 803E490004 4990 eM" CIH_MOOE,4 ; DETERMINE IF GRAPHICS OR AlPHA F7E8 nZA 4991 JB V4 ; ALPHA_PEN F7EA 803E490007 4992 eM" CRT_MODE ,7 F7EF 7423 4993 JE V4 4994 4995 j----- GRAPHICS MODE 4996 F7Fl 6228 4997 MOV DL,40 ; DIVISOR FOR GRAPHICS F7F3 F6F2 4998 DIV OL ; DETERMINE ROW( AL I AHO COLUMtH AH I 4999 , AL RANGE 0-99. AH RANGE 0-39 5000 5001 ;----- DETERMINE GRAPHIC ROW POSITION 5002 F7F5 SAEe. 5003 MOV CH.AL j SAVE ROW VALUE IN CH F7F7 02EO 5004 ADD CH,CH J *2 FOR EVEN/ODD FIELD F7F9 BADe 5005 MOV Bl,AH I COLUNN VALUE TO BX F7F8 2AFF 5006 SUB BH.BH I MULTIPLY BY 8 FOR MEDIlR1 RES F7FO 803E490006 5007 eM" CRT_MOOE,6 i DETERMINE MEDIUM OR HIGH RES Fe02 7504 5008 JNE V3 ; NOT_HIGH_RES FaD4 B104 5009 I10V CL,4 J SHIFT VALUE FOR HIGH RES Fa06 DOE4 5010 SAL AH,l I COLI.Jt'I.l VALUE TIMES 2 FOR HIGH RES FaDS 5011 V3: ; NOT_HIGH_RES FaDe D3E3 5012: SHL BX,CL I MULTIPLY *16 FOR HIGH RES 5013 5014 ,----- DETERMINE ALPHA CHAR POSITION 5015 faDA BAD4 5016 MOV DL,AH I COLUMN YALUE FOR RETURN FaDe SAFO 5017 tfOV OH.Al I ROW VALUE FaDE DOEE 5018 SH. OH,l I DIVIDE BY 4 Fel0 DOEE 5019 SH. DH,l I FOR VALUE IN 0-2:4 RANIE A-70 System BIOS LOC OBJ LINE SOURCE '812 EIU: 5020 J"P SHORT Y5 I LIGHT_PEN_RETlIm..SET 5021 5022 i ----- ALPHA HODE ON LIGHT PEN 5023 Fel~ 502'" V4: I ;'LPH~PEN F814 F6364A.OO 5025 DIY BYTE PTR CRT_COLS I DETERttJNE RDW,CDLtHI VALUE F818 8AFO 502:6 I10Y OH.AL I ROWS TO OH FalA &AD4 5027 ItOY DLtAH J COLS TO DL F8lC DUO 502:8 SAL AL.CL I tlJLTlPLY ROWS • 8 FalE SAEe 5029 ItOY CH,AL I GET RASTER VA.WE TO RETURN REG F820 BADe 5030 MDY BL.A.H J COlU1N VALUE F822 32Ff 5031 XOII BH,BH TO ax F824 D3E3 5032 SAL BX,Cl F82:6 5033 VS: LIGHT_PEN..RETI.RN_SET F826 BltOl 50 .. ItOY ",1 j II'IJICATE EVERTHltG SET F828 5035 Vb: I LlGHT_PEtLRETURH .... F82852. 5036 PUSM OX J SAVE RETURN VALUE 'IN CASE} F829 88166300 5037 MDY OX. ADDR_6845 I 6ET BASE ADDRESS F82D 8let07 ADD OX.7 I POINT TO RESET PAR" F830 EE 5039 OUT DX.AL I ADDRESS. NOT oA.TA, IS lHPORTANT F8ll 5A 5040 PDP OX J RECOVER VALUE f832: 5041 V7; ; RETURN_NO_RESET F832 SF 5042: PDP 01 F833 5E 5043 POP SI F834 IF 5044 POP OS J DISCARD SAVED ax.CX.DX F835 IF 5045 POP OS F836 IF 5046 PDP OS F837 IF 5047 pop OS F838 07 5048 pop n F839 CF 5049 IRET 5050 READ_lPEN ENlP 5051 5052 i--- INT 12 ------------------------------------------------------------- 5053 ; "EMORY_SIZE_DET 5DSilt I THIS ROUTINE DETERMINES THE AI1Ot.IIT OF MEMORY IN THE SYSTE" 5055 AS REPRESENTED BY THE SWITCHES ON THE PLAHAR. NOTE THAT THE 5056 SYSTEM I1AV NOT BE ABLE TO USE I/O tlEHORY tNLESS THERE IS A FUll ; 5057 I COI1PlEt'lENT OF 64K BYTES ON THE PLAHAR. 5058 I INPUT 5059 NO REGISTERS 5060 THE I1£MORY_SIZE VARIABLE IS SET DURING POWER ON DIAGNOSTICS 5061 ACCORDING TO THE FOllOWING HARDNARE ASSUI1PTIONS: 5062 PORT 60 BITS 3,2 :; 00 - 16K BASE RAM 5063 01 - 32K BASE RAH 5064 10 - 46K BASE RAM 5065 11 - 64K BASE RAH 5066 PORT 62 8ITS 3-~ IN)ICATE AI10lIfr OF liD RAM IN 32K INCREMENTS 5067 E.G •• 0000 - NO RAM IN 110 CHANNEL 5068 I 0010 - 641( RAM IN I/O CHAI+IEL. ETC. 5069 , OUTPUT 5070 (AX) = NUtlBER OF CONTIGUOUS lK BLOCKS OF ttEtIORy SO 71 ; ---- - -- ----- ------- -- -.--- ----- -- ---------------------------- - ---------- 5072 ASSUHf CS:CODE.DS:DATA. F841 5073 DRG OF841H F841 5074 MEttDRY.SIZE.DET PROC FAR F841 FB 5075 sn ;, INTERRUPTS BACK ON F842 IE 5076 PUSH OS j SAVE SEGMENT F843 E81302 5011 CALL DDS F846 A11300 5078 HOY i GET VALUE FM9 IF 5079 PDP I RECOVER SEGI1ENT FM. CF 5080 IRET I RETURN TO CALLER 5081 MEMORY.SIZE.DET ENDP 50ez 5083 1--- INT II -----------.----------------------------------------- 5084 , EQUIPMENT DETERI'lINATlOH 5085 THJS ROUTINE ATTEttPTS TO DETERnINE IliAT OPTIONAL 5086 DEVICES ARE ATTACHED TO THE SYSTEM. 5087 ~ INPUT 5088 NO REGJSTERS 5089 THE EQUIP.FLAG VARIABLE IS SET DURING THE POWER ON 5090 DIAGNOSTICS USING l1IE FOLLOWING HARDWARE ASSU1PTIDNS: 5091 PORT 60 = LOW ORDER BYTE OF EQUPMENT 5092 PORT 3FA = INTERRUPT ID REGISTER OF 8250 5093 BITS 7-3 ARE ALWAYS 0 5094 PORT 378 = OUTPUT PORT OF PRINTER -- 8255 PORT THAT 5D95 CAN BE READ AS WELL AS WRITTEN 5096 I OUTPUT System BIOS A-71 LOC OBJ LINE SOURCE 5097 (AX) IS SET, BIT SIGNIFICANT, TO INDICATE ATTACHED 110 5."" 5099 aIT 15,14 = M.ItIBER OF PRINTERS ATTACHED BIT 13 NOT USED 5100 BIT 12 = SA"E 1/0 ATTACHED 5101 BIT 11,10,9 = tu1BER OF R8232 CARDS ATTACHED 5102 BIT a LtfUSED 5103 BIT 7.6 = IUIIER OF DISKETTE DRIVES 5104 00=1, 01=2, 10=3, 11=4 ONLY IF BIT 0 = I 5105 BIT 5.4 = INITIAL VIDEO J10DE 5106 aD - l.NUSED 5107 01 - 40X25 BW USING COLOR CARD 5108 10 - BOXIS BW USING COLOR CARD Sla, 11 - BOXIS BW USING aN CARD 5110 BIT 3,2 II PLANAR RAf1 SIZE IOO=16K,Dl=3ZK.lO=If8K,1l=6IfK) 5Ul BIT 1 NOT USED SU2 BIT 0 = IPL FRal1 DISKETTE -- THIS BIT INDICATES THAT 5113 THERE ARE DISKETTE DRIVES ON THE SYSTEM 5114 5115 NO OTHER REGISTERS AFFECTED 5116 1------ --.. --------- --- -- -- .. - --.... - ..... - ------- ---- -------------- ---- 5117 'SSUHE CS:CODE,DS:DATA. F84D 5U8 ORO OFMOH F84D 5119 EQUIPMENT PROC 'AR F840 FB 5120 STl I INTERRUPTS BACK ON F8ltE IE 5121 I'US!t DS i SAVE SEGI1ENT REGISTER fMF EBD70e 5122 CALL DDS F852 All000 5123 ItOV AX,EQUIP_FLA6 I GET THE CURRENT SETTINGS F855 IF 512ft pop DS I RECOVER SEGMENT F856 CF 5125 IRET I RETl.RH TO CALLER 5126 E~IPI1EMT E""P 5127 5128 1--- INT 15 ------------------------------------------------------------- 5129 DUJ1KY CASSE"E 10 ROUTINE-RETURNS 'INVALIO tHO' IF THE ROUTINE IS z 5130 IS EVER CALLED BY ACCIDENT (AH=86H, CARRY FUG=ll 5131 i ------ ----------- .. - ------ .. --- ------ ------- ---- -- ----------- -----.. ------- '85' 5132 DR. 0F859H f859 5133 CASSETTE_IO PROC ..R Fes9 f9 513"+ STe i CARRY INDICATOR=1 ,asA BIt86 5135 ItQV AH.86H f8SC CAGIOG 5136 5137 RET CASSETTE_ID •,,,,,p 5138 5139 5140 1---------------------------------------------------------------- ; NON-tuSKABLE INTERRUPT ROUTINE: 5141 THIS ROUTINE WILL PRINT A PARITY CHECK 1 OR 2 I1ESSAGE : 5142 AND ATTEMPT TO FIND THE STORAGE LOCATIOH CONTAINING THE 5143 BAD PARITY. IF FOUND. THE SEGMENT ADDRESS WILL BE 5144 PRINTED. IF NO PARITY ERROR CAN BE FDUHD (INTERI1ITTANT : 5145 READ PROBLEtU !?!?1<-WILl BE PRINTED ~ERE THE ADDRESS 5146 WtlJLD NORttALLY GO. 51ft7 IF ADDRESS IN ERRCII IS IN THE 110 EXPANSION ICDC , THE 5148 ADDRESS WILL BE FOLLOWED BY A '( E)' f IF IN SYSTEI1 UNIT, 5149 A '(S)' WILL FOLLOW THE ADDRESS F85F 5150 1-----------------------------------------------------__________ _ 5151 Nt1~INT PROC NEAR 5152 ASSlR1E DS:DATA F85F 50 5153 PUSH AX ; SAVE ORIG CONTENTS OF AX F860 £462 5154 IN Al.PCRT_C F862 ASCO 515S TEST AL,OCOH I PARITY CHECK1 ... JHZ F864 7503 5156 HHI_l , F866 E98700 5157 5158 NHI_l: JH" .10 I NO, EXIT FROM ROUTINE fS69 BA4000 5159 I10V DX,DATA f86C SEDA 5160 HOV DS,OX F86E BE 15F990 5161 ItOV 51 ,OFFSET 01 I ADOR QF ERROR MSG F872 A840 5162 TEST AL,40H I I/O PARITY CHECK F874 7504 5163 JHZ 013 I DISPLAY ERROR IiSG F876 8£25F990 5164 ItOV 51.0FFSET D2 I I1UST BE PLANAR f87A 5165 D13: F87A 8400 5166 HOY AH.O I INIT AtI:I SET ttODE FOR VIDEO F87C AQ4900 5167 HOY ALICRT_MODE f87F tolD 5168 INT IOH J CALL VIDEO_IO PROCEDURE F881 E84601 5169 CALL p_1ISG I PRINT ERROR t1SG 5170 5171 i----- SEE IF LOCATION 'mAT CAUSEO PARITY CHECK CAN BE FOUND 5172 F884 8000 5171 J DllUlLE TRAP A-72 System BIOS LOC OBJ LINE SOURCE FM6 E6 ... 0 5174 OUT OACH,AL F88S £461 5175 IN AL.PORT_B F8SA oe30 5176 OR AL.OOI10000B I TOGGLE PARITY CHECK ENABLES F8St E661 5177 OUT PORT_B.U FeaE 24CF 5178 AND AL.ll001111B F890 E661 5179 OUT PORT_B,Al Fan 861 E1300 5180 HOV 8X,ME/1ORY_SIZE ; GET MEMORY SIZE WORD F896 Fe 5161 eLD ; SET OIR FLAG TO INCRIMENT F897 2802 5182 SUB OX,OX , POINT DX AT START OF HEN F899 5183 NMI_LOOP: F899 aEDA. 5184 MOV OS,OX F89B 8EC2 5185 HOV ES,DX f89D 890040 5'86 MOV CX,4000H J SET FOR 16KB SCAN F8AO 2BF6 5187 SUB SI,SI j: SET 51 TO BE REALlIVE TO 5168 ; START OF fS F8A2 F3 5189 REP loose ; READ 16KB OF MEMORY FaA] At F8A4 E462 5190 IN AL,PORT_C i SEE IF PARITY CHECK HAPPENED f8A6 24CO 5191 AN!) AL.IIOOOOOOB F8A8 7512 5192 JNZ PRT_NMI ; GO PRINT ADDRESS IF IT DID FeAA 61C20004 5193 ACO DX,0400H I POINT TO NEXT 16K BLOCK FeAE 83E810 5194 SUB ex.16D FaBl 75E6 5195 JHZ NHI_LOOP F8B3 BEJ5F990 5196 HOV 51'( OFFSET D~.t.1 , PRINT ROW OF ????? IF P.t.RITY F8B7 E8100l 5197 C.t.Ll P_HSG ; CHECK COULD NOT BE RE-CREATED f8BA FA 5198 eLI f88S F4 5199 HlT ; HALT SYSTEM F8SC 5200 PRT_tI1I: F8BC BCD.t. 5201 MOV OX.DS FBBE E81907 5202 CAll PRT_SEG i PRINT SEGHEHT v .... LUE F8CI BA1302 5203 MOV OX.0213H F8C4 BOOO 5204 AL.OO ; DISABLE EXPANSION BOX F8C6 EE 5205 HOV OUT OX.AL , (CAN'T WRITE TO MEHI FBt7 B026 5206 MOV AL.'( , F8C9 E6DOOO 5207 CALL Pin_HEX Face B85AAS 5208 HOV AX.OAS5AH FSCF 89ca 5209 MOV CX.AX FaDl 2808 5210 SUB eX.8X F8D3 8907 5211 HOV lexl.AX ; WRITE A WORD TO SEGMENT rnA T F8D5 90 5212 NtP FBD6 90 5213 NOP FaD7 8B07 5214 MOV AX,[BX) ; HAD THE ERROR F8D9 3BCl 5215 eHP AX,CX ; IS IT THERE? faDB 7407 5216 JE SYS_BOX_ERR , YES- MUST BE SYS IJUT F80D 8045 5217 HOV Al.'E' ; NO-MUST BE IN EXP. BOX F8DF E8BAOO 5218 CAll PRT_HEX FeE2 E805 5219 JMP SHORT HlT_NMI FBE4 5220 SYS_BOX_ERR: FBE4 8053 5221 MeV AL, '5' F8E6 f68300 5222 CALL PRT_HEX F6E9 5223 HLT_HMI: F8E9 8029 5224 HOV AL.' )' F8Es E8AEOO 5225 CALL PRT_HEX F6EE FA. 5226 ell I HALT SYSTEM F8EF F4 522:7 HlT F6FO 5228 D14: F6FO 58 52:29 POP AX i RESTORE ORIG CONTENTS OF AX F8Fl CF 52:30 IRET 5231 NMI_INT ENDP 5232: 5233 5234 .-------- ------------------------------- - RDS CHECKSUM SUBROUTINE 52:35 j---------------------------------------- F6F2 5236 ROS_CHECKSUM PROC NEAR ; NEXT_ROS_r'lODULE F8F2 890020 5237 MeV eX,Bl92 ; HUMBER OF BYTES TO ADD FeF5 5238 ROS_CHECKSUH_CNT: ; ENTRY FOR OPTIONAL ROS TEST F8F5 32CO 5239 XOR A.L,AL FeF7 5240 C26: f8F7 0207 52:41 ADO .U,DS:[BX] F6F9 43 5242: INC BX o POINT TO NEXT BYTE F6FA E2FB S243 LOOP eo. j ADD ALL BYTES IN ROS I10DULE F8FC OACO 52:44 OR Al,AL ; SUN = 01 F8FE C3 5245 RET 5246 ROS_CHECKSlJt1 ENDP 5247 ; -------------_.-. ----. ---- ---- - --------- 5248 HESSAGE AREA. FOR POST 52:49 J - - ---- - -- - - - - - -- ---- - ----- -- - -- --- ------ System BIOS A·73 LaC OBJ LINE SOURCE F8FF 313031 5250 EO DB '101'.13010 , SYSTEM BOARD ERROR F90Z 00 F90J 0", F904 20323031 5251 El DB • 201' ,13.10 I MEMORY ERROR F90S 00 F909 0"' F90A 524F4D 5252 nA DB 'ROM',n.IO • ROM CHECKSUM ERROR F90D 00 F90E OA F90F 31383031 5253 no DB '1801' ,13.10 EXPANSION IO BOX ERROR F913 00 f914 OA f915 50415249545920 5254 01 DB 'PARITY CHECK 2' .13.10 43484543452032 F923 00 F9Z4 o. F925 504152:49545920 5255 D2 DB 'PARITY CHECK l' .13,10 434&4543482031 F933 00 F934 0" F935 3F3F3F3F3F 5256 D2A DB '??'?1?',13.10 F93A 00 F93B OA 5257 5258 ; ----------------------- -- ---- ------------------------ - --------- --- ------ --- 5259 BlIHK lEO PROCEDURE FOR MFG RUN-IN TESTS 5260 IF lEO IS ON. TURN IT OFF. IF OFF. TURN ON. 5261 j--------------------------------------------------------------------------- 5262 ASSln1E OS:O,6.TA F93C 5263 BLINK_INT PROC NEAR f93C FB 5264 sn F93D SO 5265 PUSH AX ; SAVE AX REG CONTENTS F93E [461 5266 rH Al.PORT_B ; READ CURRENT VAL OF PORT B F940 8AEO 5267 MOV AH.Al F942 FoOD 5268 NOT AL ; FLIP All BITS F944 2440 5269 AND Al,OlOOOOOOB I ISOLATE CONTROL BIT F946 60E4Bf 5270 AND AH.IOIlllllB j MASK OUT OF ORIGINAL VAl F949 OAC4 5271 OR AL.AH ; OR NEW CONTROL BIT IN F948 Eb61 5272 OUT PORT_S.AL F94D 5020 5273 MOV AL.EOI f94F f620 5274 OUT INTAOO .AL F951 58 5275 POP AX ; RESTORE AX REG F9S2 CF 5276 IRET 5277 BLINK_INT ENOP 5278 5279 -- ------- ---- - ---- - - ---- --- --- ----- ----- -- -- ----- 5280 THIS ROUTINE CHECKSUMS OPTIONAL ROM MODULES AND 5281 IF CHECKSUH IS OK, CALLS nUT/TEST CODE IN MODULE 5282 ; -- --- - ------------------- ------------------ ------------- F953 5283 PROC NEAR f953 884000 "84 AX. DATA I POINT ES TO DATA ....RE .... F956 8Eeo 5285 ES.AX F956 2AE4 5286 SUB .6.H.AH ; ZERO OUT AH F95A 8A4702 5287 MOV .... L.[BX+zl I GET LENGTH INDICATOR F95D BI09 5288 MOV CL.09H ; MULTIPLY BY 512 F95F 03EO 5289 SHL AX.Cl f961 8eca 5290 HOV CX.AX ; SET COUtH F%351 5291 PUSH CX I SAVE COUNT F964 890400 5292 MOY CX.4 I ADJUST F967 03E8 5293 SHR AX.CL F969 0300 5294 ADD DX.AX ; SET POINTER TO NEXT MODULE F96B 59 52:95 POP CX ; RETIUVE COUNT F96C E886FF 5296 CALL ROS_CHECKSUH_CNT I 00 CHECKSUM F96F 7406 5297 JZ F971 E857EO 5298 CALL ROM_ERR ; POST CHECKSUM ERROR F974 EB1490 5299 Jt1P ROH_CHECK_EHD ; AND EXIT F977 5300 F977 52 5301 PUSH OX I S,AVE POINTER F978 26C70667000300 5302 HOV ES: IO_ROM_INIT. 0003H LOAD OFFSET F97F 268ClE6900 5303 MOY ES: IO_ROI'CSEG ,OS LOAD SEGMENT F984 26FFlE6700 5304 CALL DWORD PTR ES:IO_ROM_INIT I CALL INIT ./TEST ROUTINE F989 SA 5305 POP OX f'98A 5306 F'98A C3 5307 RET I RETURN TO CALLER 5308 ENDP 5309 A-74 System BIOS LaC OBJ LINE SOURCE 5310 J ------------------- ----------------------------- 5311 ; CONVERT AND PRINT ASCII CODE 5312 At MUST CONTAIN NUtlBER TO BE CONVERTED. : 5313 AX AND ax DESTROYED. 5314 1------------------------------------------------ F98B 5315 XPC_BYTE PROC NEAR F98e 50 5316 PUSH AX I SAVE FOR LOW NIBBLE DISPLAY F96C 8104 5317 ItOV CL.4 i SHIFT COUNT f98E 02E8 5318 SHR AL.CL 1 MYBBlE SWAP F990 E80300 5319 CALL XLAT_PR I DO THE HIGH NIBBLE DISPLAY F991 58 5320 pop AX I RECOVER THE NIBBLE f994 240F 5321 AND AL.OFH I ISOLATE TO LOW NIBBLE 5322 I FALL INTO LOW NIBBLE CONVERSIOH f"996 532:3 XLAT_PR PRot NEAR I CONVERT OO-OF TO ASCII CHARACTER F996 0490 5324 ADD AL.O~OH I ADD FIRST CONVERSION FACTOR F998 27 5325 DAA I ADJUST FOR tM1ERIC ANI) ALPHA RANGE F999 1440 5326 ADC Al.,040H I ADD COt-lVERSION AI'I> ADJUST LOW NIBBLE F998 27 5327 DAA I ADJUST HIGH NIBBLE TO ASCHI RANGE F99C 5328 PRT_HEX PROC HEAR F99C B40E 5329 MOV AH.14 J DISPLAY CHARACTER IN Al F99E B700 5330 MOV BH~O F9AO COlO 5331 IHT IOH F9A2 C3 5332: RET 5333 PRT_HEX ENDP 5334 XLAT_PR EHOP 5335 XPC_BYTE ENDP 5336 F9A.3 5337 F. LA.BEL WORD • PRINTER SOURCE TABLE F9,6,3 BC03 5338 DW 36CH F9A5 7803 5339 DW 378H F9A7 7802 5340 DW 278H F9.\9 5341 F'E lABEL WORD 5>42 5343 i-------------------------------------------------------- 5344 i THIS SlI5ROUTINE WILL PRINT A MESSAGE ON THE DISPLAY 5345 5346 I ENTRY REQUIREMENTS: 5347 Sl = OFFSETCADDRESSJ OF MESSAGE BUFFER 5348 ex = MESSAGE BYTE CO~T 5349 MAXIt1UM MESSAGE LENGTH IS 36 CHARACTERS 5350 1-------------------------------------------------------- F9A9 5351 E_HSG PROC NEAR F9A9 BBEE 5352 MOV BP,SI f SET BP NON-ZERO TO F LAG ERR F9AB E8ICOO 5353 CALL P_MSG 1 PRINT MESSAGE F9AE IE 5354 PUSH DS F9AF EBA700 5355 CALL DDS MOV F9BZ AOI000 F985 2401 5356 5357 ...., AL.BYTE PTR EQUIPJLAG "'L.OIH 1 lOOf'IHALT ON ERROR 1 SHITCH ON? F967 750F 5358 JHZ G12 j NO - RETURN F969 5359 MFG_HALT: F989 FA 5360 eLI i YES • HALT SYSTEI'1 F9BA B069 5361 HOV AL.89H F9BC E663 5362 OUT CND_PORT.AL f9BE BOB5 5363 MOV AL.I000010IB I DISABLE KB F9CO E661 5364 OUT F9C2: A01500 5365 HOV AL.MFG_ERRJLAG 1 RECOVER ERROR ItI)ICATOR F9C5 E660 5366 OUT PORT_.... AL I SET INTO 8255 REG F9C7 F4 5367 HlT 1 HALT SVS F9C8 5368 G12: F9C8 IF 5369 POP F9C9 C3 5370 RET 5371 E_MSG EHOP 5372 F9CA 5373 P_MSG ,,"oe HEAR f9CA 5374 GIZA: F9CA 2E8A04 5375 HOV AL.eS:ISIJ PUT CHAR IN At f9CD 46 5376 ItIC 51 POINT TO NEXT CHAR F9CE 50 5377 PUSH AX I SAVE PRINT CHAR F9CF ESCAfF 5378 CALL F902 58 5379 POP AX I RECOVER PRINT CHAR F9D3 3eOA 5380 CMP "'L,lO ; HAS IT LINE FEED? F905 7!iF3 5381 JHE 612A ; NO,KEEr PRINTING STRING F907 C] 538Z RET 5383 P_MSG nllP 5384 5385 1------------------------------------------------ 5386 i INITIAL RELIABILITY TEST -- SUBROUTINES 5387 1------------------------------------------------ 53a8 ASSUHE CS:COOE,OS:OATA System BIOS A-75 LOC OBJ LINE SOURCE 5369 • ----------- ------------ ------------ ------------- 5390 SUBROUTINES FOR POWER ON DIAGNOSTICS 5391 1------------------------------------------------------------------------ 5392 THIS PROCEDURE WILL ISSUE ONE LONG TONE (3 SECS) AND ONE OR 5393 MOOE SHORT TONES (1 SEC) TO UIlICATE A fAILURE ON THE PLANAR 5394 BOARD, A BAD RAM MODULE, OR A PROBLEM WITH THE CRT. 5395 ; ENTRY PARAMETERS: 5396 DH ;; tM1BER OF LONG TONES TO BEEP 5397 Dl = HlIt1BER OF SHORT TONES TO BEEP. 5398 1-------- -------------------------------------------------- -------------- F9D8 530;19 F9D8 9C 5400 PUSHF ; SAVE FLAGS F9D9 FA 5401 CLI i DISABLE SYSTEM INTERRUPTS F9DA IE 5402 PUSH OS I SAVE OS REG CONTENTS F9DB £87800 5403 CALL ODS F9DE DAFb 5404 OR DH,DH ; ANY LONG ONES TO BEEP F9EO 7414 5405 JZ G3 ; NO, DO THE SHORT ONES F9EZ 5406 61: ; LONG_BEEP: F9EZ 8306 5407 MOV BL,6 I COUNTER FOR BEEPS F9E4 f82100 5408 CALL BEEP ; DO THE BEEP F9E7 5409 G2: F9E7 E2FE 5410 LOOP G2 DElAY BETWEEN BEEPS F9E9 FEeE 5411 DEC DH ANY MORE TO DO F9EB 75F5 5412 JNZ 61 I DO IT F9ED 803EIZ0001 5413 CHP MFG_ TST ,1 MFG TEST MODE? F9F, 7502 5414 JNE 63 YES - CONTINUE BEEPING SPEAKER F9F4 EBC3 5415 STOP BLINKING LED F9F6 5416 I SHORT_BEEP: F9F6 8301 5417 NOV BL,I COUNTER FOR A SHORT BEEP f9F8 E80DOO 5418 CALL BEEP 00 THE SOUHO F9FB 5419 G4: F9FB E2:FE 5420 LOOP G4 i DelAY BETWEEN BEEPS F9FD FEeA 54,1 DEC DL 1 ~ONE WITH SHORTS F9FF 7SFS 5422 JHZ 63 00 SOME MORE FAal 5423 65: FMl E,FE 5424 lOOP G5 LONG DELAY BEFORE RETURN FAD3 5425 66: FAD3 E2FE 5426 LOOP 66 FADS IF 5427 POP os I RESTORE ORIG CONTENTS OF OS FA06 90 5428 POPF ; RESTORE FLAGS TO OIUG SETTINGS FAD7 C3 5429 RET ; RETURN TO CALLER 5430 ENOP 5431 5432 ;----- ROUTINE TO SOUND BEEPER 5433 FADe 5434 BEEP PROC HEAR FAD8 8086 5-435 MDV AL,lOllOliUB ; SEL TIM 2.LSB,I1SB,BINARY FADA £643 >436 OUT TIHER+3,AL , WRITE THE TIMER HOOE REG FADe B83305 5437 MOV AX,533H J DIVISOR FOR 1000 HZ FAOF £642 5438 OUT TlHER+2,AL I WRITE TIMER 2 CNT - LSB fAll 8AC4 5439 "DV AL.AH FAl3 E642 5440 OUT TIMER+2,AL • WR ITE TIMER 2 CNT - MS8 FAlS £461 5441 IH AL,PORT_B ; GET CURRENT SETTING OF PORT FAl7 8AEO S44Z MOV AH.AL ; SAVE THAT SETTIHGH FA19 OC03 S443 00 ; TURN SPEAKER ON FAlS E661 5444 OUT FAlD 28e9 5445 SUB cX,ex ; SET CNT TO WAIT 500 MS FAIF 5446 G7; FA-IF E2FE 5447 LOOP G7 J DELAY BEFORE TURNING OFF FA21 FEee 5446 DEC BL ; OELAY CNT EXPIREO,? FAll 7SFA 5449 JNZ 67 ; HO - CONTINUE BEEPING SPK FA2S 8AC4 5450 MOV AL,A.H ; RECOVER VALUE OF PORT FA27 E661 5451 OUT FA29 C3 5452 RET ; RETURN TO CALLER 5453 BEEP ENOP 5454 5455 1------------------------------------------------------------------------ 5456 THIS PROCEDURE WILL SEND A SOFTWARE RESET TO TIlE KEYBOARD. 5457 SCAN CODE 'AA' SHOULD BE RETURNED TO THE CPU. 5458 1------------------------------------------------------------------------ FA2A 5459 KBD_RESET PROt NEAR 5460 ASSUME OS: ABSO fA2A BODe 5461 "OV AL,DSH ; SET KBD CLK LINE LOW FA2e E661 5462 OUT PORT_B,AL I WRITE 8255 PORT B FAZE 89562:9 5463 MOV CX,10582 1 HOLD KBO CLK LOW FOR 20 HS FA31 5464 68: FBI E2FE 5465 LOOP G8 J lOOP FOR 20 MS A-76 System BIOS LOC OBJ LINE SOURCE FAl3 Boce 5466 HOV , SET CLK. ENABLE LINES HIGH fAJS E661 5467 OUT FAl7 5468 SP_TEST: ) ENnn FOR MAt-lJF...CTlRING TEST 2 FA37 8048 5469 MOV AL,4eH ~ SET KBD CLK HIGH. EHABLE lOW FA39 E661 5470 OUT P(}RIT_B.U FA3B BOFD 5471 HOV AL,OFDH I ENABLE KEYBOARD INTERRUPTS FA1D E621 5472 OUT INTAOt .... t I WRITE 6259 IHR FAlf C606660400 5473 MOV DATA_AREA[OFFSET INTR_FLAGI I RESET INTERRUPT INDICATOR fA44 FB 5474 STI I ENABLE INTERRUPTS FA45 2BC9 5475 SUB CX,CX f SETUP INTERRUPT TIMEOUT CNT fA47 5476 FA47 Fb066BD4D2: 5477 TEST DATA_AREA[OFFSET 1NT RJLt.Gl,02H ; DID J. KEYBOARD IHTR acetin FA4C 7502 5478 JNZ GIO ; YES - READ SC...N CODE RETUrNED FA4E E2F7 5479 LOOP G9 I NO - LOOP TILL TIMEOUT FASO 5460 GI0: fA50 E460 5461 IN I READ KEYBOARD SCAN CODE FAS2 BADS 5482 MOV BL,Al ; SAVE SCAN COOE JUST READ fA54 Boce 5483 HOV AL,DCSH I CLEAR KEYBOARD FAS6 E661 5464 OUT PORT_B.Al FASS C3 54&S RET I RE~N TO C"'LLER 5486 KBD_RESET ENDP 5467 FA59 5486 DDS PROC NEAR FA59 50 5489 PUSH A}( I SAVE AX fASA 884000 5490 110V AX,OAT.4. FASO SEOS 5491 HOV DS,AX I SET SEGMENT FASF 58 5492 POP AX I RESTORE A.X FAbO C3 5493 RET 5ct94 DDS ENOP 5495 5496 1------------------------------------------------------------------------ 5497 CHARACTER GEHERATOR GRAPHICS FOR 320X200 ..tJ.Il 640X200 GRAPHICS 5498 1------------------------------------------------------------------------ FA6E 5499 ORG OFAbEH FA6E 5500 CRT_CHAR_GEN LABel BYTE FA6E oooooooooooaoooo 5501 DB OOOH, OOOH,eOOH, ooaH, OOOH, OOOH, OOOH, OOOH ; o_o0 FA76 7E81A581B099817E 5502 DB 07EH,081H,O"'5H,061H,OBOH,099H,061H,07EH I 0_o1 FA.7E 7EFFDBFFC3E7FF7E 5503 DB 07EH,OFFH,OOBH,OFFH,OC3H,OE7H.OFFH.07EH J D_02 FASE> 6CFEFEFE7C381000 5504 DB 06CH,OFEH,OFEH,OFEH,07CH,036H.DI0H.OOOH ; 0_03 FA8E l0187CFE7C3elOOD 5505 DB 010H,038H,07CH.OFEH.07CH,038H,OI0H,OOOH ; D_04 FA96 387C18FEFE7C387C 5506 DB 038H,07CH.038H,OFEH,OFEH,07CH,038H,07CH ; D_05 FA9E lOl0367CFE7C387C 5507 DB OlOH,DIOH.03eH.07CH.OFEH.07CH.03BH.07CH I D_06 FUb 0000183C3C180000 5506 DB OOOH,OOOH,OI8H.03CH,03CH,OI8H,OOOH.OOOH ; o_o7 FAAE FFFFE7C3C3E7FFFF 5509 DB OFFH,OFFH,OE7H,OC3H,OC3H,OE7H,OFFH,OFFH ; D_08 FAS6 003C664242:663COO 5510 DB OOOH,D3CH.066H.042H,042:H,066H.03CH,oODH ; o_09 FABE FFC399BOBD99C1FF 5511 DB OFFH,OC3H,099H.OBDH.DBOH,099H,OC3H.OFFH I 0_0'" FAC6 OF07DF7DCCCCCC78 5512 DB OOFH,007H,OOFH.07DH,OCCH.OCCH,OCCH.1l78H 10_DB FACE 3C6666663C187E16 5513 DB 03CH,066H,066H,066H,03CH.OlSH,07EH.OIBH j D_OC FADb 3F333F303070FOEO 5514 DB 03FH,033H.03FH,030H,030H.070H.OFOH,OEOH ; D_OD fADE 7F637F636367E6CO 5515 DB 07fH,063H,07FH.063H,063H.067H.OE6H,OCOH j D_OE FAE6 99SA,3CE7E73C5A99 5516 DB 099H,05AH.03CH.OE7H,OE7H.03CH,05AH.099H ; D_Of fAEE 80EOF8FEF8EOeOOO 5517 DB 060H,OEOH,OF8H.OFEH,OFBH,OEOH,080H,OOOH ; o_10 FAF6 020E3EFE3EOE0200 5518 DB 002H,OOEH.03EH.OFEH.03EH,OOEH,0021-1.000H ; 0_11 FAFE 183C7E18187E1C18 5519 DB 018H,03CH.07EH.OIBH,Dl8H,07EH,03CH.016H J. o_12 FB06 6666666666006600 5520 DB 066H,066H,066H.066H,066H.ODOH,066H.DOOH ; 0_13 FBDE 7FDBDB7BIBIBIBOO 5521 DB 07FH,00BH.ODBH.07BH.OIBH,OlBH,OlBH,OOOH J 0_14 FB16 lE63386C6C36CC78 5522 DB 03EH,063H,038H.06CH,06CH,036H.OCCH,078H ; o_15 FBIE OD0000007E7E7EOO 5523 DB OOOH,OOOH.OOOH.OOOH,07EH.07EH,07EH.OOOH J 0_16 FB26 IB3C7E187E3C18FF 5524 DB 016H,03CH,07EH.Ol8H,07EH,03CH,DIBH.OFFH l 0_17 FB2E 183C7El81B181aoo 552:5 DB 018H,03CH.07EH.018H,018H.OIBH,018H.OOOH ; D_16 F836 181818187E3C1800 552:6 DB 018H,OI8H,OIBH.016H,07EH,03CH.OIBH.OOOH J 0_19 FB3E 00160CFEOC160000 5527 DB 000H,018H.OOCH,OFEH,OOCH.018H.000H.OOOH ; 0_lA. FB46 003060FE60300000 5528 DB OOOH.030H.06DH.OFEH.06DH.030H,OOOH,OODH ; 0_18 F84E QOOOCOCOCOFEOOOO 5529 DB OOOH,OOOH,OCOH,OCOH,OCOH.OFEH,OOOH.OOOH J O_IC F856 002466FF66240000 5530 DB 000H.024H,066H.OFFH.066H,024H.OOOH,000H ; D_ID Fa5E 00183C7£FFFFOOOO 5531 DB 000H.016H.03CH,07EH,OFFH.OFFH.OOOH,OOOH ; O_IE FB66 00FFFF7E3CI80DDD 5532 DB OOOH.OFFH,OFFH.07EH,OJClhOl6H.OOOH.OOOH 10_IF FB6E OOOOOOOOOOODOOOO 5533 DB OOOH,OOOH.OOOH.OOOH.OOOH,OOOH.OOOH.OOOH ; SP D30 F876 3078783030003000 5534 DB 030H.078H,076H.030H,030H.OOOH,030H,OOOH ; ! 0_2:1 FB7E 6C6C6COOOOOOOOOO 5535 DB 06CH.06CH,06CH,000H.OOOH,OOOH,OOOH.OOOH ~ .. D_ZZ F866 6C6CFE6CFE6C6COO 5536 DB 06CH.06CH.OFEH,06CH.OFEH.06CH,06CH.OOOH j • o_23 FBBE 307CC0780CF83000 5537 DB 030H.07CH.OCOH.078H.DOCH,OF6H,030H.000H I $ 0_24 FB96 00C6CC183066C600 5538 DB OOOH.OC6H.OCCH,018H.030H,066H,OC6H,OOOH , PER CENT D_25 F89E 386C38760CCC7600 5539 DB Q38H.06CH,038H.076H.ODCH.OCCH.076H,OOOH ; & o_26 FBA6 6060COOOOOOOOOOO 5540 DB 060H.060H.OCOH.000H.000H,OOOH.OOOH.OOOH • 0_2:7 FBAE 1830606060301800 5541 DB 016H,030H,060H.060H,060H,030H.018fI.000H ; ( 0_2B FBB6 6030181B16306000 5542: DB 060H.030H.OlathOI8H.016H,030H,060H.OOOH ) D_2:9 System BIOS A-77 LOC OBJ LINE SOURCE FBBE 00663CFF3C66oaoo 5543 DB 000H.06bH,03CH.OFFH.Q3CH.066H.00QH,OOOH ; If 0_2A FBC6 003030FC30300000 5544 DB 000H,030H.030H.OFCH.030H,030H.000H.0,Q~H I + 0_2B feCE 0000000000303060 5545 DB 000H.000H.000H,OOOH,OOOH.030H.030H.ObOH I • D_2C FBD6 OOOOOOFCOOOOOOOO 5546 DB OOOH.OOOH.OOOH,OFCH.OOOH.OOOH.OOOH,OOOH I - o_20 FBDE 0000000000303000 5547 DB 000H.000H,000H.000H.000H.030H.030H,000H ; • D_2E FBE6 060C183060C08000 5548 DB 006H,OOCH,OI8H.030H,060H,OCOH,080H.000H I I D_2F FeEE 7CC6CEDEF6E67COO 5549 DB 07CH,OC6H.OCEH.ODEH,OF6H.OE6H,07tH.OOOH I 0 D_30 FBFo 307030303030FCOD 5550 DB 030H.070H.030H.030H.030H.030H.OFCH.000H I 1 0_31 FeFE 78CCOC3860CCFCOO 5551 De 078H,OCCH,00CH.038H,060H.OCCH.OFCH.000H ; 2 o_32 FeOb 78CCOC380CCC7800 5552 De 078H.OCCH,OOCH.038H.OOCH.OCCH.078H.000H ; 3 o_33 FeOE lC3C6CCCFEOClEOO 5553 De 01CH,03CH,06CH.OCCH,OFEH,OOCH,OIEH,000H ; 4 o_34 Fel6 FCCOFBOCOCCC7800 5.5.54 DB OFCH.OCOH.OF8H,OOCH.00CH.OCCH.078I-hOOOH ; 5 o_35 FelE 3860COF8CCCC7600 5555 De 038H,060H,OCOH,OF8H.OCCH,OCCH.078H.000H ; 6 o_36 FeZ6 FCCCOC1830303000 5556 DB OFCH,OCCH.OoCH.018H.030H,030H,030H,OOOH ; 7 0_37 FC2E 78CCCC78CCCC7aOO 5557 DB 078H.OCCH.OCCH.076H,OCCH,OCCH.076H,OOOH ; 8 o_38 Fe36 76CCCC7COC187000 5558 DB 078H.OCCH.OCCH.07CH.00CH,OI8H.070H.OOOH ; 9 o_39 Fe3E 0030300000303000 5559 DB 000H.030ii,030H,OOOH.000H.030H,030H.OOOH I : D_3A. FC46 0030300000303060 5560 DB 000H.030H.030H.000H,OOOH.030H,030H,060H ; ; 0_38 FC4E 183060C060301800 5561 DB 018H,030H,060H.OCOH.060H.030H,OI6H.000H • < D_X FC56 QOOOFCOQOOFCOOOO 5562 DB OOOH,OOOH.OFCH,OOOH,OOOH.OFCH.OOOH.OOOH ; = o_30 FeSE 6030180C18306000 5563 DB 060H.030H,OI6H,ooCH,OI8H,030H,060H,000H ; > 0_3E FC6b 78CCOC1630003000 5564 DB 078H.OCCH,OOCH,OI8H.030H,OOOH,030H.000H ; ? 0_3F FC6E 7CC6DEOEDEC07800 5565 DB 07CH.OC6H,OOEH,OOEH,OOEH,OCOH,078H,OOOH i ~ o_40 Fe76 307&CCCCFCCCCCOO 5566 DB 030H,078H,OCCH.OCCH,OFCH,OCCH.OCCH.000H ; A D_41 Fe7E Feb66b lC6666FCOO 5567 DB OFCH,066H.066H,07CH.066H,066H.OFCH.000H I B D_42: FeS6 3C66COCO(;0663COO 5566 DB 03CH.066H.OCOH.OCOH.OCOH,066H.03CH,000H ; C 0_43- FeSE F86C6666666CF800 5569 DB OF8H,06CH,066H.066H.066H,06CH,OF8H,OOOH ; 00_44 FC96 FE62687B6862FEOO 5570 DB OFEH.062H.068H,078H,068H,062H.OFEH.000H I E D_45 FC9E FE6268786860Fooa 5571 DB OFEH.06~H.068H.078H.068H.060H,OFOH,OOOH ; F o_46 FCA.6 3C66COCOCE663EOO 5572 DB 03CH,066H,OCOH.OCOH,OCEH,066H,03EH,OOOH ; G 0_47 FCAE eeeeeeFccceceeoo 5573 DB OCCH.OCCH,OCCH.OFCH,OCCH.OCCH.OCCH,OOOH ; H D_48 FeSE> 7830303030307800 5574 DB 078H.030H,030H.030H.030H.030H.078H,OOOH ; 10_49 FeBe lEococoeeece7800 5575 DB OlEH.00CH,OOCH,OOCH.OCCH.OCCH.078H,OOOH ; J 0_4A. Fee6 E6666C786C66E600 5576 DB OE6H.066H.06eH,078H.06CH,066H,oE6H.000H i K 0_4B FetE F06060606266FEOO 5577 DB OFOH.060H.060H.060H,062H,066H,OFEH.000H ; l D_4C FCD6 C6EEFEFED6C6C600 5576 De 0(6H,OEEH.OFEH.OFEH,006H,OC6H.OC6H,OOOH ; M o_40 FceE C6E6F6DECEC6C600 5579 De OC6H,OE6H.OF6H.OOEH.OCEH.OC6H.OC6H,OOOH ; N 0_4E FCE6 386CC6C6C66C3800 5580 DB 038H.06CH,OC6H,OC6H,OC6H,06CH.038H,OOOH ; 0 D_4F feEE FC66667C6060FOOO 5581 DB OFCH.066H,066H.07CH,060H,060H.OFOH,OOOH ; PO_50 FCF6 78CCCCCCOC781COO 5582 DB 078H.OCCH,OCCH.OCCH.OOCH.078H.OICH,000H ; Q o_51 FCFE FC66667C6C66E600 5583 DB OFCH.066H,066H.07CH,06CH.066H.OE6H,OOOH i R o_52 F006 78CCE0701CCC7800 5584 DB 078H,OCCH.OEOH.070H,OlCH,OCCH.078H,OOOH ; 5 0_53 FOOE FCB4303030307800 5585 DB OFCH,OB4H.030H.030H.030H.030H.078H.OOOH ; TO_54 FOl6 ccCCCCCtCCCCFCOO 5586 DB OCCH,OCCH,OCCH.oeCH.OCCH.OCCH.OFCH,OOOH I u 0_55 FOIE cccceCCCCC783000 5587 DB OCCH.OCCH,OCCH,OCCH,OCCH.078H.030H,OOOH ; V o_56 F026 C6C6C606FEEEC600 5588 DB OC6H,OC6H.OC6H,006H.OFEH,OEEH,OC6H,OOOH ; W 0_57 F02E C6C66C38386CC600 5589 DB OC6H,OC6H.06CH.038H.03SH,ObCH,OC6H,OOOH • X o_58 FOlt! CCCCCC7830307800 5590 DB OCCH.OCCH,OCCH.078H,030H,030H,078H,OOOH • YO_59 F03E FEC68Cla3266FEOO 5591 DB OFEH.OC6H,08CH,OlBH,032H,066H,OFEH.000H I Z 0_5A F046 7860606060607800 5592 DB 078H,060H.060H,060H.060H,060H.078H.OOOH J [ o_58 F04E C060301aOC060200 5593 DB OCOH,060H,030H.OI8H.a.oCH,006H,002H.000H I BACKSLASH D_5C F056 7818181818187800 5594 DB 078H,Ol8H.018H.OIBH,018H,OIBH.078H.000H J I 0_50 F05E 10386CC600000000 5595 DB 010H.038H,06CH.OC6H,OOOH.000H.000H,OOOH I CIRCUHFLEX 0_5E F066 OOOOOOOQOOOOOOFF 5596 DB OOOH.OOOH,OOOH,OOOH,OOOH.OOOH,OOOH.OFFH I _ 0_5F F06E 3030180000000000 5597 DB 030H. 030H ,018H. OOOH, OOOH, OOOH. OOOH, OOOH ; • o_60 F076 0000780C7(CC7600 5598 DB 000H,000H.078H,OOCH.07CH,OCCH.076H,OOOH ; LOWER CASE A 0_61 F07E £060607C66660COO 5599 DB OEOH,060H,060H.07CH.066H.066H.00CH,OOOH ; L.C. B 0_62 F086 000078CCCOCC7800 5600 DB OOOH.OOOH,078H.OCCH.OCOH.OCCH,078H,OOOH I L.C. C o_63 FoaE lCOCOC7CCCCC7600 5601 DB 01CH,00CH,OOCH,07CH.OCCH,OCCH.076H.OOOH J loC. 0 0_64 F096 00007BCCFCC07800 5602 DB 000H.OOOH,078H.OCCH.OFCH,OCOH.078H,OOOH ; loC. E 0_65 F09E 386C60F06060FOOO 5603 DB 038H.06CH,060H,OFOH.060H,060H,OFOH.000H ; L.C. F 0_66 FDA6 000076CCCC7COCF8 5604 DB OOOH,OOOH.076H.oeCH,OCCH,07CH,00CH.OF8H ; loC. G 0_67 FOAE E0606C766666E600 5605 DB OEOH,060H.06CH.076H,066H,066H.OE6H.000H I L.C. H 0_68 FOB6 3000703030307800 5606 DB 030H,OOOH.070H.030H.010H.030H,078H,OOOH ; L.C. I 0_69 FOBE OCOOOCOCOCCCCC78 5607 DB OOCH.000H.00CH.OOCH,00CH.OCCH,OCCH,078H ; L.C. J 0_6A. FOC6 E060666(786CE600 5608 DB OEOH.060H,066H.06CH.078H,06CH.OE6H,OOOH ; L.C. K 0_66 FOCE 7030301030307800 5609 DB 070H.030H.030H.030H.030H,030H.078H,000H ; loC. L 0_6e FOD6 OOOOCeFEFE06C600 5610 DO OOOH.OOOH.OCCH.OFEH,OFEH.006H,OC6H.OOOH i loC. H o_60 faDE OOOOF8CCCCCCCCOO 5611 DB OOOH.OOOH,OF8H.OCCH.OCCH.OCCH,OCCH,OOOH ; L.C. N 0_6E FOE6 000078CCCCCC7600 5612 DB 000H,OOOH,078H,OCCH.OCCH.OCCH.078H,OOOH I L.C. OO_6F FDEE 00000C66667C60FO 5613 DB 000H,OOOH.ODCH.066H,066H.07CH.060H.OFOH L.C. P o_70 FDF6 000076CCCC7COCIE 5614 DB OOOH,OOOH.076H.OCCH,OCCH.07CH,OOCH,01EH I L.C. Q 0_71 FOFE OOOOOC766660FOOO 5615 DB OOOH,OOOH,ODCH.076H,066H,060H.OFOH,OOOH I L.C. iii o_72 FE06 00007CC0780CF800 5616 DB 000H,OOOH.07CH,OCOH,078H.00CH.OF6H.OOOH I L.C. S D_73 HOE 10307C3030341800 5617 DB 010lt,030H.07CH.030H.030H,034H,018H,OOOH L.C. T o_74 FE16 0000CCCCCCCC7600 5618 DB OOOH.000H.OCCH,OCCH.OCCH,OCCH,076H.000H I L.e. U o_75 FEIE 0000CCCCCC783000 5619 DB OOOH,OOOH.OCCH,OCCH,OCCH.078H.010H,OOOH I L.e. Y o_76 A-78 System BIOS lOC OBJ LINE SOURCE F£26 DOODC6D6FEFE6CQO 5620 08 DDDH,OOOH.DC6H.OD6H.OFEH,OFEH,06CH,DQOH I l.C ... D_77 FE2:E 0000C66C386CC600 5621 08 OOOH,OOOH.OC6H,06CH,038H.06CH.OC6H.OOOH ; L.C. X D_78 FEl6 OOOOCCCCCC7COCf& 5622 08 OOOH.OODH.DCCH,DCCH.OCCH,07CH,DOCH,DFaH I L.C. Y D_79 FElf 0000FC'983064FCOO 5623 08 ODOH.OaOH,OFCH,D96H,030H.064H.OFCH.OOOH I L.c. Z D_7A FE46 lC3030£030301COO 5624 DB DICH.030H.030H.OEDH.030H.030H,01CH,OOOH I ( 0_78 FE4E 1818180018181800 5625 DB 01athOlaH,0l8ti,OOOH,OI8H,018H.0l8lI,OOOH I I D_7C FE56 E030301C3030£000 .. 2. DB OfOH.030H.030H,OltH.030H.030H.OEOH,OOOH I ) D_7D FESE 760COOOOOOOOOOOO . . 27 DB 076H.ODCH.OOOH.OOOH.OOOH.OODH.OOOH,OOOH I TILDE 0_7E fE66 DO l0386CC6C6FEOO ..2. DB OOOH,OlOH,038H,06CH,DC6H,OC6H.OFEH.OOOH I DELTA D_7F 562. 5630 5--- INT 1. ---~---------------------~--------~-~-------- 5631 ; TIME.OF_DAY 5632 5 THIS ROUTINE ALLOWS THE CLOCK TO 8E SET /READ 5633 I 5634 ; INPUT 5635 (AH) =0 READ THE CURRENT CLOCK SETTING 5636 RETURNS CX =HIGH PORTION OF COUNT 5637 DX = LOW PORTION Of COUNT 5638 AL = 0 IF TIHER HAS NOT PASSED 5639 24 HOURS SINCE lAST READ 5640 <>0 IF ON ANOTHER DAY 5641 (A") = 1 SET THE CURRENT CLOCK 5642 CX = HIGH PORTION OF COUNT 5643 OX = LOW PORTION OF COlIfT 5644 ; NOTE: COUNTS OCCUR AT TH£ RATE OF 5645 1193180/65536 COUNTS/sEC 5646 (OR ABO\JT 18.2 PER SECOND -- SEE EQU;'TES BELOW) 5647 5- -- -.- -- -------------------------- -------- - -- -------- --- 5648 ASSlR'IE CS:CODE.DS:DATA FE6£ 5649 00. OFE6EH FE6£ 5650 TIME_OF _DAY PRDC FAR FE6E F8 5651 STI ; INTERRUPTS BACK ON FE6F IE 5652 PUSH OS j SAVE SEGHENT FE70 E8E6F8 5653 CALL DDS FE73 OAE4 5654 OR AH,AH ; AH=O FE7S 7407 5655 JZ TZ j RE;'D_TIHE FE77 FEte 5656 DEC AH ; AH=1 FE79 7416 5657 JZ T' ; SET.TIME FE1B 5658 TI: J TOD_RETURN FE1B F8 5659 STI I INTERRUPTS BACK ON FE7C IF 5660 pop DS j RECOVER SEGHENT FE7D CF 5661 IRET 1 RElUlN TO CALLER FE7f 5662 T2: ; READ.TIHE FE7E F;' 5663 ell I NO TIHER INTERRUPTS IoItILE READING FE7F ;'07000 5664 I1D'I Al,TIMER_OFL FE82 C606700000 5665 ItDV TIHER_OFL.O I GET OVERFLOW. At«) RESET TlIE FlAS FE87 880E6EOO 5666 MOV ex. TIMER_HIGH fE8B 88166COO 5667 ItDV OX, TIMER. LOW FE8F EBEA 5668 JHP TI ; TDD_RETLJiN FE91 5669 T3: J SET_TIME FE91 FA 5670 eLI 5 NO INTERRUPTS MULE WRITING FE92 89166COO 5671 HOY TIMER_LOW.DX FE96 890£6EOO 5672 HOY TIMER_HIGH .ex I SET THE TIHE FE9;' C6067000DO 5673 HOY TIMER_OFL.O I RESET OVERFLOW FE9F EBDA 56 74 JHP TI I TOD_RETURN 5675 TIME_OF_DAY ENJP 5676 5677 ; ----- - ----- ---- --- ------------------------ -------------- 5678 I THIS ROUTINE HAt-I)LES THE TIMER INTERRUPT FROI1 5679 CHANNEL 0 OF THE 8253 TIMER. INPUT FREQUENCY 5680 IS 1.19318 MHZ AND THE DIVISOR IS 65536, RESULTING 5681 I IN APPROX. 18.2 INTERRUPTS EVERY SECOND. 5682 I 5683 ; THE INTERRUPT H~LER HAINTAINS A COUNT OF INTERRUPTS : 5684 J SINCE POWER ON TIME. NiICH HAY 8E USED TO ESTABLISH 5685 1 TIHE OF DAY. 5686 ; THE INTERRUPT HANDLER ALSO DECREMENTS THE HDTOR 5687 ; CONTROL CCUIT OF TItE DISKETTE, AND WHEN IT EXPIRES, 5688 I WIll TURN OFF THE DISKETTE HOTOR, AN) RESET THE 5689 ; HOTOR RUNNING FLAGS. 5690 ; THE INTERRUPT HANDLER WILL ALSO INVOKE A USER ROUTINE: 5691 I THROUGH INTERRUPT 1CH AT EVERY TIME TICK. THE USER : 5692 J tlJST CODE A ROUTINE ;.tII PLACE THE CORRECT ADDRESS IN : 5693 I THE VECTOR TABLE. 5694 1-------------------------------------------------------- FE" 5695 OFEASH FE. . 5696 PRDC FAA System BIOS A-79 LOC OBJ LINE SOURCE FEAS FB 5697 STI I INTERRUPTS BACK ON FEA& IE 5698 PUSH OS FEA7 50 5699 PUSH AX FEA6 52. 5700 PUSH OX I SAVE MACHINE STATE CALL FEA9 EBAOFB FEAt FF066COO 5701 5702 INC DDS TIMER_LOW , INCREMENT TIME JNZ T4 J TEST_DAY FEBO 7504 FEBl FF066EOD 5703 5704 INC TIMER_HIGH , INCREMENT HIGH WORD OF TIME FEB6 5705 14: , TEST_DAY FEBb 833E6EOO18 5706 CMP TIMER_HIGH. DI8H ) TEST FOR COUNT EQUALING !4 HOURS FEBS 7515 5707 JNZ T5 i DISKETTE_CTL FEBD 813E6C008000 5708 CMP TIMER_LOW.OaOH FEe3 7500 5709 JNZ T5 I DISKETTE_eTl 5710 5711 ; ------ TItiER HAS GONE 24 HOURS 5712 FECS 2.BCO 5713 SUB AX ,AX FEt7 A36EOO 5114 MDV TIMER_HIGH. AX FEe;. ,6.36COO 5715 "OV TIMER_LOIol,AX fECD C606700001 5716 MOV TIHER_OFL,I 5717 5718 i ------ TEST FOR DISKETTE TIME OUT 5719 FEDl 5720 T5: I DISKETTE_eTL FEDZ FEOE4000 5121 DEC HOTOR_COUNT FE06 750B 5722 JNZ T. I RETURN IF COUNT HOT OUT FEOS S02~3FOOFO 5723 AND MOTOR_STATUS.OFOH 1 TURN OFF HOTOR RUNNING SITS FEDD BoDe 5724 AL.OtH FEDF BAF203 5725 "OV HOV DX.03F2H , FDC eTl PORT FEE2 EE 572~ OUT OX.Al 1 TURN OFF THE HOTOR FEE3 5727 16: 1 TIMER_RET: FEE3 CDIC 572S INT 'tH TRANSFER CONTROL TO A USER ROUTINE FEES BOZO 5729 HOV Al,EOI FEE7 E620 5730 OUT 020H.AL END OF INTERRUPT TO 8259 FEE9 SA 5731 POP OX FEEA 58 5732 POP AX FEEB IF 5733 POP OS j RESET MACHINE STUE FEEC CF 5734 IRET ; RETURN FROH INTERRUPT 5735 TIMER_lIoIT ENDP 5736 5737 1------- -- --------------- ------------------------ 5738 ; THESE ARE THE VECTORS WHICH ARE MOVED INTO 5739 I THE 8086 INTERRUPT AREA. DURING POWER ON. 5740 i ONLY THE OFFSETS ARE DISPLAYED HERE. CODE 5741 ; SEGMENT WILL BE ADDED FOR ALL OF THEM. EXCEPT: 5742 ; WHERE NOTED. 5743 1------------------------ ------ ------------------ 5744 ASSUME CS:CODE FEF3 5745 ORG OfEF3H FEF3 5746 VECTOR_TAB LE LABEL WORD I VECTOR T.6.BLE FOR HOVE TO INTERRUPTS FEF3 ASFE 5747 OW OFFSET TIHER_INT , INTERRUPT & FEF5 87E9 5748 OW OFFSET KB_INT INTERRUPT 9 FEF7 23FF 5749 OW OFFSET 011 I INTERRUPT A FEF9 23FF 5750 OW OFFSET 011 1 INTERRUPT B FEFB 23FF 5751 ow OFFSET 011 INTERRUPT C FEFO 23FF 5752 ow OFFSET 011 INTERRUPT 0 FEFF 57EF 5753 ow OFFSET DISK_INT INTERRUPT E F,FOI 23FF 5754 ow OFFSET 011 I INTERRUPT F FF03 65FO 5755 ow OFFSET VIDEO_IO INTERRUPT 10H FFOS 40F8 5756 ow OFFSET EQUIPMENT INTERRUPT 11H FF07 4IF8 5757 OW OFFSET HEHDRY_SIZE_OET • INTER!;!UPT 12H FFO~ 59EC 5758 ow OffSET DISKETTE_IO INTERRUPT 13H FFOB 39E7 5759 ow OFFSET RS232_ID 1 INTERRUPT 14H FFOO 59F8 5760 ow CASSETTE_IO ; INTERRUPT 15H( FORMER CASSETTE 10 I FFOF !!EE6 5761 OW OffSET KEYBOARD_IO • INTERRUPT 16H FFll 02EF 5762 ow OFFSET PRINTER_IO INTERRUPT 17H 5763 Ff13 0000 5764 ow OOOOOH ; INTERRUPT 18H 5765 ow OF600H , MUST BE INSERTED INTO TABLE LATER 5766 Ff15 F2E6 5767 ow OFFSET BOOT_STRAP INTERRUPT 19H FFI7 6EFE 5766 ow TIHE_OF _DAY I INTERRUPT lAH -- TINE OF 0Al' FF19 4BFF 57~9 OW DUMMY_RETURN INTERRUPT IBH -- KEYBO.6.RD BREAK ADDR FFIB 4BFF 5770 0" DUMMY_RETURN , INTERRUPT IC -- TIHER BREAK ADDR rFlD A4FO 5771 ow VIDEO_PARHS I INTERRUPT 10 -- VIDEO PARAMETERS FFIF C7Ef 5772: OW OFFSET DISK_BASE , INTERRUPT IE -- DISK PARHS FF21 0000 5773 OW 0 I INTERRUPT IF -- POINTER TO VIDEO EXT A-SO System BIOS LOC OBJ LINE SOURCE 5774 5775 ; ~ -- -- - -- --- ---- -- -- --- - - -- -- ------- ------- --- - - -- ------- 5776 ; TEMPORARY INTERRUPT SERVICE ROUTINE 5777 1. nus ROUTINE IS AlSO LEFT IN PLACE AFTER THE : 5778 POWER ON DIAGNOSTICS TO SERVICE UNUSED 5779 INTERRUPT VECTORS. LOCATION 'INTRJLAG' WILL 5760 CONTAIN EITHER: 1. LEVEL Of HARDWARE INT. THAT 5761 CAUSED CODE TO BE EXEC. 5782 2. 'FF' FOR NOH-HARDWARE INTERUPTS THAT WAS 5783 EXECUTED ACCIDENTLY. 5764 FF23 5785 011 PROC NEAR 5786 ASS\J'1E DS:DATA FFZ3 IE 5787 PUSH OS FF24 52 5768 PUSH OX ff25 50 5789 PUSH AX ; SAVE REG AX CONTENTS FF26 EB30FB 5790 CALL DDS FF2.9 BOOB 5791 MDV Al.OBH I READ IH-SERVICE REG FF2B E620 5792 OUT INTAOO,Al ; (FIND OUT WHAT LEVEL BEING FF2D 90 5793 NOP I SERVICED) FF2E £420 5794 IN AL.INTAOO i GET LEVEL fF30 BAED 5795 MOV AH.Al ; SAVE IT FF32 OAe4 5796 DR AL.AH ; DO? (NO HARDWARE ISR ACTIVE) FF34 7504 5797 JNZ HW_INT FF36 64FF 5798 MDV AH,OFFH FF38 EBOA 5799 JMP SHORT SET_INTR_FlJ.G I SET fLAG TO ff IF NON-HOWARE FF3A 5600 HW_INT: FFlA f421 5801 IN Al,INTAOl I GET MASK VALUE FFX OAC4 5802 OR Al.AH ; HASK OFF lVl BEING SERVICED FF3E f621 5803 OUT INTAOl.,u FF40 80020 5804 MOV Al,Eor FF42 E620 5805 OUT INTAOQ,Al FF44 5806 SET_INTRJlAG: FF44 88266800 5607 MOV INTR_FLAG.AH • SET FLAG FF48 58 5808 pop AX ; RESTORE REG AX CONTENTS FF49 SA 5809 POP OX FF4A IF 5810 POP OS FF4S 5811 DUI1t1Y_RETURN: ; HEED IRET FOR VECTOR TABLE FF4S CF 5812 IRET 5813 011 ENDP 5814 5815 ; ------------------------------------------------ 5816 ; DUHMY RETURN FOR ADDRESS COt1PATlBILITY 5817 i ------------------------------------------------ FFS3 5818 O'G OFFS3H FFS3 Cf 5819 IRET 5820 5821 ;-- IHT 5 --------------------------------------------------------------- 5822: THIS LOGIC WIll BE INVOKED BY INTERRUPT OSH TO PRINT THE 5823 SCREEN. THE CURSOR POSITION AT THE TIME THIS ROUTINE IS INVOKED: 5824 WILL BE SAVED AND RESTORED UPON COMPLETION. ntE ROUTINE IS 5825 INTENDED TO RUN WITH INTERRUPTS ENABLED. IF A SUBSEQUENT 5826 • PRINT SCREEN' KEY IS DEPRESSED DURING THE TIME THIS ROUTINE 582:7 IS PRINTING IT WILL BE IGNORED. S8ze ADDRESS 50:0 CONTAINS ntE STAnIS OF THE PRINT SCREEN: 5829 5830 50:0 =0 EITHER PRINT SCREEN HAS HOT BEEN CALLED 5831 OR UPON RETURN FROM A CALL THIS INDICATES 5832 A SUCCESSFUL OPERATION. 5633 =1 PRINT SCREEN IS IN PROGRESS 5834 =255 ERROR ENCOUNTERED DtRING PRINTING 5835 1---- --- - - - -- - --- -- -- - - - - - --- - -- - ------ ------------------- -- ____ --_ - ____ _ 5836 ASSUME CS:CODE.DS:XXDATA FF54 5837 ORG OFF54H FF54 5838 PRINT_SCREEN PROC FAR FF54 FB 5839 ST! I I1UST Rlki WITH INTERRUPTS ENABLED FF550 IE 5840 PUSH OS I t1lJST USE 50: 0 FOR DATIl. AREA. STORAGE FF56 50 5841 PUSH AX FFS7 53 5842 PUSH OX FF58 51 5843 PUSH ex I WIll USE THIS LATER FOR CUlSOR UtlITS FF59 52 5844 PUSH OX ; WI Ll HOLD CUi!RENT Ct.RSOR POSITION FF5A 885000 5845 HOV AX,XXDATA. • HEX 50 FF5D 8ED8 sa46 MOV OS,AX FF5F 803EOOOOOI 5647 CMP STATUS_BYTE,l I SEE If PRINT ALREADY IN PROGRESS FF64 745F 5848 JZ EXIT I JUl'1P IF PRINT ALREADY IN PROGRESS FF66 C606000001 5849 MOV STATUS_BYTE,l I It.oICATE PRINT NOW IN PROGRESS FF68 B40F 5850 HOV AH.15 ; WILL REQUEST THE CURRENT SCREEN HOOE System BIOS A-Sl LOC OSJ LINE SOURCE fFt.O COlO 5651 INT 10H lAll::HODE 5852 [AH ):::NUt1BER COLUMNS/LINE 5853 [BH J=VISUAl PAGE 5854 j ---------------------------------------------------------------- 585S AT THIS POINT WE KNOW THE COllJl1HS/lINE ARE IN 5656 (Axl AND THE PAGE IF APPLICABLE IS IN ISH). THE STACK 5857 HAS OS,A)(,BX,CX,DX PUSHED. (AJ HAS VIDEO HOOE 5858 1---------------------------------------------------------------- FF6F 8Ace 5859 HOV CL,AH I WILL MAKE USE OF I CX) REGISTER TO FF71 8519 5860 MOV CH,25 ; CONTROL ROW & COLUNNS FF73 E85500 5861 CALL CRLF i CARRIAGE RETURN LINE FEED ROUTINE FF76 51 5862 PUSH CX I SAVE SCREEN BOUNDS fF77 6403 5863 MOV AH,3 I WI\L NOW READ THE CURSOR. FF79 COlO 5864 INT 10H I AND PRESERVE ntE POSITION FF75 59 5865 POP CX ; RECALL SCREEN BOUNDS FF7C 52 5866 PUSH OX I RECALL [BH );;VISUAL PAGE FF7D 3302 5867 XOR OX.OX ; WILL SET CURSOR POSITION TO [0.01 5868 ; ------- --------------------- ----------------------------- ------- 5869 THE LOOP FROM PRllO TO THE INSTRUCTION PRIOR TO PRI20 5670 IS THE LOOP TO READ EACH CURSOR POSITION FROM THE 5871 SCREEN AND PRINT. 5872 ,---------------------------------------------------------------- FF7F 5873 PRllO: fF7F 8402 5874 MOV AH.2: , TO INDICATE CURSOR SET REQUEST fF81 COlO 5875 INT IOH 1 NEW CURSOR POSITION ESTABLISHED H83 6408 5876 MOV AH,8 I TO INDICATE READ CHARACTER FFBS COlO 5877 INT 10H I CHARACTER NOW IN [AL) FF87 OACO 5878 OR AL.AL ; SEE If VALID CHAR FF89 7502. san JHZ PRIlS I JUMP IF VALID CHAR fFBB B020 seeo MOV Al. ' ; MAKE A BLANK FFeD 5881 PRIlS: FfeD 52 5882 PUSH OX ; SAVE CURSOR POSITIOH freE 3302 5883 XOR DX,DX ; INDICATE PRINTER 1 Ff90 32E4 FFn COll ff94 5A ..... 5884 5.... XOR INT pop AH.AH 17H DX ; TO INDICATE PRINT CHAR IN [AU ; PRINT THE CHARACTER ; RECALL CURSOR POSITION FF95 F6C425 5887 TEST AH. 25H ; TEST fOR PRINTER ERROR FF98 7521 5886 JNZ ERRlO JUMP IF ERROR DETECTED FF9A FEel 5889 INC DL ; ADVANCE TO NEXT COLlJt1N FF9C 3ACA 5890 CNP n.OL I SEE IF AT ENO OF LINE FF9E 75DF 5891 JNZ PRIlO ; IF NOT PROCEED HAD 3202 5892 XOR OL.DL ; BACK TO COLUMN 0 FFA2 8AE2: 5893 MOV AH,DL {AH1;;0 FFA4 52 5894 PUSH ox i SAVE NEW CooSOR POSITION FFAS E8noo 5895 CA.LL CRLF ; LINE FEED CARRIAGE RETURN FFAS 5A 5896 POP OX ; RECALL CURSOR POSITION FF"9 FEe6 51397 INC DH ; ADVANCE TO NEXT LINE fFAB 3AEE 51398 CHP CH,OH FINISHED'? FFAO 7500 5899 JNZ PIUlO ; IF NOT CONTINUE FFAF 5900 PRI2.0: FFAF SA 5901 POP DX ; RECALL CURSOR POSITION FFBD 6402 5902 MOV AH,2 ; TO INDICATE CURSOR SET REQUEST FFB2 COlO 5903 INT IDH ; CURSOR POSITION RESTORED FFB4 C606000000 5904 MOV STATUS_SHE.D ; INDICATE FINISHED FFB9 EBOA 5905 JMP SHORT EXIT ; EXIT THE ROUTINE FFBB 5906 ERRlO: FFBB 5A 5907 pop OX I GET CURSOR POSITION FFBC B402. 5908 MOV AH,2 ; TO REQUEST CURSOR SET FFBE COlO 5909 INT IDH ; CooSOR POSITION RESTORED FFCO 5910 ERR20 : FFeD C6060000FF 5911 HOV ; INDICATE ERROR FFCS 5912 EXIT: FfCS 5A 5913 pop ox ; RESTORE ALL THE REGISTERS USED fFCb S9 59Ft POP ex FFC7 56 5915 POP ox FFee 58 5916 POP AX FFC9 IF 5917 POP OS FFCA CF 5918 IRET 5919 PRINT_SCREEN ENDP 592.0 592.1 ;------ CARRIAGE RET1JRN. LINE FEED SUBROUTINE 592.2 fFce 5923 CR LF PROC NEAR FFee 3302 5924 xaR i PRINTER 0 FfeD 32E4 5925 XOR ; WILL NOW SEND INITIAl IF ,CR 592:6 TO PRINTER FFCF BOOA 5927 Mav AL.12Q ,LF A-82 System BIOS LOC OBJ LINE SOURCE FFOI COil 5926 1NT 1'" ; SEND THE LINE FEED FFD3 32:E4 5929 XOR AH,AH ; NOW FOR THE CR FFDS BOOD 5930 MOV AL,15Q ; CR FFD7 COIl 5931 1NT 17" ; SEND THE CARRIAGE RETURN FF09 t3 5932 RET 5933 CRLF ENDP 5934 5935 1--------------------------------------------------------------- 5936 PRINT A SEGMENT VALUE TO LOOK LIKE" 20 BIT ADDRESS 5937 OX truST CONTAIN SEGMENT VALUE TO BE PRINTED 5938 ; - - - -- - --- - - - -- -- -- -- -------- - --- - - -- - - --- -- --- ----- - - - ---.----- FFOA 5939 PRT_SfG PROC NE.... FfOA 6,6,C6 5940 ItOV Al,DH ;GET HSB FFoe E8ACF9 5941 CALL XPC_BYTE FFDF 8AC2 5942 HOV Al,OL jLSB FFEl E8A7F9 5943 CALL XPC_BYTE FFE4 B030 594. HOV AL.· O' I PRINT A. '0 FFE6 E883F9 5945 CAll PRT_HEX FFE9 B020 5946 MOV Al, ' ;SPACE FFEB E8AEF9 5947 CALL PRT_HEX FFEE C3 5948 RET 5949 PRT_SEG ENOP 5950 5951 COOE ENIlS 5952 5953 ; -------------------------------- 5954 POWER ON RESET VECTOR 5955 ; ------------------ - ------------- 5956 VECTOR SEGMENT AT OFFFFH 5957 5958 j----- POWER ON RESET 5959 0000 EASBEOOOFO 5960 JHp RESET 5961 0005 31312:F30382F38 5962 DB '11106/82' ; RELEASE MARKER " 5963 VECTOR ENDS 5964 END System BIOS A-83 LOC OBJ LINE SOURCE $TITlE( FIXED DISK I3JOS FOR IBM DISK CONTROLLER) i-- INT 13 ------------------------------------------------------ FIXED DISK I/O INTERfACE nus INTERFACE PROVIDES ACCESS TO 5 1/4" FIXED DISKS THROUGH THE IBM FIXED DISK CONTROLLER. 9 10 ;---------------------------------------------------------------- 11 12 1--------- ------------------------------------------------------- 13 THE BIOS ROUTINES ARE MEANT TO BE ACCESSED THROUGH 14 SOfTWARE INTERRUPTS ONt Y. ANY ADDRESSES PRESENT IN 15 THE LISTINGS ARE INCLUDED ONLY FOR COMPLETENESS. 16 NOT FOR REFERENCE. APPLICATIONS WHICH REFERENCE 17 ABSOLUTE ADDRESSES WITHIN THE CODE SEGMENT 18 VIOLATE THE STRUCTURE AND DESIGN OF BIOS. 19 ; ---------------------------------------------------------------- 2. 21 INPUT I AH = HEX VALUE 1 22 23 UJO=OO RESET DISK (DL = 80H.81HI /DISKETIE ,. 24 25 27 (AH)=ol READ THE STATUS OF THE LAST DISK OPERATION INTO (ALI HOTE: DL < 80H - DISKETIe DL ;. 80H - DISK (AHI=02 READ THE DESIRED SECTORS INTO MEMORY 26 (AHI=03 WRITE THE DESIRED SECTORS FROM MEMORY 29 IIlHJ=04 VERIFY THE DESIRED SECTORS 3. tA.HJ=DS FORMAT THE DESIRED TRACK 31 (.6.HI=06 FORMAT lliE DESIRED TRACK AND SET BAD SECTOR FLAGS 32 (AHI=07 FORMAT THE DRIVE STARTING AT THE DESIRED TRACK n (AHI=08 RETURN THE CURRENT DRIVE PARAMETERS 34 35 (A.HI=09 INITIALIZE DRIVE PAIR CHARACTERISTICS 3. INHRRUPT 41 POINTS TO DATA BLOCK 37 (.6.H)=OA READ LONG 3. (AHI=OB WRITE LONG 39 NOTE: READ AND WRITE LONG ENCOMPASS 512 + 4 BYTES ECC 4. (AHI=OC SEEK 41 IAH)=OD ALTERNATE DISK RESET (SEE DU 42 (AHI=OE READ SECTOR BUFFER 43 (AH)=OF WRITE SECTOR BUFFER. 44 (RECOMMENDED PRACTICE BEFORE FQRMATIINGI 45 (AHI=10 TEST DRIVE READY 46 IAHI=l1 RECAllBRATE 47 (AH)=12 CONTROLLER RAM DIAGNOSTIC 4. IAH)=n DRIVE DIAGNOSTIC 49 (AH 1=14 CONTROLLER INTERNAL DIAGNOSTIC 5. 51 REGISTERS USED FOR FIXED DISK OPERATIONS 52 (OU DRIVE NUt1BER 160H-87H FOR DISK. VALUE CHECKED) .,. 53 (oH) - HEAD HUMBER (0-7 ALLOWED, NOT VALUE CHECKED) 55 {CHI - CYlINDER NUt1BER (0-1023. NOT VALUE CHECKED)(SEE CLI 5. ICLI - SECTOR NUI1BER tl-17. HOT VALUE CHECKED) 57 58 NOTE: HIGH 2 BITS OF CYLINDER NUMBER ARE PLACED 59 IN THE HIGH 2 BITS OF THE CL REGISTER ••., (ALI (10 BITS TOTAU NUMBER OF SECTORS (MAXIMUM POSSIBLE RANGE 1-80H. .3 6Z •4 (ES:BXI - FOR READ/WRITE LONG 1-79HI (INTERLEAVE VA.LUE FOR FORMAT 1-160) ADDRESS OF BUFFER FOR READS ANO WRITES • 65 (NOT REQUIRED FOR VERIfY 1 •• 67 ; OUTPI.1T 66 AH = STATUS Of CURRENT OPERATION 69 STATUS BITS ARE DEFINED IN THE EQUATES BELOW 70 CY = 0 SUCCESSFUL OPERATION (AH=O ON RETURN) 71 CY = 1 FAILED OPERATION (AH HAS ERROR REASON) 72 n NOTE: ERROR llH INDICATES THAT THE DATA READ HAD A RECOVERABLE 74 ERROR WHICH ..,A5 CORRECTED BY THE ECC ALGORITHM. THE DATA 75 IS PROBABLY GOOD. HOWEVER THE BIOS ROUTINE INDICATES AN 7. ERROR TO ALLOW THE CONTROLLING PROGRAM A CHANCE TO DECIDE 77 FOR ITSELF. THE ERROR HAY NOT RECUR IF THE OATA IS A-84 Fixed Disk BIOS LOC OBJ LINE SOURCE 78 REWRITTEN. (Al) CONTAINS TliE BURST LENGTH. 7' 80 IF DRIVE PARAMETERS WERE REQUESTED, 81 82 OL = I«Jt1BER OF CONSECUTIVE ACKNOWLEDGING DRIYES ATTACHED (0-2) 83 (CONTROLLER CARD ZERO TALLY ONLY) 84 DH :: tu.XlttJt1 USEABLE VALUE FOR HEAD NUMBER 85 eH :: MAXltn.n1 USEABLE VALUE FOR CYlINDER NlR1BER 8. Cl :: HAXII'1\JN USEABLE VALUE FOR SECTOR NllI1BER 87 ANO CYLINDER t-M'IBER HIGH BITS ea_ _0 REGISTERS WILL BE PRESERVED EXCEPT IoIiEN THEY ARE USED TO RETURN INFORMATION. 91 92 NOTE; IF AN E!;!~OR IS REPORTED BY THe DISK CODE. THE APPROPRIATE 93 ACTION IS TO RESET niE DISK. THEN RETRY TliE OPERATION. 94 95 ;------------------------------------------------------------------------ 9. OOFF OOBS 0060 -.9' 97 SENSEJAIL UNOEF _ERR TIME_OUT EOU EOU EOU OFFH OBBH 80H I SENSE OPERATION FAILED I UNDEFINED ERROR OCCURRED ; ATTACHMENT FAILED TO RESPOND 0040 100 BAD_SEEK EOU 40H ; SEEK OPERATION FAILED 0020 101 BAD_CNTLR EOU 20H I CONTROLLER HAS FAILED 0011 102 DATA_CORRECTED EOU 11H I ECC CORRECTED DATA ERROR 0010 103 BAD_ECC EOU lOH I BAD ECC ON DISK REAO oooe 104 BAD_TRACK EOU 08H J BAD TRACK FLAG DETECTED 0009 105 DMA_BOUNDARY EOU 09H ; ATTEMPT TO DHA ACROSS 64K BOUNDARY 0007 10. INITJAIl EOU 07H ; DRIVE PARAMETER ACTIVITY FAILED 0005 107 BAD_RESET EOU 05H I RESET FAILED 0004 108 RECORD_NOTJHD EOU 04H ; REQUESTED SECTOR NOT FOUND 0002 109 BAD_ADDR_MARK EOU 02H I ADDRESS HARK NOT FOUND 0001 110 BAD_CMO EOU OlH I BAD COt1tlAND PASSED TO DIS!( I/O 111 112 ; ---------------------------------------- 113 INTERRUPT AND STATUS AREAS 114 ; ---------------------------------------- 115 11. DUI'nY SEGMENT AT 0 0034 117 DR. 00H*4 ; FIXED DISK IHTERRUPT VECTOR 0034 118 HDISK_INT LABEL DWORD D04C 11_ DR. 13H*4 I DISK INTERRUPT VECTOR 004C 120 ORG_VECTOR LABEL DWORD 0064 121 OR. 19H*4 I BOOTSTRAP INTERRUPT VECTOR 0064 122 BOOT_VEe LABEL DWORD 0078 123 DR. I£H*4 I DISKETTE PARAMETERS 0078 124 DISKETTE_PARH LABEL DWORD 0100 125 OR. 040H*4 ; HEW DISKETIE INTERRUPT VECTOR 0100 12. DISK_VECTOR LABel DWORD 0104 127 DR. 041H*4 ; FIXED DISK PARAMETER VECTOR 0104 128 HF _TBl_VEt LABEl DWORD 7C00 12_ OR. 7COOH ; BOOTSTRAP LOADER VECTOR 7COO 130 BOOT_LOCN LABEl FAR 131 0 ....' ENOS 132 133 DATA SEGMENT AT 40H 0042 134 DR. 4'H 0042 135 CHO_BLOCK LABEl BYTE 0042 (7 ??) 13. HD_ERROR DB 7 DUPI?) ; OVERLAYS DISKETIE STATUS 006C 137 DR. 06CH 006C 1111 138 TIMER_LOW OW ; TIMER LOW WORD 0072 139 OIl. 72H 0072: ???'? 140 RESET]LAG OW ; 1234H IF kEYBOARD RESET lHJERWAY 0074 141 DR. 74H 0074 11 142 DISK_STATUS .8 ; FIXED DISK STATUS BYTE 0075 ?? 143 HF _NUN DB ; COUNT OF FIXED DISK DRIVES 0076 ?? 14. CDHTROL_BYTE DB ; CONTROL BYTE DRIVE OPTIOHS 0077 ?1 145 PORT_OFF DB ; PORT OFFSET 14. DATA ENOS 147 148 COOE SEGMENT 14_ 150 1-------------------------------------------------------- 151 I HARDWARE SPECIFIC VALUES 152 153 CONTROLLER 110 PORT 154 > WHEN READ FROM: Fixed Disk BIOS A-85 LOC OBJ LINE SOURCE 155 HF _PORT+O - READ DATA (FROH CO~OlLER TO CPU) 156 HF _PORT+l - READ CONTROLLER HARDWARE STATUS 157 (CONTROLLER TO CPU I 158 HF]ORT+2: - READ CONFIGURATION SWITCHES 159 HF _PORT+3 - NOT USED 160 > WHEN WRITTEN TO: 161 HF_PORT+O - WRITE DATA (FROM CPU TO CONTROLLER) 162 HF PORT-tl - COHTROLLER RESET 163 HF _PORT+:?: - CENERUE CONTROLLER SElECT PULSE 164 HF_PORT+3 - WRITE PATTERN TO DHA AND INTERRUPT 165 MASK REGISTER 166 167 ; -------------------------------------------------------- 168 0320 16. Hf _PORT EOU 0320H ; DISK PORT 0006 17' RI_BUSY EQU 000010008 ; DISK PORT 1 BUSY BIT 0004- 171 RI_BUS EOU 000001008 COt1t1ANO/OATA BIT 000, 172 RI_IONODE EQU 000000108 NODE BIT 0001 173 Rl_REQ EQU 00000001B REQUEST BIT 17' 0047 175 DMA_READ EQU 010001118 ; CHANNEl 3 (047H) 0046 176 OM_WRITE EOU 010010118 ; CHAHNE l 3 (048H) 0000 0082 177 178 OMA DHA_HIGH EOU EOU • 082H ; DMA ADDRESS ; PORT FOR HIGH 4 BITS OF DNA 17. 0000 18. TST_RDY_tl1D EOU 000000008 I CNTLR READY (OOHI 0001 181 RECAL_CHO EQU 000000018 RECAL (OIHI 0003 18Z SENSE_CHO EOU 000000118 SENSE (03H I 0004 183 fMTDRV_Ct1D EOU 000001008 DRIVE (04H I ODDS 184 CHK_TRK_CtIJ EOU 00000101B T CHK (05HI 0006 185 FMTTRK_CMD EOU 000001108 TRACK (06HI 0007 186 FMTBAD_CMD EOU 000001118 BAD (07H) 0008 187 READ_tND EOU 000010008 READ (08H) DODA 188 WRITE_CHO EQU 000010108 WRITE (DAHl OOOB 18. SEEK_CHO EOU 000010118 SEEK I OBH) DaDe 19. INIT_DRV_CMO EOU 000011008 INlT (OCHI 0000 191 RD_ECt_tND EQU 000011018 BURST (DOH I DOOE 19Z RO_BUFf _CMD EOU 000011108 BUFFR I OEH) DOOF 193 WR_BUFf _ CHO EOU 000011118 BUFfR I OFH I ODED 1.4 RAH_OIAG_CMU EQU 11100000B RAM IEOHI ODE3 195 CHK_DRV_Ct1O EQU 111000118 DRV (E3H) 00E4 1.6 CNTLR_OIAG_CI1D EQU 111001008 CNTLR (E4H I ODES RD_lONG_CMD EOU 111001018 RlOHG ([5HI 00E6 198 WR_lONG_CMD EOU 111001108 WlONG I E6H I I" 0020 zoo INT_CTl_PORT EOU Z.H ; 8259 CONTROL PORT 0020 ZD1 EO! EOU Z.H ; END OF INTERRUPT COMNAND 20Z 0008 ZD3 MAX_FILE EQU 0002 zoo S_NAXJIlE EOU Z.5 206 ASSUME CS:CODE 0000 ZD7 ORG OH 0000 55 Z.8 DB 055H ; GENERIC BIOS HEADER 0001 AA 20' DB OAAH 0002 10 Zl. DB 160 Zll 212 1---------------------------------------------------------------- 213 ; FIXED DISK I/O SETUP Z14 215 ESTABLISH TRANSFER VECTORS FOR THE FIXED DISK 216 PERfORM POWER ON DIAGNOSTICS 217 SHOULD AN ERROR OCCUR A "1701" MESSAGE IS DISPLAYED 218 219 ,---------------------------------------------------------------- Z20 0003 ZZl PROC FAR 0003 EBIE ZZZ JM" SHORT L3 0005 35303030303539 223 DB '5000059 I C lCOPYRIGHT IBM 1982' j COPYRIGHT NOTICE 2.02:84329434FSO 5952.494748542:0 2.04942:402.03139 3832 002:3 ZZ4 l3: ZZ5 ASSlII1E DS:Dutf"'IY 0023 2:BCO ZZ6 SUB AX.AX I ZERO 0025 6ED8 ZZ7 NOV DS,AX A-86 Fixed Disk BIOS LOC OBJ LINE SOURCE ... ". 002:7 FA CLI 0028 A14COO MOV AX,WORD PTR ORG_VECTOR I GET DISKEnE VECTOR 0028 A30001 ZlO I10V WORD PTR DISK_VECTOR,AX J INTO INT 40H 002E Al4EOO ZlI HOV AX,WORD PTR DRG_VECTOR+2 0031 A30Z01 Zl' HOY WORD PTR OISK_VECTOR+2.AX 0034 C7064C005602 '33 MOV NORD PTR ORG_ VECTOR, OFfSET DISICIO , HDISK HAtI)lER 003A 8COE4EOO '34 HOV WORD PTR ORG_ VECTOR+2 .CS 003E B86007 '35 MOV AX, OFFSET HD_INT J HDISK INTERRUPT 0041 A33400 '36 I10V NORD PTA HDISK_INT.AY. 0044 BCOE3600 '37 ttOV WORD PTR HDISK_INT+Z,CS 0048 C70664008601 '38 HOY WORD PTR BOOT_VEC.OFFSET BOOT_STRAP I BOOTSTRAP 004E 8COE6600 0052 C7060401E703 '3' MOV MOV WORD PTR eOOT_YEC+2.CS WORD PTR HF_TBL_VEC,OFFSET FD_TBl I PARAMETER TBl '40 0058 seOE060l '41 MOV WORD PTR HF_TBl_VEC+2.CS Dose Fe ,., STI '43 '44 ASSUME OS:DATA 0050 684000 '45 MOV AX.DATA I ESTABLISH SEGI1ENT 0060 8E08 '4. MOV OS.AX 0062 C6D6740000 '47 MOV OISK_STATUS,O I RESET THE STArus INDICATOR 0067 C606750000 '4. MOV HF _NUM,O j ZERO COUNT OF DRIVES DObe C606430000 ,4' MOV CMD_BLOCK+l.O I DRIVE ZERO. SET VALUE IN BLOCK 0071 C606770000 '50 MOV PORT_OFF .0 ; ZERO CARD OFfSET '51 0076 892500 0079 '5' '53 lit: MOV CX.25H ; RETRY COUNT 0079 E8F2QO 254 CALL HD_RESET_l I RESET CONTROLLER OOlC 7305 '55 JHC L7 DOlE E2F9 '5. LOOP L4 I TRY RESET AGAIN 0080 E9BFOO '57 JMP 0083 0083 890100 ". '5' l7: HOV CX.l 0086 8A6000 '.0 MOV ox.aOH 0089 B80012 '.1 ,., MOV AX.1200H ; CONTROLLER DIAGNOSTICS OOBt COB '.3 lNT 13" '.4 .. 008E 7303 JNC P7 0090 E9AFOO 0093 0093 880014 ,'.5 ,.7 P7: JMP HOV ERROR_EX AX.1400H J COIfTROLLER DIAGNOSTICS 0096 COB 2 •• 'NT 1'" 0098 7303 2 •• JNC P. 009A E9A500 270 JMP ERROR_EX 0090 271 P9: 0090 C7066COOOOOO ,72 MOV TIMER_LOW. 0 I ZERO TIMER 00A3 AI7200 273 HOV AX,RESET]LAG 00A6 303412 274 CHP AX,lZ34H ; KEYBOARD RESET 00A9 7506 '75 JNE OOA8 C7066C009AOI 27. MOV , SKIP WAIT ON RESET 0061 ,77 P6: 0081 E42:1 27. IN AL,021H I TIMER 00B3 24FE 27' AI<) Al,OFEH ; ENABLE TIMER 00B5 E62:1 '.0 OUT 021H , Al ; START TIMER 00B7 00S7 E86400 '.1 ,., I RESET CONTROLLER DOSA 7207 ,.3 JC PIO ,.4 .. OOBe 880010 MOV AX,HlOOH I READY DOBF COB ,'.5 INT 13H ..,.1.. 00C1 7308 JNC P2 ,.7 00C3 00C3 A16eoo , PI0: MOV AX. TIMER_lOW 00C6 30BEOI , CMP AX.446D I 25 SECONDS OOC9 72Et Dace E87590 "0 J8 JHP ,92 ,'.3.. DaCE P2: DaCE 890100 MOV CX,! .. 0001 BA8000 MOV OX,80H ,'.5 .. 0004 680011 HOV AX,llaOH I RECALIBRATE 0007 COl3 ,.7 lNT 0009 7267 , ,.. JC 13" ERROR_EX 0006 B80009 300 HOY AX.0900H I SET DRIVE PARAI1ETERS OOOE C013 301 INT 1'" ODED 7260 30' JC ERROR_EX 303 00E2 BaOOtS 304 MOV AX.ocaOCH i Ot1A TO BUFFER Fixed Disk BIOS A-87 LaC OBJ LINE SOURCE 00E5 SEeD 30. I10V ES,AX I SET SEGI1ENT 00E7 2508 306 sue eX.BX 00E9 B8000F 307 MOV AX.OFODH I WRITE SECTOR BUFFER OOEe COB 308 INT BH OOEE 7252 30' Je ERROR_EX 310 DOFO FE067500 311 INC HF _NUN I DRIVE ZERO RESPONDED 31> OOF4 8A1302 313 MOV DX.2:13H I EXPANSION BOX OOF7 BODO 31. MOV ALtO OOF9 EE 31' OUT DX,AL ; nJRN BOX OFF OOFA 8A2:103 310 I10V OX,32lH , TEST If CONTROLLER OOFO EC 317 IN AL.OX I • .• IS IN THE SYSTEM ltIIT DO FE 240F 318 ANO AL,OFH 0100 3eOF 31. CM' AL.OFH 0102: 740b 320 JE BOX_ON 0104 C7066(:00A401 321 MOV TIMER_LOW.420D I CONTROLLER IS IN SYSTEM U't1T OlOA 322 BOX_ON: DIOA 8A1302 323 MOV Ox.213H I EXPANSION BOX 0100 BOFF 324 MOV AL,OFFH OIOF EE 325 OUT OX.At ; TURN BOX ON 320 OllO 890100 327 MOV eX.l I ATTEMPT NEXT DRIVES 0113 8A8100 328 MOV OX,081H 011b 32' P3: 0116 28CO 330 SUB AX,AX I RESET 0118 C013 "1 INT 13H 011A 72.40 332 JC POD_DONE OIIC e80011 333 MOV AX,01100H , RECAL alIF COl3 334 INT 13H 0121 730B 335 JNC P5 0123 A16COO 33. MOV AX. TIMER_LOW 2.5 SECONDS 0126 306E01 0129 72EB '" 338 CM' JB AX,4460 P3 I 012B EB2.F90 33. JM' POD_DONE 012E 340 P5: 012E 880009 341 "OV AX,0900H ; INITIALIZE CHARACTERISTICS 0131 con 342 INT 13H 0133 7227 343 JC POD_DONE 0135 FE067500 344 INC HF _HUM I TAllY ANOTHER DRIVE 0139 81FA8100 34. eM' DX.(80H + S_MA)CFILE - 1) 0130 7310 '40 JA' POD_DONE OBF 4.2 347 INC OX 0140 EBD4 348 JM' P3 34' 350 ; ----- POD ERROR 351 0142 352 ERROR_EX: 0142 BDOFOO 353 MOV BP,OFH I POD ERROR FLAG 0145 2BCO 354 SUB AX.AX 0147 8BFO 355 "OV SI.AX 0149 89060090 356 MOV CX,F17L ; MESSAGE CHAR .... CTER COl.INT 0140 B700 357 "OV BH,O ; PAGE ZERO O14F 358 OUT_CH: 014F 2E8AS46801 35' "OV AL.CS:Fl71SIJ ~ GET BYTE 0154 MOE 360 MOV AH,140 • VIDEO OUT 0156 COlO 361 INT 10H o DISPLAY CHARACTER 0158 46 36' INe 51 ; t-IEXT CHAR 0159 E2F4 363 lOOP OUT_CH ; DO MORE 0156 F9 364 STe DISC '0' POD_DONE: DISC FA 36. ClI 0150 E421 367 IN H,02lH ; BE SURE TIMER IS DISABLED 015F OCOI 308 OR AL.OlH 0161 E621 36' OUT 021H.AL 0163 FB no sn 0164 E8ASOO 371 CALL DSBL 0167 CB ,12 RET n3 0168 31373031 37. F17 DB 01701' ,OOH,OAH 01be 00 0160 OA 0006 375 FI7L ,qt1 $-Fl1 n6 Ol6E 377 HO_RESET_l PRDC NEAR 016E 51 376 PUSH CX I SAVE REGISTER 016F 52 37. PUSH OX A-88 Fixed Disk BIOS LOC OBJ LINE SOURCE 0170 Fe 380 CLC ; CLEAR CARRY 0171 890001 301 rrov CX,OlOOH ; RETRY COlfIT 0174 382 L6: 0174 E80706 383 CAll PORT_l 0177 EE 30. OUT OX,AL J RESET CARD 0178 E80306 305 CAll PORT_l 0178 EC 30. IN At,OX I CHECK STATUS OI7t 2402 307 ANO AL.Z ; ERROR BIT Ol7E 7403 3.0 JZ .3 0180 ElF2 389 lOOP L' 0182 F9 39' STC 0183 391 R3: 0183 5A 392 pop OX i RESTORE REGISTER 0184 59 393 pop CX 0185 C3 394 RET 395 HD_RESET_l ENDP 396 397 DISK_SET1JP ENDP 390 399 j----- INT 19 --------------------------------------------------- ••• 40! INTERRUPT 19 BOOT STRAP LOADER 4'2 403 THE FIXED DISK aros REPLACES THE INTERRUPT 19 4.4 BOOT STRAP VECTOR WITH A POINTER TO THIS BOOT ROUTINE 405 RESET THE DEFAULT DISK AND DISKETTE PARAMETER VECTORS 4.6 J - THE BOOT BLOCK to BE READ IN WIll BE ATTEMPTED FROH 4.7 CYLINDER 0 SECTOR 1 OF THE DEVICE. 4.0 J - lltE BOOTSTRAP SEQUENCE IS: 4.9 > ATTEMPT TO lO'&'O fROM THE DISKETTE INTO THE BOOT 41. LOCATION (OOOQ:7COQ) At-ro ~ANSFER COtfIROl THERE 411 > IF THE DISKEnE FAILS THE FIXED DISK IS TRIED FOR A 412 VALID BOOTSTRAP SLOCK. A VALID BOOT BLOCK ON THE 413 FIXED DISK CONSISTS OF THE BYTES 055H OAAH AS ntE 41. LAST TWO BYTES OF THE BLOCK 415 > IF THE ABOVE FAILS CONTROL IS PASSED TO RESIDENT BASIC 416 417 ; ---------------------------------------------------------------- 410 0186 419 BOOT_S~AP: 42. ASSUHE DS: DUMMY, ES: DUMMY 0186 26CO 4Z1 SUB AX,AX 0188 8ED8 4Z. Mav DS~AX ; ESTABLISH SEGMENT 423 424 ;----- RESET PARAMETER VECTORS 425 016A FA 42' CLI 018S C7060401E703 427 MOV WORD PTR HF _TBL_VEt. OFFSET FD_TBl 0191 acOE0601 428 Mav WORD p~ HF _TBl_VEt+2, CS 0195 C70676000102 429 MOV WORD PTR DISKETIE_PARH, OFFSET DISKETTE_TBL 0198 SCOE7AOO 43. I10V WORD PTR DISKETTE_PARI1+2. cs 019F FB 431 STI 432 '33 ;----- ATTEMPT BOOTSTRAP FRDtI DISKETTE 434 01.1.0 890300 435 HOV ex.! ; SET RETRY tQlJfT 01A3 436 HI: i IPL_SYSTEM o tA3 51 437 PUSH CX I SAVE RETRY COl.IIT QUA 2B02 430 SUB OX,DX 1 DRIVE ZERO 01.1..6 2BCO 439 SUB AX.AX J RESET THE DISKETTE 01.1..8 COl3 44. INT 13M ; FILE 10 CAll 01.1..1. 720F 441 JC H2 ; IF ERROR, TRY AGAIN OlAC B80102 442 I10V AX,0201H j READ IN THE SINGLE SECTtIR 443 OlAf 2B02 444 SUB OX.OX OIBI 8EC2 445 Mav ES.OX J ESTABLISH SEGf'lEHT 01B3 BBOO7C 446 I10V BX,OFFSET BOOT_LOCN 447 01B6 890100 448 I10V CX.l I SECTOR I. TRACK 0 OIB9 COl3 449 IIIT 13H I FILE 10 CALL OIB8 59 45. H2. pop CX ; RECOVER RETRY COUHT OISC 730A 451 JNO H4 I CF SET BY ~CESSFUL READ 01BE eOFtao 452 C11P AH.SOH ; IF TIME OUT. NO RETRY OlCl 740A 453 JZ H5 ; TRY FIXED DISK OIC3 HOE 454 lOOP HI ; DO IT FOR RETRY TIMES 01C5 EB0690 455 JMP HS ; UNABLE TO IPL FRCH THE DIstC.ETTE DIce 456 H4: ; IPL WAS SUCCESSFUL Fixed Disk BIOS A-89 LOC GBJ LINE SOURCE 01C8 EAOO7COOOO 457 JHP BOOT_LOCH 456 459 ;----- ATTEMPT BOOTSTRAP FROM FIXED DISK 460 Oleo 461 H5: Oleo zeco 462 SUB AX ,AX ; RESET DISKETTE OleF 2B02 463 SUB OX,OX OlDl C013 464 INT 13H 0103 890300 465 MOV CX.3 I SET RETRY COUNT 0106 466 H6: ; IP~SYSTEH 0106 51 467 PUSH ex I SAVE RETRY COUNT 0107 8A8000 466 HOV OX.OOSOH I FIXEO DISK ZERO OlOA 28CO 469 SUB AX ,AX ; RESET THE FIXED DISK OIOC con 470 INT 13H I FILE 10 CAll OlDE 72:12 471 JC H7 I IF ERROR, TRY AGAIN DIED 880102 472 HOV AX,ClOlH ; READ IN THE SINGLE SEC rOR OIB 280S 473 SUB eX,aX 01E5 6EC3 474 HOV fS,BX DIE7 BBOo7e 475 HOV eX,OFFSET BOOT_LOCH ; TO llIE BOOT LOCATION OlEA 6A8000 476 HOV OX.SOH ; DRIVE NUMBER OlEO 890100 477 HOV ex,I ; SECTOR I, TRACK 0 OlFO C013 478 INT 13H i FILE 10 CAll OIF2 59 479 H7: POP ex ; RECOVER RETRY COUNT DIn 7206 480 Je H8 OIFS AlFE70 481 HOV AX,WORD prR BOOT_LOCN+510D aiFS 3D55AA. 46' eNP AX,OAA55H ; TEST FOR GENERIC BOOT BLOCK OlFB 74CB 483 JZ H4 OIFD 484 Ha: OHa E207 485 LOOP H6 I DO IT fOR RETRY TIMES 486 487 ;------ UNABLE TO IPL fROM THE DISKETTE OR FIXED DISK 488 OlFF C018 489 'NT 18H ; RESIDENT BASIC 490 0201 491 DISKETTE_ TBL: 492 0201 Cf 0202 02 493 494 DB DB , 110011118 I SRT=C, HO UNLOAD=OF - ; HD LOAD=l, MOOE::DMA - 1ST SPEC BYTE 2ND SPEC BYTE 0203 25 495 DB 25H I IoIAIT AFTER OPN TIL MOTOR OFF 0204 02- 496 DB Z I 512 BYTES PER SECTOR 0205 08 497 DB ; EDT (LAST SECTOR ON TRACK) 020b 2A 498 DB 0'," I GAP LENGTH 0207 FF 499 DB OFFH ; OTl 0208 50 500 DB 050H ; GAP LENGTH FOR FORMAT 0209 F6 501 DB OFbH ; FIll BYTE FOR FORHAT 020A 19 50' DB 25 I HEAD SETTlE TIME (MILLISECONDS I 020B 04 503 DB ; MOTOR START TIME {1/8 SECOND I 504 505 j----- MAKE SlRE THAT ALL HOUSEKEEPING IS DONE BEFORE EXIT 506 020e 507 aSBL ?ROC HEAR 508 ASSUHE DS:DATA GlOC IE 509 PUSH OS ; SAVE SEGMENT 02.00 884000 510 HDV AX.DAl" 0210 8E08 511 HOV DS,AX 5., 0212 8A267700 513 HOY AH,PORT_OFF 0216 50 51. 515 PUSH "" ; SAVE OFFSET OZ17 C606770000 516 HOV PORT_OFF,OH c2le E86905 517 CALL POIH_3 021F 2ACD 518 SUB Al.Al 0221 EE 519 OUT aX,AL ; RESET INT IOMA MASK 0222 C606770004 "0 HOV PORT_OfF ,4H 0227 E85E05 521 CALL PORT_3 022A 2Ata SUB '&'l,Al 022C EE '" 513 OUT DX,Al ; RESET INTIDMA. HAst< 0220 C606770006 0232 E8530S ". 525 NOV CAll PORT_OFf .8H PORT_3 0235 2AtO 526 SUB AL,AL 0237 EE 527 OUT OX.Al ; RESET INTIDM" MASK 0238 C60677000C 528 NOV PORT_OFF,OCH 0230 E84aDS 5Z9 CALL PORT_3 0240 2ACO 530 sue AL,AL 0242 EE 531 OUT OX,AL I RESET INT /DMA MASK 0243 B007 532 "OV Al,07H 0245 E60A "3 OOT DMAtiO.AL ; SET DHA MODE TO DISABLE A-90 Fixed Disk BIOS LOC OBJ LINE SOURCE 020+7 FA 534 eLI J DISABLE INTERRUPTS 02:48 £421 535 IN Al.OtlH oe4A OC20 53. OR AL.02DH 024C £621 537 OUT ; DISABLE INTERRUPT 5 024E FB 538 STI 021H,AL , ENABLE INTERRUPTS 024F 58 53. pop 0250 88267700 540 I10V '" PORT_OFF ,AH I RESTORE OFFSET 0254 IF 541 POP as J RESTORE SEGMENT 0255 C3 542 RET 543 aSBl ENDP 544 545 1----... ----------------------------------- 546 FIXED DISK BIOS EN'TRY POINT 547 ; ---------------------------------------- 548 0256 54' DISK_IO MOC FAR 550 ASSUME OS: NOTHING. ES; NOTHING 0256 80FA80 551 CMP Dl,80H I TEST FOR FIXED DISK PRIVE 0259 7305 552 JAE HARD_DISK ; YES. HANDLE HERE 025B C040 551 1NT 40H J DISI > Shift Cyan Yellow High Intensity 3F 63 ? ? Shift Cyan White High Intensity 40 64 @ @ Shift Red Black Normal 41 65 A A Note 4 Red Blue Underline 42 66 B B Note 4 Red Green Normal 43 67 C C Note 4 Red Cyan Normal 44 68 D D Note 4 Red Red Normal 45 69 E E Note 4 Red Magenta Normal 46 70 F F Note 4 Red Brown Normal 47 71 G G Note 4 Red Light Grey Normal 48 72 H H Note 4 Red Dark Grey High Intensity 49 73 I I Note 4 Red Light Blue High Intensity Underline 4A 74 J J Note 4 Red Light Green High Intensity Of Characters, Keystrokes, and Colors C-3 As Text Attributes Color/Graphics IBM Value As Characters Monitor Adapter Monochrome Display Hex Dec Symbol Keystrokes Modes Background Foreground Adapter 4B 75 K K Note 4 Red Light Cyan High Intensity 4C 76 L L Note 4 Red Light Red High Intensity 4D 77 M M Note 4 Red Light High Intensity Magenta 4E 78 N N Note 4 Red Yellow High Intensity 4F 79 0 0 Note 4 Red White High Intensity 50 80 P P Note 4 Magenta Black Normal 51 81 Q Q Note 4 Magenta Blue Underline 52 82 R R Note 4 Magenta Green Normal 53 83 S S Note 4 Magenta Cyan Normal 54 84 T T Note 4 Magenta Red Normal 55 85 U U Note 4 Magenta Magenta Normal 56 86 V V Note 4 Magenta Brown Normal 57 87 W W Note 4 Magenta Light Grey Normal 58 88 X X Note 4 Magenta Dark Grey High Intensity 59 89 Y Y Note 4 Magenta Light Blue High Intensity Underline 5A 90 Z Z Note 4 Magenta Light Green High Intensity 5B 91 [ [ Magenta Light Cyan High Intensity 5C 92 \ \ Magenta Light Red High Intensity 5D 93 1 1 Magenta Light High Intensity Magenta 5E 94 A "- Shift Magenta Yellow High Intensity 5F 95 - - Shift Magenta White High Intensity 60 96 Yellow Black Normal 61 97 a a Note 5 Yellow Blue Underline 62 98 b b Note 5 Yellow Green Normal 63 99 c c Note 5 Yellow Cyan Normal 64 100 d d Note 5 Yellow Red Normal 65 101 e e Note 5 Yellow Magenta Normal 66 102 f f Note 5 Yellow Brown Normal C-4 Of Characters, Keystrokes, and Colors As Text Attributes Color/Graphics IBM Value As Characters Monitor Adapter Monochrome Display Hex Dec Symbol Keystrokes Modes Background Foreground Adapter 67 103 g g Note 5 Yellow Light Grey Normal 68 104 h h Note 5 Yellow Dark Grey High Intensity 69 105 i i Note 5 Yellow Light Blue High Intensity Underline 6A 106 j j Note 5 Yellow Light Green High Intensity 6B 107 k k Note 5 Yellow Light Cyan High Intensity 6C 108 I I Note 5 Yellow Light Red High Intensity 60 109 m m Note 5 Yellow Light High Intensity Magenta 6E 110 n n Note 5 Yellow Yellow High Intensity 6F 111 a a Note 5 Yellow White High Intensity 70 112 p p Note 5 White Black Reverse Video 71 113 q q Note 5 White Blue Underline 72 114 r r Note 5 White Green Normal 73 115 s s Note 5 White Cyan Normal 74 116 f f Note 5 White Red Normal 75 117 u u Note 5 White Magenta Normal 76 118 v v Note 5 White Brown Normal 77 119 w w Note 5 White Light Grey Normal 78 120 x x Note 5 White Dark Grey Reverse Video 79 121 Y Y Note 5 White Light Blue High Intensity Underline 7A 122 z z Note 5 White Light Green High Intensity 7B 123 { { Shift White Light Cyan High Intensity I I High Intensity 7C 124 I I Shift White Light Red 7D 125 I I Shift White Light High Intensity Magenta 7E 126 - - Shift White Yellow High Intensity 7F 127 .6. Ctrl - White White High Intensity Of Characters, Keystrokes, and Colors C-5 As Text Attributes Color/Graphics IBM Value As Characters Monitor Adapter Monochrome Display Hex Dec Symbol Keystrokes Modes Background Foreground Adapter .... BO to FF Hex are Flashing in both Color & IBM Monochrome· • • • 80 128 C; Alt 128 Note 6 Black Black Non-Display 81 129 U Alt 129 Note 6 Black Blue Underline 82 130 e Alt 130 Note 6 Black Green Normal 83 131 a Alt 131 Note 6 Black Cyan Normal 84 132 a Alt 132 Note 6 Black Red Normal 85 133 a Alt 133 Note 6 Black Magenta Normal 86 134 fI Alt 134 Note 6 Black Brown Normal 87 135 C Alt 135 Note 6 Black Light Grey Normal 88 136 e Alt 136 Note 6 Black Dark Grey Non-Display 89 137 e Alt 137 Note 6 Black Light Blue High Intensity Underline 8A 138 e Alt 138 Note 6 Black Light Green High Intensity " 8B 139 Alt 139 Note 6 Black Light Cyan High Intensity 8C 140 i Alt 140 Note 6 Black Light Red High Intensity 80 141 1 Alt 141 Note 6 Black Light High Intensity Magenta 8E 142 A Alt 142 Note 6 Black Yellow High Intensity 8F 143 A Alt 143 Note 6 Black White High Intensity 90 144 ~ Alt 144 Note 6 Blue Black Normal 91 145 ae Alt 145 Note 6 Blue Blue Underline 92 146 I>E. Alt 146 Note 6 Blue Green Normal 93 147 6 Alt 147 Note 6 Blue Cyan Normal 94 148 0 Alt 148 Note 6 Blue Red Normal 95 149 b Alt 149 Note 6 Blue Magenta Normal 96 150 U Alt 150 Note 6 Blue Brown Normal 97 151 U Alt 151 Note 6 Blue Light Grey Normal 98 152 Y Alt 152 Note 6 Blue Dark Grey High Intensity 99 153 6 Alt 153 Note 6 Blue Light Blue High Intensity Underline 9A 154 u Alt 154 Note 6 Blue Light Green High Intensity C-6 Of Characters, Keystrokes, and Colors As Text Attributes Color/Graphics IBM Value As Characters Monitor Adapter Monochrome Display Hex Dec Symbol Keystrokes Modes Background Foreground Adapter 9B 155 ¢ Alt 155 Note 6 Blue Light Cyan High Intensity 9C 156 £ Alt 156 Note 6 Blue Light Red Hig h Intensity 9D 157 ¥ Alt 157 Note 6 Blue Light High Intensity Magenta 9E 158 Pt Alt 158 Note 6 Blue Yellow High Intensity 9F 159 f Alt 159 Note 6 Blue White High Intensity AO 160 a Alt 160 Note 6 Green Black Normal A1 161 i Alt 161 Note 6 Green Blue Underline A2 162 6 Alt 162 Note 6 Green Green Normal A3 163 U Alt 163 Note 6 Green Cyan Normal A4 164 II Alt 164 Note 6 Green Red Normal A5 165 iii Alt 165 Note 6 Green Magenta Normal A6 166 .!! Alt 166 Note 6 Green Brown Normal A7 167 £ Alt 167 Note 6 Green Light Grey Normal A8 168 l Alt 168 Note 6 Green Dark Grey High Intensity A9 169 r- Alt 169 Note 6 Green Light Blue High Intensity Underline AA 170 ----, Alt 170 Note 6 Green Light Green High Intensity AB 171 V, Alt 171 Note 6 Green Light Cyan High Intensity AC 172 V- Alt 172 Note 6 Green Light Red High Intensity AD 173 i Alt 173 Note 6 Green Light High Intensity Magenta AE 174 « Alt 174 Note 6 Green Yellow High Intensity AF 175 » Alt 175 Note 6 Green White High Intensity 80 176 Alt 176 Note 6 Cyan Black Normal Bl 177 I Alt 177 Note 6 Cyan Blue Underline B2 178 I Alt 178 Note 6 Cyan Green Normal B3 179 Alt 179 Note 6 Cyan Cyan Normal B4 180 f-- Alt 180 Note 6 Cyan Red Normal Normal B5 181 ~ Alt 181 Note 6 Cyan Magenta B6 182 f-I Alt 182 Note 6 Cyan Brown Normal Of Characters, Keystrokes, and Colors C-7 As Text Attributes Color /Graphics IBM Value As Characters Monochrome Monitor Adapter Display Hex Dec Symbol Keystrokes Modes Background Foreground Adapter B7 183 Alt 183 Note 6 Cyan Light Grey Normal III B8 184 Alt 184 Note 6 Cyan Dark Grey High Intensity R B9 185 f--J Alt 185 Note 6 Cyan Light Blue High Intensity II Underline BA 186 Alt 186 Note 6 Cyan Light Green High Intensity BB 187 hl Alt 187 Note 6 Cyan Light Cyan High Intensity BC 188 ~ Alt 188 Note 6 Cyan Light Red High Intensity BD 189 WJ Alt 189 Note 6 Cyan Light Magenta High Intensity BE 190 P Alt 190 Note 6 Cyan Yellow High Intensity BF 191 Alt 191 Note 6 Cyan White High Intensity h CO 192 L- Alt 192 Note 6 Red Black Normal Cl 193 Alt 193 Note 6 Red Blue Underline C2 194 Alt 194 Note 6 Red Green Normal C3 C4 195 196 t- Alt 195 Alt 196 Note 6 Note 6 Red Red Cyan Red Normal Normal C5 197 Alt 197 Note 6 Red Magenta Normal C6 198 === Alt 198 Note 6 Red Brown Normal C7 199 If- Alt 199 Note 6 Red Light Grey Normal C8 200 L== Alt 200 Note 6 Red Dark Grey High Intensity C9 201 Alt 201 Note 6 Red Light Blue High Intensity Ii Underline CA 202 - - I L - Alt 202 Note 6 Red Light Green High Intensity CB 203 ---, r-- Alt 203 Note 6 Red Light Cyan High Intensity CC 204 I;::: Alt 204 Note 6 Red Light Red High Intensity CD 205 Alt 205 Note 6 Red Light High Intensity Magenta CE 206 ~~ Alt 206 Note 6 Red Yellow High Intensity CF 207 Alt 207 Note 6 Red White High Intensity DO 208 I Alt 208 Note 6 Magenta Black Normal C-8 Of Characters, Keystrokes, and Colors As Text Attributes Color / Graphics IBM Value As Characters Monitor Adapter Monochrome Display -Hex Dec Isyn;bOl Ii: ,~, ,u ".~ Modes IrD~ .... ' 'lI. uollld l:oregrou'1(f Adapter 209 6 lagenta i 02 210 Alt 210 Note 6 Magenta Green Normal TT 03 211 u::= Alt 211 Note 6 Magenta Cyan Normal 04 212 t= Alt 212 Note 6 Magenta Red Normal 05 2 Alt 213 6 Magenta Magenta Normal F= 06 214 214 Note 6 Magenta Brown ~ 07 215 I Alt 215 Note 6 Magenta Light Grey Normal 08 216 Alt 216 Note 6 Magenta Oark Grey High Intensity 09 217 Alt 217 Note 6 Magenta Light Blue High Intensity I-- Underline OA 218 Alt 218 Note 6 Magenta Light Green High Intensity OB 1219 219 6 Magenta Cyan Hig Inte i OC 220 Alt 220 Note 6 Magenta Light Red High Intensity 00 221 Alt 221 Note 6 Magenta Light High Intensity Magenta OE 222 Alt 222 Note 6 Magenta Yellow High Intensity OF 223 Alt 223 6 Mage 'te High I ,ity EO 1224 2 6 I mal E1 225 {3 Alt 225 Note 6 Yellow Blue Underline E2 226 [' Alt 226 Note 6 Yellow Green Normal E3 1227 Alt 227 6 Iy Cyan E4 1228 ~ Alt 228 Note 6 Yellow Red Normal E5 1229 Alt 229 N 6 I Yellow Ma Nor 31 E6 230 Il Alt 230 Note 6 Yellow Brown Normal E7 1231 Alt 231 N 6 1 Yellow Light Grey N E8 232 Alt 232 Note 6 Yellow Dark Grey High Intensity E9 233 IJ Alt 233 Note 6 Yellow Light Blue High Intensity Underline EA 234 n Alt 234 Note 6 Yellow Light Green High Intensity EB 235 0 Alt 235 Note 6 Yellow Light Cyan High Intensity Of Characters, Keystrokes, and Colors C-9 As Text Attributes Color/Graphics IBM Value As Characters Monitor Adapter Monochrome Display Hex Dec Symbol Keystrokes Modes Background Foreground Adapter EC 236 00 Alt 236 Note 6 Yellow Light Red High Intensity ED 237 q, Alt 237 Note 6 Yellow Light High Intensity Magenta EE 238 < Alt 238 Note 6 Yellow Yellow High Intensity EF 239 n Alt 239 Note 6 Yellow White High Intensity FO 240 - Alt 240 Note 6 White Black Reverse Video F1 241 ± Alt 241 Note 6 White Blue Underline F2 242 :2 Alt 242 Note 6 White Green Normal F3 243 S Alt 243 Note 6 White Cyan Normal F4 244 r Alt 244 Note 6 White Red Normal F5 245 J Alt 245 Note 6 White Magenta Normal F6 246 Alt 246 Note 6 White Brown Normal F7 247 = Alt 247 Note 6 White Light Grey Normal F8 248 0 Alt 248 Note 6 White Dark Grey Reverse Video F9 249 • Alt 249 Note 6 White Light Blue High Intensity Underline FA 250 • Ait 250 Note 6 White Light Green High Intensity FB 251 V- Alt 251 Note 6 White Light Cyan H ig h Intensity Fe 252 ." Alt 252 Note 6 White Light Red High Intensity FD 253 2 Alt 253 Note 6 White Light High Intensity Magenta FE FF 254 255 • BLANK Alt 254 Alt 255 Note 6 Note 6 White White Yellow White High Intensity High Intensity C-IO Of Characters, Keystrokes, and Colors NOTE 1 Asterisk (*) can easily be keyed using two methods: I I 1) hit the Pr'. Sc key or 2) in shift mode hit the [§] key. NOTE 2 Period (.) can easily be keyed using two methods: 1) hit theW key or 2) in shift or Num Lock I mode hit the D~II key. NOTE 3 Numeric characters (0-9) can easily be keyed using two methods: 1) hit the numeric keys on the top row of the typewriter portion of the keyboa rd or 2) in shift or Num Lock mode hit the numeric keys in the 10-key pad portion of the keyboard. NOTE 4 Upper case alphabetic characters (A-Z) can easily be keyed in two modes: 1) in shift mode the appropriate alphabetic key or 2) in Caps Lock mode hit the appropriate alphabetic key NOTE 5 Lower case alphabetic characters (a-z) can easily be keyed in two modes: 1) in "normal" mode hit the appropriate key or 2) in Caps Lock combined with shift mode hit the appropriate alphabetic key. NOTE 6 The 3 digits after the Alt key must be typed from the numeric key pad (keys 71-73,75-77,79-82). Character codes 000 through 255 can be entered in this fashion. (With Caps Lock activated, character codes 97 through 122 will display upper case rather than lower case alphabetic characters.) Of Characters, Keystrokes, and Colors C-ll IDECIMAL VALUE . 0 16 32 48 64 80 96 112 • HEXA DECIMAL 0 1 2 3 4 5 6 7 , VALUE 0 0 BLANK (NUL LI 0 @ p ~ BLANK P (SPACE) 1 1 ~ I• 1 A Q a q ~ @) t 2 B R b r I I 2 2 3 4 3 4 •".. =IF 3 C S c s + 9T $ 4 D T d t ~ § CYo 5 E U e u •• -.l- 5 5 6 6 & 6 F V f v , g 7 7 7 GW W 8 8 1 ( 8 H X h x • 9 9 0 ! ) 9 I Y 1. y • 10 A ---+ * • J Z J Z 11 B (j +-- + ,• K [ k { Q L , < L I 1 12 13 C 0 ) ...-.-. - - M ] m } '" I 14 E ~ • • > N /\ n rv 15 F -¢- .. / ? • 0 - 0 6 C-l2 Of Characters, Keystrokes, and Colors DECIMAL VALUE . 128 144 160 176 192 208 224 240 • HEXA DECIMAL 8 9 A B C 0 E F !VALUE , ····...... 0 0 <; E a, .....··.... ex: --- 1 1 •• :.:.: U cE 1 ::::: fJ + - , , .:.:. 2 2 e fE 0, m r >- 3 3 ~ " u 0 - lL "IT -< 4 4 a,•• 0,•• ......., n ~ ~ b L r 5 5 a 0 N~ F a J a u, -a 1\ 6 6 0 ---I = ,.-- y - 0 0 7 7 ~ 0- II T -.." U -.." •• "e y 2 0 0 8 8 & I 9 9 e••, 0•• I d - e • e U -, ...-L n • 10 , A •• 11 B 1 ¢ Y2 - 0 .....r 12 c 1, £ 1;4 d 00n 13 0 J 0 cp 2 1 ¥ • 14 E A R «d ~ E I 15 F A r » 11 n BLANK 'FF' Of Characters, Keystrokes, and Colors C-13 Notes: C-14 Of Characters, Keystrokes, and Colors APPENDIX D: LOGIC DIAGRAMS System Board ...................................... D-2 Keyboard - Type 1 ................................. D-12 Keyboard - Type 2 ................................. D-14 Expansion Board ................................... D-15 Extender Card ..................................... D-16 Receiver Card ..................................... D-19 Printer ............................................ D-22 Printer Adapter .................................... D-25 Monochrome Display Adapter ....................... D-26 Color/Graphics Monitor Adapter ..................... D-36 Color Display ...................................... D-42 Monochrome Display ............................... D-44 5-1/4 Inch Diskette Drive Adapter ................... D-45 5-1/4 Inch Diskette Drive - Type 1 ................... D-49 5-1/4 Inch Diskette Drive - Type 2 ................... D-52 Fixed Disk Drive Adapter ........................... D-54 Fixed Disk Drive - Type 1 .......................... D-60 Fixed Disk Drive - Type 2 .......................... D-63 32K Memory Expansion Option ...................... D-66 64K Memory Expansion Option ...................... D-69 64/256K Memory Expansion Option .................. D-72 Game Control Adapter .............................. D-76 Prototype Card .................................... D-77 Asynchronous Communications Adapter ............... D-78 Binary Synchronous Communications Adapter .......... D-79 SDLC Communications Adapter ..................... D-81 Logic Diagrams D-1 ~~~~ S 5 5 S e ~!!e ~; ;;;;~;~~ i ~~~ ~~;:;;~~~~~ ~ ;~~ Iii" " .......o ......o CI) CI) .c ~ "E C'CI o C/l E CI) t: ~ II v v ~ v ~ v v v D-2 Logic Diagrams ;;: ;0;: ;;: ;;: ~ ~ - ;;: or '" ~ - to ; "' i! ': Ii I~ ; ~ i !e II ~ II ! ~ I ~= ['; .... ~~~ N :~_II ~ .........o o N ... -++++-++----!f".o---- CI) t: I.. ~ N-~"'~x--+4--»~---~I~ IIIII1 Logic Diagrams D-S 111111111111111111 111111 D-6 Logic Diagrams EE::EEEEEEE EEEEEEEE '" '" '" ~~ ;] § ; r-;;;i;;;; a. gc;~a~:ga~ E ••••• ii!Ji:I I III III IIIIII ....0 ....0 CO .... CIl CIl .r:. ~ ...ca "tJ 0 i m ~ ~ E ....en CIl ~ :;;;:g:g;g~~c;§ l~ i~s .. ,_0!. :: ~~ ~~§!§ ~~ 3~~~ i~~ II ~ ~ ~~ §:§:§:§:e~§:§: §:§: N -- §: §: §:§:§:§:§ §: §: §§:§:§: ~ '" §: ~E I; §: ;;: in;;;; " " Logic Diagrams D-7 ....o ....o "... Q) Q) .t:. ~ "EI'll o co ...E Q) en ~ D-8 Logic Diagrams ~. I.EFRlSRRlC ••'1 OROO 14) LO 14) I~ O.CKDBRO SPII.RDAU Dr I 1_11..6_2 ~ m II) ~) 33 191 T1M28ATESPK 15) !!DB. I~ "OW )3) l7ffi ... 75471 I') lAO IS) IS) JOO I') lOl- lS) X02_ I') X03_ 'EAKER I') liJ4- IS) 105- 15) lOB_ '-----------------------------'TlC200T I~ I') XD7 ~ .... OQ n ~ .... ~ ... OQ ~ )1) IIESETDRV' 8 c:tl II) pelll. System Board (Sheet 8 of 10) ~ I I,C en D-IO Logic Diagrams :;::5 u'" It ~ i i ~~iIi ~1i::i ... 0 i ~t;i .... i:N~ii 0 It ... 0 II) -~ II) .c 2 ~ - I is ... "C ! ~~ IV 0 - i n~ a::I L ~:Hl~ :5 ~ .... E II) g .. Ili=O! i!l:!:Ei:i!":::O:!:::l:lnc:i!:i!:i;,,;,,~'!! :i":iI!!'~lli~!!l;;~~li~~IF \.-1i Logic Diagrams D-l1 := ia: 1\ ii c i!l c !!I 8c c ~~ t;~ C ~~ ~~~ c - ",!!i N o CD iii ~ C. "~ > ~ ~ H ~ § I- D-12 Logic Diagrams ~o_ sioo I '5~OC MW nnf:fl Mnn1M nff -OLIO ....' 4850 Ifam,f.l,Ia1,f,f un ar. I, I,!, I,tiM,I ,I8I2 r. f 18011~"IT", 9~' I 111111111111111111111111 C=~:~:~P~~:;;~K1:U1 IB03] f-+CIHG4 .00 HO' 802 18041 ~·C.'08 '~~' I ....m. R03 H04- IB08I~".l1fi ~c ."'."' 1B091~·"T32 'kMl> ' ,I 111'1, 20 8M3 ORO' 'ROB OPU COP ~Gl ~O'OO 11 BRID 13 ORll SW MATRIX 19 GZ 1. OR12 DR13 ORI. DR15 -ORI6 -DRI7 ~ -DRl8 ::~I~GROUID=l -DRIU """' 2NF !1C3 .... (J'Q n :===-==1 11091~ 1107 It -OR2O -DR21 ISU 15PF o.... -DfiZZ -0823 l_'=1\J Jc; "'I ~ {~08If-+5VDC 1Cl +I'3C,l. ~- ~KEY'ADAllEASIHELD 3 (Il 56pF J56"'J o - Keyboard - Type 1 (Sheet 2 of 2) I IN a X!pu~ddv ~1l ~~ J J 1l ;;; ~ Ie ~~ ~!!i ~~"'" ~<~~ ~~~~ g:ffi "- i:i ~ 1~1~lil~l~ ~~ I"~ I I ;g2:"" !I~ I "li! - .... .......o Ql li! Ql = ..c 5 5 ~ 5i! ~ " ~ g i:i ~ N Ql != Q. ~ " ~ := ~ '" . "tI ;; ca ] > l:l i ::! Q) ::.:: = D-14 Logic Diagrams --- - - IIIIII l:t ~I' 00 0 0 0 NM~[L ~ " ~; 1;;::0 0 0 NM 0 0 0 G~ T~ Ht"- ;:;>1 ~I' <;;;g 11 ;;; ~r- ~;( ~ ~ Hh----- ~~ ~_N ~ Hh----- ~d~ ~.~ S~ I~I~\!I~ :; ~t; TrlT I,M[- f1Mril' M~ ~C!!! ...,~ ~~ btJ ........ >u '?~ -:!t- ;:;1\ t1tJ G~ ....o 'lCIlU ..r:: ~ -It- ~ ~~ . "'C ct! f.1t- ~ ~~ C o "r;; f.1_ c ~~ ~- ~ ~ jit< I !!l I " I "l I "l I 'l I 'l 1 " ~~:::; ccc ~~~ - .-;.-;ccc ccccc N_ ~~~~~ ;~~ ~~ ~ ",,;;;,:::l- :::l ... :::l I Logic Diagrams D·tS e::;;;;e::; <"iN ~i;' ~~ II JJ ~ J1 C") ....o .;;"~ ... ~ Ql "'C s:: .... X Ql r------,a> W : .......-..f,,'-I+~... I .......--'=~I+f-l4 .1 . . . ._..fl~'-I+I-O I b"--'I=-:-H'" It::~t,,,~j''' I +----!"~'_4++++~ : .......~-fI:~I+~... D-16 Logic Diagrams 5 "'" J :--r r----'~ 4c I=- I I If ~ I~d= I I~ I - :"""""-f"--o++++-+ L ___ J- !~l~ -;:::::=.. ,...-- ~- " ~ l§ ~ >- ~ -~~~ ~ ~ ~~- ~ ---,~ !~ ,,:,,- • If ~~ b- ~:I : N ~ L---+--+-. I_ ""'_IfOg~~~~ : 1= d r+H++----'~~ - - " ~ ... (g "'C C ~ W 50! ~ ~ ~~~~~! ... .., ;;;;;;iii)..,MM ':i:':i: ~~ ~ ~~~~~~ Logic Diagrams D-17 o - 00 I ISHT [SHT (SUT 'I 110 eN CK 110 eN ROY RESERVED '01 "0 .011 .DO ..II '" A'" 00 01 " 03 [SliT II ISHT II ISHT II [SUT 11 b OCI (SHT [SliT [SHT 'I "" 11102 11103 IIIQ4 '04 Z5 ''Z4 '05 A04 A03 04 D5 DB (SUT I) [SHT I) [SNT 11 AOZ 01 [SHT II " (SHT (;' IA05 ."'"'" [SNT 'I IRQ6 D-SIIELL TYPE o [SliT [SHT 'I " IRQ7 ORal BI. .31 A3Q A29 AD AI " (SKT lJ [SUT 11 [SUT lJ (SHT I] fAU 18 CDIfNE'CTDR JI .. 47 EDI [SHT 2,1) JJ' [SNT "" OR02 'Bl6 Ol AZB A3 [SUT 1) [SUT I) UI9 311 E06 [SliT 2,1) ".. (SHT r11103 A< [SUT I) [SUT 11 EA18 33 '2 E05 ISHT 2,11 '"I '" AZ8 (SUT I) [SliT 11 U17 , 1 sa E04 [SHT 2.11 .. [SHT11 [SHT 11 EA16 56 EDa (SHT 11 3 ~ ".'" Ala An Al ISHT II [SNI II ISHT II [SUT 11 E"IS E1114 11 31 52 48 ED2 EDI [SHT I) [SHT 2.IJ A' (SHT II EIII3 51 ISHT II rIl 1103 All A20 AIO All [SHT I) [SUT'I [SHT 11 (SHT 1) [SUT lJ EA12 EAll " 3Z 50 EOO EIII02 [SHT 2) " All [SHT 1) EA10 "14 13 48 EIR03 [SliT 2) .., AI9 [SUT II '" .18 AI7 All [SUT 11 (SliT II ISHT II (SUT 11 EA' EA. 40 55 54 EIR04 EIR05 ISH121 [SliT 21 EAl ...'" AI6 .. 5 [SHT I) [SHT II I EIR06 [SliT 2) ." AI6 All AlB [SHT 21 I'" 21 [SUT I) [SHT II ISHT 11 EA' EA5 EA< ," 38 43 EIII07 [SHT 21 101 AI3 1m" 16 45 EIIO CM ROY ISMT 21 110 A12 A19 (SNT 1) 16 .31 All m 1m" [SliT 1) [SUT II '" fA! " " ,5 EIIO eH CK ISHT 21 EIIESERVED ISIIT 2J BI' iOA [SliT 11 (SUT 11 [SUT 11 EAl EAD 15 3' , '3 EOROI EDR02 [SliT 2J [SHT 2J m Iiiii [8HT 2) 2. E01103 ISHT 2] 812 MEMR ISHTl.21 iSHT II rnm 10 '" MEMW ISHI 21 iSHT 21 ISHl21 !DArn mID 11 ,3 nil E ENABLE ISHT 21 [SliT 21 '20 .21 Clk TIC [SUT 21 [SUT 11 ISUT 21 [SUT 21 mrn EiUi " 31 -35 'OZ RESET 18HT2J [BUT 2.11 !lfiii 34 iiEKii ISH11.11 m 20 ag Bl9 ISH11,11 ISHT 21 IiOiI BI1 DACKI ISHT" ISHTII EALE 18 .Z8 DACK2 [8NT 21 ISH111 EeLK 5 6 e.MEMJN EXP.ISHTI) BI5 ~ [SliT 21 [SliT 11 EriC 21 51 r-------- .18 'LE (SliT 11 [SliT 21 fiilm 2. "r------- CARD EDGE TABS "60 r-------- r-------- 61 r-------- "r-------- - Extender Card (Sheet 3 of 3) " "'C 8... CI> > 'i;j u CI> a:: Logic Diagrams D-19 -------- aaaaaaaa I~ . ..; C"') ....o ~ ... N ~ 0 '" t5'" §~ CI lIE ;:; ~ !: - ""C :1 ~ ~ ~ M 8.. N - '" > ~ "Qi ~ u 'a::" ; ; ff __ ci §: §: §: §: '" '" D-20 Logic Diagrams jrlOI S3 ~ __ ____ =____ m______ ~il-~~X~R~S2~=~~'~~~~~2N~~'~~~~~S- ~mm K~~.~mm_. ~ I ; ~~~~~~~~I!~~~S~~~~~.~~~5'~~~55~~ ~I ~cccccc~ "I ~I_>->->->->->-_ICD~ "I ~.-~~-=~ -~I' N~~~~~~~~~~~~~~~N ~ !1;~-·~o~o=e-~~~~~~~~2N~~'~2~~2~~~R~~~~~~~~'Q:~.~.e~.~~~~~~~~~.~ I !~------------------------------------------------~ Logic Diagrams D-21 9.1(3.31( 9xD9Bll 91S52778 14 Hlo---",,,M,,,I.34'....... r-- _--I-_~,/...-::01;---..:..:.1~;:::.::'o.,1 ----------------~HlIUI I H20-__~.~~-~~-~/~-r--~~'D.--r~'~U~.~~-:4~,.~.~----------~H2 13 ~ ... 12 H3o----!j'r_::::~-"'-=-~Q3;--I-~I~~D3:---+----------oH3 11 H.o---~6U;r-:=::~--~-rC~;--t---r~~~-t~:z.1.1t2t------------~H4 10 H5 <>----'+--I---l'~ ,["",,"""" v' UL.... .v' I H5 eN< H60---.!6~r--:::::+_-...r06I--I]D6;:_t__:_:;;..t-----------<> H6 ~ ...,."3 HI HI r-_+_-rv' 07 0----""...... ~ _ _..!!IO~ ["""""""_.l---rv' 08 l~ H6 o- ~ 2~ T ~~. "9 ILl 9 15 -+-~~ 6 H 0 - - - - ' ...... / ~ 2J lTD--.-J fP o - - - -...... H25CIl....--------l----~ my IDI * I fr 1 '6 2W 555Oo_------~~ ~~·i 680 eM4 6 "'{5:113 555 [IA) VRI R2 3.31( VTH 6 ZOI( 15K ell5 1 ~~~:GERO---............,'''''-l ......,C5~2 T DrsJL-~' TC4 100 I •.D1 c...;';'--'I'l",.J .lr'OOGp 'II" ' o -_ _ _ _ _ _ _...J ':" JJ T4 lelO C3 T~OI" T'.1" 17 f OA0601 ., 410!186 rf-t*- :, .. 3 '" 'M2.6~ DMI CR 21 22 .,l!!- ~'O 6rf--t* ,, CR8 22 {Oll I " .8 ,,JR- ,ri-* ,, I Z05 CR C '3 RC '012 2l :... .J'" ,,JR- 1""013 CRO " '0 852778 ~ c., se' '3 R9 820 ~~, To.Dlp 852778 AUOI-24 .12 2. 1.2K 018 .ID 5. '21) 60 - !2 ·1 • 0.- 120 1,"3 Tc'7' "' ~ RIO OA0601 821) TO,01t1 ,f,--ti . ., 5. .. 1.2K 2W elll4 ZD 13 2 3 110M2 , 'M2.3~ lFA 25 sri-* ,,, 1""014 LF • ,~ LFB 26 5~ .,,, zo, LFB '015 .~ 852718 lFC 27 LF C CO" ,j L :J l .14 ,~ ! lFD 26 ClI5 10 LF • ~17 AUOI-24 3 Sl F ." '2W" 620 N 1.2K 87430 020 J,eo To,Dlp SSZ178 013 SLF 14 14 15 16 17 ." ." ."G, g c•• [l G, G, G, elm 18 +5 0 ·1" 16Y 1" lOp ~12 CII5 13 17 GO.:-:l PTSo ~ oPTS eN< • 16 liSa BE 0 o RS PE " 20 18 D-22 Printer (Sheet 1 of 2) Logic Diagrams .......o ........ Q) Q) .s::. en .... ....c Q) ";: c.. ~ ~ ~~~ I .... ::: r-oc"" Logic Diagrams D-25 . ~ ~!~ ! ! :;~~~s::iN:;;r :or., • .,.~ : ~ ~ ; ~ '"~ ~~~ ~~ ~~~~~~~ i~~~~ ~ ~ ~ ~ " rl' .. ;! " ~ ~ :~ ~ ~ ::l :! C c c :c :;;;::c c c :c c ~ if i ~~ 7 I!' iii ~ -; '" ~ ~ =" ~ =" ~ I' =;$ I' $ ~ I' ~ I' ... ~ ~ ~ oe it" ~ ~ ~ ~ it ~ - Q 0 ........ Q> Q> .J: ~ .... ....Q. Q> CtI ~ ~ > CtI 0.. C'" Q> E 0 .... .J: U 0 C 0 ::i?: ~ -i~ . ~f-;-;:; ~ L..-jl' D-26 Logic Diagrams 2 74LS157 ~:~ , 1Y rf-RMAO- 6 2A 2'1 ~RMAI- I lJ ~ ~~ pL:::~== ceo ISHT6.101 14 ~ UI8 ~g II I 48SELG ee3 18HT 6.101 74LSl57~ 15 ',.----11' rRMA4- : 18 ~ ,~~: ~~ F:::~= 10 l: 4Y 14 4A UH -"-'M"-"'C""'C,",,,--.(',L,,,~·.r,, 13 4BSELG CC4 [SHT 6,10) 1 15 CC5 ! 74LS157 2 U 3 18 -:- IY 4 RMAS eea eel T [SHT5.IO) I L,..--ij" ,,7 RM" r---M1~: UI6 m m m m -. _U _U b ..... (JQ m rn m m , _U _U (') "'. RAI (SHT 7.12) (SHT 7.121 o ,., RA2 ISHT 1.121 (8HT 5..11 II' '1-'1- ~. CURSOR CURSOR ISHT 5) MSYNC 39 HSYNC ISHT 51 "jjCi DISPLAY E~~~~~ ~ VSYMC DISPEN ISHT 51 (SHT 5) ~ [SHT 31 -WE 3 rn !I 14886 ISHT 11 '''8ITdE~ 15 +5V o. RPI N Monochrome Display Adapter (Sheet 2 of 10) -...1 a Xlpu;}ddv t:I I >5, N Q() r-" Jl0 ~10 j 6~ , i'LIIM ~ 'JUI". I"T71 I"Tt61 IIHTlI'''BET~ I ,,74LS1i8 )D~1I ·CERa. ISHT 1~ i.... [; ! ~51111-j 1~" ~ Jill QS (SHT51 (') lil 1811110) t:I ~. ·WE JS"T'.~ --It----------I-+t:==:tt 8 :~:~ : ~-:>B845C:~i.~ J~ ~ ~ ~ ~ ~ ~ ~ f~l~H~~~~~~~~;;~~~::::::::~~:c~~~~ (SliT II·RESET fIl +CACs tID IS"T~ ISHU) •• EIW E I"T'I .CPU ISEL ~ ~--~--+------- } " l - - - - - - - +CCLK 1811T&'101 -CCUt Im~ ·IACK TEST oac===±::±=:1J +XACI( +10 READY ISHTOI ISlIl71·IIRES IS'T 11 ISHT~R'3 DOTCLK Im7.1~ RDMAlI ISHT 101 -CLRVIDEO 18I1T5,7,10) ·CURsaR OLY IS'T 51 7IL'" I ·DISPEIIOLY ISIIT 7) ISHT'IHS'.C~~~~t~~J~~~~~gg~II5II~~~~~~~ +DISPEllau ISHT71 >CURSOR OLY 18'161 +HI'NCDlY [SHall ISIIT21 VSYMC +VSYMC au 181115.71 ISHT~.CCLK --.< 'sv Monochrome Display Adapter (Sheet 3 of 10) 0; ,. as as ii5' iii' ~ ~ ~~~~ Ii ::i e; ~ ~ iii 1i1 ill ..... CIl Q. ~ > C'CI is. 5'" CIl E ...o ..r:: u oc ~ := -- -- := -- = -- 0; '" ~ ii !1! "- ~~ ~ ~~ ~ "- iii ... ~ " Logic Diagrams D-29 ....o '0 ... It) CIl CIl ..c: ~ ~- Q.. ca ~ > ca Q. en oCIl E ~ -£o c o ~ ~ &! ~~ ~ ~"" -- :g ~;S 5S c c ~S c c gd 'i' " ~~ ill 'f :::-c;; " "~ N N '" " " ~ "~ ~~ ~ " - ~ D-30 Logic Diagrams ~ijJl1U: iliiHri ...o '0 CD .... l )l )l ) Q) Q) ..c. CI.I ... ....CI. Q) ca ~ > ca Q. UI 15 .... CIII --- COol"" ---- E E ..c. u o c o :2 Logic Diagrams D- 31 ~ .. .-------" I -....... 0 0 "... II> CI) ~ ~ ... "- II> Q. 111 J'"L ~- ~ ~ :g " « ;;' ~ ~ > ~- - -- - " 111 Q. is'" 0- Il> ;\~ E E ~9f", ~ u 0 c ;: 0 :2: ~ :J -- ili ill ;;; ;;: -n ~ ,. ~ ,,; t:l ~ ~ ~ '" "~ ~ ~ ~ " S; ~ '" '" "'" 'f ;:ace ~~ " " "~ ~ " ."' - "' '" "~ "~ § "'~ "§ ;? ;? § ~ . ;? '" ~.., ~~ D-32 Logic Diagrams ::; ~~ ~ :!! '" ~ -IHI' ....c '0 i +--++-+----i-f-jHI. ... 00 II) II) t5 ... fco ~ >- co "S. is'" E ... o .J::. g C ~ 111111 ~~H~ ::!!~s: Ci Ci U5" Ciii!>ii!>fi5'fi5' s: I iiiiiiii t;:;t:;:; ~~ 'i' - Logic Diagrams D-33 .......c o ... 0) Ql Ql ..c ~ . Ql 1i CIl ~ > CIl iII>i is Ql E ~ ..c g c::: o ~ ~ ':' 'i' ~ . i.- ..f< c;> _ ..... .., "" 1ft ........ P~~~~g/ . ~ " '" ~" ~ :' iL iL i!' " iL iL ~ ~ i ~ '" '" -~~ '" '" to'" '" '" '" '" ~ m;:== ! '~" '" ~~ ~~~8 - ~ ~ ~ ~ D-34 Logic Diagrams ....o '0 ....o .... G) G) I !2 ..I: en ~I is !l a a--+---~'50~1 10 - HIW ... 8 1 0 : H-WIDTH I ':l503 I 2. ALL RESISTOR ARE 114W EXCEPT WHUE OTHEAWISEIIIDICATED 3,AI.lCAPACITORSARE~EXCEPTWHUEOTIIEAWIS£IIIPICATE(1. 4. CAPAClTOIIS VALUES Allf!A'lIIILESSIITHfAWISE IMU1CATEil I' = 1Jf= 10" ~ ~.1____________________M"'''-....J l/ZW I Ui(l4 I 5.ACWIRIII&IIIFORMIITlOIi &5113 I ,i H.lINe I PNoI.SE; BL,l.CIt/8ROWWWIIIE nVUAl; WNlTf/BLUEWIRf R503 on L ______ J UOUIIO- SAEEIiAlIovmOWWIRE '" IMPOAUIT, THE PHASE WIR~ MUST GO TO T~E fUSED SIDE OF TAAIISFORME Monochrome Display (Sheet 1 of 1) +ElfABLE DRIVE 3/4 22 -ENABLE DRIVE 3/4 ,,0--16 +5~ RP_Z 898-1 14~ 2100 r---, ~-.l r--oi! 2 8 3 +INOEX -DRIVE SELECT 1 -DRIVE SELECT 2 2 10 2B " 1 :: -MOTOR ENA8LE 2 2 -MOTOR ENABLE 1 2 I I 26 30 • I I • +WRITE PROTECT -TRACK 0 +READ DATA +STEP , 1438 gr----, 8 20 ~2 DRIVES 1 &I 2 " II ~I~ , 10 • I NOTES I &I 2 1198-5 Rp·l I I -DIRECTION , J----li-l • 3300 I 1 -SHECT HEAD I ·WRITE DATA , 121 - . r - II 2 I 1," J~.mODD · 11)1 IZ 6T DR ! NC 13 PINSI33~ L - . . . . - - ~, = I I I 1 1 1 I I L- _ _ _ ......J U9 I I 3 I 1'4 .,.,l! I 1 +WRITEENABLE I I" r--:;;---, I1j'iiR~ 9 I 2100 -DRIVE SELECT 3 2 I 5 -DRIVE SELECT 4 -MOTOR ENABLE 3 -MOTOR ENABLE 4 2 1 10 "" I 1 Ir 1438 1" I DRIVES 3 &I 4 1 NOTES I &I 2 " 19 I GT L-.JI:!:=t 1 I, 16 3300 B9H liP· 1 L'==.JU18 14LS240 u=1 gl 10 I8 JL- ~14f II DR INC PINS2D- 37 = ,• =- I • 121 GT " L~£..3482J Ul PI A31 2 L _ _ _ .JUB A30 2 'AO ., 16 2K 3 2" - PROCESSOR INTERFACE g7 2 ·AI , ... ·A2 'A3 898·1 AN 1/4W 111 '" A2' 'AS ~ NOTES: ill' +A' 1, SIGNALS ON DRIVE PINS 10 THRU 16 ARE SWAPPED BY THE DRIVE CABLE m 'Al ..... (JQ BETWEEN DRIVES 1 "2 (AlfO 3" 4J AS FOLLOWS: 10 TO 16 .!ll. '48 "I" 'Ali () 12 13 14 13 +5 ,. "-, 80'1 ,DU em +AEN -lOR o 14 15 12 11 16TO 10 IPUlL·UPI' B,2~0 81 ,0;; -lOW -RESI ·Te JJ' 2 ALL DRIVES ARE JUMPEREO FOR MULTIPLEX OPERATION, HEAD LOAD WITH ORIVE SELECT AND DRIVE SHECT VIA INPUT PIN lZ. TERMINATING II·PACS ARE LEFT IN DRIVES I a 3 ONLY B31. BOil ni 1O7 '00 '01 ""I rn;] .84hIFD SHOULD BE ADJACENT TO MODULES MC34B7, 7438, 14S74, IE MHZ :!iii[ ... '02 '03 .' OSC.RP-I. MC4044. MC4024.14LSI61 &I 14lS191 B.2tJfD CAPS SHOULD BE A05 3 I:n NEAR ASSOCIATED PI PINS. [!J ~~~ ~WONIIATlE~~~tlJf:LEER L~~~~~.RT~~f~~ I~~~~IR~H~~il~:~~lrT TO 5 MAKE NO CONNECTION TO UNUSED PINS ON TilE VCD. CHARGE PUMP di DATA SEPARATOR MODULES _2 .""~ m I '26 ·05 '08 ·01 -DACK Z 6. ALL VOLTABE AND GROUND CONNECTORS TO THE veD, CHARGE PUMP AND o ASSOCIATED DISCRETE COMPONENTS SHOULD BE SEPARATE FROM OTHER CIRCUITS AND TIIEN JOINED TO THE OTIIER CIRCUITS AT ONE POINT ~ VI 5-1/4 Inch Diskette Drive Adapter (Sheet 1 of 4) a XfPu;)ddv -- 0 = -, ,-= I -- f--= -.:: I= -- - -::: -,= 0 I I I ~ ~ --N _ I Ii I -' tJ i II ~ ~ II I~ L_ - j -m .J .~ ~f-.: ~N-j ~ 0 I-~ !2 ~ o::t .... o ... N Ql Ql .r:. ~ - - ~ - - - --- - ~ ~~ ~~~ ~ ~ ii1~~~~'I!I? ~ i =ii: ~ ~ D-46 Logic Diagrams +18 111HZ Ie ---i MiiIQO il?-- • 2 _ KHZ WRITE CLOCK ~.~ u'r9L--II---------t-------------r=~============~==============~~ +ZIIIHl L """-------'-2 , D ~. PRESET III 00 +WRITE DATA I ,.,!.A.!RESET 11 10 .---- ._2 T. otL-le 8 .. T. I"'-- QiiP-,-.. ~ OA ntL-- t----l- +OIRECTIOIL 'i .. 'IMKZ 8 t----,' CuJ U2 U. U2 - 113 113 rl • ·.1 .11 ,. P3 I ct' I:-t CtK I ,---< Ct. _ 1131>-1. ~ ---1L 2. ~'11118-' ~ +$----< =-2 L _ _ _ _ _ _ _ _"9'9 eLK I L....!! wei WOA 30 PSO 32 ·EARLY Uti RTEP=.UnOI '* II r " soEI P81 "'" 2 81 '~RDY 25 7"-8'53 UlO , +WRITEEIIAILE +'IU 1 17 lOX wt 1l14L1OB FRISTP 37 III U4 • I , M~ ~. +ITEP +WftlTE PROTEI 36 I 1 14LSDI KOLl ~~ !.e :~ +TRAC. 21 U4 J3 33 FLTlTRD IIIfp Ie [""'--' 4 • E ..... +STAfiDARD DAlI/C . ~~ LC~~: HO 27 us : 7:-- 6 +VfOBTIIC 1 +SELECTHEAD I : +DACK' TC II (') +OATA .UIDOW 4 ROW -BACK .ol"Nurrll:t. SKEET! o ~. _OACK2~O,a. +TC I 9[Ui<)~·---------------------J I014lSOB uli~ 3 rI} +OIAGATE 2 13 14LSOI ~,.o""2~---------------- 141804 IOTE: Ha~~~ M~18p~~ =I~RE CONNECTED DilLY 011 CARDS BUILT o I ~ -...J 5·1/4 Inch Diskette Drive Adapter (Sheet 3 of 4) o x!pu;}ddv ~I ~ ~ . ~:1~ ~ '~~~ ~ ~ ~ ~ _I N ~ ----;q ~ 1/ ~~ - ~ ~ § E ~ N -L ~~ ~I -'Q~~ ~ ~:QN liE ~ - => I ~ ........ ~ ~ ~ ;: "T"L ~ ____ '-1N~ ~I ~ D-48 Logic Diagrams +12V ,,2V ." "- ,. Rl8 TPID ~ TP4 REf DES lOT USED cr.==r=RI5 CII21 1M11 1 RIll b (JCl ...... • ~OE ~ ~2VI~ Cii ~ D.' () '5VI'1 ~ 1:1 I"T +1::: <5 o • .1 35V JJ' '5V ,2" GNOI3,; ;; ;. , ; ••0 '"' ~ " 'PI 3 I:Il I :1 150 WR'TE 122 lSI< 5fiE>cu 2--jI; "I URI? DATA oJ;. '.c 5-1/4 Inch Diskette Drive - Type 1 (Sheet 1 of 3) o X1pu;}ddV ~ Ul o IIIINDEXI IIilOUI SECTOR SECTOR I WRITE b ..... (JQ PHOTO ASSY PROTECT n o JJ' ""'I ~ 3 ~ J1 ill DIRECTION 1 3'f. 'liO)o' , • Z)~ "",I ZO I ''"1"' "I ~ 482 MOTES: UNLESS OTHERWISE SPECIFIED 1. ALL RESISTDRSARE IJlOHI8,II4 W, ,%. 2. ALL CAPS ARE IN ~D. 3. ALL DIODES ARE III 444&. 4. ALL TRANSISTORS ItP. ARE 2n4124 I PNP ARE 2.4125. 5-1/4 Inch Diskette Drive - Type 1 (Sheet 2 of 3) L ).,. ~~ I ~~ ~ ~ ~ ) ~ ~!; ~:; ~~ ;;:l ~~ 6~~ - (~ <;;\ =i ~ - M 0 ... M Q) Q) :i!::: ..s::: en ~~ r------i ... r--- ~~ Q) ..I ~ . I I c.. > I- 1 I I !jill Q) ~-: ~ ~ I > :::;~ I .;: I C ~~ '" ., Jt '""':=! I .. I I ~" "'- Q) t: Q) ~ I~ .:i! 15'" ~~ . ~~ F- II:~.! O! ~~ I IN it:-----< >5 L ~_ ..s::: u .E :s- I I U", : - I!,! ....n !:t I :: L__ 'f i I:! __J =- 'It! II; >-l> ..2 ~:; N_ +2 ~ N "i' f- J l ~ ~ ~II; ~" !CL ~ !! ~i - Logic Diagrams 0-51 N 'I- .......0 " Q) Q) .s:; ~ N Q) a. >- I- Q) .~ C ...... Q) Q) ~ en ~ is .s:; U t: ~ " .... &.b 0-52 Logic Diagrams ,,.-----------,, f"""""""---J.~~---, : r-~~ i~ i ~-@-,~~ {~ ~~~ ~l '~l ~l~~ ~i ~ N u _( ~J'~.. ~.J~~ ~ I! ~ ~ ~ "~ ~ !~~ ('II ....0 .. ('II Q> Q> .l: (I) ('II Q> Q. > I- Q> > ";: 0 .. Q> Q> ~ is'" .l: U .E ...iii !t ~ ~ ~ ~ ::; ~ ~T ;; ~ Logic Diagrams D-53 :li , 'i' i5~g \t:t ~ ~~~z_ , iii ~ :; :; Ii: § "' !i!'j' 'j' ~ N N N N"".., ........ ""r-"'" ~ ;;;:CC;(:;;;:CCC 0-54 Logic Diagrams ~ - - '"' oM..., .... ..,.., ~ -- ~ . iii ~ . r ~ !:;' ~ ~ ~L I" i' I I - Logic Diagrams 0-55 ~ ! i:l ~ 'i'~ • ~ =C a;:rw (Q ....o M .... CD CD s:. . !!! CD 1i ca "'C «CD > ''::: o ~ o'" "'C CD >< u::: D-56 Logic Diagrams ~DEL DATA :cLiMTvCO +lRl RD DATA ,.. WINDOW CLOCK ,.. +ENI8LEIIRZDITA -IBZelOCIL 10 MHZ CRYSTll_ 5. 6 +IIFMWRD n:f -MFIWfIO 12·14 3 .... - WUM ~ +MFMWRI 1l~4f~ -MRMWHI 13 WR~IJ2a.liB04 I -f1 .... OQ (") 2 111117 08 TERM 14 2 'NCREASE PRECDMP ~x_2a.13 J'Jl BID PlI8 o 06 TERM R.. '.4A1.lo. 11.".1~"18.20 ~. -INCREASE PRECOMP II' -T1mmI1 a rn RII I' +5V oI Fixed Disk Drive Adapter (Sheet 4 of 6) U\ ....:I (I x!pu;)ddv ~o-~----::~,,'!;.,-t-, ~,--_.t~ 'li ~:; ":s 'j' ... ....a- ~ m ~ ~ > ';: C ~ '" C "C ~ )( u::: 0-58 Logic Diagrams "l3 I ~ I' i g oj ; :0 fii '7 i '\' i . !i: = iii ~ :;i Ii: = Logic Diagrams D-59 - M ...... 0 QI QI .c ~ ... QI Q. > I- QI > ";;: , ~ !O ~ C ..l<: en i:5 :! "tI ~ QI .. "'" c )( u::: ~ 3 ;:; ! §" +~@-i D-60 Logic Diagrams -STEP ....,......'I-..1JI!-i.D-.Il -utRECTIOI ..,'-~WoINU "1 lATA -WRITE snE .....'-~.j!.I.1>-11 -RO DATA ~IIIII f' It -!If'111111 ~ I~ b (JQ "3" M 5G 41 C22 m ~11I\\ ;. o if _ ...U1 EIA "'''k' .. J~~". ~ "'t ~_,i! 1,-;. -- 6 1511 W-...'A£'IVITYLEI 8 rn L..=-r--=.J CTIVlTYL£D o, - 0'\ (J X!pU;}ddV Fixed Disk Drive - Type 1 (Sheet 2 of 3) :E :E ~~! ~~! M '0 ... M Q) Q) .c !!? Q) .~ C .:.: i5'" "C Q) .~ u.. 0-62 Logic Diagrams (I) iii!! "'!! > ";: o iii ~ is'" ""C (I) ~~ if ~~ )( . 5 u: Logic Diagrams D-63 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ I f ~ ~ ~ i ~ ~2 ~~ - ( \') ....0 ... N CD CD ..c: en N CD Q. ~ CD > ";:: 0 ..:r:: is'" ~ "tI CD )( S u:: ~ , ii 3 S ~ ~ iii ; ~ ~; ~ ~ ~ ~ ~ • ~ . . ~ ~ 0: ~~I'P, ;;:;;:;;:;;: 0: 0: !It:; ~ " . D-64 Logic Diagrams Jlo-12' ,"X JI~14) 1-\ I~ b .... (JQ (') o ~. '"I ~ -I WRITE (JIG-a 3 {Il ~111?' t;' 0"1 -ov UJ Fixed Disk Drive - Type 2 (Sheet 3 of 3) (I X!pU~ddV '" ;:;:;~ '"~ '"~ ~ ~~ ~ 8~ § I~ '" 1l ~ ;! = = M (':C~:1 ~~~ ....'0.... ..;:,.:c:.::.: lii :! ~ :;:;;;ll:J a --- - NE~ ~ -- II) II) ell .r: ~:: U~~ ~-~~ ~ III III 1 ~- - 1il ca Co )( ..o "c~u ~ W :::C;c c c c " c~u" .£l~ ;; >- - -Nfl" =~'~I ~ ~t~ _ N~ _N ~~ ~~ ~ ~ E !I-- ,0 " N ~ ~ ~= ,0 II) ~ - ~~ -- o ~ ~ it N M 1l " - - ~ ~ ~ " ..,00= ..... = :Cc:Cc:C :c I!'" i ;:, ... '" '" ~----~ ~ " D-66 Logic Diagrams ;= '" ~ ~ if ....M0 ... N CD CD .= ~ c: 0 '';::; Q. 0 c: 0 'w c: ca Q. )( W . > 0 E CD 2: ~ N M Logic Diagrams 0-67 - ( II) OS (II) ~ II) ..c ~ c:: .lo:J39D3DIIV::J o "~ Ii i3 II o c:: o 1i...Jr~p- !! ";;; c:: I'CI 0- i'Hf-~1- ii X W rHI- ~I->fl ~ o E !HI- ~I- i'i II) :!: ~ G...Jf- ~I-il N Ig u (II) IN u i " " ."" u " u c " ." r; u " " ~ u " "" " !! !l rl 18 u " " • "•G f-lhii ~ ~ ~ D-68 Logic Diagrams iN" N' ------------------------.~ ~ ~ " ~4~ ~ I!iI:c~~ c &l;;~J !Z! ill •==.0:: = M == - - '0 -- - - NQ,~ I' = = ~ d gl gIg ~ ....... -- =Q -N .~ Q) Q) .c: en c ! ~ ~ c 5 o - :;!-~ '~ " o c - '-- o '---- 'r;; c !. - II: - N :o! ~ -- = >< w . il~ :; c=u ,,1~1!';j I =~ ~ i!! !:l ;!',p, ~ ~ > ~ = ~>~~~~~~ l~c::~~I:1 _N N ;!. ~ o ~ E ~L" -.=, -11~r Q) _eo.. .... ...,. >-- = _T~ = -- c T :2: ~ ~ :I~:.\ :.\= ,~\~\ ~I :2~!!~ - -- = $- II· ;!~ i1L~ ::c::c;;;;::c c ~ I' If, § - :!~ II - ~ ccccoC '"~--!'" c ::~ ! '"~ Ii '" ~ Logic Diagrams D-69 .. ail i=i= I~- =~ I ! 1 L ~ ;;: ~ ~I ~ ~ a: C"'~CI"'''''CD'''' ~~ :;,- :; ~ ~ :::is> :::i=- ;0" ~ =" \!! ~ ~ c c " - I~ ~W--=i: ~ ;; .,J. ~ ::! ~ M N = ~~~ ~ .... 0 ~:"gllO L.. N ....QI = QI .r::. ~!i,":C!:!l:!:::,.$ ~~!l~1i_!l ~~,""!:!l:!:::""1: ~ t: .'~ ~llt M 0 ~ '~ -N 0 t: 0 'iii ~ t: CIS 0. ~ L- X W ~ ~~ a;>:! ~ i!! SOl :s~ '.081!< SM09- Q Ii! N g; ~ .... ...--- .,.'.~ ~I~_G ~~ ~ ~L- G E QI 2: ~ ...>0 IE so ~ ;Z 12- G~Q ~~- ~~ i= SMOl 1=- ~'f- L-- ~'t ~ ~~ GI -!'~~~I ~ i} = JILLlIIJ ;: Jill;: :!C'J ~C~ iG~ ~~ ~N ~!g~(§) ~G I~.... ~ ~ :;~ J G;:i!!i;:!l I::i' I' ;!!",:O;:i!!i;:!l I::1' I'_ § ~ ~l'~ rl"I"I!'rrlr~ ~~~~ 11T1=1~1"'1~" 111i=IS!I1it-41' TITTTTI 111111 g"g: S;!:!l i!l~ l!il lill 13 D-70 Logic Diagrams M i5 M tQ) .l: ~ I: I ..o~ 1901 0"" o 'E- o I: o ; ~ f-+~ ~ I-" 'fij I: (II 0- il~l-rH- !l X W ~~H"H-ii > ~ o E !'i ~I-f-i I- fi Q) :i!: ~ ;;~I-f-il- " ~ I~ "~H-H-,, 1l~I-~f--i:i ~~f---~f--I:; 1!~I-~f-- ~ 1l~f---f-i f-- rl il~h~r. i'l Logic Diagrams D-71 N ~ . ~ ;;; ~ ;;; i NN ~~ ;;; i '"i! N ~ N i I~ e Is 15~ ill ~ i Ii I~ I~ - = - oo::r o - 0-72 Logic Diagrams ~I ........ o N ....QI QI ~ ~ c o "~ o c o "iii c ~ x w . > o E QI :2 I ,,~ '-t--+-t-+--+-t-+--t-' ~ cg Lt'l :! ~ N ....... C! Logic Diagrams D-73 ;;: - Ei S ;; :g - Ii! a E; :g 8 " Ei :;: ;; III E; o::r o L ~ M t) CI) ~ ..c - - I ~ ~ I !!i ~ ;:; I I ;; II - ;:; I I c o "~ ~ - I ii = ;:; I q o !! ~ l!: ;:; . ;:; I I L ;; ;; ;:; ;:; I I c o "in 1i! ~ ;:; I = ;:; I :1; ~ . I 1l 1l ;:; cca Co ~~ I ~~ I )( aa "I aa~ W ;~=:C:r!~~~~.I; 1~1!!"::!:1::!::/::/c~ ~ o ·~~rm 17 E CI) :E ~ co In ;sS: -- N o::r co rllll "I " II " 0-74 Logic Diagrams if f-lh ~I- f-lt-!. >-il- f"11- >-il- ~I- >-il- ~I- >-il- f"11- >-il- f"11- >-il- f-ll- '"11- ~I- >-il- ~I- >-il- ~I- ~ I-- ;' ~!c! < < < ~ < !! !Ii iii - !! iii ~ if iii 1!ii!I ;;! Ii if !! ii - :=1 ~~ G>-i~ ~~ '"11- f"11- '"11- ~I- '"1t- ~I- '"11- ~I- >-il- ~I- >-it- ~I- >-il- ~I- >-il- ~I- >-il- f"11- ~I- PlI- Logic Diagrams D-75 UL" 1, , .J - - .- .... CI) CI) .c ~ r------' I 1 i i: ~~";:"~+-,t+-i ~ I ~ ~I 't' ~l _______....J - ( !:i ~~ ~55! ,,!:i!'J 515 ~ ~ ~~::~~:c:! :l1 ) :l1 ~~~~ :; ;~:c ~~ I.. 6:g:g;ga ll/e lii I~ D-76 Logic Diagrams ..." BROUla BI -110 CflA.IUCHECK "RElET DR' 82 182 +DATA8IT 7 IAIII+DATAIITO Z¥18 83 1A81 + OAfA BIT I 3 11 EI +&VDC .DATA BIT I ...H. :~~:::~:::g +IRU2 +DATA liT 5 ItO DECODE FOR PROTOTYPE CARD B5 A6 4 18 E3 -5Voe .DATA BIT 4 AI AI A7 AI A5 A4 AI A2 AI AU 111 AI 115)" DATABIT4 6 15 E4 -ORO 2 .t 0-78 Logic Diagrams - N ..- .......o Q) Q) .c en ...... Q) Co ca ~ '"o ~ "+:0 ca u "c::J E E 8 . :e. • '" ::J o E ~ .c u ~ > en ...> ca ~ as Logic Diagrams D- 79 H~, Jl"'~~, '_" ........ .., !l~~S a~ ~ _N I .. " Ii. ~(~ -' ! _ " ..., _N ~ ---,,_... CD : ..... ~" ~ I ~'"i ~U J- ~ ~ C ~ =eA~ _N~ I-I¢"Li I~~ ~J.1tr"Lr I ,J r- ~~~~~~ ~"H ~~~~~ ~_o ~ ~ ~ ~ ~'f 8~;'-"·.'!':"lN'~ z= ~z 41' --, N ~Q ~ ,- ~~~ 2~ ~ ~~ I ~ r-- .-- "~il;jil"B ~ ~ N ~ r;::===.- -:= t~-=. t::=::::t':" r " ffi iE d ~ ~ --=r:;1 L ro::~~ 0 ~~ ~~ ~: ~~I~ -r'-" ~ , c'" fl "!l;:<,g8sl~I;;~,.;j~ ~IE~~ ~ ~ "'''' o ~ ;;f §~t~~1 ,§.;; '0=; § ~~I~ -~ ~~~~~~~g~ 'TqYTI I B 'c::J ~I~lri~- ~ ~~- ~ ~~ -~ lIT ,,~}j~ ~I E E lt5t!l~~~ ~ <:<;~Ci ~e~ 8 Zzzz '" ::J o N ~~~~ N N ::; .. ::> ....... ..,r-_..,_ _ a.. C o... j ~~~ ,,~~ ~~~ ~ .c c,) c ~,,1"~1E~~~~~ :ti ~ co ~ E ~ c g ~ ;;; iii ""'" ....... =~~;g~:gCi~:;:~I2I~~~~ ~ TIl N "~1 ~;I~ ~1;1;;1l'l -------------+1+++----+-f--- r"" cLK-+-'lJ!illr---~+lllJ!!U--'--4--tHm SOLC Communications Adapter (Sheet 2 of 2) D-82 Logic Diagrams lA-'. ! 3 ,PI 1 +5V #Jj~~I~~-~~t~~tt==t=ttIW'~-'-~~JI' -U p.. -'-~;I" !-=~~~~~F=fipi---·~7,,~ ~. __ flAAlS 7 JI4 ::= r+-----+----+-++-l!H f-1L~ ." '-1++------+---+----++------, ~+SV --.!l.-- 3 AATESU 6 Jl23 m~"---m*l'"k=±=tM r :' ~ ~:\' I ;~ "API ~;---~ A 3 ~7J RU:TB 7 JIll 3 TEST B ~~~~~/= g) ~:: '; =- = :: ~ ~::I"-+-_++_+...J L+----+---t--++-;t1,~,-- f!- 1 \= :: tLu.L L: ~ PCO~~~~~~~~========~--_t~ ~I~I~~~lInET PAD PC2 PAl PC3 PCI Pl.! PC4 .'----l PU PC5 r----1 ~:: ~~~ ~~~ U9 ===- r-_ _ _ _ _-+r::-::-I'....": L_!2J JI·18 ¥SIGNALGRDUIP J17 SOLC Communications Adapter (Sheet 2 of 2) Logic Diagrams D-83 Notes: D-84 Logic Diagrams APPENDIX E: SPECIFICATIONS System Unit Size: Length--19.6 in (500 mm) Depth--16.1 in (410 mm) Height--5.5 in (142 mm) Weight: 32 lb (14.5 kb) Power Cables: Length--6 ft (1. 83m) Size--18 AWG Environment: Air Temperature System ON, 60° to 90° F (15.6° to 32.2° C) System OFF, 50° to 110° F (l0° to 43° C) Humidity System ON, 8% to 80% System OFF, 20% to 80% Heat Output: 717 BTU/hr Noise Level: 49.5 dB(a) (System unit with monochrome display and expansion unit attached.) Electrical: Nominal--120 Vac Minimum--104 Vac Maximum--127 Vac Keyboard Size: Length--19.6 in (500 mm) Depth--7.87 in (200 mm) Height--2.2 in (57 mm) Weight: 6.5 lb (2.9 kg) Specifications E·l Color Display Size: Length--1S.4 in (392 mm) Depth--1S.6 in (407 mm) Height--11. 7 in (297 mm) Weight: 26 lb (11.8 kg) Heat Output: 240 BTU/hr Power Cables: Length--6 ft (1.83 m) Size--18 AWG Signal Cable: Length--S ft (1.5 m) Size--22 A WG Expansion Unit Size: Length--19.6 in (SOO mm) Depth--16.1 in (410 mm) Height--S.S in (142 mm) Weight: 33 lb (14.9 kg) Power Cables: Length--6 ft (1. 83m) Size--18 AWG Signal Cable: Length--3.28 ft (1 m) Size--22 A WG Environment: Air Temperature System ON, 60° to 90° F (15.6° to 32.2° C) System OFF, 50° to 110° F (10° to 43° C) Humidity System ON, 8% to 80% System OFF, 20% to 80% Heat Output: 717 BTU/hr Electrical: Nominal--120 Vac Minimum--104 Vac Maximum--127 Vac E-2 Specifications Monochrome Display Size: Length--14.9 in (380 mm) Depth--13.7 in (350 mm) Height--11 in (280 mm) Weight: 17.3 lb (7.9 kg) Heat Output: 325 BTU/hr Power Cable: Length--3 ft (.914 m) Size--18 AWG Signal Cable: Length--4 ft (1.22 m) Size--22 A WG 80 CPS Printers Size: Length--15.7 in (400 mm) Depth--14.5 in (370 mm) Height--4.3 in (110 mm) Weight: 12.91b (5.9 kg) Power Cable: Length--6 ft (1.83 mm) Size--18 A WG Signal Cable: Length--6 ft (1.83 m) Size--22 A WG Heat Output: 341 BTU/hr (maximum) Electrical: Nominal--120 Vac Minimum--104 Vac Maximum--127 Vac Specifications E-3 t'fj ;.. CIl I Front View (Component Side) - 11 I 8 ) j ("') aCIl "0 (I) ~ Lac. Hole Loc. Hole ;;1- "0 (I) (') (') 0.125 ± .002 (3.175 ± .05) S 0.125 ± .002 (3.175 ± .OS) ))- I 5 .\ (') (') ~ .... Mounting Holes ~ iD a; o· Jur o ::1 '" I '''"'''" " ""' "" . It> ~ ~ . (; c:. '"0 '" ::1 '" ~ IsPosition on Back (Pm Side) 631 J loc Holes Copper Pad (To Ground) ~ __ !:::. o t') 0 ~ . - ~ M 0 o I -...I D X!pUJddV o I 00 til ~ .... ..... (') 320K Total Memory =-" 64K + (256K on System Board) til CD :::: 5' (JC/ r:I> 64/256K Option 64K Option 32K Option Card Switches Card Switches Card Switches 1 - 64/256K option with 64K installed u~Q~~~QQQI 1 - 64K option I~~Q~~~~~~ I 2 - 32K options I~~Q~~~~~~ I 1~~Q~~Q~~~J 352K Total Memory 96K + (256K on System Board) 64/256K Option 64K Option 32K Option Card Switches Card Switches Card Switches l~~Q~~~QQQ J I~~Q~Q~~~~ I 1 - 64/256K option with 64K installed 1 - 32K option I;~Q~~~~~~ I r~~Q~Q~~~~ 1 1 - 64K option 1 - 32K option r;~Q~~~~~~ 1 I~~Q~~Q~~~ I til 3 - 32K options :a g' I~~Q~Q~~~~ l t:r' til -s· n> (JQ til 9 Ie D X!pU~ddV o - 384K Total Memory I 128K + (256K on System Board) o tZl ~. ..... 64/256K Option Card Switches 64K Option Card Switches 32K Option Card Switches (") ::r' .I;~Q~~~QQQ I I~~Q~Q~~~~ I 1 - 64/256K option with 64K option installed tZl ~ 1 - 64K option :::: s· (JQ !:Il 2 - 64K options I~~Q~~~~~~ J 1~~Q~Q~~~~ I I~~Q~Q~~~~ I I~~Q~~~QQQ I 1 - 64/256K option with 64K installed 2 - 32K options I~~Q~QQ~~~ I I~~Q~Q~~~~ I 1~~Q~~~~~~ I 1 - 64K option 2 - 32K options I~~Q~QQ~~~ I 1 - 64/256K .option with 128K installed - - - -_._--- I;~Q~~Q~QQ I 4l6K Total Memory lOOK + {256K on System Board) 64/256K Option 64K Option 32K Option Card Switches Card Switches Card Switches I~~QQ~~~~~ 1 - 64/256K option with 64K installed 1 - 64K option 1 - 32K option I;~Q~~~QQQ j I~~Q~Q~~~~ I I~~Q~~~~~~J 2 - 64K options 1 - 32K option I~~QQ~~~~~J r.f.l I~~Q~Q~~~~J ........ ~ I~~Q~~Q~QQ I r~~QQ~~~~~ I (') 1 - 64/256K option with 128K installed ::r 1 - 32K option r.f.l ('t) ~ s· (JQ rIl o ...... I D X!pU;JddV - 9 N Vl 448K Total Memory 192K + (256K on System Boardl 64/256K Option Card Switches 64K Option Card Switches 32K Option Card Switches j .... ~ I ..... n ::r' 1· 64/256K option with 192K installed I~~Q~~QQ~Q I Vl I~~Q~~Q~QQ I I~~QQ~~~~~ I t'D 1 - 64/256K option with 128K installed ::: 1 . 64K option Er I~~Q~Q~~~~J (JQ '" I~~Q~~~QQQ I 1 • 64/256K option with 64K installed 2 . 64K options I~~QQ~~~~~ I I~~ Q ~~~~~~J 3· 64K options I~~Q~Q~~~~I I~~QQ~~~~~ I I~~QQ~~~~~ I I~~ Q~ ~ Q~ Q 1 . 64/256K option with 128 installed 2 . 32K options QJ - - -- I~~QQ~Q~~~ I 480K Total Memory 224K + (256K on System Board) 64/256K Option 64K Option 32K Option Card Switches Card Switches Card Switches I~~Q~~QQ~Q I I~~QQQ~~~~ I 1 • 64/256K option with 192K installed 1 • 32K option 1 - 64/256K option with 128K installed Vl 1 • 64K option 1 - 32K option li~Q~~Q~QQ ) )~~QQ~~~~~ ) I~~QQQ~~~~ I ~ ..... -.-- - - ..... (') ::r' Vl (I) :::: sr (J'Cl (Il o - I ( ,H D X!pU~ddV - 9 .&;:. en 512K Total Memory 256K + (256K on System Boardl ~ ~. 64/256K Option 64K Option 32K Option =- en Card Switches Card Switches Card Switches J I I~~QQ~~~~~ I (1) :::: .... ::: li~Q~~Q~QQ I 1 - 64/256K option with 128K installed Otl 2 - 64K options I~~QQQ~~~~ I (I) I~~Q~~QQ~Q I l~~QQQ~~~~ I 1 - 64/256K option with 192K installed 1 - 64K option I~~QQQ~~~~ I l~~Q~~QQ~QJ 1 - 64/256K option with 192K installed 2 - 32K options I~~QQQQ~~~ I 1 - 64/256K option with 256K installed I~~Q~~QOQ~ I 544K Total Memory 288K + (256K on System Board) 64/256K Option 64K Option 32K Option Card Switches Card Switches Card Switches I 1 - 64/256K option with 192K installed 1 - 64K option 1 - 32K option I~~Q~~QQ~Q I 1~~QQQ~~~~ I I~Q~~~~~~~ I 1~~Q~~QQQ~ J I~Q~~~~~~~J 1 - 64/256K option with 256K installed 1 - 32K option CI) .... ::;; ..... (') =- CI) (II ....::s :::: ~ [Il - C1 VI I D X!pUJddV o -I 0\ Vl 576K Total Memory 320K + 1256K on System Board) ~. ..... 64/256K Option Card Switches 64K Option Card Switches 32K Option Card Switches n ::r I~~QQQ~~~~ I Vl (1) ~ S· 1 - 64/256K option with 192K installed 2 - 64K options I~~Q~~QQ~Q I I~Q~~~~~~~ J (JQ r/l 1 - 64/256K option with 256K installed I~~Q~~QQQ~ I 1 - 64/256K option with 64K installed uQ~~~~QQQJ I~~Q~~QQQ~ I I~Q~~~~~~~ I 1 - 64/256K option with 256K installed 1 - 64K option I~Q~~~~~~~ J 1 - 64/256K option with 256K installed 2 - 32K options I~~Q~~QQQ~ I I~Q~~~Q~~~ I 608 K Total Memory 352K + 1256K on System Board) 64/256K Option 64K Option 32K Option Card Switches Card Switches Card Switches 1 - 64/256K option with 256K installed I~~Q~~QQQ~ I 1 - 64/256K option with 64K installed 1 - 32K option I~Q~~Q~~~~ I I~Q~~~~QQQ I V,l 1 - 64/256K option with 256K installed ~. ..... ~ 1 - 64K option 1 - 32K option I~~Q~~QQQ~ I I~Q~~~~~~~ I I~Q~~O~~~~ I =- V,l f1j s·::=: UQ I;Il - 9 -....I D X!pU;)ddV o -I 00 en 640K Total Memory 384K + (256K on System Board) ~ ~. ::r 64/256K Option 64K Option 32K Option til Card Switches Card Switches Card Switches (I) ;::::: I;~Q~~QQQ~ I 5' (JQ 1 - 64/256K option with 256K installed I;Q~~Q~~~~ I ~ 1 - 64/256K option with 64K installed I;Q~~~~QQQ I 1 - 64K option l;Q~~~~~~~ I l;~Q~~QQQ~J 1 - 64/256K option with 256K installed 2 - 64K options l;Q~~Q~~~~ I 1 - 64/256K option with 256K installed I;~Q~~QQQ~ I 1 - 64/256K option with 128K installed l;Q~~~Q~QQJ ---- - GLOSSARY J.Ls: Microsecond. adapter: An auxiliary system or unit used to extend the operation of another system. address bus: One or more conductors used to carry the binary- coded address from the microprocessor throughout the rest of the system. all points addressable (APA): A mode in which all points on a displayable image can be controlled by the user. alpanumeric (A/N): Pertaining to a character set that contains letters, digits, and usually other characters, such as punctuation marks. Synonymous with alphanumeric. American Standard Code for Information Interchange (ASCII): The standard code, using a coded character set consisting of 7-bit coded characters (8 bits including parity check), used for information interchange among data processing systems, data communication systems and associated equipment. The ASCII set consists of control characters and graphic characters. A/N: Alphanumeric. analog: (1) pertaining to data in the form of continuously variable physical quantities. (2) Contrast with digital. AND: A logic operator having the property that if P is a statement, Q is a statement, R is a statement, ... ,then the AND of P, Q, R, .. .is true if all statements are true, false if any statement is false. APA: All points addressable. ASCII: American Standard Code for Information Interchange. Glossary H-I assembler: A computer program used to assemble. Synonymous with assembly program. asynchronous communications: A communication mode in which each single byte of data is synchronized, usually by the addition of start/stop bits. BASIC: Beginner's all-purpose symbolic instruction code. basic input/output system (BIOS): Provides the device level control of the major I/O devices in a computer system, which provides an operational interface to the system and relieves the programmer from concern over hardware device characteristics. baud: (1) A unit of signaling speed equal to the number of discrete conditions or signal events per second. For example, one baud equals one-half dot cycle per second in Morse code, one bit per second in a train of binary signals, and one 3-bit value per second in a train of signals each of which can assume one of eight different states. (2) In asynchronous transmission, the unit of modulation rate corresponding to one unit of interval per second; that is, if the duration of the unit interval is 20 milliseconds, the modulation rate is 50 baud. BCC: Block-check character. beginner's all-purpose symbolic instruction code (BASIC): A programming language with a small repertoire of commands and a simple syntax, primarily designed for numerical application. binary: (1) Pertaining to a selection, choice, or condition that has two possible values or states. (2) Pertaining to a fixed radix numeration system having a radix of two. binary digit: (1) In binary notation, either of the characters 0 or 1. (2) Synonymous with bit. binary notation: Any notation that uses two different characters, usually the binary digits 0 and 1. binary synchronous communications (BSC): A standardized procedure, using a set of control characters and control character sequences for synchronous transmission of binary-coded data between stations. H-2 Glossary BIOS: Basic input/output system. bit: In binary notation, either of the characters 0 or 1. bits per second (bps): A unit of measurement representing the number of discrete binary digits which can be transmitted by a device in one second. block-check character (BCC): In cyclic redundancy checking, a character that is transmitted by the sender after each message block and is compared with a block-check character computed by the receiver to determine if the transmission was successful. boolean operation: (1) Any operation in which each of the operands and the result take one of two values. (2) An operation that follows the rules of boolean algebra. bootstrap: A technique or device designed to bring itself into a desired state by means of its own action; that is, a machine routine whose first few instructions are sufficient to bring the rest of itself into the computer from an input device. bps: Bits per second. BSC: Binary synchronous communications. buffer: (1) An area of storage that is temporarily reserved for use in performing an input/output operation, into which data is read or from which data is written. Synonymous with I/O area. (2) A portion of storage for temporarily holding input or output data. bus: One or more conductors used for transmitting signals or power. byte: (1) A binary character operated upon as a unit and usually shorter than a computer word. (2) The representation of a character. CAS: Column address strobe. cathode ray tube (CRT): A vacuum tube display in which a beam of electrons can be controlled to form alphanumeric characters or symbols on a luminescent screen, for example by use of a dot matrix. Glossary H-3 cathode ray tube display (CRT display): (1) A device that presents data in visual form by means of controlled electron beams. (2) The data display produced by the device as in (1). CCITT: Comite Consultatif International Telegrafique et Telephonique. central processing unit (CPU): A functional unit that consists of one or more processors and all or part of internal storage. channel: A path along which signals can be sent; for example, data channel or I/O channel. characters per second (cps): A standard unit of measurement for printer output. code: (I) A set of unambiguous rules specifying the manner in which data may be represented in a discrete form. Synonymous with coding scheme. (2) A set of items, such as abbreviations, representing the members of another set. (3) Loosely, one or more computer programs, or part of a computer program. (4) To represent data or a computer program in a symbolic form that can be accepted by a data processor. column address strobe (CAS): A signal that latches the column addresses in a memory chip. Comite Consultatif International Telegrafique et Telephonique (CCITT): Consultative Committee on International Telegraphy and Telephony. computer: A functional unit that can perform substantial computation, including numerous arithmetic operations, or logic operations, without intervention by a human operator during the run. configuration: (1) The arrangement of a computer system or network as defined by the nature, number, and the chief characteristics of its functional units. More specifically, the term configuration may refer to a hardware configuration or a software configuration. (2) The devices and programs that make up a system, subsystem, or network. H-4 Glossary conjunction: (1) The boolean operation whose result has the boolean value 1 if, and only if, each operand has the boolean value 1. (2) Synonymous with AND operation. contiguous: (1) Touching or joining at the edge or boundary. (2) Adjacent. CPS: Characters per second. CPU: Central processing unit. CRC: Cyclic redundancy check. CRT: Cathode ray tube. CRT display: Cathode ray tube display. CTS: Clear to send. Associated with modem control. cyclic redundancy check (CRC): (1) A redundancy check in which the check key is generated by a cyclic algorithm. (2) A system of error checking performed at both the sending and receiving station after a block-check character has been accumulated. cylinder: (1) The set of all tracks with the same nominal distance from the axis about which the disk rotates. (2) The tracks of a disk storage device that can be accessed without repositioning the access mechanism. daisy-chained cable: A type of cable that has two or more connectors attached in series. data: (1) A representation of facts, concepts, or instructions in a formalized manner suitable for communication, interpretation, or processing by humans or automatic means. (2) Any representations, such as characters or analog quantities, to which meaning is, or might be assigned. decoupling capacitor: A capacitor that provides a low- impedance path to ground to prevent common coupling between states of a circuit. Deutsche Industrie Norm (DIN): (1) German Industrial Norm. (2) The committee that sets German dimension standards. Glossary H-5 digit: (1) A graphic character that represents an integer, for example, one of the characters 0 to 9. (2) A symbol that represents one of the non-negative integers smaller than the radix. For example, in decimal notation, a digit is one of the characters from 0 to 9. digital: (1) Pertaining to data in the form of digits. (2) Contrast with analog. DIN: Deutsche Industrie Norm. DIN connector: One of the connectors specified by the DIN standardization committee. DIP: Dual in-line package. direct memory access (D MA): A method of transferring data between main storage and I/O devices that does not require processor intervention. disk: Loosely, a magnetic disk unit. diskette: A thin, flexible magnetic disk and a semi-rigid protective jacket, in which the disk is permanently enclosed. Synonymous with flexible disk. DMA: Direct memory access. DSR: Data set ready. Associated with modem control. DTR: Data terminal ready. Associated with modem control. dual in-line package (DIP): A widely used container for an integrated circuit. DIPs are pins usually in two parallel rows. These pins are spaced 1/10 inch apart and come in different configurations ranging from 14-pin to 40-pin configurations. EBCDIC: Extended binary-coded decimal interchange code. ECC: Error checking and correction. edge connector: A terminal block with a number of contacts attached to the edge of a printed circuit board to facilitate plugging into a foundation circuit. H-6 Glossary EIA: Electronic Industries Association. EIA/CCITT: Electronics Industries Association/Consultative Committee on International Telegraphy and Telephony. end-of-text-character (ETX): A transmission control character used to terminate text. end-of-transmission character (EOT): A transmission control character used to indicate the conclusion of a transmission, which may have included one or more texts and any associated message headings. EOT: End-of-transmission character. EPROM: Erasable programmable read-only memory. erasable programmable read-only memory (EPROM): A storage device whose contents can be changed by electrical means. EPROM information is not destroyed when power is removed. error checking and correction (ECC): The detection and correction of all single-bit, double-bit, and some mUltiple-bit errors. ETX: End-of-text character. extended binary-coded decimal interchange code (EBCDIC): A set of 256 characters, each represented by eight bits. flexible disk: Synonym for diskette. firmware: Memory chips with integrated programs already incorporated on the chip. gate: (1) A device or circuit that has no output until it is triggered into operation by one or more enabling signals, or until an input signal exceeds a predetermined threshold amplitude. (2) A signal that triggers the passage of other signals through a circuit. graphic: A symbol produced by a process such as handwriting, drawing, or printing. Glossary H-7 hertz (Hz): A unit of frequency equal to one cycle per second. hex: Abbreviation for hexadecimal. hexadecimal: Pertaining to a selection, choice, or condition that has 16 possible values or states. These values or states usually contain 10 digits and 6 letters, A through F. Hexadecimal digits are equivalent to a power of 16. high-order position: The leftmost position in a string of characters. Hz: Hertz. interface: A device that alters or converts actual electrical signals between distinct devices, programs, or systems. k: An abbreviation for the prefix kilo; that is, 1,000 in decimal notation. K: When referring to storage capacity, 2 to the tenth power; 1,024 in decimal notation. KB: Kilobyte; 1,024 bytes. kHz: A unit of frequency equal to 1,000 hertz. kilo (k): One thousand. latch: (1) A feedback loop in symmetrical digital circuits used to maintain a state. (2) A simple logic-circuit storage element comprising two gates as a unit. LED: Light-emitting diode. light-emitting diode (LED): A semi-conductor chip that gives off visible or infrared light when activated. low-order position: The rightmost position in a string of characters. m: (1) Milli; one thousand or thousandth part. (2) Meter. H-8 Glossary M: Mega; 1,000,000 in decimal notation. When referring to storage capacity, 2 to the twentieth power; 1,048,576 in decimal notation. rnA: Milliampere. machine language: (1) A language that is used directly by a machine. (2) Another term for computer instruction code. main storage: A storage device in which the access time is effectively independent of the location of the data. MB: Megabyte, 1,048,576 bytes. mega (M): 10 to the sixth power, 1,000,000 in decimal notation. When referring to storage capacity, 2 to the twentieth power, 1,048,576 in decimal notation. megabyte (MB): 1,048,576 bytes. megahertz (MHz): A unit of measure of frequency. 1 megahertz equals 1,000,000 hertz. MFM: Modified frequency modulation. MHz: Megahertz. microprocessor: An integrated circuit that accepts coded instructions for execution; the instructions may be entered, integrated, or stored internally. microsecond (Jls): One-millionth of a second. milli (m): One thousand or one thousandth. milliampere (rnA): One thousandth of an ampere. millisecond (ms): One thousandth of a second. mnemonic: A symbol chosen to assist the human memory; for example, an abbreviation such a "mpy" for "mUltiply." mode: (1) A method of operation; for example, the binary mode, the interpretive mode, the alphanumeric mode. (2) The most frequent value in the statistical sense. Glossary H-9 modem: (Modulator-Demodulator) A device that converts serial (bit by bit) digital signals from a business machine (or data terminal equipment) to analog signals which are suitable for transmission in a telephone network. The inverse function is also performed by the modem on reception of analog signals. modified frequency modulation (MFM): The process of varying the amplitude and frequency of the "write" signal. MFM pertains to the number of bytes of storage that can be stored on the recording media. The number of bytes is twice the number contained in the same unit area of recording media at single density. modulo check: A calculation performed on values entered into a system. This calculation is designed to detect errors. monitor: (1) A device that observes and verifies the operation of a data processing system and indicates any specific departure from the norm. (2) A television type display, such as the IBM Monochrome Display. (3) Software or hardware that observes, supervises, controls, or verifies the operations of a system. ms: Millisecond; one thousandth of a second. multiplexer: A device capable of interleaving the events of two or more activities, or capable of distributing the events of an interleaved sequence to the respective activities. NAND: A logic operator having the property that if P is a statement, Q is a statement, R is a statement, ... ,then the NAND of P ,Q,R, .. .is true if at least one statement is false, false if all statements are true. nanosecond (ns): One-thousandth-millionth of a second. nonconjunction: The dyadic boolean operation the result of which has the boolean value 0 if, and only if, each operand has the boolean value 1. non-return-to-zero inverted (NRZI): A transmission encoding method in which the data terminal equipment changes the signal to the opposite state to send a binary 0 and leaves it in the same state to send a binary 1. H -10 Glossary NOR: A logic operator having the property that if P is a statement, Q is a statement, R is a statement, ... ,then the NOR of P,Q,R, .. .is true if all statements are false, false if at least one statement is true. NOT: A logical operator having the property that if P is a statement, then the NOT of P is true if P is false, false if P is true. NRZI: Non-return-to-zero inverted. ns: Nanosecond; one-thousandth-millionth of a second. operating system: Software that controls the execution of programs; an operating system may provide services such as resource allocation, scheduling, input/output control, and data management. OR: A logic operator having the property that if P is a statement, Q is a statement, R is a statement, ... ,then the OR of P ,Q,R, .. .is true if at least one statement is true, false if all statements are false. output: Pertaining to a device, process, or channel involved in an output process, or to the data or states involved in an output process. output process: (1) The process that consists of the delivery of data from a data processing system, or from any part of it. (2) The return of information from a data processing system to an end user, including the translation of data from a machine language to a language that the end user can understand. overcurrent: A current of higher than specified strength. overvoltage: A voltage of higher than specified value. parallel: (1) Pertaining to the concurrent or simultaneous operation of two or more devices, or to the concurrent performance of two or more activities. (2) Pertaining to the concurrent or simultaneous occurrence of two or more related activities in multiple devices or channels. (3) Pertaining to the simultaneity of two or more processes. (4) Pertaining to the simultaneous processing of the individual parts of a whole, such as the bits of a character and the characters of a word, using separate facilities for the various parts. (5) Contrast with serial. Glossary H-11 PEL: Picture element. personal computer: A small home or business computer that has a processor and keyboard that can be connected to a television or some other monitor. An optional printer is usually available. picture element (PEL): (1) The smallest displayable unit on a display. (2) Synonymous with pixel, PEL. pinout: A diagram of functioning pins on a pinboard. pixel: Picture element. polling: (1) Interrogation of devices for purposes such as to avoid contention, to determine operational status, or to determine readiness to send or receive data. (2) The process whereby stations are invited, one at a time, to transmit. port: An access point for data entry or exit. printed circuit board: A piece of material, usually fiberglass, that contains a layer of conductive material, usually metal. Miniature electronic components on the fiberglass transmit electronic signals through the board by way of the metal layers. program: (1) A series of actions designed to achieve a certain result. (2) A series of instructions telling the computer how to handle a problem or task. (3) To design, write, and test computer programs. programming language: (1) An artificial language established for expressing computer programs. (2) A set of characters and rules, with meanings assigned prior to their use, for writing computer programs. PROM: Programmable read-only memory. propagation delay: The time necessary for a signal to travel from one point on a circuit to another. radix: (1) In a radix numeration system, the positive integer by which the weight of the digit place is multiplied to obtain the weight of the digit place with the next higher weight; for example, in the decimal numeration system, the radix of each digit place is 10. (2) Another term for base. H-12 Glossary radix numeration system: A positional representation system in which the ratio of the weight of anyone digit place to the weight of the digit place with the next lower weight is a positive integer. The permissible values of the character in any digit place range from zero to one less than the radix of the digit place. RAS: Row address strobe. RGBI: Red-green-blue-intensity. read-only memory (ROM): A storage device whose contents cannot be modified, except by a particular user, or when operating under particular conditions; for example, a storage device in which writing is prevented by a lockout. read/write memory: A storage device whose contents can be modified. red-green-blue-intensity (RGBI): The description of a direct- drive color monitor which accepts red, green, blue, and intensity signal inputs. register: (1) A storage device, having a specified storage capacity such as a bit, a byte, or a computer word, and usually intended for a special purpose. (2) On a calculator, a storage device in which specific data is stored. RF modulator: The device used to convert the composite video signal to the antenna level input of a home TV. ROM: Read-only memory. ROM/BIOS: The ROM resident basic input/output system, which provides the device level control of the major I/O devices in the computer system. row address strobe (RAS): A signal that latches the row addresses in a memory chip. RS-232C: The standard set by the EIA for communications between computers and external equipment. RTS: Request to send. Associated with modem control. run: A single continuous performance of a computer program or routine. Glossary H-13 scan line: The use of a cathode beam to test the cathode ray tube of a display used with a personal computer. schematic: The description, usually in diagram form, of the logical and physical structure of an entire data base according to a conceptual model. SDLC: Synchronous Data Link Control. sector: That part of a track or band on a magnetic drum, a magnetic disk, or a disk pack that can be accessed by the magnetic heads in the course of a predetermined rotational displacement of the particular device. serdes: Serializer/deserializer. serial: (1) Pertaining to the sequential performance of two or more activities in a single device. In English, the modifiers serial and parallel usually refer to devices, as opposed to sequential and consecutive, which refer to processes. (2) Pertaining to the sequential or consecutive occurrence of two or more related activities in a single device or channel. (3) Pertaining to the sequential processing of the individual parts of a whole, such as the bits of a character or the characters of a word, using the same facilities for successive parts. (4) Contrast with parallel. sink: A device or circuit into which current drains. software: (1) Computer programs, procedures, rules, and possibly associated documentation concerned with the operation of a data processing system. (2) Contrast with hardware. source: The origin of a signal or electrical energy. source circuit: (1) Generator circuit. (2) Control with sink. SS: Start-stop transmission. start bit: Synonym for start signal. start-of-text character (STX): A transmission control character that precedes a text and may be used to terminate the message heading. H-14 Glossary start signal: (1) A signal to a receiving mechanism to get ready to receive data or perform a function. (2) In a start-stop system, a signal preceding a character or block that prepares the receiving device for the reception of the code elements. Synonymous with start bit. start-stop (SS) transmission: Asynchronous transmission such that a group of signals representing a character is preceded by a start signal and followed by a stop signal. (2) Asynchronous transmission in which a group of bits is preceded by a start bit that prepares the receiving mechanism for the reception and registration of a character and is followed by at least one stop bit that enables the receiving mechanism to come to an idle condition pending the reception of the next character. stop bit: Synonym for stop signal. stop signal: (1) A signal to a receiving mechanism to wait for the next signal. (2) In a start-stop system, a signal following a character or block that prepares the receiving device for the reception of a subsequent character or block. Synonymous with stop bit. strobe: (1) An instrument used to determine the exact speed of circular or cyclic movement. (2) A flashing signal displaying an exact event. STX: Start-of-text character. Synchronous Data Link Control (SLDC): A protocol for the management of data transfer over a data communications link. synchronous transmission: Data transmission in which the sending and receiving devices are operating continuously at the same frequency and are maintained, by means of correction, in a desired phase relationship. text: In ASCII and data communication, a sequence of characters treated as an entity if preceded and terminated by one STX and one ETX transmission control, respectively. Glossary H-IS track: (1) The path or one of the set of paths, parallel to the reference edge on a data medium, associated with a single reading or writing component as the data medium moves past the component. (2) The portion of a moving data medium such as a drum, tape, or disk, that is accessible to a given reading head position. transistor-transistor logic (TTL): A circuit in which the multiple-diode cluster of the diode-transistor logic circuit has been replaced by a multiple-emitter transistor. TIL: Transistor-transistor logic. TX Data: Transmit data. Associated with modem control. External connections of the RS-232C asynchronous communications adapter interface. video: Computer data or graphics displayed on a cathode ray tube, monitor or display. write precompensation: The varying of the timing of the head current from the outer tracks to the inner tracks of the diskette to keep a constant write signal. H-16 Glossary BIBLIOGRAPHY Intel Corporation. The 8086 Family User's Manual This manual introduces the 8086 family of microcomputing components and serves as a reference in system design and implementation. Intel Corporation. 8086/8087/8088 Macro Assembly Reference Manualfor 8088/8085 Based Development System This manual describes the 8086/8087/8088 Macro Assembly Language, and is intended for use by persons who are familiar with assembly language. Intel Corporation. Component Data Catalog This book describes Intel components and their technical specifications. Motorola, Inc. The Complete Microcomputer Data Library. This book describes Motorola components and their technical specificaitons. National Semiconductor Corporation. INS 8250 Asynchronous Communications Element. This book documents physical and operating characteristics of the INS 8250. Bibliography 1-1 Notes: 1-2 Bibliography INDEX A A/N mode (alphanumeric mode) 1-123 AO-AI9 (Address Bits 0 to 19), I/O channel 1-15 adapter card with ROM 2-10 adapter, asynchronous communication 1-215 binary synchronous communication 1-245 color/graphics monitor 1-123 diskette drive 1-151 fixed disk drive 1-179 game control 1-203 monochrome display and printer 1-115 printer 1-113 synchronous data link control 1-265 Address Bits 0 to 19 (AO-AI9), I/O channel 1-15 address bits (asynchronous communication) 1-217 Address Enable (AEN), I/O channel 1-18 Address Latch Enable (ALE), I/O channel 1-15 address map, I/O 1-8 AEN (Address Enable), I/O channel 1-18 ALE (Address Latch Enable), I/O channel 1-15 all points addressable mode 1-129, 1-123 alphanumeric mode, 1-128 high resolution 1-135 low resolution 1-132 alt (keyboard extended code) 2-15 AP A mode (all points addressable mode) 1-124 asynchronous communications adapter, 1-215 adapter address jumper module 1-242 address bits 1-217 block diagram 1-216 connector specifications 1-243 current loop interface 1-219 divisor latch least significant bit 1-229 divisor latch most significant bit 1-230 I/O decode 1-217 INS8250 functional pin description 1-221 INS8250 input signals 1-221 INS8250 input/output signals 1-225 Index J-l INS8250 output signals 1-224 interface descriptions 1-218 interface format jumper module 1-242 interrupt control functions 1-234 interrupt enable register 1-235 interrupt identification register 1-233 interrupts 1-218 line control register 1-227 line status register 1-231 modem control register 1-236 modem status register 1-238 modes of operation 1-216 programmable baud rate generator 1-229 programming considerations 1-226 receiver buffer register 1-240 reset functions 1-226 transmitter holding register 1-241 voltage interchange information 1-220 attributes, character (see character attributes) B BASIC reserved interrupts 2-7 BASIC, DEF SEG 2-8 reserved interrupt 2-7 screen editor keyboard functions 2-20 workspace variables 2-8 baud rate generator 1-231 bell (printer) 1-92 bibliography 1-1 binary synchronous communications adapter, 1-245 8252A programming procedures 1-257 8252A universal synchronous/asynchronous receiver/transmitter 1-241 8253-5 programmable interval timer 1-251 8255A-5 programmable peripheral interface 1-251 block diagram 1-246 command instruction format 1-258 connector information 1-257 data bus buffer 1-247 interface signal information 1-260 interrupt information 1-262 mode instruction definition 1-257 J-2 Index read/write control logic 1-247 receive 1-252 receiver buffer 1-249 receiver control 1-249 status read definition 1-259 transmit 1-251 transmitter buffer 1-248 transmitter control 1-249 typical programming sequence 1-253 BIOS, fixed disk ROM A-84 memory map 2-9 parameter passing 2-3 software interrupt listing 2-4 system ROM A-2 use of 2-2 bisync communications (see binary synchronous communications adapter) block diagram 8252A universal synchronous/asynchronous receiver/transmitter 1-246 8273 SDLC protocol controller 1-267 asynchronous communications adapter 1-215 color/graphics monitor adapter 1-125 coprocessor 1-25 diskette drive adapter 1-151 expansion board 1-71 extender card 1-74 fixed disk drive adapter 1-179 game control adapter 1-203 keyboard interface 1-67 monochrome display adapter 1-114 printer adapter 1-108 prototype card 1-118 receiver card 1-77 speaker drive system 1-20 synchronous data link control adapter 1-265 system 1-2 break (keyboard extended code) 2-14 BSC adapter (see binary synchronous communications) Index J-3 c cable communications adapter 1-285 expansion unit 1-171 printer 1-81 cancel (printer) 1-93 cancel ignore paper end (printer) 1-95 cancel skip perforation (printer) 1-99 caps lock (keyboard extended code) 2-16 card dimensions and specifications E-4 card selected 1-19 CARD SLCTD (card selected), I/O channel 1-19 card, dimensions and specifications E-4 extender 1-74 prototype 1-209 receiver 1-77 carriage return (printer) 1-92 CCITT, F-l standards F-l character attributes color/graphics monitor adapter 1-130 monochrome display adapter 1-130 character codes keyboard 2-11 character set, graphics printer (set 1) 1-10 3 graphics printer (set 2) 1-105 matrix printer 1-101 quick reference C-12 clear printer buffer (printer) 1-100 CLK (system clock), I/O channel 1-16 color display 1-149 operating characteristics 1-150 specifications E-2 color select register 1-141 color/graphics monitor adapter 1-123 6845 register description 1-136 alphanumeric mode 1-127 alphanumeric mode (high-resolution) 1-128 alphanumeric mode (low-resolution) 1-128 block diagram 1-126 character attributes 1-130 color-select register 1-141 composite connector specifications 1-146 J-4 Index connector specifications 1-146 direct-drive connector specifications 1-146 display buffer basic operation 1-127 graphics mode 1-132 graphics mode (high resolution) 1-135 graphics mode (low resolution) 1-132 graphic mode (medium resolution) 1-133 light pen connector specifications 1-147 major components 1-126 memory requirements 1-145 mode control and status register 1-143 mode register summary 1-143 mode select register 1-141 programming considerations 1-137 RF modulator connector specifications 1-147 sequence of events 1-144 status register 1-143 summary of available color 1-135 colors, summary of available 1-137 command status register 0 1-164 command status register 1 1-165 command status register 2 1-166 command status register 3 1-167 command summary, diskette drive adapter 1-151 fixed disk drive adapter 1-179 communications adapter cable 1-285 connector specifications 1-286 communications F-l establishing a link F-3 component diagram, system board 1-13 compressed (printer) 1-93 compressed off (printer) 1-93 connector specifications, asynchronous communications adapter 1-215 binary synchronous communications 1-245 color/graphics monitor adapter 1-147 communications adapter cable 1-286 diskette drive adapter (external) 1-174 diskette drive adapter (internal) 1-1 73 game control adapter 1-203 keyboard interface 1-67 monochrome display adapter 1-115 printer adapter 1-81 synchronous data link control adapter 1-293 Index J-5 connectors, power supply (system unit) 1-21 consideration, programming (see programming considerations) control byte, fixed disk drive adapter 1-186 control codes, printer 1-91 control/read/write logic 1-268 coprocessor, (see math coprocessor) ctrl (keyboard extended code) 2-13 current loop interface 1-219 D DO-D7 (data bits 0 to 7), I/O channel 1-16 DACKO-DACK3 (DMA Acknowledge 0 to 3), I/O channel 1-18 Data Bits 0 to 7 (DO-D7), I/O channel 1-16 data flow, system board 1-6 data register 1-185 data transfer mode register 1-282 DEF SEG (default segment workspace) 2-8 default workspace segment (DEF SEG) 2-8 diagram, block (see block diagram) digital output register 1-153 diskette drive adapter 1-151 adapter input 1-1 71 adapter output 1-170 block diagram 1-152 command status register 0 1-164 command status register 1 1-165 command status register 2 1-166 command status register 3 1-167 command summary 1-158 connector specifications (external) 1-174 connector specifications (internal) 1-173 digital-output register 1-153 DPC registers 1-167 drive A and B interface 1-170 drive constants 1-168 FDC constants 1-168 floppy disk controller 1-154 functional description 1-153 programming considerations 1-156 programming summary 1-167 symbol descriptions 1-156 system I/O channel interface 1-168 J-6 Index diskette drive, 1-175 electrical specifications 1-176 mechanical specifications 1-176 switch settings G-l diskettes 1-177 display adapter type switch settings G-l display, color 1-149 monochrome 1-121 divisor latch, least significant bit 1-229 most significant bit 1-230 DMA Acknowledge 0 to 3 (DACKO-DACK3), I/O channel 1-18 DMA Request 1 to 3 (DRQI-DRQ3), I/O channel 1-18 DOS reserved interrupts 2-7 DOS, keyboard functions 2-20 reserved interrupts 2-7 double strike (printer) 1-96 double strike off (printer) 1-96 double width (printer) 1-93 double width off (printer) 1-93 DPC registers 1-167 DRQI-DRQ3 (DMA Request 1 to 3), I/O channel 1-18 E EIA, F-l standards F-l emphasized (printer) 1-96 emphasized off (printer) 1-96 escape (printer) 1-93 establishing a communications link F-3 expansion board, 1-71 block diagram 1-72 expansion channel 1-73 expansion unit, 1-71 cable 1-71 expansion board 1-71 expansion channel 1-73 extender card 1-74 interface information 1-79 power supply 1-71 receiver card 1-77 specifications E-2 Index J-7 extender card, 1-74 block diagram 1-76 programming considerations 1-75 switch settings G-l F FABS (coprocessor) 1-36 F ADD (coprocessor) 1-36 FBLD (coprocessor) 1-37 FBSTP (coprocessor) 1-37 FCHS (coprocessor) 1-38 FCLEX/FNCLEX (coprocessor) 1-38 FCOM (coprocessor) 1-38 FCOMP (coprocessor) 1-39 FCOMPP (coprocessor) 1-39 FDECSTP (coprocessor) 1-40 FDISI/FNDISI (coprocessor) 1-40 FDIV (coprocessor) 1-41 FDIVR (coprocessor) 1-42 FENI/FNENI (coprocessor) 1-43 FFREE (coprocessor) 1-43 FICOM (coprocessor) 1-43 FICOMP (coprocessor) 1-44 FILD (coprocessor) 1-44 FINCSTP (coprocessor) 1-44 FINIT/FNINIT (coprocessor) 1-45 FIST (coprocessor) 1-46 FISTP (coprocessor) 1-46 fixed disk controller 1-179 fixed disk drive 1-195 fixed disk drive adapter 1-179 block diagram 1-180 command summary 1-187 control byte 1-186 data register 1-185 fixed disk controller 1-179 interface specifications 1-193 programming considerations 1-181 programming summary 1-191 ROM BIOS listing A-84 sense bytes 1-181 status register 1-181 system I/O channel interface 1-192 J-8 Index fixed disk drive, 1-195 electrical specifications 1-196 mechanical specifications 1-196 fixed disk ROM BIOS A-84 FLD (coprocessor) 1-47 FLDCW (coprocessor) 1-47 FLDENV (coprocessor) 1-48 FLDLG2 (coprocessor) 1-48 FLDLN2 (coprocessor) 1-48 FLDL2E (coprocessor) 1-49 FLDL2T (coprocessor) 1-49 FLDPI (coprocessor) 1-49 FLDZ (coprocessor) 1-50 FLDI (coprocessor) 1-50 floppy disk controller 1-154 form feed (printer) 1-92 FMVL 1-51 FNOP 1-52 FPATAN 1-52 FPREM 1-52 FPTAN 1-53 FRNDINT 1-53 FRSTOR 1-53 FSAVE/FNSAVE (coprocessor) 1-54 FSCALE (coprocessor) 1-54 FSQRT (coprocessor) 1-55 FST (coprocessor) 1-55 FSTCW/FNSTCW (coprocessor) 1-56 FSTENV/FNSTENV (coprocessor) 1-56 FSTP (coprocessor) 1-57 FSTSW/FNSTSW (coprocessor) 1-57 FS VB ( coprocessor) 1-58 FSVBR (coprocessor) 1-59 FTST (coprocessor) 1-60 FWAIT (coprocessor) 1-60 FXAM (coprocessor) 1-61 FXCH (coprocessor) 1-62 FXTRACT (coprocessor) 1-62 FYL2X (coprocessor) 1-63 FYL2XPI (coprocessor) 1-63 F2XMl (coprocessor) 1-64 Index J-9 G game control adapter, 1-203 block diagram 1-203 connector specifications 1-208 functional description 1-204 I/O channel description 1-205 interface description 1-206 joy stick schematic diagram 1-207 glossary, H-l graphics mode, 1-123 high resolution 1-124 low resolution 1-123 medium resolution 1-124 H hardware interrupt listing 1-9 home head (printer) 1-95 horizontal tab (printer) 1-92 I I/O address map 1-8 I/O bit map, 8255A 1-10 I/O CH CK (I/O Channel Check), I/O channel 1-17 I/O CH RDY (I/O Channel Ready), I/O channel 1-17 I/O Channel Check (I/O CH CK), I/O channel 1-17 I/O channel interface, diskette drive adapter 1-168 fixed disk drive adapter 1-192 prototype card 1-211 I/O Channel Ready (I/O CH RDY), I/O channel 1-17 I/O channel, 1-14 -I/O Channel Check (I/O CH CK) 1-17 -I/O Read Command (lOR) 1-17 -I/O Write Command (lOW) 1-17 Address Bits 0 to 19 (AO-A19) 1-16 Address Enable (AEN) 1-18 Address Latch Enable (ALE) 1-16 Data Bits 0 to 7 (DO-D7) 1-16 description 1-16 diagram 1-15 DMA Request 1 to 3 (DRQI-DRQ3) 1-18 I/O Channel Ready (I/O CH RDY) 1-17 J-I0 Index Interrupt Request 2 to 7 (lRQ2-IRQ7) 1-17 Memory Read Command (MEMR) 1-18 Memory Write Command (MEMW) 1-18 Oscillator (OSC) 1-16 Reset Drive (RESET DRV) 1-16 System Clock (CLK) 1-16 Terminal Count (T/C) 1-18 I/O Read Command (lOR), I/O channel 1-17 I/O Write Command (lOW), I/O channel 1-17 IBM 10MB Fixed Disk Drive 1-195 IBM 5-1/4" Diskette Drive 1-175 IBM 5-1/4" Diskette Drive Adapter 1-151 IBM 80 CPS Graphics Printer 1-81 IBM 80 CPS Matrix Printer 1-81 IBM 80 CPS Printers 1-81 IBM Asynchronous Communications Adapter 1-215 IBM Binary Synchronous Communications Adapter 1-245 IBM Color Display 1-149 IBM Color/Graphics Monitor Adapter 1-123 IBM Communicatons Adapter Cable 1-295 IBM Fixed Disk Drive Adapter 1-179 IBM Game Control Adapter 1-203 IBM Memory Expansion Options 1-197 IBM Monochrome Display and Printer Adapter 1-113 IBM Monochrome Display 1-121 IBM Personal Computer Math Coprocessor 1-25 IBM Printer Adapter 1-107 IBM Prototype Card 1-209 IBM Synchronous Data Link Controller Adapter 1-265 ignore paper end (printer) 1-94 INS8250, (see National Semiconductor INS8250) Intel 8088 microprocessor, arithmetic B-7 conditional transfer operations B-14 control transfer B-l1 data transfer B-5 hardware interrupt listing 1-8 instruction set index B-18 instruction set matrix B-16 logic B-9 memory segmentation model B-4 operand summary B-3 processor control B-14 register model B-2 Index J-ll second instruction byte summary B-3 segment override prefix B-4 software interrupt listing 2-4 string manipulation B-ll use of segment override B-4 Intel 8253-5 Programmable Interval Timer (see synchronous data link control communications adapter) Intel 8255A Programmable Peripheral Interface I/O bit map 1-10 Intel 8255A-5 Programmable Peripheral Interface (see synchronous data link control communications adapter) Intel 8273 SDLC Protocol Controller (see synchronous data link control communications adapter) block diagram 1-265 interrupt enable register 1-235 interrupt identification register 1-233 interrupt listing, 8088 hardware 1-9 8088 software 2-4 Interrupt Request 2 to 7 (IRQ2-IRQ7), I/O channel 1-17 interrupts, 8088 hardware 1-9 8088 software 2-4 asynchronous communications adapter 1-215 BASIC reserved 2-7 DOS reserved 2-7 special 2-5 lOR (I/O Read Command), I/O channel 1-17 lOW (I/O Write Command), I/O channel 1-17 IRQ2-IRQ7 (Interrupt Request 2 to 7), I/O channel 1-17 J joy stick, positions 1-204 schematic diagram 1-207 jumper module, asynchronous communications adapter 1-242 K keyboard extended codes, alt 2-15 break 2-16 caps lock 2-16 ctrl 2-15 J-12 Index pause 2-17 print screen 2-17 scroll lock 2-16 shift 2-15 shift key priorities 2-16 shift states 2-15 system reset 2-16 keyboard 1-65 BASIC screen editor special functions 2-20 character codes 2-11 commonly used functions 2-18 diagram 1-68 DOS special functions 2-20 encoding 2-11 extended functions 2-14 interface block diagram 1-70 interface connector specifications 1-70 scan codes 1-69 specifications E-l L light pen connector specifications 1-147 line control register 1-227 line feed (printer) 1-92 line status register 1-223 logic diagrams D-l M math coprocessor 1-25 block diagram 1-29 control unit 1-29 control word 1-32 data types 1-26 exception pointers 1-33 FABS 1-36 FADD 1-36 FBLD 1-37 FBSTP 1-37 FCHS 1-38 FCLEX/FNCLEX 1-38 FCOM 1-38 FCOMP 1-39 FCOMPP 1-39 FDECSTP 1-40 Index J-13 FDISIjFNDISI 1-40 FDIV 1-41 FDIVR 1-42 FENI/FNENI 1-43 FFREE 1-43 FICOM 1-43 FICOMP 1-44 FILD 1-44 FINCSTP 1-44 FINIT/FNINIT 1-45 FIST 1-46 FISTP 1-46 FLD 1-47 FLDCW 1-47 FLDENV 1-48 FLDLG2 1-48 FLDLN2 1-48 FLDL2E 1-49 FLDL2T 1-49 FLDPI 1-49 FLDZ 1-50 FLDI 1-50 FMUL 1-51 FNOP 1-52 FPATAN 1-52 FPREM 1-52 FPTAN 1-53 FRNDINT 1-53 FRSTOR 1-53 FSAVE/FNSAVE 1-54 FSCALE 1-54 FSQRT 1-55 FST 1-55 FSTCW/FNSTCW 1-56 FSTENV/FNSTENV 1-56 FSTP 1-57 FSTSW/FNSTSW 1-57 FSUB 1-58 FSUBR 1-59 FTST 1-60 FWAIT 1-60 FXAM 1-61 FXCH 1-62 FXTRACT 1-62 FYL2X 1-63 FYL2XPI 1-63 F2XMl 1-64 J-14 Index hardware interface 1-27 instruction set 1-35 interconnection 1-28 number system 1-34 programming interface 1-26 register stack 1-30 status word 1-31 tag word 1-33 memory expansion options, 1-197 DIP module start address 1-201 memory module description 1-198 memory module pin configuration 1-199 memory option switch settings G-l R/W memory operating characteristics 1-198 switch-configurable start address 1-200 memory locations, reserved 2-8 memory map, BIOS 2-9 system 1-11 Memory Read Command (MEMR), I/O channel 1-18 memory switch settings, G-l extender card G-1 memory options G-l system board G-1 Memory Write Command (MEMW), I/O channel 1-18 (MEMR) Memory Read Command, I/O channel 1-18 (MEMW) Memory Write Command, I/O channel 1-18 microprocessor (see Intel 8088 microprocessor) mode control and status register 1-139 mode select register 1-141 modem control register 1-236 modem status register 1-238 monochrome display 1-121 monochrome display and printer adapter 1-113 monochrome display adapter 1-115 6845 CRT control port 1-118 6845 CRT status port 1-118 block diagram 1-114 character attributes 1-117 connector specifications 1-119 I/O address and bit map 1-117 programming considerations 1-115 monochrome display, 1-121 operating characteristics 1-122 specifications E-3 Index J-15 Motorola 6845 CRT Controller, (see color/graphics monitor adapter) (see monochrome display adapter) N National Semiconductor INS8250 Asynchronous (see asynchronous communications adapter) functional pin description 1-221 input signals 1-221 input/output signals 1-225 output signals 1-224 null (printer) 1-92 o one bit delay mode register 1-283 operating mode register 1-280 OSC (oscillator) 1-16 Oscillator (OSC), I/O channel 1-16 p parameter passing (ROM BIOS) 2-3 pause (keyboard extended code) 2-17 power good signal 1-24 power supply 1-21 connectors 1-23 input requirements 1-22 over-voltage/current protection 1-24 pin assignments 1-23 power good signal 1-24 Vac output 1-22 Vdc output 1-22 print screen (keyboard extended code) 2-17 printer adapter, 1-107 block diagram 1-108 connector specifications 1-111 programming considerations 1-109 printer control codes, 1-91 1I8-inch line feeding 1-94 1920 bit-image graphics mode 1-10 1 480 bit-image graphics mode 1-97 7/72-inch line feeding 1-94 960 bit-image graphics mode 1-99 J-16 Index 960 bit-image graphics mode normal speed 1-100 bell 1-92 cancel 1-93 cancel ignore paper end 1-95 cancel skip perforation 1-99 carriage return 1-92 clear printer buffer 1-100 compressed 1-93 compressed off 1-93 double strike 1-96 double strike off 1-97 double width 1-99, 1-93 double width off 1-93 emphasized 1-96 emphasized off 1-96 escape 1-93 form feed 1-92 home head 1-91 horizontal tab 1-92 ignore paper end 1-94 line feed 1-92 null 1-92 printer deselected 1-93 printer selected 1-93 select character set 1 1-94 select character set 2 1-94 set horizontal tab stops 1-96 set lines per page 1-96 set skip perforation 1-99 set variable line feeding 1-97 set vertical tabs 1-95 starts variable line feeding 1-94 subscript/superscript 1-99 subscript/ superscript off 1-99 underline 1-94 unidirectional printing 1-99 vertical tab 1-92 printer deselected (printer) 1-93 printer selected (printer) 1-93 printer, 1-81 additional specifications 1-83 cable 1-81 connector pin assignment 1-87 control codes 1-91 graphic character set 1 1-103 graphic character set 2 1-105 interface signal descriptions 1-87 Index J-17 matrix character set 1-101 modes 1-90 parallel interface 1-86 parallel interface timing diagram 1-86 specifications 1-82, E-3 switch locations 1-84 switch settings 1-84 processor (see Intel 8088 micrprocessor) programmable baud rate generator 1-229 programming considerations, asynchronous communications adapter 1-226 binary synchronous communications adapter 1-253 color/graphics monitor adapter 1-137 diskette drive adapter 1-151 extender card 1-74 fixed disk drive adapter 1-179 monochrome display adapter 1-115 printer adapter 1-109 receiver card 1-77 SDLC adapter 1-275 prototype card, 1-209 block diagram 1-210 external interface 1-213 I/O channel interface 1-211 layout 1-211 system loading and power limitations 1-213 Q quick reference, character set C-12 R receiver buffer register 1-249 receiver card, 1-77 block diagram 1-78 programming considerations 1-77 J-18 Index register, 6845 description ( color/graphic adapter) 1-13 9 color select (color/ graphic adapter) 1-140 command status 0 (diskette drive adapter) 1-167 command status 1 (diskette drive adapter) 1-168 command status 2 (diskette drive adapter) 1-169 command status 3 (diskette drive adapter) 1-170 data (fixed disk drive adapter) 1-185 data transfer mode (SDLC) 1-272 digital output (diskette drive adapter) 1-153 DPC (diskette drive adapter) 1-167 interrupt enable (asynchronous communications) 1-235 interrupt identification (asynchronous communications) 1-235 line control (asynchronous communications) 1-227 line status (asynchronous communications) 1-231 mode control and status (color/graphics) 1-139 mode select ( color/graphics) 1-141 modem control (asynchronous communications) 1-236 modem status (asynchronous communications) 1-238 one-bit delay mode (SDLC) 1-283 operating mode (SDLC) 1-280 receiver buffer (asynchronous communications) 1-240 serial I/O mode (SDLC) 1-282 status ( color/graphics) 1-143 status (fixed disk drive adapter) 1-181 transmitter holding (asynchronous communications) 1-241 reserved interrupts, BASIC and DOS 2-7 reserved memory locations 2-7 Reset Drive (RESET DRV), I/O channel 1-16 RESET DRV (Reset Drive), I/O channel 1-16 RF modulator connector specifications 1-147 ROM BIOS, 2-2 Fixed Disk A-84 System A-2 ROM, adapter cards with 2-10 RS-232C, interface standards F-2 Index J-19 s scan codes, keyboard 1-65 scroll lock (keyboard extended code) 2-14 SDLC (see synchronous data link control) select character set 1 (printer) 1-94 select character set 2 (printer) 1-94 sense bytes, fixed disk drive adapter 1-181 serial I/O mode register 1-282 set horizontal tab stops (printer) 1-96 set lines per page (printer) 1-96 set skip perforation (printer) 1-99 set variable line feeding (printer) 1-95, 1-97 set vertical tabs (printer) 1-95 shift (keyboard extended code) 2-13 shift key priorities (keyboard code) 2-14 shift states (keyboard extended code) 2-13 software interrupt listing 2-4 speaker connector 1-20 speaker drive system 1-20 speaker interface 1-20 specifications, 80 CPS printers E-3 color display E-2 expansion unit E-2 keyboard E-1 monochrome display E-3 printer 1-82 printer (additional) 1-83 system unit E-1 stack area 2-7 starts variable line feeding (printer) 1-94 status register, 1-137 color/graphics monitor adapter 1-143 fixed disk drive adapter 1-181 synchronous data link control adapter 1-276 subscript/ superscript (printer) 1-99 subscript/ superscript off (printer) 1-99 switch settings, G-l diskette drive G-1 display adapter type G-l extender card G-1 memory options G-1 printer 1-84 J-20 Index system board G-l system board memory G-l synchronous data link control communications adapter, 1-265 8253-5 interval timer control word 1-279 8253-5 progammable interval timer 1-275 8255A-5 port A assignments 1-274 8255A-5 port B assignments 1-274 8255A-5 port C assignments 1-275 8255A-5 programmable peripheral interface 1-274 8273 command phase flow chart 1-286 8273 commands 1-285 8273 control/read/write registers 1-269 8273 data interfaces 1-270 8273 elements of data transfer interface 1-270 8273 mode register commands 1-283 8273 modem control block 1-271 8273 modem control port A 1-271 8273 modem control port B 1-272 8273 modem interface 1-271 8273 protocol controller operations 1-266 8273 protocol controller structure 1-267 8273 register selection 1-268 8273 SDLC protocol controller block diagram 1-257 8273 transmit/receiver timing 1-283 block diagram 1-265 command phase 1-284 connector specifications 1-293 control/read/write logic 1-268 data transfer mode register 1-282 device addresses 1-291 execution phase 1-287 general receive 1-288 initialization/configuration commands 1-280 initializing the SDLC adapter 1-278 interface information 1-292 interrupt information 1-291 one bit delay code register 1-283 operating mode register 1-290 partial byte received codes 1-290 processor interface 1-268 programming considerations 1-275 protocol control module features 1-266 protocol controller operations 1-266 result code summary 1-290 result phase 1-287 Index J-21 selective receive 1-289 serial data timing block 1-273 serial I/O mode register 1-282 status register format 1-276 transmit 1-288 system block diagram 1-2 system board, 1-3 component diagram 1-13 data flow 1-6 R/W memory operating characteristics 1-198 switch settings G-l System Clock (CLK), I/O channel 1-16 system memory map 1-12 system reset (keyboard extended code) 2-16 system ROM BIOS A-2 system unit, 1-3 I/O channel 1-14 I/O channel diagram 1-15 keyboard interface 1-67 power supply 1-21 speaker interface 1-20 specifications E-l system board 1-3 T T/C (Terminal Count), I/O channel 1-19 transmitter holding register 1-241 u underline (printer) 1-94 unidirectional printer (printer) 1-99 J-22 Index v Vac output, system unit 1-22 Vdc output, system unit 1-22 vectors with special meanings 2-5 vertical tab (printer) 1-92 voltage interchange, asynchronous communications adapter 1-215 Numerics 1/8 inch line feeding (printer) 1-94 1920 bit-image graphics mode (printer) 1-100 480 bit-image graphics mode (printer) 1-97 6845, (see color/graphics monitor adapter) (see monochrome display adapter) 7/72 inch line feeding (printer) 1-94 8088, (see Intel 8088 microprocessor) 1-4 8250, (see asynchronous communications adapter) 8253-5, (see synchronous data link control adapter) 8255A 1-10 8255A-5, (see synchronous data link control adapter) 8273, (see synchronous data link control adapter) 960 bit-image graphics mode (printer) 1-99 960 bit-image graphics mode normal speed (printer) 1-100 Index J-23 Notes: J-24 Index ---- ------- - -- - The Personal Computer --_.- ----- --- --- Hardware Library Reader's Comment Form TECHNICAL REFERENCE 1502237 Your comments assist us in improving the usefulness of our publication; they are an important part of the input used for revisions. IBM may use and distribute any of the information you supply in any way it believes appropriate without incurring any obligation whatever. You may, of course, continue to use the information you supply. Please do not use this form for technical questions regarding the IBM Personal Computer or programs for the IBM Personal Computer, or for requests for additional publications; this only delays the response. Instead, direct your inquiries or request to your authorized IBM Personal Computer dealer. Comments: NO POSTAGE NECESSARY 111111 IF MAILEO IN THE UNITED STATES BUSINESS REPLY MAIL FIRST CLASS PERMIT NO. 123 BOCA RATON, FLORIDA 33432 POSTAGE WILL BE PAID BY ADDRESSEE IBM PERSONAL COMPUTER SALES & SERVICE P.O. BOX 1328-C BOCA RATON, FLORIDA 33432 aJa4 PlO:::! l aldelS lOU Op aseald ade.l ---- --- ----- --- -- The Personal Computer ----- --_.- --- Hardware Library Reader's Comment Form TECHNICAL REFERENCE 1502237 Your comments assist us in improving the usefulness of our publication; they are an important part of the input used for revisions. IBM may use and distribute any of the information you supply in any way it believes appropriate without incurring any obligation whatever. You may, of course, continue to use the information you supply. Please do not use this form for technical questions regarding the IBM Personal Computer or programs for the IBM Personal Computer, or for requests for additional pUblications; this only delays the response. Instead, direct your inquiries or request to your authorized IBM Personal Computer dealer. Comments: NO POSTAGE NECESSARY 111111 IF MAILED IN THE UNITED STATES BUSINESS REPLY MAIL FIRST CLASS PERMIT NO. 123 BOCA RATON, FLORIDA 33432 POSTAGE WILL BE PAID BY ADDRESSEE IBM PERSONAL COMPUTER SALES & SERVICE P.O. BOX 1328-C BOCA RATON, FLORIDA 33432 aJa4 PIO:::! aldelS lOU op aseald ade.l ---- ----- --- ------ - - --- ---- --- - -- - ® International Business Machines Corporation P.O. Box 1328-W Boca Raton, Florida 33432 1502237 Printed in United States of America