1 (edited by Alcoholics Anonymous 2017-08-11 05:54:46)

Topic: Generalized program launcher

I'm looking for a general way to launch programs and I'm wondering if this has been considered already.  Something by Andrew Owen has appeared and I'd like to expand on that further.

The problem being solved is how to distribute & automatically launch programs that consist of many binary files.  The idea is to store programs in their own directory inside a /programs hierarchy.

Then the user could run any program, by typing ".run name" with the .run dot command locating the program and appropriately starting it.

".run name" would:

1.  Look for a file or directory "/programs/name".
- If it is a file, this is a self-contained file loaded in a way tbd.  I'm looking at having z88dk automatically generate a single large file containing everything - runtime configuration, all memory banks and indexed areas for loading via esxdos.  esxdos can just seek within this file to load things on demand.  I'm not sure what will come of this yet.
2.  If "/programs/name" is a directory, look inside for:
- file "name".  This is a binary with short header that defines org and optionally a RAMTOP value.  The org can be inside the 0x2000 area where .run is running.  The intention is that this is a short binary that acts as loader for the program.
- file "name.sna".  .run loads this snapshot and starts it.
- file "name.tap".  Mount the tap file and execute equivalent of LOAD"".
If any three of the above is found, change current working directory to "/programs/name" before launch.

.run should be able to configure itself to use a different root dir for programs or perhaps a list of directories to search.
.run could maybe configure the self-contained file to set various options.
.run could be asked to report where the program is located
.run could be asked to list its search paths.