🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.misc
Article #476

Turbo C++ problem

#476
From: Deryk Barker
Date: Fri, 30 Nov 1990 19:07
26 lines
1587 bytes
I don't know if anyone else has encountered this problem or not...

I'm  converting a package I originally wrote using Turbo C 2.0, then ported to
Microsoft  C  6.0,  to  Turbo  C++ 1.0.  My problem is that with largeish exec
files  (>170K including debug info) using the large model somebody is screwing
up the stack/heap.

As  far  as  I can ascertain, the problem is caused by the fact that after the
.EXE  has been loaded into memory, the SS register and DGROUP segment have the
same  address.   This  means  that  when  C0,  the  startup  routine, does its
memory/stack  calculations  it  releases  the wrong part of memory, you end up
with the stack pointing into static data and, worst of all, the initialisation
of  the  spare heap memory clobbers DOS's memory allocation information.  So -
not only won't the program run properly, but, let it get past C0, and you have
to reboot.

I  am  unable,  as  yet,  to  establish  whether  this is a compiler or linker
problem.   If anyone has seen anything similar, or there's anyone from Borland
listening, please respond.

Deryk Barker, 
Jupiter Software, 
Victoria BC.

"Send Lawyers, Guns and Money,
 Dad, get me out of this!"
Technical Details
Message-ID: <901130190725.578799@SYSTEM-M.PHX.BULL.COM>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!peregrine!elroy.jpl.nasa.gov!usc!apple!agate!ucbvax!SYSTEM-M.PHX.BULL.COM!DBarker

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!peregrine!elroy.jpl.nasa.gov!usc!apple!agate!ucbvax!SYSTEM-M.PHX.BULL.COM!DBarker
From: DBarker@SYSTEM-M.PHX.BULL.COM (Deryk Barker)
Newsgroups: comp.sys.misc
Subject: Turbo C++ problem
Message-ID: <901130190725.578799@SYSTEM-M.PHX.BULL.COM>
Date: 30 Nov 90 19:07:00 GMT
Sender: daemon@ucbvax.BERKELEY.EDU
Organization: The Internet
Lines: 26