TIP: Click on subject to list as thread! ANSI
echo: 80xxx
to: SYLVAIN LAUZON
from: DENIS BOYLES
date: 1997-03-15 16:00:00
subject: Interrupts

SL>I need to know how the computer executes tasks in memory with resident
SL>programs. Someone can pictured this here?
The general idea is that your computer is sitting there waiting for something
to happen. When an interrupt is generated, the computer stops what it's
doing and call the appropriate routine. For example, when you type a key
on the keyboard, interrupt 9 is generated. The computers then jumps to the
handler for that routine. In this case that handler reads the scancode and
converts it into an ASCII. Then it's placed in the keyboard buffer for other
routines to access. When this is all done, the handler returns back to the
program that it left.
It's like a bunch of procedured that get called automatically whenever an
interrupt is generated. A TSR can be a few things, drivers like the MOUSE or
programs like HELPPC.
Drivers like the MOUSE just leave their functions resident and hooked to an
interrupt. This allows you to use the functions whenever you need them
without making your own.
Programs like HELPPC are left resident in the `background' waiting to be
activated by a hot-key. The flow might be something like this:
___-----------            ------------           ---------------------
| key press? |------>-----| hot-key? |----->-----| yes - activate TSR|
___-----------            ------------           ---------------------
      |                        |
      ^                        |
      |                   -------------
      `----<-------<------| no - exit | (back to old handler down chain)
                          -------------
This a pretty simple view of the how one particular TSR might work, but it
should give the idea. The important things to remember is that you need to
preserve the interrupted state. This means saving registers on the stack,
useing allowable interrupt calls, changing stacks, etc.
Cheers,
  Denis Boyles
 * OLX 2.1 TD * Press "+" to see another tagline.
--- Maximus/2 3.01
---------------
* Origin: Frog Hollow Port Moody BC 604-469-0264/0284 (1:153/290)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.