[net.lang.pascal] TURBO PASCAL-HOW TO MAKE A PROGRAM RAM RESIDENT

jdf@ptsfd.UUCP (Jack Fine) (04/02/86)

I am using ms-dos version 2.1 and Turbo Pascal version 2.  I would like to 
see if anyone can help me with the code necessary to load a program in RAM
and call it up when needed by key selection.  Hardware will be both ibm pc
and compaq.

In case I am asking this question poorly let me rephrase it.  I would like
to make a turbo pascal program memory resident with control returned to dos
and the program called up by typing a certain key (using the interrupt 
process I assume.)  This would be like programs such as Sidekick, Graphlink,
and so on...

Thanks In Advance.

Jack

gbs@voder.UUCP (George Smith) (04/03/86)

In article <316@ptsfd.UUCP>, jdf@ptsfd.UUCP (Jack Fine) writes:
> 
> I would like to 
> see if anyone can help me with the code necessary to load a program in RAM
> and call it up when needed by key selection.  Hardware will be both ibm pc
> 
> Jack

I think I can help.  First there are two magazine articles that are
very good references about writing Terminate and Stay Resident programs
for PC-DOS.  They are:

	(1) Writing Desk Accessories by Tom Wadlow
	    Fall 85 Special issue of Byte called
	    Inside the IBM PCs
	(2) Interrupt Borrowing with Turbo Pascal by Stephen Davis
	    Sep/Oct 1985 issue of Micro/Systems Journal

Second, I have the source code for the THELP.PAS program that is mentioned
in the article by Davis.  It could be used as a skeleton for any program
that needs to be TSR and callable by hitting a 'hot key'.  I will mail
it to those who request it (if there are a lot of requests, I will post
it to net.micro.pc).

emv@ccunix.UUCP (Edward Vielmetti) (04/06/86)

In addition to THELP.PAS, there's a collection called STAYRES.PAS
(written by Lane Ferris, "The Hunter's Helper") which I found on
the Borland SIG (BOR-100) of Compuserve.  These have been posted
to <info-ibmpc> for those of you with arpa access.  If you can't
find them on a local BBS, try the Wipcus BBS (313) 663-1835 24hr 2400baud.

A big problem with writing resident code in turbo is the overhead
associated with it--at least 15K, even for small applications.
Until Borland comes out with an optimizing Turbo, if you want to
write *real* resident programs stick to a lower-level language.
(My 640K machine is already full of all the resident stuff it can
handle.)

Edward Vielmetti, computing center MicroGroup, University of Michigan
vielmetti%UMich-MTS.Mailnet@MIT-Multics.ARPA
emv@madvax.UUCP  (it's near ihnp4, but I don't know how near)

dowdy@cepu.UUCP (Dowdy Jackson) (04/07/86)

If anyone has any info on this , I too would like to be informed....

Thanks in advance

Dowdy Jackson
UCLA Dept of Neurology  
UCLA School of Medicine