technical reference options and adapters volume 2 4of5

Upload: kgrhoads

Post on 05-Apr-2018

232 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/2/2019 Technical Reference Options and Adapters Volume 2 4of5

    1/124

    - - - -- - - -- - ------ - - -- - -------- - - , - Personal ComputerHardware ReferenceLibrary

    IBM Personal Computer20MB Fixed DiskDrive Adapter

    6139790 March 17, 1986

  • 8/2/2019 Technical Reference Options and Adapters Volume 2 4of5

    2/124

    Notes:

  • 8/2/2019 Technical Reference Options and Adapters Volume 2 4of5

    3/124

    Contents

    Description ..................................... 1Fixed Disk Controller .......................... 1Programming Considerations ....................... 3Types of Drives ............................... 3Status Register ............................... 4Sense Bytes .................................. 4Data Register ................................ 7Programming Summary ........................ 14Interface ...................................... 15Connectors ............... ;.................... 17Logic Diagrams ................................. 19

    BIOS Listing ................................... 23Index. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Index-l

    March 17, 1986 v

  • 8/2/2019 Technical Reference Options and Adapters Volume 2 4of5

    4/124

    Notes:

    vi March 17, 1986

  • 8/2/2019 Technical Reference Options and Adapters Volume 2 4of5

    5/124

    DescriptionThe 20MB Fixed Disk Drive Adapter attaches to one or two fixeddisk drive units through an internal, daisy-chained, flat cable(datalcontrol cable).The adapter is buffered on the 110 bus and uses the systemboard's direct memory access (DMA) for fixed-disk-drive datatransfers. When the adapter is enabled, an interrupt requestoccurs on the IRQ-5 line to the 8259A Interrupt Controller. The8259A then causes an interrupt hex OD.The Fixed Disk Drive Adapter provides automatic 11-bit bursterror detection and correction in the form of 32-bit errorchecking and correction (ECC).The device level control for the Fixed Disk Adapter is containedon a ROM module on the adapter. A listing of this device levelcontrol can be found in "BIOS Listing" of this section.Warning: The last cylinder on the fixed disk drive is reserved fordiagnostic use. The diagnostic write test will destroy any data onthis cylinder.

    Fixed Disk ControllerThe disk controller has three registers that may be accessed by thesystem unit's microprocessor: a status register, a data register, anda read-option-jumpers register. The 8-bit status register containsthe status information of the disk controller, and can be accessedat any time. This register is read-only and is used to help thetransfer of data between the system unit's microprocessor and thedisk controller. The 8-bit data register (actually consisting ofseveral registers in a stack with only one register presented to thedata bus) stores data, commands, and parameters, and providesthe disk controller's status information. Data bytes are read from,or written to the data register in order to program or obtain theresults after a particular command. The controller-select pulse isgenerated by writing to port address hex 322.

    March 17, 1986 20MB Fixed Disk Drive Adapter 1

  • 8/2/2019 Technical Reference Options and Adapters Volume 2 4of5

    6/124

    The following is a block diagram of the IBM 20MB Fixed DiskDrive Adapter.

    EdgeConnector

    Control

    liDInterface

    )Data Bus

    DB7-DBO

    8-BitProcessor

    Serial izerlDeserializer

    SERDESECC

    --

    220MB Fixed Disk Drive Adapter

    liDInterface

    Sector Buffer

    J2

    J3

    March 17,1986

  • 8/2/2019 Technical Reference Options and Adapters Volume 2 4of5

    7/124

    Programming ConsiderationsTypes of DrivesThe fixed disk drive adapter will accommodate any two of fourdifferent types of drives. The figure below shows theconfiguration of the different type drives.

    Start of LandingType Cylinders Heads Write Pre-Camp Zone1 306 4 a 3062 615 4 300 615

    13 306 8 128 33616 612 4 a 663

    Fixed Disk TypesThe figure below shows the switch settings for the abovementioned drive types. Switches 1 and 2 set the parameters ofDrive 0, and switches 3 and 4 set Drive 1.

    Drive a Drive 1Switch Switch1 2 3 4

    Type 1 On On On OnType 2 Off On Off OnType 13 Off Off on OffType 16 On Off On Off

    March 17, 1986 20MB Fixed Disk Drive Adapter 3

  • 8/2/2019 Technical Reference Options and Adapters Volume 2 4of5

    8/124

    Status RegisterAt the end of all commands from the system board, the diskcontroller sends a completion status byte to the system board.This byte informs the system unit's microprocessor if an erroroccurred during the execution of the command. The followingshows the format of this byte.

    I B it I : I : I : I : I : I : I : I: I

    Bit 5

    Bit 1

    Bits 7, 6, 4, 3, 2, 0

    This bit shows the logical unit numberof the drive.When set, this bit shows an error hasoccurred during command execution.These bits are set to zero.

    I f the interrupts are enabled, the controller sends an interruptwhen it is ready to transfer the status byte. Busy from the diskcontroller is unasserted when the byte is transferred to completethe command.

    Sense BytesI f the status register receives an error (bit 1 set), the diskcontroller requests four bytes of sense data. The format for thefour bytes is as follows:

    Bits 7 6 5 4 3 2 1 0Byte 0 Address I 0 I Error Type I Error CodeVa 1 i dByte 1 0 0 d Head NumberByte 2 Cy 1 inder High Sector NumberByte 3 Cylinder Low

    Remarks: d = drive

    420MB Fixed Disk Drive Adapter March 17, 1986

  • 8/2/2019 Technical Reference Options and Adapters Volume 2 4of5

    9/124

    Disk Controller Error TablesThe following disk controller error tables list the error types anderror codes found in byte O.

    The address-valid bit (bit 7) is only set when the previouscommand required a disk address. Bit 6 is set to 0 (spare).Error Error CodeType

    Bits 5 4 3 2 I 0 Description0 0 0 0 0 0 The controller did not detect any errorduring the execution of the previousoperation.0 0 0 0 0 I The controller did not detect an index signalfrom the drive.0 0 0 0 I 0 The controller did not get a seek-completesignal from the drive af ter a seek operation(for al l non-buffered step seeks).0 0 0 0 I I The controller detected a write fault fromthe drive during the last operation.0 0 0 I 0 0 After the contro 11 er selected the drive, thedrive did not respond with a ready signal.0 0 0 I 0 I Not Used.0 0 0 1 I 0 After stepping the maximum number of cylinders,the contro 11 er did not receive the track 00signal from the drive.0 0 0 I I I Not Used.0 0 I 0 0 0 The drive is st i l l seeking. This status isreported by the test Drive Ready command foran overlap seek condition when the drive hadnot completed the seek. No time-out is measuredby the contro 11 er for the seek to complete.

    March 17, 1986 20MB Fixed Disk Drive Adapter 5

  • 8/2/2019 Technical Reference Options and Adapters Volume 2 4of5

    10/124

    Error Error CodeTypeBits 5 4 3 2 1 0 Description

    0 1 0 0 0 0 ID Read Error: The controller detected anECC error in the target ID f ield on th e disk.

    0 1 0 0 0 1 Data Error: The controller detected anuncorrectable ECC error in the target sectorduring a read operation.0 1 0 0 1 0 Address Mark: The controller did not detectthe 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 contro l ler found thecorrect cy l inder and head, bu t no t thetarget sector.0 1 0 1 0 1 Seek Error: The cyl inder or head address

    (either or both) did not compare with th eexpected target address as a resultof a seek.0 1 0 1 1 0 Not Used.0 1 0 1 1 I Not Used.0 1 1 0 0 0 Correctable Data Error: The controllerdetected a correctable ECC error in th etarget f ie ld .0 1 I 0 0 1 Bad Track: The controller detected a bad

    track flag during the last operation. Noret r ies are attempted on this error.

    Error Error CodeTypeBits 5 4 3 2 I 0 Description

    1 o 0 0 0 0 1nva lid Command: The controller hadreceived an i nva lid command from thesystem unit .I o 0 0 0 1 Illega I Disk Address: The controller detectedan address that is beyond themaximum range.

    6 20MB Fixed Disk Drive Adapter March 17,1986

  • 8/2/2019 Technical Reference Options and Adapters Volume 2 4of5

    11/124

    Error Error CodeTypeBits 5 4 3 2 1 0 Description

    1 1 0 0 0 0 RAM Error: the controller detected a dataerror during the RAM sector-bufferdiagnostic tes t .

    1 1 0 0 0 1 Program Memory Checksum Error: Duringthis internal diagnostic t es t , the contro llerdetected a program-memory checksum error.1 1 0 0 1 0 ECC Polynomial Error: During thecontro l ler ' s i nterna 1 diagnostic te s t s , thehardware ECC generator fa i led its tes t .

    Data RegisterThe system unit's microprocessor specifies the operation bysending the 6-byte device control block (DCB) to the controller.The figure below shows the format of the DCB, and defines thebytes that make up the DeB.Bits

    Byte 5Byte 4Byte 3Byte 2Byte 1Byte 0

    Byte 5Byte 4

    Byte 3

    7 6 5 4 3 2 1 0Control Field

    Interleave or Block CountCy 1 inder Low

    Cy 1 inder High I Sector Number0 0 d Head Number

    Command OpcodeClass

    Bits 7 through 0 contain the control field.Bits 7 through 0 specify the interleave or blockcount.Bits 7 through 0 are the eight least-significant bitsof the cylinder number.

    March 17, 1986 20MB Fixed Disk Drive Adapter 7

  • 8/2/2019 Technical Reference Options and Adapters Volume 2 4of5

    12/124

    Byte 2

    Byte 1

    Byte 0

    Bits 7 and 6 are the two most significant bits of thecylinder number. Bits 0 through 5 define the sectornumber.Bit 5 identifies the drive number. Bits 4 through 0contain the disk head number to be selected. Bits 6and 7 are not used.Bits 7, 6, and 5 identify the class of the command.Bits 4 through 0 contain the Opcode (see commandbyte on page 10

    Control ByteByte 5 is the control field of the DeB and allows the user toselect options for several types of disk drives. The format of thisbyte is as follows:

    I s ; t I : I : I : I : I : I : I : I: I

    Bit 7 Disables the four retries by the controller on alldisk-access commands. Set this bit only during theevaluation of the performance of a disk drive.Bit 6 I f set to 0 during read commands, a reread isattempted when an Eee error occurs. I f no error

    occurs during reread, the command will finishwithout an error status. I f this bit is set to 1, noreread is attempted.Bits 5,4,3 Set to O.

    820MB Fixed Disk Drive Adapter March 17, 1986

  • 8/2/2019 Technical Reference Options and Adapters Volume 2 4of5

    13/124

    Bits 2, 1,0 These bits define the type of drive and select thestep option. See the following figure.Bits 2, 1, 0

    0 0 0 This drive is not specified and defaultsto 3 mill i seconds per step.

    0 0 1 N/A0 1 0 N/A0 1 1 N/A1 0 0 200 microseconds per step.1 0 1 70 microseconds per step (specified by BIOS).1 1 0 3 mi 11 iseconds per step.1 1 1 3 mi 11 iseconds per step.

    March 17,1986 20MB Fixed Disk Drive Adapter 9

  • 8/2/2019 Technical Reference Options and Adapters Volume 2 4of5

    14/124

    Command ByteCommand Data Control Block

    Test DriveReady(Class 0,Opcode 00)Recalibrate(Class 0,Opcode 00)

    Reserved(Class 0,Opcode 02)

    BitByte 0Byte 1

    BitByte 0Byte 1Byte 5

    Request Sense Bit

    76543210

    0 0 0 0 0 0 0 0o 0 d x x x x x7 6 5 4 3 2 1 0o 0 0 0 0 0 0 1o 0 d x x x x xrOO 0 0 s s s

    7 6 5 4 3 2 1 0o 0 0 0 0 0 1 1tatus Byte 0(Class 0, ~ - - - - ~ - - - - - - + - - - - - - - - - ~ Opcode 03) Byte 1 o 0 d x x x x x

    Format Drive Bit 7 6 5 4 3 2 1 0(Class 0, Byte 0 o 0 0 0 0 1 0 0Opcode 04) ~ - - - - - + - - - - ~ - - - - - - - - ~

    Ready Verify(Class 0,Opcode 05)

    Byte 1Byte 2Byte 3Byte 4Byte 5BitByte 0Byte 1Byte 2Byte 3Byte 4Byte 5

    o 0 d Head No.ch 10 0 0 0 0 0Cylinder Lowo 0 0 InterleaverOO 0 0 s S 576543210o 0 0 0 0 10 1o 0 d Head No.ch ISector No.Cy I inder Low

    Block Countr a 0 0 0 s s s

    1020MB Fixed Disk Drive Adapter

    Remarksd = drive (0 or 1)x = don't careBytes 2, 3, 4,5, = don't care.d = drive (0 or 1)x = don't carer = re tr iess = Step OptionBytes 2, 3, 4, = don't carech = cy l inder highThis Opcode is not used.d=d r i v e (Oo r l )x = don't careBytes 2, 3, 4,5, = don't care.d = drive (0 or 1)r = retr iess = Step Optionch = cylinder high

    Interleave 1 to 16for 512-byte sectors.d = drive (0 or 1)r = retr iess = Step Optiona = retry option ondata ECCch = cylinder highfor 512-byte sectors.

    March 17, 1986

  • 8/2/2019 Technical Reference Options and Adapters Volume 2 4of5

    15/124

    Command Data Control Block RemarksFormat Track Bit 7 6 5 4 3 2 1 0 d dr i ve (0 or II(Class 0,Opcode 06) Byte 0 0 o 0 o 0 1 1 0 r retr iesByte 1 0 o d Head No. s step option

    Byte 2 ch 10 o 0 0 0 0 ch cylinder highByte 3 Cylinder LowByte 4 o 0 01 Interleave Interleave 1 to 16Byte 5 r 0 0 0 o s s s for 512-byte sectors.

    Format Bad Bit 7 6 5 4 3 2 1 0 d dr ive (0 or 1 )Track(Class 0,Opcode 07) Byte 0 0 0 0 o 0 1 1 1 x don't careByte 1 0 0 d Head No. s Step OptionByte 2 ch 10 o 0 0 0 0 ch cylinder highByte 3 Cylinder LowByte 4 o 0 01 Interleave Interleave 1 to 16Byte 5 r 0 0 0 o s s s for 512-byte sectors .

    Read(Class 0, Bit 7 6 5 4 3 2 1 0 d dr i ve (0 or IIOpcode 08)Byte 0 0 0 0 0 1 0 0 0 r retr iesByte 1 0 0 d Head No. a retry option on

    ch Isector data ECC errorByte 2 No.Byte 3 Cyl inder Low s step optionByte 5 r a 0 0 0 s s s ch cyl inder high

    Reserved(Class 0, This Opcode is not used.Opcode 09)Write(Class 0, Bit 7 6 5' 4 3 2 1 0 d dr ive (0 or IIOpcode OA) Byte 0 0 0 0 0 1 0 1 0 r retr ies

    Byte 1 0 0 d Head No. s step optionByte 2 chlsec tor No. ch cylinder highByte 3 Cy 1 i nder LowByte 4 Block CountByte 5 rOO 0 0 s s s

    March 17, 1986 20MB Fixed Disk Drive Adapter 11

  • 8/2/2019 Technical Reference Options and Adapters Volume 2 4of5

    16/124

    Command Data Control Block RemarksSeek Bit 7 6 5 4 3 2 1 0 d = drive (0 or 1)(Class 0,Opcode OB) Byte 0 0 0 o 0 1 0 1 1 r = retr iesByte 1 0 0 d Head No. s = Step Option

    Byte 2 ch 10 0 0 0 0 0 x = don't careByte 3 Cy I inder LowByte 4 x x x x x x x xByte 5 rOO 0 0 s s s

    In i t i a Ii ze Bit 7 6 5 4 3 2 1 0 Bytes 1, 2, 3, 4, 5, =DriveCharacter- Byte 0 0 0 0 0 1 1 0 0 don't care.ist ics*

    (Class 0,Opcode OC)Read ECC Bit 76543 2 1 0 Bytes 1, 2, 3, 4, 5, =Burst Length(Class 0, Byte 0 o 0 0 0 1 1 0 1 don't care.Opcode 00)Read Data Bit 7 6 5 4 3 2 1 0 Bytes 1, 2, 3, 4, 5, =from SectorBuffer Byte 0 o 0 0 0 1 1 1 0 don't care.(Class 0,Opcode OE)Write Data to Bit 7 6 5 4 3 2 1 0 Bytes 1, 2, 3, 4, 5, =Sector Buffer(Class 0,Opcode OF) Byte 0 o 0 0 0 1 1 1 1 don't care.RAM Bit 7 6 5 4 3 2 1 0 Bytes 1, 2, 3, 4, 5, =Diagnostic(Class 7, Byte 0 1 1 1 o 0 a a a don't care.Opcode 00)Reserved This Opcode is no t used.(Class 7,Opcode 01)Reserved This Opcode is not used.(Class 7,Opcode 02)

    *Initial ize Drive Characteristics: The DBC must be fol lowed by eightadditional bytes.Maximum number of cylindersMaximum number of headsStart reduced write current cy l inderStart write precompensation cylinderMaximum ECC data burst length

    (2 bytes)(1 byte)(2 bytes)(2 bytes)(1 byte)

    1220MB Fixed Disk Drive Adapter March 17, 1986

  • 8/2/2019 Technical Reference Options and Adapters Volume 2 4of5

    17/124

    Command Data Control Block RemarksDr i ve Bit 7 6 5 4 3 2 1 0 d = drive (0 or 1)Diagnostic(Class 7. Byte 0 1 1 1 0 0 0 1 1 r = retr iesOpcode 03) Byte 1 0 0 d x x x x x s = step option

    Byte 2 x x x x x x x x x = don't careByte 3 x x x x x x x xByte 4 x x x x x x x xByte 5 r 0 0 o 0 s s s

    Controller Bit 7 6 5 4 3 2 1 0 Bytes 1. 2. 3. 4.InternalDiagnostics(Class 7. Byte 0 1 1 1 o 0 1 0 0 don't care.Opcode 04)Read Long * Bit 7 6 5 4 3 2 1 0 d = dr i ve (0 or 1)Track(Class 7.Opcode 05) Byte 0 1 1 1 o 0 1 0 1 r = retr iesByte 1 o 0 d Head No. s = step option

    Byte 2 ch I Sector No. ch = cyl inder highByte 3 Cy 1 i nder LowByte 4 Block CountByte 5 rOO 0 0 s s s

    Write Long **(Class 7. Bit 7 6 5 4 3 2 1 0 d = drive (0 or 1)Opcode 06) Byte 0 1 1 1 o 0 1 1 0 s = step optionByte 1 0 0 d Head No. s = step optionByte 2 ch Isector No. ch = cy 1 i nder highByte 3 Cyl inder Low s = step optionByte 4 Block CountByte 5 rOO 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.

    5. =

    March 17, 1986 20MB Fixed Disk Drive Adapter 13

  • 8/2/2019 Technical Reference Options and Adapters Volume 2 4of5

    18/124

    Programming SummaryThe two least-significant bits of the address bus are sent to thesystem board's I/O port decoder, which has two sections. Onesection is enabled by the I/O read signal (-lOR) and the other bythe I/O write signal (-lOW). The result is a total of fourread/write ports assigned to the disk controller board.The address enable signal (AEN) is asserted by the system boardwhen DMA is controlling data transfer. When AEN is active, theI /0 port decoder is disabled.The following figure is a table of the read/write ports.

    R!W Port Address FunctionRead 320 Read data (from controller to system unit)Wr i te 320 Write data (from system unit to controller)Read 321 Read controller hardware sta tus.Wr i te 321 Controller reset .Read 322 Read option jumpersWrite 322 Generate controller-select-pulseRead 323 Not used.Write 323 Write pattern to DMA and interruptmask regis ter .

    1420MB Fixed Disk Drive Adapter March 17,1986

  • 8/2/2019 Technical Reference Options and Adapters Volume 2 4of5

    19/124

    InterfaceThe following lines are used by the disk controller:AO-AI9 Positive true 20-bit address. The least-significant 10bits contain the I/O address within the range of hex

    320 to hex 323 when an I/O read or write is executedby the system unit. The full 20 bits are decoded toaddress the read-only memory (ROM) between theaddresses of hex C8000 and hex C9FFF.DO-D7 Positive 8-bit data bus over which data and statusinformation is passed between the system board andthe controller.-lOR This signal is active when the system board readsstatus or data from the controller under eitherprogrammed I/O or DMA control.-lOW This signal is active when the system board sends acommand or data to the controller under either

    programmed I/O or DMA control.AEN This signal is active when the DMA in the system

    board is generating the I/O Read (-lOR) or I/OWrite (-lOW) signals and has control of the addressand data buses.RESET This signal forces the disk controller to its initial

    power-up condition.IRQ 5 This signal is active by the controller when enabled tointerrupt the system board on the return ending statusbyte from the controller.DRQ 3 This signal is activated by the controller when data isavailable for transfer to or from the controller under

    DMA control. This signal remains active until thesystem board's DMA channel activates theDMA-acknowledge signal (-DACK 3) in response.

    March 17,1986 20MB Fixed Disk Drive Adapter 15

  • 8/2/2019 Technical Reference Options and Adapters Volume 2 4of5

    20/124

    -DACK 3 This signal is active when negative, and is generatedby the system board DMA channel in response to aDMA request (DRQ 3).

    1620MB Fixed Disk Drive Adapter March 17, 1986

  • 8/2/2019 Technical Reference Options and Adapters Volume 2 4of5

    21/124

    ConnectorsThe 20MB Fixed Disk Drive Adapter connector and interfacespecifications follow.

    DDiskriveJ 1

    At Standard TTL LevelsGround-Odd Numbers-Reserved-Head Select 2-Write Gate-Seek Complete-Track 000-Wr i te Fau I t-Head Select 0-Head Select 1-Index-Ready-Step-D rive Select 1-Drive Select 2-Drive Select 3-Drive Select 4-D i rect ion In

    March 17,1986

    2, 16,

    LandNumber1-33

    30, 32468101214182022242628303234

    DiskAdapterJ 1

    20MB Fixed Disk Drive Adapter 17

  • 8/2/2019 Technical Reference Options and Adapters Volume 2 4of5

    22/124

    FixeDiskDrivJ2 0der J3

    -Drive Selected IReserved 3,5,7,9

    Key 5+MFM Wr i te Data 13-MFM Wr i te Data 14+MFM Read Data 17-MFM Read Data 18Ground Pins 2,4,6,8,10,11,12,15,16,19,20

    All Other Pins Unused

    1820MB Fixed Disk Drive Adapter

    FixedDiskAdapterJ2 or J3

    March 17,1986

  • 8/2/2019 Technical Reference Options and Adapters Volume 2 4of5

    23/124

    ISH.3A) IOHHZ(SH.3) ..(SH.3) .......ISH.2.S) =SH. 2. 3) IISH.2.S) iI'."'"2. ......A"

    ..,AI1 ..A" AISA"A . AlBAI>AI'

    m-

    AO

    AI

    .... ""28 AAAVA26 ..A2';A' " A7'" A.All

    0001---1lZ- -

    ~ i : 1& PJOR18 PlOW'J6 PRST

    2 IOHHZ." .," ' -,-".S'(SOCKET>vee"'6GND:Z6

    MQ 29IRQ

    ~ . ~ " - - - - - - - - - - - - - - - - - - - - ~ r n r r ~ " - - - - - - - - - - - - - - - - - - ~ - ,

    (SH.2,3)ISH.2.S)ISH. 2, 3)(SH.2.S)ISH.S)ISH.S)(SH.S)ISH.S)

    ~ = = ~ ~ = = c = = = = = = = = = = = ~ , - -06--07TA au

    20MB Fixed Disk Drive Adapter (Sheet 1 of 4)

    D R Q ~ IR., ."'"

  • 8/2/2019 Technical Reference Options and Adapters Volume 2 4of5

    24/124

    tvo

    (SH.S)

    '"'"" " , ". Q ' ~ ' - ~ " ~ ~ ~ ~ I = = j " ~ . B 2&LSlZ- Q ~ - 1 8 2 A'"

    (SH.3) A O = = = = = ~ = = = = = = = = = = = = = : i I . SH.3) AI(SH.3) A2 },

    , - - - -____________________ tFH ROUTA ISH. 31

    DO (SH.l.S)

    t Z : : Z : ; = = = : : : : : Z = = = = = = I O L = = Z : : : : ; c : : L = : : : z = = = = = = = ~ ~ ~ : (SH.l,3)1'1 D3 (SH.l.3)- - - - - - - - - - - - - - - - - - - - - - - - - - - - i ~ - - - - - - - ~ r _ ~ ~ ~ - - - - - - - C ~ , , - ~ . )

    (SH.4) ~ - - - - - - - - - - - - - - - - - - - - - - - - - - - _ _ j + - - - - - - - _ _ _ 1 f _ _ t _ . . " . . ~

    ISH 3) I1FH W T D l l . T A . - - - - - - - ~ ~ ' - ' - ~ - "

    (SH.3) E A R l Y - - - - - - - - - ' L > ' - - - - ' 1 ~ " " = = _ ' G ' " = : _ " - - t - - - ' (SH.3) LATE---------'C>"---..C>"--t--'l::;:"'-t-:--....- - - - - ' I

    CD IN HALF 1/2 OFLS2'+'+

    20M B Fixed Disk Drive Adapter (Sheet 2 of 4)

  • 8/2/2019 Technical Reference Options and Adapters Volume 2 4of5

    25/124

    tv......

    ISH, 1) BUSY '"" I I'" " III " "R 22 LSOf ~ W R

    AEN20 BJSACKlDRQ 20 17 IOREQ

    MIirQ 1'1 16 MREGI

    I

  • 8/2/2019 Technical Reference Options and Adapters Volume 2 4of5

    26/124

    tvtv(SH.3) NEG PUMP - - - - - ~ I . . : : : , . , : '

    "OI,..F+'5VA

    ~ ~ ~ ~ ~ ~ ~ ~ ~ - + ~ ~ ~ - - - - ~ - - - i ,

    (SH.3) i = i f "GA1N - - - -- - - '/ e

    (SH.J) veo (LAMP ________ ~ ~ ~ / ' ' - - - " ' ' ' L ' ' . y BDLS04 S

    (SH.3) ________ {>. > " ' - - - - - - - ~ G L ) IS".',3) 10 M'2 "OCK -----------""J{),;''----------QD(SH.3) ~ - - - - - - - - - - - - - - - - - - - ~

    ~ . ' (SH.3) DISABLE AM _________ ~ l ' L ' -_R " ' I ~ 4 _____ __{OD

    'I e - - - - - - - - - - - - - - - - - - - ~ 2.8.17(8H.2) TES TEN ABL E- - - - - - -- - - - -- - - - -- - -

  • 8/2/2019 Technical Reference Options and Adapters Volume 2 4of5

    27/124

    BIOS ListingThe BIOS Listing for the IBM 20MB Fixed Disk Drive Adapterfollows.

    March 17, 1986 20MB Fixed Disk Drive Adapter BIOS 23

  • 8/2/2019 Technical Reference Options and Adapters Volume 2 4of5

    28/124

    [BM Persona l Computer MACRO Assembler VerS ion 2.00 I- I! 0-28-850 lSK2 ---- 10/28 /85 FIXED DISK BIOS

    I2345678910I I121314151617181920212223242526272829303132333435"7383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110 2

    24

    PAGE 118,121TITLE DISK2 ---- 10/28 /85 FIXED DISK BIOS;-- IN T 13H -----------------------------

    FIXED DISK I /O INTERFACETH I S I NTERF ACE PROV I DES ACCESS TO F I XED 0 I SKSTHROUGH THE IBM F I XED 0 I SK CONTROllER.

    ; -- -------------------- - - -------------------------- ------ - -----; -- ------- - - ------------ - - -------- - ---- -- -- --------------- - - -- -- -; THE 81DS ROUT I NES ARE MEANT TO 8E ACCESSED THROUGH; SOFTWARE INTERRUPTS ONLY. ANY ADDRESSES PRESENT INTHE LISTINGS ARE INCLUDED ONLY FOR COMPLETENESS,NOT FOR REFERENCE. APPL I CAT IONS WH I CH REFERENCEABSOLUTE ADDRESSES WITH I N THE CODE SEGMENT; V lOLA TE THE STRUCTURE AND DES I GN OF B [OS.; - - -- -------- ---- -- - - ---------- ---- - - --------- -------

    INPUT (AH " HEX VALUE)

    OUTPUT

    (AH)= OOH RESET DISK (DL = 80H,8 !HI / DISKETTE(AHi" OI H READ THE STATUS OF THE LAST DISK OPERATION INTO (A UNOTE: DL < 80H - DISKETTEDL > SOH - 0 I SK(AH)= 02H REAO THE DESIRED SECTORS INTO MEMORY(AHI" 03H WRITE THE DESIRED SECTORS FROM MEMORY(AH) " 04H VER I FY THE DES I RED SECTORS(AH) " 05H FORMAT THE OES I RED TRACK(AHI = 06H FORMAT THE DESIRED TRACK AND SET BAD SECTOR FLAGS(AH)= 07H FORMAT THE DRIVE STARTING AT THE DESIRED TRACK(AH) " 08H RETURN THE CURRENT DR [VE PARAMETERS(AHI= 09H [N[T lALIZE DRIVE PAIR CHARACTERISTICSINTERRUPT 41 H POINTS TO DATA BLOCK(AH i " OAH READ LONG(AHJ" OBH WR I TE LONG

    (AH) "(AH) "(AH) "(AH) "(AH)(AH)(AH)(AH)(AH)

    OCHODHOEHOFHIOHI IHI2 HI3 H14H

    NOTE: READ AND WRITE lONG ENCOMPASS512 BYTES + 4 BYTES OF ECCSEEKAL TERN ATE DISK RESET (SEE DL IREAD SECTOR BUFFERWR I TE SECTOR BUFFER,(RECOMMENDED PRACT I CE BEFORE FORMATT [NG)TEST OR I VE READYRECAL I BRA TECONTROLLER RAM 0 [AGNOST I CDRIVE DIAGNOSTICCONTROLLER INTERNAL 0 I AGNOST [C

    REGISTERS USED FOR FIXED DISK OPERATIONS(DLI(DHI(CHI(CLI

    (A U

    (ES:BXI

    DR[VE NUMBER (80H-87H FOR DISK, VALUE CHECKED)HEAD NUMBER (0 -70 ALLOWED, NOT VALUE CHECKED ICYLINDER NUMBER (0 -10230, NOT VALUE CHECKED) (SEE C USECTOR NUMBER ( 1-170, NOT VALUE CHECKED)NOTE: HIGH 2 BI TS OF CYL [NDER NUMBER ARE PLACEDIN THE HIGH 2 BITS OF THE CL REGISTER

    (1 0 BITS TOTAl)NUMBER OF SECTORS (MAXIMUM POSSIBLE RANGE 1-80H,FOR READ/WRITE LONG 1-79H)( I NTERLEAVE VALI,IE FOR FORMAT I - I 60 IADDRESS OF BUFFER FOR READS AND WR [TES,(NOT REQU I RED FOR VER I FY I

    AH " STATUS OF CURRENT OPERATIONSTATUS BITS ARE DEFINEO IN THE EGlUATES BELOWCY = 0 SUCCESSFUL OPERATION (AH" OOH ON RETURN)CY " I FA[LED OPERATION (AH HAS ERROR REASON)NOTE: ERROR II H [NDICATES THAT THE DATA READ HAD A RECOVERABLEERROR WHICH WAS CORRECTED BY THE ECC ALGORITHM. THE DATAIS PROBABLY GOOD, HOWEVER THE BIOS ROUT I NE I NO [CA TES ANERROR TO ALLOW THE CON TROLL [NG PROGRAM A CHANCE TO DEC I DEFOR ITSELF, THE ERROR MAY NOT RECUR IF THE DATA ISREWRITTEN. (ALI CONTAINS THE BURST LENGTH.I F DR I VE PARAMETERS WERE REQUESTED,

    DL " NUMBER OF CONSECUTIVE ACKNOWLEDGING DRIVESATTACHED (0-21 ICONTROlLER CARD ZERO TALLY ONLYIDH " MAX I MUM USEABLE VALUE FOR HEAD NUMBERCH " MAXIMUM USEABLE VALUE FOR CYLINDER NUMBERCL " MAX I MUM USEABLE VALUE FOR SECTOR NUMBERAND CYL I NDER NUMBER H [GH BITS

    IF AN ERROR OCCURS ON READ DRIVE PARAMETERS,AH " ERROR CODE ( INIT FAIL IAL :: CX '" OX " 0 -

    REGISTERS WILL BE PRESERVED EXCEPT WHEN THEY ARE USED TO RETURNINFORMATION.NOTE: IF AN ERROR [S REPORTED BY THE D[SK CODE, THE APPROPRIATEACT I ON I S TO RESET THE 0 [SK, THEN RETRY THE OPERAT I ON.

    20MB Fixed Disk Drive Adapter BIOS March 17, 1986

  • 8/2/2019 Technical Reference Options and Adapters Volume 2 4of5

    29/124

    [BM Person . 1 Computer MACRO Assemb I e r Vers I on 2 .00 1 -210-28-B5ISK2 ---- 10/28/85 F[XED DISK BIOS

    10310410510610710 8 DOFF109 :: OOCC11 0 OOBBI I 1 008011 2 :: 00401 13 002011 4 001111 5 00 I 0I 16 OOOBI 17 0009I 18 0007I 19 0005120 0004121 000212 2 000112312 412512 612 712 8 000012 9 003413 0 0034131 004C132 004C13 3 0064134 006413 5 007813 6 007813 7 0 I 0013 8 010013 9 010414 0 0 I 04141 7COO14 2 7COO14 3 7COO14414 5 0000146 006C147 006C 177714 8 007214 9 007215 0 0074151 007415 2 007515 3 007615 4 007715 5 0078156157 000015815916016116216316 416516616716816 917017117217317417517617717817 9 0320180 0020181 002118 2 0020183 000818 4 000418 5 00021860001187188 0047189 004B190 0000191 008219219 3 000019 4 000119 5 000319 6 0004197 000519 8 000619 9 0007200 000820 I OOOA202 OOOB20 3 OOOC204 000020 5 OOOE20 6 OOOF20 7 OOEO20 8 00E320 9 00E421 0 00E5211 00E621 2213214 OOOB0002

    March 17, 1986

    PAGE; ----- - - -- ------- - -------------- - - ---- - -- - -------- - ------; ERROR RETURN STATUS (AH):: PH WHEN CY= ISENSE FAIL EQUWR I TE-F AUL T EQUUNDEF-ERR EQUTIME OUT EQUBAD SEEK EQUBAD-CNTLR EQUDATA CORRECTED EQUBAD ECC EQUBAD-TRACK EQU

    SENSE OPERAT I ON FA [LEDWRITE FAULT ON SELECTED DRIVEUNDEF I NED ERROR OCCURREDATT ACHMENT FA I LED TO RESPONDSEEK OPERATION FAILEDCONTROLLER HAS FA [LEOECC CORRECTED DATA ERRORBAD ECC ON 0 [S K READBAD TRACK FLAG DETECTED

    DMA -BOUNDARY EQU[N IT FAIL EQUBAD RESET EQU

    OFFHOCCHOBSH080H040H020Ho 11HO\OHOOBH009H007H005H004H002H00 I H

    ATTEMPT TO OMA ACROSS 64 K BOUNDARYDRIVE PARAMETER ACTIVITY FAILEDRESET FAILEDRECaRD NOT FN o EQUBAD ADDR MARK EQUBAo::::CMo - EQU

    I NTERRUPT AND STATUS AREAS; - - - --------- - --- - - - - --ABSO SEGMENT AT OHORGHo [SK I NT LABEL

    ORGORG_ VECTOR LABELORGBOOT _ VEC LABELORGDISKETTE_PARM LABELORG01 SK_VECTOR LABELORGHF_ TBL_VEC LABELORGBOOT LOCN LABELABSO- ENOSDATA SEGMENT AT 40 HORG

    RESET_FLAGDISK STATUSHF NOMCONTROL BYTEPORT OFFoATA- ENOSCODE SEGMENT

    OWORGOWORGDBDBDBDB

    000H4DWOROo13H4DWORDo19H4oWORD01 EH4DWORD040H-4oWORD041H4DWORD7COOHFA R

    ,072H,074H

    ; - -- - ------- - - - - - -------- - - - - -----HARDWARE SPECIFIC VALUES1 CONTROLLER I {O PORT> WHEN READ FROM:

    REQUESTED SECTOR NOT FOUNDADDRESS MARK NOT FOUNDBAD COMMAND PASSED TO 0 I SK I {a

    F [XED 0 I SK I NTERRUPT VECTORDISK I NTERRUPT VECTORBOOTSTRAP INTERRUPT VECTORDISKETTE PARAMETERSNEW 0 I SKETTE [NTERRUPT VECTORF I XED 0 [SK PARAMETER VECTORBOOTSTRAP LOADER VECTOR

    T I MER LOW WORD1234H [F KEYBOARD RESET UNDERWAYFIXED DISK STATUS BYTECOUNT OF FIXED DISK DRIVESCONTROL BYTE DR I VE OPT IONSPORT OFFSET

    HF PORT+O READ DATA (FROM CONTROLLER TO CPUIHF-PORT + 1 READ CONTROLLER HARDWARE STATUS- (CONTROLLER TO CPU IHF_PORT+2 READ CONFIGURATION SWITCHESHF PORT + 3 - NOT USED> WHEN WR I TTEN TO :HF PORT+ 0 WR I TE OAT A I FROM CPU TO CONTROLLER IHF-PORT+ I CONTROLLER RESETHF-PORT+2 GENERATE CONTROLLER SELECT PULSEHF-PORT+3 WR I TE PATTERN TO DMA AND INTERRUPTMASK REG! STER

    CMD BLOCKHF PORTINTAOOINTAO IEOIR I 8USYR I -BUSRl-IOMOoER1::::REQDMA READDMA-WR [T EOMADMA_H I GHTST ROY CMDRECAL CMDSENSE-CMDFMToRV CMDCHK TRK CMDFMTTRK CMDFMTBAO-CMDREAD CMDWRITE CMoSEEK CMDI N I T-ORV CMDRD ECC CMORD-BUFF CMDWR-BUFF-CMORAM O[AG CMDCHK-DRV CMDCNTLR DIAG CMORD LONG CMDWR:::LONG:::CMDMAX FILES_MAX FILE

    EQUEQUEQUEQUEQUEQUEQUEQUEQUEOUEQUEQUEOUEQUEQUEQUEOUEOUEQUEQUEQUEQUEQUEOUEOUEQUEQUEOUEQUEQUEOUEQUEQUEQU

    8YTE PTR [BP1-B0320H020H021 H020H00001000BOOOOOIOOB000000 1DB0000000 I B01000111B01001011BOOOHOB2H0000000080000000IB00000011 B00000 I OOB000001018000001108OOOOOIIIB0000 I 0008000010108OOOOIOIIBOOOOIIOOB00001101800001110B0000111181 I 100000B11100011 BI I 1001 OOBI I 100101 BI I 10011 OB

    CMO BLOCK HEAD01 SK PORT8259 PORT8259 PORTEND OF I NTERRUPT COMMANDDISK PORT 1 BUSY BITCOMMAND/DATA BIT

    MODE BITREQUEST B[T1047HICHANNEL 3 (04BH)

    OMA ADDRESSPORT FOR HIGH 4 BITS OF OMACNTLR READYRECALSENSEDRIVE

    T CHKTRACKBADREADWRITESEEKIN IT8URSTBUFFRBUFFRRAMORVCNTLRRLONGWLONG

    { OOHI(OIHI103H)(04Hl( 05H)106H)107H)108H)(OAHI(08H)(OCHI(DOH)(OEHI(OFH)IEOHIIE3HI{E4HI{E5HI(E6HI

    20MB Fixed Disk Drive Adapter BIOS 25

  • 8/2/2019 Technical Reference Options and Adapters Volume 2 4of5

    30/124

    IBM P e r s o n a l Computer MACRO Assemble r V e rs i o n 2 . 0 0 1-31 0 - 2 8 - 8 5lSK2 ---- 1 0 / Z 8 / 8 5 FIXED O[SK 8[OS

    21 521621721821922022122222322422522522722822923023123223323423 523623 723823 924 024124 224 324 424 524 024 724824925 025125225325425 525625725825926026125226325426526626726 826927027127227327 427521627 727827 928028128228328428528528 728828 929029129229 329429529 629729 829930030 130230330 430530 630730 830931031131231331 431531631731 831 932 032132 232332 432 532632 732 8

    26

    00000000 550001 AAOOOZ 08

    00030003 E8 350005 35 39 58 37 32 3931 20 Z8 43 29 2043 4F 50 59 52 4947 48 54 20 49 4240 20 20 43 4F 5250 2E0025 2C 31 39 38 32 ZO2C 31 39 38 35 2E0031 20 31 30 ZF 32 382F 38 35D03A003A 28 CO003C 8E 08003E FA003F A I 004C R0042 A3 0100 R0045 A I 004E R0048 A3 0102 R0048 C7 06 004C R 0251 R0051 8C DE 004E R0055 B8 0755 R0058 A3 0034 R0058 8C OE 0036 R005F C7 06 0064 R 0192 R0065 8C DE 0066 R0069 C7 06 0104 R 03FF R006F 8C DE 0106 R0073 F8

    0074 88 ---- R0077 8E 080079 C6 06 0074 R 00007E C6 06 0075 R 000083 C6 06 0077 R 000088 B9 0025008B0088 E8 0177 R008E 73 050090 E2 F90092 E9 0154 R00950095 89 00 0 I0098 8A 00800098 B8 1200009E CO 13OOAO 73 0300A2 E9 0154 R00A500A5 88 140000A8 CO 13OOAA 73 03OOAC E9 0154 ROOAFOOAF C7 06 006C R 000000B5 81 3E 0072 R 123400B8 75 06OOBO C7 06 006C R 019A00C300C3 FA00C4 E4 21ODC6 24 FE00C8 E6 21OOCA FB00C800C8 E8 0177 ROOCE 72 070000 88 100000D3 CD 130005 73 OA00070007 A I 006C ROODA 30 OIBE0000 72 ECOOOF E8 73OOEIOOEI 88 110000E4 CO 13OOE6 72 6C00E8 88 0900O{)EB CD 13ODED 72 65OOEF 88 C80000F2 8E CO00F4 2B 0800F6 88 OFOO00F9 CD 1300,F8 72 57OOFO FE 06 0075 R0101 BA 02130104 80 000106 EEO l 0 7 8 A 0 3 2 1

    PAGE ASSUMEORGDBDBDB

    CS:CODE,OS:ABSOOH055HOAAH08 0

    I GENER [C B I as HEADER; 4K MODULE

    ; --- - -------- - - - ----- - - - - -- - - - - ----- ---- ----- -- - -- -; FIXED DISK I/ O SETUP;;;;;

    ESTABl [SH TRANSFER VECTORS FOR THE F I XED 0 I SKPERFORM POWER ON 0 I AGNOSTI CSSHOULD AN ERROR OCCUR A "170 I " MESSAGE IS D I SPLA YEO

    01 SK SETUP FROC FAR

    L3 :

    L 4 :

    L 7:

    P7 :

    P 9 :

    P8:

    P4:

    PIO:

    P2:

    - JMP SHORT L3DB '59X7291 IC ) COPYRIGHT IBM CORP.' COPYR I GHT NOT I CE

    DB ' , 1 9 8 2 , 1 9 8 5 , 'DB

    SUBMOVCLIMOVMOVMOVMOVMOVMDVMDVMOVMOVMOVMOVMOVMDVST IASSUMEMOVMOVMOVMOVMOVMOVCALLJNCLOOPJM PMOVMOVMOVIN TJNCJM PMOVIN TJNCJM PMOVCMPJN EMDVCLIINANOOUTST ICALLJCMOVIN TJNCMDVCMPJBJM PMDVIN TJC

    MOVIN TJC

    MOVMDVSUBMDVIN TJC

    INCMDVMOVOUTMDV

    , 10 /28 /85 '

    AX ,A XOS,AXAX, WORD PTR ORG VECTORWORD PTR 01 SK VECTOR,AXAX,WORD PTR ORG VECTOR+2WORD PTR DISK VECTOR+2,AX

    RELEASE MARKER

    ADDRESS LOW RAM

    LOAD 0 I SKETTE [PSTORE AT I NT 40HLOAD D [SKETTE CSSTORE AT IN T 40HWORD PTR ORG VECTOR, OFFSET 0 I SK 10

    WORD PTR ORG-VECTOR+2,CSF I XED 0 [SK HANDLERAT [N T 13HAX , OFFSET Hi) I NT

    WORD PTR HOI SI< IN T ,AXWORD FTR HDISK-INT+2,CS

    F I XED 0 I SK INTERRUPTHANDLER AT I NT ODHWORD FTR SOOT VEC,OFFSET BOOT STRAP BOOTSTRAP ROUT[NE AT[N T 19HORD PTR BOOT-VEC+2,CS -WORD PTR HF Te L VEC, OFFSET FO TBLWORD PTR HF=:TBL=:VEC+2,CS - PARAMETER TABLE AT[NT 41H

    AX,oATAOS,AXDISK STATUS,OHF NUM,OPORT OFF, 0CX,25HHO RESET 1L 7 - -L4ERROR_EXC X , lDX,80HAX,I200HI3HP7ERROR_EXAX,I400HI3HP9ERROR_EXTIMER LOW,ORESET-FLAG, 1234HP8 -TIMER_LOW,410D

    AL, INTAOIAL,OFEHINTA01,ALHD RESET 1p (5 -AX,IOOOHI3HP2AX , T l MER LOWAX,446D -P4SHORT ERROR_EXAX,I IOOHI3HERROR_EXAX,0900HI3HERROR_EXAX ,OC800HES,AXBX,exAX,OFOOHI3HERROR_EXHF NUMOX-;213HAl,OOX,ALDX,321H

    ESTA8L I SH SEGMENTRESET THE STATUS INDICATORZERO COUNT OF DR I YESZERO CARD OFFSETRETRY COUNTRESET CONTROLLERTRY RESET AGA I N

    CONTROLLER D I AGNOST I CSCHECK THE I NTERNAL RAMBUFFERS

    CONTROLLER D I AGNOST I CSI NTERNAL CHECKSUM ANDECC CIRCUITRY TEST.

    ZERO TIMERKEYBOARD RESETSKIP WAIT ON RESETD I SABLE INTERRUPTSTIMERENABLE T [MERSTART TIMERI NTERRUPTS ONRESET CONTROLLERTEST TO SEE IF THE DRIVE[S READY

    25 SECONDS

    RECAL 18RATE THE OR I YE 0

    SET DR I VE PARAMETERSFOR DRIVE 0

    DNA TO BUFFERSET SEGMENTWR [T E SECTOR BUFFER

    DR I VE ZERO RE SPONDEDEXPANS [ON BOXTURN BOX OFFTEST IF CONTROLLER

    20MB Fixed Disk Drive Adapter BIOS March 17,1986

  • 8/2/2019 Technical Reference Options and Adapters Volume 2 4of5

    31/124

    IBM Persona I Computer MACRO Assemb I e rDISK2 ---- 10/28 /85 FIXED DISK BIOS

    32 9 OIOA EC33 0 OIOB 24 OF331 0100 3C OF33 2 OIOF 74 0633 3 0111 C7 06 006C R 0 lA433 4 0 I I 733 5 0117 BA 02133 3 6 0 1 1 A B O F F33 7 O l l e EE33 8 OlIO 69 0001339 0120 BA 008134 0 0123 P3:341 0123 2B CO34 2 0125 CD 13343 0127 72 4234 4 0129 B8 I 10034 5 012C CD 13346 012E 73 OA34 7 0130 AI 006C R34 8 0 1 3 3 3 0 OIBE34 9 0136 72 EB35 0 0138 EB 31351 013A P5:35 2 013A B8 090035 3 0130 CO 1335 4 013F 72 2A35 5 0141 FE 06 0075 R

    io n 2.00

    IN AL,DXAND AL , OFHCMP AL , OFHJE BOX ONMOV TlMER_LOW,420DMOV DX,213HMOV AL , QFFHOUT aX,ALMOV CX , IMOV DX,08 IHSUB AX,AXIN T 13HJC POD DONEMOV AX,OIIOOHtNT 13HJNC P5MOV AX,TIMER LOWCMP AX,446D -JB P3JMP SHORT POD_DONEMOV AX,0900HIN T 13HJC POD DONEINC HF NUM

    1- '10-28-85IS IN THE SYSTEM UNIT

    CONTROLLER I S IN SYSTEM UN I TEXPANS [ON BOXTURN BOX ONATTEMPT NEXT DR I VES

    RESET THE CONTROLLER

    RECALlBRATE THE DRIVE I

    25 SECONDS

    INIT IAL IZE DRIVE CHARACTERISTICSFOR DRIVE I

    35 6 0145 81 FA 0081 CMP DX-;-180H + S_MAX_FtLE I: TALLY ANOTHER DRIVE35 7 0149 73 20358 014B 4235 9 014C EB 0536 0361 014E 31 37 30 31 ODOA36 2 000636 33 6 '36 536 6 015436 7 0154 BO OOOF368 0157 2B F6369 0159 B9 000637 0 015C B7 00371 015E37 2 015E 2E : 8A 84 014E R37 3 0163 B4 OE374 0165 CD 10375 0167 46376 0168 E2 F437 7 016A F9378 016B37 9 016B FA38 0 016C E4 21381 0 I 6E OC 0 I382 0170 E6 21383 0172 FB384 0173 E8 0232 R385 0176 CB38 6387 017738 8 0 I 77 51389 0178 5239 0 0179 B9 0100391 017C39 2 017C E8 0760 R393 017F 42394 0180 EE39 5 0181 EB 00396 0183 EB 0039 7 0185 EB 00398 0187 EC39 9 0 1 8 8 2 4 3F40 0 OIBA 74 03401 DI8C E2 EE40 2 018E F940 3 018F40 4 018F 5A40 5 0190 5940 6 0191 C340 7 019240 8 0 I 92

    March 17,1986

    FI1FI7L

    JA E POD DONEINC OX -JMP P3DBEOU

    ' 1 7 0 1 ' ,ODH,OAHI - F I 7POD ERROR

    ERROR EX :- MOVSUBMDVMDV

    BP,OFHS I , S ICX,F I7LBH,OOUT_CH:

    MDVMDVINTINCLOOPSTC

    AL,CS:F I7 ( S I ]AH, I40IOHS IOUT_CH

    POD DONE:- CLlIN

    OROUTSTICALLRET

    AL, INTAOIAL,O IHINTAOI,ALOSBL

    HD RESET I PROC NEAR- PUSH C,L6:

    R3 :

    PUSHMDV

    OXCX , 0 I OOHCALL PORT 0INC OX-OUT DX,ALJMP 1+ 2JMP 1+ 2JMP $+ 2IN AL,DXAND A L , O O I I I I I I BJZ R3LOOP L6STCPOP OXPOP CXRET

    HD RESET I ENDPDISK_SETUP ENDP

    POST MESSAGE

    POD ERROR FLAGMESSAGE CHARACTER COUNTPAGE ZEROGET BYTEVIDEO OUTD I SPLA Y CHARACTERNEXT CHARDO MORE

    NO INTERRUPTSREAD THE I NTERRUPT MASKo SABLE THE T I MERENABLE INTERRUPTSo SABLE THE CARD MASKSSAVE REG I STERRETRY COUNT

    ADDRESS PORT IRESET CARDI/ O DELAY AT LEAST +5usALLOW T I ME TO CLEAR THEHARDWARE STATUS REGISTERREAD THE HARDWARE STATUSMASK OFF UPPER 2 BITS AND CLEAR CYEXIT IF REGISTER IS CLEARED WITH CY=OTRY AGAINSET ERROR CONDITION CY=IRESTORE REG 1 STER

    20MB Fixed Disk Drive Adapter BIOS 27

  • 8/2/2019 Technical Reference Options and Adapters Volume 2 4of5

    32/124

    IBM PersonOi I Computer MACRO Assemble r Vers ion 2.00 I -S10-28-85ISK2 ---- 10 /28 /85 FIXED DISK 810S

    40 941 041141 241 341 441 541 641 141 841 942 042 142 242 342 442 S42 642 742 842 943 043 143 243 343 443S43 643 743 843 944 044144 244 344 444 S44 644 744 844 94S04S14S24S34S 44SS4S 64S74S 84S946 046146 246 346 446S46 646 746 846 947 047147 247 347 447S47 647 747 847 948 048148 248 348 448 S48 648 748 848 949 049 149 249 349 449 S49 649 749 849 9SOOSOlS02S03S0 4SOSS06S07S0 8S09SI OS IISI2S I3SI4SI SSI6SI1S I85> 9S20S21S22

    28

    01920192 2B CO0194 8E 080196 B4 CO0198 CD 15

    o19A FA0198 CT 06 0104 R 03FF R01AI 8C OE 0106 R0 lA5 73 OA0lA7 C7 06 0078 R 0227 ROIAD 8C OE 001A ROIBI0181 FB

    01 B2 2B 02

    0lB4 8E C20186 BB 7COO R

    0189 FCo IBA 33 CO018C 89 0100018F 88 FBOICI F3 / A80lC3 89 0004o IC 6o IC 6 510lC7 2B CO0lC9 CD 13OICB 72 08OICD B8 02010100 B9 00 0 I0103 CO 130105 590106 73 090108 80 FC 80OIOB 74 220100 E2 E7OIOF EB IEOIEI 80 3E 7COO R 060lE6 72 30

    0lE8 8F 7COO R0lE8 89 0008OIEE AI 7COO ROIFI 83 C7 020 lF4 38 0501F6 EI F90lF8 74 28o IF AOIFA EA 7COO ---- R

    01 FF01 FF 28 CO0201 CD 130203 89 00030206 8A 008002090209 51020A 2B CO020C CD 13020E 72 08

    0210 B8 02010213 89 00010216 CD 130218 590219 12 08

    PAGE; -- - I NT 19 H -- - ------- -- - ------- ------ -- ----------- ---------INTERRUPT 19 800T STRAP LOADER

    THE F I XED 0 I SK B I OS REPLACES THE INTERRUPT 19H BOOTSTRAP VECTOR WITH A PO I NTER TO TH I S BOOT ROUT I NE ANDRESETS THE DEFAULT DISK AND DISKETTE PARAMETER VECTORSTHE BOOT BLOCK TO BE READ IN WILL 8E ATTEMPTED FROM

    CYL I NDER 0 SECTOR 1 OF THE DEV I CE .THE BOOTSTRAP SEQUENCE IS :

    ATTEMPT TO LOAD FROM THE DISKETTE INTO THE BOOTLoCAT I ON (0000: 7COOH) WHERE CONTROL I S TRANSFERRED.IF THE DISKETTE FAILS THE FIXED DISK IS TRIED FOR AVALID BOOTSTRAP 8LOCK. A VALID 800T 8LoCK ON THEF I XED 0 I SK CONS I STS OF THE 8YTES 055H OAAH AS THELAST TWO 8YTES OF THE 8LOCK.IF THE A80VE FAILS CONTROL IS PASSED TO RESIDENT BASIC

    BOOT STRAP:

    HO :

    HI:

    H2:

    H3:

    H4:

    H5:

    H6:

    H7 :

    H8 :

    - ASSUMESUBNOVNOVIN 7

    OS: ABSO, ES : ABSOAX,AXDS,AXAH,OCOHISH

    RESET PARAMETER VECTORSCLI

    EST A8L I SH SEGMENTREAD CONF I GURAT I ON PARAMETERSIF XT OR PC , I NTERRUPTS ARE 0 I SABLEOAT THIS POINT.

    MoV WORD PTR HF TBL VEC, OFFSET FD TB LMOV WORD PTR HF-TBL VEC+2, CS -JNC HO - - ; JMP I F I NT 15 FUNCT I ON IMPLEMENTEDMOV WORD PTR 0 I SKETTE PARM, OFFSET 0 I SKETTE TBLMOV WORD PTR DISKETTE:::PARM+2,CS -ST IATTEMPT BOOTSTRAP FROM 01 SKETTESUB OX,DXESTABLISH ES:BX POINTERNOV ES ,OXNOV BX,OFFSET BooT_LOCNCLEAR BOOT_LOCNCLOXOR AX , AXNOV CX,256NOV DI,8XREP STOSWNOV CX,4PUSH CXSUB AX,AXIN T 13HJC H2NOV AX,020!HNOV CX, IIN T 13HPOP CXJNC H3CNP AH,80HJZ H6LOOP HIJNP SHORT H6CMP BYTE PTR BOOT_LOCN,06HJB HIO

    OR I VE ZERO

    ESTABLISH SEGMENTSET BX TO 1COOH

    DIRECT I ON FORWARDCLEAR 25 6 WORDSPOINT TO BOOT LOCATION 8UFFERZERO THE BOOT LOCAT I ON BUFFERSET RETRY COUNTIP L SYSTEMSAVE RETRY COUNTRESET THE 0 I SKETTEFILE 10 CALLIF ERROR, TRY AGAINREAD I N THE SINGLE SECTORSECTOR I, TRACK 0FILE 10 CALL RECOVER RETRY COUNTCARRY FLAG SET 8'1' UNSUCCESSFUL READIF TIME OUT, NO RETRYTRY FIXED DISKDO I T FOR RETRY TIMESUNABLE TO I PL FROM TH E 0 I SKETTECHECK FOR FIRST INSTRUCTION INVALIDIF 800T NOT VAl lO, GO TO BASIC

    INSURE DATA PATTERN FIRST 8 WORDS NOT AL L EQUALNOVNOVNOVAOOCNPLoOPZJZ

    01 ,OFFSET BOOT LoCNCX,8 -AX,WORD PTR BOOT_LOCN01,2AX , (01 JH4HI O

    JMP 800T _LOCN

    ; CHECK DATA PATTERN; CHECK THE NEXT 8 WORDS; LOAD THE FIRST WORD; PO I NT TO NEXT WORD; CHECK DATA PATTERN FOR A F ILL PATTERN; BOOT NOT VALID, GO TO BASIC

    ATTEMPT BOOTSTRAP FROM FIXED DISK

    SUB AX , AXIN T 13HMOV CX,3NOV DX,ooaOHPUSHSUB AX , AXIN T 13HJC H8ES AND BX ALREADY ESTABLISHEDNOVNOVIN TPOPJC

    AX , 02 0 1 Hex , I13HCXH9

    RESET D (SKETTESET RETRY COUNTFIXED DISK ZEROIP L SYSTEMSAVE RETRY COUNTRESET THE F I XED 0 I SKFILE 10 CALLIF ERROR, TRY AGAIN

    READ I N THE SINGLE SECTORSECTOR I, TRACK 0FILE 10 CALLRECOVER RETRY COUNT

    20MB Fixed Disk Drive Adapter BIOS March 17,1986

  • 8/2/2019 Technical Reference Options and Adapters Volume 2 4of5

    33/124

    IBM Personal Comput.l!lr MACRO Assl!lmbll!lr Vl! l rs lon 2.00 1 -610-28-85lSK2 ---- 10/28/85 FIXED DISK BIOS

    523 0218 AI 70FE R52 4 021 E 30 AA5552 5 0221 74 0152 6 022352 1 0223 E2 E4.28.2.53 .531 022553 2 0225 CO 18533534 0227.35536 0227 CF53 7 0228 0253 8 0229 2553 9 022A 0254 0 0228 08541 022C 2A54 2 0220 FF54 3 022E 50544 022F F654 5 0230 1954 6 0231 04.4 154 8'4'50 0232551 0232 2A CO55 2 0234 BA 0323553 0231 FA55 4 0238 EE555 0239 83 C2 0455 6 023C EE55 7 0230 83 C2 0455 8 0240 EE55 9 0241 83 C2 0456 0 0244 EE'6 156 2 0245 80 07563 0247 E6 OA564 0249 E4 2156 5 0248 OC 2056 6 0240 E6 21567 024F FB568 0250 C356 9 025151 1151 2.13.1 451 .51 6577 025151 857 9 0251 80 FA 8058 0 0254 73 05581 0256 CO 40582 0258583 0258 CA 0002.8458 5 025858 6 0258 FB587 025C OA E458 8 025E 75 09589 0260 CO 4059 0 0262 2A E4591 0264 80 FA 8159 2 0267 77 EF59 3 026959 4 0269 80 FC 08595 026C 75 0359 6 026E E9 0380 R59 7 027159 8 0271 5559 9 0272 8B EC60 0 0274 83 EC 086.,602 0277 53603 0278 5160 4 0279 5260 5 027A IE60 6 0278 0660 7 02IC 5660 8 0270 5760 9 027E 8E ---- R61 0 0281 8E DE6"61 2 0283 E8 0200 R61 361 4 0286 SO615 0287 E8 0232 R61 6 028A 88 ---- R61 7 0280 8E 0861 8 028F 58619 0290 8A 26 0074 R620 0294 SF621 0295 5E62 2 0296 0762 3 0297 IF62 4 029B SA62 5 0299 5962 6 029A 5B621628 0298 83 C4 0862 9 029E 5063 0 029F BO FC 01631 02A2 FS632 02A3 CA 000263 3 02A6

    March 17, 1986

    MOV AX , WORD PTR BOOT LOCN+510DCMP AX , OAA5SH - ; TEST FOR GENER I C BOOT BLOCK.JZ H5 J GO TO 800T LOCATIONH9: LOOP H1 ; DO IT FOR RETRY TIMES

    ;----- UNABLE TO IP L FROM THE DISKETTE OR FIXED DISK

    IN T 18H RESIDENT BASIC01 SKETTE_TBL I

    DBDBDB

    110011 I IB225HSRT=O, HD UNLOAD=OF - 1 ST SPEC BYTEHD LOAD= I, MODE=DMA - 2ND SPEC BYTEMOTOR TIMEOUT AFTER OPERATIONDB 2

    DB 8DB 02AHDB OFFHDB 050HDB OF6HDB 2.DB 4

    51 2 8YTES PER SECTOREOT (LAST SECTOR ON TRACK)GAP LENGTHDTLGAP LENGTH FOR FORMATFILL BYTE FOR FORMATHEAD SETTLE T I ME (M I LL I SECONDS)MOTOR START TIME (118 SECOND)

    ;----- MAKE SURE THAT AL L HOUSEKEEPING IS DONE BEFORE EXITD58L

    OSBL

    PROCSUBMDVeL iDUTADDDUTADDDUTADDDUTMDVDUTINDROUT51 1RETENDP

    NEARAL,ALDX,HF_PORT+3DX,ALDX,4DX,ALDX,4aX,ALOX,4DX,ALAL,07HDMA+IO,ALAL,INTAOIAL,020HINTAOI,AL

    ; RESET I NT IDMA MASKLOAD FOR PORT ADDRESS :301 SA8LE INTERRUPTSRESET I NT/DMA MASK CARD aRESET INT/DMA MASK CARD 1RESET (NT/DMA MASK CARD 2

    J RESET IN T /DMA MASK CARD :3

    SET DMA MODE TO 0 I SA8LE

    o SABLE I REQ 5ENABLE INTERRUPTS

    FIXED DISK BIOS ENTRY POINT; - -- - -- - - -- - ---- - - - - ---------- ------- ------ ------------- -DISK 10 PROC- ASSUME

    eMP"AEIN TRET

    HARD DISK:

    A3 :

    A21

    - STIOR"N ZIN TSUBe"p"Ae"p"N Z""P

    FAROS :DATA,ES:NOTHINGDL,080HHARD 01 SK40H -

    AH,AHA3

    TEST FOR FIXED DISK DRIVEYES, HANDLE HEREDISKETTE HANDLER

    J BACK TO CALLER

    J ENABLE INTERRUPTS

    40H RESET NEC WHEN AH=OAH,AHDL, (80H+S MAX FILE- I ) DL IN LIMITS?RET_2 - -AH,8A2GET_PARM_NBP

    GET PARAMETERS I S A SPEC I AL CASE

    SAVE THE BASE POINTERLOAD THE CMD BLOCK PO INTERPUSHNOVSUB 8P,SPSP,8 ALLOCATE SPACE FOR THE COMMAND BLOCKON THE STACK.

    PUSHPUSHPUSHPUSHPUSHPUSHPUSHNOVNOVCALLPUSHCALLMOVMOVPOPMOVPOPPOPPOPPOPPOPPOPPOPADDPOPeMPeMeRETDISK_IO ENDP

    BXexoxDSES51DI51 ,DATADS,SIDISK_IO_CONTAXDSBLAX,DATADS,AXAXAH,DISK STATUSDI -51ESOSOXexBXSP,8BPAH , I

    SAVE REGISTERS DURING OPERATION

    J ESTABLISH DATA SEGMENTPERFORM THE OPERATION

    BE SURE 0 I SABLES OCCURREDESTA8L I SH SEGMENTRESTORE THE REGI STERSGET STATUS FROM OPERATION

    ADJUST FOR THE COMMAND BLOCK.RESTORE 8ASE POINTERSET THE CARRY FLAG TO INDICATESUCCESS OR FAILURETHROW AWAY SAVED FLAGS

    20MB Fixed Disk Drive Adapter BIOS 29

  • 8/2/2019 Technical Reference Options and Adapters Volume 2 4of5

    34/124

    IBM Persona l Computer MACRO Assemb le r Vers ion 2 .00 1-710-28-85[SK2 ---- 10/28 /85 FIXED DISK 8[OS

    . 3 463 5 02A663 6 02A6 032E R63 7 02A8 0347 R63 8 02AA 0350 R63 9 02AC 0359 R64 0 02AE 0362 R641 0280 0369 R64 2 0282 036F R64 3 0284 0375 R644 0286 0326 R645 0288 043F R64 6 028A 04F4 R64 7 028C 0501 R64 8 028E 0515 R64 9 02CO 032E R65 0 02C2 0518 R651 02C4 0527 R65 2 02C6 0533 R65 3 02C8 0539 R65 4 02CA 053F R65 5 02CC 0545 R65 6 02CE 0548 R65 7 '" 002A. 5 8659 0200660 0200 80 FC 01661 0203 74 72 266 3 0205 80 EA 8066 4 0208 80 FA 0866 5 0208 73 49...66 7 0200 C6 06 0074 R 00 8 9.7 0671 02E2 FE C967 2 02E4 C6 46 F8 0067 3 02E8 88 4E FA67 4 02E8 88 6E F867 5 02EE 88 46 FC67 6 02FI AO 0076 R677 02F4 88 46 FD.7 8.7 9.8 0681 02F7 8A EA682 02F9 80 CA 0 I68 3 02FC FE CA68 4 02FE DO E268 5 0300 88 16 0077 R68 6 0304 8A 05687 0306 80 E2 0168 8 0309 81 0568 9 0308 02 E269 0 0300 OA 06691 030F 88 56 F9.9 269 3 0312 66 C8694 0314 8A CO69 5 0 3 1 6 3 2 ED69 6 0 3 1 8 0 1 EI69 7 031A 88 FIb9 8 031C 83 F9 2A699 031F 73 05700 0321 2E : FF A4 02A6 R70 I 032670 2 0326 C6 06 0074 R 0170 3 0328 80 0070 4 0320 C370 5 032E70.70770 870 971 0711 032E712 032E E8 0760 R713 0331 42714 0332 EE715 0333 E8 0071 6 0335 E8 0071 7 0337 E8 00718 0339 EC71 9 033A 24 3F720 033C 74 06721 033E C6 06 0074 R 0572 2 0343 C372 3 0344724 0344 E9 043F R72 572 b 034772 772 872 973 073173 2 034773 3 0347 AO 0074 R73 4 034A C6 06 0074 R 0073 5 034F C3736 035073 773 873 974 0741742 035074 3 0350 80 47744 0352 C6 46 F8 OS745 0356 E9 055E R74 6 0359747

    PAGEMI LA8ELOWOWOWOWOWOWOWOWOWOWOWOWOWOWOWOWOWOWOWOWOWMIL EQU

    01 SK 10 CONT- -CMPJE5UBe"pJAE"OV

    WORDDISK RESETRETURN STATUSDISK READDISK-WR[TE01 SK-VERFFMT TRKFMT-BADFMT-DRV8AD-COMMAND[NIT DRVRD LONGWR-LONGD 15K SEEKDISK-RESETRD 8UFFWR-8UFFTS T ROYHOISK RECALRAM OTAGCHK-DRVCNTLR DIAG$-M1 -PROC NEARAH,OIHRETURN_STATUSDL ,080HDL,MAX FILE8AO_COMMAND

    SET UP COMMAND 8LOCKDEC"OV"OV"OV"OV"OV"OV

    CLCMD 8LOCK+0, 0CMD-BLOCK+2,CLCMD-8LOCK+3,CHCMD-BLOCK+4, ALAL , CONTROL BYTECMD_8LOCK+5,AL

    CALCULATE THE PORT OFFSET"OVORDEC5H L"OV"OVAND"OV5H LOR"OV

    CH,DLDL,1OLOL , IPORT OFF ,D lOL,eHDL , ICL,5OL ,C lDL,DHCMD_BLOCK+ I ,D LCX,AXCL,CHCH,CHCX, IS I , CXCX,MIL8AD COMMAND

    FUNCT [ON TRANSFER TA8LEOOOH001 H002H003H004HDOSHD06HD07HOOSH009HOOAH008HDOCHOODHOOEHOOFHOIOHOIIHQI2Ho13H014HRETURN STATUS

    CONVERT DR I VE NUM8E R TO 0 8ASED RANGELEGAL DR I VE TEST

    SECTORS 0-16 FOR CONTROLLERSET TO ZERO THE OP CODESECTOR AND HIGH 2 6 [T S CY L I NOERCYL I NDER LOW[NTERLEAVE / 8LOCK COUNTCONTROL 8YTE (STEP OPT [ON)SET THE CONTROL F [ELD

    SAVE DL

    GENERATE OFFSETSTORE OFFSETRESTORE D lMAKE DR I VE 0 OR ISHI FT COUNTDRIVE NUMBER (0,1)HEAD NUMBERSET THE DR [V E AND HEADCALCULATE JUMP ADDRESSGET I NTO LOW BYTEZERO HIGH BYTE-2 FOR TA8lE LOOKUPPUT INTO S I FOR BRANCHTEST WITHIN RANGE

    "OV"OVXOR5A L"OVe"pJNBJ" P WORD PTR CS:[SI+OFFSET M Il ; GO DO THE COMMAND8AD COMMAND:- MOV"OVRETD[SK_IO_CONT

    DISK STATUS,8AD CMD SET 8AD COMMAND ERRORAL,O- -; EXIT

    ENDP; ---------- - ----------- - -- ----- ------ - -------; RESET THE DISK SYSTEM (AH '" OOOH) :D[SK RESET

    DRI:

    - CALLINCOUTJ"PJ"PJ"PINANDJZ"OVRETJ"P

    PROC NEARPORT 0ox -DX,AL"2'.2'.2AL,DXA L , O O I I I I I I BORI01 SK_ST ATUS, 8AD _RESET

    DISK_RESET ENDP

    DISK STATUS ROUTINE

    RESET PORTPORT I ADDRESSRESET CARDI/ O DELAY AT LEAST +5usALLOW T I ME TO CLEAR THEHARDWARE STATUS REG (STERREAD THE HARDWARE STATUSMASK OFF UPPER 2 BITS AND CLEAR CYEXIT IF REGISTER IS CLEARED WITH CY",OSET THE ERROR COND I T I ONEX[TSET THE DRIVE PARAMETERS

    (AH '" OOIH); -------- ------------------------------- -- - ------- - ------RETURN STATUS- MOV

    "OVRETRETURN_STATUS

    PROC NEARAL,DISK STATUS01 SK_STATUS, 0ENDP

    ; -- ---- ------------ - ---------; OISK READ ROUTINEDISK READ- MDV

    "OVJ"PDISK_READ

    PROC NEAR~ ~ D D ~ ~ 5 ~ ; ~ ~ . READ CMDDMA-OPN -ENDP

    OBTA[N PREVIOUS STATUSRESET STATUS

    (AH = 002H) :I MODE 8YTE FOR DMA READ

    30 20MB Fixed Disk Drive Adapter BIOS March 17, 1986

  • 8/2/2019 Technical Reference Options and Adapters Volume 2 4of5

    35/124

    IBM Pe r so n a l Computer MACRO Assemble r Vers Ion 2 .00 1-610-28-85lSK2 ---- 10/28/85 FIXED DISK BIOS

    74 674 975075175 2 035975 3 0359 80 4875 4 035B C6 46 F8 OA75 5 035F E9 055E R75 6 036275775 675 976 076176 2 036276 3 0362 C6 46 F6 as76 4 0366 E9 054F R76 5 036976 676 776 676 977 0771 036977 2 0369 C6 46 F6 0677 3 0360 EB OA77 4 D36F77 577 6 D36F77 7 036F C6 46 F6 0777 6 0373 E8 0477 9 037576 0761 037578 2 0375 C6 46 F6 0476 3 037976 476 5 037976 6 0379 60 66 FA CO76 7 0370 E9 054F R78 676 979 079179279 3 0380794 038079 5 0380 IE79 6 0381 06797 0382 5379 679 960 0 0383 2B CO60 I 0385 8E 08602 0387 C4 IE 0104 R60 360460 5 0388 88 ---- R60 6 038E 8E 08607 0390 60 EA 6060 6 0393 80 FA 06609 0396 73 57610 0398 C6 06 0074 R 0061 ! 0390 8A EA61 2 039F 60 CA 0161 3 03A2 FE CA614 03A4 DO E261 5 03A6 66 16 0077 R61 6 03AA 6A D561 7 03AC 60 E2 0161 6 03AF 6A E2619 03B I E6 0760 R62 0 03B4 42621 03B5 42622 03B6 EC62 3 0387 6D FC 0062 4 03BA 75 0462 5 03BC DO E662 6 038E DO E662 7 03CO62 6 03CO 24 03629 03C2 81 0463 0 03C4 02 EO631 03C6 2A E463 2 03C8 03 0863 3 03CA 26: 68 0763 4 03CO 2D 000263 563 6 0300 8A E863 7 0302 25 0300636 0305 DI E6639 0301 DI E664 0 0309 DC I!641 030B 8A C664 2 0300 26: 6A 77 0264 3 03EI FE CE64 4 03E3 6A 16 0015 R64 5 03E7 28 CO64 6 03E964 7 03E9 5864 6 03EA 0764 9 03E8 IF65D 03EC CA 0002651 03EF65 2 03EF C6 06 0014 R 0765 3 03F4 84 07654 03F6 2A CO65 5 03F8 28 0265 6 03FA 28 C965 7 03FC F965 6 03FO E8 EA65 9 03FF

    March 17, 1986

    ; -- - - - -- - - - -- -- - - - - - - - - --- -; DISK WRITE ROUT[NE IAH = 003H) :DISK WR[TE- MOV

    MOVJM PDISK_WRITE

    PROC NEARAL,DMA WR I TE ; MODE BYTE FOR DMA WR I TECMD 8LOCK+O,WRITE CMDDMA-OPN -ENOP. - ----- ---- - -- - - - --------- - - --------- --; DISK VER[FY IAH = 004H)

    DISK VERF- MOVJM PDISK_VERF

    PROC NEARCMD 8LOCK+O,CHK TRK CMONOMA OPN --ENDP-

    ; --- - - -- - - - - - -- - - ---- ----- - -- - - - - - -- - - - - -- -- - - - - - -- - - - --; FORMATTING IAH = 005H 006H OOTHI :FMT TRK PROC- MOV

    JM PFMT _ TRK ENOPFMT 8AD PROC- MOV

    JM PFMT _8AD ENDPFMT ORV PROC- MOVFMT _DR V ENDPFMT CONTI- AND

    JM P

    NEAR ; FORMAT TRACK (AH = 005H ICMO 8LOCK+O,FMTTRK CMOSHORT FMT_CONT -

    NEAR FORMAT BAD TRACK (AH = 006HlCMO 8LOCK+O,FMTBAD CMDSHORT FMT_CONT -

    NEAR FORMAT DR[VE IAH = 007H)CMD_BLOCK +0, FMTDRV _ CMD

    CMD 8LOCK+2,IIOOOOOOB i ZERO OUT SECTOR FJELDNDMA_OPN

    GET PARAMETERS AH = 8 ) :GET PARM NGET-PARM-

    GO:

    G4 :

    - PUSHPUSHPUSHASSUME5U 8MOVLESASSUMEMOVMOVSU8CMPJAEMOVMOVORDECSHLMOVMOVANDMOVCALLINCINCINCMPJN ZSHRSHRANDMOVSHLSU8ADOMOVSU8MOVANDSHRSHRORMOVMOVDECMOVSU8POPPOPPOPRETMOVMOVSU8SUBSU8STCJM P

    LABEL NEARPROC FARDSES8XOS:ABSOAX,AXOS, AX8X,HF_TBL_VECOSIDATAAX,DATAOS,AXDL,80HDL,MAX FILEG4 -DISK STATUS,OCH,OeOL , IOLDL , IPORT OFF tO lDL,cROL , 0000000 I BAH,DlPORT 0OX -OXAL,DXAH,DGOAL , IAL , IAL,OOOOOOl18CL,4A l , C lAH,AH8X,AXAX,ES: (BX]AX ,2CH, A lAX,0300HAX, IAX, IAL,OI IHCl-,ALDH,ES: [8X] [2 ]DHDL,HF NUMAX , AX-8XESOS2DISK STATUS, (N[T FA(LAH,INIT FAIL -AL,A l -OX,OXCX,CXG5ENOP

    GET DR I VE PARAMETERSSAVE REGI STERS

    ESTABLISH ADDRESSING

    EST ABL I SH SEGMENTTEST WITH I N RANGERESET THE STATUS [NDICATORSAVE THE DRIVE

    GENERATE OFFSETSTORE OFFSETRESTORE OLDRIVE 0 OR DRIVE I

    PORT_2 ADDRESSREAD SW I TCH S E l l [NGSDRIVE 0 OR 1R [GHT JUST I FY THE SW ITCH BITS

    ISOLATE THE TABLE BITST ABLE LENGTH IS 16 BYTESADJUST

    MAX NUMBER OF CYLINDERSADJUST FOR O-NAND RESERVE lAST TRACKHIGH TWO 8[TS OF CYLINDER

    SECTORSHEADSO-N RANGEDR I VE COUNT

    RESTORE REGISTERS

    EXITOPERATION FAILED

    SET ERROR FLAGEXIT

    20MB Fixed Disk Drive Adapter BIOS 31

  • 8/2/2019 Technical Reference Options and Adapters Volume 2 4of5

    36/124

    IBM P. rsona l Computer MACRO Assembler Vers i on 2 . 00 1-'10-28-85ISK2 ---- 10/28/85 FIXED DISK BIOS 0.. , 27...70.71.7 2.",..7..7..77.7..7'.. , 2 7 0.. , 2....'7 00'0 1'0 2.0..0.'0''0.' 0 7'0..0..,0.1191291 3 03FF.,..91.917 03FF 013291 8 0401 04919 0402 013292 0 0404 0000921 0406 OB922 0401 05923 0408 10924 0409 CO92 5 0401. 28926 040B 013292 1 0400 II928 040E 00.2.'.0.3193 2 040F 026493 3 0411 04934 0412 026493 5 0414 000093 6 0416 OB93 1 0411 0593 8 0418 2893 9 0419 EO940 041A 42941 041B 029794 2 0410 11943 041E 00947 041F 026794 8 0421 0494 9 0422 026795 0 0424 01 2C951 0426 OB95 2 0427 0595 3 0428 28954 0429 EO95 5 042A 42956 042B 026795 7 0420 It958 042E 000.. ,96 2 042F 013296 3 0431 0896 4 0432 013296 5 0434 008096 6 0436 OB96 1 0431 0596 8 0438 2896 9 0439 EO91 0 0431. 42911 0438015091 2 0430 II913 043E 00

    PAGEI NIT I AL I ZE DR I VE CHARACTER I ST I CSFIXED DISK PARAMETER TABLE

    THE TABLE IS COMPOSED OF A BLOCK DEFINED AS:( I WORD) - MAXIMUM NUMBER OF CYLINDERS(I BYTE) - MAXIMUM NUMBER OF HEADS( I WORD) - STARTING REDUCED WRITE CURRENT CYL( I WORD) - STARTING WRITE PRECOMPENSATION CYLII BYTE} - MAXIMUM ECC DATA BURST LENGTHII BYTE) - CONTROL BYTE IDRIVE STEP OPTION)BIT 1 DISABLE DISK-ACCESS RETRIES

    BIT 6 DISABLE ECC RETRIESBITS 5-3 ZEROBITS 2-0 DRIVE OPTIONII BYTE) - STAND AR D TIME OUT VALUE (SEE BELOW)(1 BYTE) - TIME OUT VALUE FOR FORMAT DRIVE(I BYTE) - T I ME OUT VALUE FOR CHECK OR I VE(I WORD) - LAND I NG ZONE(I BYTEl - SECTORS/TRACK(I BYTE) - RESERVED FOR FUTURE USE

    - TO DYNAMICALLY DEFINE A SET OF PARAMETERSBUILD A TABLE OF VALUES AND PLACE THECORRESPONDING VECTOR INTO INTERRUPT 41 NOTE: THE DEFAULT TABLE IS VECTORED IN FORAN INTERRUPT 19H (BOOTSTRAP)

    ON THE CARD SW ITCH SETT I NGSDRP/E 0 DRIVE I

    ON : I II -1 - -2 - I -3 - -4-:OFF I :

    TRANSLATION TABLEDRIVE 0 : DRIVE I : TABLE ENTRY

    1/2 3 /4ON ON : ON ONON OFF : ON OFF :OFF ON : OFF ON :OFF OFF : OFF OFF :

    FD_TBL:,----- DRIVE TABLE 0

    OW 03060 MAX CYLINDERSDB 0 .0 MAX HEADSOW 03060 START REDUCED WRITE CURRENT CYLOW 0 START WRITE PRECOMPENSATION CYLDB OBH MAX ECC BURST DATA LENGTHDB OOOOOlOIB CONTROL BYTEDB OIOH STANDARD TIME OUTDB OCOH T I ME OUT FOR FORMAT DR I VEDB 028H TIME FOR CHECK DRIVEOW 03060 LANDING ZONEDB 0170 SECTORS/TRACKDB 0 RESERVED

    ;----- OR I VE TABLE IOW 06120 MAX CYL I NDERSDB 0 .0 MAX HEADSOW 06120 START REDUCED WRITE CURRENT CYLOW 0 START WRITE PRECOMPENSATION CYLDB OBH MAX ECC BURST DATA LENGTHDB 0000010lB CONTROL BYTEDB 028H STANDARD TIME OUTDB OEOH T I ME OUT FOR FORMAT DR I VEDB 042H T I ME FOR CHECK DR I VEOW 06630 LAND I NG ZONEDB 0110 SECTORS/TRACKDB 0 RESERVED

    ;----- DRIVE TABLE 2OW 06150 MAX CYLI NOERSDB 0 .0 MAX HEADSOW 06150 START REDUCED WRITE CURRENT CYLOW 03000 START WRITE PRECOMPENSATION CYLDB OBH MAX ECC BURST DATA LENGTHDB OOOOOIOIB CONTROL BYTEDB 028H STANDARD TIME OUTDB OEOH TIME OUT FOR FORMAT DRIVEDB 042H TIME FOR CHECK DRIVEOW 06150 LAND I NG ZONEDB 0170 SECTORS/TRACKDB 0 RESERVED

    ; - - - - - DRIVE TABLE 3OW 03060 MAX CYLINDERSDB 08 0 MAX HEADSOW 03060 START REDUCED WR I TE CURRENT CYLOW 01280 START WRITE PRECOMPENSATION CYLDB OBH MAX ECC BURST DATA LENGTHDB OOOOOIOIB CONTROL BYTEDB 028H STANDARD TIME OUTDB OEOH T I ME OUT FOR FORMAT DR I VEDB 042H T I ME FOR CHECK DR I VEOW 03360 LAND I NG ZONEDB 0110 SECTORS I TRACKDB 0 RESERVED

    32 20MB Fixed Disk Drive Adapter BIOS March 17, 1986

  • 8/2/2019 Technical Reference Options and Adapters Volume 2 4of5

    37/124

    IBM Persona! Computer MACRO Assemble r Vers ion 2 .00 (-1010-28-85lSK2 ---- 10/28/85 FIXED DISK 810S

    9 7 .97597697797 897 9 043F98 098198 298 3 043F C6 46 F8 OC98 4 0443 C6 46 F9 0098 5 0447 E8 0458 R98 6 044A 72 0898 798 898 999 0 044C C6 46 F8 OC99 I 0450 C6 46 F9 2099 2 0454 E8 0458 R993 0457994 0457 C3995 0458996997 0458998 0458 2A CO99 9 045A E8 057C R1 0 0 0 0 4 5 0 73 011001 045F C3\ 002 04601003 0460 8C 09100410051006 0462 28 CO1007 0464 8E 0810080466 C4 IE 0104 R1009 046A 8E 091010101 I101210131014101510161017 046C 421018 0460 421019 046E EC1020 046F 8A 66 F91021 0 4 7 2 8 0 E4 201022 0475 75 041023 0477 DO E81024 0479 00 E81025 04781026 0478 24 031027 0470 81 041028 047F 02 EO10290481 2A E41030 0483 03 081031 0 4 8 5 8 4 0 910321033103410350487 SF 00011036 048A E8 04E9 R1037 0480 72 4C10381039 048F 8F 00001040 0492 E8 04E9 R1041 0495 72 4410421043 0497 8F 00021044 049A E8 04E9 R1045 0490 72 3C10461047 049F 8F 00041048 04A2 E8 04E9 R1049 04A5 72 34t 05 01051 04A7 8F 00031052 04AA E8 04E9 R1053 04AD 72 2C10541055 04AF BF 00061056 04B2 E8 04E9 R1057 0485 72 24\ 05 81059 04B7 SF 00051060 048A E8 04E9 R1061 0 4 8 0 7 2 IC10621063 04BF 6F 00071064 04C2 E8 04E9 R1065 04C5 72 1410661067 04C7 BF 00081068 04CA 26: 8A 011069 04CD A2 0076 R10701071 0 4 0 0 2 6 C91072 0402 B4 OF107304041074 0404 E8 0680 R1075 0407 73 091076 0409 E2 F91077 04081078 0408 C6 06 0074 R 071079 04EO F91080 04E I C31081 04E21082 04E2 4A1083 04E3 EC1084 04E4 24 021085 04E6 75 F31086 04E8 C31087 04E9

    March 17, 1986

    ; ----- - -- ---------- - - ---------------------------- -----; INIT IALIZE DRIVE (AH = 09H) :

    PROC NEARDO OR I VE ZERO"OV"OVCALLJC

    CMD BLOCK+O, INIT ORV CMDCMD-BLDCK+I,O - -INIT DRV RINIT::::DRV::::OUT

    DO DRIVE ONECMD 8LOCK+O,INIT DRV CMD

    SET FOR DR I VE 0SEND THE PARAMETERSERROR?

    "OV"O VCALL CMD-BLOCK+l,OOtOOOOOB SET TO DRIVE IINIT_DRV_R SEND THE PARAMETERSIN IT DRV OUT;- RETlNIT_ORVINIT DRV R

    61 :

    - SUBCALLJNCRET"OVASSUMESUB"O VLES"OV

    PROC NEARAL,ALCOMMANDBI

    CX,DSDS:ABSOAX ,AXDS,AX8X ,H F TBL VECDS,CX- -

    ASSUME DS:DATA.- - - - ------ - -- - - ---- - - - - ---- -----; DETERMINE PARAMETER TABLE OFFSET

    US I NG CONTROLLER PORT TWO ANDDRIVE NUMBER SPECIFIER (0 -1 )INC OXINC oxIN AL,DX"O V AH ,CMD_BLOCK+ IANO AH,OOIOOOOOBJN Z B2SHR AL , ISHR AL , IB2: ANO AL,Ol18"O V CL,4SHL AL,CLSUB AH,AHAOO 8X ,A X

    EXIT

    I SSUE THE COMMANDOX = PORT 0 AFTER CALL

    SAVE SEGMENT

    ESTA8L I SH SEGMENTLOAD THE TABLE VECTORRESTORE SEGMENT

    ADDRESS PORT 2READ THE SW ITCH SETT I NGSDRIVE 0 OR IADJUST

    ISOLATEADJUST

    "O V AH,OOOOl0018 SET MASK FOR DATA MODE CPU TO CARD

    85 :

    83 :

    B6:

    SEND DRIVE PARAMETERS MOST SIGNIFICANT BYTE FIRST"O VCALLJC

    "D VCALLJC"D VCALLJC"OVCALLJC"OVCALLJC"OVCALLJC

    "O VCALLJC"OVCALLJC"OV"O V"OVSUB"D VCALLJNCLOOP"O VSTCRETOECINANOJNZRET

    D I , IINIT DRV S83 - -PI,OINIT DRV S83 - -01,2INIT DRV S83 - -DI ,4INIT DRV S83 - -o [ ,3INIT DRV S83 - -o [ ,6INIT DRV S83 - -DI ,5INIT DRV SB3 - -01,7[NIT DRV S83 - -01,8AL , ES : [8X+D I]CONTROL_ 8YTE, ALCX,CXAH,OOOOl1118HD WA ITB 6 -B5DISK STATUS,INIT_FAIL

    DXAL,DXAL,283

    SEND MS8 OF MAX CYLINDER

    SEND LS 8 OF MAX CYL I NDER

    SEND THE MAX I MUM HEADS

    SEND MS8 OF REDUCE WR I TE CURRENTCYL I NDER

    SEND LSB OF REDUCE WRITE CURRENTCYLINDER

    SEND MSB OF WR I TE PRECOMP CYL I NDER

    SEND ECC BURST LENGTH

    LOAD THE CONTROL BYTE AND PLACE INMEMORY AT 40:76H

    GO WA I T FOR THE STATE TO HAPPENJMP TO READ THE STATUS 8YTETRY AGAINOPERATION FAILEDSET THE ERROR eOND I T I ON

    ADDRESS PORT 0READ STATUS BYTE OF THE OPERATIONMASK ERROR 81 TERROR 81 T SET?INIT_DRV_R ENDP

    20MB Fixed Disk Drive Adapter BIOS 33

  • 8/2/2019 Technical Reference Options and Adapters Volume 2 4of5

    38/124

    IBM Persona l Computer MACRO Assembler Vers ,on 2 .00 \ -1110-28-85ISK2 ---- 10/28 /85 FIXED DISK BIOS10881089\ 09 0\09\ 04E91092 04E9 E8 0680 R1093 04EC 12 051094 04EE 411.1095 04EF 26:10

  • 8/2/2019 Technical Reference Options and Adapters Volume 2 4of5

    39/124

    IBM Persona l Computer MACRO Assembler Vers Ion 2 .00 [ -1210-28-85lSK2 ---- 10/28/85 FIXED DISK 810S

    18018118218318 4185 053F18 6 053F C6 46 F8 EO181 0543 E8 OA188 054518 919 011911192

    11931194 054511950545 C6 46 F8 E31196 0549 E8 041191 0546119811991200120112021203 05481204 0548 C6 46 F8 E41205 054F120612011208120912101211054F1212 054F BO 021213 0551 E8 057C R1214 0554 72 221215 0556 EB 161216 055812110558 C6 06 0074 R 091218 0550 C31219 055E1220 055E E8 06A5 R1221 0561 72 F51222 0563 BO 031223 0565 E8 051C R1224 0568 12 OE1225 056A BO 031226 056C E6 OA1227 056E1228 056E FA1229 056F E4 211230 0511 24 OF1231 0513 E6 211232 0515 E8 0700 R1233 05181234 0518 E8 05AD R1235 051B C31236123712381239124012411242124312441245 051C1246 051C E8 0160 R1241 051F 421248 0580 4212490581 EE1250 0582 421251 0583 2B C91252 0585 EE1253 0586 4A1254 0581 4A1255 05881256 0588 EC1251 0589 24 OF1258 0586 3C 001259 0580 14 091260 058F E2 F11261 0591 C6 06 0014 R 801262 0596 F91263 0597 C31264 05981265 0598 B9 00061266 0598 4A1261 059C 88 F51268 059E 83 ED 081269 05AI FA1210 05A21271 05A2 8A 46 001212 05A5 EE1213 05A6 451274 05A1 E2 F91215 05A9 88 EE1216 05A8 F81211 05AC C31218 05AD

    March 17, 1986

    PAGE; - - --------------------------- - ------- - -- - - - -- - ----------; CONTROLLER RAM DIAGNOSTICS IAH = 012HI :RAM DIAG- MOV

    J" PRAM_D I Ar::.

    PROC NEARCMD BLOCK+O,RAM DIAG CMDSHORT NOMA OPN -ENOP -

    DR I VE 0 I AGNOSTI CS (AH = 013HI :; ------ -- ---- ------ - ------------------------- ------ - -----CHK DRV PROC- MOV

    J" PCHK_DRV ENOP; -- - - -------- ------ --------------------------- ----------; CONTROLLER INTERNAL DIAGNOSTICS {AH = 014Hl :CNTLR DI AG- MOVCNTLR_D I AG

    PROC NEARCMD BLOCK+ 0 ,CNTLR 0 I AG CMOENDP - -

    ; ------- -- ----- ------- ------ - ------------------ ----- - ----; SUPPORT ROUT! NESNOMA OPN:

    G8 :

    - MOVCALLJCJ" P"OYRET

    OMA OPN:- CALL

    G3 :

    Gil:

    JC"OYCALLJC"OYOUTCLIINANDOUTCALLCALLRET

    AL,02HCOMMANDGilSHORT G3

    I S SUE THE COMMAND

    OMA SETUP SET UP FOR OMA OPERAT I ONG8 -AL,03HCOMMAND I SSUE THE COMMANDGilAL,03HDMA+l0,AL INIT IAL IZE THE DISK CHANNEL

    AL, INTAOIAL,ODFHINTA01,ALWAIT_INTERROR_CHK

    NO INTERRUPTSREAD THE MASKENABLE IRQ-5WR I TE THE MASK OUTPROCEDURE DOES ST ISEE I F THERE I S AN ERROREXIT

    ; --------- -------------------------- - -------------------; COMMAND; INPUT TH I S ROUT I NE OUTPUTS THE COMMAND BLOCK

    AL = CONTROLLER DMA/INTERRUPT REGISTER MASKCOMMAND PROC

    CALLINCINCOUTINCSUBOUTDECDECWAIT BUSY:

    C I:

    CM3:

    - INANDC"PJELOOP"OYSTCRET"OYDEC"OYSUBCL I

    NEARPORT 0OX -OXDX,ALOXCX,CXDX,ALOXOXAL,DXAL,OFH

    GET THE BASE ADDRESSADDRESS PORT 2I SSUE CONTROLLER SELECT PULSEADDRESS PORT 3WA IT COUNTWRITE DMA MASK REGISTERADDRESS PORT 1READ THE HARDWARE STATUS

    AL,Rl BUSY OR RI BUS OR R l REQ ; CHECK FOR BUSY,COMMANDCI - - -; ND REQUEST BITSWA I T BUSY KEEP TRY I NG01 SK::::STATUS, T I ME_OUT

    CX,6OXSI ,BPBP,8

    SET THE ERROR CONo I T I ONERROR RETURNSET FOR 6 BYTES OF COMMANDADDRESS PORT 0SAVE THE BASE POINTERSET FIRST BYTE OF COMMAND BLOCKNO I NTERRUPTS I N COMMAND SEQUENCEGET A COMMAND BYTEOYOUT

    INCLOOP"OYSTIRET

    AL , {BP]DX,ALBP ALLOW AT LEAST 2u s BETWEEN EACH BYTEON SEND I NG THE COMMAND SEQUENCE.

    COMMAND ENDP

    C" 3BP,SI DO MORERESTORE THE BASE POINTERI NTERRUPTS BACK ON

    20MB Fixed Disk Drive Adapter BIOS 35

  • 8/2/2019 Technical Reference Options and Adapters Volume 2 4of5

    40/124

    IBM Person " l Computer MACRO Assembler Vers ion 2.00 1-1310-28-85ISK2 ---- 10/28 /85 FIXED DISK 81051219128012811282128312841285128612811288128912901291129212931294129512961291129812991300130113021303 05AD1304 05AD AO 0074 R1305 0580 OA CO13060582 15 011301 0584 C313081309t 31 01311131213131314058513150585 C6 46 F8 0313160569 2A CO13110568 E8 051C R1318 058E 122613191320 05CO 28 FF1321 05C2 89 00041322 05C5 84 DB1323 05C71324 05C1 E8 0680 R1325 05CA 72 lA1326 05CC 4A1327 05CD EC1328 05CE 88 43 F81329 0501 47t 33 0 0502 E2 F31331 0504 B4 OF1332 0506 E8 0680 R1333 0509 12 DB1334 05DB 4A1335 05DC EC1336 0500 A8 021331 05DF 14 OF13381339 05E 1 C6 06 0074 R FF1340 05E61341 05E6 F91342 05E7 C31343 05E813441345 05E8 061E R1346 05EA 062B R1341 05EC 0660 R1348 OSEE 061A R13491350 05FO1351 05FO 8A 5E F81352 05F3 8A C31353 05F5 24 OF1354 05F7 80 E3 301355 05FA 2A FF1356 05FC BI 031351 05FE 03 EB13580600 2E : FF A1 05E8 R13591360 06051361 0605 00 20 40 CC 80 001362 201363 060C 00 401364 = 000913651366 060E1361 060E 04 10 02 00 041368061340 00 00 I I DB1369 = OOOA13101371 06181372 0618 01 02 011313 = 000313741315 061B1316 061B 20 201371 = 0003

    PAGE: -- --- ---- --- --- --------- - ------ --- ----- - - --- -------- ---;;;;;;;;;;;;;;;;;;;

    BYTE 0

    BYTE 1

    BYTE 2

    BYTE 3

    B IT 1B [T 6BITS 5-4BITS 3-0

    BITS 7-681 T 5B[TS 4- 081TS 1 -5BITS 4- 0

    B[TS 1 -0

    SENSE STATUS BYTESADDRESS VALID, WHEN SETSPARE, SET TO ZEROERROR TYPEERROR CODE

    ZERODRIVE (0 -1 )HEAD NUMBERCYL! NDER HIGHSECTOR NUMBER

    CYLI NOER LOWi - ---- - - ---------- ----- ----------- ----------------------ERROR CHK- MOV

    ORJNZRET

    PROC NEARAL,DISK STATUSAL,AL -021

    ; CHECK IF THERE WAS AN ERROR; ANYTHING IN AL?

    . ------------- ---- --------------; PERFORM SENSE STATUSG21 :

    G22:

    G24:

    MDVSUBCALLJC

    SUBMDVMDVCALLJCDECINMDVINCLOOPMDVCALLJCDECINTESTJZMDVSTCRETERROR_CHK

    T_O OWOWOWow

    STAT ERR:- MOVMDVANDANDSUBMDVSHRJMP

    TYPEO TABLE- DBDBTYPEO_LEN

    TYPE 1 TABLE- DBDBTYPE I_LEN

    TYPE2 TABLE- DBTYPE2_LENTYPE3 TABLE- DBTYPE3_LEN

    CMD BLOCK+O, SENSE CMOAL,AL -COMMAND02 4DI ,OICX,4AH,OOOOIOIIBHO WA I TG24OXAL,DX[OI+CMD BLDCK],AL01 -022AH,OOOO! I I IBHD WAITG24OXAL,OXAL,2STAT_ERRDISK_STATUS. SENSE_FA I L

    ENDP

    SENSE STATUS CAN BE ISSUED MULTIPLETIMES

    WRITE ZERO IN INT/OMA MASK[SSUE SENSE STATUS COMMANDCANNOT RECOVER-EX I T WITH COMMANDERRORSET [NDEX PO I NTER TO ZEROREAD FOUR BYTESSET MASK FOR DATA MODE CARD TO CPUGO WAIT FOR DATA INPUT STATEADDRESS PORT 0READ THE DATA BYTESTORE AWAY SENSE BYTESNEXT DATA LOCAT[ONLOOP TILL ALL FOUR READ.SET THE MASK FOR STATUS MODEGO WAIT FOR STATUS STATEADDRESS PORT 0READ THE STATUS BYTESENSE OPERATION FAIL?GO GET THE ERROR.SET SENSE OPERAT[ON FAIL

    TYPE 0 ERROR TYPE .JUMP TA8LETYPE-ITYPE-2TYPE::)

    BL,CMD BLOCK+O GET ERROR BYTEAL,BL -AL,OFHBL,00110000B ISOLATE THE TYPE OF ERRORBH,BHCl ,3BX , CL ; AD.JUSTWORD PTR CS:{8X + OFFSET T_O)LABEL BYTE0, BAD _ CNTLR ,BAD_SEEK, WR I TE_F AUL T , T [ME_OUT. 0 ,BAD_CNTLRo BAD SEEKEQU - S-TYPEO_TABLELABEL BYTERECORD NOT FND. BAD ECC, BAD ADDR MARK. 0, RECORD NOT FNOBAD SEEK ,0-;-0 ,DATA C:ORRECTED,BAO-TRACK --EQU- S-TYPEI_TABLE -LABEL BYTEBAD CMO ,BAD ADDR MARK ,BAD CMDEQU- S-TYPE2_TABLE -LABEL BYTE~ ~ ~ _ C N T L ~ ~ ~ ~ ~ E ~ ~ ~ ~ ~ L ~ A D _ ECC

    36 20MB Fixed Disk Drive Adapter BIOS March 17,1986

  • 8/2/2019 Technical Reference Options and Adapters Volume 2 4of5

    41/124

    IBM Persona l Computer MACRO Assernbler Vers ion 2 .00 1-1410-28-85ISK2 ---- 10 /28 /85 FIXED DISK BIOS

    1318131913801381 ablE1382 ablE BB 0605 R1383 Ob21 3C 091384 0623 13 621385 0625 2E : 01! 38 6 Ob21 A2 0014 R1381 062A C313881389t 39 01391 062B1392 Ob2B BB ObOE R1393 Ob2E 8B CB1394 0630 3C OA1395 0632 13 53139b Ob34 2E : 011391 Ob36 A2 0014 R1398 0639 80 E 1 081399 063C 80 F9 OB1400 Ob3F 15 29140 I140214031404 0641 C6 46 F8 001405 Ob45 2A CO1406 0641 E8 051C R1401 064A 12 IE1408 064C B4 OB1409 Ob4E E8 06BO R1410 0651 12 171411 0653 4A1412 Ob54 EC1413 0655 8A C81414 0657 B4 OF14150659 E8 0680 R1416 065C 72 OC1417 Ob5 4A1418 065F C14190660 A8 021420 0662 14 Ob1421 0664 C6 06 0074 R 201422 Ob69 F91423 066A1424 066A 8A Cl1425 066C C31426142714281429 06601430 0660 BB 0618 R1431 Ob70 3C 031432 0672 13 131433 0674 2: 071434 0676 A2 0074 R1435 0679 C314361437143B1439 061A1440 067A BB 061B R1441 0670 3C 031442 067F 13 061443 0681 2E: 071444 0683 A2 0074 R1445 0686 C314461447 06871448 Ob87 C6 Ob 0074 R BB1449 068C C3145014511452145314541455 Ob801456 0680 511451 068E 2B C91458 06901459 0690 E8 0760 R1460 0693 421461 0694 C1462 0695 24 OF1463 0697 3A C41464 0699 74 08\ 46 5 069B E2 F31466 0690 C6 06 0074 R 801467 06A2 F91468 06A31469 06A3 591470 06A4 C31471 06A5

    March 17, 1986

    PAGE TYPE 0 ERROR

    MOVeM p"AEXLATMOVRET

    eX,OFFSET TYPED TABLEAL,TYPEO LEN -UNDEF ERR LCS:TYPEO TABLE01 SK_STATUS,AL

    :------ TYPE I ERRORTYPE_l : MOV

    MOVeMP"AEXLATMOVANDeMP"N Z

    BX,OFFSET TYPE I_TABLECX,AXAL , TYPE 1 LENUNOEF ERR LCS:TYPEI TABLEDISK STATUS,ALCL,OSHCL ,08HG30

    OBTAIN ECC ERROR BURST LENGTH~ ~ ~ A ~ L O C K + 0 ,R D_ ECC_ CMOCOMMANDG30

    CHECK I F ERROR I S OEF I NEDT ABLE LOOKUPSET ERROR CODE

    CHECK I F ERROR IS OEF I NEDT ABLE LOOKUPSET ERROR CODECORRECTED ECC

    I SSUE THE COMMANDMOVSUBCALLXMOVCALL"eDECINMOVMOVCALL"eDECINTEST"ZMOVSTG

    AH,OOOOI01IBHD WAI T SET MASK FOR DATA INPUT CARD TO CPUGO WAIT FOR THE INPUT STATE

    G30 :

    GiOOXAL,OXCL,ALAH,OOOOII I IBHD WAI TG30OXAL.DXAL,2G3001 SK_ST ATUS, BAD_CNTLR

    MOV AL,CLRET

    TYPE 2 ERROR

    MOVeM p"AEXLAT"O VRET

    BX , OFFSET TYPE2 TABLEAL. TYPE2 LEN -UNDEF ERR LCS :TYPE2 TABLEDISK_STATUS,AL

    TYPE 3 ERROR

    MOVeMp"AEXLAT"O VRET

    BX , OFFSET TYPE3 TABLEAL , TYPE3 LEN -UNDEF ERR LCS : TYPE3 TABLE01 SK_STATUS,AL

    UNDEF ERR L :- MOV DISK_STATUS, UNDEF_ERRRET. - - - - - - - - - - - - - - - - - - - - -- - - - - -- - - - - - - - --

    ADDRESS PORT 0READ THE LENGTH OF THE ERRORCORRECTED AND SAVE IN CLSET MASK FOR STATUS STATEGO WAIT FOR STATUS STATEADDRESS PORT 0READ THE STATUS BYTEERROR BIT SEn

    CHECK I F ERROR I S DEF I NEDTABLE LOOKUPSET ERROR CODE

    CHECK I F ERROR I S OEF I NEDT ABLE LOOKUPSET ERROR CODE

    ; ON ENTRY AH CONTA I NS THE CONTROLLER BUS STATUS DECODE :; MASK USED TO CHECK THE HARDWARE STATUS. :. - - - - - - --- - - - - - - - - - - - - - - - - - -- - - - - -- - - - - - - - - -- - - - - - - - - ---HD_WAIT PROC NEARPUSH CX SAVE CXSUB CX , CX SET THE LOOP COUNT

    PORT 0OX - PORT 1 ADDRESSREAD-THE HARDWARE STATUSCALLINCINANDeMp"ZLOOP"O VST e

    AL,DXAL,OOOOII I IBAL,AH CLEAR UPPER NIBBLE OF HARDWARE STATUSCHECK THE STATE WITH THE MASKL2 .)MP t F o. K W TH CARRY CLEAREDL I TRY AGAINo SK_ST ATUS. T I ME_OUTSET ERROR CONO I T I ON

    L2 : ex RESTORE CX

    20MB Fixed Disk Drive Adapter BIOS 37

  • 8/2/2019 Technical Reference Options and Adapters Volume 2 4of5

    42/124

    IBM Persona l Computer MACRO Assembler Vers ion 2.00 1-1510-28-85ISK2 ---- 10128185 FIXED DISK BIDS

    147214131474147514761477147814791480148 I14821483 06A51484 06A5 80 7E FC 811485 06A9 72 0214861487 06AB F91488 06AC C314891490 D6AD1491 06AD FA1492 D6AE E6 DC1493 06BO BI 041494 0682 E6 081495 0684 8C CO1496 D6B6 D3 CO1497 06B8 8A E81498 068A 24 FO1499 D6BC 03 C31500 D6BE 80 05 0015011502 06CI 88 FO1503 06C3 E6 061504 06C5 8A C41505 06C7 E6 061506 06C9 8A C51507 06CS 24 OF1508 06CO E6 821509151015111512 06CF 8A 66 FCt 51 3 0602 DO E41514 0604 32 CO1515060648t 51 61517151815190607 80 7E F8 E51520 06DB 74 0615211522 0600 80 7E F8 E61523 06El 75 OF1524 06E31525 06E3 88 02041526 06E6 531527 06E7 2A FF1528 06E9 8A 5E FC1529 D6EC 521530 D6ED F7 E31531 06EF 5A1532 06FO 581533 D6FI 481534 06F21535 06F2 86 C81536 06F4 E6 071537 OoF6 8A C41538 06F8 E6 071539 06FA F81540 06FB 88 C61541 06FD 03 Cl1542 06FF C315431544 0700

    PAGE; -------------- -----------------------------DMA SETUP; - THIS ROUTfNE SETS UP FOR DMA OPERATIONS.INPUT (ALl = MODE BYTE FOR THE DMA(ES:BX) = ADDRESS TO READ/WRITE THE DATAOUTPUT; (AX' DESTROYED; ----------- - -------------------------------------------

    DMA SETUP

    ,)1:

    - CMPJBSTCRET

    CLIOUTMOYOUTMOYROLMOYANDADDAOCMDYOUTMOYOUTMOYANDOUT

    PROC NEARCMO BLOCK+4,81 HJ I -

    DMA+12,ALCL,4OMA+ I I ,ALAX,ESAX,CLCH,ALAL,OFOHAX,BXCH,OS [ ,A XDMA+6,ALAL,AHDMA+6,ALAL,CHAL,OFHDMA_HIGH,AL

    ;------ DETERMINE COUNTMOYSHLXORDEC

    AH,CMD BLOCK+4AH, I -AL,ALAX

    BLOCK COUNT OUT OF RANGE

    SET THE ERROR COND I T I ON

    NO MORE INTERRUPTSSET THE FIRSTfLAST F IFSH 1FT COUNTOUTPUT THE MODE 8YTEGET THE ES VALUEROTATE LEFTGET HIGHEST NIBBLE OF ES TO CHZERO THE LOW NIBBLE FROM SEGMENTTEST FOR CARRY FROM ADD I T I ONCARRY MEANS HIGH 4 B[TS MUST BE [NCSAVE START ADDRESSOUTPUT LOW ADDRESSOUTPUT HIGH ADDRESSGET HIGH 4 BITSOUTPUT THE HIGH 4 BITS TO PAGE REG

    RECOVER BLOCK COUNT, MULTIPLY BY 51 2 BYTES PER SECTOR; CLEAR LOW BYTEAND DECREMENT VALUE BY ONE

    HANDLE READ AND WRITE LONG (5160 BYTE BLOCKS)

    ADD4:

    ,)20:

    CMPJECMPJNEMOYPUSHSUBMOYPUSHMULPOPPOPDECMOYOUTMOYOUTST IMOYADORET

    CMD BLDCK+O,RD LONG CMDADD4 - -AX,516DBXBH,8HBL,CMD BLOCK+4OX -BXOXBXAXCX,AXOMA+7,ALAL,AHDMA+7,ALAX,51AX,CX

    DMA_SETUP ENDP

    ONE BLOCK (512) PLUS 4 BYTES ECC

    BLOCK COUNT TIMES 51 6

    ADJUSTSAVE COUNT VALUELOW BYTE OF COUNTHIGH BYTE OF COUNTINTERRUPT 5 BACK ONRECOVER ADDRESS VALUEADD, TEST FOR 64K OVERFLOWRETURN TO CALLER,

    CY SET BY ABOVE I F ERROR

    38 20MB Fixed Disk Drive Adapter BIOS March 17,1986

  • 8/2/2019 Technical Reference Options and Adapters Volume 2 4of5

    43/124

    IBM Persona l Computer MACRO Assembler Vers 'on 2.00 1-1610-28-85ISK2 ---- 10{28{85 FIXED DISK BIOS

    15451546154115481549155015 5 I15521553 070015541555 0700 FB1556 0101 8C DB1551 0103 2B CO1558 0705 8E 081559 0701 C4 36 0104 R156015611562 070B 8E DB1563156415651566 0700 2A FF1561 010F 26: 8A 5C1568 0113 8A 66 F81569 0716 80 FC 041510 0719 15 0615111512 071B 26: 8A 5C1513 071F EB 0915740721 80 FC E31575 0724 75 0415761577 0726 26: 8A 5C1578 07211.1579 072A F81580 072B B8 90001581 072E CO 151582 0730 FB15831584 0131 2B C91585158615871588 07331589 0733 E8 0160 R1590 0736 421591 0131 EC1592 0138 11.8 201593 07311. 15 Oil.15941595 013C E2 F51596 013E 4B1591 073F 75 F21598

    09

    OA

    OB

    1599 0741 C6 06 0074 R 801600 07461601 0746 411.1602 0747 EC1603 0748 24 021604 074A 08 06 0074 R1605 074E 83 C2 031606 0151 32 CO1607 0753 EE1608 0754 C316091610 075516111612161316141615161616171618 015516190755 501620 0156 BO 011621 0158 E6 OA1622 01511. FA1623 075B E4 211624 0150 OC 201625 015F E6 211626 0761 BO 201627 0763 E6 201628 0165 FB1 6 2 9 0 7 6 6 8 8 91001630 0169 CO 151631 016B 581632 016C CF1 6 3 3 0 1 6 016341635163616311638163916401641 01601642 0760 BA 03201643 0170 02 16 0011 R1644 0174 C31645 017516461647 07751648 01751649

    March 17, 1986

    PAGE:- ; ~ ~ - ~ ~ ~ - - - - - - ---- ---------------; - THIS ROUTINE WAITS FOR THE FIXED DISK; CONTROLLER TO SIGNAL THAT AN INTERRUPT; HA S OCCURRED.

    WAIT INT PROC NEAR- ASSUME DS:ABSO

    ; --

    W5:

    W4:

    WI :

    W2:

    ST IMO'SUBMO'LESASSUMEMO'

    BX,DSAX,AXOS,AXSI,HF_TBL_VECOS: DATA, ES : NOTH I NGDS,BX

    SET TIMEOUT VALUESSUB SH,BHMO' BL ,BYTE PTR ES : [ S [ ] (9 )MO' AH,CMD BLOCK+OeMP AH,FMTDRV_CMDJN Z 05MO' BL,BYTE PTR ES: [S [ ) [OAH]JMP SHORT O.CMP AH,CHK_DRV_CMDJN Z O.MO' BL,BYTE PTR ES: [S I ) [OBH)eLCMO ' AX,9000HIN T 15HST ISUB CX,CXWA [T FOR 1 NTERRU PT

    CALLINCINTESTJN ZLOOPDECJN Z

    PORT 0ox -AL,OXAL,020H0201BX01

    MOV DISK STATUS,TIME_OUTDECINANDORADOXOROUTRET

    oxAL,DXAL,2DISK STATUS,ALDX,3 -AL,ALOX,ALENDP

    ;--- HD IN T

    TURN ON INTERRUPTSSAVE OSEST ABL I SH SEGMENTLOAD THE TABLE VECTOR

    RESTORE OS

    LOAD THE STANDARD T I ME OUT

    LOAD THE FORMAT DR I VET[ME OUT VALUE

    ; LOAD THE CHECK DR I VECLEAR Tl ME OUT VALUEDEV I CE WA I T INTERRUPTENABLE [NTERRUPTS FOR PC ANDXT MACH I NES.SET THE LOOP COUNT

    PORT I ADDRESSREAD-THE HARDWARE STATUS0 [0 I NTERRUPT OCCUR.JUMP [F YESINNER LOOPOUTER LOOP

    ADDRESS PORT 0READ THE STATUS BYTEISOLATE THE ERROR B[TSAVE I N THE STATUSPORT 3 ADDRESSZERO-RESET I NTERRUPT MASK

    FIXED DISK INTERRUPT ODH ROUTINE IRQ-5

    PRoe NEARPUSH AXMOV AL,07HOUT DMA+IO,ALeL iIN AL, INTAOIOR AL,020HOUT INTAOI,ALMOV AL,EOIOUT [NTAOO,ALST IMOV AX,9100HIN T 15HPOP AXIRETENDP:- ~ ~ ~ ~ ~ - - - - - - - - - - - - - - - - - -------- ---------GENERATE PROPER PORT VALUEBASED ON THE PORT OFFSET

    PORT_O PROeMOVADORETPORT_O ENOP

    END ADDRESSCODE ENDSEND

    NEAROX,HF PORTOL,PORT_OFF

    LABEL BYTE

    SAVE WORK REGISTERSET OMA MODE TO 0 I SABLENO INTERRUPTSLOAD THE I NTERRUPT ENABLE MASKTURN OFF FIXED DISK IRQ-5REPLACE THE MA SKLOAD THE END OF INTERRUPT MASKCLEAR THE ACT [VE I NTERRUPT LEVELI NTERRUP TS BACK ONDEV IC E POSTINTERRUPTRESTORE AX

    BASE VALUEADD [N OFFSET VALUE (00,04,08,OC)

    20MB Fixed Disk Drive Adapter BIOS 39

  • 8/2/2019 Technical Reference Options and Adapters Volume 2 4of5

    44/124

    Notes:

    4020MB Fixed Disk Drive Adapter BIOS March 17, 1986

  • 8/2/2019 Technical Reference Options and Adapters Volume 2 4of5

    45/124

    Index

    addresses, port 14

    [!JBIOS listings 23block diagram 2

    command summary 10connectors 17control byte 8controller, fixed disk 1

    [EJdata register 7description 1

    [!]error tables 5

    fixed disk controller 1fixed disk drive types 3

    interface 15interface signalsAEN 15AO-AI9 15-DACK 3 16DO-D7 15DRQ 3 15-lOR 15-lOW 15IRQ 5 15RESET 15

    logic diagrams 19

    March 17, 1986 20MB Fixed Disk Drive Adapter Index-l

  • 8/2/2019 Technical Reference Options and Adapters Volume 2 4of5

    46/124

    port addresses 14programmingconsiderations 3programming summary 14

    registers 1

    sense bytes 4specifications 17status register 4switch settings 3

    TTL levels 17

    Index-220MB Fixed Disk Drive Adapter March 17, 1986

  • 8/2/2019 Technical Reference Options and Adapters Volume 2 4of5

    47/124

    - - - -- - -- ------ ---- - --------_.- Personal ComputerHardware ReferenceLibrary

    mMAsynchronousCommunicationsAdapter

    6361501

  • 8/2/2019 Technical Reference Options and Adapters Volume 2 4of5

    48/124

    i i

  • 8/2/2019 Technical Reference Options and Adapters Volume 2 4of5

    49/124

    Contents

    Description .................................... 1Programming Considerations ...................... 3Modes Of Operation ......................... 3Line-Control Register ........................ 5Programmable Baud-Rate Generator ............ 7Line Status Register (LSR) ................... 10Interrupt Identification Register (IIR) .......... 12Interrupt Enable Register .................... 14Modem Control Register .................... 15Modem Status Register ...................... 16Receiver Buffer Register ..................... 18Transmitter Holding Register ................. 19Selecting the Interface Format and Adapter Address 20Interrupts ................................ 21Interface ..................................... 23Voltage Interchange Information .............. 24INS8250 Functional Pin Description ........... 25Specifications ................................. 31Logic Diagrams ................................ 33

    Index ........................................ Index-l

    iii

  • 8/2/2019 Technical Reference Options and Adapters Volume 2 4of5

    50/124

    jv

  • 8/2/2019 Technical Reference Options and Adapters Volume 2 4of5

    51/124

    DescriptionThe Asynchronous Communications Adapter's system controlsignals and voltage requirements are provided through a 2- by31-position card-edge connector. Two jumper modules areprovided on the adapter. One jumper module selects eitherRS-232C or current-loop operation. The other jumper moduleselects one of two addresses for the adapter, so two adapters maybe used in one system. An additional jumper is required onconnector J13 if the adapter is to be installed in expansion slot 8of an IBM Personal Computer XT or IBM Portable PersonalComputer (see "Selecting the Interface Format and AdapterAddress" in this section).The adapter is fully programmable and supports asynchronouscommunications only. It will add and remove start bits, stop bits,and parity bits. A programmable baud-rate generator allowsoperation from 50 baud to 9600 baud. Five-, six-, seven-, oreight-bit characters with 1, 1-1/2, or 2 stop bits are supported. Afully prioritized interrupt system controls transmit, receive, error,line status, and data set interrupts. Diagnostic capabilities provideloop back functions of transmit! receive and input/output signals.The major component of the adapter is an INS8250 LSI chip orfunctional equivalent. Features in addition to those listed aboveare: Full double buffering eliminating the need for precisesynchronization Independent receiver clock input False-start bit detection Line-break generation and detection

    Asynchronous Adapter 1

  • 8/2/2019 Technical Reference Options and Adapters Volume 2 4of5

    52/124

    Modern control functions:Clear to send (CTS)Request to send (RTS)Data set ready (DSR)Data terminal ready (DTR)Ring indicator (RI)Carrier detect (CD)

    All communication protocol is a function of the system microcodeand must be loaded before the adapter is operational. All pacingof the interface and control signal status must be handled by thesystem software. The following figure is a block diagram of theIBM Asynchronous Communications Adapter.

    Address Bus Address ChipDecode r.S::""e-+le-c-:"tData Bus- - - - - - - - - - ~ l n ~ t e ~ r ~ r u ~ p ~ t - - - - - - - - ~ 8 2 5 0

    4------------------------1 AsynchronousOscillator Communications1.8432 MHz I - - - - - - . t Element

    EIAReceivers

    ACurrent Loop

    25-Pin D-SheliConnector

    Asynchronous Communications Adapter Block Diagram

    2 Asynchronous Adapter

  • 8/2/2019 Technical Reference Options and Adapters Volume 2 4of5

    53/124

    Programming Considerations

    Modes Of OperationThe different modes of operation are selected by programmingthe 8250 Asynchronous Communications Element. This is doneby selecting the I/O address (hex 3F8 to 3FF primary, and hex2F8 to 2FF secondary) and writing data out to the adapter.Address bits AO, Al, and A2, select the different registers thatdefine the modes of operation. Also, bit 7- the divisor latchaccess bit (DLAB)-of the line-control register is used to selectcertain registers.

    I/O Decode (in Hex)Primary AlternateAdapter Adapter Register Selected DLAB State

    3F8 2F8 TX Buffer DLAB = 0 (Write)3F8 2F8 RX Buffer DLAB = 0 (Read)3F8 2F8 Divisor Latch LSB DLAB = 13F9 2F9 Divisor Latch MSB DLAB = 13F9 2F9 Interrupt Enable Register3FA 2FA Interrupt Identification Registers3FB 2FB Line Control Register3FC 2FC Modem Control Register3FD 2FD Line Status Register3FE 2FE Modem Status Register

    110 Decodes

    Asynchronous Adapter 3

  • 8/2/2019 Technical Reference Options and Adapters Volume 2 4of5

    54/124

    Hex Addresses 3F8 to 3FF AND 2F8 TO iFFA9 A8 A7 A6 A5 A4 A3 A2 A1 AO DLAB Register1 1/0 1 1 1 1 1 x x x

    0 0 0 0 Receive Buffer (read).TransmitHolding Reg. (write)

    0 0 1 0 Interrupt Enable0 1 0 x Interrupt Identification0 1 1 x Line Control1 0 0 x Modem Control1 0 1 x Line Status1 1 0 x Modem Status1 1 1 x None0 0 0 1 Divisor Latch (LSB)0 0 1 1 Divisor Latch (MSB)

    Note: Bit 8 will be logical 1 fo r the adapter designated as primary or a logical 0for the adapter designated as alternate (as defined by the address jumpermodule on the adapter).A2, A 1 and AO bits are "don't cares" and are used to select the differentregister of the communications chip.

    Address Bits

    INS8250The INS8250 has a number of accessible registers. The systemprogrammer may access or control any of the INS8250 registersthrough the system unit's microprocessor. These registers areused to control INS8250 operations and to transmit and receivedata. The following figure provides a listing and description ofthe accessible registers.

    4 Asynchronous Adapter

  • 8/2/2019 Technical Reference Options and Adapters Volume 2 4of5

    55/124

    Register/Signal Reset Control Reset StateInterrupt Enable Register Master Reset All bits Low (0-3 Forced and

    4-7 Permanent).Interrupt Identification Master Reset Bit 0 is High, Bits 1 and 2 LowRegister Bits 3-7 are Permanently LowLine Control Register Master Reset All Bits LowModem Control Register Master Reset All Bits LowLine Status Register Master Reset Except Bits 5 and 6 are HighModem Status Register Master Reset Bits 0-3 Low

    Bits 4-7 - Input SignalSOUT Master Reset HighINTRPT (RCVR Errors) Read LSR/MR LowINTRPT (RCVR Data Ready) Read RBR/MR LowINTRPT (RCVR Data Ready) Read IIRI Low

    Write THR/MRINTRPT (Modem Status Read MSR/MR LowChanges)OUT2 Master Reset HighRTS Master Reset HighDTR Master Reset HighOUT 1 Master Reset High

    Asynchronous Communications Reset Functions

    Line-Control RegisterThe system programmer specifies the format of the asynchronousdata communications exchange through the line-control register.In addition to controlling the format, the programmer mayretrieve the contents of the line-control register for inspection.This feature simplifies system programming and eliminates theneed for separate storage in system memory of the linecharacteristics.

    Asynchronous Adapter 5

  • 8/2/2019 Technical Reference Options and Adapters Volume 2 4of5

    56/124

    The contents of the line-control register are as follows:Hex Address 3FBBit 7 6 5 4 3 2 1 a