IBM PS/2 and PC BIOS Interface Technical Reference

IBM PS/2 and PC BIOS Interface Technical Reference

First Edition (April, 1987)

The following paragraph does not apply to the United Kingdom or any country where such provisions are inconsistent with local law: INTERNATIONAL BUSINESS

MACHINES CORPORATION PROVIDES THIS PUBLICATION "AS IS" WITHOUT

WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT

LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A

PARTICULAR PURPOSE. Some states do not allow disclaimer of express or implied warranties in certain transactions, therefore, this statement may not apply to you.

This publication could include technical inaccuracies or typographical errors. Changes are periodically made to the information herein; these changes will be incorporated in new editions of the publication. IBM may make improvements and/or changes in the product(s) and/or the program(s) described in this publication at any time.

It is possible that this publication may contain reference to, or information about, IBM products (machines and programs), programming, or services that are not announced in your country. Such references or information must not be construed to mean that

IBM intends to announce such IBM products, programming, or services in your country.

THE PUBLICATION OF THE INFORMATION CONTAINED HEREIN IS NOT INTENDED TO

AND DOES NOT CONVEY ANY RIGHTS OR LICENSES, EXPRESS OR IMPLIED, UNDER

ANY IBM PATENTS, COPYRIGHTS, TRADEMARKS, MASK WORKS, OR ANY OTHER

INTELLECTUAL PROPERTY RIGHTS.

Requests for copies of this publication and for technical information about IBM products should be made to your IBM Authorized Dealer or your IBM Marketing

Representative.

Personal System/2 is a trademark of the International Business Machines Corporation.

©

Copyright International Business Machines Corporation 1987. All rights reserved.

No part of this work may be reproduced or distributed in any form or by any means without prior permission in writing from the IBM Corporation.

Preface

This technical reference provides Basic Input/Output System (BIOS) interface information. It is intended for developers who provide hardware or software products to operate with the following IBM products:

• IBM PC Convertible

• IBM PCjrTM

• IBM Personal Computer

• IBM Personal Computer AT®

• IBM Personal Computer XTTM

• IBM Personal Computer XTTM Model 286

• IBM Personal System/2™ Models 30, 50, 60, and 80

• IBM Portable Personal Computer

• IBM Color/Graphics Monitor Adapter

• IBM Enhanced Graphics Adapter

• IBM ESDI Fixed Disk Drive Adapter/A

• IBM Monochrome Display and Printer Adapter.

You should understand the concepts of computer architecture and programming before using this publication.

This technical reference is divided into two parts: BIOS and

Supplements.

BIOS

contains the following:

Section 1, "Introduction to BIOS," provides an overview of BIOS, interrupts, parameter passing, data areas and read-only memory

(ROM) tables. It also describes how to determine the system

BIOS version date.

PCjr,

Personal Computer XT, and Personal System/2 are trademarks of the International Business Machines Corporation.

Personal Computer AT is a registered trademark of the International

Business Machines Corporation. iii

Section 2, "Interrupts," contains detailed information about how interrupts function across the IBM Personal

System/2

and

Personal Computer product lines. Exceptions between products are noted.

Section 3, "BIOS Data Areas and ROM Tables," contains detailed information about regular data areas, extended data areas, and

ROM tables for system and adapter BIOS.

Section 4, "Additional Information," contains information about sharing interrupts in IBM Personal

System/2

and Personal

Computer products. It also contains information about adapter

ROM calls, video compatibility, multitasking provisions, system identification bytes, keyboard keys, and scan code/character code combinations.

Supplements is reserved for additional BIOS interface information. A table of contents page is provided to record the supplements that you add. Supplements to this technical reference will be offered for sale as additional 610S interface information becomes available.

System-specific hardware and software interface information for IBM systems and for IBM diskette drives, fixed disk drives, adapters, and other options is contained in separate technical reference publications. iv

Contents - BIOS

Section 1. Introduction to BIOS .........•................. 1-1

Interrupts ............................................ 1-3

Parameter Passing ..................................... 1-3

Data Areas and ROM Tables ............................. 1-4

BIOS Level Determination ............................... 1-4

System Groups ........................................ 1-5

Section 2. Interrupts ................................... 2-1

Interrupt 02H - Nonmaskable Interrupt (NMI) ................. 2-4

Interrupt 05H - Print Screen .............................. 2-6

Interrupt 08H - System Timer ............................. 2-7

Interrupt 09H - Keyboard ................................ 2-8

Interrupt 10H - Video .................................. 2-10

Interrupt 11 H - Equipment Determination .................. 2-46

Interrupt 12H - Memory Size Determination ................ 2-47

Interrupt 13H - Diskette ................................ 2-48

Interrupt 13H - Fixed Disk ............................... 2-58

Interrupt 14H - Asynchronous Communications ............. 2-70

Interrupt 15H - System Services ......................... 2-74

Interrupt 16H - Keyboard .............................. 2-104

Interrupt 17H - Printer ................................ 2-111

Interrupt 19H - Bootstrap Loader ........................ 2-114

Interrupt 1AH - System-Timer and Real-Time Clock Services ., 2-115

Interrupt 70H - Real-Time Clock Interrupt ................. 2-122

Section 3. Data Areas and ROM Tables .................... 3-1

BIOS Data Area ....................................... 3-3

Extended BIOS Data Area .............................. 3-15

ROM Tables ......................................... 3-16

Fixed Disk Drive Parameter Table .................... 3-16

Diskette Drive Parameter Table ...................... 3-23

Section 4. Additional Information ......................... 4-1

Interrupt Sharing ...................................... 4-3

Precautions ....................................... 4-3

Interrupt Request (IRan) Reset ........................ 4-4

Interrupt-Sharing Software Requirements ............... 4-4

Interrupt-Sharing Chaining Structure and Signature ....... 4-6

ROM Considerations ................................ 4-7

Implementation Information .......................... 4-7

Adapter ROM ........................................ , 4-12

Video Function Compatibility ............................ 4-14

. Video Presence Test ............................... 4-14

Video Mode Switching .............................. 4-15

Multitasking Provisions ................................ 4-16

System Identification .................................. 4-18

Application Guidelines ................................. 4-19

Hardware Interrupts ............................... 4-19

Programming Considerations ........................ 4-21

BIOS and Operating System Function Calls ............. 4-21

Scan Code/Character Code Combinations ................. 4-24

Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . X-1

Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . X-13

Figures - BIOS

2-1. Interrupts ..................................... 2-3

2-2. INT 10H - Video Functions ....................... 2-10

2-3. Video Modes ................................. 2-11

2-4. Hardware Specific Video Mode Characteristics ...... 2-11

2-5. PC Convertible Display Types .................... 2-38

2-6. INT 13H - Diskette Functions ..................... 2-48

2-7. INT 13H - Fixed Disk Functions ................... 2-58

2-8. INT 14H - Asynchronous Communications Functions .. 2-70

2-9. INT 15H - System Services Functions .............. 2-74

2.:.10. Block Move Global Descriptor Table ............... 2-88

2-11. Global Descriptor Table ........................ 2-91

2-12. INT 16H - Keyboard Functions ................... 2-104

2-13. INT 17H - Printer Functions ..................... 2-111

2-14. INT 1AH - System-Timer and Real-Time Clock

Services .................................... 2-115

3-1. RS-232-C Port Base Address Data Area ..... " ....... 3-3

3-2. Printer Port Base Address Data Area ............... 3-3

3-3. System Equipment Data Area ..................... 3-4

3-4. Miscellaneous Data Area 1 ....................... 3-4

3-5. Memory Size Data Area ......................... 3-4

3-6. Keyboard Data Area 1 ........................... 3-5

3-7. Diskette Drive Data Area ......................... 3-6

3-8. Video Control Data Area 1 ........................ 3-7

3-9. System Data Area 1 ............................. 3-7

3-10. System-Timer Data Area ......................... 3-7

3-11. System Data Area 2 ............................. 3-8

3-12. Fixed Disk Drive Data Area ....................... 3-8

3-13. Printer Time-Out Value Data Area ................. 3-9

3-14. RS-232-C Time-Out Value Data Area ................ 3-9

3-15. Keyboard Data Area 2 ........................... 3-9

3-16. Video Control Data Area 2 ........................ 3-9

3-17. Diskette Drive/Fixed Disk Drive Control Data Area '" 3-10

3-18. Keyboard Data Area 3 .......................... 3-11

3-19. Real-Time Clock Data Area ...................... 3-11

3-20. Save Pointer Data Area ......................... 3-12

3-21. Secondary Save Pointer Data Area ................ 3-13

3-22. Miscellaneous Data Area 2 ...................... 3-15

3-23. Fixed Disk Drive Parameter Table Definition ........ 3-16

3-24. Fixed Disk Drive Parameters (AT and Personal

System/2 Products) ............................ 3-17

3-25. Fixed Disk Drive Parameter Table (Personal System/2

Products Except Model 30) ...................... 3-18

3-26. Fixed Disk Drive Drive Parameter Table 00 (PC XT

BIOS Dated 11/10/82) ........................... 3-19

3-27. Fixed Disk Drive Parameter Table 01 (PC XT BIOS

Dated 11/10/82) ............................... 3-19

3-28. Fixed Disk Drive Parameter Table 02 (PC XT BIOS

Dated 11/10/82) ............................... 3-20

3-29. Fixed Disk Drive Parameter Table 03 (PC XT BIOS

Dated 11/10/82) ............................... 3-20

3-30. Fixed Disk Drive Parameter Table 00 - Type 1 (PC XT

BIOS Dated 1/08/86) ........................... 3-21

3-31. Fixed Disk Drive Parameter Table 01 - Type 16 (PC XT

BIOS Dated 1/08/86) ........................... 3-21

3-32. Fixed Disk Drive Parameter Table 02 - Type 2 (PC XT

BIOS Dated 1/08/86) ........................... 3-22

3-33. Fixed Disk Drive Parameter Table 03 - Type 13 (PC XT

BIOS Dated 1/08/86) ........................... 3-22

3-34. Diskette Drive Parameter Table .................. 3-23

4-1. System Identification ........................... 4-18

4-2. Write and Format Head Settle Time ............... 4-22

4-3. Keyboard Keystrokes .......................... 4-24

4-4. Shift Keyboard Keystrokes ...................... 4-26

4-5. Ctrl Keyboard Keystrokes ....................... 4-28

4-6. Alt Keyboard Keystrokes ........................ 4-31

Section 1. Introduction to BIOS

Interrupts ............................................ 1-3

Parameter Passing ..................................... 1-3

Data Areas and ROM Tables ............................. 1-4

BIOS Level Determination ............................... 1-4

System Groups ........................................ 1-5

Introduction to BIOS

1-1

Notes:

1-2

Introduction to BIOS

The Basic Input/Output System (BIOS) for IBM Personal System/2 and

Personal Computer products is a software interface or "layer" that isolates operating systems and application programs from specific hardware devices. BIOS routines allow assembly language programmers to perform block and character-level operations without concern for device addresses or hardware operating characteristics.

The BIOS also provides system services such as time-of-day and memory size determination.

Operating systems and application programs should make functional requests to BIOS rather than directly manipulating I/O ports and control words of the hardware. Hardware design and timing changes then become less critical, and software compatibility across systems and features is enhanced.

Interrupts

BIOS is accessed by software interrupts; each BIOS entry point is available through its own interrupt. The AH register, where appropriate, indicates the specific routine within the overall interrupt function that is being executed.

Software interrupts INT 10H through INT 1AH each access different

BIOS routines. For example, INT 12H invokes the BIOS routine for determining memory size and returns the value to the caller.

See Section 2, "Interrupts," for additional information.

Parameter Passing

All parameters passed to and from the BIOS routines go through the microprocessor registers. Each BIOS interrupt routine indicates the registers used on the call and the return. In general, if a BIOS routine has several possible functions, (AH) is used to select the desired function. For example, to set the time, the following code is required:

MOV AH,l ;Function is to set time of day.

MOV CX,HIGH_COUNT ;Establish the current time.

MOV DX,LOW_COUNT

INT lAH ;Set the time.

Introduction to BIOS 1-3

To read the time, the following code is required:

MOV AH,0

INT lAH

;Function is to read time of day.

;Read the timer.

The BIOS interrupt handlers save all registers except (AX), the flags, and those registers that return a value to the caller. In some cases other registers are modified. See Section 2, "Interrupts," for additional information.

All parameters are 1-based (that is, the count starts with 1, not 0), unless noted as O-based.

Data Areas and ROM Tables

Data areas are the memory locations allocated specifically to system

BIOS and adapter BIOS to use as work areas. Read-only memory

(ROM) tables are used by BIOS to define the characteristics of the hardware devices supported by a particular system BIOS or adapter

BIOS.

See Section 3, "Data Areas and ROM Tables," for additional information.

BIOS Level Determination

The BIOS is contained in ROM modules located on the system boards of Personal System/2 and Personal Computer products. It is also contained in ROM modules on some optional features (usually adapters) to provide device-level control of the features.

The BIOS has been amended several times since its inception. All

BIOS versions are dated. In this technical reference, BIOS version dates are used when necessary to indicate interface differences in similar systems.

1-4

Introduction to BIOS

To determine the BIOS version date, run the following BASIC program. The date that is displayed is the version date of the BIOS for that system:

10 DEF SEG=&HF000

20 FOR X=&HFFF5 TO &HFFFC

