deven@pawl.rpi.edu (Deven Corzine) (03/02/89)
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.
andy@cbmvax.UUCP (Andy Finkel) (03/03/89)
In article <DEVEN.89Mar1180622@daniel.pawl.rpi.edu> shadow@pawl.rpi.edu (Deven Thomas Corzine) writes: >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. > I'm planning to have some extensive revisions of the way resident works for 1.4. Therefore, please don't use the DOS resident list. Right now we're the only ones using it, so we can be fairly free with changes. (well, MCC uses it, but they hang aliases off it, which is incorrect anyway :-) ) So I'd prefer to keep quiet about the data structures, locking conventions, and internal workings of the shell on this. Instead I suggest you set up a resident list for your shell, and hang it either off a public message port, or a resource. >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 C programs should not be using Exit() which never matches the exit things your compiler startup wants you to clean up. The shell has the responsibility of unloading (or not unloading in the case of resident segments) the programs. I have this vision of a resident handler ... :-) -- andy finkel {uunet|rutgers|amiga}!cbmvax!andy Commodore-Amiga, Inc. "Question of the Day : When will we get a device independent graphics standard that is fast enough to actually be useful ?" Any expressed opinions are mine; but feel free to share. I disclaim all responsibilities, all shapes, all sizes, all colors.