Chapter 4 – Programming
4-8
Calling Conventions
The PCI BIOS functions preserve all registers and flags except those used for return
parameters. The Carry Flag [CF] will be altered as shown to indicate completion status.
The calling routine will be returned to with the interrupt flag unmodified and interrupts
will not be enabled during function execution. These routines, which are re-entrant,
require 1024 bytes of stack space and the stack segment must be the same size (i.e., 16 or
32 bit) as the code segment.
The PCI BIOS provides a 16-bit real and protect mode interface and a 32-bit protect
mode interface.
16-Bit Interface
The Int 1Ah software interrupt provides the 16-bit interface. The PCI BIOS Int 1Ah
interface operates in either real mode, virtual-86 mode, or 16:16 protect mode. The Int
1Ah entry point supports 16-bit code only.
32-Bit Interface
The protected mode interface supports 32-bit protect mode callers. You can access the
protected mode PCI BIOS interface by calling through a protected mode entry point in
the PCI BIOS. The BIOS32 Service Directory provides the entry point and information
needed for building the segment descriptors. Thirty-two-bit callers invoke the PCI BIOS
routines using CALL FAR.
The BIOS32 Service Directory is implemented in the BIOS in a contiguous 16-byte data
structure, beginning on a 16-byte boundary somewhere in the physical address range
0E00000h-0FFFFFh. The address range should be scanned for the following valid,
checksummed data structure containing the following fields:
Offset
Size
Description
0
4 bytes
Signature string in ASCII. The string is “_32_”. This puts an
“underscore” at offset 0, a “3” at offset 1, a “2” at offset 2, and
another “underscore” at offset 3.
4
4 bytes
Entry point for the BIOS32 Service Directory. This is a 32-bit
physical address.
8
1 byte
Revision level.
9
1 byte
Length of the data structure in 16-byte increments. (This data
structure is 16 bytes long, so this field contains 01h.)
0Ah
1 byte
Checksum. This field is the checksum of the complete data
structure. The sum of all bytes must add up to 0.
0Bh
5 bytes
Reserved. Must be zero.
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com