🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #2498

Need help with overlays

#2498
From: John Krist
Date: Wed, 03 Oct 1990 14:01
47 lines
1860 bytes
  Greetings:

     I have been having some problems developing overlays and hope someone
  out there in NetLand can help me.

     I'm writing graphics device drivers which are loaded in as overlays
  using the DOS 21h interupt EXEC overlay function.  I'm using Turbo C
  (actually Turbo C++), but I am not using their (Borland's) overlays.
  I set aside memory with the allocmem function and load in the overlay
  using an intdosx call.  The overlay is of the form:

  	CSEG  blah blah blah 'code'

	initov  proc  far
	    (Returns the offsets of the other routines, calling program
	     sets up the segment)
        initov  endp

	firstproc proc far
	    blah blah blah
	firstproc endp

	  ...
        
	lastproc proc far
	    blah blah blah
	lastproc endp

	CSEG  ends
	END

  Standard type of stuff.  It works fine, until I added just one more 
  procedure.  After I did that, any routine in the overlay would execute
  properly, but would hang the system when it returned.  I tossed out
  various procedures, and it would still hang as long as there were a certain
  number of procedures (or the code was above a certain size, perhaps).
  The exe size of the working code is about 2000, and the non-working code is
  about 2500 bytes.  There is plenty of memory and stack allocated for the 
  thing to use.

  This is driving me nuts.  Any help would be appreciated.

  John Krist
  krist@stsci.edu
  Space Telescope Science Institute
  Baltimore, Md
Technical Details
Message-ID: <1855@nemesis.stsci.edu>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!aplcen!samsung!cs.utexas.edu!asuvax!noao!stsci!krist

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!aplcen!samsung!cs.utexas.edu!asuvax!noao!stsci!krist
From: krist@stsci.EDU (John Krist)
Newsgroups: comp.os.msdos.programmer
Subject: Need help with overlays
Message-ID: <1855@nemesis.stsci.edu>
Date: 3 Oct 90 14:01:37 GMT
Distribution: na
Organization: Space Telescope Science Institute, Baltimore, MD 21218
Lines: 47