30 PRINT CHR$(PEEK(X»;

40 NEXT

RUN

See "System Identification" on page 4-18 for a list of IBM products and their BIOS version dates. To access this information, see INT

15H, "(AH)

=

COH Return System Configuration Parameters" on page 2-94.

System Groups

In this technical reference, IBM systems are categorized into groups with similar BIOS interfaces. These groups are referred to with any exceptions noted. The groups with similar interfaces include:

• Personal

System/2

products - all models

• Personal Computer XT products - includes Portable Personal

Computer

• Personal Computer AT products - all models.

Important: Information added to the Supplements area of this technical reference may have new information about subjects covered in other parts of this technical reference. Refer to the supplements for information that could affect your hardware or software development decisions.

Introduction to BIOS 1-5

Notes:

1-6

Introduction to BIOS

Section 2. Interrupts

Interrupt 02H - Nonmaskable Interrupt (NMI) ................. 2-4

Interrupt 05H - Print Screen .............................. 2-6

Interrupt 08H - System Timer ............................. 2-7

Interrupt 09H - Keyboard ................................ 2-8

Interrupt 10H - Video .................................. 2-10

Interrupt 11 H - Equipment Determination .................. 2-46

Interrupt 12H - Memory Size Determination ................ 2-47

Interrupt 13H - Diskette ................................ 2-48

Interrupt 13H - Fixed Disk ............................... 2-58

Interrupt 14H - Asynchronous Communications ............. 2-70

Interrupt 15H - System Services ......................... 2-74

Interrupt 16H - Keyboard .............................. 2-104

Interrupt 17H - Printer ................................ 2-111

Interrupt 19H - Bootstrap Loader ........................ 2-114

Interrupt 1AH - System-Timer and Real-Time Clock Services .. 2-115

Interrupt 70H - Real-Time Clock Interrupt ................. 2-122

Interrupts

2-1

Notes:

2-2

Interrupts

The following figure lists each interrupt, its function, and, where applicable, the location of a more detailed description of the interrupt:

1F

20 to 3F

40

41

42 to 45

46

47 to 49

4A

4B to 5F

60 to 67

68 to 6F

70

71 to 74

75

76 to 7F

80 to 85

86 to FO

F1 to FF

Interrupt

Number (Hex)

00

01

02

03

04

05

06 to 07

08

09

OA to OD

OE

OF

10

11

19

1A

1B

1C

1D

1E

12

13

14

15

16

17

18

Interrupt Function

Divide by 0

Single Step

Nonmaskable (NMI) (See page 2-4)

Breakpoint

Overflow

Print Screen (See page 2-6)

-Reserved-

System Timer (See page 2-7)

Keyboard (See page 2-8)

-Reserved-

Diskette (See INT 13H on page 2-48)

-Reserved-

Video (See page 2-10)

Equipment Determination (See page 2-46)

Memory Size Determination (See page 2-47)

Fixed Disk/Diskette (See pages 2-48 and 2-58)

Asynchronous Communications (See page 2-70)

System Services (See page 2-74)

Keyboard (See page 2-104)

Printer (See page 2-111)

Resident BASIC

Bootstrap Loader (See page 2-114)

System Timer and Real-Time Clock Services (See page 2-115)

Keyboard Break (See INT 09H on page 2-8)

User Timer Tick (See INT 08H on page 2-7)

Video Parameters

Diskette Parameters (See "Diskette Drive Parameter Table" on page 3-23)

Video Graphics Characters

- Reserved for Disk Operating System (DOS)-

Diskette BIOS Revector

Fixed Disk Parameters (See INT 13H on page 2-58)

-Reserved-

Fixed Disk Parameters (See INT 13H on page 2-58)

-Reserved-

User Alarm (See INT 08H on page 2-7 and INT 70H on page

2-122)

-Reserved-

- Reserved for User Program Interrupts-

-Reserved-

Real-Time Clock (See page 2-122)

-Reserved-

Redirect to NMI Interrupt (See INT 02H on page 2-4)

-Reserved-

- Reserved for BASIC-

Used by BASIC Interpreter When Running BASIC

- Reserved for User Program Interrupts-

Figure 2-1. Interrupts

Interrupts 2-3

Interrupt 02H - Nonmaskable Interrupt (NMI)

For PCjr the nonmaskable interrupt (NMI) is attached to the keyboard interrupt.

For PC, PC XT, AT® , and Personal System/2 Model 30, this interrupt handler displays PARITY CHECK 1 indicating a parity error occurred on the system board, or PARITY CHECK 2 indicating a parity error occurred on the I/O channel (assumes I/O channel memory). This interrupt handler attempts to find the storage location containing the bad parity, and if it is found, the segment address is displayed. If no parity error is found, ????? appears in place of the address, indicating an intermittent read problem.

For Personal System/2 products except Model 30, the above paragraph applies except PARITY CHECK 1 and PARITY CHECK 2 are replaced by error codes, 110 and 111, respectively. In addition, the

NMI detects two other errors. The error codes are as follows:

110 System Board Memory Failure

111

1/0

Channel Check Activated (assumes

1/0

channel memory)

112 Watchdog Time-Out

113 Direct Memory Access (DMA) Bus Time-Out

When the Watchdog Time-Out is enabled and a missing timer interrupt (IRQ 0) is detected, the system generates the NMI. If this occurs the NMI interrupt handler displays 112, indicating an expected timer interrupt was missed. Also, when a DMA-driven device uses the bus longer than the allowed 7.8 microseconds, the Central

Arbitration Control Point generates the NMI and 113 is displayed, indicating a DMA bus time-out has occurred.

When an NMI occurs, the Central Arbitration Control Point is implicitly disabled. The NMI interrupt handler explicitly reenables the

Central Arbitration Control Point by outputting a OOH to port 90H.

AT is a registered trademark of the International Business Machines

Corporation

2-4

INT 02H - Nonmaskable Interrupt (NMI)

For PC Convertible, the NMI is attached to the keyboard, the diskette, the real-time clock, and the system suspend interrupts, and is activated upon the I/O channel check.

Notes:

1. An 8087 math coprocessor error on 8088- or 8086-based systems drives the NMI of the 8088 or 8086, respectively.

2. An 80287 or 80387 math coprocessor error on 80286- or

80386-based systems drives the IRQ 13 line. The IRQ 13 interrupt handler issues a software INT 02H to be compatible with software that expects the NMI to occur.

3. For all systems, the math coprocessor application that points the

NMI vector to itself must be sensitive to NMI errors. If the NMI occurs due to an NMI error, control should be transferred to the system NMI handler.

INT 02H - Nonmaskable Interrupt (NMI) 2-5

Interrupt 05H - Print Screen

This interrupt handler prints the screen to printer 1. When INT 05H is issued, the cursor position is saved and is restored upon completion of the interrupt. INT 05H runs with interrupts enabled. Additional print screen requests are ignored when a print screen is already in progress. An initial status error from the printer ends the print request. Data area address 50:00 contains the status of the print screen. The supported status values for 50:00 are as follows:

00 Print Screen not called or, on return, operation successfully completed

01 Print Screen in progress, ignore request

FF Error encountered during printing

For PC Convertible, an initial status error ends the print request and also sounds a "beep." The Ctrl-Break sequence ends the print screen.

2-6

tNT 05H -

Print Screen

Interrupt 08H - System Timer

This interrupt handler controls the timer interrupt from channel 0 of the system timer. The input frequency is 1.19318 MHz and the divisor is 65536, resulting in approximately 18.2 interrupts every second.

The interrupt handler:

• Maintains a count of interrupts at data area address 40:6C (timer counter) since power-on that may be used to establish time of day. After 24 hours of operation, 40:70 (timer overflow) is increased (made non 0).

• Decrements 40:40 (motor off counter of the diskette drive) and, when the count reaches 0, turns the diskette drive motor off, and resets the motor running flags in 40:3F (motor status).

• Calls a user routine through software interrupt 1CH every timer tick.

For PC Convertible, this interrupt handler calls a user routine through software interrupt 4AH when an alarm interrupt occurs. tNT 08H - System Timer 2-7

Interrupt 09H - Keyboard

This interrupt handler is issued upon the make or break of every keystroke.

For ASCII keys, when a make code is read from port 60H, the character code and scan code are placed in the 32-byte keyboard buffer that begins at data area address 40:1E, at the address pOinted to by 40:1C (keyboard buffer tail pointer). The keyboard buffer tail pointer is then increased by 2, unless it extends past the end of the buffer. In this case it is reinitialized to the start of the buffer.

For every Ctrl, Alt, or Shift key make or break, the BIOS data areas

40:17 and 40:18 (keyboard control) and 40:96 (keyboard mode state and type flags) are updated.

The Ctrl-Alt-Del sequence causes the handler to set 40:72 (reset flag) to hex 1234 (bypass memory test), then jump to the power-on self-test

(POST). The POST checks 40:72 (reset flag) and does not retest memory if it finds hex 1234. For PC Convertible, instead of a jump to

POST, a processor reset is done, causing POST to execute.

The Pause key sequence causes the handler to loop until a valid

ASCII keystroke is pressed. The PC Convertible issues INT 15H, (AH)

=

41H (Wait on External Event) to wait for a valid ASCII keystroke.

The print screen key sequence issues an INT 05H (Print Screen).

The Ctrl-Break sequence issues an INT 1 BH (Control Break).

For PC XT BIOS dated 1/10/86 and after, AT, PC XT Model 286, PC

Convertible, and Personal

System/2

products, System Request causes the handler to issue an INT 15H, (AH)

=

85H (System Request

Key Pressed) to inform the system of a System Request key make or break operation. Also, the keyboard interrupt issues an INT 15H, (AH)

=

91H (Interrupt Complete) with (AL)

=

02H (Type

=

Keyboard), indicating that a keystroke is available.

2-8

INT 09H -

Keyboard

For AT BIOS dated 6/10/85 and after, PC XT Model 286, PC

Convertible, and Personal System/2 products, INT 15H, (AH)

=

4FH

(Keyboard Intercept), is issued after reading the scan code from port

60H. This allows the system to replace or absorb the scan code. End of Interrupt (EOI) processing is done upon return.

INT 09H - Keyboard 2-9

Interrupt 10H - Video

The following is a summary of the video functions of INT 10H:

(AH) = OOH - Set Mode

(AH)

=

01H - Set Cursor Type

(AH)

=

02H - Set Cursor Position

(AH)

=

03H ~ Read Cursor Position

(AH)

=

04H - Read Light Pen Position

(AH)

=

05H - Select Active Display Page

(AH)

=

06H - Scroll Active Page Up

(AH)

=

07H - Scroll Active Page Down

(AH)

=

08H - Read Attribute/Character at Current Cursor Position

(AH) = 09H - Write Attribute/Character at Current Cursor Position

(A H)

=

OAH - Write Character at Current Cursor Position

(AH)

(AH)

(AH)

(AH)

=

OSH - Set Color Palette

=

OCH - Write Dot

=

ODH - Read Dot

=

OEH - Write Teletype to Active Page

(AH) = OFH - Read Current Video State

(AH) = 10H - Set Palette Registers

(AH)

=

11 H - Character Generator

(AH)

(AH)

=

12H - Alternate Select

=

13H - Write String

(AH)

=

14H - Load LCD Character Font/Set LCD High-Intensity Substitute

(AH)

=

15H - Return Physical Display Parameters for Active Display

(AH)

=

16H to 19H - Reserved

(AH) = 1AH - Read/Write Display Combination Code

(AH)

=

1SH - Return Functionality/State Information

(A H) = 1CH - Save/Restore Video State

(AH)

=

1DH to FFH - Reserved

Figure 2-2. INT 10H - Video Functions

2-10 INT 10H - Video

(AH)

=

OOH - Set Mode

(AL) - Requested video mode

The following table describes the supported video modes:

Mode

(Hex)

0, 1

2,3

4,5

6

7

8

9

A

B,C

D

E

F

10

11

12

13

Type

Maximum

Colors

A/N

A/N

APA

APA

A/N

APA

APA

APA

-Reserved-

APA

APA

APA

APA

APA

APA

APA

16

16

4

2

Mono

16

16

4

16

16

Mono

16

2

16

256

APA All Points Addressable (Graphics)

A/N Alphanumeric (Text)

Alpha

Format

40x25

80x25

40x25

80x25

80x25

20x25

40x25

80x25

40x25

80x25

80x25

80x25

80x30

80x30

40x25

Buffer

Start

B8000

B8000

B8000

B8000

BOOOO

BOOOO

BOOOO

BOOOO

AOOOO

AOOOO

AOOOO

AOOOO

AOOOO

AOOOO

AOOOO

Figure 2-3. Video Modes

The following table lists hardware specific video mode characteristics:

Mode Display Box

(Hex) Size Size Supporting IBM Products

0, 1 320x200 8x8

PCjr,

Color/Graphics Monitor Adapter (CGA),

Enhanced Graphics Adapter (EGA), PC

Convertible, and Personal System/2

Products Except Model 30

320x350 8x14

EGA, and Personal System/2 Products

Except Model 30

Maximum

Pages

8

8

320x400 8x16 Personal System/2 Model 30

360x400 9x16 Personal System/2 Products Except Model 30

8

8

Figure 2-4 (Part 1 of 2). Hardware Specific Video Mode Characteristics

INT 10H - Video

2-11

Mode Display Box

(Hex) Size

Size Supporting IBM Products

2,3 640x200 8x8

PCjr,

CGA, and PC Convertible

640x200 8x8

EGA, and Personal System/2 Products

Except Model 30

640x350 8x14 EGA, and Personal System/2 Products

Except Model 30

640x400 8x16 Personal System/2 Model 30

720x400 9x16 Personal System/2 Products Except Model 30

4,5 320x200 8x8

PCjr,

CGA, EGA, and Personal System/2

Products

6

7

640x200 8x8

PCjr,

CGA, EGA, and Personal System/2

Products

720x350 9x14 Monochrome Display and Printer Adapter

(MDPA) and PC Convertible

720x350 9x14 EGA and Personal System/2 Products Except

Model 30

720x400 9x16 Personal System/2 Products Except Model 30

640x200 8x8 PC Convertible

Maximum

Pages

4

8

8

8

8

8

8

4

8

9

A

E

160x200 8x8

PCjr

320x200 8x8

PCjr

640x200 8x8

PCjr

B,C

D

-Reserved-

320x200 8x8 EGA and Personal

System/2

Products Except

Model 30

640x200 8x8 EGA and Personal System/2 Products Except

Model 30

F,10 640x350 8x14 EGA and Personal System/2 Products Except

Model 30

640x480 8x16 Personal System/2 Products 11

12

13

640x480 8x16 Personal System/2 Products Except Model 30

320x200 8x8 Personal System/2 Products

8

4

2

Figure 2-4 (Part 2 of 2). Hardware Specific Video Mode Characteristics

2-12 INT

10H - Video

Notes:

1. PCjr

and IBM Color/Graphics Monitor Adapter (CGA): a. The cursor is not displayed in graphics (APA) modes. b. Modes 0, 2, and 5 are identical to modes 1, 3, and 4 except color burst is not enabled. Color burst on enables color information on composite displays. Color burst off disables color information on composite displays. RGB displays are not affected by the state of color burst. c. For PCjr during mode set, if bit 7 of (AL) is set, the video buffer is not cleared.

2. IBM Enhanced Graphics Adapter (EGA): a. The cursor is not displayed in graphics (APA) modes. b. Modes 0, 2, and 5 are identical to modes 1, 3, and 4 except color burst is not enabled. Color burst on enables color information on composite displays. Color burst off disables color information on composite displays. RGB displays are not affected by the state of color burst. c. The power-on default mode is based on switch settings on the adapter. d. During mode set, if bit 7 of (AL) is set, the video buffer is not cleared.

See BIOS data area address 40:A8 on page 3-12 for save pointer dynamic overrides.

3. PC Convertible: a. The cursor is not displayed in graphics (APA) modes. b. Modes 0, 2, and 5 are identical to modes 1, 3, and 4 except color burst is not enabled. Color burst on enables color information on composite displays. Color burst off disables color information on composite displays. RGB displays are not affected by the state of color burst. c. The power-on default mode for color/graphics mode is 2. d. The power-on default mode for monochrome mode is 7. e. During mode set, if bit 7 of (AL) is set, the video buffer is not cleared. f. Mode 7 (640x200) is used for a liquid crystal display (LCD) as monochrome. g. Mode 7 (720x350) is used for a monochrome display.

INT 10H - Video

2-13

4. Personal

System/2

Model 30: a. The cursor is not displayed in graphics (APA) modes. b. Modes 0, 2, and 5 are identical to modes 1, 3, and 4. c. The power-on default mode is' 3. d. During mode set, if bit 7 of (Al) is set, the video buffer is not cleared. e. For all modes except mode 13H, the first 16 color registers are initialized and the values in the remaining 240 color registers are undefined.

See BIOS data area address 40:A8 on page 3-12 for save pointer dynamic overrides.

5. Personal

System/2

products except Model 30: a. The cursor is not displayed in graphics (APA) modes. b. Modes 0, 2, and 5 are identical to modes 1, 3, and 4. c. The power-on default mode with a color display attached is 3. d. The power-on default mode with a monochrome display attached is 7. e. During mode set, if bit 7 of (Al) is set, the video buffer is not cleared. f. For all modes except mode 13, the first 64 color registers are initialized and the values in the remaining 192 color registers are undefined. g. Refer to (AH)

=

12H, (Bl)

=

30H to select alpha mode scan lines (200, 350 or 400.)

See BIOS data area address 40:A8 on page 3-12 for save pointer dynamic overrides.

(AH)

=

01 H • Set Cursor Type

(CH) - Top line for cursor (bits 4 to 0)

(Hardware causes blinking cursor; setting bit 6 or 5 causes erratic blinking or no cursor)

(Cl) - Bottom line for cursor (bits 4 to 0)

2·14

INT 10H - Video

Notes:

1. The BIOS maintains only one cursor type for all video pages.

2. For Personal

System/2

Model 30, before writing to the hardware video ports, (CH) is multiplied by 2, and (CL) is multiplied by 2 and increased by 1.

(AH) = 02H - Set Cursor Position

(OH,OL) - Row, column (0,0 is upper left)

(BH) - Page number (0-based), see Figure 2-4 on page 2-11 for maximum pages

(AH)

=

03H - Read Cursor Position

(BH) - Page number (0-based), see Figure 2-4 on page 2-11 for maximum pages

On Return:

(OH,OL) - Row, column of current cursor for requested page

(CH,CL) - Cursor type currently set

(AH)

=

04H - Read Light Pen Position

For PC Convertible and Personal

System/2

products:

On Return:

(AH)

=

00H - Light pen is not supported

(BX, CX, OX) are altered on return

For all others:

On Return:

(AH)

=

00H - Light pen switch not activated

(BX, CX, OX) are altered on return

(AH)

=

01H - Valid light pen value in registers

(OH,OL) - Row, column of character

(CH) - Raster line (0 to 199)

(CX) - Raster line (0 to nnn) new graphics modes

(BX) - PEL column (0 to 319,639)

INT 10H - Video

2-15

(AH)

=

OSH - Select Active Display Page

For

PCjr:

(AL)

=

80H - Read cathode ray tube (CRT) and microprocessor page registers

(AL)

=

81H - Set microprocessor page register

(BL) - Microprocessor page register

(AL)

=

82H - Set CRT page register

(BH) - CRT page register

(AL)

=

83H - Set microprocessor and CRT page registers

(BL) - Microprocessor page register

(BH) - CRT page register

On Return for all:

(BH) - CRT page register

(BL) - Microprocessor page register

For all others:

(AL) - New page number (0-based), see Figure 2-4 on page 2-11 for maximum pages

(AH) 06H - Scroll Active Page Up

(AL) - Number of lines blanked at bottom of window

=

00H - Blank entire window

(CH,CL) - Row, column of upper left corner of scroll

(DH,DL) - Row, column of lower right corner of scroll

(BH) - Attribute to use on blank line

(A H)

=

07H - Scroll Active Page Down

(AL) - Number of input lines blanked at top of window

=

00H - Blank entire window

(CH,CL) - Row, column of upper left corner of scroll

(DH,DL) - Row, column of lower right corner of scroll

(BH) - Attribute to use on blank line

2-16 INT 10H - Video

(AH)

=

08H - Read AHribute/Character at Current Cursor Position

(BH) - Page number (0-based), see Figure 2-4 on page 2-11 for maximum pages

On Return:

(AL) - Character read

(AH) - Attribute of character read (alpha modes only)

(AH)

=

09H - Write Attribute/Character at Current Cursor Position

For the read/write character interface while in graphics modes 4,

5, and 6, the characters are formed from a character generator maintained in the system ROM that contains only the first 128 characters. To read or write the second 128 characters, initialize the pointer at INT 1 FH (location 0007CH) to point to the 1 Kb table containing the code points for the second 128 characters

(128-255). For all other graphics modes, 256 graphics characters are supplied in the system ROM.

For the write character interface while in graphics mode, the character count contained in (CX) produces valid results for characters on the same row only. Continuation to succeeding rows produces invalid results.

(BH) - Page number (0-based), see Figure 2-4 on page 2-11 for maximum pages

(CX) - Count of characters to write

(AL) - Character to write

(BL) - Attribute of character (alpha)/color of character (graphics)

Notes:

1. Functions (AH)

=

09H and (AH)

=

OAH are similar. Use (AH)

=

09H for graphics modes.

2. For graphics modes, if bit 7 of (Bl)

=

01 H, then color value is exclusively ORed with current video memory (except in mode

13H).

3. For mode 13H, the value passed in (BH) is used as the background color.

INT 10H - Video

2-17

(AH)

=

OAH - Write Character at Current Cursor Position

(BH) - Page number (0-based), see Figure 2-4 on page 2-11 for maximum pages

(CX) - Count of characters to write

(AL) - Character to write

Note: Use (AH)

=

09H for graphics modes.

(AH)

=

OBH - Set Color Palette

(BH) - Color ID being set (0 to 1)

(BL) - Color value to be used with color ID

(BH)

=

00H - Set background color for 320x200 graphics modes

- Set border color for alphanumeric modes

(BL)

- Set foreground color for 640x200 graphics

=

(0 to 31)

(BH)

(BL)

=

01H - Select palette for 320x200 graphics

=

0 - Green (l)/red (2)/brown (3)

=

1 - Cyan (l)/magenta (2)/white (3)

Notes:

1. This interface has meaning for 320x200 graphics only.

2. In 40x25 or BOx25 alpha modes, the value set for palette color o indicates the border color to use (0 to 31), where values 16 to 31 select the high-intensity background set.

3. For EGA and Personal System/2 products, when in 640x200 graphics and color 10

=

0, the background color is set.

(AH)

=

OCH - Write Dot

(DX) - Row number

(CX) - Column number

(AL) - Color value

Note: If bit 7 of (AL)

=

01H, then the color value is exclusively

ORed with the current contents of the dot (except in mode

13H).

2-18 INT 10H - Video

For graphics modes supporting more than one page:

(BH) - Page number (0-based). see Figure 2-4 on page 2-11 for maximum pages

(AH)

=

ODH - Read Dot

(OX) - Row number

(CX) - Column number

For graphics modes supporting more than one page:

(BH) - Page number (0-based). see Figure 2-4 on page 2-11 for maximum pages

On Return:

(Al) returns dot read

(AH)

=

OEH - Write Teletype to Active Page

(Al) - Character to write

(Bl) - Foreground color in graphics mode

Notes:

1. The screen width is controlled by the mode currently set.

2. Carriage Return, Line Feed, Backspace and Bell are treated as commands rather than printable characters.

3. For PC BIOS dated

4/24/81

and

10/19/81,

(BH) must be set to the active page.

(AH)

=

OFH - Read Current Video State

On Return:

(Al) - Mode currently set

[see (AH)

=

00H for explanation]

(AH) - Number of character columns on screen

(BH) - Current active page number (0-based). see

Figure 2-4 on page 2-11 for maximum pages

INT 10H -

Video

2-19

(AH)

=

10H - Set Palette Registers

For

PCjr,

systems with EGA capability, and Personal System/2 products except Model 30:

(Al)

=

00H - Set individual palette register

(Bl) - Palette register to set

(BH) - Value to set

(Al)

=

01H - Set overscan register

(BH) - Value to set

(Al)

=

02H - Set all palette registers and overscan

(ES:DX) - Pointer to 17-byte table

Bytes 0 to 15 - Palette values

Byte 16 - Overscan value

(Al)

=

03H - Toggle intensify/blinking bit

(Bl)

=

00H - Enable intensify

=

01H - Enable blinking

For Personal System/2 products except Model 30:

(AL)

=

04H to 06H - Reserved

(Al)

=

07H - Read individual palette register

(Bl) - Palette register to read (range 0 to 15)

On Return:

(BH) - Value read

(Al)

=

08H - Read overscan register

On Return:

(BH) - Value read

(Al)

=

09H - Read all palette registers and overscan

(ES:DX) - fointer to 17-byte buffer for return values

On Return:

(ES:DX) - Pointer to 17-byte table destination

Bytes 0 to 15 - Palette values

Byte 16 - Overscan value

2-20 INT 10H - Video

(Al)

=

10H - Set individual color register

(BX) - Color register to set

(DH) - Red value to set

(CH) - Green value to set

(Cl) - Blue value to set

(Al)

=

11H - Reserved

(Al)

=

12H - Set block of color registers

(ES:DX) - Pointer to table of color values

Table format: red, green, blue, red, green, blue

(BX) - First color register to set

(CX) - Number of color register to set

(Al)

=

13H - Select color page (not valid for mode 13H)

(Bl)

=

00H - Select paging mode

(BH) - Paging mode

=

00H - Selects 4 register blocks of 64 registers

=

01H - Selects 16 register blocks of 16 registers

(Bl)

=

01H - Select page

(BH) - Page number (0-based), see Figure 2-4 on page 2-11 for maximum pages

For 64-register block mode:

=

00H - Selects first block of 64 color registers

=

01H - Selects second block of 64 color registers

=

02H - Selects third block of 64 color registers

=

03H - Selects fourth block of 64 color registers

For 16-register block mode:

=

00H -Selects first block of 16 color registers

=

01H - Selects second block of 16 color registers

=

0FH - Selects 16th block of 16 color registers

Note: Function (AH)

=

OOH

(Set Mode) defaults to the

64-register block mode, with the first block of 64 color registers active. Only these 64 color registers are initialized during mode set. When using

page selection,

initialize alternate blocks of the color registers.

INT 10H - Video

2-21

(Al)

=

14H - Reserved

(Al)

=

15H - Read individual color register

(BX) - Color register to read

On Return:

(DH) - Red value read

(CH) - Green value read

(Cl) - Blue value read

(Al)

=

16H - Reserved

(Al)

=

17H - Read block of color registers

(ES:DX) - Pointer to destination table for values

Table format: red. green. blue. red. green. blue

(BX) - First color register to read

(CX) - Number of color registers to read

On Return:

(ES:DX) - Pointer to table of values

(Al) = 18H to 19H - Reserved

(Al)

=

1AH - Read color page state

On Return:

(Bl) - Current paging mode

(BH) - Current page

Note:

See (AL)

=

13H on page 2-21 for paging modes and page information.

(Al)

=

1BH - Sum color values to gray shades

(BX) - First color register to sum

(CX) - Number of color registers to sum

Note:

This call reads red, green, and blue values found in color registers, performs a weighted sum (300/0 red

+

59% green

+

11 % blue), then writes the result into each red, green, and blue component of the color register (original data is not retained).

2-22

INT 10H - Video

For Personal System/2 Model 30:

(AL)

=

00H

(BX)

=

0712H - Color registers set resulting in 8 consistent colors

(AL)

=

01H to 02H - Reserved

(AL)

=

03H - Toggle intensify/blinking bit

(BL)

=

00H - Enable intensify

=

01H - Enable blinking

(AL)

=

04H to 07H - Reserved

(AL)

=

10H - Set individual color register

(BX) - Color register to set

(DH) - Red value to set

(CH) - Green value to set

(CL) - Blue value to set

(AL)

=

11H - Reserved

(AL)

=

12H - Set block of color registers

(ES:DX) - Pointer to table of color values

Table format: red, green, blue, red, green, blue

(BX) - First color register to set

(CX) - Number of color registers to set

(AL)

=

13H to 14H - Reserved

(AL)

=

15H - Read individual color register

(BX) - Color register to read

On Return:

(DH) - Red value read

(CH) - Green value read

(CL) - Blue value to read

(AL)

=

16H - Reserved

INT 10H - Video 2-23

(Al)

=

I7H - Read a block of color registers

(ES:DX) - Pointer to destination table for values

Table format: red. green. blue. red. green. blue

(BX) - First color register to read

(CX) - Number of color registers to read

On Return:

(ES:DX) - Pointer to table of values

(Al)

=

I8H to IAH - Reserved

(Al)

=

IBH - Sum color values to gray shades

(BX) - First color register to sum

(CX) - Number of color registers to sum

Note: This call reads red, green, and blue values found in color registers, performs a weighted sum (30% red

+

59% green

+

11 % blue), then writes result into each red, green, and blue component of the color register (original data is not retained).

For all others no action is performed.

(AH)

=

11 H -

Character Generator

For systems with EGA capability, this call initiates a mode set, completely resetting the video environment but maintaining the regenerator buffer.

(Al)

=

00H - User alpha load

(ES:BP) - Pointer to user table

(CX) - Count to store

(DX) - Character offset into table

(Bl) - Block to load

(BH) - Number of bytes per character

(Al)

=

01H - ROM monochrome set

(Bl) - Block to load

(Al)

=

02H - ROM 8x8 double dot

(Bl) - Block to load

2-24 INT 10H - Video

(AL)

=

03H - Set block specifier (valid in alpha modes)

(BL) - Character generator block selects

Character attribute byte. bit 3

=

0:

(BL) bits 1. 0 select a block from blocks 0 to 3

Character attribute byte. bit 3

=

1:

(BL) bits 3. 2 select a block from blocks 0 to 3

For example:

• To set a 256 character set using block 3, set (BL)

=

OFH; this selects a single block. Character attribute bit 3 turns foreground intensity on or off.

• To specify a 512 character set as active using blocks 0 and 3, set (BL)

=

OCH; this selects block 0 when character attribute bit 3

=

0, and block 3 when character attribute bit 3

=

1.

If bits (1, 0) and bits (3, 2) are the same, only one block is selected and bit 3 of the attribute byte turns the foreground intensity on or off.

When 512 characters are active, a function call with (AX)

=

1000H and (BX)

=

0712H is recommended to set the color planes with eight consistent colors.

Register values, (AL)

=

10H, 11H, and 12H, are similar to (AL)

=

OOH, 01 H, and 02H, respectively, with the following exceptions:

1. Page 0 must be active.

2. Points (bytes per character) are recalculated.

3. Rows are calculated as follows:

INT [(200 or 350) / points] - 1

4. The length of the regenerative buffer is calculated as follows:

(Number of rows on screen) x (Number of columns on screen) x 2

5. The CRTC registers are reprogrammed as follows:

R09H

=

Points - 1

R0AH

=

Points - 2

R0BH

R12H

R14H

~aximum scan line

Cursor start

=

Points - 1 Cursor end

=

[(Number of rows on screen) x Points] - 1 Vertical display end

=

Points - 1 Underline location.

(Done in mode 7H only)

Note:

The preceding register calculations must be close to the original table values or the results may be unpredictable.

INT 10H - Video

2-25

(Al)

=

10H - User alpha load

(ES:BP) - Pointer to user table

(CX) - Count to store

(DX) - Character offset into table

(Bl) - Block to load

(BH) - Number of bytes per character

(Al)

=

IlH - ROM monochrome set

(Bl) - Block to load

(Al)

=

12H - ROM 8x8 double dot

(Bl) - Block to load

(Al)

=

20H - Set user graphics characters pointer at INT IFH

(ES:BP) - Pointer to user table

(Al)

=

21H - Set user graphics characters pointer at INT 43H

(ES:BP) - Pointer to user table

(CX) - Points (bytes per character)

(Bl) - Row specifier

=

00H - User

(Dl) - Rows

=

01H - 14 (0EH)

=

02H - 25 (19H)

=

03H - 43 (2BH)

(Al)

=

22H - ROM 8x14 Set

(Bl) - Row specifier

(Al)

=

23H - ROM 8x8 double dot

(Bl) - Row specifier

Note: (AL)

=

10H, 11H, 12H, 20H, 21H, 22H, or 23H should be called only immediately after a mode set is issued, or the results may not be predictable.

(Al)

=

30H - Information

(BH) - Font pointer

=

00H - Return current INT 1FH pointer

=

01H - Return current INT 44H pointer

=

02H - Return ROM 8x14 font pOinter

=

03H - Return ROM double dot pointer

=

04H - Return ROM double dot pointer (top)

=

05H - Return ROM alpha alternate 9x14

2-26 tNT 10H - Video

On Return:

(CX) - Points

(OL) - Rows

(ES:BP) - Pointer to table

For Personal

System/2

products except Model 30:

(AL)

=

00H - User alpha load

(ES:BP) - Pointer to user table

(CX) - Count to store

(OX) - Character offset into table

(BL) - Block to load

(BH) - Number of bytes per character

(AL)

=

01H - ROM 8x14 font

(BL) - Block to load

(AL)

=

02H - ROM 8x8 double dot font

(BL) - Block to load

(AL)

=

03H - Set block specifier (valid in alpha modes)

(BL) - Character generator block selects

Character attribute byte bit 3

=

0:

(BL) bits 4. 1. 0 select a block from blocks 0 to 7

Character attribute byte bit

1

=

1:

(BL) bits 5. 3. 2 select a block from blocks 0 to 7

For example:

• To set a 256-character set using block 6, set (BL)

=

03AH; this selects a single block. Character attribute bit 3 turns foreground intensity on or off.

• To specify a 512-character set as active using blocks 0 and 6, set (BL)

=

028H; this selects block 0 active when character attribute bit 3

=

0, and block 6 active when character attri bute bit 3

=

1.

If bits (4, 1, 0) and bits (5, 3, 2) are the same, then only one block is selected and bit 3 of the attribute byte turns foreground intensity on or off.

When 512 characters are active, a function call with (AX) and (BX)

=

1000H

=

0712H is recommended to set color planes with eight consistent colors.

INT 10H - Video

2-27

(AL)

=

04H - ROM 8x16 Font

(BL) - Block to load

Register values (AL)

=

10H, 11 H,12H, and 14H, are similar to

(AL)

=

OOH, 01H, 02H, and 04H, respectively, with the following exceptions:

1. Page 0 is active.

2. Points (bytes per character) are recalculated.

3. Rows are calculated as follows:

INT[(200, 350, or 400) / pOints] - 1

4. The length of the regenerative buffer is calculated as follows:

(Number of rows on screen) x (Number of columns on screen) x 2

5. The CRTC registers are reprogrammed as follows:

R09H

R0AH

R0BH

R12H

=

Points - 1

=

Points - 2

=

Points - 1

=

Vertical displacement end

Maximum scan line

Cursor start

Cursor end

For 350 and 400 scan line modes:

[(Number of rows on screen) x Points] - 1

R14H

For 200 scan line modes:

{[(Number of rows on screen) x Points] x 2} - 1

=

Points - 1

(Done in mode 7H only)

Underline location

Note: The preceding register calculations must be close to the original table values or the results may be unpredictable.

(AL)

=

10H - User alpha load

(ES:BP) - Pointer to user table

(CX) ~ Count to store

(OX) - Character offset into table

(BL) - Block to load

(BH) - Number of bytes per character

(AL)

=

IlH - ROM 8x14 font

(BL) - Block to load

(AL)

=

12H - ROM 8x8 double dot font

(BL) - Block to load

2-28 INT 10H -Video

(Al)

=

14H - ROM 8x16 font

(Bl) - Block to load

(Al)

=

20H - Set user graphics characters pointer at INT 1FH

(ES:BP) - Pointer to user table

(Al)

=

21H - Set user graphics characters pointer at INT 43H

(ES:BP) - Pointer to user table

(eX) Points (bytes per character)

(Bl) - Row specifier

=

00H - User

(Dl) - Rows

=

01H - 14 (0EH)

=

02H - 25 (19H)

=

03H - 43 (2BH)

(Al)

=

22H - ROM 8x14 font

(Bl) - Row specifier

(Al)

=

23H - ROM 8x8 double dot font

(Bl) - Row specifier

(Al)

=

24H - ROM 8x16 font

(Bl) - Row specifier

Note:

(AL)

=

10H, 11 H, 12H,14H, 20H, 21 H, 22H, 23H or 24H should be called only immediately after a mode set is issued, or the results may not be predictable.

(Al)

=

30H - Information

(BH) - Font pointer

=

00H - Return current INT 1FH pointer

=

01H - Return current INT 43H pointer

=

02H - Return ROM 8x14 font pointer

=

03H - Return ROM 8x8 font pointer

=

04H - Return ROM 8x8 font pointer (top)

=

05H - Return ROM 9x14 font alternate

=

06H - Return ROM 8x16 pointer

=

07H - Return ROM 9x16 font alternate

On Return:

(eX) Points

(Dl) - Rows (number of character rows on screen - 1)

(ES:BP) - Pointer to table

INT 10H - Video

2-29

For Personal

System/2

Model 30:

(AL)

=

00H - User alpha load

(ES:BP) - Pointer to user table

(CX) - Count to store

(OX) - Character offset into table

(BL) - Block to load

(BH)

=

16 bytes per character for 400 scan lines

Note: If (BH)

=

14 bytes per character for 400 scan lines, characters are extended to 16 high, by extending the last line of 14-high characters.

(AL) = 01H - Reserved

[If called~ (AL)

=

04H executed]

(AL)

=

02H - ROM 8x8 double dot font

(BL) - Block to load

(AL)

=

03H - Set block specifier (valid in alpha modes)

(BL) - Character generator block selects

Character attribute byte bit 3

=

0:

(BL) bits I, 0 select a block from blocks 0 to 3

Character attribute byte bit 3

=

1:

(BL) bits 3, 2 select a block from blocks 0 to 3

For example:

• To specify a 256-character set active using block 2, set (BL)

=

OAH; this selects a single block. Character attribute bit 3 turns foreground intensity on or off.

• To specify a 512-character set active using blocks 0 and 2, set

(BL)

=

08H; this selects block 0 active when character attribute bit 3

=

0,

and block 2 active when character attribute bit 3

=

1.

If bits (1, 0) and bits (3, 2) are the same, then only one block is

selected and bit 3 of the attribute byte turns foreground intensity on or off.

When 512 characters are active, a function call with (AX) and (BX)

=

0712H is recommended to set color registers,

=

1000H resulting in eight consistent colors.

2-30 INT 10H - Video

A block specifier command must be issued following any character load command to make the loaded block an active character set.

(Al)

=

04H - ROM 8x16 font

(Bl) - Block to load

The following register values are reserved. Calls to (AL)

=

10H,

11H, 12H, and 14H are executed as if they were calls to (AL)

=

OOH, 01H, 02H, and 04H, respectively.

(Al)

=

10H - Reserved

[if called - (Al)

=

00H executed]

(Al)

=

11H - Reserved

[if called - (Al)

=

01H executed]

(Al)

=

12H - Reserved

[if called - (Al)

=

02H executed]

(Al)

=

14H - Reserved

[if called - (Al)

=

04H executed]

(Al)

=

20H - Set user graphics characters pointer at INT 1FH

(ES:BP) - Pointer to user table

(Al)

=

21H - Set user graphics characters pointer at INT 43H

(ES:BP) - Pointer to user table

(eX) Points (bytes per character)

(Bl) - Row specifier

=

00H - User

(Dl) - Rows

=

01H - 14 (0EH)

= 02H - 25 (19H)

=

03H - 43 (2BH)

(Al) = 22H - Reserved

[if called, (Al)

=

24H executed]

(Al)

=

23H - ROM 8x8 double dot font

(Bl) - Row specifier

INT 10H - Video 2-31

(Al)

=

24H ROM 8x16 font

(Bl) - Row specifier

Note: (AL)

=

20H, 21 H, 22H, 23H or 24H should be called only immediately after a mode set is issued, or the results may not be predictable.

(Al)

=

30H - Information

(BH) - Font pointer

=

00H - Return current INT IFH pointer

=

01H - Return current INT 43H pOinter

= 02H - Reserved (if called. ROM 8x16 pointer returned)

=

03H - Return ROM 8x8 font pointer

=

04H - Return ROM 8x8 font pointer (top)

=

05H - Reserved

=

06H - Return ROM 8x16 pointer

=

07H - Reserved

On Return:

(CX) - Points

(Ol) - Rows (number of character rows on screen - 1)

(ES:BP) - Pointer to table

For all others no action is performed.

(AH)

=

12H - Alternate Select

For systems with EGA capability and Personal System/2 products except Model 30:

(Bl)

=

10H - Return EGA information

(BH)

=

00H - Color mode in effect (30x address range)

=

01H - Monochrome mode in effect (3Bx address range)

(Bl) - Memory value

=

00H - 64Kb

=

01H - 128Kb

=

02H - 192Kb

=

03H - 256Kb

(CH)

(Cl)

=

04H to FFH - Reserved

=

Adapter bits

=

Switch setting

(Bl)

=

20H - Select alternate print screen routine

2-32

INT 10H - Video

For Personal System/2 products except Model 30:

(BL)

=

30H - Select scan lines for alphanumeric modes

(Takes effect on next mode set)

(AL) = 0 - 200 scan lines

=

1 - 350 scan lines

=

2 - 400 scan lines

On Return:

(AL)

=

12H - Function supported

(BL)

=

31H - Default palette loading during set mode

(AH)

=

00H

(AL)

=

0 - Enable default palette loading

=

1 - Disable default palette loading

On Return:

(AL)

=

12H - Function supported

Note: The EGA 16-palette registers, the overscan register, and the 256 color registers are not altered during any mode set when in the disabled state.

(BL)

=

32H - Video

(AL)

=

0 - Enable video

=

1 - Disable video

On Return:

(AL)

=

12H - Function supported

Note: The video I/O port and regenerator

buffer address decode

is enabled/disabled for the display that is currently active.

(BL)

=

33H - Summing to gray shades

(AL)

=

0 - Enable summing

=

1 - Disable summing

On Return:

(AL)

=

12H - Function supported

INT 10H - Video 2-33

Note: When enabled, summing occurs during (AH)

Mode) color register loading and (AH)

=

OOH (Set

=

10H (Set Palette

Registers).

(BL)

=

34H - Cursor emulation

(AL)

=

0 - Enable cursor emulation

=

1 - Disable cursor emulation

On Return:

(AL)

=

12H - Function supported

Note: When enabled, the requested start/end value passed to

(AH)

=

01 H (Set Cursor Type), is scaled to the current character height. The power-on default is to enable cursor emulation.

For Personal System/2 Model 30:

(BL)

=

30H - Reserved

(BL)

=

31H - Default palette loading during set mode (AH

=

00H)

(AL)

=

0 - Enable default palette loading

=

1 - Disable default palette loading (the 256 color registers are not altered during any mode set when disabled)

On Return:

(AL)

=

12H - Function supported

(BL)

=

32H - Video (the video I/O address and buffers are enabled/disabled)

(AL)

=

0 - Enable video

=

1 - Disable video

On Return:

(AL)

=

12H - Function supported

(BL)

=

33H - Summing to gray shades

(AL)

=

0 - Enable summing

=

1 - Disable summing

2-34 INT 10H - Video

On Return:

(AL)

=

12H - Function supported

(BL)

=

34H - Reserved

Note: When enabled, summing occurs during (AH)

Mode) color register loading, and on (AH)

=

OOH (Set

=

10H (Set

Palette Registers).

For Personal

System/2

products:

(BL)

=

35H Display switch

(AL)

=

00H - Initial adapter video off

(ES:DX) - Pointer to switch state save area of

128 bytes

=

01H - Initial system board video on

=

02H - Switch off active video

(ES:DX) - Pointer to switch state buffer save area

=

03H - Switch on inactive video

(ES:DX)

=

Pointer to previously saved switch state buffer

On Return for all:

(AL)

=

12H - Function supported

This interface allows display switching between a system board video driven display and an adapter video driven display when there is overlap in usage of the BIOS data area and in hardware capabilities.

Display switching requires that a disable function is available for the system board and the adapter video functions

[(AH)

12H, (BL)

=

32H].

=

If there is no conflict between the adapter video and the system board video, both video functions are active in the system and display switching is not required.

If there is conflict between the adapter video and the system board video, the adapter video function is the primary video.

The system board video function remains disabled until display switching is enabled.

INT 10H - Video 2-35

The following steps initiate display switching:

1. Initial adapter video off, (AL)

=

OOH

2. Initial system board video on, (AL)

=

01 H.

The initiate display switching steps are valid only the first time switching is initiated. After the initiation steps, switching between the system board and adapter displays is done through 'the switch-off active video request, (AL) and the switch-on inactive video request, (AL)

=

03H.

=

02H

For a switch-off active video request, (AL)

=

02H, the currently active video function and display are disabled.

The switch state buffer saves the video state information.

This state information is required when reactivation of this display is desired through a switch-on inactive video request, (AL)

=

03H.

For a switch-on inactive video request, (AL)

=

03H, the currently inactive video function and display are enabled.

The switch state buffer restores the video state information. This state information was saved on a previous switch-off active video request, (AL)

=

02H, for this display.

For Personal System/2 products except Model 30:

(BL)

=

36H - Video screen off/on

(AL)

=

1 - Screen off

=

0 - Screen on

On Return:

(AL)

=

12H - Function supported

For all others no action is performed.

(AH)

=

13H - Write String

For PC XT BIOS dated 1/10/86 and after, AT, EGA, PC

Convertible, and Personal System/2 products:

(ES:BP) - Pointer to string to write

(ex) -

Character-only count

(OX) - Position to begin string, in cursor terms

(BH) - Page number (0-based), see Figure 2-4 on page 2-11 for maximum pages

2-36

INT 10H - Video

(AL)

=

00H

(BL) - Attribute

String - (Char, char, char, ... ); Cursor not moved

(AL)

=

01H

(BL) - Attribute

String - (Char, char, char, •.. ); Cursor is moved

(AL)

=

02H

String - (Char, attr, char, attr, ... )

Cursor not moved, valid for alpha modes only

(AL)

=

03H

String - (Char, attr, char, attr, ... )

Cursor is moved, valid for alpha modes only

Note: Carriage Return, Line Feed, Backspace, and Bell are treated as commands rather than printable characters.

For all others no action is performed.

(AH)

=

14H - Load LCD Character Font/Set LCD High-Intensity

Substitute

For PC Convertible:

(AL)

=

00H - Load user specified font

(ES:OI) - Point to character font within user table where loading starts

(CX) - Number of characters to store (1 to 256) value checked

(OX) - Character offset into RAM font area

(BL)

=

00H - Load main font (block 0)

=

01H - Load alternate font (block 1)

=

02H to FFH - No operation

(BH) - Number of bytes per character (1 to 255) value checked

(AL)

=

01H - Load system ROM default font

(BL)

=

00H - Load main font (block 0)

=

01H - Load alternate font (block 1)

=

02H to FFH - No operation

(AL)

=

02H - Set mapping of LCD high intensity attribute

(BL)

=

00H - Ignore high-intensity attribute

=

01H - Map high-intensity to reverse image

=

02H - Map high-intensity to underscore

=

03H - Map high-intensity to select alternate font

=

04H to FFH - No operation

INT 10H - Video 2-37

(AL)

=

03H to FFH - No operation

For all others no action is performed.

(AH)

=

15H - Return Physical Display Parameters for Active

Display

For PC Convertible:

On Return:

(AX) - Alternate display adapter type

=

0 - No alternate adapter

=

5140 - LCD

=

5153- CGA type display

=

5151 - Monochrome type display

(ES:DI) - Points to table defined as follows:

Word 1 - Display model number

Word 2 - Number of vertical PELs per meter

Word 3 - Number of horizontal PELs per meter

Word 4 - Total number of vertical PELs

Word 5 - Total number of horizontal PELs

Word 6 - Horizontal PEL separation in micrometers

(center to center)

Word 7 - Vertical PEL separation in micrometers

(center to center)

The PC Convertible has defined the following display types and tables:

Word

5

6

7

1

2

3

4

Monochrome CGA

0

0

0

0

5151H

0

0

5153H

0498H

OA15H

OOC8H

0280H

0352H

0184H

LCD as CGA

5140H

08E1H

0987H

OOC8H

0280H

0188H

019AH

Figure 2-5. PC Convertible Display Types

For all others no action is performed.

(AH)

=

16H to 19H - Reserved

LCD (Monochrome)

5140H

0

0

0

0

0

0

2-38 INT 10H - Video

(AH)

=

1 AH - Read/Write Display Combination Code

For Personal System/2 products:

(AL)

=

00H - Read display combination code

On Return:

(AL)

= lAH - Function supported (see display codes on page

2-39)

(BL) - Active display code

(BH) - Alternate display code

(AL)

=

01H - Write display combination code (see display codes on page 2-39)

(BL) - Active display code

(BH) - Alternate display code

On Return:

(AL)

= lAH - Function supported

Display Codes:

00H - No display

01H - Monochrome with 5151 (monochrome)

02H - CGA with 5153/4 (color)

03H - Reserved

04H - EGA with 5153/4 (color)

05H - EGA with 5151 (monochrome)

06H - Professional Graphics System with 5175 (color)

07H - Personal System/2 products except Model 30 with analog monochrome

08H - Personal System/2 products except Model 30 with analog color

09H to 0AH - Reserved

0BH - Personal System/2 Model 30 video with analog monochrome

0CH - Personal System/2 Model 30 video with analog color

0DH to FEH - Reserved

-1 - Unknown

For all others no action is performed.

INT 10H - Video 2-39

(AH)

=

1 BH - Return Functionality/State Information

For Personal System/2 products:

(BX) - Implementation type

(ES:DI) - User buffer pOinter for return of information

On Return:

User buffer contains functionality/state information

(AL)

=

IBH - Function supported

For implementation type eeH:

(BX)

= e0H

(ES:DI)

=

Buffer of size 40H bytes

(DI+00H) word - Offset to static functionality information

(DI+02H) word - Segment to static functionality information

Video states:

(The following information is dynamically generated and reflects the current video state.)

(DI+04H) byte - Video mode [see (AH)

=

00H on page 2-11 for supported modes]

(DI+05H) word - Columns on screen (character columns on screen)

(DI+07H) word - Length of regenerator buffer (bytes)

(DI+09H) word - Starting address in regenerator buffer

(DI+0BH) word - Cursor pOSition for eight display pages (row. column)

(DI+IBH) word - Cursor type setting (cursor start/end value)

(DI+IDH) byte - Active display page

(DI+IEH) word - CRT controller address (3BX-monochrome. 3DX-color)

(DI+20H) byte - Current setting of 3xS register

(DI+21H) byte - Current setting of 3x9 register

(DI+22H) byte - Rows on screen (character lines on screen)

(DI+23H) word - Character height (scan lines per character)

(DI+25H) byte - Display combination code (active)

(DI+26H) byte - Display combination code (alternate)

(DI+27H) word - Colors supported for current video mode

(DI+29H) byte - Display pages supported for current video mode

(DI+2AH) byte - Scan lines in current video mode

=

0 - 20e scan lines

=

1 - 350 scan lines

=

2 - 400 scan lines

=

3 - 4Se scan lines

=

4 to 255 - Reserved

2-40 INT 10H - Video

(DI+2BH) byte - Primary character block (Reserved on

Personal Systemj2 Model 30)

=

0 - Block 0

=

1 - Block 1

=

2 - Block 2

=

255 - Block 255

This information is based on block specifier [see (AH)

(AL)

=

03H].

=

IlH,

(DI+2CH) byte - Secondary character block (Reserved on

Personal Systemj2 Model 30)

=

0 - Block 0

=

1 - Block 1

=

2 - Block 2

=

255 - Block 255

This information is based on block specifier [see (AH) IlH,

(AL) = 03H].

(DI+2DH) byte - Miscellaneous state information

Bits 7, 6 - Reserved

Bit 5

Bit 4

=

0 - Background intensity

=

1 - Blinking

=

1 - Cursor emulation active

(Always 0 for Personal Systemj2 Model 30)

Bit 3

=

1 - Mode set default palette loading disabled

Bit 2

=

1 - Monochrome display attached

Bit 1

=

1 - Summing active

Bit 0

=

1 - All modes on all displays active

(Always 0 for Personal Systemj2 Model 30)

(DI+2EH) byte - Reserved

(DI+2FH) byte - Reserved

(DI+30H) byte - Reserved

(DI+31H) byte - Video memory available

=

=

0 - 64Kb

=

1 - 128Kb

=

2 - 192Kb

=

3 - 256Kb

4 to 255 - Reserved

INT 10H .,. Video

2-41

(DI+32H) byte - Save pointer state information

Bits 7, 6 - Reserved

Bit 5

=

1 - DCC extension active

Bit 4

=

1 - Palette override active

Bit 3

Bit 2

=

1 - Graphics font override active

=

1 - Alpha font override active

Bit 1

=

1 - Dynamic save area active

Bit 0

=

1 - 512-character set active

(DI+33H) to (DI+3FH) 13 bytes - Reserved

Format of static functionality table: o

=

Not supported

1

=

Supported

(00H) byte - Video modes

Bit 7

=

Mode 07H

Bit 6

Bit 5

=

Mode 06H

=

Mode 05H

Bit 4

=

Mode 04H

Bit 3

Bit 2

Bit 1

Bit 0

=

Mode 03H

=

Mode 02H

=

Mode 01H

=

Mode 00H

(01H) byte - Video modes

Bit 7 = Mode 0FH

Bit 6

Bit 5

=

Mode 0EH

=

Mode 0DH

Bit 4

=

Mode 0CH

Bit 3

Bit 2

Bit 1

=

Mode 0BH

=

Mode 0AH

=

Mode 09H

Bit 0

=

Mode 08H

(02H) byte - Video modes

Bits 7 to 4 - Reserved

Bit 3

Bit 2

=

Mode 13H

=

Mode 12H

Bit 1

=

Mode 11H

Bit 0

=

Mode 10H

See (AH)

=

00H on page 2-11 for video mode information.

2-42 INT 10H - Video

(03H) to (07H) 4 bytes - Reserved

(07H) byte - Scan lines available in text modes

Bits 7 to 3 - Reserved

Bit 2

Bit 1

Bit 0

=

400 scan lines

=

350 scan lines

=

200 scan lines

See (AH)

=

12H, (BL)

=

30H for text mode scan line selection.

(08H) byte - Character blocks available in text modes

(09H) byte - Maximum number of active character blocks in text modes

See (AH)

=

IlH for character block loading interfaces.

(0AH) byte - Miscellaneous functions

Bit 7

=

Color paging [see (AH)

=

10H]

Bit 6

Bit 5

Bit 4

Bit 3

Bit 2

Bit 1

Bit 0

(Always 0 for Personal System/2 Model 30)

=

Color palette [see (AH)

=

10H]

=

EGA palette [see (AH)

=

10H]

=

Cursor emulation [see (AH)

=

01H]

=

Mode set default palette loading [see

(AH)

=

12H]

=

Character font loading [see (AH) IlH]

=

Summing [see (AH)

=

10H and (AH) 12H]

=

All modes on all displays

(Always 0 for Personal System/2 Model 30)

(0BH) byte - Miscellaneous functions

Bits 7 to 4 - Reserved

Bit 3

=

DCC [see (AH)

= lAH]

Bit 2

=

Background intensity/blinking control [see

Bit 1

(AH) = 10H]

=

Save/restore [see (AH)

= lCH]

Bit 0

(Always 0 for Personal System/2 Model 30)

=

Light pen [see (AH)

=

04H]

(0CH) to (0DH) 2 bytes - Reserved

INT 10H - Video

2-43

(0EH) byte - Save pointer functions

Bits 7. 6

=

Reserved

Bit 5

=

Dee extension

(Always 0 for Personal System/2 Model 30)

Bit 4

Bit 3

=

Palette override

=

Graphics font override

Bit 2

=

Alpha font override

Bit 1

=

Dynamic save area

Bit 0

=

512-character set

(0FH) byte - Reserved

For all others no action is performed.

(AH)

==

1 CH - Save/Restore Video State

For Personal

System/2

products except Model 30:

(AL)

=

00H - Return save/restore state buffer size

(eX) - Requested states (see supported save/restore states on page 2-45)

On Return:

(AL)

= lCH - Function supported

(BX) - Save/restore buffer size block count [number of

64-byte blocks for saving requested states in (eX)]

(AL)

=

01H - Save state

(CX)

=

Requested states (see supported save/restore states

(ES:BX) on page 2-45)

=

Buffer pOinter to save state

On Return:

(AL)

= lCH - Function supported

Requested states saved

(AL)

=

02H - Restore state

(CX) - Requested states (see supported save/restore states on page 2-45)

(ES:BX) - Buffer pointer to restore state

2-44

INT 10H - Video

On Return:

(AL)

= lCH - Function supported

Requested states restored

Supported save/restore states

Bits 15 to 3 - Reserved and set to 0

Bit 2

=

1 - Save/restore video DAC state and color registers

Bit 1

=

1 - Save/restore video BIOS data area

Bit 0

=

1 - Save/restore video hardware state

Note: The current video state is altered during save a state operation. To maintain the current video state, perform a restore state operation.

For all others no action is performed.

(AH)

=

1 DH to FFH - Reserved

INT 10H - Video 2-45

Interrupt 11 H - Equipment Determination

This routine returns the optional devices that are attached to the system. BIOS data area 40:10 (installed hardware) is set during the

POST as follows:

On Return:

(AX) - Equipment flags

Bits 15,14 - Number of printers attached

Bit 13 - Internal modem installed

Bit 12 - Not used

Bits 11,10,9 - Number of RS-232-C cards attached

Bit 8 - Not used

Bits 7,6 - Number of diskette drives, if bit 0

=

1

(values are binary)

=

00 - 1 drive

=

01 - 2 drives

Bits 5,4 - Video mode type (values are binary)

=

00 - Reserved

=

01 - 40x25 (color)

=

10 - 80x25 (color)

=

11 - 80x25 (monochrome)

Bit 3 - Not used

Bit 2 - Pointing device installed

Bit 1

=

Math coprocessor installed

Bit 0

=

IPL diskette installed

2-46

INT 11 H - Equipment Determination

Interrupt 12H - Memory Size Determination

This routine returns the amount of RAM up to 640Kb in the system as determined by the POST, minus the memory allocated to the

Extended BIOS Data Area. See INT 15H, (AH)

=

C1H (Return

Extended BIOS Data Area Segment Address) on page 2-96, and INT

15H, (AH)

=

88H (Extended Memory Size Determine) on page 2-89 for additional information.

The following assumptions are made during memory size determination:

• All installed memory is functional

• All memory from 0 to 640Kb is contiguous.

On Return, (AX) contains the number of contiguous 1 Kb blocks of memory.

INT 12H - Memory Size Determination

2-47

Interrupt 13H - Diskette

This interface provides access to diskette drives. The following is a summary of the diskette functions of Interrupt 13H:

(AH)

(AH)

(AH)

(AH)

=

OOH - Reset Diskette System

=

01 H - Read Status of Last Operation

=

02H - Read Desired Sectors into Memory

=

03H - Write Desired Sectors from Memory

(AH)

=

04H - Verify Desired Sectors

(AH) = OSH - Format Desired Track

(AH)

=

06H to 07H - Reserved for Fixed Disk

(AH)

=

08H - Read Drive Parameters

(A H)

=

09H to 14H - Reserved for Fixed Disk

(AH)

=

1SH - Read DASD Type

(A H)

=

16H - Diskette Change Line Status

(A H)

(A H)

(AH)

=

17H - Set DASD Type for Format

=

18H - Set Media Type for Format

=

19H to FFH - Reserved

Figure 2-6. INT 13H - Diskette Functions

Note: For the diskette drive parameters see "Diskette Drive

Parameter Table" on page 3-23.

For AT, PC XT BIOS dated 1/10/86 and after, PC XT Model 286, PC

Convertible, and Personal System/2 products, operations that require the diskette drive motor to be turned on call INT 15H, (AX)

=

90FDH

(Diskette, Drive Motor Start). This allows the operating system to perform a different task while waiting for the diskette drive motor to accelerate.

Prior to waiting for the diskette interrupt, BIOS calls INT 15H, (AH)

=

90H (Device Busy) with (AL)

=

01H (Type

=

Diskette). This informs the operating system of the wait. The complementary INT 15H, (AH)

=

91 H (Interrupt Complete) with (AL)

=

01 H (Type

=

Diskette) is called indicating the operation is complete. See "Multitasking

Provisions" on page 4-16 for additional information.

(AH)

=

OOH - Reset Diskette System

(DL) - Drive number (0-based)

Bit 7

=

0 - Diskette

2-48 INT 13H - Diskette

On Return:

CF

=

1 - Status is non 0

=

0 - Status is 0

(AH) - Status of operation

=

80H - Diskette drive not ready

=

40H - Seek operation failed

=

20H - General controller failure

=

10H - Cyclic redundancy check (CRC) error on diskette read

=

0CH - Media type not found

=

09H -Attempt to DMA across a 64Kb boundary

=

08H - DMA overrun on operation

=

06H - Diskette change line active

=

04H - Requ&sted sector not found

=

03H - Write protect error

=

02H - Address mark not found

=

01H - Invalid diskette parameter

=

00H - No error

Diskette status at 40:41 - Status of operation

Notes:

1. If an error is reported by the diskette BIOS, reset the diskette system and retry the operation.

2. If (DL) is greater than or equal to hex 80, the diskette system is reset then the fixed disk system is reset. The status returned in (AH) is the status of fixed disk reset. Read the status of the diskette system after completion of the operation.

(AH)

=

01 H - Read Status of Last Operation

(DL) - Drive number (0-based)

Bit 7

=

0 - Diskette (value checked)

On Return:

CF

=

1 - Status is non 0

=

0 - Status is 0

(AH) - Status of operation (see values for the status of operation on page 2-49)

INT 13H - Diskette 2 .. 49

(AH)

=

02H - Read Desired Sectors Into Memory

(Dl) - Drive number (0-based)

Bit 7

=

0 - Diskette (value checked)

(DH) - Head number (not value checked. 0-based)

(CH) - Track number (not value checked. 0-based)

(Cl) - Sector number (not value checked)

(Al) - Number of sectors (not value checked)

(ES:BX) - Address of buffer

On Return:

CF

=

1 - Status is non 0

=

0 - Status is 0

(Al) - Number of sectors actually transferred

(AH) - Status of operation (see values for the status of operation on page 2-49)

Diskette status at 40:41 - Status of operation

Note: If an error is reported by the diskette BIOS. reset the diskette system, then retry the operation.

(AH)

=

03H - Write Desired Sectors from Memory

(Dl) - Drive number (0-based)

Bit 7

=

0 - Diskette (value checked)

(DH) - Head number (not value checked. 0-based)

(CH) - Track number (not value checked. 0-based)

(Cl) - Sector number (not value checked)

(Al) - Number of sectors (not value checked)

(ES:BX) - Address of buffer

On Return:

CF

=

1 - Status is non 0

=

0 - Status is 0

(Al) - Number of sectors actually transferred

(AH) - Status of operation (see values for the status of operation on page 2-49)

Diskette status at 40:41 - Status of operation

2-50

INT 13H - Diskette

Notes:

1. If an error is reported by the diskette BIOS, reset the diskette system, then retry the operation.

2. For PC XT Model 286, (AL) is not requi red.

(AH) = 04H - Verify Desired Sectors

(DL) - Drive number (O-based)

Bit 7

=

0 - Diskette (value checked)

(DH) - Head number (not value checked, O-based)

(CH) - Track number (not value checked, 0-based)

(CL) - Sector number (not value checked)

(AL) - Number of sectors (not value checked)

(ES:BX) - Address of buffer

On Return:

CF

=

1 - Status is non 0

=

0 - Status is 0

(AL) - Number of sectors verified

(AH) - Status of operation (see values for the status of operation on page 2-49)

Diskette status at 40:41 - Status of operation

Notes:

1. If an error is reported by the diskette BIOS, reset the diskette system, then retry the operation.

2. ES:BX is not required for AT BIOS dated 11/15/85 and after,

PC XT Model 286, PC Convertible, or Personal System/2 products.

(AH)

=

05H - Format Desired Track

The buffer pointer (ES:BX) must pOint to the collection of desired address fields for the track. Each field has the following four bytes:

Byte 0 - Track number

Byte 1 - Head number

Byte 2 - Sector number tNT 13H - Diskette

2-51

Byte 3 - Number of bytes per sector

=

99H - 128-bytes per sector

=

91H - 256-bytes per sector

=

92H - 512-bytes per sector

= a3H - 1924-bytes per sector

There must be one entry for every sector on the track. This information is used to find the requested sector during read/write access. Prior to formatting a diskette, if there is more than one supported format for the drive in question, it is necessary to call

(AH)

=

17H (Set DASD Type for Format), or (AH)

=

18H (Set

Media Type for Format) to set the diskette type to be formatted.

(AL) - Number of sectors to format (not value checked)

(DL) - Drive number (9-based)

Bit 7

= a - Diskette (value checked)

(DH) - Head number (not value checked. a-based)

(CH) - Track number (not value checked. a-based)

(ES:BX) - Address of buffer

On Return:

CF

=

1 - Status is non a

=

9 - Status is a

(AH) - Status of operation (see values for the status of operation on page 2-49)

Diskette status at 4a:41 - Status of operation

Notes:

1. If an error is reported by the diskette BIOS, reset the diskette system, then retry the operation.

2. The diskette parameter table is used to format the diskette.

See "Diskette Drive Parameter Table"on page 3-23.

3. For PC XT Model

286~

(AL). is not requi red.

(AH)

=

06H to 07H - Reserved for Fixed Disk

2-52 tNT 13H - ,Diskette

(AH)

==

08H .. Read Drive Parameters

There is a parameter table for each supported media type.

For PCjr, PC, PC XT, or for AT BIOS dated 1110/84:

On Return:

CF

=

1 - Error

(AH) - Status of operation

=

01H - Invalid command

Diskette status at 40:41 - Status of operation

For all others:

(Dl) - Drive number (0-based)

Bit 7

=

0 - Diskette (value checked)

On Return:

(ES:DI) - Pointer to II-byte parameter table associated with the maximum supported media type within the drive in question (see

"Diskette Drive Parameter Table" on page 3-23.)

(CH) - Maximum number of tracks (low S bits of 10-bit track number. 0-based)

(Cl) - Bits 7. 6 - Maximum number of tracks (high 2 bits of

10-bit track number. 0-based)

- Bits 5 to 0 - Maximum sectors per track

(DH) - Maximum head number

(Dl) - Number of diskette drives installed

(BH)

=

0

(Bl) - Bits 7 to 4

=

0

Bits 3 to 0 - Valid drive type value in CMOS

=

01H - 360Kb. 5.25 inch. 40 track

=

02H - 1.2Mb. 5.25 inch. 'S0 track

=

03H - 720Kb. 3.5 inch. S0 track

=

04H - 1.44Mb. 3.5 inch. S0 track

(AX)

=

0

When the drive type is known but the CMOS type is invalid,

CMOS is not present, CMOS battery is discharged or CMOS checksum is invalid, all registers are returned as above except

(BL) = O. tMT

13H~-

Diskette 2 ..

53

If the requested drive is not installed, then (AX), (BX), (CX), (OX),

(DI), and (ES)

= o.

Diskette status 40:41

=

0 and CF

=

0

For drive number 80H or above (indicating fixed disks):

CF

=

1 - Error

(AH) - Status of operation

=

01H - Invalid command

(ES), (AX), (BX), (CX), (DH), and

(01) all equal 0 and (DL) contains the number of drives when any of the following conditions exist:

• Drive number is invalid

• Drive type is unknown and the CMOS is not present

• CMOS battery is discharged or CMOS checksum is invalid

• Drive type is unknown and the CMOS drive type is invalid.

Diskette status 4a:41

= a and CF

= a

(AH)

=

09H to 14H - Reserved for Fixed Disk

(AH)

==

15H - Read DASD Type

For AT, PC XT BIOS dated 1110/86 and after, PC XT Model 286, PC

Convertible, and Personal System/2 products:

(DL) - Drive number (a-based)

Bit 7

= a - Diskette (value checked)

On Return:

CF

= a - Operation successfully completed

(AH)

= a0H - Drive not present

=

01H - Diskette. no change line available

=

02H - Diskette. change line available

=

03H - Reserved for fixed disk interface

Diskette status at 40:41 - Status of operation

2-54

INT 13H - Diskette'

For all others:

On Return:

CF

=

1 - Error

(AH) - Status of operation

=

01H - Invalid command

Diskette status at 40:41 - Status of operation

(AH)

=

16H - DlskeHe Change Line Status

For AT, PC XT BIOS dated

1/10/86

and after, PC XT Model 286, PC

Convertible, and Personal System/2 products:

(DL) - Drive number (0-based)

Bit 7

=

0 - Diskette (value checked)

On Return:

(AH)

=

00H - 'Diskette change' signal not active

=

01H - Invalid diskette parameter

=

06H - 'Diskette change' signal active

=

80H - Diskette drive not ready

CF

=

0 if (AH) is 0

=

1 if (AH) is non 0

Diskette status at 40:41 - (AH) on return

For all others:

On Return:

(AH) - Status of operation

CF

=

01H - Invalid command

=

1 - Error

Diskette status at 40:41 - Status of operation

(AH)

=

17H - Set DASD Type for Format

The 'diskette change' signal is checked for all drives that support it. If found active, the logic attempts to reset 'diskette change' to the inactive state. If successful, the BIOS sets the data rate for format and returns the disk change error code. If the attempt fails, the logic returns the time-out error code and sets the DASD type to a predetermined state, indicating that the media type is unknown.

INT 13H - Diskette 2-55

When the 'diskette change' signal is found active, as it is after a diskette is changed, this function is called again.

For PC XT BIOS dated 1110/86 and after, AT, PC Convertible, and

Personal

System/2

products:

(OL) - Drive number (0-based)

Bit 7

=

0 - Diskette (value checked)

(AL)

=

00H - Invalid request

=

01H - Diskette 320/360Kb in 360Kb drive

=

02H - Diskette 360Kb in 1.2Mb drive

=

03H - Diskette 1.2Mb in 1.2Mb drive

=

04H - AT BIOS before

6/10/85:

Invalid request

- All others: Diskette 720Kb in 720Kb drive

=

05H through 0FFH - Invalid request

On Return:

CF

=

1 - Status is non 0

=

0 - Status is 0

(AH) - Status of operation (see values for the status of operation on page 2-49)

Diskette status at 40:41 - Status of operation

For all others:

On Return:

(AH) - Status of operation

CF

=

01H - Invalid command

=

1 - Error

Diskette status at 40:41 - Status of operation

(AH)

=

18H - Set Media Type for Format

For AT BIOS dated 11115/85 and after, PC XT BIOS dated 1110/86 and after, PC XT Model 286, and Personal

System/2

products, this function is called before issuing INT 13H, (AH)

=

05H (Format the

Desired Track). If the diskette is changed, the function is called again. A diskette must be present in the drive.

2.;56 INT 13H -

Diskette

There is one parameter table for each supported media type.

(Dl) - Drive number (a-based)

Bit 7

= a - Diskette (value checked)

(CH) - Number of tracks (low 8 bits, a-based)

(Cl) - Bits 7, 6 - Number of tracks (high two bits, a-based)

- Bits 5 to a - Sectors per track

On Return:

(ES:DI) - Pointer to ii-byte parameter table for this media type, unchanged if (AH) is non a (see

"Diskette Drive Parameter Table" on page 3-23.)

CF

=

1 - Status is non a

= a - Status is a

(AH) - Status of operation (see values for the status of operation on page 2-49)

Note:

For PC XT Model 286 and Personal System/2 products, this function monitors the 'diskette change' signal. If the signal is active, the logic attempts to reset the change line to the inactive state. If the attempt succeeds (for example, as when media is present), the BIOS sets the correct data rate for format. If the attempt fails (for example, as when no media is present), then the BIOS returns (AH)

=

80H

(Diskette Drive Not Ready) and the carry flag is set.

When the 'diskette change' signal is inactive, the BIOS performs the function as requested.

For all others:

On Return:

(AH) - Status of operation

CF

= alH - Invalid command

=

1 - Error

Diskette status at 40:41 - Status of operation

(AH)

==

19H to FFH - Reserved

INT 13H - Diskette

2-57

Interrupt 13H - Fixed Disk

This interface provides access to fixed disk drives. The following is a summary of the fixed disk functions of INT 13H:

(AH)

=

OOH - Reset Disk System

(AH)

=

01H - Read Status of Last Operation

(AH) = 02H - Read Desired Sectors into Memory

(A H)

=

03H - Write Desired Sectors from Memory

(AH) = 04H - Verify Desired Sectors

(AH)

=

05H - Format Desired Cylinder

(AH)

=

06H - Format Desired Cylinder and Set Bad Sector Flags

(AH)

=

07H - Format Drive Starting at Desired Cylinder

(AH)

=

08H - Read Drive Parameters

(AH)

=

09H - Initialize Drive Pair Characteristics

(AH)

=

OAH to OBH - Reserved for Diagnostics

(AH)

=

OCH - Seek

(AH)

=

ODH - Alternate Disk Reset

(A H)

=

OEH to OFH - Reserved for Diagnostics

(AH) = 10H - Test Drive Ready

(AH)

=

11 H - Recalibrate

(A H) = 12H to 14H - Reserved for Diagnostics

(AH)

=

15H - Read DASD Type

(AH) = 16H to 18H - Reserved for Diskette

(A H)

=

19H - Park Heads

(AH)

=

1AH - Format Unit

(AH)

=

1 BH to FFH - Reserved

Figure 2-7. INT 13H - Fixed Disk Functions

Notes:

1. If a fixed disk drive adapter is not installed, the code is not hooked into INT 13H. The returns are described in the diskette interface.

2. For the fixed disk interface, the drive number (DL) is value checked for all functions that use (DL).

3. For AT, PC XT Model 286, and Personal System/2 products, prior to waiting for interrupt, the BIOS calls INT 15H, (AH)

(Device Busy) with (AL)

=

90H

=

OOH (Type

=

Disk), informing the operating system of the wait. The complementary INT 15H, (AH)

=

91H (Interrupt Complete) with (AL)

=

OOH (Type

=

Disk), is called indicating the operation is complete.

4. For Personal System/2 products, prior to waiting for the fixed disk reset the BIOS calls INT 15H, (AH)

=

90H (Device Busy) with (AH)

=

FCH (Type

=

Fixed Disk Reset). This is a time-out only

2-58 INT 13H - Fixed Disk

function. There is no complementary Post operation. See

"Multitasking Provisions" on page 4-16.

5. Bit 7 of the drive number must be set upon entry to the fixed disk

BIOS.

6. For the drive parameters see "Fixed Disk Drive Parameter Table" on page 3-16.

(AH)

=

OOH - Reset Disk System

(DL) - Drive number, bit 1

=

1 for fixed disk drive (0-based)

On Return:

CF

=

1 - Status is non 0

=

0 - Status is 0

(AH) - Status of operation

=

00H - No error

=

01H - Invalid function request

=

02H - Address mark not found

=

03H - Write protect error

=

04H - Sector not found

=

05H - Reset failed

=

07H - Drive parameter activity failed

= 08H - DMA overrun on operation

=

09H - Data boundary error

=

0AH - Bad sector flag detected

=

0BH - Bad cylinder detected

=

0DH - Invalid number of sectors on format

=

0EH - Control data address mark detected

= 0FH - DMA arbitration level out of range

10H - Uncorrectable error checking and correction (ECC) or cyclic redundancy check (CRC) error

IlH - ECC corrected data error

=

20H - General controller failure

=

40H - Seek operation failed

=

80H - Time-out

=

BBH - Undefined error occurred

=

CCH - Write fault on selected drive

=

E0H - Status error/error register

=

0

=

FFH - Sense operation failed

INT 13H - Fixed Disk 2-59

Notes:

1. Reset Disk System is issued only if the 7-bit drive number is less than or equal to the maximum number of fixed disk drives. The diskette system is also reset for all values of

(DL).

2. For Personal System/2 products, prior to waiting for the fixed disk reset, the BIOS calls INT 15, (AH)

=

90H (Device Busy) with,(AL)

=

OOH (Type

=

Disk) informing the operating system of the wait.

(AH)

=

01.H • Read Status of Last Operation

(Ol) - Drive number. bit 7

=

1 for fixed disk drive (a-based)

On Return:

CF

=

1 - Status is non 0

= a - Status is 0

(AH) - Status of operation (see values for the status of operation on page 2-59)

Disk status is reset to a

(AH)

=

02H· Read Desired Sectors into Memory

(Ol) - Drive number. bit 7

=

1 for fixed disk drive (0-based)

(OH) - Head number (0-based. not value checked)

(CH) - Cylinder number (low 8 bits of 10-bit cylinder number, a-based, not value checked)

(Cl) - Bits 7, 6 - Cylinder number (high 2 bits of 10-bit cylinder number, 0-based, not value checked)

- Bits 5 to 0 - Sector number (not value checked)

(Al) - Number of sectors

(ES:BX) - Address of buffer

On Return:

CF

=

1 - Status is non 0

=

0 - Status is 0

(AH) - Status of operation (see values for the status of operation on page 2-59)

2-60

INT 13H - Fixed Disk

Notes:

1. An 11H error indicates the data read had a recoverable error that was corrected by the ECC algorithm. The data may be good; however, the BIOS routine indicates an error to allow the controlling program to make this determination. The error may not recur if the data is rewritten.

2. If an error is reported by the fixed disk BIOS, reset the disk system, then retry the operation.

(AH)

==

03H - Write Desired Sectors from Memory

(DL) - Drive number. bit 7

=

1 for fixed disk drive (a-based)

(DH) - Head number (a-based. not value checked)

(CH) - Cylinder number (low 8 bits of la-bit cylinder number. a-based. not value checked)

(CL) - Bits 7. 6 - Cylinder number (high 2 bits of la-bit cylinder number. a-based. not value checked)

- Bits 5 to a - Sector number (not value checked)

(AL) - Number of sectors

(ES:BX) - Address of buffer

On Return:

CF

=

1 - Status is non a

= a - Status is a

(AH) - Status of operation (see values for the status of operation on page 2-59)

Note: If an error is reported by the fixed disk BIOS, reset the disk system, then retry the operation.

(AH)

==

04H - Verify Desired Sectors

(DL) - Drive number. bit 7

=

1 for fixed disk drive (a-based)

(DH) - Head number (a-based. not value checked)

(CH) - Cylinder number (low 8 bits of la-bit cylinder number. a-based. not value checked)

(CL) - Bits 7. 6 - Cylinder number (high 2 bits of la-bit cylinder number. a-based. not value checked)

- Bits 5 to a - Sector number (not value checked)

(AL) - Number of sectors

INT 13H - Fixed Disk 2-61

On Return:

CF

=

1 - Status is non 0

=

0 - Status is 0

(AH) - Status of operation (see values for the status of operation on page 2-59)

Note: If an error is reported by the fixed disk BIOS, reset the disk system, then retry the operation.

(AH)

=

05H - Format Desired Cylinder

(Dl) - Drive number, bit 7

=

1 for fixed disk drive (0-based)

(DH) - Head number (0-based, not value checked)

(CH) - Cylinder number (low 8 bits of I0-bit cylinder number,

0-based, not value checked)

(Cl) - Bits 7, 6 - Cylinder number (high 2 bits of I0-bit cylinder number, 0-based, not value checked)

For PC XT:

(Al) - Contains interleave value

On Return:

CF

=

1 - Status is non 0

=

0 - Status is 0

(AH) - Status of operation (see values for the status of operation on page 2-59)

For AT, PC XT Model 286, and Personal System/2 products:

(ES:BX) - Address of buffer

(ES:BX) points to a 5I2-byte buffer. The first

2 x (Sectors per cylinder) bytes contain F, N for each sector.

F

=

00H - Good sector

=

80H - Bad sector

N - Sector number

On Return:

CF

=

1 - Status is non 0

=

0 - Status is 0

(AH) - Status of operation (see values for the status of operation on page 2-59)

2-62 INT 13H - Fixed Disk

For the IBM ESDI Fixed Disk Drive Adapter/A:

On Return:

(AH) - Status of operation

CF

=

1 - Error

=

01H - Invalid function request

Note: If an error is reported by the fixed disk BIOS, reset the disk system, then retry the operation.

(AH)

=

06H - Format Desired Cylinder and Set Bad Sector Flags

Warning: Formatting destroys all information on the fixed disk drive.

For PC XT:

(Dl) - Drive number, bit 7

=

1 for fixed disk drive (0-based)

(DH) - Head number (0-based, not value checked)

(CH) - Cylinder number (low 8 bits of 10-bit cylinder number,

0-based, not value checked)

(Cl) - Bits 7, 6 - Cylinder number (high 2 bits of 10-bit cylinder number, 0-based, not value checked)

(Al) - Interleave value

On Return:

CF

=

1 - Status is non 0

=

0 - Status is 0

(AH) - Status of operation (see values for the status of operation on page 2-59)

For AT, PC XT Model 286, Personal System/2 products, and the

IBM ESDI Fixed Disk Drive Adapter/A:

On Return:

(AH) - Status of operation

CF

=

1 - Error

=

01H - Invalid function request

Note: If an error is reported by the fixed disk BIOS, reset the disk system, then retry the operation.

INT 13H - Fixed Disk 2-63

(AH)

=

07H - Format Drive Starting at Desired Cylinder

For PC XT:

(Dl) - Drive number, bit 7

=

1 for fixed disk drive (0-0ased)

(CH) - Cylinder number (low 8 bits of 10-bit cylinder number,

0-based, not value checked)

(Cl) - Bits 7, 6 - Cylinder number (high 2 bits of 10-bit cylinder number, 0-based, not value checked)

(Al) - Interleave value

On Return:

CF

=

1 - Status is non 0

=

0 - Status is 0

(AH) - Status of operation (see values for the status of operation on page 2-59)

For AT, PC XT Model 286, Personal System/2 products, and the

IBM ESDI Fixed Disk Drive Adapter/A:

On Return:

(AH) - Status of operation

CF

=

1 - Error

=

01H - Invalid function request

Note: If an error is reported by the fixed disk BIOS, reset the disk system, then retry the operation.

(AH)

=

08H - Read Drive Parameters

If the drive number is invalid then (AH) and 40:74 fixed disk drive operation status), (CX) and (OX)

=

07H (last

=

0,

and CF is set. If no fixed disk drive is attached or no fixed disk drive adapter is installed, (AH) and 40:41

=

01H (last diskette drive operation status), and CF is set.

(Dl) - Drive number, bit 7

=

1 for fixed disk drive (0-based)

On Return:

(Dl) - Number of consecutive drives attached (I, 2; controller card o tally only)

(DH) - Maximum value for head number (range 0-3FH)

(CH) - Maximum value for cylinder number (range 0-3FFFH)

(Cl) - Maximum value for sector and high order 2 bits of cylinder numbers

2-64 INT 13H - Fixed Disk

(AH)

=

09H - Initialize Drive Pair Characteristics

(DL) - Drive number, bit 7

=

1 for fixed disk drive (0-based)

On Return:

CF

=

1 - Status is non 0

=

0 - Status is 0

(AH) - Status of operation (see values for the status of operation on page 2-59)

For PC XT:

Interrupt 41H points to the parameter tables. Four entries in the PC XT table correspond to the switch settings on the fixed disk drive adapter. The switches act as an index into the parameter table. For example, if both switches are set to the

On position, the drive is initialized with the first entry of the parameter table. If the drive number is an allowable value

[80H

~

(DL)

~

87H] then both drives 0 and 1 are initialized.

For all other values, an invalid command status is returned.

If drive 0 initialization fails, drive 1 initialization is not attempted. If either attempt fails, 40:74

=

07H (last fixed disk drive operation status) and (AH) are updated with the appropriate error.

For AT, PC XT Model 286, and Personal System/2 products:

Interrupt 41H points to the single parameter table for drive 0, and interrupt 46H points to the single parameter table for drive 1. If (DL)

=

80H, then drive 0 is initialized using interrupt 41 H. If (DL)

=

81 H, then drive 1 is initialized using interrupt 46H. For all other values, an invalid command status is returned.

For the IBM ESDI Fixed Disk Drive Adapter/A:

This function performs no action. Drive configuration information is obtained from the drive, not from a table in the host ROM. Drive type initialization is performed automatically by the controller.

Note: If an error is reported by the fixed disk BIOS, reset the disk system, then retry the operation.

INT 13H - Fixed Disk 2-65

(AH)

=

OAH to OBH - Reserved for Diagnostics

(AH)

=

OCH - Seek

(DL) - Drive number, bit 7

=

1 for fixed disk drive (0-based)

(DH) - Head number (0-based, not value checked)

(CH) - Cylinder number (low 8 bits of I0-bit cylinder number,

0-based, not value checked)

(Cl) - Bits 7, 6 - Cylinder number (high 2 bits of I0-bit cylinder number, 0-based, not value checked)

On Return:

CF - 1 - Status is non 0

=

0 - Status is 0

(AH) - Jtatus of operation (see values for the status of operation on page 2-59)

Note: If an error is reported by the fixed disk BIOS, reset the disk system, then retry the operation.

(AH)

=

ODH - Alternate Disk Reset

(DL) - Drive number, bit 7

=

1 for fixed disk drive (0-based)

On Return:

CF

=

1 - Status is non 0

=

0 - Status is 0

(AH) - Status of operation (see values for the status of operation on page 2-59)

Notes:

1. Alternate Disk Reset is issued only if the 7-bit drive number is less than or equal to the maximum number of fixed disk drives.

2. For the IBM ESDI Fixed Disk Drive Adapter/A, (AH)

=

ODH is reserved for diagnostics.

(AH)

=

OEH to OFH - Reserved for Diagnostics

(AH)

=

10H - Test Drive Ready

(Dl) - Drive number, bit 7

=

1 for fixed disk drive (0-based)

2-66 INT 13H - Fixed Disk

On Return:

CF

=

1 - Status is non 0

=

0 - Status is 0

(AH) - Status of operation (see values for the status of operation on page 2-59)

(AH)

=

11 H - Recalibrate

(OL) - Drive number. bit 7

=

1 for fixed disk drive (0-based)

On Return:

CF

=

1 - Status is non 0

=

0 - Status is 0

(AH) - Status of operation (see values for the status of operation on page 2-59)

Note: If an error is reported by the fixed disk BIOS, reset the disk system, then retry the operation.

(AH)

=

12H to 14H - Reserved for Diagnostics

(AH)

=

15H - Read DASD Type

For PC XT:

On Return:

(AH) - Status of operation

CF

=

1 - Error

=

01H - Invalid function request

For AT, PC XT Model 286, and Personal System/2 products:

(OL) - Drive number. bit 7

=

1 for fixed disk drive (0-based)

On Return:

(AH)

=

00H - Drive not present or (OL) invalid

=

01H - Reserved for diskette interface

=

02H - Reserved for diskette interface

=

03H - Fixed disk

(CX.OX) - Number of 512-byte blocks

If (AH)

=

0 then (CX) and (OX)

=

0

CF = 0 - Operation successfully completed

INT 13H - Fixed Disk 2-67

(AH)

=

16H to 18H - Reserved for DiskeHe

(AH)

=

19H - Park Heads

For PC XT, AT, and PC XT Model 286:

On Return:

(AH) - Status of operation

CF

=

1 - Error

=

01H - invalid function request

For Personal System!2 products:

(Dl) - Drive number, bit 7

=

1 for fixed disk drive (0-based)

On Return:

(AH) - Status of operation (see values for the status of

CF operation on page 2-59)

=

1 - Error

(AH)

=

1 AH - Format Unit

For the IBM ESDI Fixed Disk Drive Adapter! A:

Warning: Formatting destroys all information on the fixed disk drive.

This command may take more than an hour to complete.

(AH)

= lAH - Format fixed disk drive

(Al) - Relative block address (RBA) defect table block count

=

0 - No RBA table associated with this format request

>

0 - RBA table used

(ES:BX) - Address of RBA table

(Cl) - Modifier bits

Bits 7, 6, 5 - Must be 0

Bit 4 - Periodic interrupt. The controller interrupts the host for every cylinder completed during each phase of the formatting operation. This feature allows the host to display formatting progress. The phase is defined as follows: o -

Reserved

1 - Surface analysis

2 - Formatting

2-68

INT

~3H

- Fixed Disk

An INT 15H (AH)

=

0FH. (AL)

=

Phase Code is executed by BIOS. The return must clear CF to allow formatting to continue. Set CF to end formatting.

The host must keep a running count of interrupts for each phase. This running count is the cylinder number. The host may display formatting progress in granularities other than 1. although interrupts occur for every cylinder.

Bit 3 - Perform extended surface analysis. (A format with this bit set to 0 must have occurred before attempting to format with this bit set.)

Bit 2 - Update secondary defect map. This map is updated to reflect defects found during surface analysis and those passed with the format command. If this bit is set with bit 1. the secondary defect map is replaced.

Bit 1 - Ignore secondary defect map. The secondary defect map is not processed.

Bit 0 - Ignore primary defect map. The primary defect map is not processed.

(DL) - Drive number. bit 7

=

1 for fixed disk drive (0-based)

For all others this function is reserved.

(AH)

=

1 BH to FFH - Reserved

INT 13H - Fixed

~-69

~

Interrupt 14H - Asynchronous Communications

These routines provide RS-232-C support. The following is a summary of the RS-232-C support functions of Interrupt 14H:

(AH) = OOH -

(AH) = 01H -

(AH) = 02H -

(AH) = 03H -

Initialize the Communications Port

Send Character

Receive Character

Read Status

(AH) = 04H -

(AH)

=

OSH -

Extended Initialize

Extended Communications Port Control

(AH) = 06H to

FFH -

Reserved

Figure 2-8. INT 14H - Asynchronous Communications Functions

(AH)

=

OOH - Initialize the Communications Port

(AL) - Parameters for initialization

Bits 7. 6. 5 - Baud rate (values are binary)

=

000 - 110

=

001 - 150

=

010 - 300

=

011 - 600

=

100 - 1200

=

101 - 2400

=

110 - 4800

=

111 - 9600

On Personal System/2 products. for baud rates above

9600. see INT 14H. (AH)

=

04H and (AH)

=

05H.

Bits 4. 3 - Parity (values are binary)

=

00 - None

=

01 - Odd

=

10 - None

=

11 - Even

Bit 2 - Stop bit

=

0 - 1

=

1 - 2

Bits 1. 0 - Word length (values are binary)

=

10 - 7 Bits

=

11 - 8 Bits

(OX) - RS-232-C Communications line to use (0.1.2.3) corresponding to actual port base address at 40:00

2-70

INT 14H - Asynchronous Communications

On Return:

(AL) - Modem status

Bit 7 - Received line signal detect

Bit 6 - Ring indicator

Bit 5 - Data set ready

Bit 4 - Clear to send

Bit 3 - Delta receive line signal detect

Bit 2 - Trailing edge ring detector

Bit 1 - Delta data set ready

Bit 0 - Delta clear to send

(AH) - Line status

Bit 7 - Time-out

Bit 6 - Transmitter shift register empty

Bit 5 - Transmitter holding register empty

Bit 4 - Break detect

Bit 3 - Framing error

Bit 2 - Parity error

Bit 1 - Overrun error

Bit 0 - Data ready

Note: If bit 7 of the line status byte is set to one, other bits are unpredictable.

(AH)

=

01 H - Send Character

(AL) - Character to send

(OX) - RS-232-C communications line to use (0,1,2,3) corresponding to actual port base addresses at 40:00

On Return:

(AL) is preserved

(AH) - Line status (see values for the line status on page 2-71)

(AH)

=

02H - Receive Character

(OX) - RS-232-C communications line to use (0,1,2,3) corresponding to actual port base addresses at 40:00

On Return:

(AL) - Character received

(AH) - Line status (see values for the line status on page 2-71)

Note: The routine waits for the character.

INT 14H - Asynchronous Communications

2-71

(AH)

=

03H - Read Status

(OX) - RS-232-C communications line to use (0.1.2.3) corresponding to actual port base addresses at 40:00

On Return:

(Al) - Modem status (see values for the modem status on page 2-71)

(AH) - line status (see values for the line status on page 2-71)

(AH)

=

04H - Extended Initialize

For Personal

System/2 products:

(DX) - R5·232-C communications line to use (0.1.2.3) corresponding to actual port base addresses at 40:00

(Al) - Break

=

00H - No break

=

01H - Break

(BH) - Parity

=

00H - None

=

01H - Odd

=

02H - Even

=

03H - Stick parity

odd

= 04H - Stick parity even

(Bl) - Stop bit

=

00H - One

=

01H - Two if 6-. 7-. or 8-bit word length

- One-and-one-half if 5-bit word length

(CH) - Word length

=

00H - 5 bits

=

01H - 6 bits

=

02H - 7 bits

=

03H - 8 bits

(Cl) - Baud rate

=

00H - 110 baud

=

01H - 150 baud

=

02H - 300 baud

=

03H - 600 baud

= 04H - 1200 baud

=

05H - 2400 baud

=

06H - 4800 baud

=

07H - 9600 baud

=

08H - 19200 baud

2-72 INT 14H - Asynchronous Communications

On Return:

(AL) - Modem status (see values for the modem status on page 2-71)

(AH) - Line status (see values for the line status on page 2-71)

For all others no action is performed.

(AH)

=

05H - Extended Communications Port Control

For Personal System/2 products:

(AL)

=

00H - Read modem control register

(OX) - RS-232-C communications line to use (0,1,2,3) corresponding to actual port base addresses at 40:00

On Return:

(BL) - Modem control register

Bit 7 to 5 - Reserved

Bit 4

=

1 - Loop

Bit 3

=

1 - Out2

Bit 2

=

1 - Out1

Bit 1

=

1 - Request to send

Bit 0

=

1 - Data terminal ready

(AL)

=

01H - Write modem control register

(OX) - RS-232-C communications line to use (0,1,2,3) corresponding to actual port base addresses at 40:00

On Return:

(BL) - Modem control register

Bit 7 to 5 - Reserved

Bit 4

Bit 3

=

1 - Loop

=

1 - Out2

Bit 2

Bit 1

=

1 - Out1

= -

Request to send

Bit 0

= -

Data terminal ready

On Return:

(AL) - Modem status (see values for the modem status on page 2-71)

(AH) - Line status (see values for the line status on page 2-71)

For all others no action is performed.

(AH)

=

06H to FFH - Reserved

INT 14H - Asynchronous Communications 2-73

Interrupt 15H - System Services

The following is a summary of the system services of Interrupt 15H:

(AH) = OOH - Turn Cassette Motor On

(AH)

=

01 H - Turn Cassette Motor Off

(AH)

=

02H - Read Blocks from Cassette

(AH)

=

03H - Write Blocks to Cassette

(AH) = 04H to OEH - Reserved

(AH)

=

OFH - Format Unit Periodic Interrupt

(AH)

=

10H to 20H - Reserved

(AH) = 21H - Power-On Self-Test Error Log

(AH)

=

22H to 3FH - Reserved

(AH)

=

40H - Read/Modify Profiles

(AH)

=

41 H - Wait for External Event

(AH)

=

42H - Request System Power-Off

(AH)

=

43H - Read System Status

(AH) = 44H - Activate/Deactivate Internal Modem Power

(AH)

(AH)

=

45H to 4EH - Reserved

=

4FH - Keyboard Intercept

(AH) = SOH to 7FH - Reserved

(AH)

=

80H - Device Open

(AH)

=

81H - Device Close

(AH)

=

82H - Program Termination

(AH)

=

83H - Event Wait

(AH)

=

84H - Joystick Support

(A H)

=

8SH - System Request Key Pressed

(AH)

=

86H - Wait

(AH)

=

87H - Move Block

(AH)

(AH)

=

88H - Extended Memory Size Determine

=

89H - Switch Processor to Protected Mode

(AH)

=

8AH to 8FH - Reserved

(AH)

=

90H - Device Busy

(AH)

=

91H - Interrupt Complete

(AH) = 92H to BFH - Reserved

(AH)

=

COH - Return System Configuration Parameters

(AH)

(AH)

=

C1H - Return Extended BIOS Data Area Segment Address

=

C2H - Pointing Device BIOS Interface

(AH) = C3H - Enable/Disable Watchdog Time-Out

(AH)

=

C4H - Programmable Option Select

(AH)

=

CSH to FFH - Reserved

Figure 2-9. INT 15H - System Services Functions

(AH)

=

OOH Turn Cassette Motor On

For

PCjr

and PC:

On Return:

(AH)

=

00H

CF

=

0

2-74

INT 15H - System Services

For all others:

On Return:

(AH)

=

86H

CF

=

1

(AH)

=

01 H - Turn Cassette Motor Off

For

PCjr

and pc:

On Return:

(AH)

=

(:)(:)H

CF

= (:)

For all others:

On Return:

(AH)

=

86H

CF

=

1

(AH)

=

02H - Read Blocks from Cassette

For

PCjr

and PC:

(ES:BX) - Pointer to data buffer

(CX) - Count of bytes to read

On Return:

(ES:BX) - Pointer to last byte read

+ 1

(DX) - Count of bytes read

CF

= (:) -

No error

=

1 -

Error

For PCjr when CF

=

1, (AH) contains:

(:)1H

= CRC error

02H

=

(:)4H

Lost data transitions

=

No data found

For all others:

On Return:

(AH)

CF

=

86H

=

1

INT 15H - System Services 2-75

(AH)

=

03H - Write Blocks to Cassette

For

PCjr

and PC:

(ES:BX) - Pointer to data buffer

(CX) - Count of bytes to write

On Return:

(ES:BX) - Pointer to last byte written

+

1

(CX)

CF

=

00H

=

0 - No error

=

1 - Error

For PCjr when CF

01H

=

CRC error

=

1. (AH) contains:

02H

04H

=

Lost data transitions

=

No data found

For all others:

On Return:

(AH)

CF

=

86H

=

1

(AH)

=

04H to OEH - Reserved

(AH)

=

OFH - Format Unit Periodic Interrupt

For the IBM ESDI Fixed Disk Drive Adapter/A:

(AL) - Phase code

=

00H - Reserved

=

01H - Surface analysis

=

02H - Formatting

On Return:

CF

=

0 - Continue formatting or scanning

=

1 - End formatting or scanning

Note: Function (AH)

=

OFH provides a hook to the caller upon completion of formatting or scanning each cylinder. If no

,handler is hooked, CF is set to 1 on return.

2-76 INT 15HSystem Services

For

PCjr

and PC:

On Return:

(AH)

=

80H

CF

=

1

For all others:

On Return:

(AH)

CF

=

86H

=

1

(AH)

=

10H to 20H - Reserved

(AH)

=

21 H - Power-On SeH-Test Error Log

For

PCjr

and PC:

On Return:

(AH)

CF

=

80H

=

1

For Personal

System/2

products except Model 30:

(Al)

=

00H - Read POST error log

On Return:

(ES:DI) - Pointer to POST error log

(BX) - Number of POST error codes stored

CF

=

0

(AH)

=

000

(Al) = 01H - Write error code to POST error log

(BX) - POST error code (word)

(BH) - Device code

(Bl) Device error

On Return:

CF

=

0 - Successfully stored

=

1 - Error code location full

(AH)

=

00H - Successfully stored

=

01H - Error code location full

tNT 15H - System Services

2~77

For all others:

On Return:

(AH)

=

86H

CF

=

1

(AH)

=

22H to 3FH - Reserved

(AH)

=

40H - Read/Modify Profiles

For

PCjr and PC:

On Return:

(AH)

=

80H

CF

=

1

For PC Convertible:

(AL) = 00H - Read system profile

On Return:

(CX.BX) - Profile information

(AL) = 01H - Modify system profile

(CX.BX) - Profile information

(AL)

=

02H - Read internal modem profile

On Return:

(BX) - Profile information

(AL)

=

03H - Modify internal modem profile

(BX) - Profile information

On Return for all:

(AL)

=

00H - Operation successfully completed

=

80H - Profile execution failed

CF

=

0 - Operation successfully completed

=

1 - Profile execution failed

2-78 INT 15H - System Services

For all others:

On Return:

(AH)

=

86H

CF

=

1

(AH)

=

41 H -

Wait for External Event

For PCjr and PC:

On Return:

(AH)

CF

=

80H

=

1

For PC Convertible:

(ES:Ol) - Pointer to byte in user area for event determination (event type codes 01H to 04H)

-or-

- (OX) contains the address of the I/O port address to read for event determination

(AL) - Event type code

=

00H - Return after any event has occurred

=

01H - Compare value. return if equal

=

02H - Compare value. return if not equal

=

03H - Test bit. return if not 0

=

04H - Test bit. return if 0

(BH) - Condition compare or mask value

(BL) - Time-out value (in 55 millisecond units). 0

=

No time-out

On Return:

CF

=

1 - Time-out

Note: Event type codes (AH)

=

11H, 12H, 13H, and 14H are the same as codes (AH)

=

01 H, 02H, 03H, and 04H, respectively, except that (OX) is used to contai n the event determination address.

INT 15H - System Services 2-79

For all others:

On Return:

(AH)

=

86H

CF

=

1

(AH)

=

42H - Request System Power-Off

For

PCjr and PC:

On Return:

(AH)

=

80H

CF

=

1

For PC Convertible:

(AL)

=

00H - Use system profile for suspendjIPL determination

(AL)

=

01H - Force system suspend mode regardless of profile

On Return:

(AX) is modified

For all others:

On Return:

(AH)

CF

=

86H

=

1

(AH)

=

43H - Read System Status

For PCjr and PC:

On Return:

(AH)

=

80H.

CF

=

1

2-80 INT 15H - System Services

For PC Convertible:

On Return:

(AL) - Status

Bit 7 - Low battery indication

Bit 6 - Operating on external power source

Bit

5 -

Standby power lost (real-time clock time bad)

Bit

4 -

Power activated by real-time clock alarm

Bit 3 - Internal modem power-on

Bit 2 - RS-232-C/parallel power-on

Bit 1 - Reserved

Bit 0 - LCD detached

(AH) is modified

For all others:

On Return:

(AH)

CF

=

86H

=

1

(AH)

=

44H - Activate/Deactivate Internal Modem Power

For

PCjr and PC:

On Return:

(AH)

CF

=

80H

=

1

For PC Convertible:

(AL)

(AL)

=

00H - Power-off internal modem

=

01H - Power-on internal modem and configure according to system profile

On Return:

(AL)

=

00H - Operation successfully completed

CF

=

80H - Request failed

=

0 - Operation successfully completed

=

1 - Request failed

For all others:

On Return:

(AH)

CF

=

86H

=

1

INT 15H - System Services

2-81

(AH)

=

45H to 4EH - Reserved

(AH)

=

4FH - Keyboard Intercept

For

PCjr

and PC:

On Return:

(AH)

CF

=

80H

=

1

For PC XT BIOS dated

11/08/82,

and AT BIOS dated

1110184:

On Return:

(AH)

=

86H

CF '"

1

For all others, the keyboard intercept (keyboard escape), is called by the INT 09H (keyboard) routine to allow the keystroke to be changed or absorbed. Normally, the system returns the scan code unchanged, but the operating system can point INT 15H to itself and do one of the following:

1. Replace (AL) with a different scan code and return with the carry flag set, effectively changing the keystroke.

2. Process the keystroke and return with the carry flag reset causing the INT 09H routine to ignore the keystroke.

(Al) - Scan code

CF

=

1

On Return:

(Al) - New scan code

CF

=

1

-or-

(Al) - Unchanged scan code

CF

=

0

Note: To dynamically determine the products that support this feature, see INT 15H, (AH)

=

COH (Return System

Configuration Parameters) on page 2-94.

(AH)

=

50H to 7FH - Reserved

2-82 INT 15H - System Services

(AH)

=

80H - Device Open

For PCjr and PC:

On Return:

(AH)

CF

=

80H

=

1

For PC XT BIOS dated

11/08/82:

On Return:

(AH)

=

CF

=

1

86H

For all others:

(BX) - Device 1D

(CX) - Process 1D

(AH)

=

81 H - Device Close

For PCjr and pc:

On Return:

(AH)

=

CF

=

1

80H

For PC XT BIOS dated

11/08/82:

On Return:

(AH)

=

86H

CF

=

1

For all others:

(BX) - Device 1D

(eX) -

Process 1D

tNT 15H - System Services 2-83

(AH)

=

82H - Program Termination

For

PCjr

and PC:

On Return:

(AH)

=

80H

CF

=

1

For PC XT BIOS dated 11/08/82:

On Return:

(AH)

CF

=

=

1

86H

For all others:

(BX) - Device 1D

(AH)

=

83H - Event Wait

For

PCjr

and PC:

On Return:

(AH)

=

80H

CF

=

1

For PC XT:

On Return:

(AH)

=

86H

CF

=

1

For AT BIOS dated 1/10/84:

(ES:BX) - Pointer to byte in caller's memory that has the high order bit set as soon as possible after interval expires.

(CX.DX) - Microseconds until posting

(Granularity is 976 microseconds)

On Return:

CF

=

0 - Operation successfully completed

=

1 - Operation unsuccessful. function busy

2-84 tNT 15H - System Services

For all others:

(AL)

=

00H Set interval

(ES:BX) - Pointer to byte in caller's memory that has the high order bit set as soon as possible after interval expires.

(CX,OX) - Microseconds until posting

(Granularity is 976 microseconds)

On Return:

CF

= 0 -

Operation successfully completed

=

1 -

Operation unsuccessful, function busy

(AL)

=

01H Cancel set interval

On Return:

CF

=

0 -

Operation successfully completed

=

1 -

Operation unsuccessful, function busy

(Personal System/2 Model

30 always returns with CF

=

1)

(AH)

=

84H - Joystick Support

For PCjr, PC, and PC Convertible:

On Return:

(AH)

=

80H

CF

=

1

For PC XT BIOS dated 11/08/82:

On Return:

(AH) = 86H

CF

=

1

For all others:

(OX)

=

00H -

Read current switch settings

On Return:

(AL) - Switch settings (bits 7 to 4)

CF

=

1 - Invalid call

(OX)

=

01H Read resistive inputs

INT 15H - System Services

2-85

On Return:

(AX) - A{x) value

(BX) - A{y) value

(CX) - B{x) value

(DX) - B{y) value

CF

=

1 - Invalid call

(AH)

=

8SH - System Request Key Pressed

For

PCjr

and PC:

On Return:

(AH)

=

80H

CF

=

1

For PC XT BIOS dated 11/08/82:

On Return:

(AH)

CF

=

86H

=

1

For all others:

(AL)

(AL)

=

00H - Key make

=

01H - Key break

(AH)

=

86H - Wait

For

PCjr

and PC:

On Return:

(AH)

CF

=

80H

=

1

For PC XT:

On Return:

(AH)

CF

= 86H

=

1

2-86 INT 15H -

System Services

For all others:

(CX,DX) - Time before return to caller, in microseconds

CF

(Granularity is 976 microseconds)

=

0 - Successful wait

=

1 - Wait function already in progress

(AH)

=

87H • Move Block

For PCjr and PC:

On Return:

(AH)

CF

=

80H

=

1

For PC XT, PC Convertible, and Personal System/2 Model 30:

On Return:

(AH)

CF

=

86H

=

1

For AT, PC XT Model 286, and Personal System/2 products except

Model 30, this function allows a real mode program or system to transfer a block of data to and from storage above the 1 Mb protected mode address range by switching to the protected mode.

(AH)

=

87H - Block move.

(CX) - Word count of storage block to be moved.

[maximum count

=

8000H for 32Kb words (65Kb)J

(ES:SI) - Location of a global descriptor table (GDT) built by routine using this function.

(ES:SI) points to a global descriptor table (GOT) built before interrupting to this function. The descriptors are used to perform the block move in the protected mode. The source and target descriptors built by the user must have a segment length

=

2 x

CX-1 or greater. The data access rights byte must be set to

CPLO-R/W (93H). The 24-bit address (byte high, word low) must be set to the target/source.

Note:

No interrupts are allowed during transfer. Large block moves may cause lost interrupts.

INT 15H - System Services

2·87

On Return:

(AH)

=

00H - Operation successfully completed

(AH)

=

01H - RAM parity (parity error registers cleared)

(AH)

(AH)

=

02H - Other exception interrupt error occurred

=

03H - Gate address line 20H failed

All registers are restored except (AH)

If (AH)

If (AH)

=

00H:

CF

ZF

=

0

=

1

=

01H to 03H:

CF

ZF

=

1

=

0

The following shows the organization of a block move GOT:

(ES:SI) ---..

+

00

J

Dummy

+08

+10

+18

+20

GDT

Location

Source

GDT

Target

GDT

BIOS

CS r--

+28

SS

Figure 2-10. Block Move Global Descriptor Table

The descriptors are defined as follows:

• The first is the required dummy and is user initialized to O.

• The second points to the GOT as a data segment. It is user initialized to 0 and can be modified by the BIOS.

• The third points to the source to be moved and is user initialized.

2-88

INT 15H - System Services

• The fourth pOints to the destination segment and is user initialized.

• The fifth is used by the BIOS to create the protected mode code segment. It is user initialized to 0 and can be modified by the BIOS.

• The sixth is used by the BIOS to create a protected mode stack segment. It is user initialized to 0, can be modified by the BIOS, and points to the user stack.

The following is a sample of a source or target descriptor:

SOURCE_TARGET_DEF

SEG_LIMIT

LO_WORD

OW

DW

HI_BYTE DB

DATA_ACC_RIGHTS DB

Reserved DW

STRUC

? ; Segment limit (1 to 65536 bytes)

; 24-bit segment physical

? address [0 to (16Mb-I)]

93H ; Access rights byte (CPL0-R/W) o ;

Reserved word (must be 0)

SOURCE_TARGET_DEF ENDS

The global descriptor table [actual location pointed to by (ES:SI)]

BLOCKMOVE_GDT_DEF STRUC

DW

CGDT_LOC OW

0.0.0.0

7.??0

SOURCE OW

TARGET

OW

BIOS_CS OW

TEMP_SS OW

7.7.?0

???0

7.7.7.0

???0

BLOCKMOVE_GDT_OEF ENOS

; First descriptor not accessible

; Location of calling routine GOT

; Source descriptor

; Target descriptor

; BIOS code descriptor

; Stack descriptor

(AH)

=

88H - Extended Memory Size Determine

For

PCjr

and pc:

On Return:

(AH)

=

80H

CF

=

1

For PC XT, PC Convertible, and Personal System/2 Model 30:

On Return:

(AH)

CF

=

86H

=

1

INT 15H - System Services

2-89

For AT, PC XT Model 286, and Personal

System/2

products except

Model 30, this routine returns the amount of system memory beginning at address 100000H, as determined by the POST. The system may not be able to use I/O memory unless the system board is fully populated.

On Return:

(AX) - Contiguous lKb blocks of memory available beginning at address 100000H

(AH)

=

89H - Switch Processor to Protected Mode

For

PCjr

and PC:

On Return:

(AH)

CF

=

80H

=

1

For PC XT, PC Convertible, and Personal System/2 Model 30:

On Return:

(AH)

=

86H

CF

=

1

For AT, PC XT Model 286, and Personal

System/2

products except

Model 30, this function allows the user to switch into protected

(virtual address) mode. Upon completion, the processor is in the protected mode and control is transferred to the code segment specified by the user.

Entry requirements:

(ES:SI) points to a GOT built before calling this function.

These descriptors initialize the interrupt descriptor table (lOT) register, the GOT register, and the stack segment (SS) selector. The data segment (OS) selector and the extra segment (ES) selector are initialized from descriptors built by the routine using this function.

(BH) contains an index into the interrupt descriptor table that states where the first eight hardware interrupts begin

(interrupt level 1). (BL) contains an index into the interrupt descriptor table that states where the second eight hardware interrupts begin (interrupt level 2).

2-90

INT 15H - System Services

The following shows the organization of a GOT; actual location pointed to by (ES:SI):

(ES:SI)~ +00

Dummy

+08

-

GDT

+10 lOT

+18

OS

+20

ES

+28

SS

+30

CS

+38

Temporary BIOS

CS

Figure 2-11. Global Descriptor Table

Each descriptor must contain the limit, the base address, and the access rights byte. The descriptors are defined as follows:

• The first is the required dummy and is user initialized to O.

• The second points to the GOT as a data segment and is user initialized.

• The third points to the user-defined interrupt descriptor table and is user initialized.

• The fourth paints to the user data segment (OS) and is user initialized.

• The fifth points to the user extra segment (ES) and is user initialized.

• The sixth points to the user stack segment (SS) and is user initialized.

INT 15H - System Services

2-91

• The seventh pOints to the code segment that this function returns to the user, initialized to the user code segment.

• The eighth is used to establish a code segment for itself. This is necessary for this function to complete its operation while in the protected mode. When control is passed to the user code, this descriptor can be reused.

(AH)

=

89H

(ES:SI) - Location of GOT built by routine using this function.

On Return:

(AH)

=

00H - Operation successfully completed

All segment registers are changed, (AX) and (BP) are modified.

Considerations:

1. BIOS functions are not available to the user. The user must handle all

lID

commands.

2. Interrupt vector locations must be moved, due to the 80286 reserved areas.

3. The hardware interrupt controllers must be reinitialized to define locations that do not reside in the 80286 reserved areas.

4. An exception interrupt table and handler must be initialized by the user.

5. The interrupt descriptor table cannot overlap the real mode

BIOS interrupt descriptor table.

The following is an example of a way to call the protected (virtual address) mode:

- User code -

MOV AX, GOT SEGMENT

MOV ES,AX

MOV SI,GOT OFFSET

MOV BH,HAROWARE INT LEVEL 1 OFFSET

MOV BL,HAROWARE INT LEVEL 2 OFFSET

MOV AH,89H

INT 15H

- User code -

(Protected mode established)

2-92

INT 15H - System Services

(AH) = 8AH to 8FH - Reserved

(AH)

=

90H - Device Busy

For

PCjr

and PC:

On Return:

(AH)

=

80H

CF

=

1

For PC XT BIOS dated 11/08/82:

On Return:

(AH)

CF

=

86H

=

1

For all others, this function is called to tell the operating system that the system is about to wait for a device.

The type code assignments for (AH)

=

90H and 91 H use the following general guidelines:

OOH to 7FH: Serially reusable devices (operating system must serialize access).

80H to BFH: Reentrant devices; (ES:BX) is used to distinguish different calls (multiple

1/0

calls are allowed si m ultaneously).

COH to FFH: Wait only calls; there is no complementary Post for these waits. These are time-out only. Times are function number dependent.

(AL) - Type code

=

00H - Disk (time-out)

=

01H - Diskette (time-out)

=

02H - Keyboard (no time-out)

=

03H - Pointing device (time-out)

=

80H - Network (no time-out)

(ES:BX)

=

Network control block (NCB)

=

FCH - Fixed disk reset for Personal System/2 products only

(time-out)

=

FDH - Diskette drive motor start (time-out)

=

FEH - Printer (time-out)

INT 15H - System Services

2-93

On Return:

CF

=

0 - Wait not satisfied

=

1 - Minimum wait time satisfied for this type code

(AH)

=

91 H - Interrupt Complete

For

PCjr

and PC:

On Return:

(AH)

=

80H

CF

=

1

For PC XT BIOS dated 11/08/82:

On Return:

(AH)

=

86H

CF

=

1

For all others the interrupt complete flag is set to tell the operating system that the interrupt has occurred.

(AL) - Type code [see (AH)

=

90H (Device Busy)]

(AH)

=

92H to BFH - Reserved

(AH)

=

COH - Return System Configuration Parameters

For

PCjr

and PC:

On Return:

(AH)

CF

=

80H

=

1

For PC XT BIOS dated 11/08/82 and AT BIOS dated 1/10/84:

On Return:

(AH)

CF

=

86H

=

1

2-94

INT 15H - System Services

For AT BIOS dated

6/10/85 and after, PC XT BIOS dated 1/10/86 and after, PC XT Model 286, PC Convertible, and Personal

System/2 products:

(AH)

=

C0H

On Return:

(ES:BX) - Pointer to system descriptor vector in ROM

(AH)

CF

=

0

=

0

System Descriptor:

DW XXXX Byte count of data that follows; minimum length

=

8

DB xx

Model byte

See "System Identification" on page

4-18

DB xx

Submodel byte

See "System Identification" on page 4-18

DB xx

BIOS revision level

See "System Identification" on page 4-18

00

=

First release

Revision level is increased by one for each subsequent release of code

DB xx

Feature information byte

1

Bit 7

=

1 - Fixed disk BIOS uses

DMA channel 3

=

0 - DMA channel 3 not used by fixed disk BIOS or channel 3 usage cannot be determined

Bit 6

=

1 - 2nd interrupt chip present

=

0 - 2nd interrupt chip not present

Bit 5

=

1 - Real-time clock present

=

0 - Real-time clock not present

INT 15H - System Services 2-95

DB

DB

DB

DB xx xx xx xx

Bit 4

=

1 - Keyboard intercept sequence

(INT

15H) called in keyboard

= interrupt (INT 09H)

0 -

Keyboard intercept sequence not ca

11 ed

Bit

3

=

1 -

Wait for external event supported

=

0 Wait for external event not supported

Bit

2

=

1 -

Extended BIOS data area is allocated

=

0 Extended BIOS data area is not allocated

Bit

1

=

1 -

Micro Channel implemented

=

0 -

PC type

1/0

channel implemented

Bit

0 -

Reserved

Feature information byte

2 -

Reserved

Feature information byte

3 -

Reserved

Feature information byte 4 - Reserved

Feature information byte

5 -

Reserved

Note:

For Personal System/2 products except Model 30, if the system model cannot be determined, (AH)

=

86H, CF

=

1, and (ES:BX) is not changed.

(AH)

=

C1 H - Return Extended BIOS Data Area Segment Address

For

PCjr

and PC:

On Return:

(AH)

=

80H

CF

=

1

2-96

INT 15H - System Services

For PC XT, AT, PC XT

Model 286,

and PC Convertible:

On Return:

(AH)

CF

=

86H

=

1

For all others:

On Return:

(ES) - Extended BIOS data area segment address

CF

=

0 - No error

=

1 - Error

(AH)

=

C2H - Pointing Device BIOS Interface

For

PCjr and PC:

On Return:

(AH)

CF

=

80H

=

1

For PC XT, AT, PC XT

Model 286,

and PC Convertible:

On Return:

(AH)

=

86H

CF

=

1

For all others:

(AL)

=

00H - Enable/disable pointing device

(BH)

=

00H - Disable

=

01H - Enable

On Return:

CF

=

0 - Operation successfully completed

CF

=

1 - Operation unsuccessful

(AH) - Status

=

00H - No error

=

01H - Invalid function call

=

02H - Invalid input

=

03H - Interface error

=

04H - Resend

=

0SH - No far call installed

INT 15H - System Services 2-97

(Al) =

01H - Reset pointing device

On Return:

See Return for

(Al) =

00H on page 2-97

If the operation successfully completed:

(BH) - Device ID

=

00H

The pointing device state is as follows:

-Disabled

-Sample rate at 100 reports per second

-Resolution at 4 counts per millimeter

-Scaling at 1 to 1

-Data package size remains the same as before this function was called

(Bl) is modified on return

(Al)

=

02H - Set sample rate

(BH) - Sample rate value

=

=

00H - 10 reports per second

=

01H - 20 reports per second

=

02H - 40 reports per second

=

03H - 60 reports per second

=

04H - 80 reports per second

=

0SH - 100 reports per second

06H - 200 reports per second

On Return:

See Return for (Al)

=

00H on page 2-97

(Al)

=

03H - Set resolution

(BH) - Resolution value

=

00H - 1 count per millimeter

=

01H - 2 counts per millimeter

=

02H - 4 counts per millimeter

= 03H - 8 counts per millimeter

On Return:

See Return for

(Al)

=

00H on page 2-97

(Al)

=

04H - Read device type

2-98 INT 15H - System Services

On Return:

See Return for (AL)

=

00H on page 2-97

If the operation successfully completed:

(BH) - Devi ce ID

=

00H

(AL)

=

0SH - Pointing device interface initialization

(BH) - Data package size

=

00H - Reserved

=

01H - 1 byte

=

02H - 2 bytes

=

03H - 3 bytes

=

04H - 4 bytes

=

0SH - 5 bytes

=

06H - 6 bytes

=

07H - 7 bytes

=

08H - 8 bytes

On Return:

See Return for (AL)

=

00H on page 2-97

The pointing device state is as follows:

-Disabled

-Sample rate at 100 reports per second

-Resolution at 4 counts per millimeter

-Scaling at 1 to 1

(AL)

=

06H - Extended commands

(BH)

=

00H - Return status

On Return:

See Return for (AL)

=

00H on page 2-97

If the operation successfully completed:

(BL) - Status byte 1

Bit 7

=

0 - Reserved

Bit 6

=

0 - Stream mode

Bit 5

Bit 4

Bit 3

=

1 - Remote mode

=

0 - Disable

= 1 - Enable

=

0 - 1:1 scaling

=

1 - 2:1 scaling

=

0 - Reserved

Bit 2

=

1 - Left button pressed

Bit 1

=

0 - Reserved

Bit 0

=

1 - Right button pressed

INT 15H - System Services 2-99

(Cl) Status byte 2

=

00H - 1 count per millimeter

=

01H - 2 counts per millimeter

=

02H - 4 counts per millimeter

=

03H -

8 counts per millimeter

(DL) - Status byte 3

=

0AH - 10 reports per second

=

14H - 20 reports per second

=

28H - 40 reports per second

=

3CH - 60 reports per second

=

50H - 80 reports per second

=

64H - 100 reports per second

=

C8H - 200 reports per second

(BH)

=

01H Set scaling to 1:1

On Return:

See Return for (Al) =

00H on page 2-97

(BH)

=

02H -

Set scaling to 2:1

On Return:

See Return for (Al)

=

00H on page 2-97

(Al)

=

07H -

Device driver far call initialization

(ES) - Segment

(BX) - Offset

On Return:

See Return for (Al)

=

00H on page 2-97

The user codes a routine to receive control upon pointing device data availability. The device driver far call initialization communicates the address of this routine to the BIOS. Each time the pointing device data is available, the pointing device interrupt handler calls the user routine, with the following parameters on the stack:

Status - First word pushed on the stack

X data - Second word pushed on the stack

Y data - Third word pushed on the stack

Z data - Fourth word pushed on the stack

2-100 INT 15H - System Services

Word 1 on stack:

Low byte - Status

Bit 7 - Y data overflow

=

1 - Overflow

Bit 6 - X data overflow

=

1 - Overfl ow

Bit 5 - Y data sign

=

1 - Negative

Bit 4 - X data sign

=

1 - Negative

Bit 3 - Reserved (must be 1)

Bit 2 - Reserved (must be 0)

Bit 1 - Right button status

=

1 - Pressed

Bit 0 - Left button status

High byte

=

1 - Pressed

=

0

Word 2 on stack:

Low byte - X data

Bit 7

=

Most significant bit

Bit 0 - Least significant bit

High byte

=

0

Word 3 on stack:

Low byte - Y data

Bit 7

=

Most significant bit

Bit 0 - Least significant bit

High byte

=

0

Word 4 on stack:

High byte

=

0

Low byte

=

0

The pointing device interrupt handler uses a far call to transfer control to the user routine. This routine should be coded as a far procedure and should not pop the parameters off the stack before returning.

!NT 15H - System Services

2-101

(AH)

=

C3H - Enable/Disable Watchdog Time-Out

For

PCjr

and PC:

On Return:

(AH)

CF

=

80H

=

1

For PC XT, AT, PC XT Model 286, PC Convertible, and Personal

System/2

Model 30:

On Return:

(AH)

CF

=

86H

=

1

For Personal

System/2

products except Model 30:

(AL)

=

00H - Disable watchdog time-out

=

01H - Enable watchdog time-out

(BX) - Watchdog timer count

(1 to 255 is valid for Personal System/2products)

On Return:

CF

=

0

~

Operation successfully completed

=

1 - Operation unsuccessful

(AH) == C4H - Programmable Option Select (POS)

For

PCjr

and PC:

On Return:

(AH)

=

80H

CF

=

1

For PC XT, AT, PC XT Model 286, PC Convertible, and Personal

System/2

Model 30:

On Return:

(AH)

=

86H

CF

=

1

2-102

INT 15H - System Services

For Personal System/2 products except Model 30:

(AL)

=

00H - Return base POS adapter register address

On Return:

(AL)

=

00H

(OX) -

Base POS adapter register address

(AL)

=

01H - Enable slot for setup

(BL) - Slot number

On Return:

(AL)

=

01H

(BL) - Slot number

(AL)

=

02H - Adapter enable

On Return:

(AL)

=

02H

On Return for all:

CF

=

0 - Operation successfully completed

=

1 - Request failed

(AH) = C5H to

FFH - Reserved

INT 15H - System Services 2-103

Interrupt 16H - Keyboard

These routines provide keyboard support. The following is a summary of the keyboard functions of Interrupt 16H:

(AH)

=

OOH - Keyboard Read

(AH)

=

01H - Keystroke Status

(AH)

=

02H - Shift Status

(A H)

=

03H - Set Typematic Rate

(A H)

=

04H - Keyboard Click Adjustment

(AH) = OSH - Keyboard Write

(AH)

=

06H to OFH - Reserved

(AH)

=

10H - Extended Keyboard Read

(AH)

=

11H - Extended Keystroke Status

(AH)

=

12H - Extended Shift Status

(AH)

=

13H to FFH - Reserved

Figure 2-12. INT 16H - Keyboard Functions

The extended functions, (AH)

=

10H, 11H, and 12H, have been added to the BIOS interface to support the 101/102-Key Keyboard. The extended-function keyboard scan codes fall into one of three categories:

1. When only one key produces an ASCII character, the scan code read from the keyboard port is the same as with the standard keyboards.

2. When more than one key produces the same character, one of the keys generates the standard keyboard scan code. The other key generates a unique sequence of scan codes, enabling the system to differentiate between the keys.

3. New scan codes are assigned to keys that did not exist on the standard keyboards.

The extended functions allow new programs to take advantage of all categories and avoid compatibility problems with existing programs.

If the extended functions are not supported by the system BIOS, the scan code/character code combination placed in the keyboard buffer by the keyboard interrupt handler are returned without change upon calling (AH)

=

OOH (Keyboard Read) and (AH)

=

01 (Keystroke

Status).

2-104

INT 16H - Keyboard

f the extended functions are supported by the system BIOS:

I

The character code placed in the keyboard buffer by the keyboard interrupt handler differentiates between keys with identical nomenclature.

I

I

I

The keyboard interrupt handler places the scan code/character code combination for new keys in the keyboard buffer.

(AH)

=

10H (Extended Keyboard Read) and (AH)

=

11 H

(Extended Keystroke Status) extract the scan code/character code combination from the buffer as is, and return it to the caller.

The scan code/character code combination is returned for new keys. The scan code/character code combination is returned for like keys, with the character code used to differentiate between them. If the character code is equal to hex FOH and the scan code is not equal to hex OOH, the character code is set to hex OOH.

(AH)

=

OOH (Keyboard Read) and (AH)

=

01 H (Keystroke Status) extract the scan code/character code combination and translate it, if necessary, to the the scan code/character code combination compatible with previous keyboards. The translation:

1. Converts like codes to compatible codes

2. Extracts the scan code/character code combination until a compatible combination is found.

• (AH)

=

12H (Extended Shift Status) returns the existing keyboard shift state and the shift state of the separate Ctrl and Alt keys. ro determine if the extended functions, (AH)

=

10H, 11H, and 12H, ire supported by the system BIOS, the program must use INT 16H,

AH)

=

05H (Keyboard Write) to write an scan code/character code

:ombination of hex FFFF to the buffer. If on return (AL)

=

OOH, the unction successfully inserted hex FFFF into the buffer. Next, INT 16H,

AH)

=

10H (Extended Keyboard Read) is issued to read the scan

:ode/character code combination from the keyboard buffer. If on

'eturn (AX) is hex FFFF, the extended keyboard functions are iupported. If on return (AX) is not hex FFFF, INT 16H, (AH)

=

10H

Extended Keyboard Read) is issued until (AX) is hex FFFF on return. f after 16 tries (the buffer size) or each of the calls to the Extended

