Board index » off-topic » DOS TSR - How?

DOS TSR - How?


2003-07-05 03:17:03 AM
off-topic15
I've been asked to create a DOS program that runs as a TSR in upper
memory (on DOS).
Can anyone point me to a tutorial how to do this with TP5.5?
I also need to read the serial port (COM1) and based on a string there,
write out the line to a file. Anyone know of references on how to do this?
Thanks!
Mike
 
 

Re:DOS TSR - How?

Mike Packard schrieb:
Quote
I've been asked to create a DOS program that runs as a TSR in upper
memory (on DOS).

Can anyone point me to a tutorial how to do this with TP5.5?

I also need to read the serial port (COM1) and based on a string there,
write out the line to a file. Anyone know of references on how to do this?

Thanks!

Mike

For TSR's: search for the keyword KEEP which makes the program resident
and for the $M directive which reduces memory wasting.
Another hint would be to download the SWAG archives from www.gdsoft.com
inclusive the SWAG reader. There a whole section is about TSR
programming with some samples.
To read the serial port: there are several possibilities. Open it as a
text file named 'COM1' and do readln's on it or use direct port accesses
or look up what SWAG has to offer - there are som COM units as well in it.
Greetings
Markus
 

Re:DOS TSR - How?

Quote
>I also need to read the serial port (COM1) and based on a string there,
>write out the line to a file. Anyone know of references on how to do this?
>
<snip good stuff>

To read the serial port: there are several possibilities. Open it as a
text file named 'COM1' and do readln's on it or use direct port accesses
or look up what SWAG has to offer - there are som COM units as well in it.
Be warned that using file I/O in TSRs is tricky, unless you are using
someone elses TSR library code to handle all the UnDoc DOS stuff.
 

{smallsort}