[comp.sys.ibm.pc] TurboC and MSC TSR handling.

platt@emory.uucp (Dan Platt) (01/07/88)

There's stuff that Borland and Microsoft didn't include in the readme or in the
manuals concerning the writing of tsr's and interrupts.  It seems to me that
though they have provided vector chaining operations, allowing interupt handlers
to be loaded for the duration of the program, and they've written a _dos_keep()
(or keep() in Borland's work) function similar to Borland's, they haven't
provided standard documentation on how to get the length of the program in
paragraphs.  The assembler texts which do this generally have a symbol defined
at the end of the program from which they may compute the length of the program
(starting at the psp and going to the last symbol; they may also control how
much of the program stays, and with care could avoid keeping the tsr loader part
resident).  However, there has been no documentation on the last symbol either
by Microsoft C5.0, or Borland's TurboC.

Any body with information on these issues -- I'd gladly appreciate some
feedback.

Dan

lowey@sask.UUCP (Kevin Lowey) (01/12/88)

In article <2433@emory.uucp>, platt@emory.uucp (Dan Platt) writes:
> [Borland and Microsoft] haven't
> provided standard documentation on how to get the length of the program in
> paragraphs. 

  I haven't looked at this problem myself, but my roommate has.  We have 
Turbo C, but I ass*u*me that this also applys to MSC.

  I don't know all the details, but apparently if you look in the .MAP
files, either the total length of the program is mentioned, or the length of
the different parts are included and you have to do some math to figure out
the final length.  Sorry I don't have all the specifics, but I hope this 
helps a little.

Kevin Lowey