home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Unsorted BBS Collection
/
thegreatunsorted.tar
/
thegreatunsorted
/
programming
/
misc_programming
/
int08.doc
< prev
next >
Wrap
Text File
|
1989-12-27
|
2KB
|
34 lines
INT 08H (IRQ 0) - TIMER_INT hardwre interrupt
This routine handles the Timer Interrupt from channel 0 of the 8254
Timer chip. Input frequency is 1.19318 MHZ and the divisor is 65536.
Resulting in approximately 18.2 Interrupts every second.
The Interrupt Handler maintains a Count (40:6C) of Interrupts since
Power On Time, which may be used to establish Time Of Day.
The Interrupt Handler also decreases the Motor Control Count (40:40)
of the diskette, and when it expires, will Turn Off the diskette
motor(s), and Reset the Motor Running Flags.
The Interrupt Handler will also invoke a user routine through
Interrupt 1Ch at every Time Tick. The user must code a routine and
place the correct address in the vcetor table.
PDL:
Save the registers
decrease the TIMER_COUNT (TIMER_HIGH,TIMER_LOW - 40:6E,40:6C)
IF Timer Count equals 24 hours (TIMER_HIGH,TIMER_LOW) = (018h,0B0h)
THEN
Set the TIMER_COUNT to zero,
Set the TIMER_OVERFLOW (40:70) to one
( Timer has counted past 24 hours)
ENDIF
decrease MOTOR_COUNT (40:40)
IF MOTOR_COUNT equals to zero
THEN
Turn off motor running bits (bit 3,2,1,0 of 40:3F = 0,0,0,0)
Turn off the motor (Output the C0h to PORT 3F2h)
ENDIF
Call the user interrupt routine (INT 1CH)
Send EOI to 8259 Interrupt Controller
Restore the registers
return