(eyboard Read function yields an (AX) not equal to hex FFFF, the

~xtended keyboard functions are not supported.

INT 16H - Keyboard 2-105

See "Scan Code/Character Code Combinations" on page 4-24 for scan code/character code combinations.

(AH)

=

OOH -Keyboard Read

The scan code/character code is extracted from the buffer. The keyboard buffer head pointer (40:1A) is increased by 2 or, if the pointer is already at the end, is reinitialized to the start of the buffer.

On Return:

(AL) - ASCII character code

(AH) - Scan code

For AT, PC XT Model 286, PC Convertible, and Personal System/2 products, if no keystroke is available, INT 15H, (AH)

Busy) is called with (AH)

=

90 (Device

=

02H (Type

=

Keyboard), to inform the operating system that a keyboard loop is about to take place, allowing the operating system to perform another task. When the keyboard operation is completed, INT 09H calls INT 15H, (AH)

=

91 H (Interrupt Complete) with (AH)

=

02H (Type

=

Keyboard).

See "Multitasking Provisions" on page 4-16 for additional information.

Note: Control is returned only when a keystroke is available.

The keystroke is removed from buffer.

(AH)

=

01 H - Keystroke Status

On Return:

ZF

=

1 - No code available

=

0 - Code is available

If code is available:

(AL) - ASCII character code

(AH) - Scan code

Note: The keystroke is not removed from the buffer.

2-106

INT 16H - Keyboard

(AH) = 02H - Shift Status

On Return:

(AL) - Current shift status

Bit 7

Bit 6

Bit 5

=

1 - Insert locked

=

1 - Caps Lock locked

=

1 - Num Lock locked

Bit 4

=

1 - Scroll Lock locked

Bit 3

=

1 - Alt key pressed

Bit 2 = 1 - Ctrl key pressed

Bit 1

=

1 - Left Shift key pressed

Bit 0

=

1 - Right Shift key pressed

(AH) - Reserved

(AH)

=

03H - Set Typematlc Rate

For

PCjr

only:

(AL)

=

00H - Returns to default. restores original state

(typematic on. normal initial delay and normal typematic rate)

(AL)

=

01H - Increases initial delay (this is the delay between first character and the burst of typematic characters)

(AL)

=

02H - Slows typematic characters by one-half

(AL)

=

03H - Increases initial delay and slows typematic characters by one-half

(AL)

=

04H - Turns off typematic characters

INT 16H - Keyboard

2-107

For AT BIOS dated 11/15/85 and after, PC XT Model 286, and

Personal System/2 products:

(Al)

=

05H - Set typematic rate and delay

(Bl) - Typematic rate (in characters per second)

00H

01H

02H

03H

04H

05H

06H

07H

08H

09H

0AH

=

30.0

=

26.7

=

24.0

=

21.8

=

20.0

=

18.5

=

17.1

=

16.0

=

15.0

=

13.3

=

12.0

0BH

0CH

0DH

0EH

0FH

10H llH

12H

13H

14H

15H

=

10.9

=

10.0

=

9.2

=

8.6

=

8.0

=

7.5

=

6.7

=

6.0

=

5.5

=

5.0

=

4.6

16H

17H

18H

19H

1AH

ISH

=

4.3

=

4.0

=

3.7

=

3.3

=

3.0

=

2.7

=

2.5 1CH lDH

1EH

=

2.3

=

2.1

1FH

=

2.0

20H to FFH - Reserved

(BH) - Delay value (in milliseconds)

00H

01H

02H

03H

=

250

=

500

=

750

=

1000

04H to FFH - Reserved

For all others no action is performed.

(AH)

=

04H - Keyboard Click Adjustment

For

PCjr

and PC Convertible:

(Al)

=

00H - Set keyboard click off

(Al)

=

01H - Set keyboard click on

For all others no action is performed.

(AH)

=

OSH - Keyboard Write

For AT BIOS dated 11/15/85 and after, PC XT dated 1/10/86 and after, PC XT Model 286, and Personal System/2 products, this function places scan code/character code combination in the keyboard buffer as if they came from the keyboard.

2-108 tNT

16H -

Keyboard

(Cl) - ASCII character code

(CH) - Scan code

On Return:

(Al)

=

00H - Operation successfully completed

=

01H - Buffer full

For all others no action is performed.

(AH)

=

06H to OFH - Reserved

(AH) = 10H - Extended Keyboard Read

For AT BIOS dated 11/15/85 and after, PC XT dated 1/10/86 and after, PC XT Model 286, and Personal System/2 products, the scan code/character code combination is extracted from the buffer. The keyboard buffer head pointer (40:1A) is increased by

2. If the pointer is already at the end, it is reinitialized to the start of the buffer.

On Return:

(Al) - ASCII character code

(AH) - Scan code

Note:

Control is returned only when a keystroke is available.

The keystroke is removed from buffer.

For all others no action is performed.

(AH)

=

11 H - Extended Keystroke Status

For AT BIOS dated 11/15/85 and after, PC XT dated 1/10/86 and after, PC XT Model 286, and Personal System/2 products:

On Return:

ZF

=

1 - No code available

= 0 - Code is available

If code is available:

(Al) - ASCII character code

(AH) - Scan code

Note:

The keystroke is not removed from the buffer.

INT 16H - Keyboard

2-109

For all others no action is performed.

(AH)

=

12H - Extended Shift Status

For

AT BIOS dated 11/15/85 and after, PC XT dated 1110186 and

after, PC XT Model 286, and Personal System/2 products:

On Return:

(AL) - Shift status

Bit 7

=

1 - Insert locked

Bit 6

=

1 - Caps Lock locked

Bit 5

Bit 4

Bit 3

=

1 - Num Lock locked

=

1 - Scroll Lock locked

=

1 - Alt key pressed

Bit 2

Bit 1

=

1 - Ctrl key pressed

=

1 - Left Shift key pressed

Bit 0

=

1 - Right Shift key pressed

(AH) - Extended shift status

Bit 7

Bit 6

Bit 5

Bit 4

Bit 3

Bit 2

Bit 1

=

1 - SysRq key pressed

=

1 - Caps Lock key pressed

=

1 - Num Lock key pressed

=

1 - Scroll Lock key pressed

=

1 - Right Alt key pressed

=

1 - Right Ctrl key pressed

=

1 - Left Alt key pressed

Bit 0

=

1 - Left Ctrl key pressed

For all others no action is performed.

(AH)

=

13H to FFH - Reserved

2-110

INT 16H -

Keyboard

Interrupt 17H - Printer

These routines provide printer support. The following is a summary of the printer support functions of Interrupt 17H:

(AH) = OOH - Print Character

(AH)

=

01H - Initialize the Printer Port

(AH)

(AH)

=

02H - Read Status

=

03H to FFH Reserved

Figure 2-13. INT 17H - Printer Functions

(AH) = OOH - Print Character

(AL) - Character to print

(DX) - Printer to use (0.1.2); index into the port base address table at 40:08

On Return:

(AH) - Status

Bit 7

=

1 - Not busy

Bit 6

=

1 - Acknowledge

Bit 5

=

1 - Out of paper

Bit 4

Bit 3

=

1 - Selected

=

1 - I/O error

Bits 2. 1 - Reserved

Bit 0

=

1 - Time-out

(AH)

=

01 H - Initialize the Printer Port

(DX) - Printer to use (0.1.2); index into the port base address table at 40:08

On Return:

(AH) - Status

Bit 7

=

1 - Not busy

Bit 6

Bit 5

Bit 4

Bit 3

=

1 - Acknowledge

=

1 - Out of paper

=

1 - Selected

=

1 - I/O error

Bits 2. 1 - Reserved

Bit 0 - Time-out

INT 17H - Printer

2-111

(AH)

=

02H - Read Status

(DX) - Printer to use (0,1,2); index into the port base address table at 40:08

On Return:

(AH) - Status

Bit 7

=

1 - Not busy

Bit 6

=

1 - Acknowledge

Bit 5

=

1 - Out of paper

Bit 4

Bit 3

=

1 - Selected

=

1 - I/O error

Bits 2, 1 - Reserved

Bit 0 - Time-out

(AH) = 03H to FFH - Reserved

Notes:

1. For AT, PC XT Model 286, PC Convertible, and Personal

System/2

products, when the printer is busy, the BIOS calls INT 15H, (AH)

=

90 (Oevice Busy) with (AL)

=

FEH (Type

=

Printer), informing the operating system that a time-out loop is about to begin. See

"Multitasking Provisions" on page 4-16 for additional information.

2. For AT BIOS dated before 11/15/85, PCjr, PC, and PC XT BIOS dated 11/08/82, the printer port number associated with (OX) is tested for O. If found to be 0, no action occurs. If it is non 0, the print operation is performed. The (OX) register is not tested for a valid printer port number at the offset into the printer base address data area at 40:08.

3. For PC XT BIOS dated 1/10/86 and after, if (OX) is greater than 3 or the printer port associated with (OX) is 0, no action is performed and, on return (AH)

=

29H.

4. For PC Convertible, if the printer port associated with (OX) is 0, the return is (AH)

=

01 H. If (OX) is non 0, the print operation is performed. No test is made on (OX) to see if a valid printer port number exists at the offset into the printer base address data area at 40:08.

5. For AT BIOS dated 11/15/85 and PC XT Model 286, if (OX) is greater than 3 or the printer port associated with (OX) is 0, no action is performed and (AH) is returned unchanged.

2-112

INT 17H -

Printer

6. For Personal System/2 products, if (DX) is greater than 2 or the printer port associated with (DX) is 0, no action is performed and

(AH) is returned unchanged.

INT 17H - Printer

2-113

Interrupt 19H - Bootstrap Loader

Track 0, sector 1 is read into segment 0, offset 7COO. Control is then transferred as follows:

(CS)

=

0000H

(IP)

=

7C00H

(DL) - Drive where bootstrap sector was read

Note:

If there is a hardware error, control is transferred to the ROM

BASIC entry point.

2-114

tNT

19H - Bootstrap Loader

Interrupt 1AH - System-Timer and Real-Time

Clock Services

The following is a summary of the system-timer and real-time clock services of Interrupt 1AH:

(AH)

=

OOH - Read System-Timer Time Counter

(AH)

=

01H - Set System-Timer Time Counter

(A H) = 02H - Read Real-Time Clock Time

(A H)

=

03H - Set Real-Time Clock Time

(AH) = 04H - Read Real-Time Clock Date

(AH)

=

05H - Set Real-Time Clock Date

(AH)

(AH)

(AH)

=

06H - Set Real-Time Clock Alarm

=

07H - Reset Real-Time Clock Alarm

=

08H - Set Real-Time Clock Activated Power-On Mode

(AH) = 09H - Read Real-Time Clock Alarm Time and Status

(AH)

=

OAH - Read System-Timer Day Counter

(AH)

=

OSH - Set System-Timer Day Counter

(A H)

=

OCH to 7FH - Reserved

(AH)

=

80H - Set Up Sound Multiplexer

(A H) = 81 H to FFH - Reserved

Figure 2-14. INT 1AH - System-Timer and Real-Time Clock Services

(AH)

=

OOH - Read System-Timer Time Counter

On Return:

(eX) -

High portion of count

(OX) - Low portion of count

(AL)

=

0 - Timer has not passed 24 hours worth of counts since power-on, last system reset, last system-timer time

> counter read, or last system-timer time counter set.

0 - Timer has passed 24 hours worth of counts since power-on, last system reset, last system-timer time counter read, or last system-timer time counter set.

Note:

Execution causes the timer overflow (40:70) flag to be reset to O. Counts occur at the rate of 1193180+65536 counts per second (about 18.2 per second).

INT 1AH - System-Timer and Real-Time Clock Services

2-115

(AH)

=

01 H - Set System-Timer Time Counter

(CX) - High portion of count

(OX) - Low portion of count

Note: Execution causes the timer overflow (40:70) flag to be reset to O. Counts occur at the rate of 1193180-:-65536 counts per second (about 18.2 per second).

(AH)

=

02H - Read Real-Time Clock Time

For AT BIOS dated before 6/10/85:

On return:

(CH) - Hours in BCD

(CL) - Minutes in BCD

(DH) - Seconds in BCD

CF

=

0 - Clock operating

=

1 - Clock not operating

For AT BIOS dated 6/10/85 and after, PC XT Model 286, PC

Convertible, and Personal System/2 products:

On Return:

(CH) - Hours in BCD

(CL) - Minutes in BCD

(DH) - Seconds in BCD

(DL)

=

01H - Daylight saving time option

=

00H - No daylight saving time option

CF

=

0 - Clock operating

=

1 - Clock not operating

For all others no action is performed.

2-116 INT 1AH System-Timer and Real-Time Clock Services

(AH)

=

03H - Set Real-Time Clock Time

For AT, PC XT Model 286, PC Convertible, and Personal System/2 products:

(CH) - Hours in BCD

(Cl) - Minutes in BCD

(DH) - Seconds in BCD

(Dl)

=

01H - Daylight saving time option

=

00H - No daylight saving time option

Note:

For Personal System/2 Model 30, (DL) is not used.

For all others no action is performed.

(AH)

=

04H - Read Real-Time Clock Date

For AT, PC XT Model 286, PC Convertible, and Personal

System/2

products:

On Return:

(CH) - Century in BCD (19 OR 20)

(Cl) - Year in BCD

(DH) - Month in BCD

(Dl) - Day in BCD

CF

=

0 - Clock operating

=

1 - Clock not operating

For all others no action is performed.

(AH)

=

OSH Set Real-Time Clock Date

For AT, PC XT Model 286, PC Convertible, and Personal System/2 products:

(CH) - Century in BCD (19 OR 20)

(Cl) - Year in BCD

(DH) - Month in BCD

(Dl) - Day in BCD

For all others no action is performed.

INT 1AH - System-Timer and Real-Time Clock Services

2-117

(AH)

=

06H - Set Real-Time Clock Alarm

For AT, PC XT Model 286, PC Convertible, and Personal

System/2

products:

(CH) - Hours in BCD

(Cl) - Minutes in BCD

(DH) - Seconds in BCD

On Return:

CF

=

0 - Operation successfully completed

=

1 - Alarm already set or clock not operating

Note:

The alarm interrupt occurs at the specified hour, minute, and second passed in (CH), (Cl), and (DH) respectively.

When the alarm interrupt occurs, a software interrupt 4AH is issued. The user must point software interrupt 4AH to an alarm routine prior to setting the real-time clock alarm

INT 1AH, (AH)

=

06H. Only one alarm function may be active at any time. The alarm interrupt occurs every 24 hours at the specified time until it is reset.

For all others no action is performed.

(AH)

=

07H - Reset Real-Time Clock Alarm

For AT, PC XT Model 286, PC Convertible, and Personal

System/2

products, this function stops the real-time clock alarm interrupt from occurring.

For all others no action is performed.

(AH)

=

OSH - Set Real-Time Clock Activated Power-On Mode

For PC Convertible:

(CH) - Hours in BCD

(Cl) - Minutes in BCD

(DH) - Seconds in BCD

On Return:

CF

=

0 - Operation successfully completed

=

1 - Alarm already set or clock not operating

2-118

INT 1AH - System-Timer and Real-Time Clock Services

For AT BIOS dated

6/10/85

and after, PC XT Model 286, and

Personal

System/2

products:

On Return:

CF

=

1 - Invalid function request

For all others no action is performed.

(AH)

=

09H - Read Real-Time Clock Alarm Time and Status

For PC Convertible and Personal

System/2

Model 30:

On Return:

(CH) - Hours in BCD

(CL) - Minutes in BCD

(DH) - Seconds in BCD

(DL) - Alarm status

00H

=

Alarm not enabled

01H

=

Alarm enabled but will not power-on system

02H

=

Alarm enabled and will power-on system

Note:

Personal

System/2

Model 30 does not support the power-on system feature.

For AT BIOS dated

6/10/85

and after, PC XT Model 286, and

Personal

System/2

products except Model 30:

On Return:

CF

=

1 - Invalid function request

For all others no action is performed.

(AH)

=

OAH - Read System-Timer Day Counter

For AT and PC XT Model 286:

On Return:

CF

=

1 - Invalid function request

INT 1AH - System-Timer and Real-Time Clock Services

2-119

For PC XT BIOS dated 1/10/86 and after, and Personal System/2 products:

On Return:

(CX) - Count of days since 1-1-1980

Note:

For PC XT dated 1/10/86 and after, and Personal System/2

Model 30, the count of days since 1/1/80 is initialized to 0 during the POST.

For all others no action is performed.

(AH)

=

OBH - Set System-Timer Day Counter

For AT BIOS dated 6/10/85 and after and PC XT Model 286:

On Return:

CF

=

1 - Invalid function request

For PC XT BIOS dated 1/10/86 and after, and Personal System/2 products:

(CX) - Count of days since 1-1-1980

Note:

For PC XT dated 1/10/86 and after, and Personal System/2

Model 30, the count of days since 1/1/80 is initialized to 0 during the POST.

For all others no action is performed.

(AH)

=

OCH to 7FH - Reserved

(AH)

=

SOH - Set Up Sound Multiplexer

For

PCjr:

(AL) - Source of sound ("Audio Out" or RF modulator)

00H

=

8253 channel 2

01H

=

Cassette input

02H

=

"Audio In" line on I/O channel

03H

=

Complex sound generator chip

2-120

INT 1AH - System-Timer and Real-Time Clock Services

For AT BIOS dated

6/10/85

and after, PC XT Model 286, PC

Convertible, and Personal System/2 products:

On Return:

CF

=

1 - Invalid function request

For all others no action is performed.

(AH)

=

81 H to FFH - Reserved

INT 1AH - System-Timer and Real-Time Clock Services

2-121

Interrupt 70H - Real-Time Clock Interrupt

For AT, PC XT Model 286, and Personal

System/2

products:

This interrupt handler controls the periodic and alarm interrupt functions from the real-time clock.

Periodic function - When activated, the interrupt occurs approximately 1024 times per second. The doubleword microsecond counter is decremented by a value of 976 microseconds

(1/1024

of a second). When the counter becomes less than or equal to 0, bit 7 of the designated location is set. For INT 15H, (AH)

=

83H (Event Wait), the designated location is provided by the user. For INT 15H,

(AH)

=

86H (Wait), the designated location is bit 7 of BIOS data area 40:AO (wait active flag).

Alarm function - When activated, the interrupt occurs at the specified time and a software interrupt 4AH is issued. The user must point interrupt 4AH to an alarm routine prior to setting INT 1AH, (AH)

=

06H (Real-Time Clock Alarm).

For all others, the Real-Time Clock Interrupt is not supported.

Notes:

1. The PC Convertible provides the above functions, but the

Real-Time Clock Interrupt generates a nonmaskable interrupt rather than INT 70H. Additionally, PC Convertible uses the real-time clock update ended interrupt function (interrupts once per second) when certain system profiles are enabled.

2. For Personal

System/2

Model 30, the periodic function is not supported.

2-122 INT 70H - Real-Time Clock Interrupt

Section 3. Data Areas and ROM Tables

BIOS Data Area ....................................... 3-3

Extended BIOS Data Area .............................. 3-15

ROM Tables ......................................... 3-16

Fixed Disk Drive Parameter Table .................... 3-16

Diskette Drive Parameter Table ...................... 3-23

Data Areas and ROM Tables 3-1

Notes:

3-2

Data Areas and ROM Tables

BIOS Data Area

The BIOS Data Area is allocated specifically as a work area for system BIOS and adapter BIOS. The BIOS routines use 256 bytes of memory from absolute address hex 400 to hex 4FF. A description of the BIOS data area follows:

Address

40:00

40:02

40:04

40:06

Function

RS-232-C Communications Line 1 Port Base

Address

RS-232-C Communications Line 2 Port Base

Address

RS-232-C Communications Line 3 Port Base

Address

RS-232-C Communications Line 4 Port Base

Address

Size

Word

Word

Word

Word

Note: The RS-232-C communications line port base address fields may be initialized to 0 by the POST if the system configuration contains less than four serial ports. The POST never places 0 in the RS-232-C communications line port base address table between two valid RS-232-C communications line port base addresses.

Figure 3-1. RS-232-C Port Base Address Data Area

Address

40:08

40:0A

40:0C

40:0E

Function

Printer 1 Port Base Address

Printer 2 Port Base Address

Printer 3 Port Base Address

Reserved

Size

Word

Word

Word

Word

Exceptions

40:0E Printer 4 Port Base Address (PC, PC XT, AT, and PC Word

Convertible)

Note: The printer port base address fields may be initialized to 0 by the POST if the system configuration contains less than four parallel ports. The POST never places 0 in the printer port base address table between two valid printer port base addresses.

Figure 3-2. Printer Port Base Address Data Area

Data Areas and ROM Tables

3-3

Address

40:10

Bits 15,14

Bit 13

Bit 12

Bits 11,10,9

Bit 8

Bits 7,6

Bits 5,4

Bit 3

Bit 2

Bit 1

Bit 0

Exceptions

Function

Installed Hardware

Number of Printer Adapters

Reserved

Reserved

Number of RS-232-C Adapters

Reserved

Number of Diskette Drives (O-based)

Video Mode Type (Values are Binary)

00

01

10

11

=

Reserved

=

40x25 Color

=

80x25 Color

=

80x25 Monochrome

Reserved

POiming Device

Math Coprocessor

IPL Diskette

Bit 13

Bit 2

Internal Modem (PC Convertible Only)

Reserved (PC, PC XT, AT, and PC Convertible)

Note:

Refer to INT 11H for equipment return information.

Figure 3-3. System Equipment Data Area

Size

Word

Address

40:12

Exceptions

40:12

Function

Reserved

Power-On Self-Test Status (PC Convertible Only)

Figure 3-4. Miscellaneous Data Area 1

Size

Byte

Byte

Address Function

40:13 Memory Size in Kb (Range 0 to 640)

40:15 to 40:16 Reserved

Figure 3-5. Memory Size Data Area

Size

Word

Byte

3-4

Data Areas and ROM Tables

Address

40:17

Bit 7

Bit 6

Bit 5

Bit 4

Bit 3

Bit 2

Bit 1

Bit 0

40:18

Bit 7

Bit 6

Bit 5

Bit 4

Bit 3

Bit 2

Bit 1

Bit 0

40:19

40:1A

40:1C

40:1E

Function

Keyboard Control

Insert Locked

Caps Lock Locked

Num Lock Locked

Scroll Lock Locked

Alt Key Pressed

Ctrl Key Pressed

Left Shift Key Pressed

Right Shift Key Pressed

Keyboard Control

Insert Key Pressed

Caps Lock Key Pressed

Num Lock Key Pressed

Scroll Lock Key Pressed

Pause Locked

System Request Key Pressed

Left Alt Key Pressed

Left Ctrl Key Pressed

Alternate Keypad Entry

Keyboard Buffer Head Pointer

Keyboard Buffer Tail Pointer

Keyboard Buffer

Figure 3-6. Keyboard Data Area 1

Size

Byte

Byte

Byte

Word

Word

32 Bytes

Data Areas and ROM Tables

3-5

Address

40:3E

Bit 7

Bit 6

Bit 5

Bit 4

Bit 3

Bit 2

Bit 1

Bit 0

40:3F

Bit 7

Bit 6

Bits 5,4

Bit 3

Bit 2

Bit 1

Bit 0

40:40

40:41

40:42

Function

Recalibrate status

Interrupt Flag

Reserved

Reserved

Reserved

Recalibrate Drive 3

Recalibrate Drive 2

Recalibrate Drive 1

Recalibrate Drive 0

Size

Byte

Motor Status

Write/Read Operation

Reserved

Diskette Drive Select Status (Values in Binary)

00

01

10

11

=

Diskette Drive 0 Selected

=

Diskette Drive 1 Selected

=

Diskette Drive 2 Selected

=

Diskette Drive 3 Selected

Diskette Drive 3 Motor On Status

Diskette Drive 2 Motor On Status

Diskette Drive 1 Motor On Status

Diskette Drive 0 Motor On Status

Byte

Motor off counter

Last Diskette Drive Operation Status

OOH

01H

02H

03H

04H

06H

08H

=

No Error

=

Invalid Diskette Drive Parameter

=

Address Mark not Found

=

Write-protect Error

=

Requested Sector not Found

=

Diskette Change Line Active

=

DMA Overrun on Operation

=

Attempt to DMA Across a 64Kb Boundary 09H

OCH

10H

20H

=

Media Type not Found

=

CRC Error on Diskette Read

=

General Controller Failure

40H

80H

=

Seek Operation Failed

=

Diskette Drive not Ready

Diskette Drive Controller Status Bytes

Byte

Byte

7 Bytes

Figure 3-7. Diskette Drive Data Area

3-6 Data Areas and ROM Tables

Address

40:49

40:4A

40:4C

40:4E

40:50

40:52

40:54

40:56

40:58

40:5A

40:5C

40:5E

40:60

40:62

40:63

40:65

40:66

Function

Display Mode set

Number of Columns

Length of Regen Buffer in Bytes

Starting Address in Regen Buffer

Cursor Position Page 1

Cursor Position Page 2

Cursor Position Page 3

Cursor Position Page 4

Cursor Position Page 5

Cursor Position Page 6

Cursor Position Page 7

Cursor Position Page 8

Cursor Type

Display Page

CRT Controller Base Address

Current Setting of 3x8 Register

Current Setting of 3x9 Register

Figure

3-8.

Video Control Data Area

1

Address

40:67

40:6B

Exceptions

40:67

Function

Reserved

Reserved

Pointer to reset code upon system reset with memory preserved (Personal System/2 products except Model 30).

Reset Flag at 40:72

=

4321 H

Figure

3-9.

System Data Area

1

Size

DWord

Byte

DWord

Size

Byte

Word

Word

Word

Word

Word

Word

Word

Word

Word

Word

Word

Word

Byte

Word

Byte

Byte

Address

40:6C

40:70

Function

Timer Counter

Timer Overflow

(If non 0, timer has counted past 24 hours.)

Figure

3-10.

System-Timer Data Area

Size

DWord

Byte

Data Areas and

ROM

Tables

3-7

Address

40:71

40:72

Function

Break Key State

Reset Flag

1234H

4321H

=

Bypass Memory Test

=

Preserve Memory (Personal System/2 products except Model 30)

5678H

=

System Suspended (PC Convertible)

9ABCH

=

Manufacturing Test Mode (PC

Convertible)

ABCDH

=

System POST Loop Mode (PC

Convertible)

Size

Byte

Word

Figure 3-11. System Data Area 2

Address

40:74

Function

Last Fixed Disk Drive Operation Status

OOH

01H

02H

03H

=

No Error

=

Invalid Function Request

=

Address Mark not Found

=

Write Protect Error

04H = Sector not Found

05H

=

Reset Failed

07H

08H

09H

OAH

=

Drive Parameter Activity Failed

=

DMA Overrun on Operation

=

Data Boundary Error

=

Bad Sector Flag Detected

OBH

ODH

OEH

OFH

10H

11 H

=

Bad Track Detected

=

Invalid Number of Sectors on Format

=

Control Data Address Mark Detected

=

DMA Arbitration Level Out of Range

=

Uncorrectable ECC or CRC Error

=

ECC Corrected Data Error

=

General Controller Failure 20H

40H

80H

AAH

BBH

=

Seek Operation Failed

=

Time Out

=

Drive not Ready

=

Undefined Error Occurred

CCH

EOH

FFH

=

Write Fault on Selected Drive

=

Status Error/Error Register is 0

=

Sense Operation Failed

Number of Fixed Disk Drives Attached

Reserved

Reserved

40:75

40:76

40:77

Exceptions

40:74

40:76

40:77

Reserved (IBM ESDI Fixed Disk Drive Adapter/A)

Fixed Disk Drive Control (PC XT)

Fixed Disk Drive Controller Port (PC XT)

Figure 3-12. Fixed Disk Drive Data Area

Size

Byte

Byte

Byte

Byte

Byte

Byte

Byte

3-8

Data Areas and ROM Tables

Address

40:78

40:79

40:7A

40:7B

Exceptions

40:7B

Function

Printer 1 Time-out Value

Printer 2 Time-out Value

Printer 3 Time-out Value

Reserved

Printer 4 Time-out Value (PC, PC XT, and AT)

Figure 3-13.

Printer Time-Out Value Data Area

Size

Byte

Byte

Byte

Byte

Address

40:7C

40:70

40:7E

40:7F

Function

RS-232-C Communications Line 1 Time-out Value

RS-232-C Communications Line 2 Time-out Value

RS-232-C Communications Line 3 Time-out Value

RS-232-C Communications Line 4 Time-out Value

Figure 3-14. RS-232-C Time-Out Value Data Area

Size

Byte

Byte

Byte

Byte

Size

Word

Word

Address

40:80

40:82

Function

Keyboard Buffer Start Offset Pointer

Keyboard Buffer End Offset Pointer

Figure 3-15. Keyboard Data Area 2

Address

40:84

40:85

40:87

40:88

40:89

40:8A

Function

Number of Rows on the Screen (Minus 1)

Character Height (Bytes/Character)

Video Control States

Video Control States

Reserved

Reserved

Figure 3-16. Video Control Data Area 2

Size

Byte

Word

Byte

Byte

Byte

Byte

Data Areas and ROM Tables

3-9

Address Function

Media Control

Size

Byte

40:8B

Bits 7,6

Bits 5,4

Bit 3

Bit 2

Bit 1

Bit 0

40:8C

40:8D

40:8E

40:8F

40:90

40:91

Bits 7,6

Last Diskette Drive Data Rate Selected (Values in

Binary)

00

01

10

11

=

500Kb Per Second

=

300Kb Per Second

=

250Kb Per Second

=

Reserved

Last Diskette Drive Step Rate Selected

Reserved

Reserved

Reserved

Reserved

Fixed uisk Drive Controller Status

Fixed Disk Drive Controller Error Status

Fixed Disk Drive Interrupt Control

Reserved

Byte

Byte

Byte

Byte

Byte

Byte

Drive 0 Media State

Drive 1 Media State

Diskette Drive Data Rate (Values in Binary)

00

01

10

11

=

500Kb Per Second

=

300Kb Per Second

=

250Kb Per Second

=

Reserved

Bit 5

Bit 4

Bit 3

Bits 2,1,0

Double Stepping Required

Media Established

Reserved

Drive/Media State (Values in Binary)

000

001

010

011

100

101

110

111

=

360Kb Diskette/360Kb Drive not Established

=

360Kb Diskette/1.2Mb Drive not Established

=

1.2Mb Diskette/1.2Mb Drive not Established

=

360Kb Diskette/360Kb Drive Established

=

360Kb Diskette/1.2Mb Drive Established

=

1.2Mb Diskette/1.2Mb Drive Established

=

Reserved

=

None of the Above

40:92

40:93

40:94

40:95

Exceptions

Reserved

Reserved

Drive 0 Current Cylinder

Drive 1 Current Cylinder

Byte

Byte

Byte

Byte

40:8B to 40:95 Reserved (PC,

PCjr,

PC

XT BIOS Dated 11/8/82, and

Byte

PC Convertible)

Figure

3-17.

Diskette Drive/Fixed Disk Drive Control Data Area

3-10

Data Areas and

ROM

Tables

Address

40:96

Bit 7

Bit 6

Bit 5

Bit 4

Bit 3

Bit 2

Bit 1

Bit 0

40:97

Bit 7

Bit 6

Bit 5

Bit 4

Bit 3

Bits 2,1,0

Function

Keyboard Mode State and Type Flags

Read 10 in Progress

Last Character was First 10 Character

Force Num Lock if Read 10 and KBX

101/102-Key Keyboard Installed

Right Alt Key Pressed

Right Ctrl Key Pressed

Last Code was EO Hidden Code

Last Code was E1 Hidden Code

Keyboard LED Flags

Keyboard Transmit Error Flag

Mode Indicator Update

Resend Receive Flag

Acknowledgment Received

Reserved (Must be 0)

Keyboard LED State Bits

Figure 3-18. Keyboard Data Area 3

Address

40:98

40:9A

40:9C

40:9E

40:AO

Bit 7

Bits 6 to 1

Bit 0

40:A1 to 40:A7

Function

Offset Address to User Wait Complete Flag

Segment Address to User Wait Complete Flag

User Wait Count - Low Word (Microseconds)

User Wait Count - High Word (Microseconds)

Wait Active Flag

Wait Time Elapsed and Post

Reserved

INT 15H, AH

Reserved

= 86H (Wait) has Occurred

Figure 3-19. Real-Time Clock Data Area

Size

Byte

Byte

Size

Word

Word

Word

Word

Byte

Byte

Data Areas and ROM Tables

3-11

For systems with EGA capability and Personal System/2 products, the save pointer table contains pointers that define specific dynamic overrides for the video mode set function, INT 10H, (AH) = OOH.

Address

40:A8

DWord 1

DWord 2

Function

Pointer to Video Parameters and Overrides

Video Parameter Table Pointer

Initialized to the BIOS video parameter table.

This value must contain a valid pointer.

Dynamic Save Area Pointer (except Personal

System/2 Model 30)

Initialized to 00:00, this value is optional. When non 0, this value pOints to an area in RAM where certain dynamic values are saved. This area holds the 16 EGA palette register values plus the overscan value in bytes (0-16), respectively. A minimum of 256 bytes must be allocated for this area.

Size

DWord

DWord 3 Alpha Mode Auxiliary Character Generator Pointer

Initialized to 00:00, this value is optional. When non 0, this value points to a table that is described as follows:

Bytes/Character

Block to Load, 0

=

Normal Operation

Count to Store, 256

=

Normal Operation

Character Offset, 0

=

Normal Operation

Pointer to a Font Table

Byte

Byte

Word

Word

DWord

Byte Displayable Rows

If OFFH, the maximum calculated value is used, otherwise this value is used.

Consecutive bytes of mode values for this font description. The end of this stream is indicated by a byte code of OFFH.

Byte

Note: Use of the DWord 3 pointer may cause unexpected cursor type operation.

For an explanation of cursor type, see INT 10H, (AH)

=

01H.

DWord 4 Graphics Mode Auxiliary Character Generator

Pointer

Initialized to 00:00, this value is optional. When non 0, this value points to a table that is described as follows:

Figure 3-20 (Part 1 of 2). Save Pointer Data Area

3-12

Data Areas and ROM Tables

Address

DWord 5

DWord 6

DWord 7

Function

Displayable Rows

Size

Byte

Bytes Per Character

Pointer to a Font Table

Consecutive bytes of mode values for this font description. The end of this stream is indicated by a byte code of OFFH.

Secondary Save Pointer (except EGA and Personal

System/2 Model 30)

Initialized to the BIOS secondary save pointer.

This value must contain a valid pointer.

Reserved and set to 00:00.

Reserved and set to 00:00.

Word

DWord

Byte

Figure 3-20 (Part 2 of 2). Save Pointer Data Area

Address

Word 1

DWord 2

Function

Table Length

Initialized to the BIOS secondary save pOinter table length.

Display Combination Code (DCC) Table Pointer

Initialized to ROM DCC table. This value must exist. It points to a table described as follows:

Number of Entries in Table

DCC Table Version Number

Maximum Display Type Code

Reserved

00,00 Entry 0 No Displays

00,01 Entry 1 MDPA

00,02 Entry 2 CGA

02,01 Entry 3 MDPA

+

CGA

00,04 Entry 4 EGA

04,01 Entry 5 EGA

+

MDPA

00,05 Entry 6 MEGA

02,05 Entry 7 MEGA

+

CGA

00,06 Entry 8 PGC

01,06 Entry 9 PGC

05,06 Entry 10 PGC

+

MDPA

+

MEGA

00,08 Entry 11 CVGA

Size

Figure 3-21 (Part 1 of 3). Secondary Save Pointer Data Area

Byte

Byte

Byte

Byte

Data Areas and ROM Tables

3-13

Address

DWord 3

Function

01,08 Entry 12 CVGA

00,07 Entry 13 MVGA

+

MDPA

02,07 Entry 14 MVGA

02,06 Entry 15 MVGA

+

CGA

+

PGC

Abbreviation Meanings:

MDPA

=

Monochrome Display and Printer

Adapter

CGA

=

Color/Graphics Monitor Adapter

EGA

=

Enhanced Graphics Adapter

MEGA

=

EGA with monochrome display

PGC = Professional Graphics Controller

VGA

=

Video Graphics Array

MVGA

=

VGA based with monochrome display

CVGA

=

VGA based with color display

Size

Second Alpha Mode Auxiliary Character

Generator Pointer

Initialized to 00:00, this value is optional. When non 0, this value points to a table that is described as follows:

Bytes/Character

Block to load, should be non

° operation.

Byte

Byte

Reserved

Pointer to a Font Table

Byte

DWord

Consecutive bytes of mode values for this font description. The end of this stream is indicated by a byte code of OFFH.

Byte

Note: Attribute bit 3 is used to switch between primary and secondary fonts. It may be desirable to use the user palette profile to define a palette of consistent colors independent of attribute bit 3.

DWord 4 User Palette Profile Table Pointer

Initialized to 00:00, this value is optional. When non 0, this value points to a table that is described as follows:

Underlining flag (1 °

=

=

On,

Normal Operation)

°

=

Ignore, -1

=

Off; Byte

Reserved Byte

Reserved Word

Internal Palette Count (0-17; 17

=

Normal

Operation)

Word

Figure 3-21 (Part 2 of 3). Secondary Save Pointer Data Area

3-14 Data Areas and ROM Tables

Address Function

Internal Palette Index (0-16; 0

=

Normal

Operation)

Pointer to Internal Palette

External Palette Count (0-256; 256

Operation)

=

Normal

External Palette Index (0-255; 0

=

Normal

Operation)

Pointer to External Palette

Consecutive bytes of mode values for this font description. The end of this stream is indicated by a byte code of OFFH.

Size

Word

DWord

Word

Word

DWord

Byte

DWord 5to

DWord 7 Reserved and set to 00:00.

Figure 3-21 (Part 3 of 3). Secondary Save Pointer Data Area

Address

40:AC to

40:FF

50:00

Function

Reserved

Print Screen Status Byte (INT 05H Status)

Figure 3-22. Miscellaneous Data Area 2

Size

Byte

Word

Extended BIOS Data Area

The Extended BIOS Data Area is supported on Personal

System/2

products only. The POST allocates the highest possible (n) Kb of memory below 640Kb to be used as this data area. The word value at

40:13 (memory size), indicating the number of Kb below the 640Kb limit, is decremented by (n). The first byte in the Extended BIOS Data

Area is initialized to the length in Kb of the al/ocated area.

To access the Extended BIOS Data Area segment, issue an INT 15,

(AH)

=

C1 H (Return Extended BIOS Data Area Segment Address).

To determine if an Extended BIOS Data Area is al/ocated, use INT 15,

(AH)

=

COH (Return System Configuration Parameters).

Data Areas and ROM Tables

3-15

ROM Tables

The following ROM tables are used by the BIOS to define the characteristics of the hardware devices supported by the system or adapter BIOS.

Fixed Disk Drive Parameter Table

The fixed disk drive parameter table is defined as follows:

Offset Length

0

2

3

5

7

8

1 Word

1 Byte

1 Word

1 Word

1 Byte

1 Byte

9

10

11

12

14

15

1 Byte

1 Byte

1 Byte

1 Word

1 Byte

1 Byte

Description

Maximum Number of Cylinders

Maximum Number of Heads

For PC XT: Starting Reduced Write Current Cylinder

All Others: Not Used

Starting Write Precompensation Cylinder

For PC XT: Maximum ECC Data Burst Length

All Others: Not Used

Control Byte

For PC XT:

Bit 7 - Disable Disk-access Retries

Bit 6 - Disable ECC Retries

Bits 5 to 3 = 0

Bits 2,1,0 - Drive Option

All Others:

Bit 7 - Disable Retries

-or-

Bit 6 - Disable Retries

Bit 5 - Manufacturer's Defect Map Present at

Maximum Cylinders

+

1

Bit 3 - More than 8 Heads

For PC XT: Standard Time-out Value

All Others: Not Used

For PC XT: Time-out Value For Format Drive

All Others: Not Used

For PC XT: Time-out Value For Check Drive

All Others: Not Used

For PC XT: Reserved

All Others: Landing Zone

For PC XT: Reserved

All others: Number of Sectors Per Track

Reserved

Figure 3-23. Fixed Disk Drive Parameter Table Definition

3-16 Data Areas and ROM Tables

For AT and Personal System/2 products, the following lists the fixed disk drive parameters for the various fixed disk drive types. Values are decimal unless noted otherwise:

Type

26

27

28

29

21

22

23

24

25

15

16

17

18

19

20

30

31

32

33 to 255

11

12

13

14

7

8

9

10

3

4

5

6

0

1

2

612

977

977

1024

733

733

733

306

612

306

612

698

976

306

611

732

1023

462

733

900

820

855

855

306

733

306

615

615

940

940

615

Number of Number Number Write Landing Defect

Cylinders of Heads Precompensatlon Zone Map

8

5

15

3

5

7

8

6

4

-No fixed disk drive installed-

4

4

6

128

300

300

512

512

OFFFFH (None)

256

OFFFFH (None)

OFFFFH (None)

OFFFFH (None)

OFFFFH (None)

OFFFFH (None)

8

7

OFFFFH (None)

-Reserved-

4

5

128 o

(All Cylinders)

300

319

733

663

977

7

5

4

4

4

7

7

5

4

7

5

4

OFFFFH (None)

512

300

300

300 o

(All Cylinders) 336

305 663

OFFFFH (None)

OFFFFH (None)

300

488

4

7

306

300

5 OFFFFH(None)

-Reserved-

977

1023

732

732

733

340

670

732

977 o

(All Cylinders) 340

663

732

1023

305

615

615

940

940

615

511

733

901

820

855

855

No

No

No

Yes

Yes

No

Yes

Yes

Yes

No

No

No

No

No

No

No

No

No

No

No

No

No

No

No

No

No

No

No

No

No

No

Figure 3-24. Fixed Disk Drive Parameters (AT and Personal

System/2

Products)

Noles:

1. Software interrupt 41 H poi nts to the entry in the table for drive O.

Software interrupt 46H points to the entry in the table for drive 1.

2. AT BIOS dated 1/10/84 contains entries 0 through 14.

3. AT BIOS dated 6/10/85 or 11/15/85 contains entries 0 through 23.

Data Areas and ROM Tables 3-17

4. PC XT Model 286 contains entries 0 through 24.

5. Personal System/2 products except Model 30 contain entries 0 through 32.

6. Personal System/2 Model 30 contains entries 0 through 26.

For Personal System/2 products except Model 30, the following fixed disk drive parameter table applies:

OHset Length

0

2

2

22

24

25

27

28

30

32

33

2

2

1

1

1

2

1

34

37

39

40

3

2

1

1

0

0

Value

41

(ID) yyy

*

0

0

Description

Length of Fixed Disk Drive Table

ASCII string 'IBM HARDFILE TYPE xxx', where xxx is the type number in ASCII.

Type Number (Values are Binary)

Maximum Number of Cylinders

Maximum Number of Heads

Reserved

Start Write Precompensation Cylinder

Reserved

Control Byte

Bit 7 or 6 - Disable Retries

Bit 5 - Defect Map Installed

Bit 3 - More Than 8 Heads (AT Only)

Reserved

Landing Zone

Number of Sectors Per Track

Reserved

Figure 3-25. Fixed Disk Drive Parameter Table (Personal System/2

Products Except Model 30)

Note: This information is located at head 0, track 0, sector 2.

3-18 Data Areas and ROM Tables

For PC XT BIOS dated 11/10/82 the following fixed disk drive parameter tables apply:

Size Value

DW

DB

DW

DW

DB

DB

DB

DB

DB

DB

0306

02

0306

0000

OBH

OOH

OCH

OB4H

028H

0,0,0,0

Description

Maximum Cylinders

Maximum Heads

Start Reduced Write Current Cylinder

Start Write Precompensation Cylinder

Maximum ECC Burst Data Length

Control Byte

Standard Time-out

Time-out for Format Drive

Time-out for Check Drive

Reserved

Figure 3-26. Fixed Disk Drive Drive Parameter Table 00 (PC XT BIOS

Dated 11/10/82)

Size Value

DW

DB

DW

DW

DB

DB

DB

DB

DB

DB

0375

08

0375

0000

Obh

05H

OCH

OB4H

028H

0,0,0,0

Description

Maximum Cylinders

Maximum Heads

Start Reduced Write Current Cylinder

Start Write Precompensation Cylinder

Maximum ECC Burst Data Length

Control Byte

Standard Time-out

Time-out for Format Drive

Time-out for Check Drive

Reserved

Figure 3-27. Fixed Disk Drive Parameter Table 01 (PC XT BIOS Dated

11/10/82)

Data Areas and ROM Tables

3-19

Size Value

OW

DB

OW

OW

DB

DB

DB

DB

DB

DB

0306

06

0128

0256

OBH

05H

OCH

OB4H

028H

0,0,0,0

Description

Maximum Cylinders

Maximum Heads

Start Reduced Write Current Cylinder

Start Write Precompensation Cylinder

Maximum ECC Burst Data Length

Control Byte

Standard Time-out

Time-out for Format Drive

Time-out for Check Drive

Reserved

Figure 3-28. Fixed Disk Drive Parameter Table 02 (PC XT BIOS Dated

11/10/82)

Size Value

OW

DB

OW

OW

DB

DB

DB

DB

DB

DB

0306

04

0306

0000

OBH

05H

OCH

OB4H

028H

0,0,0,0

Description

Maximum Cylinders

Maximum Heads

Start Reduced Write Current Cylinder

Start Write Precompensation Cylinder

Maximum ECC Burst Data Length

Control Byte

Standard Time-out

Time-out for Format Drive

Time-out for Check Drive

Reserved

Figure 3-29. Fixed Disk Drive Parameter Table 03 (PC XT BIOS Dated

11/10/82)

Nole: INT 41H points to the beginning of the table and the switch settings on the adapter are used as an index into the table.

3-20 Data Areas and ROM Tables

For PC XT BIOS dated 1/08/86 and after the following fixed disk drive parameter tables apply:

Size Value

OW

DB

OW

OW

DB

DB

DB

DB

DB

DB

306

4

306

°

OBH

OSH

OCH

OB4H

028H

0,0,0,0

Description

Maximum Cylinders

Maximum Heads

Start Reduced Write Current Cylinder

Start Write Precompensation Cylinder

Maximum ECC Burst Data Length

Control Byte

Standard Time-out

Time-out for Format Drive

Time-out for Check Drive

Reserved

Figure 3-30. Fixed Disk Drive Parameter Table 00 - Type 1 (PC XT BIOS

Dated 1/08/86)

Size Value

OW

DB

OW

OW

DB

DB

DB

DB

DB

DB

612

4

612

°

OBH

OSH

20H

OB4H

028H

0,0,0,0

Description

Maximum Cylinders

Maximum Heads

Start Reduced Write Current Cylinder

Start Write Precompensation Cylinder

Maximum ECC Burst Data Length

Control Byte

Standard Time-out

Time-out for Format Drive

Time-out for Check Drive

Reserved

Figure 3-31. Fixed Disk Drive Parameter Table 01 - Type 16 (PC XT BIOS

Dated 1/08/86)

Data Areas and ROM Tables 3-21

Size Value

DW

DB

DW

DW

DB

DB

DB

DB

DB

DB

615

4

615

300

OBH

05H

18H

OB4H

028H

0,0,0,0

Description

Maximum Cylinders

Maximum Heads

Start Reduced Write Current Cylinder

Start Write Precompensation Cylinder

Maximum ECC Burst Data Length

Control Byte

Standard Time-out

Time-out for Format Drive

Time-out for Check Drive

Reserved

Figure 3-32. Fixed Disk Drive Parameter Table 02 - Type 2 (PC XT BIOS

Dated 1/08/86)

Size Value

DB

DB

DB

DB

DB

DW

DB

DW

DW

DB

306

8

306

128

OBH

05H

OCH

OB4H

028H

0,0,0,0

Description

Maximum Cylinders

Maximum Heads

Start Reduced Write Current Cylinder

Start Write Precompensation Cylinder

Maximum ECC Burst Data Length

Control Byte

Standard Time-out

Time-out for Format Drive

Time-out for Check Drive

Reserved

Figure 3-33. Fixed Disk Drive Parameter Table 03 - Type 13 (PC XT BIOS

Dated 1/08/86)

Note: INT 41H points to the beginning of the table. The switch settings on the adapter are used as an index into the table.

3-22 Data Areas and ROM Tables

Diskette Drive Parameter Table

The diskette drive parameter table is defined as follows:

Offset Length

0

1

2

1 byte

1 byte

1 byte

3

1 byte

4

5

6

7

8

9

10

1 byte

1 byte

1 byte

1 byte

1 byte

1 byte

1 byte

Description

First Specify Byte

Second Specify Byte

Number of Timer Ticks to Wait Prior to

Turning Diskette Drive Motor

Off

Number of Bytes Per Sector

OOH

=

128 Bytes Per Sector

01H

02H

03H

=

256 Bytes Per Sector

=

512 Bytes Per Sector

=

1024 Bytes Per Sector

Sectors Per Track

Gap Length

Dtl (Data Length)

Gap Length for Format

Fill Byte for Format

Head Settle Time (Milliseconds)

Motor Startup Time (1/8 Seconds)

For Example: 8

=

1 Second Wait

Figure 3-34. Diskette Drive Parameter Table

Note: The diskette drive parameter table is pointed to by INT 1 EH.

Data Areas and ROM Tables 3-23

Notes:

3-24

Data Areas and ROM Tables

Section 4. Additional Information

Interrupt Sharing ...................................... 4-3

Precautions ....................................... 4-3

Interrupt Request (IRQn) Reset ........................ 4-4

Interrupt-Sharing Software Requirements ............... 4-4

Interrupt-Sharing Chaining Structure and Signature ....... 4-6

ROM Considerations ................................ 4-7

Implementation Information .......................... 4-7

Adapter ROM ........................................ 4-12

Video Function Compatibility ............................ 4-14

Video Presence Test ............................... 4-14

Video Mode Switching .............................. 4-15

Multitasking Provisions ................................ 4-16

System Identification .................................. 4-18

Application Guidelines ................................. 4-19

Hardware Interrupts ............................... 4-19

Programming Considerations ........................ 4-21

BIOS and Operati ng System Function Calls ............. 4-21

Scan Code/Character Code Combinations ................. 4-24

4-1

Notes:

4-2

Interrupt Sharing

This section defines an interrupt sharing protocol that allows multiple hardware adapters on the PC type

1/0

channel and Micro Channel™ to share a single interrupt request line.

Precautions

Take the following precautions before implementing interrupt sharing:

• This interrupt sharing protocol is intended to run only in the real address mode. It is not intended to run in the protected (virtual address) mode.

• This interrupt sharing protocol does not apply to the sharing of an interrupt level between an interrupt handler running in the real mode and an interrupt handler running in the protected mode.

• This interrupt sharing protocol is not necessarily compatible with all operati ng systems.

• Interrupts must be disabled before control is passed to the next handler on the chain. The disabling of the interrupts allows the next handler to receive control as if a hardware interrupt had caused it to receive control.

• Interrupts must be disabled before the non-specific End of

Interrupt (EOI) is issued and not reenabled in the interrupt handler to ensure that the Return from Interrupt (IRET) is executed. The flags are restored and the interrupts reenabled before another interrupt is serviced, protecting the stack from excessive build-up.

• All interrupt handlers must have a routine that can be executed after power-on to disable their adapters' interrupts. Executing this routine and resetting the interrupt sharing hardware ensures that adapters are deactivated if the user resets the system.

Micro Channel is a trademark of the International Business Machines

Corporation.

Interrupt Sharing

4-3

• Interrupt handler implementations must store data in memory using Intel

TM format; that is, word hex 424B is stored as 4BH,42H in memory.

Interrupt Request (IRQn) Reset

The Micro Channel interrupt mechanism is level sensitive as opposed to the edge sensitive mechanism of the PC type I/O channel. The level sensitive Micro Channel mechanism simplifies the interrupt hardware needed for the adapters.

An interrupt request in the PC type I/O channel is implicitly reset due to the edge sensitive characteristic of the signal. In the Micro

Channel, due to the level sensitive characteristic of the signal, an interrupt request must be explicitly reset by the bus slave interrupt handler software. This is not the case if the bus slave hardware implicitly resets the interrupt request. An example of a bus slave device that implicitly resets an interrupt request is the system timer.

Interrupt-Sharing Software Requirements

All interrupt sharing software developed for Micro Channel bus slaves must reset the interrupt request. The interrupt-sharing chaining structure must be provided by all interrupt handlers. The

16-byte interrupt-sharing chaining structure must begin at the third byte from the entry point of the interrupt handler. Pointers and flags stored in the interrupt-sharing chaining structure must be stored in

Intel data format (see "Interrupt-Sharing Chaining Structure and

Signature" on page 4-6). These requirements are specified to support the portability of the interrupt handlers across hardware operating environments.

The interrupt handling software for all adapters sharing an interrupt request line must implement this interrupt sharing software standard.

Interrupt sharing software operating in a multitasking environment must support the linking of a task's interrupt handler to a chain of interrupt handlers, the sharing of the interrupt level while that task is active, and the unlinking of the interrupt handler from the chain once the task is complete.

Intel is a trademark of the Intel Corporation.

4-4

Interrupt Sharing

To link an interrupt handler, the newly activated task's interrupt handler replaces the interrupt vector in low memory with a pointer to its own interrupt handler. (See "ROM Considerations" on page 4-7 for interrupt handlers stored in ROM.) The interrupt handler must preserve the interrupt vector it is replacing and use it as a forward pointer to the next interrupt handler in the chain. This old interrupt vector must be stored at a fixed offset from the entry point of the new task's interrupt handler.

When the system acknowledges an interrupt request, each interrupt handler must determine whether it is the appropriate interrupt handler for the adapter presenting the interrupt request. This is accomplished by the handler reading the contents of the interrupt status register of the adapter.

If the handler's device caused the interrupt, the handler must service the interrupt, reset the interrupt status bit, clear the interrupts, issue a non-specific EOI to the interrupt controller, then execute an IRET.

If the handler's device did not cause the interrupt, the handler passes control to the next interrupt handler in the chain using the previously stored forward pointer.

An interrupt handler is unlinked from a chain by the task first locating its handler's position within the chain. The chain can be searched by starting at the interrupt vector in low memory and using the offset of each handler's forward pOinter to locate the entry point of each handler. This is done until the task finds its own handler. Each interrupt handier's signature (424BH) must be checked to ensure that a valid forward pointer exists. The task's forward pointer replaces the forward pointer of the previous handler in the chain, thus removing the handler from the chain.

Note: If the interrupt handler cannot locate its position in the chain, the interrupt handler cannot unlink.

An application-dependent unlinking error-recovery procedure must be incorporated into the unlinking routine for those situations where the unlinking routine discovers that the interrupt chain has been corrupted (an interrupt handler is linked but does not have a valid signature). All interrupt sharing handlers, except those in ROM (see

"ROM Considerations" on page 4-7), must use 424BH as the signature to avoid corrupting the chain.

Interrupt Sharing 4-5

During a system-reset condition, a routine for each interrupt handler must be executed after power-on to disable interrupts from their responsible devices.

Operating system environments that support dynamic relocation of software must manage the entire interrupt sharing process. Interrupt handler software written exclusively for dynamic-relocation operating-system environments does not have to provide the interrupt-sharing chaining structure. These interrupt handlers do not have to provide linking and unlinking support. They must provide support for disabling the interrupting capability of the bus slave they support.

Interrupt-Sharing Chaining Structure and Signature

The interrupt-sharing software chaining structure is in a 16-byte format containing a 4-byte forward pointer (FPTR), a 2-byte signature, and

B

reserved bytes (RES_BYTES), as depicted in the following example:

ENTRY: JMP SHORT PAST

FPTR DO

SIGNATURE DW

0

424BH

PAST:

; Jump around structure

; Forward Pointer

; Used when unlinking to identify

FLAGS

FIRST

JMP

RES_BYTES DB

DB

0

EQU

80H

SHORT RESET

; compatible interrupt handlers

; Flags

; Flag for being first in chain

DUP 7(0) ; -Reserved-

;Actual start of code

The interrupt-sharing software chaining structure begins at the third byte from the interrupt handler's entry point. The first instruction of each handler is a short jump around the structure, placing the structure at a known offset from the beginning of the handler routine.

Since the position of each interrupt handier'S chaining structure is known (except for the handlers on adapter ROM), the FPTRs can be updated when linking and unlinking.

The FIRST flag is used to determine the handier'S position in the chain when linking and unlinking for shared interrupt levels. The contents of the FLAGS byte is changed to the value of the FIRST flag

(BOH) to indicate that the handler is the first handler linked in the chain. All interrupt handlers not stored in ROM must store the FIRST

4-6

Interrupt Sharing

flag (80H) in the FLAGS byte when they are the first handler in the chain.

The Reset routine, an entry point for the operating system, must disable the adapter interrupt and return to the operating system.

ROM Considerations

Adapters with interrupt handlers in ROM must implement chaining by storing the FPTR in latches or ports on the adapter. If the adapter is sharing interrupt levels 7 or 15, it must also store the FIRST flag that indicates whether it is positioned first in the chain of interrupt handlers. Storage of this information is required because it cannot be guaranteed that handlers in ROM will always link first and never unlink. The ROM handler must contain the signature OOOOH beginning at the seventh byte from the handler entry point since the forward pointer in ROM handlers is not stored at the third byte from the handler entry point.

Implementation Information

The Interrupt Mask register is located at 1/0 port 21 H. Specific End of

Interrupt (EOI) values for the various interrupt levels are listed (67H for level 7). The specific EOI is accomplished by issuing an OUT to the 8259A operational control register (port 20H) using Operational

Control Word 2 (OCW2). A non-specific EOI is accomplished by issuing an OUT value of hex 20 to the 8259A operational control register (port 20H).

The following are examples of code used to implement interrupt sharing:

Linking

PUSH

ClI

ES

;Clear interrupts

;Set forward pointer to value of interrupt vector in low memory

ASSUME CS:COOESEG,OS:COOESEG

PUSH ES

MOV

INT

MOV

MOV

AX,350FH

21H

SI.OFFSET CS:FPTR ;Get offset of your forward pointer

CS:[SI],BX

;OOS get interrupt vector

; in an indexable register

;Store the old interrupt vector

Interrupt Sharing 4-7

MOV CS:[SI+2],ES ; in your forward pointer for

; chaining

CMP ES:BYTE PTR[BX],0CFH ;Test for IRET if iret_test_only_is_needed ; See NOTE below

JNE SETVECTR else

JE

CMP

JE

MOV

CMP

JNE

CMP

JNE

FRSTVCTR

ES: WORD PTR[BX+6].424BH ; Is signature present?

SETVECTR

AX,ES

AX.0F000H

SETVCTR oSee if pointing to dummy handler

BX,WORD PTR ES:[0FF01H] ; Dummy Vector Pointer?

SETVECTR ;If dummy, then first

FRSTVCTR: endif

MOV

SETVECTR: POP

CS:FLAGS.FIRST

ES

PUSH DS

;Make interrupt vector in low memory point to your handler

MOV DX,OFFSET ENTRY

;Set up first in chain flag

;Make interrupt vector point to

; your handler

MOV

MOV

MOV

INT

POP

;Unmask (enable)

AX,SEG ENTRY

DS.AX

AX.250FH

21H

;If DS

; put

=1=

it

CS. get it and in DS

;DOS set interrupt vector

DS interrupts for your level

IN

JMP

AND

OUT

MOV

JMP

OUT

STI

POP

AL,IMR

$+2

AL,07FH

IMR.AL

AL,SPC_EOI

$+2

OCR,AL

ES

;Read interrupt mask register

;1/0 delay

;Unmask interrupt level 7

;Write new interrupt mask

;Issue specific EOI for level 7

; to allow pending level 7 interrupts

; (if any) to be serviced

;Enable interrupts

Notes:

1. The operating system must ensure that the SEG:OFF points to a valid interrupt handler or to an IRET (CFH) for levels 7 and 15.

2. ROM interrupt handlers during ROMSCAN (before the operating system is loaded) and handlers on other than IRQ 7, must test the

SEG:OFF as shown in the "else" clause in this listing to determine if they are the first handler in the chain. Checking the

SEG:OFF to see if it pOints to an IRET as the sole determination of

4-8

Interrupt Sharing

FIRST is allowed only on IRQ 7, and then only after the operating system is loaded.

Interrupt Handler

YOUR_CARD EQU

ISB

REARM

SPC_EOI

EOI

OCR

EQU

EQU

EQU

EQU

EQU

FLAGS

FIRST

DB

EQU

JMP SHORT

RES_BYTES DB

PAST: STI

PUSH

MOV

IN

TEST

JNZ

TEST

JNZ

POP

CLI

JMP

SERVICE:

EXIT:

CLI

MOV

OUT

MOV

OUT

POP lRET

RESET:

ENTRY

RET

ENDP xxxx xx

2F7H

67H

20H

20H

AL,EOI

OCR,AL

DX,REARM

DX,AL

;Location of your card interrupt

; control/status register

;Interrupt bit in your card

; interrupt control/status register

;Global Rearm location for

; interrupt level 7

;Specific EOI for 8259 interrupt

; level 7

;Non-specific EOI

;Location of 8259 operational

; control register

;Location of 8259 interrupt mask IMR

MYCSEG

ENTRY

EQU 21H

SEGMENT PARA

ASSUME CS:MYCSEG,DS:DSEG

PROC FAR

FPTR

JMP

DD

SIGNATURE DW

SHORT PAST

0

424BH

;Entry point of handler

;Forward Pointer

;Used when unlinking to identify

; compatible interrupt handlers

;Flags

0

80H

RESET

7 DUP (0)

DX,YOUR_CARD

AL,DX

;Future expansion

;Actual start of handler code

;Save needed registers

;Select your status register

;Read the status register

AL,ISB

SERVICE

;Your card caused interrupt?

;Yes, branch to service logic

CS:FLAGS,FIRST ;Are we the first ones in?

EXIT

;If yes, branch for EOl and Rearm

;Restore registers

;Clear interrupts

DWORD PTR CS:FPTR ;Pass control to next handler on chain

;Service the interrupt

;Clear interrupts

;lssue non-specific EOl to 8259

;Rearm the cards

;Restore registers

;Disable your card

;Return FAR to operating system

Interrupt Sharing 4-9

MYCSEG ENDS

END ENTRY

Unlinking

PUSH

PUSH

OS

ES

ClI

MOV

INT

MOV

AX.350FH

21H

CX.ES

;Are we the first handler in the chain?

;Clear interrupts

;DOS get interrupt vector

;ES:BX points to first of chain

;Pick up segment part of interrupt vector

MOV

CMP

AX.CS ;Get code seg into comparable register

BX.OFFSET tNTRY ;Interrupt vector in low memory

; pOinting to your handler offset?

JNE

CMP

UNCHAIN_A

AX.CX

;No. branch

;Vector pointing to your handler

JNE UNCHAIN_A

; segment?

;No. branch

;Set interrupt vector in low memory to point to the handler pointed to by your pointer

PUSH

MOV

MOV

MOV

INT

POP

JMP

OS

DX.WORD PTR CS:FPTR

DS.WORD PTR CS:FPTR[2]

AX.250FH

21H

OS

;DOS set interrupt vector

UNCHAIN_A:

CMP

BX

UNCHAINj

=

FPTR offset. ES

=

FPTR segment. CX

=

CS

ES:[BX+6].4B42H ;Is handler using the appropriate

JNE lOS

CMP

JNE

MOV

CMP exception

SI.ES:[BX+2]

; conventions (is SIGNATURE present in

; the interrupt chaining structure)?

;No. invoke error exception handler

;Get FPTR segment and offset

SI.OFFSET ENTRY ;Is this forward pointer pointing to

; your handler offset?

UNCHAIN_B

CX.DS

AX.CX

;No. branch

;Move to compare

;Is this forward pointer pointing to

JNE

UNCHAIN_B

;locate your handler in the chain

MOV

MOV

; your handler segment?

;No. branch

AX.WORD PTR CS:FPTR ; Get your FPTR offset

ES:[BX+2].AX ;Replace offset of FPTR of handler

MOV

MOV

MOV

AND

OR

; that points to you

AX.WORD PTR CS:FTPR[2] ; Get your FPTR segment

ES:[BX+4].AX ;Replace segment of FPTR of handler

; that points to you

Al.CS:FlAGS

Al.FIRST

ES:[BX+6].Al

;Get your flags

;Isolate FIRST flag

;Set your first flag into prior routine

4-10 Interrupt Sharing

JMP

UNCHAIN_B: MOV

PUSH

POP

JMP

UNCHAIN_X: STI

POP

POP

UNCHAIN_X

BX,SI

DS

ES

UNCHAIN_A

ES

DS

;Move new offset to BX

;Set pointer to next in chain

;Examine next handler in chain

;Enable interrupts

Interrupt Sharing 4-11

Adapter ROM

The BIOS provides a method for integrating adapters with on-board

ROM code into the system. During the POST, interrupt vectors are established for BIOS calls. After the default vectors are in place, a scan for adapter ROM modules occurs. At this point, an adapter ROM routine can gain control. The routine can establish or intercept interrupt vectors to hook into the system.

Early in the POST the absolute addresses hex COOOO through hex

C7FFF are scanned in 2Kb blocks in search of adapter ROM modules that need to be initialized (for example, valid video adapter ROM).

The absolute addresses hex C8000 through hex DFFFF are scanned in

2Kb blocks in search of devices with valid adapter ROM modules.

Valid adapter ROM is defined as follows:

Byte 0: Hex 55

Byte 1: Hex AA

Byte 2: A length indicator representing the number of 512-byte blocks (limit hex 7F) in the ROM (length/512). A checksum tests the integrity of the ROM module. Each byte in the defined ROM is summed modulo hex 100. This sum must be 0 for the module to be valid.

When the POST identifies valid adapter ROM, it executes a far call to byte 3 of the ROM (which should contain executable code). The device can now perform power-on initialization. The adapter ROM should return control to the POST by executing a far return.

For PC Convertible, if the adapter ROM diagnoses a self-test error, the following should be done before returning:

• Set bit 4 of 40:12 (POST status) to 1

• Set the device number for the supported adapter into (AH)

• Set a two-digit error code into (AL).

If no self-test error is found, the adapter ROM should reset bit 4 of

40:12 (POST status) to 0 before returning.

4-12

Adapter ROM

For Personal System/2 products, video adapters in the channel have a ROM signature code that identifies the video adapter. During the

POST, when CMOS is not valid (abnormal condition), the signature code is used to find the first video adapter and set up its ROM programmable option select (POS) parameters.

The code starts at OCH in the ROM address space and consists of:

77H. CCH, 'VIDEO " POS Byte 1, POS Byte 2. POS Byte 3, POS Byte 4

Video ROM scan remains COOOOH to C7FFFH.

For PC Convertible, during early ROM scan the following protocol is established to determine the video support:

Upon return from a call to a video adapter ROM module, (BH) indicates the following:

(BH)

=

00H - Not a video adapter

=

02H - Video adapter supporting video in the color/graphics adapter range

=

04H - Video adapter supporting video in the monochrome adapter range

Adapter ROM 4-13

Video Function Compatibility

The following procedures are recommended to provide video function compatibility to application software.

Video Presence Test

Use this video presence test to determine which IBM video functions are present.

1. The first step is to issue an INT 10H, with (AH)

=

1AH and (AL)

=

OOH (Read Display Combination Code).

If on return (AL) is not equal to 1AH, the Read/Write Display

Combination Code function is not supported, and step 2 should be followed to determine video presence.

If on return (AL)

=

1AH, the information returned in (BX) defines the video environment. The active display code is returned in

(BL). The alternate display code, if any, is returned in (BH).

Refer to INT 10H, (AH)

=

1AH on page 2-39 for display code definitions.

2. To determine the presence of an IBM Enhanced Graphics Adapter

(EGA) when the Display Combination Code function is not supported, issue an INT 10H with (AH)

=

12H and (BL)

=

10H

(Return EGA Information).

If on return, (BL) be followed.

=

10H, an EGA is not present and step 3 should

If on return (BL) is not equal to 10H then an EGA is present. Note that an IBM Color/Graphics Monitor Adapter or an IBM

Monochrome Display and Printer Adapter may also be present, depending on the EGA switch settings.

3. Complete steps 1 and 2 before performing this step. The video functions that may be present at this point are the IBM

Color/Graphics Monitor Adapter, the IBM Monochrome Display and Printer Adapter, or both. Perform a presence test on video buffer addresses OB8000H, OBOOOOH to determine which video functions are present.

4-14 Video Function Compatibility

Video Mode Switching

Use the following video mode switching procedure when applications will switch between monochrome and color video modes. A correct video function presence test, as previously described, is required.

The following three system video environments are possible:

1. A single video function that supports either monochrome or color video modes. If a monochrome function is present, only monochrome video modes are available. If a color function is present, only color video modes are available.

2. Two video functions; one supporting color and the other supporting monochrome video modes. In this case both monochrome and color video modes are available. To switch from monochrome to color or from color to monochrome, the application should change the system equipment video mode type bits (see data area 40:10, bits 5, 4 on page 3-4) to monochrome or color and issue a INT 10H, (AH)

=

OOH (Set

Mode).

3. A single video function that supports both monochrome and color video modes. To determine if a single video function supports both monochrome and color video modes the application should issue an INT 10H, (AH)

=

1 BH (Return Functionality/State

Information).

If on return (AL) is not equal to 1 BH, the Return

Functionality/State function is not supported. Support for both monochrome and color video modes on a single video function is not available.

If on return (AL)

=

1 BH, use the returned information to determine if the All Modes on All Displays function is active. If active, color and monochrome modes are available and the application should change the system equipment video mode type bits to monochrome or color, and issue a INT 10H, (AH)

=

OOH (Set Mode). If inactive, only color modes or monochrome modes are available, depending on the results of the video presence test.

Video Function Compatibility 4-15

Multitasking Provisions

The BIOS provides hooks to assist in multitasking implementation.

Whenever a busy (Wait) loop occurs in the BIOS, a hook is provided for the program to break out of the loop. Also, when the BIOS services an interrupt, a corresponding Wait loop is exited, and another hook is provided. A program may be written that employs the bulk of the device driver code. The following is valid only in the microprocessor real address mode and must be taken by the code to allow this support.

The program is responsible for matching corresponding Wait and

Post calls and for the serialization of access to the device driver. The

BIOS code is not reentrant.

The following four interfaces are used by the multitasking dispatcher:

Startup: The startup code hooks INT 15H. The dispatcher is responsible to check for function codes of (AH)

=

90H or (AH)

=

91H

(see the following descriptions of Wait and Post). The dispatcher must pass all other functions to the previous user of INT 15H (use a

JMP or a CALL). If (AH) = 90H or (AH) = 91H, the dispatcher must do the appropriate processing, and return by the IRET instruction.

Serialization: The multitasking system must ensure that the device driver code is used serially. Multiple entries into the code can result in errors.

Wait (Busy): Whenever the BIOS is about to enter a Wait loop, it first issues an tNT 15H, (AH)

=

90H. This signals a wait condition. At this point, the dispatcher should save the task status and dispatch another task. This allows overlapped execution of tasks when the hardware is busy. The following is an outline of the code that has been added to the BIOS to perform this function.

4-16 Multitasking Provisions

MOV AX, 90xxH

INT 15H

JC TIMEOUT

;Wait code in AH and

; type code in AL

;Issue call

;Optional: for time-out or

; if carry is set, time-out

; occurred

NORMAL TIMEOUT LOGIC ;Normal time-out

Post (Interrupt): Whenever the BIOS has set an interrupt flag for a corresponding busy loop, an INT 15H, (AH)

=

91H occurs. This signals a Post condition. At this point, the dispatcher must set the task status to "ready to run" and return to the interrupt routine. The following is an outline of the code added to the BIOS that performs this function.

MOV AX, 91xxH

INT 15H

;Post code AH and

; type code AL

;Issue call

Three Wait loop function code classes are supported:

• The first (hex 0 to 7F) is serially reusable. This means that for the devices that use these codes, access to the BIOS must be restricted to one task at a time and the operating system must serialize access.

• The second (hex 80 to BF) is for reentrant devices. There is no restriction on the number of tasks that may access the device.

ES:BX is used to distinguish different calls.

• The third (hex CO to FF) is non interrupt (Wait-only calls). There is no corresponding interrupt for the Wait loop. The dispatcher must take the appropriate action to satisfy this condition, and exit from the loop. There is no complementary Post for these Waits.

They are time-out only and the times are function-number dependent.

To support time-outs properly, the multitasking dispatcher must be aware of time. If a device enters a busy loop, it generally should remain there for a specific amount of time before indicating an error.

The dispatcher must return to the BIOS Wait loop with the carry bit set if a time-out occurs.

Multitasking Provisions 4-17

System Identification

Each BIOS ROM module has a model byte located at FOOO:FFFE in

ROM. In some cases a submodel byte and a BIOS revision level byte are used to further distinguish the various BIOS ROM modules. To access this information, see INT 15H, (AH)

=

COH (Return System

Configuration Parameters) on page 2-94.

Product

PC

PC

PC

PCXT

PCXT

PCXT

PCjr

AT

AT

AT

PC XT Model 286

PC Convertible

Personal System/2 Model 30

Personal System/2 Model 50

Personal System/2 Model 60

Personal System/2 Model 80

Personal System/2 Model 80

*

BIOS date not available.

Figure 4-1. System Identification

BIOS

Date

04/24/81

10/19/81

10/27/82

11/08/82

01/10/86

05/09/86

*

*

*

*

06/01/83

01/10/84

06/10/85

11/15/85

04/21/86

09113185

09/02186

FD

FC

FC

FC

FC

F9

FA

FF

FF

FF

FE

FB

FB

FC

FC

F8

F8

Model Submodel

Byte Byte

-

00

-

00

01

-

-

-

-

00

02

00

00

04

05

00

01

Revision

02

-

-

01

00

-

-

-

-

01

00

00

00

00

00

00

00

4-18

System Identification

Application Guidelines

Use the following information to develop application programs for the

IBM Personal

System/2

and Personal Computer products~

Whenever possible, BIOS should be used as an interface to hardware in order to provide maximum compatibility and portability of applications across systems.

Hardware Interrupts

Hardware interrupts are level-sensitive for systems using the Micro

Channel architecture while systems using the PC type I/O channel have edge-sensitive hardware interrupts. On edge-sensitive interrupt systems, the interrupt controller clears its internal interrupt-in-progress latch when the interrupt routine sends an end of interrupt (EOI) command to the controller. The EOI is sent whether the incoming interrupt request to the controller is active or inactive.

In level-sensitive systems, the interrupt-in-progress latch is readable at an I/O address bit position. This latch is read during the interrupt service routine and may be reset by the read operation or may require an explicit reset.

Note: Designers may want to limit the number of devices sharing an interrupt level for performance and latency considerations.

The interrupt controller on level-sensitive systems requires the interrupt request to be inactive at the time the EOI is sent; otherwise, a "new" interrupt request will be detected and another microprocessor interrupt caused.

To avoid this problem, a level-sensitive interrupt handler must clear the interrupt condition (usually by a Read or Write to an I/O port on the device causing the interrupt). After clearing the interrupt condition, a JMP

$

+

2 should be executed prior to sending the EOI to the interrupt controller. This ensures that the interrupt request is removed prior to reenabling the interrupt controller. Another

JMP $+2 should be executed after sending the EOI; but prior to enabling the interrupt through the Set Interrupt Flag (STI) command.

Application Guidelines 4-19

lID

commands followed immediately by an STI instruction do not permit enough recovery time for some system board and channel operations. To ensure enough time, a JMP SHORT

$

+

2 must be inserted between the lID command and the STI instruction.

Notes:

1. MOV AL,AH type instructions do not allow enough recovery time.

An example of the correct procedure follows:

OUT IO_ADD.AL

JMP SHORT $+2

MOV AL.AH

STI

2. Prior to programming the interrupt controllers, interrupts should be disabled by issuing a Clear Interrupt Flag (eLi) command.

This includes the Mask register, EOls, initialization control words, and operational control words.

In the level-sensitive systems, hardware prevents the interrupt controllers from being set to the edge-sensitive mode.

Hardware interrupt IRQ9 is defined as the replacement interrupt level for the cascade level IRQ2. Program interrupt sharing should be implemented on IRQ2, INT OAH. The following processing occurs to maintain compatibility with the IRQ2 used by IBM Personal Computer products:

1. A device drives the interrupt request active on IRQ2 of the channel.

2. This interrupt request is mapped in hardware to IRQ9 input on the second interrupt controller.

3. When the interrupt occurs, the system microprocessor passes control to the IRQ9 (lNT 71 H) interrupt handler.

4. This interrupt handler performs an EOI to the second interrupt controller and passes control to IRQ2 (INT OAH) interrupt handler.

5. When handling the interrupt, the IRQ2 interrupt handler causes the device to reset the interrupt request prior to performing an

EOI to the master interrupt controller that finishes servicing the

IRQ2 request.

4-20 Application Guidelines

Programming Considerations

The IBM-supported languages of IBM C, BASIC, FORTRAN, COBOL, and Pascal are the best choices for writing compatible programs. If a program uses specific features of the hardware, that program may not be compatible with all IBM Personal

System/2

and Personal

Computer products.

Any program that requires precise timing information should obtain it through an operating system or language interface; for example,

TIME$ in BASIC. The use of programming loops may prevent a program from being compatible with other Personal

System/2

and

IBM Personal Computer products, and software.

BIOS and Operating System Function Calls

For maximum portability, programs should perform all I/O operations through operating system function calls. In environments where the operating system does not provide the necessary programming interfaces, programs should access the hardware through BIOS function calls, if permissible. When writing programs, consider the following:

• In some environments, program interrupts are used for access to these functions. This practice removes the absolute addressing from the program. Only the interrupt number is required.

• The system can mask hardware sensitivity. New devices can change the BIOS to accept the same programming interface on the new device.

• In cases where BIOS provides parameter tables, such as for video or diskette, a program can substitute new parameter values by building a new copy of the table and changing the vector to point to that table. The program should copy the current table, using the current vector, and then modify those locations in the table that need to be changed. In this way, the program does not inadvertently change any values that should be left the same.

• The Diskette Parameters Table pointed to by INT 1EH consists of

11 parameters required for diskette operation. It is recommended that the values supplied in ROM be used. If it becomes necessary to modify any of the parameters, build

Application Guidelines 4-21

(0:78) to point to the new block.

The parameters were established to allow:

Some models of the IBM Personal Computer to operate both the 5.25-inch high capacity diskette drive (96 tracks per inch) and the 5.25-inch double-sided diskette drive (48 tracks per inch).

Some models of the Personal

System/2

to operate both the

3.5-inch 1.44Mb diskette drive and the 3.5-inch 720Kb diskette drive.

The Gap Length Parameter is not always retrieved from the parameter block. The gap length used during diskette read, write, and verify operations is derived from within diskette BIOS.

The gap length for format operations is still obtained from the parameter block.

If a parameter block contains a head settle time parameter value of 0 milliseconds, and a write or format operation is being performed, the following minimum head settle times are enforced.

Drive Type

5.25-lnch Diskette Drives:

Double Sided (48 TPI)

High Capacity (96 TPI)

3.5-lnch Diskette Drives:

720Kb

1.44Mb

Head Settle Time

20 milliseconds

15 milliseconds

20 milliseconds

15 milliseconds

Figure

4-2.

Write and Format Head Settle Time

Read and verify operations use the head settle time provided by the parameter block.

If a parameter block contains a motor start wait parameter of less than 500 milliseconds (1 second for a Personal Computer product) for a write or verify operation, diskette BIOS enforces a minimum time of 500 milliseconds (1 second for a Personal

Computer product). Read and write operations use the motor start time provided by the parameter block.

4-22 Application Guidelines

• Programs may be designed to reside on both 5.25-inch and

3.5-inch diskettes. Since not all programs are operating-system dependent, the following procedure can be used to determine the type of media inserted into a diskette drive:

1. Verify track 0, head 0, sector 1 (1 sector): This allows diskette

BIOS to determine if the format of the media is a recognizable type.

If the verify operation fails, issue the reset function (AH

=

0) to diskette BIOS and try the operation again. If another failure occurs, the media needs to be formatted or is defective.

2. Verify track 0, head 0, sector 16 (1 sector).

If the verify operation fails, either a 5.25-inch (48 TPI) or

3.5-inch 720Kb diskette is installed. The type can be determined by verifying track 78, head 1, sector 1 (1 sector).

A successful verification of track 78 indicates a 3.5-inch

720Kb diskette is installed; a verification failure indicates a

5.25-inch (48 TPI) diskette is installed.

Note:

Refer to the

DOS Technical Reference

for the File

Allocation Table parameters for single-sided and double-sided diskettes.

3. Read the diskette controller status in BIOS starting with address 40:42. The fifth byte defi nes the head that the operation ended with. If the operation ended with head 1, the diskette is a 5.25-inch high-capacity (96 TPI) diskette; if the operation ended with head 0, the diskette is a 3.5-inch 1.44Mb diskette.

Application Guidelines

4-23

Scan Code/Character Code Combinations

The followi ng I ists the keyboard keystrokes and the scan code/character code combinations that are returned through INT 16H:

Keystroke

9 h j k

I

P

[

]

Return

Ctrl a s d f

-

0

=

3

4

5

6

7

Esc

1

2

8

9

Y u i

0 e r t

8ackspace

Tab q w

83- and 84-Key

Standard

Function

01/18

02/31

03/32

04/33

05/34

06/35

07/36

08/37

09/38

OA/39

08/30

OC/20

00/30

OE/08

OF/09

10/71

11/77

12/65

13/72

14/74

15179

16/75

17/69

18/6F

19170

lA/58

18/50 lC/OO

** lE/61

IF/73

20/64

21/66

22/67

23/68

24/6A

25/68

26/6C

27/38

28/27

29/60

**

1011102-Key

Standard

Function

12/65

13/72

14/74

15/79

16/75

17/69

18/6F

19/70 lA/58

18/50 lC/OO

** lE/61

IF/73

20/64

21/66

22/67

23/68

24/6A

25/68

26/6C

27/38

28/27

29/60

**

01/18

02/31

03/32

04/33

05/34

06/35

07/36

08/37

09/38

OA/39

08/30

OC/20

00/30

OE/08

OF/09

10/71

11/77

Shift

Figure 4-3 (Part 1 of 3). Keyboard Keystrokes

101/102-Key

Extended

Function

12/65

13/72

14/74

15/79

16/75

17/69

18/6F

19/70 lA/58

18/50

1C/00

**

1E/61

1F/73

20/64

21/66

22/67

23/68

24/6A

25/68

26/6C

27/38

28/27

29/60

**

01/18

02/31

03/32

04/33

05/34

06/35

07/36

08/37

09/38

OA/39

08/30

OC/20

00/30

OE/08

OF/09

10/71

11/77

4·24

Scan Code/Character Code Combinations

Keystroke

\ z x c v b n m

I

*

F4

F5

F6

F7

F8

F9

F10

F11

Alt

Space

Caps Lock

F1

F2

F3

F12

Num Lock

Scroll Lock

Home

Up Arrow

-

PgUp

Left Arrow

Center Key

Right Arrow

+

End

Down Arrow

PgOn

Ins

Del

SysReq

Key 45

Enter

I

PrtSc

Pause

Home

Up Arrow

PageUp

Left Arrow

Figure 4-3 (Part 2 of 3). Keyboard Keystrokes

101/102-Key

Standard

Function

44/00

--

--

**

**

47/00

48/00

49/00

4A/2D

48/00

--

4D/OO

4E/28

4F/00

50/00

51/00

52/00

53/00

(no key)

56/5C

1C/OD

35/2F

**

**

47/00

48/00

49/00

48/00

39/20

**

38/00

3C/00

30/00

3E/00

3F/00

40/00

41/00

42/00

43/00

28/5C

2C/7A

20/78

2E/63

2F/76

30/62

31/6E

32/60

33/2C

34/2E

35/2F

37/2A

**

83- and 84-Key

Standard

Function

48/00

--

40/00

4E/28

4F/OO

50/00

51/00

52/00

53/00

**

(no key)

(no key)

(no key)

(no key)

(no key)

(no key)

(no key)

(no key)

(no key)

3C/OO

30/00

3E/OO

3F/00

40/00

41/00

42/00

43/00

44/00

(no key)

(no key)

**

**

47/00

48/00

49/00

4A/20

28/5C

2C/7A

20/78

2E/63

2F/76

30/62

31/6E

32/60

33/2C

34/2E

35/2F

37/2A

**

39/20

**

38/00

101/102-Key

Extended

Function

3D/00

3E/OO

3F/00

40/00

41/00

42/00

43/00

44/00

85/00

86/00

**

**

47/00

48/00

49/00

4A/20

28/5C

2C/7A

20/78

2E/63

2F/76

30/62

31/6E

32/60

33/2C

34/2E

35/2F

37/2A

**

39/20

**

38/00

3C/OO

48/00

4C/00

4D/00

4E/28

4F/00

50100

51100

52/00

53/00

(no key)

56/5C

EOIOD

EO/2F

**

**

47/EO

48/EO

49/EO

48/EO

Scan Code/Character Code Combinations

4-25

Keystroke

Shift Esc

Shift !

Shift @

Shift

#

Shift $

Shift

%

Shift

A

Shift &

Shift *

Shift (

Shift )

Shift

Shift

+

Shift Backspace

Shift Tab (Backtab)

Shift

Q

Shift W

Shift E

Shift R

Shift T

Shift y

Shift U

Shift I

Shift 0

Shift P

Shift {

Shift }

Shift Return

Shift Ctrl

Keystroke

83- and 84-Key

Standard

Function

1011102-Key

Standard

Function

101/102-Key

Extended

Function

Right Arrow

End

Down Arrow

PageDown

Insert

Delete

(no key)

(no key)

(no key)

(no key)

(no key)

(no key)

4D/00

4F/00

50/00

51/00

52/00

53/00

4D/EO

4F/EO

50/EO

51

lEO

52/EO

53/EO

** These combinations do not provide a keystroke for the application but perform some other action. They are not put in the INT 16H queue.

-- These combinations have no function and are ignored.

Figure 4-3 (Part 3 of 3). Keyboard Keystrokes

The following lists the Shift keyboard keystrokes and the scan code/character code combinations that are returned through INT 16H:

83- and 84-Key

Standard

Function

01/1B

02/21

03/40

04/23

05/24

06/25

07/5E

08/26

09/2A

OA/28

OB/29

OC/5F

OD/2B

OE/08

OFIOO

10/51

11/57

12/45

13/52

14/54

15/59

16/55

17/49

18/4F

19/50

1A/7B

1B/7D

1C/OD

**

101/102-Key

Standard

Function

01/1B

02/21

03/40

04/23

05/24

06/25

07/5E

08/26

09/2A

OA/28

OB/29

OC/5F

OD/2B

OE/08

OFIOO

10/51

11/57

12/45

13/52

14/54

15/59

16/55

17149

18/4F

19/50

1A/7B

1B/7D

1C/OD

**

101/102-Key

Extended

Function

01/18

02/21

03/40

04/23

05/24

06/25

07/5E

08/26

09/2A

OA/28

OB/29

OC/5F

OD/2B

OE/08

OFIOO

10/51

11/57

12/45

13/52

14/54

15/59

16/55

17/49

18/4F

19/50

1A/7B

1B/7D

1C/OD

**

Figure 4-4 (Part 1 of 3). Shift Keyboard Keystrokes

4-26 Scan Code/Character Code Combinations

Keystroke

Shift A

Shift S

Shift D

Shift F

Shift G

Shift H

Shift J

Shift K

Shift L

Shift :

Shift "

Shift '"

Shift :

Shift Z

Shift X

Shift C

Shift V

Shift B

Shift N

Shift M

Shift

<

Shift

>

Shift ?

Shift *

Shift Alt

Shift Space

Shift Caps Lock

Shift F1

Shift F2

Shift F3

Shift F4

Shift F5

Shift F6

Shift F7

Shift F8

Shift F9

Shift F10

Shift F11

Shift F12

Shift Num Lock

Shift Scroll Lock

Shift 7

Shift 8

Shift 9

Shift -

Shift 4

Shift 5

Shift 6

Shift

+

Shift 1

Shift 2

83- and 84-Key

Standard

Function

55/00

56/00

57/00

58/00

59/00

5A/00

58/00

5C/00

5D/00

(no key)

(no key)

**

**

47/37

48/38

49/39

4A/2D

48/34

4C/35

4D/36

4E/28

4F/31

50/32

2C/5A

2D/58

2E/43

2F/56

30/42

31/4E

32/4D

33/3C

34/3E

35/3F

37/2A

**

39/20

**

54/00

1E/41

1F/53

20/44

21/46

22/47

23/48

24/4A

25/4B

26/4C

27/3A

28/22

29/7E

2B/7C

Figure 4-4 (Part 2 of 3). Shift Keyboard Keystrokes

101/102-Key

Standard

Function

1E/41

1F/53

20/44

21/46

22/47

23/48

24/4A

25/4B

26/4C

27/3A

28/22

29/7E

2B/7C

5D/00

--

--

**

**

47/37

48/38

49/39

4A/2D

48/34

4C/35

4D/36

4E/28

4F/31

50/32

2C/5A

2D/58

2E/43

2F/56

30/42

31/4E

32/4D

33/3C

34/3E

35/3F

37/2A

**

39/20

**

54/00

55/00

56/00

57/00

58/00

59/00

5A/00

58/00

5C/00

1 01 11 02-Key

Extended

Function

1E/41

1F/53

20/44

21/46

22/47

23/48

24/4A

25/4B

26/4C

27/3A

28/22

29/7E

2B/7C

55/00

56/00

57/00

58/00

59/00

5A/00

58/00

5CIDO

50/00

87/00

88/00

**

**

47/37

2C/5A

2D/58

2E/43

2F/56

30/42

31/4E

32/4D

33/3C

34/3E

35/3F

37/2A

**

39/20

**

54/00

48/38

49/39

4A/2D

48/34

4C/35

4D/36

4E/28

4F/31

50/32

Scan Code/Character Code Combinations 4-27

Keystroke

Shift 3

Shift 0

Shift .

Shift SysReq

Shift Key 45

Shift Enter

Shift /

Shift PrtSc

Shift Pause

Shift Home

Shift Up Arrow

Shift PgUp

Shift Left Arrow

Shift Right

Shift End

Shift Down Arrow

Shift PgDn

Shift Insert

Shift Delete

83- and 84-Key

Standard

Function

51/33

52/30

53/2E

(no key)

(no key)

(no key)

(no key)

(no key)

(no key)

(no key)

(no key)

(no key)

(no key)

(no key)

(no key)

(no key)

(no key)

(no key)

101/102-Key

Standard

Function

51/33

52/30

53/2E

(no key)

56/7G

1G/OD

35/2F

47/00

48/00

49/00

48/00

4D/00

4F/00

50/00

51100

52/00

53/00

101/102-Key

Extended

Function

51/33

52/30

53/2E

(no key)

56/7G

EO/OD

EO/2F

47/EO

48/EO

49/EO

48/EO

4D/EO

4F/EO

SO/EO

51/EO

52/EO

53/EO

** These combinations do not provide a keystroke for the application presently running but perform some other action. They are not put in the INT 16H queue.

-- These combinations have no function and are ignored.

Figure 4-4 (Part 3 of 3). Shift Keyboard Keystrokes

The followi ng I ists the Ctrl keyboard keystrokes and the scan code/character code combinations that are returned through INT 16H:

Keystroke

Gtrl Esc

Gtrl1

Gtrl 2 (NUL)

Gtrl3

Gtrl4

Gtrl5

Gtrl6 (RS)

Gtrl7

Gtrl8

Gtrl9

GtrlO

Gtrl

Gtrl ::

Gtrl 8ackspace (DEL)

Gtrl Tab

Gtrl q (DG1)

83- and 84-Key

Standard

Function

01/18

03/00

07/1E

OG/1F

OE/7F

10/11

101/102-Key

Standard

Function

01/18

03/00

07/1E

OG/1F

OE/7F

10/11

Figure 4-5 (Part 1 of 3). Ctrl Keyboard Keystrokes

1 01

11

02-Key

Extended

Function

01118

03/00

07/1E

OG/1F

OE/7F

94/00

10/11

4-28 Scan Code/Character Code Combinations

Keystroke

Glrl w (ETB)

Gtrl e (ENQ)

Gtrl r (OG2)

Gtrl t (OG4)

Glrl y (EM)

Glrl u (NAK)

Gtrl i (HT)

Glrl

0

(SI)

Gtrl p (OLE)

Gtrl [(ESG)

Gtrl] (GS)

Gtrl Return (LF)

Gtrl a (SOH)

Gtrl s (OG3)

Gtrl d (EOT)

Gtrl f (AGK)

Gtrl 9 (BEL)

Gtrl h (Backspace)

Gtrl j (LF)

Gtrl k (VT)

Gtrll (FF)

Gtrl;

Gtrl'

Gtrl'

Gtrl Shift

Gtrl \ (FS)

Gtrl z (SUB)

Gtrl x (GAN)

Gtrl c (ETX)

Gtrl v (SYN)

Gtrl b (STX)

Gtrl n (SO)

Gtrl m (GR)

Gtrl.

Gtrl.

Gtrl/

Gtrl *

Gtrl Alt

Gtrl Space

Gtrl Gaps Lock

Gtrl F1

Gtrl F2

Gtrl F3

Gtrl F4

Gtrl F5

Gtrl F6

Gtrl F7

Gtrl F8

Gtrl F9

Gtrl F10

Gtrl F11

Gtrl F12

101/102-Key

Standard

Function

11/17

26/0G

--

--

--

**

2B/1G

2G/1A

20/18

2E/03

2F/16

30/02

31/0E

12/05

13/12

14/14

15/19

16/15

17/09

18/0F

19/10

1A/1B

1B/10

1G/OA

1E/01

1FI13

20/04

21/06

22/07

23/08

24/0A

25/0B

32/00

--

--

--

--

**

39/20

--

5E/00

5F/00

60/00

61100

62/00

63/00

64/00

65/00

66/00

67/00

--

--

Figure 4-5 (Part 2 of 3). Ctrl Keyboard Keystrokes

83- and 84-Key

Standard

Function

31/0E

32/00

--

--

--

--

**

39/20

--

5E/00

5F/00

60/00

61100

62/00

63/00

64/00

65/00

66/00

67/00

(no key)

(no key)

26/0G

--

--

--

**

2B/1G

2G/1A

20/18

2E/03

2F/16

30/02

11/17

12/05

13/12

14/14

15/19

16/15

17/09

18/0F

19/10

1AI1B

1B/10

1G/OA

1E/01

1FI13

20/04

21/06

22/07

23/08

24/0A

25/0B

1011102-Key

Extended

Function

32/00

--

--

--

96/00

**

39/20

--

5E/00

5F/00

60/00

61/00

62/00

63/00

64/00

65/00

66/00

67/00

89/00

8A/00

24/0A

25/0B

26/0G

--

--

--

**

2B/1G

2G/1A

20/18

2E/03

2F/16

30/02

31/0E

11/17

12/05

13/12

14/14

15/19

16/15

17/09

18/0F

19/10

1A/1B

1B/10

1G/OA

1E/01

1F/13

20/04

~1/06

22/07

23/08

Scan Code/Character Code Combinations

4-29

Keystroke

83- and 84-Key

Standard

Function

101/102-Key

Standard

Function

101/102-Key

Extended

Function

Gtrl Num Lock

Gtrl Scroll Lock

Gtrl Home

Gtrl Up Arrow

Gtrl"PgUp

Gtrl Keypad -

Gtrl Left Arrow

Gtrl Genter

Gtrl Right Arrow

Gtrl Keypad

+

Gtrl End

Gtrl Down Arrow

Gtrl PgDn

Gtrllns

Gtrl Del

Gtrl SysReq

Gtrl Key 45

Gtrl Enter

Gtrl

I

Gtrl PrtSc

Gtrl Break

Gtrl Home

Gtrl Up

Gtrl PageUp

Gtrl Left

Gtrl Right

Gtrl End

Gtrl Down

Gtrl PageDown

Gtrllnsert

Gtrl Delete

77/00

84/00

73/00

74/00

75/00

76/00

77/00

84/00

73/00

74/00

75/00

76/00

84/00

73/00

74/00

75/00

76/00

77/00

80/00

84/00

8E/OO

73/00

8F/OO

74/00

90/00

75/00

91/00

76/00

92/00

93/00

(no key)

(no key)

(no key)

(no key)

(no key)

(no key)

(no key)

(no key)

(no key)

(no key)

(no key)

(no key)

(no key)

(no key)

(no key)

(no key)

(no key)

1G/OA

72/00

00/00

77/00

EOIOA

95/00

72/00

00/00

77/EO

8D/EO

84/EO

73/EO

74/EO

75/EO

91/EO

76/EO

92/EO

93/EO

** These combinations do not provide a keystroke for the application presently running but perform some other action. They are not put on the INT 16H queue.

-- These combinations have no function and are ignored.

Figure 4-5 (Part 30t 3). Ctrl Keyboard Keystrokes

4-30

Scan Code/Character Code Combinations

The following lists the Alt keyboard keystrokes and the scan code/character code combinations that are returned through INT 16H:

83- and 84-Key

Standard

Function Keystroke

Alt 9

Alt h

Alt j

Alt k

Alt I

Alt;

Alt'

Alt'

Alt Shift

Alt \

Altz

Alt x

Alt c

Alt v

Alt b

Alt Esc

Alt 1

Alt 2

Alt3

Alt4

Alt 5

Alt 6

Alt 7

Alt 8

Alt 9

Alt 0

Alt -

Alt

=

Alt Backspace

Alt Tab

Alt q

Altw

Alt e

Alt r

Altt

Alty

Alt u

Alt i

Alt

0

Alt p

Alt [

Alt]

Alt Return

Alt Ctrl

Alt a

Alt s

Altd

Alt f

Figure 4-6 (Part 1 of 2). Alt Keyboard Keystrokes

1011102-Key

Standard

Function

--

78/00

79/00

11/00

12/00

13/00

14/00

15/00

16/00

17/00

18/00

19/00

--

--

--

**

7A/00

7B/00

7C/00

70/00

7E/00

7F/00

80/00

81100

82/00

83/00

--

--

10/00

1E/00

1F/00

20/00

21/00

22/00

23/00

24/00

25/00

26/00

--

--

--

**

--

2C/00

20/00

2E/00

2F/00

30/00

--

78/00

79/00

7A/00

7B/00

7C/00

70/00

7E/00

7F/00

80/00

81100

82/00

83/00

--

--

10/00

11/00

12/00

13/00

14/00

15/00

16/00

17/00

18/00

19/00

--

--

--

**

1E/00

1F/00

20/00

21/00

22/00

23/00

24/00

25/00

26/00

--

--

--

**

--

2C/00

20/00

2E/00

2F/00

30/00

101/102-Key

Extended

Function

A5/00

10/00

11/00

12/00

13/00

14/00

15/00

16/00

17100

18/00

19/00

1A/00

1B/00

01100

78/00

79/00

7A/00

7B/00

7C/00

70/00

7E/00

7F/00

80/00

81100

82/00

83/00

OE/OO

1C/00

**

1E/00

1F/00

20/00

21/00

22/00

23/00

24/00

25/00

26/00

27/00

28/00

29/00

**

2B/00

2C/00

20/00

2E/00

2F/00

30/00

Scan Code/Character Code Combinations

4-31

Keystroke

83- and 84-Key

Standard

Function

101/102-Key

Standard

Function

1 01

11

02-Key

Extended

Function

Alt n

Alt m

Alt,

Alt.

Alt!

Alt *

Alt Space

Alt Caps Lock

Alt F1

Alt F2

Alt F3

Alt F4

Alt F5

Alt F6

Alt F7

Alt F8

Alt F9

Alt F10

Alt F11

Alt F12

Alt Num Lock

Alt Scroll Lock

Alt Keypad--

"Alt Keypad

+

Alt Keypad Nos.

Alt Del

Alt SysRq

Alt Key 45

Alt Enter

Alt!

Alt Print Screen

Alt Pause

Alt Home

Alt Up

Alt PageUp

Alt Left

Alt Right

Alt End

Alt Down

Alt PageOown

Alt Insert

Alt Delete

31100

32/00

39/20

68/00

69/00

6A/00

68/00

6C/00

60/00

6E/00

6F/00

70/00

71/00

(no key)

(no key)

**

#

(no key)

(no key)

(no key)

(no key)

(no key)

(no key)

(no key)

(no key)

(no key)

(no key)

(no key)

(no key)

(no key)

(no key)

31/00

32/00

39/20

68/00

69/00

6A/00

68/00

6C/00

60/00

6E/00

6F/00

70/00

71100

#

(no key)

31/00

32/00

33/00

34/00

35/00

37/00

39/20

68/00

69/00

6A/00

68/00

6C/00

60/00

6E/00

6F/00

70/00

71/00

88/00

8C/00

4A100

4E/00

#

(no key)

A6/00

A4/00

97/00

98/00

99/00

98/00

90/00

9F/00

AO/OO

A1/00

A2/00

A3/00

#

See the following page for use of Alt key with number keys.

** These combinations do not provide a keystroke for the application presently running but perform some other action. They are not put on the INT 16H queue.

-- These combinations have no function and are ignored.

Figure 4-6 (Part 2 of 2).

Alt Keyboard Keystrokes

4-32

Scan Code/Character Code Combinations

For all keyboards, the numeric keypad can be used in combination with the Alt key to input any ASCII character. The scan code (always

00) and character code are returned after the Alt key is released. For example, pressing Alt and Keypad 1, then releasing Alt returns scan code/character code combination hex 00/01; pressing Alt and Keypad

255, then releasing Alt returns scan code/character code combination hex OO/FF.

Scan Code/Character Code Combinations

4-33

Notes:

4-34

Scan Code/Character Code Combinations

Glossary

This glossary includes terms and definitions from the IBM Vocabulary

for Data Processing,

Telecommunications, and Office

Systems,

GC20-1699.

ASCII.

American National Standard

Code for Information Interchange.

assemble.

To translate a program expressed in an assembler language into a computer language.

adapter.

An auxiliary device or unit used to extend the operation of another system.

all pOints addressable (APA).

A mode in which all points of a displayable image can be controlled by the user.

alphanumeric (A/N).

Pertaining to a character set that contains letters, digits, and usually other characters, such as punctuation marks.

Synonymous with alphameric.

assembler.

A computer program used to assemble.

asynchronous transmission.

(1) Transmission in which the time of occurrence of the start of each character, or block of characters, is arbitrary; once started, the time of occurrence of each signal representing a bit within a character, or block, has the same relationship to significant instants of a fixed time frame.

(2) Transmission in which each information character is individually transmitted (usually timed by the use of start elements and stop elements).

American National Standard Code for Information Interchange (ASCII).

The standard code, using a coded character set consisting of 7-bit coded characters (8 bits including parity check), used for information exchange between data processing systems, data communication systems, and associated equipment.

The ASCII set consists of control characters and graphic characters.

BASIC.

Beginner's all-purpose symbolic instruction code.

basic input/output system (BIOS).

The feature that provides the level control of the major 110 devices, and relieves the programmer from concern about hardware device characteristics.

analog.

(1) Pertaining to data in the form of continuously variable physical quantities. (2) Contrast with digital.

APA.

All points addressable.

baud.

(1) A unit of signaling speed equal to the number of discrete conditions or signal events per second. For example, one baud equals one bit per second in a train of binary Signals, one-half dot cycle

X-1

per second in Morse code, and one

3-bit value per second in a train of signals each of which can assume one of eight different states.

(2)

In asynchronous transmission, the unit of modulation rate corresponding to one unit of interval per second; that is, if the duration of the unit interval is

20 milliseconds, the modulation rate is

50 baud.

beginner's all-purpose symbolic instruction code (BASIC).

A programming language with a small repertoi re of commands and a simple syntax, primarily deSigned for numeric applications. formed for technical or logic reasons to be treated as an entity.

(2) A set of things, such as words, characters, or digits, treated as a unit.

bootstrap.

designed to bring itself into a desired state by means of its own action; for example, a machine routine whose first few instructions are sufficient to bring the rest of itself into the computer from an input device.

BSC.

A technique or device

Binary synchronous communications.

binary.

(1)

Pertaining to a selection, choice, or condition that has two possible values or states.

(2)

Pertaining to a fixed radix numeration system having a radix of 2.

buffer.

(1)

An area of storage that is temporarily reserved for use in performing an input/output operation, into which data is read or from which data is written.

Synonymous with 110 area. (2) A portion of storage for temporarily holding input or output data.

binary digit.

(1)

In binary notation, either of the characters 0 or 1.

(2) Synonymous with bit.

bus.

One or more conductors used for transmitting signals or power.

binary notation.

Any notation that uses two different characters, usually the binary digits 0 and 1.

binary synchronous communications (BSC).

A uniform procedure, using a standardized set of control characters and control character sequences for synchronous transmission of binary - coded data between stations.

BIOS.

Basic input/output system.

byte.

(1) A sequence of eight adjacent binary digits that are operated upon as a unit. (2) A binary character operated upon as a unit. (3) The representation of a character.

cathode ray tube

(CRT). A vacuum tube in which a stream of electrons is projected onto a fI uorescent screen producing a luminous spot.

The location of the spot can be controlled.

bit.

Synonym for binary digit.

block.

(1) A string of records, a string of words, or a character string

channel.

A path along which signals can be sent; for example, data channel, output channel.

X-2

character generator.

(1)

In computer graphics, a functional unit that converts the coded representation of a graphic character into the shape of the character for display.

(2)

In word processing, the means within equipment for generating visual characters or symbols from coded data. circuit family that uses very little power. It works with a wide range of power supply voltages. computer. A functional unit that can perform substantial computation, including numerous arithmetic operations or logic operations, without human intervention during a run. character set.

(1)

A fi n ite set of different characters upon which agreement has been reached and that is considered complete for some purpose.

(2)

A set of unique representations called characters.

(3)

A defined collection of characters. computer program. A sequence of instructions suitable for processing by a computer. computer word. A word stored in one computer location and capable of being treated as a unit. characters per second (cps). A standard unit of measurement for the speed at which a printer prints.

CMOS. Complementary metal oxide semiconductor. configuration.

(1)

The arrangement of a computer system or network as defined by the nature, number, and the chief characteristics of its functional units. More specifically, the term configuration may refer to a hardware configuration or a software configuration.

(2)

The devices and programs that make up a system, subsystem, or network. code.

(1)

A set of unambiguous rules specifying the manner in which data may be represented in a discrete form. Synonymous with coding scheme.

(2)

A set of items, such as abbreviations, representing the members of another set.

(3)

To represent data or a computer program in a symbolic form that can be accepted by a data processor.

(4) Loosely, one or more computer programs, or part of a computer program. complement. A number that can be derived from a specified number by subtracting it from a second specified number. complementary metal oxide semiconductor (CMOS). A logic cps. Characters per second.

CRC. Cyclic redundancy check.

CRT. Cathode ray tube. cursor. (1) In computer graphics, a movable marker that is used to indicate position on a display. (2) A displayed symbol that acts as a marker to help the user locate a point in text, in a system command, or in storage. (3) A movable spot of light on the screen of a display device, usually indicating where the next character is to be entered, replaced, or deleted.

X-3

cyclic redundancy check (CRC).

(1) A redundancy check in which the check key is generated by a cyclic algorithm. (2) A system of error checking performed at both the sending and receiving station after a block-check character has been accumulated. cylinder. (1) The set of all tracks with the same nominal distance from the axis about which the disk rotates. (2) The tracks of a disk storage device that can be accessed without repositioning the access mechanism. disabled. Pertaining to a state of a processing unit that prevents the occurrence of certain types of interruptions. Synonymous with masked. disk. Loosely, a magnetic disk. data. (1) A representation of facts, concepts, or instructions in a formalized manner suitable for communication, interpretation, or processing by human or automatic means. (2) Any representations, such as characters or analog quantities, to which meaning is, or might be assigned. main storage and I/O devices that does not requi re processor intervention. disable. To stop the operation of a circuit or device. diskette. A thin, flexible magnetic disk and a semirigid protective jacket, in which the disk is permanently enclosed. Synonymous with flexible disk. diskette drive. A device for storing data on and retrieving data from a diskette. dc. Direct current. device driver. A device handler routine in the operating system. display. (1) A visual presentation of data. (2) A device for visual presentation of information on any temporary character imaging device. (3) To present data visually. (4) See cathode ray tube display. digit. (1) A graphic character that represents an integer; for example, one of the characters 0 to 9. (2) A symbol that represents one of the non-negative integers smaller than the radix. For example, in decimal notation, a digit is one of the characters 0 to 9.

DMA. Direct memory access. duplex. (1) In data communication, pertaining to a simultaneous two-way independent transmission in both directions. d.Contrast with half-duplex. digital. (1) Pertaining to data in the form of digits. (2) Contrast with analog.

ECC. Error checking and correction. direct memory access (DMA). A method of transferring data between enable. To initiate the operation of a circuit or device.

X-4

end-of-text (ETX).

A transmission control character used to terminate text. occurrence of some condition, such as the end of a word.

end-of-transmission (EOT). A transmission control character used to indicate the conclusion of a transmission, which may have included one or more texts and any associated message headings.

end-of-transmission-block (ETS).

A transmission control character used to indicate the end of a transmission block of data when data is divided into such blocks for transmission purposes.

font.

A family or assortment of characters of a given size and style; for example, 10 point Press Roman medium.

foreground.

(1)

In multiprogramming, the environment in which high-priority programs are executed. (2) On a color display screen, the characters as opposed to the background.

format.

The arrangement or layout of data on a data medium.

EOT.

ETS.

ETX.

FCC.

End-of-transmission.

End-of-transmission-block.

End-of-text.

Federal Communications

Commission.

gate.

(1) A combinational logic circuit having one output channel and one or more input channels, such that the output channel state is completely determined by the input channel states. (2) A signal that enables the passage of other signals through a circuit.

field.

(1) In a record, a specified area used for a particular category of data. (2) In a data base, the smallest unit of data that can be referred to.

graphic.

A symbol produced by a process such as handwriting, drawing, or printing.

FIFO (first-in-first out).

A queuing technique in which the next item to be retrieved is the item that has been in the queue for the longest time.

half-duplex.

(1) In data communication, pertaining to an alternate, one way at a time, independent transmission.

(2) Contrast with duplex.

fixed disk drive.

A unit consisting of nonremovable magnetic disks, and a device for storing data on and retrieving data from the disks.

hardware.

Physical equipment used in data processing, as opposed to programs, procedures, rules, and associated documentation.

flag.

(1) Any of various types of indicators used for identification.

(2) A character that signals the

head.

A device that reads, writes, or erases data on a storage medium; for example, a small electromagnet used to read, write, or erase data on a magnetic disk.

X-5

hertz (Hz). A unit of frequency equal to one cycle per second. points in, the operation of a computer routine. hex. Common abbreviation for hexadecimal. hexadecimal. (1) Pertaining to a selection, choice, or condition that has 16 possible different values or states. These values or states are usually symbolized by the ten digits o through 9 and the six letters A through F. (2) Pertaining to a fixed radix numeration system having a radix of 16.

Hz. Hertz input/output (1/0). (1) Pertaining to a device or to a channel that may be involved in an input process, and, at a different time, in an output process. In the English language,

"input/output" may be used in place of such terms as "input/output data," "input/output signal," and

"input/output terminals," when such usage is clear in a given context.

(2) Pertaining to a device whose parts can be performing an input process and an output process at the same time. (3) Pertaining to either input or output, or both. image. A fully processed unit of operational data that is ready to be transmitted to a remote unit; when loaded into control storage in the remote unit, the image determines the operations of the unit. instruction. In a programming language, a meaningful expression that specifies one operation and identifies its operands, if any. indicator. (1) A device that may be set into a prescribed state, usually according to the result of a previous process or on the occurrence of a specified condition in the equipment, and that usually gives a visual or other indication of the existence of the prescribed state, and that may in some cases be used to determine the selection among alternative processes; for example, an overflow indicator. (2) An item of data that may be interrogated to determine whether a particular condition has been satisfied in the execution of a computer program; for example, a switch indicator, an overflow indicator. initialize. To set counters, switches, addresses, or contents of storage to 0 or other starting values at the beginning of, or at prescribed intenSity. In computer graphiCS, the amount of light emitted at a display point interface. A device that alters or converts actual electrical signals between distinct devices, programs, or systems. interleave. To arrange parts of one sequence of things or events so that they alternate with parts of one or more other sequences of the same nature and so that each sequence retains its identity. interrupt. (1) A suspension of a process, such as the execution of a computer program, caused by an event external to that process, and performed in such a way that the process can be resumed. (2) In a data transmiSSion, to take an action at a receiving station that causes

X-6

the transmitting station to terminate a transmission. (3) Synonymous with interruption. megahertz (MHz). 1,000,000 hertz. memory. Term for main storage.

1/0.

Input/output. meter (m). A unit of length

(equivalent to 39.37 inches).

1/0

area. Synonym for buffer.

Joystick. In computer graphics, a lever that can pivot in all directions and that is used as a locator device. micro. Prefix 0.000,001.

Kb. 1024 bytes. latch. (1) A simple logic-circuit storage element. (2) A feedback loop in sequential digital circuits used to maintain a state.

MHz. Megahertz; 1,000,000 hertz. microprocessor. An integrated circuit that accepts coded instructions for execution; the instructions may be entered, integrated, or stored internally. microsecond. 0.000,001 second.

LED. Light-emitting diode. milli (m). Prefix 0.001. light-emitting diode (LED). A semiconductor device that gives off visible or infrared light when activated. milliampere (mA). 0.001 ampere. millisecond (ms). 0.001 second. load. In programming, to enter data into storage or working registers. mode. (1) A method of operation; for example, the binary mode, the interpretive mode, the alphanumeric mode. (2) The most frequent value in the statistical sense. mark. A symbol or symbols that indicate the beginning or the end of a field, of a word, of an item of data, or of a set of data such as a file, a record, or a block. mask. (1) A pattern of characters that is used to control the retention or elimination of portions of another pattern of characters. (2) To use a pattern of characters to control the retention or elimination of portions of another pattern of characters. modem (modulator-demodulator).

A device that converts serial (bit by bit) digital signals from a business machine (or data communication equipment) to analog signals that are suitable for transmission in a telephone network. The inverse function is also performed by the modem on reception of analog signals. masked. Synonym for disabled.

Mb. 1 048576 bytes. module. (1) A program unit that is discrete and identifiable with respect to compiling, combining with other units, and loading. (2) A packaged functional hardware unit mega (M). Prefix 1,000,000.

X-7

designed for use with other components. monitor. Synonym for cathode ray tube display (CRT display). individual parts of a whole, such as the bits of a character and the characters of a word, using separate facilities for the various parts.

(5) Contrast with serial. ms. Millisecond; 0.001 second. multiplexer. A device capable of interleaving the events of two or more activities, or capable of distributing the events of an interleaved sequence to the respective activities. parameter. (1) A variable that is given a constant value for a specified application and that may denote the application. (2) A name in a procedure that is used to refer to an argument passed to that procedure. null character (NUL). A control character that is used to accomplish media-fill or time-fill, and that may be inserted into or removed from, a sequence of characters without affecting the meaning of the sequence; however, the control of the equipment or the format may be affected by this character. parity check. (1) A redundancy check that uses a parity bit.

(2) Synonymous with odd-even check.

PEL. Picture element. picture element (PEL). The smallest displayable unit on a display. operating system. Software that controls the execution of programs; an operating system may provide services such as resource allocation, scheduling, input/output control, and data management. pOinters. A double word entity that specifies an address. port. An access point for data entry or exit. overrun. Loss of data because a receiving device is unable to accept data at the rate it is transmitted. parallel. (1) Pertaining to the concurrent or simultaneous operation of two or more devices, or to the concurrent performance of two or more activities.

(2) Pertaining to the concurrent or simultaneous occurrence of two or more related activities in multiple devices or channels. (3) Pertaining to the simultaneity of two or more processes. (4) Pertaining to the simultaneous proceSSing of the processor. (1) In a computer, a functional unit that interprets and executes instructions. (2) A functional unit, a part of another unit such as a terminal or a proceSSing unit, that interprets and executes instructions. (3) Deprecated term for processing program. (4) See microprocessor. program. (1) A series of actions designed to achieve a certain result.

(2) A series of instructions telling the computer how to handle a problem or task. (3) To design, write, and test computer programs.

X-8

programmable read-only memory

(PROM). A read-only memory that can be programmed by the user.

programming language. (1) An artificial language established for expressing computer programs.

(2)

A set of characters and rules with meanings assigned prior to their use, for writing computer programs.

read/write memory. A storage device whose contents can be modified. Also called RAM.

register. (1) A storage device, having a specified storage capacity such as a bit, a byte, or a computer word, and usually intended for a special purpose.

(2)

A storage device in which specific data is stored.

protocol.

(1) A specification for the format and relative timing of information exchanged between communicating parties. (2) The set of rules governing the operation of functional units of a communication system that must be followed if communication is to be achieved.

reset/initialize. Set Hardware to known state

retry. To resend the current block of data (from the last EOB or ETB) a prescribed number of times, or until it is entered correctly or accepted.

RF. Radio frequency.

radio frequency (RF). An ac frequency that is higher than the highest audio frequency. So called because of the application to radio communication.

RF modulator. The device used to convert the composite video signal to the antenna level input of a home

TV.

RAM. Random access memory.

Read/write memory.

ROM. Read-only memory.

random access memory (RAM).

Read/write memory.

ROM/BIOS. The ROM resident basic input/output system, which provides the level control of the major I/O devices in the computer system. raster. In computer graphics, a predetermined pattern of lines that provides uniform coverage of a display space.

RS-232-C. A standard by the EIA for communication between computers and external equipment.

read. To acquire or interpret data from a storage device, from a data medium, or from another source.

run. A single continuous performance of a computer program or routine.

read-only memory (ROM).

A storage device whose contents cannot be modified. The memory is retained when power is removed.

scaling. In computer graphics, enlarging or reducing all or part of a display image by multiplying the coordinates of the image by a constant value.

X-9

SOLe.

Control.

Synchronous Data Link

start-of-text (STX).

A transmission control character that precedes a text and may be used to terminate the message heading.

sector.

That part of a track or band on a magnetic drum, a magnetic disk, or a disk pack that can be accessed by the magnetic heads in the course of a predetermined rotational displacement of the particular device.

serial.

(1) Pertaining to the sequential performance of two or more activities in a single device. In

English, the modifier~ serial and parallel usually refer to devices, as opposed to sequential and consecutive, which refer to processes. (2) Pertaining to the sequential or consecutive occurrence of two or more related activities in a single device or channel. (3) Pertaining to the sequential processing of the individual parts of a whole, such as the bits of a character or the characters of a word, using the same facilities for successive parts.

(4) Contrast with parallel.

stop bit.

(1) A signal to a receiving mechanism to wait for the next signal. (2) In a start-stop system, a signal following a character or block that prepares the receiving device for the reception of a subsequent character or block.

storage.

(1) A storage device.

(2) A device, or part of a device, that can retain data. (3) The retention of data in a storage device.

STX. text.

Start-of-text.

In ASCII and data communication, a sequence of characters treated as an entity if preceded and terminated by one

STX and one ETX transmission control character, respectively.

setup.

(1) In a computer that consists of an assembly of individual computing units, the arrangement of interconnections between the units, and the adjustments needed for the computer to operate. (2) The preparation of the system for normal operation.

time-out.

(1) A parameter related to an enforced event designed to occur at the conclusion of a predetermined elapsed time. A time-out condition can be cancelled by the receipt of an appropriate time-out cancellation signal. (2) A time interval allotted for certain operations to occur; for example, response to polling or addressing before system operation is interrupted and must be restarted.

software. source.

Computer programs, procedures, and rules concerned with the operation of a data processing system.

The origin of a signal or electrical energy.

track.

(1) The path or one of the set of paths, parallel to the reference edge on a data medium, associated with a single reading or writing component as the data medium moves past the component. (2) The portion of a moving data medium such as a drum, or disk, that is

X-10

accessible to a given reading head position.

window.

(1) A predefined part of the virtual space. (2) The visible area of a viewplane.

word.

(1) A character string or a bit string considered as an entity.

(2) See computer word.

write.

To make a permanent or transient recording of data in a storage device or on a data medium.

write precompensation.

The varying of the timing of the head current from the outer tracks to the inner tracks of the diskette to keep a constant 'write' signal.

X-11

Notes:

X-12

Index

A activate/deactivate internal modem power 2-81 adapter ROM 4-12 alternate disk reset 2-66 alternate select 2-32 application guidelines 4-19

BIOS function calls 4-21 hardware interrupts 4-19 operating system function calls 4-21 programming considerations 4-21 asynchronous communications interrupt (14H) 2-70 extended communications port control 2-73 extended initialize 2-72 initialize the communications port 2-70 read status 2-72 receive character 2-71 send character 2-71

B

BASIC 4-21

BIOS data area 3-3

BIOS data area, extended 3-15

BIOS function calls 4-21

BIOS level determination 1-4 bootstrap loader interrupt

(19H) 2-114 c character code combinations 4-24 character generator 2-24

COBOL 4-21 compatibility, video 4-14

D data areas 1-4, 3-3, 3-15 device busy 2-93 device close 2-83 device open 2-83 diskette change line status 2-55 diskette drive data area 3-6 diskette drive parameter table 3-23 diskette drive/fixed disk drive control data area 3-10 diskette interrupt (13H) 2-48 diskette change line status 2-55 format desired track 2-51 read DASD type 2-54 read desired sectors into memory 2-50 read drive parameters 2-53 read status of last operation 2-49 reset diskette system 2-48 set DASD type for format 2-55 set media type for format 2-56 verify desired sectors 2-51 write desired sectors from memory 2-50

E edge-sensitive interrupts 4-19 enable/disable watchdog time-out 2-102 equipment determination interrupt

(11 H) 2-46 event wait 2-84 extended BIOS data area 3-15 extended communications port control 2-73 extended initialize 2-72 extended keyboard read 2-109 extended keystroke status 2-109

X-13

extended memory size determine 2-89 extended shift status 2-110

F fixed disk drive data area 3-8 fixed disk drive parameter table 3-16 fixed disk interrupt (13H) 2-58 alternate disk reset 2-66 format desired cylinder 2-62 format desired cylinder and set bad sector flags 2-63 format drive starting at desired cylinder 2-64 format unit 2-68 initialize drive pair characteristics 2-65 park heads 2-68 read DASD type 2-67 read desired sectors into memory 2-60 read drive parameters 2-64 read status of last operation 2-60 recalibrate 2-67 reset disk system 2-59 seek 2-66 test drive ready 2-66 verify desired sectors 2-61 write desired sectors from memory 2-61 format desired cylinder 2-62 format desired cylinder and set bad sector flags 2-63 format desired track 2-51 format drive starting at desired cylinder 2-64 format unit 2-68 format unit periodic interrupt 2-76

FORTRAN 4-21 function calls 4-21

G gap length 4-22 guidelines, application 4-19

BIOS function calls 4-21 hardware interrupts 4-19 operating system function calls 4-21 programming considerations 4-21

H hardware interrupts edge-sensitive interrupts 4-19

1/0

commands 4-20 level-sensitive interrupts 4-19

STI instructions 4-20 hardware specific video mode characteristics 2-11

1/0

commands 4-20

IBM C 4-21 identification, system 4-18 initialize drive pair characteristics 2-65 initialize the communications port 2-70 initialize the printer port 2-111

INT 1AH (system-timer and real-time clock services interrupt) 2-115 read real-time clock alarm time and status 2-119 read real-time clock date 2-117 read real-time clock time 2-116 read system-timer day counter 2-119 read system-timer time counter 2-115 reset real-time clock alarm 2-118 set real-ti me clock activated power-on mode 2-118 set real-time clock alarm 2-118 set real-ti me clock date 2-117

X-14

set real-time clock time 2-117 set system-timer day counter 2-120 set system-timer time counter 2-116 set up sound multiplexer 2-120

INT 10H (video) 2-10 alternate select 2-32 character generator 2-24 load LCD character font/set LCD high-intensity substitute 2-37 read attribute/character at current cursor position 2-17 read current video state 2-19 read cursor position 2-15 read dot 2-19 read I ight pen position 2-15,

2-16 read/write display combination code 2-39 return functionality/state information 2-40 return physical display parameters for active display 2-38 save/restore video state 2-44 scroll active page down 2-16 scroll active page up 2-16 set color palette 2-18 set cursor position 2-15 set cu rsor type 2-14 set mode 2-11 set palette registers 2-20 write attribute/character at current cursor position 2-17 write character at current cursor position 2-18 write dot 2-18 write string 2-36 write teletype to active page 2-19

INT 13H (diskette) 2-48 diskette change line status 2-55 format desired track 2-51 read DASD type 2-54 read desired sectors into memory 2-50 read drive parameters 2-53 read status of last operation 2-49 reset diskette system 2-48 set DASD type for format 2-55 set media type for format 2-56 verify desired sectors 2-51 write desired sectors from memory 2-50

INT 13H (fixed disk) 2-58 alternate disk reset 2-66 format desired cylinder 2-62 format desired cylinder and set bad sector flags 2-63 format drive starting at desired cylinder 2-64 format unit 2-68 initialize drive pair characteristics 2-65 park heads 2-68 read DASD type 2-67 read desired sectors into memory 2-60 read drive parameters 2-64 read status of last operation 2-60 recalibrate 2-67 reset disk system 2-59 seek 2-66 test drive ready 2-66 verify desired sectors 2-61 write desired sectors from memory 2-61

INT 14H (asynchronous communications) 2-70 extended communications port control 2-73 extended initialize 2-72 initialize the communications port 2-70 read status 2-72 receive character 2-71 send character 2-71

INT 15H (system services) 2-74 activate/deactivate internal modem power 2-81 device busy 2-93 device close 2-83

X-1S

device open 2-83 enable/disable watchdog time-out 2-102 event wait 2-84 extended memory size determine 2-89 format unit periodic interrupt 2-76 interrupt complete 2-94 joystick support 2-85 keyboard intercept 2-82 move block 2-87 pointing device BIOS interface 2-97 power-on self-tes+ error log 2-77 program termination 2-84 programmable option select

(POS) 2-102 read blocks from cassette 2-75 read system status 2-80 read/modify profiles 2-78 request system power-off 2-80 return extended BIOS data area segment address 2-96 return system configuration parameters 2-94 switch processor to protected mode 2-90 system request key pressed 2-86 turn cassette motor off 2-75 turn cassette motor on 2-74 wait 2-86 wait for external event 2-79 write blocks to cassette 2-76

INT 16H (keyboard) 2-104 extended keyboard read 2-109 extended keystroke status 2-109 extended shift status 2-110 keyboard click adjustment 2-108 keyboard read 2-106 keyboard write 2-108 keystroke status 2-106 set typematic rate 2-107 shift status 2-107

INT 17H (printer) 2-111 initialize the printer port 2-111 print character 2-111 read status 2-112 interrupt complete 2-94 interrupt sharing 4-3 implementation information 4-7 interrupt request 4-4 interrupt-sharing chaining structure and signature 4-6 interrupt-shari ng software requirements 4-4 precautions 4-3

ROM considerations 4-7 interrupts 2-3 asynchronous communications

(14H) 2-70 bootstrap loader (19H) 2-114 diskette (13H) 2-48 edge-sensitive interrupts 4-19 equipment determination

(11H) 2-46 fixed disk (13H) 2-58

I/O commands 4-20

INT 02H 2-4

INT 05H (print screen) 2-6

INT 08H (system timer) 2-7

INT 09H (keyboard) 2-8

INT 1AH (system-timer and real-time clock services) 2-115

INT 10H (video) 2-10

INT 11H (equipment determination) 2-46

INT 12H (memory size determination) 2-47

INT 13H (diskette) 2-48

INT 13H (fixed disk) 2-58

INT 14H (asynchronous communications) 2-70

INT 15H (system services) 2-74

INT 16H (keyboard) 2-104

INT 17H (printer) 2-111

INT 19H (bootstrap loader) 2-114

INT 70H (real-time clock interrupt) 2-122 keyboard (16H) 2-104

X-16

keyboard interrupt (09H) 2-8 level-sensitive interrupts 4-19 memory size determination

(12H) 2-47

NMI (02H) 2-4 nonmaskable interrupt

(02H) 2-4 print screen (05H) 2-6 printer (17H) 2-111 real-time clock (70H) 2-122 real-time clock services

(1AH) 2-115

STI instructions 4-20 system services (15H) 2-74 system timer (08H) 2-7 system-timer services

(1AH) 2-115 video (10H) 2-10 introduction 1-3

L level-sensitive interrupts 4-19 load LCD character font/set LCD high-intensity substitute 2-37

M memory size data area 3-4 memory size determination interrupt

(12H) 2-47 mode switching, video 4-15 model byte 2-95,4-18 move block 2-87 multitasking 4-16 device driver code 4-16 post 4-17 serialization 4-16 startup 4-16 time-outs, multitasking 4-17 wait 4-16,4-17

J joystick support 2-85

K keyboard click adjustment 2-108 keyboard data area 3-4, 3-9, 3-11 keyboard intercept 2-82 keyboard interrupt (09H) 2-8 keyboard interrupt (16H) 2-104 extended keyboard read 2-109 extended keystroke status 2-109 extended shift status 2-110 keyboard cl ick adjustment 2-108 keyboard read 2-106 keyboard write 2-108 keystroke status 2-106 set typematic rate 2-107 shift status 2-107 keyboard read 2-106 keyboard write 2-108 keystroke status 2-106

N

NMI (nonmaskable interrupt) 2-4 nonmaskable interrupt (02H) 2-4 o operating system function calls 4-21 p parameter passing 1-3 park heads 2-68

Pascal 4-21

PC Convertible display types 2-38 pointing device BIOS interface 2-97 power-on self-test error log 2-77 presence test, video 4-14 print character 2-111 print screen interrupt (05H) 2-6 pri nter interrupt (17H) 2-111 initialize the printer port 2-111 pri nt character 2-111

X-17

read status 2-112 printer port base address data area 3-3 printer time-out value data area 3-8 program termination 2-84 programmable option select

(POS) 2-102 programming considerations 4-21

BASIC 4-21

COBOL 4-21

FORTRAN 4-21 gap length 4-22

IBM C 4-21

Pascal 4-21

R read attribute/character at current cursor position 2-17 read blocks from cassette 2-75 read current video state 2-19 read cursor position 2-15 read DASD type 2-54, 2-67 read desired sectors into memory 2-50, 2-60 read dot 2.-19 read drive parameters 2-53, 2-64 read light pen position 2-15 read real-time clock alarm time and status 2-119 read real-time clock date 2-117 read real-time clock time 2-116 read status 2-72, 2-112 read status of last operation 2-49,

2-60 read system status 2-80 read system-timer day counter 2-119 read system-timer time counter 2-115 read/modify profiles 2-78 read/write display combination code 2-39 real-time clock data area 3-11 real-time clock interrupt

(70H) 2-122 recalibrate 2-67 receive character 2-71 request system power-off 2-80 reset disk system 2-59 reset diskette system 2-48 reset real-time clock alarm 2-118 return extended BIOS data area segment address 2-96 return functionality/state information 2-40 return physical display parameters for active display 2-38 return system configuration parameters 2-94 revision level byte 2-95, 4-18

ROM tables 1-4,3-3,3-16

RS-232-C port base address data area 3-3

RS-232-C time-out value data area 3-9 s save pointer data area 3-12 save/restore video state 2-44 scan code/character code combinations 4-24 scroll active page down 2-16 scroll active page up 2-16 secondary save pointer data area 3-13 seek 2-66 select active display page 2-16 send character 2-71 set color palette 2-18 set cursor position 2-15 set cursor type 2-14 set DASD type for format 2-55 set media type for format 2-56 set mode 2-11 set palette registers 2-20 set real-time clock activated power-on mode 2-118 set real-time clock alarm 2-118 set real-ti me clock date 2-117 set real-time clock time 2-117 set system-timer day counter 2-120

X-18

set system-timer time counter 2-116 set typematic rate 2-107 set up sound multiplexer 2-120 sharing, interrupt 4-3 implementation information 4-7 interrupt request 4-4 interrupt-sharing chaining structure and signature 4-6 interrupt-shari ng software requirements 4-4 precautions 4-3

ROM considerations 4-7 shift status 2-107

STI instructions 4-20 submodel byte 2-95, 4-18 summary of interrupt functions

INT 1AH (system-timer and real-time clock services) 2-115

INT 10H (video) 2-10

INT 13H (diskette) 2-48

INT 13H (fixed disk) 2-58

INT 14H (asynchronous communications) 2-70

INT 15H (system services) 2-74

INT 16H (keyboard) 2-104

INT 17H (printer) 2-111 switch processor to protected mode 2-90 system data area 3-7, 3-8 system equipment data area 3-4 system groups 1-5 system identification 4-18 system request key pressed 2-86 system services interrupt

(15H) 2-74 activate/deactivate internal modem power 2-81 device busy 2-93 device close 2-83 device open 2-83 enable/disable watchdog time-out 2-102 event wait 2-84 extended memory size determine 2-89 format unit periodic interrupt 2-76 interrupt complete 2-94 joystick support 2-85 keyboard intercept 2-82 move block 2-87 pointing device BIOS interface 2-97 power-on self-test error log 2-77 program termination 2-84 programmable option select

(POS) 2-102 read blocks from cassette 2-75 read system status 2-80 read/modify profiles 2-78 request system power-off 2-80 return extended BIOS data area segment address 2-96 return system configuration parameters 2-94 switch processor to protected mode 2-90 system request key pressed 2-86 turn cassette motor off 2-75 turn cassette motor on 2-74 wait 2-86 wait for external event 2-79 write blocks to cassette 2-76 system timer interrupt (08H) 2-7 system-timer and real-time clock services interrupt (1AH) 2-115 read real-time clock alarm time and status 2-119 read real-time clock date 2-117 read real-time clock time 2-116 read system-timer day counter 2-119 read system-timer time counter 2-115 reset real-time clock alarm 2-118 set real-time clock activated power-on mode 2-118 set real-time clock alarm 2-118 set real-time clock date 2-117 set real-time clock time 2-117

X-19

set system-ti mer day counter 2-120 set system-timer time counter 2-116 set up sound multiplexer 2-120 system-timer data area 3-7

T test drive ready 2-66 turn cassette motor off 2-75 turn cassette motor on 2-74 v verify desired sectors 2-51,2-61 video compatibility 4-14 mode switching 4-15 presence test 4-14 video control data area 3-6, 3-9 video interrupt (10H) 2-10 alternate select 2-32 character generator 2-24 load LCD character font/set LCD high-intensity substitute 2-37 read attribute/character at current cursor position 2-17 read current video state 2-19 read cursor position 2-15 read dot 2-19 read light pen position 2-15,

2-16 read/write display combination code 2-39 return functionality/state information 2-40 return physical display parameters for active display 2-38 save/restore video state 2-44 scroll active page down 2-16 scroll active page up 2-16 set color palette 2-18 set cursor position 2-15 set cursor type 2-14 set mode 2-11 set palette registers 2-20 write attribute/character at current cursor position 2-17 write character at current cursor position 2-18 write dot 2-18 write string 2-36 write teletype to active page 2-19 video mode switching 4-15 video modes 2-11 video presence test 4-14 w wait 2-86, 4-16 wait for external event 2-79 write attribute/character at current cursor position 2-17 write blocks to cassette 2-76 write character at current cursor position 2-18 write desired sectors from memory 2-50, 2-61 write dot 2-18 write string 2-36 write teletype to active page 2-19

X-20

- - - -

-

-

---

®

© Copyright

International Business

Machines Corporation, 1987

All Rights Reserved

Printed in the

United States of America

References in this publication to IBM products or services do not imply that IBM intends to make them available outside the United States.

84X1514

Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertisement