Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!bellcore!texbell!merch!cpe!hal6000!trsvax!don From: don@trsvax.UUCP Newsgroups: comp.sys.ibm.pc Subject: Re: Help with sharing memory in DOS... Message-ID: <216100107@trsvax> Date: 13 Jul 89 13:28:00 GMT References: <2752@blake.acs.washington.edu> Lines: 34 Nf-ID: #R:blake.acs.washington.edu:2752:trsvax:216100107:000:1679 Nf-From: trsvax.UUCP!don Jul 13 08:28:00 1989 > How do I find the address of 'aldsdata' inside the TSR?? > I'm guessing something like store the address of aldsdata in an interrupt > vector, then declare a far pointer and put the address of aldsdata in that... > But it ain't worked yet. That's one way to do it, but that has problems. For one, if some other program calls that interrupt, then you would almost assuredly lock up the machine. Instead, a more general way is to take over some typically unused interrupt with an ISR (interrupt service routine). The ISR would compare values passed in AX with a table of commands you support. For now, you could use AX=0 as a request for the address of aldsdata. Since the ISR is part of your TSR, it knows the address of aldsdata and can pass it back to the calling program in some registers, such as ES:BX. Your ISR can "chain" into the interrupt vector, so that if some other program also uses that interrupt, their ISR will also be called. In order to use this ISR from another program, merely call the interrupt with AX having 0, and get the address from ES:BX. If you need more specific info, let me know. I don't like to send code fragments unless specifically requested to do so. You also said you had written the TSR, so you probably know more about the PC than you give yourself credit. --------------------------------------------------------------------- Computers are just the opposite of people. With computers, you put the software in the hardware, while with people, you put the hardware in the software. Don Subt The opinions expressed above are Tandy Corp. strictly mine, not my employer's. 817-390-3068 ...!killer!ninja!sys1!trsvax!don