home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Unsorted BBS Collection
/
thegreatunsorted.tar
/
thegreatunsorted
/
programming
/
misc_programming
/
int15.spc
< prev
next >
Wrap
Text File
|
1990-01-04
|
80KB
|
1,621 lines
Specification of system service (INT 15h)
-----------------------------------------
a. System service
*(ah) = 40h Read/Modify profiles
*(ah) = 41h Wait for External Event
*(ah) = 42h Request system power off (system suspend)
*(ah) = 43h Read current system status information
*(ah) = 44h Modem power on/off
(ah) = 4fh keyboard intercept (null)
(ah) = 80h reserved
(ah) = 81h reserved
(ah) = 82h reserved
(ah) = 83h Event Wait
(ah) = 84h joystick support
(ah) = 85h system request key pressed
(ah) = 86h wait
(ah) = 87h Block Move
(ah) = 88h Extended Memory Size Determined
(ah) = 89h Switch Processor to Protected Mode
(ah) = 90h device busy
(ah) = 91h interrupt complete
(ah) = c0h return system configuration parameters
(ah) = c1h Return extended BIOS data area segment address
(ah) = c2h Pointing device BIOS interface
(ah) = c3h Fail_save timer/Watchdog timeout(EISA/PS2 only)
(ah) = d8h R/W slot configuration from COMS (EISA only)
NOTE:
1. Function AH = 40 - 44h is supported by Acer Laptop machine.
2. Function C3h is fail_save timer on EISA and is watchdog
time-out on Acer 1080 model (PS/2).
3. Function D8h is supported on EISA model only.
4. To support external event wait function, the feature
information byte (offset = 05h)of system configuration
table must set bit 3 = 1. ( refer to system configuration
table )
5. The Acer extened function include setup, speed control,
shadow RAM control, and return system model ID is supported
by function C0h. ( refer to function C0h )
b. Reference BIOS data area:
40:67 Offset of shutdown address(user program)
40:69 Segment of shutdown address(user program)
40:98 offset of user wait flag
40:9a segment of user wait flag
40:9c low word of user wait count
40:9e high word of user wait count
40:a0 wait active flag
c. I/O port defined:
60 Input/Output Buffer for Keyboard and Auxiliary
Device
64 8042 Command/Status Port (WRITE/READ)
61 (write) Syatem control port
bit 7-4 Reserved
bit 3 -- Enable Channel check (0)
bit 2 -- Enable Parity check (0)
bit 1 -- Speaker data enable (1)
bit 0 -- Enable Timer 2 gate to speaker (1)
61 (read) Syatem control port B
bit 7 -- Parity check error occurs (1)
bit 6 -- Channel check error occurs (1)
bit 5 -- Timer 2 output
bit 3 -- Channel check enabled (0)
bit 2 -- Parity check enabled (0)
bit 1 -- Speaker data enabled (1)
bit 0 -- Timer 2 gate to speaker
201 Game port
d. Function:
READ/MODIFY PROFILE
(1100LX Laptop model)
Description:
This function is used to read and modify system profile
information. It is supported only for Acer 1100LX laptop
systems to get or modify the status of modem available on
battery used, low battery, power saving, and sleep mode
enable or disable. It supports also to get or change the
inactive timer of Hard Disk, LCD, and Standby mode if the
system supports these function.
input:
AH = 40h
AL = 00h Read system profile
output:
CX,BX -- contains system profile information
AL = 01h Modify system profile
input:
CX,BX -- contains system profile information
AL = 02h Read modem profile
output:
CX,BX -- contains system profile information
AL = 03h Modify modem profile
input:
CX,BX -- contains system profile information
output: for all
AL -- 00 Operation successfully completed
80 Profile execution failed
CF -- 0 Operation successfully completed
1 Profile execution failed
Reference :
Index Register in CMOS
11h Modem Profile Information
Bit Meaning
7 - 6 Reserved
5 -- 0 = Manual answer
1 = auto answer
4 - 2 Parity / Framing
1 - 0 Data rate
-- To be continue --
13h System Profile Information
Bit Meaning
7 -- Modem available on battery
6 -- Low battery warning enable
5 -- Power saving enable
4 -- Sleep mode enable
3 - 0 reserved
1bh Hard disk inactive time (in minute)
1ch Screen inactive time (in minute)
1dh System standby time (in minute)
BH :
Bit Meaning
7 -- Modem available on battery
6 -- Low battery warning enable
5 -- Power saving enable
4 -- Standby enable
3 - 0 reserved
BL : Hard disk inactive time (in minutes, 0 disable power
off)
CH : Screen inactive time (in minutes, 0 disable power off)
CL : System standby time (in minute, 0 disable power off)
REQUEST SYSTEM POWER_OFF (Sleep Mode)
(1100LX Laptop model)
Description:
This routine forces the system into standby mode.
input:
ah = 42h
AL = 01h - Force system into standby mode
output:
The system in standby mode
SYSTEM STATUS SERVICES
(1100LX Laptop model)
Description:
1.This routine returns the current system status in the AL register
as defined below.
input:
ah = 43h
output:
AL - Contains system status as follows:
---------------------------------
│ 7 │ 6 │ 5 │ 4 │ 3 │ 2 │ 1 │ 0 │
---------------------------------
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ ----> LCD detached
│ │ │ │ │ │ ----> Reserved
│ │ │ │ │ ----> Reserved
│ │ │ │ ----> MODEM power on
│ │ │ ----> Power activated by RTC alarm
│ │ ----> Sleep mode power lost (RTC time bad)
│ ----> Operating on external power
----> Low battery
MODEM POWER SERVICES
( For 1100LX Laptop model )
Description:
1.This procedure turns on or off the MODEM
input:
ah = 44h
al = 00h - Power off internal MODEM
01h - Power on internal MODEM
output:
al = 00 - successful
80 - not successful
CF = 0 - successful
1 - not successful
KEYBOARD INTERCEPT (NULL)
Description:
This function is not supported as yet.
input:
(ah) = 4fh
output:
(cy) = 1
(ah) = 86h
(al) = scan code
DEVICE OPEN (NULL)
Description:
This function is not supported as yet.
input:
(ah) = 80h
(bx) = device ID
(cx) = process ID
output:
(cy) = 1
(ah) = 80h
DEVICE CLOSE (NULL)
Description:
This function is not supported as yet.
input:
(ah) = 81h
(bx) = device ID
(cx) = process ID
output:
(cy) = 1
(ah) = 81h
PROGRAM TERMINATION (NULL)
Description:
This function is not supported as yet.
input:
(ah) = 82h
(bx) = device ID
output:
(cy) = 1
(ah) = 82h
EVENT WAIT
Description :
1.This routine is supported for the user to set a time interval,
and it will set the given data into BIOS data area respectively
if this function is not busy. There is a hardware RTC interrupt
occurs periodically and decounts the time interval. When the time
interval expires, the hardware RTC interrupt sets flag into the
byte assigned by the user. In this way, the user can know whether
the time is up by scanning the flag contiguously, and do something
he wants to do at that time.
2.If the user have called this function previosly and the time
interval dose not expire yet, he calls this routine once more,
then this routine will do nothing but set carry flag and return,so
he will receive 'function busy' message in the return carry flag.
3.When the user issues "Cancel set interval" function, the busy flag
is cleared, and the user can perform "Set interval" function and
don't care whether the previous time interval expires or not.
input:
(ah) = 83h
(al) = 00h Set interval
CX,DX -- Time interval in microseconds
(Granularity is 976 microseconds, CX is high word
and DX is low word. If CX = 0012h and DX = 3456h,
the time interval is Hex 123456 microseconds.)
ES:BX -- Pointer to byte that caller wants to set
flag at the most significant bit after
time interval expires.
output:
CF = 0 -- Operation is successfully completed
= 1 -- Function busy, operation is unsuccessful
input:
(ah) = 83h
(al) = 01h Cancel set interval
output:
CF = 0 -- Operation is successfully completed
= 1 -- Function busy, operation is unsuccessful
input:
(ah) = 83h
(al) > 01h Illegal function
output:
CF = 1
JOYSTICK SUPPORT
description:
This routine supports an interface between
joystick and system.
input:
(ah) = 84h
(dx) = 0 read current switch settings
output:
(cy) = 1 if invalid call
(al) = switch setting (bit 7-4)
input:
(ah) = 84h
(dx) = 01H read resistive inputs
output:
(cy) = 1 if invalid call
(ax) = A(x) value
(bx) = B(x) value
(cx) = C(x) value
(dx) = D(x) value
SYSTEM REQUEST KEY PRESSED (NULL)
Description:
This function is not supported as yet.
input:
(ah) = 85h
output:
(cy) = 1
(ah) = 86h
WAIT
Description:
This routine will perform "wait" until the given time expires.
input:
(ah) = 86h
(cx,dx) = number of microseconds to elapse before
return to caller
output:
CF = 0 -- Operation is successfully completed
= 1 -- Function busy, operation is unsuccessful
BLOCK MOVE
Description:
1.This function will help you to move a block of memory below 1M
up to memory above 1M.
2.The prerequsite to access the memory above 1M is entering
into protected mode, so the user must prepare a GDT table when
calling this function.
3.To return to real mode, the shutdown 9 should be issued after move
block function is completed.
input:
(ah) = 87h
(cx) = word count of this block
ES:SI -- pointer to GDT (Global Descripter Table)
output:
(ah) = 00h -- Operation successfully completed
(ah) = 01h -- RAM parity error
(ah) = 02h -- Unexpected exception occur
(ah) = 03h -- Gate A20 address line failed
The GDT is defined as follows:
┌─────────┐
v │
ES:SI ──── ┌─────┴─────┐ │
│ │ │
│ Dummy │ │
│ │ │
+08 ├───────────┤ │
│ │ │
│ GDT │ │
│ Location ├───┘
+10 ├───────────┤
│ │
│ Source │
│ Entry │
+18 ├───────────┤
│ │
│ Target │
│ Entry │
+20 ├───────────┤
│ │
│ BIOS │
│ CS │
+28 ├───────────┤
│ │
│ SS │
│ │
└───────────┘
-- To be continue --
. Every entry contains 8 bytes.
. The 1'st entry supported by the user must be initialized to 0.
. The 2'nd entry, initialized to 0 by the user and modified by
the BIOS, points to the GDT (Global Descriptor Table).
. The 3'rd entry, initialized by the user, points to the source
to be moved.
. The 4'rd entry, initialized by the user, points to the
destination to be moved.
. The 5'th entry, initialized to 0 by the user and modified by
the BIOS, points to the protected mode code segment.
. The 6'th entry, initialized to 0 by the user and modified by
the BIOS, points to the protected mode stack segment.
Note:
1. All interrupts (including NMI) are disable when this
routine is moving block.
2. A20 must be activated (=1) when it enters protected mode,
and disactivated when it shutdown.
EXTENDED MEMORY SIZE DETERMINED
Description:
This function will retern the memory size above 1M, as determined by
the POST.
input:
ah = 88h
output:
ax = contiguous 1KB blocks of memory available above 1M
SWITCH PROCESSOR TO PROTECTED MODE
Description:
This function supports the user to switch the processor from real
mode into protected mode. Upon completion, the processor is in
protected mode and control is transferred to the code segment
specified by the user.
input:
ah = 89h
bh = index of interrupt level 1
bl = index of interrupt level 2
ES:SI -- pointer to GDT
output:
ah = 00h operation successfully completed
The GDT is defined as follows:
┌─────────┐
v │
ES:SI ──── ┌─────┴─────┐ │
│ │ │
│ Dummy │ │
│ │ │
+08 ├───────────┤ │
│ │ │
│ GDT │ │
│ Location ├───┘
+10 ├───────────┤
│ │
│ IDT │
│ LOCATION │
+18 ├───────────┤
│ │
│ user DS │
│ │
+20 ├───────────┤
│ │
│ user ES │
│ │
+28 ├───────────┤
│ │
│ user SS │
│ │
+30 ├───────────┤
│ │
│ user CS │
│ │
+38 ├───────────┤
│ │
│ BIOS CS │
│ │
└───────────┘
-- To be continue --
. Every entry contains 8 bytes.
. The 1'st entry supported by the user must be initialized to 0.
. The 2'nd entry, initialized the user, points to the GDT.
. The 3'rd entry, initialized by the user, points to the user
defined IDT (Interrupt Descriptor Table).
. The 4'rd entry, initialized by the user, points to the user DS.
. The 5'th entry, initialized by the user, points to the user ES.
. The 6'th entry, initialized by the user, points to the user SS.
. The 7'th entry, initialized by the user, points to the user CS.
. The 8'th entry, build by the BIOS, points to the BIOS code
segment and can be reused by the user.
DEVICE BUSY
Description:
This routine is called to indicate that a device is busy. For the
device type = diskette, a return is not made until a diskette
interrupt has been received or 2 seconds have elapsed ( whichever
is first ). For the device type = keyboard a return will not be made
until the keyboard buffer is in a not empty condition.
input:
(ah) = 90h
(al) = type code
= 00 - Disk (time-out)
= 01 - Diskette (time-out)
= 02 - Keyboard (no time-out)
= 03 - Pointing device (no time-out)
= 80 - Network (no time-out)
(ES:BX) = Network control block(NCB)
= FD - Wait for motor startup
= FE - Printer (time-out)
output:
(cy) = 0
(ah) = 90h
INTERRUPT CPMPLETE
Description:
This function is not supported as yet.
input:
(ah) = 91h
output:
(ah) = 91h
(cy) = 1
RETURN SYSTEM CONFIGURATION PARAMETERS
Description:
This routine will tell you the information about the model of this
machine, the BIOS revision level, and some hardware feature.
input:
(ah) = c0h
output:
(ah) = 0
(es:bx) = pointer to system descriptor vector in ROM
(cy) = 0
Output: AH = 0
ES:BX -- system configuration parameter table
CF = 0
System descriptor table:
offset size description
---------------------------------------------------------------------
00h word length of descriptor in bytes (minimum is 8 bytes)
02h byte model byte
XT = 0FEh
XT = 0FBh
AT = 0FCh
XT 286 = 0FCh
PC Convertible = 0F9h
PS/2 80 = 0F8h
Unknow system = 0FFh
03h byte Submodel byte
XT = 00h
AT = 01h
XT 286 = 02h
PC Convertible = 00h
PS/2 80 = 00h
Unknow system = 0FFh
04h byte BIOS revision level (= 00h)
05h byte feature information byte 1 (= 0f6h)
bit 7 = 1 Fixed disk BIOS uses DMA channel 3
bit 6 = 1 two interrupt controller
bit 5 = 1 real-time clock present
bit 4 = 1 keyboard escape sequence (INT 15)call
in keyboard interrrupt(INT 09)
bit 3 = 0 wait for external event not support
bit 2 = 1 extended BIOS data area is allocated
bit 1 = 1 microchannel implemented
bit 0 = 0 reserved
-- to be continued --
06h byte feature information byte 2 - reserved = 0
07h byte feature information byte 3 - reserved = 0
08h byte feature information byte 4 - reserved = 0
09h byte feature information byte 5 - reserved = 0
0Ah byte 'ACER ' ACER mark for extend
function
24h byte '80X86 ACER BIOS VX.XX' ---> BIOS title
39h byte '.XXXXX.XX' ---------------> Model ID
42h byte 0,'XXX' -------------------> CPU type
46h byte 'XX' ----------------------> Max speed of processor
ACER EXTENSIVE FUNCTION
input:
AH = 0C0h
CX:DX = 'ACER' ---> Acer mark
BX = 0 -- get bios message table
return ES:BX - pointer of BIOS message table
BIOS message table:
offset size description
--------------------------------------------
00h byte BIOS ID
03h byte Sub ID of BIOS
04h byte CPU type ex. i386 = 80386
0Ah byte Maxinum speed of processor
0Ch byte Version no. of BIOS
11h byte Release date of BIOS
19h byte Reserved = 0
1 -- setup
2 -- get/set system speed
AL = 0 -- get current system speed
return : AL = 0 -- low spped
= 1 -- high speed
AL = 1 -- set high speed
AL = 2 -- set low speed
AL = 3 -- toggle speed
3 -- enable/disable RAM BIOS
AL = 0 -- enable RAM BIOS
AL = 1 -- disable RAM BIOS
4 -- setup (For ICL issue setup under OS/2)
5 -- return Acer model ID
return : ES:BX = pointer of Acer Model ID
Model ID format :
byte 0 - 2 = OEM ID
3,4 = Model
POINTING DEVICE
Description:
This function supports envirnment establishing for pointing device
(such as "MOUSE"). It can facilitate the system programmer to
implement a MOUSE driver.
When the device driver is called the following information is on
the stack (each entry is word length):
entry description
-------------------------------------------------------
1 status(high byte = 0)
low byte is defined as :
bit 7 1 = Y data overflow
bit 6 1 = X data overflow
bit 5 Y data, 1 = negative
bit 4 X data, 0 = positive
bit 3,2 reserved
bit 1 1 = right button pressed
bit 0 1 = left button pressed
2 X data (high byte = 0)
low byte bit 7 MSB, bit 0 LSB
3 Y data (high byte = 0)
low byte bit 7 MSB, bit 0 LSB
4 Z data (high byte = 0)
low byte = 0.
Note:
For all functions of the pointing device, the output is as follows:
(cy) = 0 -- operation successfully completed
= 1 -- unsuccesful operation
(ah) = status
00 - no error
01 - invalid function call
02 - invalid function input
03 - error
04 - reserved
05 - no far call installed
06 - reserved
ENABLE OR DISABLE POINTING DEVICE
input:
(ah) = c2h
(al) = 0
(bh) = 0 disable the pointing device
= 1 enable the pointing device
> 1 Invalid function call
output: See the note as described above.
-- to be continued --
RESET POINTING DEVICE
input:
(ah) = c2h
(al) = 1
output: See the note as described above.
bx = device ID if operation is successful
Note :
After being reseted, the pointing device situation is
described as following:
. It is disabled unless the flag of pointing device
interface initialization sets.
. Sample rate at 100 reports/sec
. Resolution at 4 counts/milimeter
. Scaling at 1 to 1
. Package size remain unchanged
SET SAMPLE RATE
input:
(ah) = c2h
(al) = 2
(bh) = rate value
= 0 - 10 reports/sec
= 1 - 20 reports/sec
= 2 - 40 reports/sec
= 3 - 60 reports/sec
= 4 - 80 reports/sec
= 5 -100 reports/sec
= 6 -200 reports/sec
> 6 -Invalid input
output: See the note as described above.
SET RESOLUTION
input:
(ah) = c2h
(al) = 3
(bh) - resolution value
= 0 - 1 count /mm
= 1 - 2 counts/mm
= 2 - 4 counts/mm
= 3 - 8 counts/mm
> 3 - Invalid input
output: See the note as described above.
READ DEVICE TYPE
input:
(ah) = c2h
(al) = 4
output: See the note as described above.
If operation is successfully completed then
(bh) = device ID
-- to be continued --
INITIALIZATION
input:
(ah) = c2h
(al) = 5
(bh) - data package size
= 1 - 1 byte
= 2 - 2 bytes
= 3 - 3 bytes
= 4 - 4 bytes
= 5 - 5 bytes
= 6 - 6 bytes
= 7 - 7 bytes
= 8 - 8 bytes
> 8 - Invalid input
output: See the note as described above.
The pointing device state is as follows:
. Disabled
. Sample rate at 100 reports/sec
. Resolution at 4 counts/milimeter
. Scaling at 1 to 1
EXTENDED COMMAND
input:
(ah) = c2h
(al) = 6
(bh) = 0 return status
output: See the note as described above.
If operation is successfully completed then
(bl) - status byte 1
bit 7 = 0 - reserved
bit 6 = 0 - stream mode
= 1 - remote mode
bit 5 = 1 - pointer enable
bit 4 = 0 - 1:1 scaling
= 1 - 2:1 scaling
bit 3 = 0 - reserved
bit 2 = 1 - left butten pressed
bit 1 = 0 - reserved
bit 0 = 1 - right butten pressed
(cl) - status byte 2
00 - 1 count /mm
01 - 2 counts/mm
02 - 4 counts/mm
03 - 8 counts/mm
-- to be continued --
(dl) - status byte 3
0a - 10 reports/sec
14 - 20 reports/sec
2b - 40 reports/sec
3c - 60 reports/sec
50 - 80 reports/sec
64 -100 reports/sec
c8 -200 reports/sec
input:
(ah) = c2h
(al) = 6
(bh) = 1 set scaling to 1:1
output: See the note as described above.
input:
(ah) = c2h
(al) = 6
(bh) = 2 set scaling to 2:1
output: See the note as described above.
input:
(ah) = c2h
(al) = 6
(bh) > 2 Illegal function call
output: See the note as described above.
DEVICE DRIVER FAR CALL
input:
(ah) = c2h
(al) = 7
(es) = segment pointer
(bx) = offset pointer
output:
none
If BIOS has the device driver and INT 15H is issued to set the
segment and offset of the device driver far call, the folowing
information is available 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
-- to be continued --
Programming:
1. Command 8042 to write to auxiliary device (Command byte = 0D4h)
2. Output pointing device command defined as below :
pointing device command:
0f4h ----> enable mouse
0f5h ----> disable mouse
0ffh ----> reset mouse
0f3h ----> set sample rate
next command:
00ah --- 10 reports per second
014h --- 20 reports per second
028h --- 40 reports per second
03ch --- 60 reports per second
050h --- 80 reports per second
064h --- 100 reports per second
0c8h --- 200 reports per second
0f2h ----> read ID
0e9h ----> return status
0e6h ----> set scaling to 1:1
0e7h ----> set scaling to 2:1
0e8h ----> set resolution
next command:
000h --- 1 count per millimeter
001h --- 2 counts per millimeter
002h --- 4 counts per millimeter
003h --- 8 counts per millimeter
WATCHDOG TIME-OUT (PS/2 only)
Description:
This routine will enable/disabl watchdog time-out
input:
(ah) = c3h
(al) = 0 -- disable fail save timer
(al) = 1 -- enable fail save timer
(bx) -- timer value
output:
(cy) = 0 -- successful
(cy) = 1 -- unsuccessful
FAIL_SAVE TIMER (for EISA only)
Description:
This routine will enable/disabl fail_save timer
input:
(ah) = c3h
(al) = 0 -- disable fail save timer
(al) = 1 -- enable fail save timer
(bx) -- timer value
output:
(cy) = 0 -- successful
(cy) = 1 -- unsuccessful
NOTE :
Watchdog time-out is supported by Acer 1080
Fail save timer is supported by Acer EISA486
RESERVED (NULL)
input:
(ah) = 00h - 03h
06h - 20h
22h - 4eh
50h - 7fh
8Ah - 8Fh
92h - BFh
C4h - D7h
D9h - FFh
output:
(cy) = 1
(ah) = 86h - Invalid function
R/W SLOT CONFIGURATION FROM CMOS (EISA only)
There are 4 subfunction for EISA system to support automatic
hardware configuration in this function. Both subfunction 02h and
03h are called by setup utility to initialize CMOS. One routine
clears CMOS and the other stores configuration information into
CMOS. Device drivers and the POST routine use other subfunctions
to retrieve configuration information from CMOS. One subfunction
returnss a subset of the configuration information stored in CMOS
for one expansion board. The other subfunction returns all the
configuration information about one expansion board function.
This function is bimodal (real or protected mode) and may be
called for execution as 32- or 16-bit code. So this function must be
adhere to the following conventions when you implement.
* Do not perform any segment register-dependent operations (all
branch instructions are relative to the instruction pointer)
* Do not change the segment registers(including the code segment)
* Return to calling routine with the interrupt flag numodified.
* Do not use privileged instructions (LMSW, LSL, etc)
* Do not write data using a code segment (CS) override
Subfunction 00h : Read slot configuration information
This subfunction reads a subset of the configuration for one slot
from CMOS. The subfunction returns a summary that includes all functions
of expansion board.
input:
(ah) = d8h
(al) = 00h (If CS and DS specify 16-bit addressing and data
size)
(al) = 80h (If CS and DS specify 32-bit addressing and data
size)
(cl) = slot No (including embedded and virtual devices)
output:
(ah) = 00h - Successful completion; Carry Flag = 0.
= 80h - Invalid slot No; Carry Flag = 1.
= 82h - CMOS corrupt; Carry Flag = 1.
= 83h - Empty slot; Carry Flag = 1.
= 86h - Invalid BIOS routine call; Carry Flag = 1.
= 87h - Invalid system configuration; Carry Flag = 1.
(Even though this error occurs, the data is
returned in AL)
-- to be continued --
(al) =
bit 0-3 - Duplicate ID No.
(This nibble indicates which CFG file is
loaded when duplicate file names are
present.)
0000 if no duplicate ID.
0001 if 1st duplicate ID.
...
1111 if 15th duplicate ID.
bit 4,5 - Slot type.
00 = Expansion slot.
01 = Embedded device.
10 = Virtual device.
11 = Reserved.
bit 6 - Product ID.
0 = readable
1 = not readable
bit 7 - Duplicate ID
0 = No duplicate ID.
1 = Duplicate IDs.
(bh) = Major revision level of setup utility.
(bl) = Minor revision level of setup utility.
(ch) = Checksum (MSB) of configuration file.
(cl) = Checksum (LSB) of configuration file.
(dl) = Combined function information byte
bit 0 - slot has one or more function type definition
bit 1 - slot has one or more memory entries
bit 2 - slot has one or more interrupt (IRQ) entries
bit 3 - slot has one or more DMA entries
bit 4 - slot has one or more port range entries
bit 5 - slot has one or more port initialization entries
bit 6,7 - reserved
(di & si) = Four byte compressed ID
di (lsb) = byte 0
di (msb) = byte 1
si (lsb) = byte 2
si (msb) = byte 3
-- to be continued --
Subfunction 01h : Read function configuration information
This subfunction reads all the configuration information for one
expansion board fuction. This routine transfers the data block that
contains the configuration information for the expansion board function
from CMOS.
input:
(ah) = d8h
(al) = 01h (If CS and DS specify 16-bit addressing and data
size)
(al) = 81h (If CS and DS specify 32-bit addressing and data
size)
(cl) = slot No (including embedded and virtual devices)
(ds) = segment for return data buffer
(si) = offset to return data buffer (16-bit call)
(esi) = offset to return data buffer (32-bit call)
output:
(ah) = 00h - Successful completion; Carry Flag = 0.
= 80h - Invalid slot No; Carry Flag = 1.
= 81h - Invalid function number; Carry Flag = 1.
= 82h - CMOS corrupt; Carry Flag = 1.
= 83h - Empty slot; Carry Flag = 1.
= 86h - Invalid BIOS routine call; Carry Flag = 1.
= 87h - Invalid system configuration; Carry Flag = 1.
(Even though this error occurs, the data is
returned in AL)
-- to be continued --
Configuration data block structure
The 320-byte data block pointed to by DS:SI contains one expansion
board function's configuration information. The field sizes of the data
block are fixed sizes. The 320-byte data block structure as follow:
┌─────────────────────────────────────────────────────────────────────────┐
│ Four-byte Compressed ID Total bytes = 4│
│ Offset = 00h │
│ Byte 0 │
│ bit 7 reserved=0 │
│ bit 6-2 Character 1 │
│ bit 1-0 Character 2 │
│ Byte 1 │
│ bit 7-5 Character 2 │
│ bit 4-0 Character 3 │
│ Byte 2 │
│ 3-digit product No. (00-FF) (binary) │
│ Byte 3 │
│ 1-digit product No. (00-FF) (binary) │
├─────────────────────────────────────────────────────────────────────────┤
│ ID and slot information Total bytes = 2│
│ Offset = 04h │
│ Byte 0 │
│ bit 7 0 = no duplicate ID is present │
│ 1 = duplicate is present │
│ bit 6 0 = ID is readable │
│ 1 = ID is not readable │
│ bit 5,4 slot type │
│ 00 = Expansion slot │
│ 01 = Embedded device │
│ 10 = Virtual device │
│ 11 = Reserved │
│ bit 3-0 Numeric identifier for duplicate CFG filenames (IDs) │
│ 0000 if no duplicate CFG filenames │
│ 0001 if 1st duplicate CFG file │
│ ... │
│ 1111 if 15th duplicate CFG file │
│ Byte 1 │
│ bit 7 0 = configuration is complete │
│ 1 = configuration is not complete │
│ bit 6-2 reserved │
│ bit 1 0 = EISA IOCHKERR supported │
│ 1 = EISA IOCHKERR not supported │
│ bit 0 0 = EISA ENABLE supported (expansion board can be │
│ disable) │
│ 1 = EISA ENABLE not supported(board can not be disable)│
└─────────────────────────────────────────────────────────────────────────┘
-- to be continued --
┌──────────────────────────────────────────────────────────────────────────┐
│ CFG file extension revision level Total bytes = 2 │
│ Offset = 06h │
│ Byte 0 = Minor revision level (0 if no CFG file extension) │
│ Byte 1 = Major revision level (0 if no CFG file extension) │
├──────────────────────────────────────────────────────────────────────────┤
│ Selections Total bytes = 26│
│ Offset = 08h │
│ Byte 0 │
│ bit 7 0 = function is not disabled │
│ 1 = function is disabled │
│ bit 6 CFG extension free-form data │
│ bit 5 port initialization entry follows │
│ bit 4 port range entry follows │
│ bit 3 DMA entry follows │
│ bit 2 interrupt(IRQ) entry follows │
│ bit 1 memory entry follows │
│ bit 0 type/subtype ASCII string entry follows │
├──────────────────────────────────────────────────────────────────────────┤
│ TYPE and SUBTYPE ASCII string Total bytes = 80│
│ Offset = 23h │
│ Byte 0 = 1st character of ASCII string │
│ Byte 1 = 2nd character of ASCII string │
│ ... │
│ Byte 79 = 80th character of ASCII string │
│ │
└──────────────────────────────────────────────────────────────────────────┘
-- to be continued --
┌──────────────────────────────────────────────────────────────────────────┐
│ Memory configuration Total bytes = 63│
│ Offset = 73h │
│ Byte 0 = memory configuration byte │
│ bit 7 0 = last entry │
│ 1 = more entries follow │
│ bit 6 reserved │
│ bit 5 0 = not shared memory │
│ 1 = shared memory │
│ bit 4,3 memory type │
│ 00 = base or extended │
│ 01 = expanded │
│ 10 = virtual │
│ 11 = other │
│ bit 2 reserved │
│ bit 1 0 = not cached │
│ 1 = cached │
│ bit 0 0 = read only (ROM) │
│ 1 = R/W (RAM) │
│ Byte 1 = memory data size │
│ bit 7-4 reserved │
│ bit 3,2 decode size │
│ 00 = 20 │
│ 01 = 24 │
│ 10 = 32 │
│ 11 = reserved │
│ bit 1,0 data size (access size) │
│ 00 = BYTE │
│ 01 = WORD │
│ 10 = DWORD │
│ 11 = reserved │
│ Byte 2 = LSByte memory start address (divided by 100h) │
│ Byte 3 = middle byte memory start address │
│ Byte 4 = MSByte memory start address │
│ Byte 5 = LSByte memory size (divided by 400h) │
│ Byte 6 = MSByte memory size (0 in this word means 64M) │
└──────────────────────────────────────────────────────────────────────────┘
-- to be continued --
┌──────────────────────────────────────────────────────────────────────────┐
│ Interrupt configuration Total bytes = 14│
│ Offset = B2h │
│ Byte 0 │
│ bit 7 0 = last entry │
│ 1 = more entries follow │
│ bit 6 0 = not shared │
│ 1 = shared │
│ bit 5 0 = edge triggered │
│ 1 = level triggered │
│ bit 4 reserved (must be 0) │
│ bit 3-0 interrupt (0-F) │
│ Byte 1 = reserved │
├──────────────────────────────────────────────────────────────────────────┤
│ DMA channel description Total bytes = 8 │
│ Offset = C0h │
│ Byte 0 │
│ bit 7 0 = last entry │
│ 1 = more entries follow │
│ bit 6 0 = not shared │
│ 1 = shared │
│ bit 5-3 reserved (0) │
│ bit 2-0 DMA channel No (0-7) │
│ Byte 1 │
│ bit 7,6 reserved (0) │
│ bit 5,4 DMA timming │
│ 00 - default timming (ISA compatible) │
│ 01 - type A timming │
│ 10 - type B timming │
│ 11 - type C timming (BURST) │
│ bit 3,2 transfer size │
│ 00 - 8-bit (byte) transfer │
│ 01 - 16-bit (word) transfer │
│ 00 - 32-bit (dword) transfer │
│ 11 - reserved │
│ bit 1,9 reserved (0) │
├──────────────────────────────────────────────────────────────────────────┤
│ Port I/O information Total bytes = 60│
│ Offset = C8h │
│ Byte 0 │
│ bit 7 0 = last entry │
│ 1 = more entries follow │
│ bit 6 0 = not shared │
│ 1 = shared │
│ bit 5 reserved (0) │
│ bit 4-0 No of ports (minus 1) │
│ 00000 = 1 port │
│ 00001 = 2 sequential ports │
│ ... │
│ 11111 = 32 sequential ports │
│ Byte 1 = LSByte I/O port address │
│ Byte 2 = MSByte I/O port address │
└──────────────────────────────────────────────────────────────────────────┘
-- to be continued --
┌──────────────────────────────────────────────────────────────────────────┐
│ Initialization data Total bytes = 60│
│ Offset = 104h │
│ Byte 0 │
│ bit 7 0 = last entry │
│ 1 = more entries follow │
│ bit 6-3 reserved (0) │
│ bit 2 port value or mask value │
│ 0 - write value to port │
│ 1 - use mask and value │
│ bit 1,0 type of access │
│ 00 - byte address │
│ 01 - word address │
│ 10 - dword address │
│ 11 - reserved │
│ Byte 1 = LSByte of port I/O address │
│ Byte 2 = MSByte of port I/O address │
│ │
│ If byte 0, bit 2 = 0 (no mask) : │
│ bit 1,0 = port width to write │
│ 00 - byte 3 = port value │
│ 01 - byte 3 = LSB of port value │
│ byte 4 = MSB of port value │
│ 10 - byte 3 = LSB of port value │
│ byte 4 = 2nd byte of port value │
│ byte 5 = 3rd byte of port value │
│ byte 6 = MSB of port value │
│ 11 - reserved │
│ │
│ If byte 0, bit 2 = 1 (use mask) : │
│ bit 1,0 = No of bytes/port value/mask │
│ 00 - byte 3 = port value │
│ byte 4 = port mask (byte) │
│ 01 - byte 3 = LSB of port value │
│ byte 4 = MSB of port value │
│ byte 5 = LSB mask (word) │
│ byte 6 = MSB mask (word) │
│ 10 - byte 3 = LSB of port value │
│ byte 4 = 2nd byte of port value │
│ byte 5 = 3rd byte of port value │
│ byte 6 = MSB of port value/ │
│ byte 7 = LSB mask (dword) │
│ byte 8 = 2nd byte of port mask (dword) │
│ byte 9 = 3rd byte of port mask (dword) │
│ byte 10 = MSB mask (dword) │
│ 11 - reserved │
└──────────────────────────────────────────────────────────────────────────┘
-- to be continued --
Subfunction 02h : Clear CMOS
This subfunction clears all EISA CMOS, but does not clear the 64
bytes ISA CMOS.
input:
(ah) = d8h
(al) = 02h (If CS and DS specify 16-bit addressing and data
size)
(al) = 82h (If CS and DS specify 32-bit addressing and data
size)
(bh) = configuration utility major revision level
(bl) = configuration utility minor revision level
output:
(ah) = 00h - Successful completion; Carry Flag = 0.
= 84h - Error writing CMOS; Carry Flag = 1.
= 86h - Invalid BIOS routine call; Carry Flag = 1.
Subfunction 03h : Write CMOS
This subfunction writes configuration information for one slot
into EISA CMOS. This routine must be compute a checksum after each call.
input:
(ah) = d8h
(al) = 03h (If CS and DS specify 16-bit addressing and data
size)
(al) = 83h (If CS and DS specify 32-bit addressing and data
size)
(cx) = length of data structure (CX = 0 indicates empty
slot), length includes 2 bytes for configuration
file checksum
(ds) = segment of data buffer
(si) = offset of data buffer (16-bit call)
(esi) = offset of data buffer (32-bit call)
output:
(ah) = 00h - Successful completion; Carry Flag = 0.
= 84h - Error writing CMOS; Carry Flag = 1.
= 85h - CMOS is full, Carry Flag = 1.
= 86h - Invalid BIOS routine call; Carry Flag = 1.
-- to be continued --
The structure referenced by DS:SI in this subfunction for a slot
with a single function has the following format:
┌──────────────────────────────────────────────────────────────────────────┐
│ Four-byte Compressed ID Total bytes = 4 │
│ │
│ Byte 0 │
│ bit 7 reserved │
│ bit 6-2 Character 1 │
│ bit 1-0 Character 2 │
│ Byte 1 │
│ bit 7-5 Character 2 │
│ bit 4-0 Character 3 │
│ Byte 2 │
│ 3-digit product No (00-FF) (binary) │
│ Byte 3 │
│ 1-digit product No (00-FF) (binary) │
├──────────────────────────────────────────────────────────────────────────┤
│ ID and slot information Total bytes = 2 │
│ │
│ Byte 0 │
│ bit 7 0 = no duplicate ID is present │
│ 1 = duplicate is present │
│ bit 6 0 = ID is readable │
│ 1 = ID is not readable │
│ bit 5,4 slot type │
│ 00 = Expansion slot │
│ 01 = Embedded device │
│ 10 = Virtual device │
│ 11 = Reserved │
│ bit 3-0 Numeric identifier for duplicate CFG filenames (IDs) │
│ 0000 if no duplicate CFG filenames │
│ 0001 if 1st duplicate CFG file │
│ ... │
│ 1111 if 15th duplicate CFG file │
│ Byte 1 │
│ bit 7 0 = configuration is complete │
│ 1 = configuration is not complete │
│ bit 6-2 reserved │
│ bit 1 0 = EISA IOCHKERR supported │
│ 1 = EISA IOCHKERR not supported │
│ bit 0 0 = EISA ENABLE supported (expansion board can be │
│ disable) │
│ 1 = EISA ENABLE not supported (board can not be disable)│
├──────────────────────────────────────────────────────────────────────────┤
│ CFG file extension revision level Total bytes = 2 │
│ Offset = 06h │
│ Byte 0 = Minor revision level (0 if no CFG file extension) │
│ Byte 1 = Major revision level (0 if no CFG file extension) │
├──────────────────────────────────────────────────────────────────────────┤
│ Function length Total bytes = 2 │
│ Byte 0,1 = length of following function entry │
│ ** Length does not include these two bytes, or the checksum at the│
│ end of CMOS. │
└──────────────────────────────────────────────────────────────────────────┘
-- to be continued --
┌──────────────────────────────────────────────────────────────────────────┐
│ Selections Total bytes = 2 to 27│
│ Byte 0 = length of following selections filed │
│ Byte 1 = 1st selection │
│ Byte 2 = 2nd selection │
│ ... │
│ Byte 26 = 26th selection │
├──────────────────────────────────────────────────────────────────────────┤
│ Function information Total bytes = 1 │
│ Byte 0 │
│ bit 7 0 = function is not disabled │
│ 1 = function is disabled │
│ bit 6 CFG extension free-form data │
│ bit 5 port initialization entry follows │
│ bit 4 port range entry follows │
│ bit 3 DMA entry follows │
│ bit 2 interrupt(IRQ) entry follows │
│ bit 1 memory entry follows │
│ bit 0 type/subtype ASCII string entry follows │
├──────────────────────────────────────────────────────────────────────────┤
│ TYPE and SUBTYPE ASCII string Total bytes = 2 to 81│
│ Offset = 23h │
│ Byte 0 = length of following ASCII string filed │
│ Byte 1 = 1st character of ASCII string │
│ Byte 2 = 2nd character of ASCII string │
│ ... │
│ Byte 80 = 80th character of ASCII string │
│ │
└──────────────────────────────────────────────────────────────────────────┘
-- to be continued --
┌──────────────────────────────────────────────────────────────────────────┐
│ Memory configuration Total bytes = 7 to 63 │
│ │
│ Byte 0 = memory configuration byte │
│ bit 7 0 = last entry │
│ 1 = more entries follow │
│ bit 6 reserved │
│ bit 5 0 = not shared memory │
│ 1 = shared memory │
│ bit 4,3 memory type │
│ 00 = base or extended │
│ 01 = expanded │
│ 10 = virtual │
│ 11 = other │
│ bit 2 reserved │
│ bit 1 0 = not cached │
│ 1 = cached │
│ bit 0 0 = read only (ROM) │
│ 1 = R/W (RAM) │
│ Byte 1 = memory data size │
│ bit 7-4 reserved │
│ bit 3,2 decode size │
│ 00 = 20 │
│ 01 = 24 │
│ 10 = 32 │
│ 11 = reserved │
│ bit 1,0 data size (access size) │
│ 00 = BYTE │
│ 01 = WORD │
│ 10 = DWORD │
│ 11 = reserved │
│ Byte 2 = LSByte memory start address (divided by 100h) │
│ Byte 3 = middle byte memory start address │
│ Byte 4 = MSByte memory start address │
│ Byte 5 = LSByte memory size (divided by 400h) │
│ Byte 6 = MSByte memory size (0 in this word means 64M) │
└──────────────────────────────────────────────────────────────────────────┘
-- to be continued --
┌──────────────────────────────────────────────────────────────────────────┐
│ Interrupt configuration Total bytes = 2 to 14 │
│ Byte 0 │
│ bit 7 0 = last entry │
│ 1 = more entries follow │
│ bit 6 0 = not shared │
│ 1 = shared │
│ bit 5 0 = edge triggered │
│ 1 = level triggered │
│ bit 4 reserved (must be 0) │
│ bit 3-0 interrupt (0-F) │
│ Byte 1 = reserved │
├──────────────────────────────────────────────────────────────────────────┤
│ DMA channel description Total bytes = 2 to 8 │
│ Byte 0 │
│ bit 7 0 = last entry │
│ 1 = more entries follow │
│ bit 6 0 = not shared │
│ 1 = shared │
│ bit 5-3 reserved (0) │
│ bit 2-0 DMA channel No (0-7) │
│ Byte 1 │
│ bit 7,6 reserved (0) │
│ bit 5,4 DMA timming │
│ 00 - default timming (ISA compatible) │
│ 01 - type A timming │
│ 10 - type B timming │
│ 11 - type C timming (BURST) │
│ bit 3,2 transfer size │
│ 00 - 8-bit (byte) transfer │
│ 01 - 16-bit (word) transfer │
│ 00 - 32-bit (dword) transfer │
│ 11 - reserved │
│ bit 1,9 reserved (0) │
├──────────────────────────────────────────────────────────────────────────┤
│ Port I/O information Total bytes = 3 to 60 │
│ Byte 0 │
│ bit 7 0 = last entry │
│ 1 = more entries follow │
│ bit 6 0 = not shared │
│ 1 = shared │
│ bit 5 reserved (0) │
│ bit 4-0 No of ports (minus 1) │
│ 00000 = 1 port │
│ 00001 = 2 sequential ports │
│ ... │
│ 11111 = 32 sequential ports │
│ Byte 1 = LSByte I/O port address │
│ Byte 2 = MSByte I/O port address │
└──────────────────────────────────────────────────────────────────────────┘
-- to be continued --
┌──────────────────────────────────────────────────────────────────────────┐
│ Initialization data Total bytes = 4 to 60 │
│ │
│ Byte 0 │
│ bit 7 0 = last entry │
│ 1 = more entries follow │
│ bit 6-3 reserved (0) │
│ bit 2 port value or mask value │
│ 0 - write value to port │
│ 1 - use mask and value │
│ bit 1,0 type of access │
│ 00 - byte address │
│ 01 - word address │
│ 10 - dword address │
│ 11 - reserved │
│ Byte 1 = LSByte of port I/O address │
│ Byte 2 = MSByte of port I/O address │
│ │
│ If byte 0, bit 2 = 0 (no mask) : │
│ bit 1,0 = port width to write │
│ 00 - byte 3 = port value │
│ 01 - byte 3 = LSB of port value │
│ byte 4 = MSB of port value │
│ 10 - byte 3 = LSB of port value │
│ byte 4 = 2nd byte of port value │
│ byte 5 = 3rd byte of port value │
│ byte 6 = MSB of port value │
│ 11 - reserved │
│ │
│ If byte 0, bit 2 = 1 (use mask) : │
│ bit 1,0 = No of bytes/port value/mask │
│ 00 - byte 3 = port value │
│ byte 4 = port mask (byte) │
│ 01 - byte 3 = LSB of port value │
│ byte 4 = MSB of port value │
│ byte 5 = LSB mask (word) │
│ byte 6 = MSB mask (word) │
│ 10 - byte 3 = LSB of port value │
│ byte 4 = 2nd byte of port value │
│ byte 5 = 3rd byte of port value │
│ byte 6 = MSB of port value/ │
│ byte 7 = LSB mask (dword) │
│ byte 8 = 2nd byte of port mask (dword) │
│ byte 9 = 3rd byte of port mask (dword) │
│ byte 10 = MSB mask (dword) │
│ 11 - reserved │
└──────────────────────────────────────────────────────────────────────────┘
-- to be continued --
┌──────────────────────────────────────────────────────────────────────────┐
│ Configuration data for 2nd function Function length │
│ . . │
│ . . │
│ . . │
├──────────────────────────────────────────────────────────────────────────┤
│ Configuration data for 3rd function Function length │
│ . . │
│ . . │
│ . . │
├──────────────────────────────────────────────────────────────────────────┤
│ Configuration data for nth function Function length for nth │
│ . function = 00 │
│ . │
│ . │
├──────────────────────────────────────────────────────────────────────────┤
│ Configuration file checksum Total bytes = 2 │
│ │
│ Byte 1 = MSByte of Configuration file checksum │
│ Byte 0 = MSByte of Configuration file checksum │
└──────────────────────────────────────────────────────────────────────────┘
-- to be continued --
The 8K EISA CMOS data structure as follow:
┌──────────────────────────────────────────────────────────────────────────┐
│ │
│ Byte 0 counter for writing routine with each slot │
│ Byte 1 checksum byte │
│ Byte 2-0Fh reserved │
│ │
│ Byte 10h data length of slot 0 │
│ Byte 11h,12h data pointer of slot 0 │
│ Byte 13h data length of slot 1 │
│ Byte 14h,15h data pointer of slot 1 │
│ ... │
│ Byte 0CDh data length of slot 63 │
│ Byte 0CEh,0CFh data pointer of slot 63 │
│ │
│ Byte 0D0h-1FFFh part of saving data │
│ │
│ │
│ Note : │
│ 1. Before you write CMOS must be calling subfunction 02h to clear │
│ CMOS all. And call writing routine for each slot. Because write │
│ CMOS subfunction do not exist a parameter of slot No, so we need│
│ a internal counter for writing routine. So when you exit writing│
│ routine must be increase Byte 0 for next slot. │
│ 2. Byte 1 is a checksum byte for all 8K CMOS. You must do checksum │
│ once for every write routine. │
│ 3. Maybe we must change this definition for compatibility, so make │
│ your coding independent as possible you can. │
└──────────────────────────────────────────────────────────────────────────┘