home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Unsorted BBS Collection
/
thegreatunsorted.tar
/
thegreatunsorted
/
programming
/
misc_programming
/
int8.spc
< prev
next >
Wrap
Text File
|
1990-01-05
|
2KB
|
66 lines
Specification of System Timer Interrupt Service (INT 08H)
---------------------------------------------------------
* This routine handles the timer interrupt from channel 0 of the system
timer. Input frequency is 1.19318 MHz and the divider is 65536
(programmed by POST), resulting in approximately 18.2 interrupts per
second.
* Maintains a count of interrupt at data area of system timer counter
(double word located at 40:6c) since power-on that may be used to
establish time of day. After 24 hours of operation, flag of timer
overflow (byte located at 40:70) is set to 1 and the counter of
system-timer day (word located at 40:CE) is increased.
* Decrement motor off counter (byte located at 40:40) and when the count
reaches 0, turns the diskette drive motor off, and resets the flag of
motor running (refer to diskette interrupt service routine).
* Finally, calls interrupt 1CH which may be provided by the user.
input:
none
output:
none
reference BIOS data area:
40:40 motor off counter
40:6C timer count (low word)
40:6E timer count (high word)
40:70 if timer is over one day then set this byte to 1
40:CE day count
40:D0 status_speed
port defined:
328h (28h) -- System Control Port C (for 1100 seriers)
3F2h -- Digital output register
Note:
1. For running IBM SDLC 3270 Emulator, it must push 3 registers in this
order - DS, AX, and DX to the stack before it calls interrupt 1CH.
2. The accurate calculation of the system timer counter is shown below:
65536
period of IRQ 0 = ------------- = 0.054925493 sec
1.19318 MHz
1 day 24 * 60 * 60 sec
maximum timer count = ----------------- = ------------------
period of IRQ 0 0.054925493 sec
= 1573040.045
= 24 * 65536 + 176.045
-- -------
high word of timer count<───┘ └────> low word of timer count
So it must increase the timer count to reach this maximum value, then
reset timer counter and set timer-overflow flag.