TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Louis Rizzuto
from: Julien Pierre
date: 1994-10-10 15:25:18
subject: Pascal and ??? 1/3

Bonjour, Louis!

Suite au message de Louis Rizzuto a Peter Fitzsimmons:

 LR> It seems to me that if you used VDM for total development of a DOS
 LR> apps - under OS/2 - for both the compilations and testing, you would
 LR> get the benefits of the memory protect features of OS/2.  Is this not
 LR> true?

NO !
A DOS program can still overwrite memory *inside* the VDM; ie, it can
overwrite the local COMMAND.COM, and so on .. 
Just like under DOS.
This kind of errors usually doesn't cause the program to completely hang,
but eventually it does since the memory is corrupted. Under real dos you
have to reboot to get rid of this. Under OS/2 you reboot the VDM (close it,
then restart it) in this case - but this is not essentially different.

 LR> Another factor that seems relevent, is that memory overruns only
 LR> identify that their is some error causing a memory overrun error - not
 LR> what the specific cause of the overrun is.  Is this not true under
 LR> OS/2?

You can get a dump of the registers, find the instruction that caused the
overrun, and then fix your code.
I do this all the time - and with IPMD the process is very elegant.

 LR> DOS is not crashing of it's own accord, in your example above, right?
 LR> DOS is crashing as the result of being overrun by a programmers error
 LR> in his/her own program - correct?

 LR> If true, it seems to me that the frequency of such "DOS
crashs", using
 LR> DOS, depends upon how careful the programmer is in implementing their
 LR> program, right?  That same programmer would have the same number of
 LR> memory protect errors if he was programming under OS/2, right?

No !
Under DOS, you can override some system memory areas without noticing any
crash, since DOS doesn't protect this area !
But this eventually leads to a crash. But this is very hard to debug
because sometimes you don't *know* that you corrupted memory - it's just
when you exit the compiler that you see "cannot load
COMMAND.COM", or something .. (it's only an example, but one I really
experienced)
OTOH, OS/2 will tell you right away when you do something like that, which
means less "random bugs".

 LR> In the last nine years while I have doing development on my apps, I
 LR> have crashed DOS only about 3 -4 times. My fault as a programmer.

 LR> I simply re-booted, found my obvious memory overrun problem - and
 LR> fixed it. No big deal for me.

The problem is, you may have some overrun errors that went unnoticed ! They
are the most dangerous errors.


A bientot, Julien!

 [Team OS/2 FR]

--- I receive 30+ personal mails daily, so do not expect a quick answer.


* Origin: ChaOS/2 - The Team OS/2 BBS France - +33-1-30472772 (2:320/0)
SEEN-BY: 12/2442 54/54 620/243 624/50 632/348 640/820 690/660 711/409 410 413
SEEN-BY: 711/430 807 808 809 934 942 949 712/353 623 713/888 800/1
@PATH: 320/0 322/2 512/1 0 4 141/209 270/101 396/1 3615/50
@PATH: 229/2 12/2442 711/409 54/54 711/808 809 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.