Path: utzoo!attcan!lsuc!maccs!cs4g6ag From: cs4g6ag@maccs.dcss.mcmaster.ca (Stephen M. Dunn) Newsgroups: comp.lang.pascal Subject: Re: Memory resident? Message-ID: <2517A621.27383@maccs.dcss.mcmaster.ca> Date: 20 Sep 89 15:00:49 GMT References: <89262.124737MHS108@PSUVM.BITNET> Reply-To: cs4g6ag@maccs.dcss.mcmaster.ca (Stephen M. Dunn) Organization: McMaster University, Hamilton, Ontario Lines: 21 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 ********************************************************************** = "\nI'm only an undergraduate!!!\n"; "VM is like an orgasm: the less you have to fake, the better." - S.C.