Path: utzoo!utgpu!water!watmath!clyde!ima!johnl From: johnl@ima.ISC.COM (John R. Levine) Newsgroups: comp.sys.ibm.pc Subject: Re: Making overlays for BASIC or C Keywords: overlays Message-ID: <856@ima.ISC.COM> Date: 21 Jan 88 17:50:23 GMT References: <305@stcvax.UUCP> <10265@mimsy.UUCP> Reply-To: johnl@ima.UUCP (John R. Levine) Organization: Not enough to make any difference Lines: 27 In article <10265@mimsy.UUCP> rab@mimsy.UUCP (Bob Bruce) writes: >In article <305@stcvax.UUCP> rbh@stcvax.UUCP (Brent Haws) writes: >>Is anyone there out there that has knowledge of how to make >>an overlay file for an EXE file. I have one that is getting large. > >I have used overlays in the past, and they are NOT the way to go >in most cases. Use the `exec' system call, and let the operating >system do the dirty work. exec() is OK if the various parts of your program don't need to communicate much, and if it's acceptable to put each overlay in a separate file. If you really have one program that just doesn't fit, then overlays are a perfectly reasonable approach. The latest version of MS C finally gives some hints about how to use their overlayer, e.g.: Z> cl a.c (b.c c.c) d.c will overlay the code for b and c in the same area. Haven't used it, so don't know how well it works. There are also overlay linkers you can buy. I have used Phoenix' PLINK and it works pretty well, once you get used to its various funkinesses. In both cases, you can overlay object code from any language that generates normal .obj files and uses far call instructions to link from one routine to another. -- John R. Levine, IECC, PO Box 349, Cambridge MA 02238-0349, +1 617 492 3869 { ihnp4 | decvax | cbosgd | harvard | yale }!ima!johnl, Levine@YALE.something Gary Hart for President -- Let's win one for the zipper.