On Mon, 28 Nov 2005, Ladislav Lacina wrote:
I would like to know whether is there any diference between MSDOS and FreeDOS behavior in TSR programs. Can I in TSRs call the same subset of DOS functions like in MSDOS? Or more or less?
We try to model MS DOS style as close as possible, so you can call all functions of int 21 in 00 to 0c range and function 30, as well as 25 / 35 all the time as far as I remember, and for all other functions you must first make sure that InDOS is false (that the kernel is not busy), as those do not support reentrancy.
Can I read and write files from my TSRs?
You should not, but while InDOS is false, and after setting your PSP and your DTA areas as the active ones, it might even work. There are probably howtos for that kind of stuff. Of course there are situations where it will be hard to meet all those constraints. Easiest way to fiddle with files is to hook int 21 yourself, and only touch files when somebody else attempts to use int 21 to touch files. Because then you know that the kernel is not busy (you intercepted the call before the kernel started to handle it) and that enough general resources are free (because the caller would not try to mess with files at that moment otherwise) ;-). Eric ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ Freedos-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/freedos-devel
