Applecorn icon indicating copy to clipboard operation
Applecorn copied to clipboard

Library/runpath/bin directory

Open jgharston opened this issue 3 years ago • 3 comments

Many platforms have the concept of a "library" directory where runned programs can be searched for from a common central location. eg Unix /bin, /usr/bin eg DOS SET PATH=C:\DOS;C:\BIN eg Acorn $.Library

So if a *command isn't built in, and can't be found in the current directory, it then looks in the central "library" directory. Does the Apple have this concept? It would be useful to implement as when using subdirectories you currently have to *run the absolute path to something that's not in the current directory.

jgharston avatar Nov 14 '21 18:11 jgharston

ProDOS doesn't really have a concept of a library directory (or a path). We could implement something in HostFS though ... would be a *LIB command, I guess. I did think about this when I was doing HostFS.

Incidentally, while I think of it. I notice that if all eight ROMs are loaded, some star command like *DIR take a long time, even though they should be serviced by Applecorn itself. Not sure why this is. Other command like *CAT seem to be instantaneous.

bobbimanners avatar Nov 14 '21 23:11 bobbimanners

"some star command like *DIR take a long time, even though they should be serviced by Applecorn itself. Not sure why this is. Other command like *CAT seem to be instantaneous."

That's 'cos *CAT is implemented by the MOS and passed to the filing system, *DIR is a filing system command, so it is first passed to all ROMs as with any other unrecognised command, and if no ROM recognises it, it is then passed to the filing system. The filing system always sees commands last, after everybody else has had a chance to get in.

Something I've been toying with is having a 'FileUtils' layer - I want to implement *DUMP, *LIST, etc.

jgharston avatar Nov 14 '21 23:11 jgharston

Makes sense. Figured it was something like that!

For FileUtils ... I would like *BUILD and *TYPE too eventually. And also *SPOOL and *EXEC (which we have a ticket for already.)

bobbimanners avatar Nov 14 '21 23:11 bobbimanners