From: Bob Zale
Subject: Re: PowerBASIC TSR -- CALL SUB's in it from regular program?
Tom Hansen wrote:
>
> I decided to post my TSR calling idea in a separate message, to
> perhaps catch the eye of someone who may have done it.
>
> I'll quote verbatim the section of the message I already posted,
> under the subject "Large App in PDS..."
>
> Perhaps we could somehow utilize the "TSR" features of PowerBASIC to
> make our "runtime" into a TSR that could then somehow be CALLED from
> our programs. Has this been done???
>
> It should be theoretically possible to create some sort of jump table
> and have a small OBJ linked into each EXE, in which there would
> be small "stubs" for each SUB in the runtime, and these
> "stubs" would access the jump table to actually CALL the correct
> routine in the TSR. We don't have the time or resources to explore
> this possibility ourselves, but it at least indicates that perhaps
> someone out there may have done it.
>
> Help???
>
> --
> tomhNOSPAM@execpc.com
> http://www.execpc.com/tomh
Tom--
Your idea of using a TSR will work. No doubt about it. Since PB
supports pointers, the idea is actually quite straight-forward. You
just use the normal TSR interface to pass back the CODEPTR of various
functions in the TSR during initialization, then use the built-in CALL
DWORD function... of PowerBASIC to access them. Done deal. The needs
you describe are the exact reason we added this important feature set.
The only caveat is that you'll need to limit the use of dynamic strings
as parameters of inter-process function calls. But that's why we offer
industry-standard ASCIIZ strings as an option, as well as Fixed length
strings and user-defined types. I'm glad you asked!
Regards,
Bob Zale
PowerBASIC Inc.
*** QwkNews (tm) v2.1
* [TN71] Toast House Import
--- GEcho 1.20/Pro
---------------
* Origin: Toast House Remote (1:100/561)
|