DL>
> Have decided its safer to do DOS programming under DOS
> rather than in a DOS window of OS2 ( see my other message
> above ) .
DL>
Your problem wasn't OS/2, but rather that you screwed your VDM by
mucking around with pointers, and rather than exiting the damaged VDM
immediately you tried to continue using it, whereupon Turbo PASCAL fell
over in the middle of writing to a file.
Unsurprising. Your app had probably scribbled all over Turbo Pascal's
inner workings.
No wonder you ended up with a zero length file.
Thank your lucky stars that you were using OS/2. Mucking around to the
extent that you scribble over system memory usually locks a machine
running DOS, DOS+Windows 3.1, or DOS+Windows 95 solid.
The following DEBUG script simulates a DOS application writing through a
NULL pointer. OS/2 terminates the VDM with a SYS3175 and keeps going.
DOS and DOS+Windows tend to die in interesting ways.
c:\>DEBUG
-f 0:0 ffff 0
This is one of the reasons that OS/2 is the platform of choice for
developing DOS and DOS+Windows applications.
A few years ago, I developed using Borland C++ 3.0 running on OS/2 2.0
and 2.1. I switched to OS/2 from DOS because Borland's IDE was, to put
in bluntly, crap. If a program was too complex, the IDE would die with
an exception 13 whilst compiling.
On DOS, this meant rebooting, a process that took about a minute.
On OS/2, this meant killing the VDM and restarting it, a process that
took around 10 seconds.
Next time, if you intend to write such flaky code, start a separate VDM
in which to test your program. At least that way your program won't be
able to damage Turbo PASCAL when it goes haywire.
Separate VDMs are yet another reason why DOS and DOS+Windows developers
like OS/2, incidentally ...
> JdeBP <
___
X MegaMail 2.10 #0:Dr Who is back on U.K. television!
--- Maximus/2 3.01
---------------
* Origin: DoNoR/2,Woking UK (44-1483-725167) (2:440/4)
|