[comp.lang.pascal] Memory resident?

MHS108@PSUVM.BITNET (Mark Solsman) (09/19/89)

Does any one out there knmow how and if you can compile a program to be
memory resident? (I am looking to create a kernel to manage mult. programs
that may or may not be present in memory)
Thanks in advance!

cs4g6ag@maccs.dcss.mcmaster.ca (Stephen M. Dunn) (09/20/89)

In article <89262.124737MHS108@PSUVM.BITNET> MHS108@PSUVM.BITNET (Mark Solsman) writes:
$Does any one out there knmow how and if you can compile a program to be
$memory resident? (I am looking to create a kernel to manage mult. programs
$that may or may not be present in memory)

   How you do it depends on what Pascal you're using.  In TP4 (and presumably
also TP5) there is a procedure keep () that makes your program a TSR.  Of
course, you have to have some way of having your program executed at the
appropriate times, however.  You would probably do this by making one or
more procedures within your program respond to certain interrupts; you do this
by inserting the keyword "interrupt" in the procedure declaration (this makes
TP generate the necessary code at the start and end of the procedure to make
it an interrupt handler - such things as pushing/popping all registers and
enabling interrupts).


-- 
Stephen M. Dunn                         cs4g6ag@maccs.dcss.mcmaster.ca
**********************************************************************
       <std_disclaimer.h> = "\nI'm only an undergraduate!!!\n";
"VM is like an orgasm:  the less you have to fake, the better." - S.C.