🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.ibm.pc.misc
Article #2452

Multitasking MSDOS (a little) using Turboc

#2452
From: wolfe glen
Date: Wed, 15 Aug 1990 17:01
53 lines
2404 bytes

Hi MSDOS gurus, TSR writers, MSDOS "Multitaskers" writers:

                             HELP
ACKGROUND

I am writing a process controller intended to run under MSDos on an 
PC XT compatible using TurboC V2.0.  The processes are all rather slow
and so processing each of them takes some time.

PROJECT

To enable changing setpoint values etc etc, I have redirected the keyboard
interrupt (int 0x9) to set a flag so that a command parser can be started
by the clock interrupt (int 0x8 rather than 0x1c for reentrancy problems).
This approach has been used to allow later modification to allow set
point control/interrogation by means of a COM: port.
I have treated the problem as a TSR without exiting the spawning program.

My references have primarily been:

Stevens, Al "TurboC - Memory-Resident Utilities, Screen I/O and
      Programming Techniques"

Hyman, Michael "Advanced DOS - Memory-Resident Utilities, Interrupts
   and Disk Management with MS and PC-DOS"

Simrin, Steven "The Waite Group's MS-DOS Bible 3rd Ed."

PROBLEM

The resultant program basically works but is intermittently unstable
(i.e. crashes, jumping off to all regions of memory). This degree of
stability has been achieved after hacking some of the TC-compiled assembler
code (to make it smaller, use RET 2 at the end of the disk interrupt
to preserve registers etc etc).

SOME THOUGHTS

Does anyone know of the reentrancy status of TurboC code/subroutines -
I mean more than whether DOS or BIOS routines are used? Are there any
sneaky stack swaps or something anywhere?

Are BIOS routines reentrant?


Any comments AAARRRGGGHHH!!!! (emotive cry of desparation), anything at
all, with regard to this problem, the references I have cited, something
I am likely to have missed etc. etc. etc. would be appreciated.
I suspect that further email discussion would be required/appropriate. 

Thanks for reading.
Technical Details
Message-ID: <1174@zeus.usq.edu.au>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!munnari.oz.au!bunyip!janus.usq.edu.au!zeus!s71119

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!munnari.oz.au!bunyip!janus.usq.edu.au!zeus!s71119
From: s71119@zeus.usq.edu.au (wolfe glen)
Newsgroups: comp.sys.ibm.pc.misc
Subject: Multitasking MSDOS (a little) using Turboc
Keywords: multitasking interrupts TSR
Message-ID: <1174@zeus.usq.edu.au>
Date: 15 Aug 90 17:01:54 GMT
Distribution: comp
Organization: University College of Southern Queensland, Toowoomba, Australia
Lines: 53