Path: utzoo!attcan!uunet!lll-winken!csd4.milw.wisc.edu!leah!rpi!rpi.edu!deven From: deven@pawl.rpi.edu (Deven Corzine) Newsgroups: comp.sys.amiga.tech Subject: AmigaDOS V1.3 Resident data structures question (CATS?) Message-ID: Date: 1 Mar 89 23:06:22 GMT Sender: usenet@rpi.edu Reply-To: shadow@pawl.rpi.edu (Deven Thomas Corzine) Organization: RPI Public Access Workstation Lab, Troy NY Lines: 33 I working on writing a shell and a support library, and would like to be able to use seglists in the 1.3 Resident list. I DON'T want to have to use the V1.3 run command, or the DOS Execute() function. I want to be able to get at the list of resident seglists, usecounts and names, and to be able to modify said list. Therefore, I'm looking for both the data structures used by the Resident command (and how to find them) and any mutual exclusion conventions needed to modify the list. Also, when you run a resident command from the CLI or run, does Exit() have a check for a resident seglist to decide whether or not to UnLoadSeg() the seglist, or does it pass control back to the CLI or run command, which have to responsibility to UnLoadSeg() or not? Whichever it is, how could I setup Exit() so I can selectively UnLoadSeg() or not, depending on the number of invocations of the seglist? (i.e. I want code to automatically re-use any seglist that is already loaded, if the pure bit of the file was set, and only UnLoadSeg() when the last process running the code exits.) I do NOT intend to run under the CLI, though I may be forced to either fake it or patch Exit(), depending how difficult the problem is. I want to break from the CLI dependence of most Amiga shells, but I do want to keep things as compatible as I can. Does UnLoadSeg() do anything besides follow the seglist chain, freeing each segment until it reaches the end? Any help anyone has to offer is appreciated... Deven -- ------- shadow@pawl.rpi.edu ------- Deven Thomas Corzine --------------------- Cogito shadow@acm.rpi.edu 2346 15th Street Pi-Rho America ergo userfxb6@rpitsmts.bitnet Troy, NY 12180-2306 (518) 272-5847 sum... In the immortal words of Socrates: "I drank what?" ...I think.