+ All Categories
Home > Documents > PS2 and PC BIOS Interface Technical Reference Apr87

PS2 and PC BIOS Interface Technical Reference Apr87

Date post: 03-Jun-2018
Category:
Upload: kgrhoads
View: 231 times
Download: 0 times
Share this document with a friend

of 218

Transcript
  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    1/218

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    2/218

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    3/218

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    4/218

    Preface

    This technical reference provid

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    5/218

    Section 2 Interrupts, cinterrupts function across tPersonal Computer producare noted.

    Section 3 BIOS Data Arinformation about regular

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    6/218

    Contents BIOS

    Section 1. Introduction to B

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    7/218

    Adapter ROMVideo Function Compatibili ty

    . Video Presence Test Video Mode Switching

    Multitasking Provisions System Identification Application Guidelines

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    8/218

    Figures BIOS

    2-1. Interrupts

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    9/218

    3-25. Fixed Disk Drive ParProducts Except Mod

    3-26. Fixed Disk Drive DriBIOS Dated 11/10/82

    3-27. Fixed Disk Drive ParDated 11/10/82)

    3 28 Fixed Disk Drive Par

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    10/218

    Section 1. Introduction to

    Interrupts

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    11/218

    Notes:

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    12/218

    The Basic Input/Output SystemPersonal Computer products isisolates operating systems andhardware devices. BIOS routiprogrammers to perform blockconcern for device addressesThe BIOS also provides system

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    13/218

    To read the time, the following

    OV AH 0INT l H

    ;Function s

    ;Read the time

    The BIOS interrupt handlers savand those registers that return a

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    14/218

    To determine the BIOS versioprogram. The date that is dispfor that system:

    10 DEF SEG= HF00020 FOR X= HFFF5 TO HFFFC30 PRINT CHR (PEEK(X;

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    15/218

    Notes:

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    16/218

    Section 2 nterrup

    Interrupt 02H - Nonmaskable

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    17/218

    Notes

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    18/218

    The following figure lists eachapplicable, the location of a m

    InterruptNumber (Hex)

    1

    Interrupt Fun

    Divide by 0Single Step

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    19/218

    Interrupt 02H - Nonmask

    For PCjr the nonmaskable ininterrupt.

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    20/218

    For PC Convertible, the NMI the real-time clock, and the syactivated upon the I/O channel

    Notes:

    1 An 8087 math coprocesso

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    21/218

    Interrupt 05H Print Scr

    This interrupt handler prints issued the cursor position isof the interrupt INT 05H run

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    22/218

    Interrupt 08H System

    This interrupt handler contthe system timer. The input fis 65536 resulting in approxim

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    23/218

    Interrupt 09H Keyboard

    This interrupt h ndler is issukeystroke.

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    24/218

    For AT BIOS dated 6/10/85 andConvertible, and Personal SysKeyboard Intercept), is issued

    60H. This allows the system tof Interrupt EOI) processing i

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    25/218

    Interrupt 10H Video

    The following is a summary

    AH) = OOH - Set Mode

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    26/218

    AH) = OOH - Set Mode

    AL) Requested

    The fol lowing table describes

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    27/218

    Mode Display BoxHex) Size Size Supporting I

    2 3 640x200 8x8 PCjr CGA640x200 8x8 EGA, and P

    Except Mo

    640x350 8x14 EGA and P

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    28/218

    Notes:

    1 P jr and IBM Color/Gra

    a. The cursor is not dib. Modes 0 2 and 5 a

    color burst is not ena

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    29/218

    4. Personal System 2 Mod

    a. The cursor is not dispb. Modes 0, 2, and 5 arc. The power-on default d. During mode set, if bi

    cleared.

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    30/218

    Notes:

    1. The BIOS maintains o

    2. For Personal Systemhardware video ports,multiplied by 2 and in

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    31/218

    AH) OS - Select Acti

    For PCjr

    AL) = 80H - Readpage

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    32/218

    AH) = 08H - Read AHri

    BH) - Page numbermaximum pag

    On Return:AL) - CharacterAH) Att ib t

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    33/218

    AH) = OAH - Write Cha

    BH) - Page number

    maximum pagCX) - Count of chAL) - Character to

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    34/218

    For graphics modes suppo

    BH) - Page numbermaximum pag

    AH) O H - Read Dot

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    35/218

    AH) 10H - Set Palette R

    For PCjr systems with EGproducts except Model

    Al) = 00H Set iBl) PaletteBH) V l

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    36/218

    Al) = 10H - Set iBX) - ColorDH) - Red vaCH) - GreenCl) - Blue v

    Al) = 11H - Rese

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    37/218

    Al) = 14H - Reser

    Al) = 15H - ReadBX) - Color

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    38/218

    For Personal System 2

    AL) 00H

    BX) = 0712H

    AL) = 01H to 02H

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    39/218

    Al) = I7H ReadES:DX) Poi

    Tabgree

    BX) First cCX) Number

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    40/218

    AL) = 03H - SetBL) - Chara

    CharactBL)Charact

    BL)

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    41/218

    Al) = 10H - UserES:BP) - Poi

    CX) - CountDX) - CharactBl) - BlockBH) - Number

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    42/218

    On Return:CX) - Points

    OL) - RowsES:BP) - Point

    For Personal System 2

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    43/218

    AL) = 04H - RO 8xBL) - Block t

    Register values AL) =AL) OOH 01H, 02H, and

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    44/218

    Al) = 14H - ROBl) - Block

    Al) = 20H - SetES:BP) - Po

    Al) = 21H - Set

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    45/218

    For Personal System 2

    AL) = 00H - User a

    ES:BP) - PoinCX) - Count tOX) - CharactBL) - Block tBH) = 16 byte

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    46/218

    A block specifier commandcharacter load command tocharacter set.

    Al) = 04H - ROBl) - Block

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    47/218

    Al) = 24H RO 8xBl) - Row sp

    Note: AL) 20H, 21 Himmediately after a

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    48/218

    For Personal System/2 prod

    BL) 30H - Sele

    TakAL) = 0 - 21 - 3

    = 2 - 4

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    49/218

    Note: When enabled, summMode) color registerRegisters).

    BL) 34H - CursorAL) = 0 - Ena

    1 Di

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    50/218

    On Return:AL) = 12H Fu

    BL) = 34H Rese

    Note: When enabled, suM d ) l i

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    51/218

    The following steps in

    1. Initial adapter vid2. Initial system boa

    The initiate display swtim switching is initswitching between the

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    52/218

    AL) = 00HBL) - Attrib

    String

    AL) = 01HBL) - AttribString

    AL) = 02H

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    53/218

    AL) = 03H to FFH -

    For all others no action is p

    AH) = 15H - Return PhysDisplay

    F PC C tibl

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    54/218

    AH) 1 AH - Read/Writ

    For Personal System/2 prod

    AL) = 00H - Read

    On Return:

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    55/218

    AH) = 1BH - Return Func

    For Personal System 2

    BX) - ImplementatES:DI) - User buff

    O Return:

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    56/218

    DI+2BH) byte - PP

    = 0= 1

    = 2

    = 2

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    57/218

    DI+32H) byte - SaBits Bit 5Bit 4

    Bit 3Bit 2Bit 1Bit 0

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    58/218

    03H) to 07H)

    07H) byte SBitBit Bit Bit

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    59/218

    0EH) byte - SaBitsBit 5

    Bit 4Bit 3Bit 2

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    60/218

    On Return:AL) = lCH Fu

    Requested

    Supported save/res

    Bi 5 3 R

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    61/218

    Interrupt H Equipme

    This routine returns the optionasystem. BIOS data area 40:10 POST as follows:

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    62/218

    Interrupt 12H Memory

    This routine returns the amountdetermined by the POST mExtended BIOS Data Area. See

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    63/218

    Interrupt 13H Diskette

    This interface provides access tsummary of the diskette funct

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    64/218

    On Return:CF = 1 - Status

    = 0 - Status

    AH) - Status of = 80H - Dis= 40H - See= 20H - Gen= 10H C

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    65/218

    AH) = 02H - Read Desir

    Dl) - Drive numbBit 7 0 - D

    DH) - Head numbeCH) - Track numbCl) - Sector numAl) Number of s

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    66/218

    Notes:

    1. If an error is reportesystem, then retry the

    2. For PC XT Model 28

    AH) = 04H Verify Desir

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    67/218

    Byte 3 - Number o= 99H - 12= 91H - 25= 92H - 51

    = a3H - 19

    There must be one entry

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    68/218

    AH) == 08H Read Drive

    There is a parameter table

    For PCjr PC, PC XT, or

    On Return:

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    69/218

    If the requested rive is(DI), and ES) = o.

    Diskette status 40

    For drive number 80H o

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    70/218

    For all others:

    On Return:CF = 1 - ErrorAH) - Status of

    = 01H - Inv

    Diskette status at

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    71/218

    When the diskette change diskette is changed, this fu

    For PC XT BIOS dated 1

    Personal System 2 prod

    OL) - Drive numbeBi 7 0 D

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    72/218

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    73/218

    Interrupt 13H Fixed D

    This interface provides access summary of the fixed disk f

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    74/218

    function. There is no cMultitasking Provisions

    5 Bit 7 of the drive number m

    BIOS.6 For the drive parameters se

    on page 3-16

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    75/218

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    76/218

    Notes:

    1. An 11H rror indicathat was corrected by

    good; however, thethe controlling progrr ror may not recur

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    77/218

    On Return:CF = 1 - Status

    = 0 - StatusAH) - Status of

    operation

    Note: If an error is rep

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    78/218

    For the IBM ESDI Fixed D

    On Return:AH) - Status of

    CF 1 - Error

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    79/218

    AH) = 07H - Format Driv

    For PC XT:

    Dl) - Drive numbeCH) - Cylinder num

    0-based, no

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    80/218

    AH) = 09H - Initialize

    DL) - Drive numb

    On Return:CF = 1 - Status

    = 0 - Status

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    81/218

    AH) = OAH to OBH - Re

    AH) = OCH - Seek

    DL) - Drive numbeDH) - Head numberCH) - Cylinder num

    0-based, not

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    82/218

    On Return:CF 1 - Status

    0 - StatusAH) - Status of

    operation

    AH) H - Recalibrate

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    83/218

    (AH) = 16H to 18H - Reser

    (AH) = 19H - Park Heads

    For PC XT, AT, and PC XT M

    On Return:AH) - Status of o

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    84/218

    An INby BIforma

    The hfor enumbin gr

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    85/218

    Interrupt 14H - Asynchr

    These routines provide RS-232summary of the RS-232-C supp

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    86/218

    On Return:AL) - Modem st

    Bit 7 - ReBit 6 - Ri

    Bit 5 - DaBit 4 - CleBit 3 - DeBit 2 - Tra

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    87/218

    AH) = 03H - Read Status

    OX) - RS-232-C coto actual po

    On Return:Al) - Modem stat

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    88/218

    On Return:AL) - Modem staAH) - Line statu

    For all others no action

    AH) 05H - Extended Co

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    89/218

    Interrupt 15H - System S

    The following is a summary

    AH) = OOH - Turn Cassette MotAH) 01 H T C M

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    90/218

    For all others:

    On Return:AH) = 86H

    CF = 1

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    91/218

    AH) = 3H - Write Bloc

    For P jr and PC:

    ES:BX) - Pointer tCX) - Count of by

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    92/218

    For PCjr and PC:

    On Return:AH) = 80H

    CF 1

    For all others:

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    93/218

    For all others:

    On Return:AH) = 86H

    CF = 1

    AH) = 22H to 3FH - Rese

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    94/218

    For all others:

    On Return:AH) = 86H

    CF = 1

    AH) = 41 H - Wait for Ex

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    95/218

    For all others:

    On Return:AH) = 86H

    CF = 1

    AH) 42H - Request Sys

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    96/218

    For PC Convertible:

    On Return:AL) - Status

    Bit 7 - LowBit 6 - OpBit 5 - StaBit 4 Pow

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    97/218

    AH) = 45H to 4EH - Re

    AH) = 4FH - Keyboard

    For P jr and PC:

    On Return:

    (AH) = 80H

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    98/218

    AH) = 80H - Device Op

    For PCjr and PC:

    OnReturn:AH) = 80H

    CF = 1

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    99/218

    AH) = 82H - Program Ter

    For P jr and PC

    On Return:AH) = 80H

    CF 1

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    100/218

    For all others:

    AL) = 00H - Set iES:BX) - Pointer t

    the highinterval

    CX OX) - Microsec

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    101/218

    On Return:AX) A{x valuBX) A{y valuCX) B{x valueDX) B{y valu

    CF = 1 Invalid ca

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    102/218

    For all others:

    CX,DX) - Time befGranula

    CF = 0 - Successful = 1 - Wait func

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    103/218

    On Return:AH) = 00H - OpeAH) = 01H - R MAH) = 02H - OthAH) = 03H - Gat

    All

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    104/218

    The fourth pOints to thinitialized.

    The fifth is used by thcode segment. It is uby the BIOS.

    The sixth is used by th

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    105/218

    For AT, PC XT Model 286Model 30, this routine retbeginning at address 10000system may not be able to

    board is fully populated.

    On Return:

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    106/218

    The following shows the opointed to by ES:SI):

    E S : S I ) ~ 00

    u

    08

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    107/218

    The seventh pOints to returns to the user, in

    The eighth is used to is necessary for this fin the protected modecode, this descriptor c

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    108/218

    AH) = 8AH to 8FH - Rese

    AH) = 90H - Device Busy

    For PCjr and PC:

    On Return:AH) = 80H

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    109/218

    On Return:CF = 0 Wait n

    = 1 Minimthis t

    AH) = 9 H - Interrupt C

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    110/218

    For AT BIOS dated 6 10and after PC XT Model System 2 products:

    AH) = C0H

    On Return:

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    111/218

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    112/218

    For PC XT, AT, PC XT M

    On Return:AH) = 86H

    CF = 1

    For all others:

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    113/218

    Al) = 01H Reset

    On Return:See Return for

    f the operation sucBH) Device ID

    00H

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    114/218

    On Return:See Return for

    f the operation suBH) Devi ce ID

    =00H

    AL) = 0SH Poin

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    115/218

    Cl) -====

    DL) -

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    116/218

    Word 1 on stack:ow byte Status

    Bit 7 Y data= 1 O

    Bit 6 X data= 1 O

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    117/218

    AH) = C3H - Enable/Dis

    For PCjr and PC:

    On Return:AH) = 80H

    CF = 1

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    118/218

    For Personal System/2 produ

    AL) = 00H Retur

    On Return:AL) = 00HOX) Base POS

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    119/218

    Interrupt 16H Keyboar

    These routines provide keyboasummary of the keyboard func

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    120/218

    f the extended functions are supp

    I The character code placed ininterrupt handler differentia

    nomenclature.I The keyboard interrupt hand

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    121/218

    See Scan Code/Character Codscan code/character code comb

    (AH) = OOH -Keyboard

    The scan code/character ckeyboard buffer head poin

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    122/218

    AH) 02H - Shift Status

    On Return:AL) - Current s

    Bit 7 = 1 -Bit 6 = 1 -Bit 5 = 1 -Bit 4 1

    F AT BIOS d t d 11/15/85

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    123/218

    For AT BIOS dated 11/15/85 Personal System/2 products:

    Al) = 05H - Set typBl) - Typema00H = 30.001H = 26.702H = 24 0

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    124/218

    Cl) ASCII charaCH) Scan code

    On Return:Al) = 00H Op

    = 01H Buf

    F ll th ti i

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    125/218

    For all others no action is pe

    AH) = 12H - Extended Sh

    For T BIOS dated 11 15after, PC XT Model 286, an

    On Return:

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    126/218

    AH) 02H R d St t

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    127/218

    AH) = 02H - Read Status

    DX) - Pr inter totable t 40

    On Return:AH) - Status

    l

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    128/218

    6. For Personal System 2printer port associated wAH) is returned unchange

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    129/218

    Interrupt 19H Bootstra

    Track 0 se tor 1 is read intotransferred as follows:

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    130/218

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    131/218

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    132/218

    AH) = 03H - Set Real-Ti

    For AT, PC XT Model 2products:

    CH) Hours in BCl) Minutes in

    AH) = 06H Set Real Tim

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    133/218

    AH) = 06H - Set Real-Tim

    For AT, PC XT Model 286products:

    CH) Hours in BCCl) Minutes in BDH) Seconds in B

    d d

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    134/218

    For AT BIOS dated 6 10Personal System 2 pro

    On Return:

    CF = 1 Invalid

    For PC XT BIOS dated 1/1

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    135/218

    For PC XT BIOS dated 1/1products:

    On Return:CX) - Count of d

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    136/218

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    137/218

    Interrupt 70H Real Tim

    For AT, PC XT Model 286 an

    This interrupt handler cont

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    138/218

    Section 3 Data r

    BIOS Data Area

    E d d BIOS D A

    Notes:

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    139/218

    Notes:

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    140/218

    BIOS Data rea

    The BIOS Data rea is allo

    system BIOS and adapter BIOSmemory from absolute addres

    f

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    141/218

    Address Function

    40:10 Installed Hardwar

    Bits 15,14 Number of PrinBit 13 ReservedBit 12 ReservedBits 11,10,9 Number of RS-2Bit 8 Reserved

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    142/218

    Address Function

    4 :17 Keyboard Control

    Bit 7 Insert LockedBit 6 Caps Lock LockBit 5 Num Lock LockBit 4 Scroll Lock LocBit 3 Alt Key Pressed

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    143/218

    Address Function

    40:3E Recalibrate status

    Bit 7 Interrupt FlagBit 6 ReservedBit 5 ReservedBit 4 ReservedBit 3 Recalibrate Driv

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    144/218

    Address Function

    40:49 Display Mode set40:4A Number of Colum40:4C Length of Regen40:4E Start ing Address i40:50 Cursor Position Pa40:52 Cursor Position P40:54 Cursor Position P

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    145/218

    Address Function

    40:71 Break Key State40:72 Reset Flag

    1234H = By4321H = Prproducts exc5678H S

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    146/218

    Address Function

    40:78 Printer 1 Time-out40:79 Prin ter 2 Time-out40:7A Prin ter 3 Time-ou40:7B Reserved

    Exceptions

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    147/218

    Address Function

    40:8B Media Control

    Bits 7,6 Last Diskette DrivBinary)

    = 500Kb 1 = 300Kb

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    148/218

    ddress Function

    40:96 Keyboard Mode S

    Bit 7 Read 10 in ProBit 6 Last Character

    Bit 5 Force Num LocBit 4 101/102-Key KBit 3 Right Alt Key P

    For systems with EGA capabili

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    149/218

    y psave pointer table contains poverrides for the video mode

    Address

    40:A8

    Function

    Pointer to Video

    Address Function

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    150/218

    Address Function

    Displayable

    Bytes Per Ch

    Pointer to a

    Consecutive

    Address Function

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    151/218

    Address Function01,08 Entr00,07 Entr02,07 Entr02,06 Entr

    AbbreviatioMDPA = MAdapter

    dd F i

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    152/218

    Address Function

    Internal PaleOperation)

    Pointer to I

    External PalOperation)

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    153/218

    For AT and Personal System/2

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    154/218

    isk rive parameters for thare decimal unless noted otherw

    Number of NumberType Cylinders of Heads

    4. PC XT Model 286 contai

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    155/218

    5. Personal System/2 producthrough 32.

    6. Personal System/2 Model

    For Personal System/2 product

    For PC XT BIOS dated 11/10/8

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    156/218

    p r meter tables apply:

    Size Value

    DW 0306DB 02

    Descripti

    MaximumMaximum

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    157/218

    Size Value

    OW 3 6DB 6OW 128

    OW 256DB OBHDB 5H

    Descrip

    MaximuMaximuStart Re

    Start WMaximuControl

    For PC XT BIOS dated 1/08/8

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    158/218

    parameter tables apply:

    Size Value

    OW 306DB 4

    Descrip

    MaximuMaximu

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    159/218

    Size Value

    DW 615DB 4DW 615

    DW 300DB OBHDB 05H

    Descript

    MaximuMaximuStart Red

    Start WrMaximuControl

    iskette rive Parameter Table

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    160/218

    The diskette drive parameter ta

    Offset Length Descriptio

    Notes:

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    161/218

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    162/218

    Section 4. ddition

    Interrupt Sharing

    Notes

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    163/218

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    164/218

    nterrupt Sharing

    This section defines an intehardware adapters on theto share a single interrupt requ

    Interrupt handler impleme

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    165/218

    using Intel TM format; thain memory.

    Interrupt Request IRQn) R

    h h l

    To link an interrupt handler, th

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    166/218

    handler replaces the interrupt its own interrupt handler. (Seefor interrupt handlers stored inpreserve the interrupt vectorpointer to the next interrupt havector must be stored at a fixed

    During a system-reset conditionb d f

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    167/218

    must be executed after power-oresponsible devices.

    Operating system environments

    software must manage the entirhandler software written exclu

    flag 80H) in the FLAGS byte

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    168/218

    chain.

    The Reset routine, an entry podis ble the adapter interrup

    d

    MOV CS:[SI+2],

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    169/218

    CMP ES:BYTEPTi f iret_test_only_is_needed

    JNE SETVECTRelse

    JECMP FRSTVCTRES: WORDP

    FIRST is allowed onlyi l d d

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    170/218

    system is loaded.

    Interrupt Handler

    YOUR_CARD EQU xxxx

    MYCSEG ENDSEND ENTRY

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    171/218

    ENTRY

    Unlinking

    PUSH OS

    JMP UNCHAIN_

    UNCHAIN B MOV BX SI

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    172/218

    UNCHAIN_B MOV BX SIPUSH DS

    POP ESJMP UNCHAIN_

    UNCHAIN_X STI

    POP ESPOP DS

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    173/218

    For Personal System/2 products,d h d

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    174/218

    a ROM signature code that identPOST, when CMOS is not vcode is used to find the first viprogrammable option select PO

    The code starts at OCH in th

    Vid F i i

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    175/218

    Video Function ompati

    The following procedures are re

    compatibility to application sof

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    176/218

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    177/218

    ultitasking Provisions

    The BIOS provides hooks to ass

    Whenever a busy Wait) loop ocfor the program to break out of

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    178/218

    MOV AX 9 xxH ;Wait cod; type co

    INT 15H ;Issue caJC TIMEOUT ;Optional:

    ; i carr; occurred

    NORM LTIMEOUT LOGIC ;Normal t

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    179/218

    System dentification

    Each BIOS ROM module has a

    ROM. In some cases a submodeare used to further dist inguish t

    li i G id li

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    180/218

    pplication Guidelines

    Use the following information

    IBM Personal System 2 andpossible, BIOS should be u

    lI commands followed immpermit enough recovery tim

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    181/218

    permit enough recovery timoperations. To ensure enough tinserted between the lI co

    Notes:

    Programming Consideratio

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    182/218

    The IBM-supported languageand Pascal are the best choiceprogram uses specific feature

    not be compatible with all IBComputer products

    another parameter block a0:78) to point to the new b

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    183/218

    0:78) to point to the new b

    The parameters were estab

    Some models of the IBthe 5.25-inch high cap

    Programs may be designe3 5-inch diskettes Since

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    184/218

    3.5 inch diskettes. Since dependent, the following type of media inserted int

    1. Verify track 0, headBIOS to determine if

    Scan Code Character Code Co

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    185/218

    Scan Code Character Code Co

    The followi ng I sts the keyboacode/character code combinatio

    83 anStand

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    186/218

    StandKeystroke Funct

    \ 28/5Cz 2C/7Ax 20/78

    c 2E/63v 2F/76

    83- aStan

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    187/218

    StanKeystroke Funct

    Right Arrow (no kEnd (no kDown Arrow (no k

    PageDown (no keInsert (no k

    83- aStand

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    188/218

    StandKeystroke Functi

    Shift A 1E 41Shift S 1F 53Shift D 20 44

    Shift F 21 46Shift G 22 47

    83- anStand

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    189/218

    StandKeystroke Functi

    Shift 3 51/33 Shift 0 52/30Shift . 53/2E

    Shift SysReqShift Key 45 no k

    83- aStand

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    190/218

    StandKeystroke Func

    Glrl w ETB) 11/17Gtrl e ENQ) 12 05Gtrl r OG2) 13/12

    Gtrl t OG4) 14/14Glrl y EM) 15/19

    83 anStand

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    191/218

    Sta dKeystroke Function

    Gtrl Num LockGtrl Scroll LockGtrl Home 77/00

    Gtrl Up rrowGtrl PgUp 84/00

    The following lists the Alt keycode/character code combinati

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    192/218

    code/character code combinati

    83-Stan

    Keystroke Funct

    Alt Esc

    83- aStand

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    193/218

    Keystroke Funct

    Alt n 311Alt m 32 00Alt,

    Alt .Alt

    For all keyboards, the numeriwith the Alt key to input any A

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    194/218

    t e t ey to put a y00) and character code are retuexample, pressing lt and Kcode/character code combinati

    255, then releasing lt returhex OO/FF

    Notes

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    195/218

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    196/218

    Glossary

    This glossary includes terms anddefinitions from the IBM Voca

    per second in Morse code, and 3-bit value per second in a traisignals each of which can assume

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    197/218

    signals each of which can assumeone of eight different states.asynchronous transmission, the unof modulation rate corresponding

    one unit of interval per second;is, if the duration of the unit in

    character generator. 1) Incomputer graphics, a functional

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    198/218

    that converts the codedrepresentation of a graphiccharacter into the shape of thecharacter for display. 2) In

    processing, the means withini f i i

    cyclic redundancy check CRC).1) A redundancy check in whichh h k k i d b

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    199/218

    the check key is generated by acyclic algor ithm. 2) A system oerror checking performed at boththe sending and receiving station

    after a block-check character hbeen accumulated

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    200/218

    hertz (Hz). A unit of frequencyequal to one cycle per second.

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    201/218

    hex. Common abbreviation forhexadecimal.

    hexadecimal. 1) Pertaining tol ti h i diti

    the transmitting station to terma transmission. 3) Synonym

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    202/218

    with interruption.

    1/0 Input/output.

    1/0 area. Synonym for buffer

    designed for use with othercomponents.

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    203/218

    monitor. Synonym for cathode tube display CRT display).

    ms. Millisecond; 0.001 second.

    programmable read-only memoryPROM). A read-only memory

    can be programmed by the use

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    204/218

    can be programmed by the use

    programming language. 1)artificial language established

    expressing computer programs2) A set of characters and ru

    SOLe. Synchronous Data LinkControl.

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    205/218

    sector. That p rt of a track oron a magnetic drum a magneticdisk or a disk pack that can be

    accessed by the magnetic heads inthe course of a predetermined

    accessible to a given reading heaposition

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    206/218

    window. 1) A predefined pthe virtual space 2) The visarea of a viewplane

    d 1) A h i

    Notes

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    207/218

    Index

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    208/218

    Index

    A

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    209/218

    set real time clock timeset system timer day

    t 2 120

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    210/218

    counter 2-120set system timer time

    counter 2-116set up sound multiplexer

    INT 10H video) 2-10l l 2 32

    device open 2-83enable/disable watchdog

    time out 2 102

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    211/218

    time-out 2-102event wait 2-84extended memory size

    determine 2-89

    format unit periodici t t 2 76

    keyboard interrupt 09H) level-sensitive interrupts

    i d t i ti

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    212/218

    memory size determination12H) 2-47

    NMI 02H) 2-4nonmaskable interrupt

    02H) 2-4i 05H) 2 6

    read status 2-112printer port base address data

    area 3 3

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    213/218

    area 3-3printer time-out value data

    area 3-8program termination 2-84

    programmable option selectPOS) 2 102

    set system-timer timecounter 2-116

    set typematic rate 2-107

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    214/218

    set typematic rate 2 107set up sound multiplexer 2-1sharing, interrupt 4-3

    implementation information

    interrupt request 4-4interrupt sharing chaining

    set system-ti mer daycounter 2-120

    set system-timer time

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    215/218

    set system timer timecounter 2-116

    set up sound multiplexersystem timer data area 3-7

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    216/218

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    217/218

    _

  • 8/13/2019 PS2 and PC BIOS Interface Technical Reference Apr87

    218/218


Recommended