Function 25h Set Interrupt Vector
Sets the address of the code DOS is to perform each time the specified
interrupt is invoked.
entry AH 25h
AL int number to reassign the handler to
DS:DX address of new interrupt vector
return none
note 1) Registers are unchanged.
2) No error codes are returned.
3) The interrupt vector table for the interrupt number specified in AL
is set to the address contained in DS:DX. Use function 35h (Get Vector)
to get the contents of the interrupt vector and save it for later use.
4) When you use function 25 to set an interrupt vector, DOS 3.2 doesn't
point the actual interrupt vector to what you requested. Instead, it
sets the interrupt vector to point to a routine inside DOS, which does
this:
1. Save old stack pointer
2. Switch to new stack pointer allocated from DOS's stack pool
3. Call your routine
4. Restore old stack pointer
The purpose for this was to avoid possible stack overflows when there
are a large number of active interrupts. IBM was concerned (this was an
IBM change, not Microsoft) that on a Token Ring network there would be
a lot of interrupts going on, and applications that hadn't allocated
very much stack space would get clobbered.