Path: utzoo!utgpu!water!watmath!clyde!rutgers!cmcl2!brl-adm!umd5!mimsy!rab From: rab@mimsy.UUCP (Bob Bruce) Newsgroups: comp.sys.ibm.pc Subject: Re: Making overlays for BASIC or C Keywords: overlays Message-ID: <10265@mimsy.UUCP> Date: 20 Jan 88 17:08:49 GMT References: <305@stcvax.UUCP> Reply-To: rab@mimsy.UUCP (Bob Bruce) Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 25 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. >OR is this even the way to go??? 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. If you are using `C' then exec() is usually available as a library routine. You should also check out spawn(), if your library provides it. If you are using BASIC then you will probably need to write a small assembly stub to make the exec call. This is a little tricky since the exec system call destroys the stack pointer. You should save SS and SP in your code segment before invoking the interrupt. >Brent Haws {hao ihnp4 decvax ucbvax!nbires}!stcvax!rbh (303) 666-4297 >StorageTek Corporation, MD-3T, Louisville, CO 80028 Bob Bruce rab@mimsy.umd.edu uunet!mimsy!rab