1. get_vector and set_vector
what are get_vector and set_vector doing? they are used as "interrupt
handlers" right? i don't see where this fits in with my little
programming world. what is an "interrupt" -- i know in asm speak that
its' like a system or built-in computer "function" but that would make
this redundant, wouldn't it?
thx
snortboy
2. Re: get_vector and set_vector
- Posted by Ralf Nieuwenhuijsen <nieuwen at XS4ALL.NL>
Oct 09, 1998
-
Last edited Oct 10, 1998
>what are get_vector and set_vector doing? they are used as "interrupt
>handlers" right? i don't see where this fits in with my little
>programming world. what is an "interrupt" -- i know in asm speak that
>its' like a system or built-in computer "function" but that would make
>this redundant, wouldn't it?
Well, no actually, it wouldn.t
It isnt used to read interrupts, it's used to make an interrupt.
For example you can make an interrupt and have a C program running as well,
calling it.
You can also 'tap' certain informations. For example, whenever a key is
pressed, an interrupt occurs.
This interrupt could be pointed to *your* code. (read: ASM code you poked
into the memory)
Etc. Etc.
Its just a big table of machine addreses of code that should be executed in
certain cases.
Dos and you bios both offer a number of interrupts. You might see it like
the way DLL's work in windows, but then using an big look-up table, which
allows us to overwrite certain functions, or to tap information (your new
function could, before it was installed, first store the addres of the old
function in a variable, and execute the old function, after the arguments
were copied for use within your program.
But, this is all pretty low-level stuff.. from the dark doomey days of DOS,
where a crash stopped your system. Yet a full stop and a cold reset those
days is faster than waiting and seeing Windows fighting the obvious
Ralf