Path: 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: Date: 25 Feb 91 19:07:02 GMT Organization: Center for Design of Educational Computing, Carnegie Mellon, Pittsburgh, PA Lines: 50 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 void main(void) { hellovl(); } --------------- hellovl.c #include hellovl() { printf("overlay\n"); } ? ? Anyone see something obvious I've missed ? ? -- David Andersen dma@andrew.cmu.edu