home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Unsorted BBS Collection
/
thegreatunsorted.tar
/
thegreatunsorted
/
programming
/
misc_programming
/
int15.doc
< prev
next >
Wrap
Text File
|
1990-01-04
|
6KB
|
145 lines
Chapter 3
INT 15h System Service
----------------------
1. Introduction
a.
The INT 15h, System Service, provides serveral function:
. Laptop special services include :
.. Read/Modify system profile
.. Wait for external event
.. Request system power off (system suspend)
.. Read current system status information
.. Modem power on/off
. Joystick function
Function 84h supports uo to two joysticks, and have two sub-
function : read current switch setting and read resistive
inputs.
. Wait routines
There are two wait function is provided by INT 15h: Function
83h set event wait interval and function 86h, wait. It also
supports function 41h, wait for external event in the laptop
system.
. Protected mode support
.. Function 87h, block move
.. Function 89h, switch processor to protected mode
. System Information
.. Get system configuration table , Function C0h
.. Get BIOS message, Subfunction of function C0h
.. Get extended memory size, Function 88h
. Extensive function of Acer
.. Speed control
This function supports user to set or toggle system speed,
It will call the function F0h of INT 16h which is a speed
control routine to handle the system speed.
There are three subfunction: set high speed, set low speed,
and toggle system speed.
.. Shadow RAM
The system service provide user to disable or enable shadow
RAM. If shadow RAM enable, the system BIOS on ROM will be
copied to shadow RAM and transfer control to shadow.
Otherwise, the system works in ROM BIOS. The system works in
shadow RAM more effectivly than in ROM BIOS.
.. Setup utility
Setup utility supports user to setup system configuration
and save the information into CMOS.
. ESIA initialzation
Function D8h is supported only on ESIA system, It writes
the information of EISA adapters into non-volatile RAM (CMOS),
and get the information of EISA adapters from non-volatile RAM.
b. Programming
. Event wait (AH = 83h)
- Clear user wait flag (bit 7 of point by ES:BX)
- Check function valid or not and go to properly subfunction.
- In set wait interval
IF system is in waiting process, return to caller with carry
flag. Otherwise, the user wait flag (ES:BX) and wait interval
(CX,DX) should be writed into BIOS data area. The waiting
counter is implemented by periodic interrupt of INT 70h (RTC).
So, IRQ 8 (INT 70h) must be unmask and the PIE of RTC must be
enable.
- In cancel wait interval
Clear wait active flag (bit 0 of 40:A0h)
Disable the PIE of RTC.
. Wait (AH = 86h)
This routine will base on 55 minisecond system timer 0
to perform "wait" function.
System timer 0 (port 40h) ┌─ FFFFh <┐ ┌────┐ ┌──
is a decremental counter, it │ │ ──┘ └────┘
will decrement 2 per clock └> 0000h ─┘ <- 55 ms ->
pulse. It takes 55 minisecond when loops twice.
- transfer wait counter to counter in 55 minisecond
- latch system timer counter
- Enter waiting loop in which the system will latch system timer
counter again,and compare it with the first system timer counter.
Return to caller until waiting counter is expired.
. Block move (AH = 86h)
- Save currently stack into BIOS data area (40:67h, 69h)
- Set Global Descriptor Table(GDT) which is pointed by ES:SI.
The source and target descriptors built by the user must have
a segment length = 2 * CX - 1 or greater. The data access
right byte must be set to 93h. The 24 bit address (byte hi,
word low) must be set to the target /source.
( please refer to the specification of INT 15h)
- Disable interrupt, NMI and set shutdown 09h into CMOS
- set IDT and turn on GATE A20
- Enter protected mode
- make data move among the system memory.
- To return to real mode ,the shutdown 09h should be issued.
- restore system stack and enable interrupt & NMI.
. Switch to protectd mode (AH = 89h)
- Disable interrupts
- Reinitialize the 8259 interrupt controller to the user specified
offset and mask all interrupt.
- Setup BIOS code segment descriptor (segment_limit_word = 0ffffh
base_low_word = 0
base_high_byte = 0fh
access_right_byte = 09bh)
- Load GDT register
- Load IDT register
- Set Gate_A20
- Switch to protected mode
- Setup user's data segment
- Setup user's extra segment
- Setup user's stack segment
- Modify user's original CS in stack to CS selector
- Return to user in protected mode
NOTE: ES:SI -- pointer to GDT build before interrupting to this
function. These descriptors are used by this
function to initializethe IDTR, the GDTR and the
stack segment selector. The DS selector and the
ES selector will be initialized to descriptor
built by the routine using this function.