Article View: comp.os.msdos.programmer
Article #4869Turbo C++ overlay problem?
From: David Andersen
Date: Mon, 25 Feb 1991 19:07
Date: Mon, 25 Feb 1991 19:07
50 lines
1804 bytes
1804 bytes
I'm having a problem with TURBO C++ 1.0 (actually, 1.01 - we did get the
maintenance release) - I've a VERY simple test program which gives "Null
pointer assignment" on exit.
The debugger shows "cd 3f" at DS:0000 before (and after) any of my code
executes -
which looks like an "int 3f" instruction, which looks like TURBO C
overlay initializations are overwritting memory - which makes me think
I've missed something utterly obvious in the compiler or link
directives, but I don't see it........
Enclosed are the makefile, link directives file and *.c files:
------------- makefile
hello.exe: hello.obj hellovl.obj
tlink @hello.lnk
hello.obj: hello.c
tcc -c -mm -N -Y hello.c
hellovl.obj: hellovl.c
tcc -c -mm -N -Yo hellovl.c
-------------- hello.lnk
/v /s /o- c:\tc\lib\c0m.obj+hello.obj+ /o+ hellovl.obj /o-
hello,hello
c:\tc\lib\overlay.lib+
c:\tc\lib\emu.lib+
c:\tc\lib\mathm.lib+
c:\tc\lib\cm.lib
--------------- hello.c
#include <stdio.h>
void main(void) { hellovl(); }
--------------- hellovl.c
#include <stdio.h>
hellovl() { printf("overlay\n"); }
? ? Anyone see something obvious I've missed ? ?
-- David Andersen
dma@andrew.cmu.edu
Technical Details
Message-ID:
<cbmK1Ki00VQCIXI0RM@andrew.cmu.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!spool.mu.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!magnus.ircc.ohio-state.edu!tut.cis.ohio-state.edu!sei!fs7.ece.cmu.edu!o.gp.cs.cmu.edu!andrew.cmu.edu!dma+Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!spool.mu.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!magnus.ircc.ohio-state.edu!tut.cis.ohio-state.edu!sei!fs7.ece.cmu.edu!o.gp.cs.cmu.edu!andrew.cmu.edu!dma+ From: dma+@andrew.cmu.edu (David Andersen) Newsgroups: comp.os.msdos.programmer Subject: Turbo C++ overlay problem? Message-ID: <cbmK1Ki00VQCIXI0RM@andrew.cmu.edu> Date: 25 Feb 91 19:07:02 GMT Organization: Center for Design of Educational Computing, Carnegie Mellon, Pittsburgh, PA Lines: 50