PL> The mere act of following the MCB chain is easy once you have a copy of
PL> the Interrupt List. However, suppose I am ONE, and I want to run code
PL> that's within TWO. Finding TWO is easy, but then two questions arise:
PL> - how do I find where some routine starts ?
Use a jump table - here's how to find the jump table :
ONE on starting could put a pointer to it in a fixed non-critical place
eg. the last 4 bytes of the it's PSP
or the "interprocess notepad" at the end of the BIOS data area
or this pointer could be provided via an ISR.
PL> - the routines in TWO expect DS and SS (and maybe others) to have a
PL> specific value; how do I find out what they are ?
This could be done in the same way as above, or stored in the jump-table.
SS:SP is probably OK left pointing into TWO's stack, but DS would need to
address ONE's Data segement for global variables and (typed) constants.
Bye.
--- EzyQwk V1.20 01fa018d
---------------
* Origin: CSS Brisbane, Qld, Australia. (61-7-3367-3890) (3:640/350)
|