home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!dtix!darwin.sura.net!mips!swrinde!cs.utexas.edu!sun-barr!olivea!veritas!amdcad!dvorak.amd.com!proton!richard
- From: richard@proton.amd.com (Richard Relph)
- Newsgroups: comp.os.ms-windows.programmer.misc
- Subject: Start TSR from Windows
- Message-ID: <1992Jul28.200502.15818@dvorak.amd.com>
- Date: 28 Jul 92 20:05:02 GMT
- Sender: usenet@dvorak.amd.com (Usenet News)
- Organization: Advanced Micro Devices, Austin TX.
- Lines: 33
-
- We have a system of programs running under DOS that exist in basically a
- master/slave relationship. When the master starts, if no slave is already
- present, it will start one. Slaves, then, are TSRs. Masters locate slaves
- via a search of some interrupt vectors and the memory they point at. We
- now want to use the existing slaves with Windows applications as masters.
- Masters simply call through real-mode far pointers that are in a table
- pointed to by an interrupt vector. No software interrupts are necessary.
- In the DOS world, of course, both slaves and masters appear to be real-
- mode programs. I say appear, because we do have some slaves that are 386
- protected mode executables - but even those use the real-mode interfaces.
- In the case where a slave is started by a master, the slave is killed
- before the master exits in order to reduce memory fragmentation.
- Here are our questions:
- 1) How can the Windows program get a real-mode pointer to some memory
- so that it can pass it to the slave?
- 2) How can the Windows program start the slave if the slave was not
- started before Windows? I think this is easier in 286 mode than in
- 386 mode, since 286 mode transistions to non-windows apps actually
- return to true real-mode. But 386 mode creates virtual machines for
- the non-windows app. How does the manipulation of the interrupt
- vector table by the VM affect the vector table windows uses? How can
- the master specify to the "call a real-mode function" which VM the
- function lives in? My guess is that these things don't work and that
- I have to figure out how to make the slave's VM be the "real" machine
- underlying the invocation of Windows. Is that right?
- 3) For those slaves that are 386 protected mode executables, we assume
- that if the package we use supports DPMI environments that we will
- have no real problems. If the slave starts before windows, however,
- how will it know to use DPMI instead of VCPI, for example? Even if
- we do get the slave to use DPMI, will it work when Windows takes
- over DPMI servicing?
- Thanks in advance for the help.
- Richard Relph
-