Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeEnglishEspañolContact

The text of a manual · part 18 of 28

PEN*KEY 6400 Computer Programmer's Reference Guide: Section 5: BIOS Interrupt Support, pages 141 to 150

Pages 141 to 150 of 234, from PEN*KEY 6400 Computer Programmer's Reference Guide

The original document is the PDF (1.4 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.

For the Intermec 6400

Page 141

BIOS Interrupt Support

SECTION 5

INT 13h, Function AH = 08h; Get Drive Parameters

BIOS Returns the parameters for the specified disk drive. On Entry: AH = 08h DL = Drive number (bit 7 set for hard disk)

On Return:

AH = Status of operation Carry = Status flag if successful: AH = 00h Carr y = 0 BL = Drive type (AT/PS2 floppies only) 01h = 360K 02h = 1.2M 03h = 720K 04h = 1.44M All others = unknown CH = Cylinder number, bits 0–7 CL bits 6, 7 = Cylinder number, bits 8, 9 bits 0–5 = Maximum sector number DH bits 6, 7 = Cylinder number, bits 10, 11 bits 0–5 = Maximum head number (range: 0 to 63) DL = Number of drives, 1 or 2 if NOT successful (but at least one drive is active) AH = 07h carry = 1 AL = CX = DX = 0 if NOT successful (no active drives, or drive number out of range) AH = 01h Carry = 1 AL = BX = CX = DX = ES = 0

" NOTE:

The maximum cylinder number must be increased by one to get the total number of cylinders, which does not include the diagnostic cylinder.

" NOTE:

The maximum head number must be increased by one to get the total number of heads on the drive (1 to 64). Error Codes: Refer to Table 5-2, Disk Status Error Codes, page 5-34, for a list of the possible error codes. See Also: Functions AH=15h, INT 1Eh, INT 41h.

" NOTE:

This function may return successful even if specified drive is greater than the number of attached drives of that type (floppy or hard). Check register DL to ensure validity.

PEN*KEYR 6400 Programmer’s Reference Guide

5-31

Page 142

SECTION 5

BIOS Interrupt Support

INT 13h, Function AH = 15h; Get Disk Type

BIOS Gets the disk type for the specified disk drive. On Entry: AH = 15h DL = Drive number (bit 7 set for hard disk)

On Return:

if successful: Carry = 0 AH = Type code 00h = No such drive 01h = Floppy without change-line support 02h = Floppy with change-line support 03h = Hard disk CX:DX = Number 512-byte sectors (If AH = 03h) if NOT successful Carry = 1 AH = Status of operation

Error Codes: Refer to Table 5-2, Disk Status Error Codes, page 5-34, for a list of the possible error codes. See Also: Functions AH=08h, AH=16h, AH=17h. INT 13h, Function AH = 16h; Detect Disk Change

BIOS Detects if a change has occurred with floppy disk in the specified disk drive. On Entry: AH = 16h DL = Drive number (bit 7 set for hard disk)

On Return:

if successful: Carry = 0 (if change line not active) AH = 00h (disk not changed) if NOT successful: Carry = 1 (if change line is active) AH = Status 06h = change line active or not supported (See Note, below) 80h = Drive not ready or not present

Note: Call AH=15h first, to determine whether the drive supports a change line. See Also: Functions AH=15h.

5-32

PEN*KEYR 6400 Programmer’s Reference Guide

Page 143

BIOS Interrupt Support

SECTION 5

INT 13h, Function AH = 17h; Set Disk Type for Format (floppy disk)

BIOS Sets the specified format type for the floppy disk in the specified disk drive. On Entry: AH = 17h AL = Format type 01h = 320KB / 360KB disk in 360KB drive 02h = 320KB / 360KB disk in 1.2MB drive 03h = 1.2MB in 1.2MB drive 04h = 720KB disk in 720KB drive DL = Drive number (bit 7 set for hard disk)

On Return:

if successful: Carry = 0 AH = 00h if NOT successful: Carry = 1 AH = Error code

Error Codes: Refer to Table 5-2, Disk Status Error Codes, page 5-34, for a list of the possible error codes. See Also: Functions AH=15h, AH=18h. " NOTE:

This function does not handle 1.44MB drives. Use AH=18h, instead. INT 13h, Function AH = 18h; Set Media Type for Format

BIOS Sets the specified media type for the specified disk drive. On Entry:

AH = 18h DL = Drive number (bit 7 set for hard disk) CH = Lower 8 bits of highest cylinder number (one cylinder) CL = Sectors per track (bits 0–5), top 2 bits (6,7) of highest cylinder number

On Return:

AH = Status 00h = Requested combination supported 01h = Function not available 0Ch = Not supported or drive type unknown 80h = There is no disk in the drive

See Also: Functions AH=05h, AH=07h, AH=17h.

PEN*KEYR 6400 Programmer’s Reference Guide

5-33

Page 144

SECTION 5

BIOS Interrupt Support

Disk Services Return Status Any of the following error codes could be returned for any of the disk services in this set of services (INT 13): Table 5-2 Disk Status Error Codes

5-34

Status

Description

00h 01h 02h 03h 04h

Successful completion Invalid function in AH or invalid parameter Address mark not found Disk write protected (floppy) Sector not found

05h 06h 07h 08h 09h

Reset failed (hard disk) Disk changed (floppy) Drive parameter activity failed (hard disk) DMA overrun Attempted DMA across 64K boundary

0Ah 0Bh 0Ch 0Dh 0Eh

Bad sector detected (hard disk) Bad track detected (hard disk) Unsupported track or invalid media Invalid number of sectors on format (hard disk) Control data address mark detected (hard disk)

0Fh 10h 11h 20h 40h

DMA arbitration level out of range (hard disk) Uncorrectable CRC or ECC error on read Data ECC corrected (hard disk) Controller failure Seek failed

80h AAh BBh CCh E0h FFh

Timeout not ready Drive not ready (hard disk) Undefined error (hard disk) Write fault (hard disk) Status register error (hard disk) Sense operation failed (hard disk)

PEN*KEYR 6400 Programmer’s Reference Guide

Page 145

BIOS Interrupt Support

SECTION 5

INT 13h, NORAND Extensions INT 13h, Function AH = DAh; Disable Access to RAM Drive Memory

BIOS Disables all access to the RAM drive memory, by reprogramming the memory controller to disable access to the RAM associated with the RAM drive. On Entry: AH = 0DAh DL = 00h

On Return: AH = 00h

INT 13h, Function AH = EAh; Enable Access to RAM Drive Memory

BIOS Enables all access to the RAM drive memory, by reprogramming the memory controller to enable access to the RAM associated with the RAM drive. On Entry: AH = 0EAh DL = 00h

On Return: AH = 00h

INT 13h, Function AH = ECh; Enable Checksum of RAM Drive Integrity Memory

BIOS Enables the checksum of the RAM drive memory. On Entry:

AH = 0ECh ES:SI = Pointer to Global Descriptor Table (GDT) offset 00h = uninitialized, null descriptor offset 08h = uninitialized, will be made into GDT descriptor offset 10h = uninitialized, descriptor for source of move offset 18h = uninitialized, descriptor for destination of move offset 20h = uninitialized, used by BIOS offset 28h = uninitialized, made into SS descriptor

On Return: if successful: Carry = 0 AH = 00h if NOT successful: Carry = 1 AH = Status of operation 01h = Parity error 02h = Interrupt error 03h = Address line 20 gating failed

PEN*KEYR 6400 Programmer’s Reference Guide

5-35

Page 146

SECTION 5

BIOS Interrupt Support

INT 14h, Communications Services INT 14h, Function AH = 00h; Initialize Communications Port

BIOS Programs the Baud Rate Register and Byte Format Register for the selected port, and returns Line Status Register value and Modem Status Register value. It enables UART power on the intercept, then passes the call on to the BIOS interrupt 14h entry point for initialization. On Entry: AH = 00h DX = Communications port number AL = Initialization parameters Bits 0–1: Word Length 10b = 7 bits 11b = 8 bits Bit 2: Stop Bits 00b = One 01b = Two Bits 3–4: Parity 00b = None 01b = Odd 10b = None 11b = Even Bits 5–7: Baud Rate 000b = 110 001b = 150 010b = 300 011b = 600 100b = 1200 101b = 2400 110b = 4800 111b = 9600

On Return:

AH = Line status register AL = Modem status register

Error Codes: Refer to Table 5-3, Line Status Register Values (page 5-40), and Table 5-4, Modem Status Register Values (page 5-40), for a list of the bit values.

5-36

PEN*KEYR 6400 Programmer’s Reference Guide

Page 147

BIOS Interrupt Support

SECTION 5

INT 14h, Function AH = 01h; Transmit a Character

BIOS Transmits the character through the specified communications port, which raises DTR and RTS. DSR and CTS are expected within a timeout period specified by an array at 40:7C. Once DSR and CTS are received, the character to be sent is placed in the transmit buffer register. On Entry:

AH = 01h DX = Communications port number AL = Character to be sent

On Return:

AH = Line status register AL = Modem status register

Error Codes: Refer to Table 5-3, Line Status Register Values (page 5-40), and Table 5-4, Modem Status Register Values (page 5-40), for a list of the bit values. INT 14h, Function AH = 02h; Receive a Character

BIOS Receives a character through the specified communications port, which raises DTR and drops RTS. DSR is expected within a timeout period specified by an array at 40:7C. Once DSR is received, a character is expected in the receive buffer within the timeout period. If a timeout occurs, the timeout bit is put into register AH. If a character is received before the timeout, it is returned in register AL. On Entry:

AH = 02h DX = Communications port number

On Return:

AH = Line status register AL = Character received

Error Codes: Refer to Table 5-3, Line Status Register Values (page 5-40), for a list of the bit values. INT 14h, Function AH = 03h; Read Communications Port Status

BIOS Returns current line and modem status for the specified communications port. On Entry:

AH = 03h DX = Communications port number

On Return:

AH = Line status register AL = Modem status register

Error Codes: Refer to Table 5-3, Line Status Register Values (page 5-40), and Table 5-4, Modem Status Register Values (page 5-40), for a list of the bit values. PEN*KEYR 6400 Programmer’s Reference Guide

5-37

Page 148

SECTION 5

BIOS Interrupt Support

INT 14h, Function AH = 04h; Extended Initialize

BIOS Programs the Baud Rate Register and Byte Format Register for the selected port, and returns values of the Line Status Register and Modem Status Register. It enables UART power on the intercept, then passes the call on to the BIOS interrupt 14h entry point for initialization. On Entry: AH = 04h DX = Communications port number (available port numbers: 0, 1, 2) BH = Parity 00h = None 01h = Odd 02h = Even BL = Stop Bits 00h = One 01h = Two CH = Word Length 02h = 7 bits 03h = 8 bits CL = Baud Rate (this parameter is used as an index into the following table) 00h = 110 01h = 150 02h = 300 03h = 600 04h = 1200 05h = 2400 06h = 4800 07h = 9600 08h = 19,200 09h = 38,400 0Ah = 57,600 0Bh = 115,200

On Return:

AH = Line status register AL = Modem status register

Error Codes: Refer to Table 5-3, Line Status Register Values (page 5-40), and Table 5-4, Modem Status Register Values (page 5-40), for a list of the bit values. " NOTE:

5-38

This is a nonstandard PC function. It may not be available in every PC BIOS. Use caution where portability is a concern.

PEN*KEYR 6400 Programmer’s Reference Guide

Page 149

BIOS Interrupt Support

SECTION 5

INT 14h, Function AX = 0500h; Read Modem Control Port

BIOS Reads information from the modem control register. On Entry: AH = 05h AL = 00h (read modem control register) DX = Communications port number (available port numbers: 0, 1, 2)

On Return:

BL = Modem control information bit 7: Ignore modem control signals, COM1 only bit 1: Request To Send (RTS) bit 0: Data Terminal Ready (DTR) AH = Line status register AL = Modem status register

Error Codes: Refer to Table 5-3, Line Status Register Values (page 5-40), and Table 5-4, Modem Status Register Values (page 5-40), for a list of the bit values. INT 14h, Function AX = 0501h; Write Modem Control Port

BIOS Writes the specified information to the modem control register. On Entry: AH = 05h AL = 01h (write to modem control register) DX = Communications port number (available port numbers: 0, 1, 2) BL = Modem control register value bit 7: Ignore modem control signals, COM1 only bit 1: Request To Send (RTS) bit 0: Data Terminal Ready (DTR)

On Return:

AH = Line status register AL = Modem status register

Error Codes: Refer to Table 5-3, Line Status Register Values (page 5-40), and Table 5-4, Modem Status Register Values (page 5-40), for a list of the bit values. " NOTE:

This is a nonstandard PC function. It may not be available in every PC BIOS. Use caution where portability is a concern.

PEN*KEYR 6400 Programmer’s Reference Guide

5-39

Page 150

SECTION 5

BIOS Interrupt Support

Bit Values for Status Registers Table 5-3 Line Status Register Values

Bit

Description

7 6 5 4 3 2 1 0

Timeout (if set, other bits are meaningless) Transmit shift register empty Transmit holding register empty Unused (break detected) Framing error Parity error Overrun error Data ready Table 5-4 Modem Status Register Values

5-40

Bit

Description (Signal)

7 6 5 4 3 2 1 0

Carrier Detect (CD) Ring Indicator (RI) Data Set Ready (DSR) Clear To Send (CTR) Delta Carrier Detect (DCD) Delta Trailing Edge Ring Indicator Delta Data Set Ready Delta Clear To Send

PEN*KEYR 6400 Programmer’s Reference Guide