Path: utzoo!mnetor!uunet!lll-winken!lll-lcc!ames!amdahl!dlb!ardent!rap From: rap@ardent.UUCP (Rob Peck) Newsgroups: comp.sys.amiga Subject: Resident programs Message-ID: <317@ardent.UUCP> Date: 19 Feb 88 17:25:23 GMT Organization: Dana Computer, Inc., Sunnyvale, CA Lines: 29 Keywords: RSN, neat, RESIDENT Last night, at the BADGE meeting, Jim Goodnow II showed a few slides describing a program he is working on to make most-any program "resident", even if it was not designed to be resident in the first place. Some programs, like those in BCPL, are pure code and don't modify their code segment while they run, allocating a data segment so to speak, when they run. C programs are not usually that lucky, having both a segment of initialized and noninitialized data. Jim's program patches a few things in the AmigaDOS tables, provides a custom loader for programs that runs as a resident library, and effectively relinks the seglists of the loaded program so that each invocation of the program can have a fresh copy of the data segments, with the pure code repositioned at the end of the seglist and the new data segments at the beginning, with a jump ahead of the data (since the first segment first word is usally the beginning of the code as far as AmigaDOS is concerned). For now, the program works best with code compiled with Aztec 3.4/3.6, but he is planning to extend the program to recognized other compiler constructs (the program binary image has to be patched in some areas to assure that the data is correctly referenced). As I understood, small model (data area less than 64k), data referenced through A4, works the best. When? Who knows, but it was certainly a stimulating lecture (slightly over an hour, with "slides" showing where the patches would be wedged in). Price? I cannot speak for Jim, but I think I heard him say maybe PD. Good job on the lecture, Jim. I'm looking forward to it! Hope the slides are part of the docs you release for it, WELL DONE! Rob Peck ...ihnp4!hplabs!ardent!rap