🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.ibm.pc.misc
Article #9072

Re: QUESTION ABOUT INTERRUPTS AND TIMERS

#9072
From: Bob Alexander
Date: Mon, 08 Apr 1991 17:21
30 lines
2225 bytes
>>                                                                 Also, if
>>    I hook 08H instead of 1CH, I could theoretically call the original 08H
>>    at 18.2 hz, but the system locks all the same.  So it appears that 08H
>>    MUST be called every timer pulse.  
>
>INT 08H does the following things:
>	1) Increment a running count of clock ticks at 0040:006C
>	2) Decrements the byte at 0040:0040, which controls the timing of
>	   the diskette motor
>	3) Calls interrupt 1CH

There's one more, very important thing that Int 08H does: it clears the
interrupt!  This is done by twiddling the 8259A interrupt controllers.
Sorry, but I don't know exactly how.  The bottom line is, if you are
going to set up a timer interrupt routine that doesn't always call the
standard BIOS routine, then you must clear the interrupt yourself.
Otherwise, your system will definitely hang.

I discovered this by using Turbo Debugger to disassemble the BIOS' Int 8
routine.  You can use DOS' DEBUG to do this too.  Find the Int 8 routine
via its interrupt vector and disassemble.  The code for resetting the
8259A should be in there (look for accesses to IO ports 20H and/or 21H.)
Alternatively, perhaps someone else in this group knows how to do it.

  Bob Alexander      | The more the government does,
  boba@hpwala.hp.com | the better libertarianism looks.
  -------------------+---------------------------------------------------
  Organizations don't have opinions: individuals do.  The opinions expressed
  above do not necessarily reflect those of the stockholders, employees, or
  directors of Hewlett-Packard.
Technical Details
Message-ID: <1924@hpwala.wal.hp.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sdd.hp.com!hplabs!hpda!hpwala!hpwarau!boba
References: <TRUX.91Apr5123621@atop.atop.cs.caltech.edu> <1991Apr6.055003.19402@agate.berkeley.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sdd.hp.com!hplabs!hpda!hpwala!hpwarau!boba
From: boba@hpwarau.hp.com (Bob Alexander)
Newsgroups: comp.sys.ibm.pc.misc
Subject: Re: QUESTION ABOUT INTERRUPTS AND TIMERS
Message-ID: <1924@hpwala.wal.hp.com>
Date: 8 Apr 91 17:21:03 GMT
References: <TRUX.91Apr5123621@atop.atop.cs.caltech.edu> <1991Apr6.055003.19402@agate.berkeley.edu>
Sender: netnews@hpwala.wal.hp.com
Reply-To: boba@hpwarau.UUCP (Bob Alexander)
Distribution: comp.sys.ibm
Organization: Hewlett Packard, Waltham, Mass
Lines: 30