New productivity upload: Dos Shell

Chat about anything CX16 related that doesn't fit elsewhere
Post Reply
User avatar
desertfish
Posts: 1098
Joined: Tue Aug 25, 2020 8:27 pm
Location: Netherlands

New productivity upload: Dos Shell

Post by desertfish »




Dos Shell




View File






A "unix" like Dos Shell with a bunch of builtin commands to make day to day file operations (much) more convenient than via a Basic prompt. Requires R41.

Tip: save this as AUTOBOOT.X16 to your sdcard and it will load every time you start the emulator.

Short description of the commands and Source code (Prog8) available here https://github.com/irmen/cx16shell/






 
Stefan
Posts: 456
Joined: Thu Aug 20, 2020 8:59 am

New productivity upload: Dos Shell

Post by Stefan »


Great work, already a lot of convenient functions.

Have you considered deciding an absolute path for a folder to store utility programs run by the shell?

User avatar
desertfish
Posts: 1098
Joined: Tue Aug 25, 2020 8:27 pm
Location: Netherlands

New productivity upload: Dos Shell

Post by desertfish »


I'd like to but there is no interface defined yet for such utility programs. 

Simply running them as a basic program is not feasible, I think (it would overwrite the shell itself, for one thing) and we couldn't find a way to "JSR" into a basic program such that on exit control flow returns to the caller.

Stefan
Posts: 456
Joined: Thu Aug 20, 2020 8:59 am

New productivity upload: Dos Shell

Post by Stefan »



On 8/2/2022 at 7:11 PM, desertfish said:




I'd like to but there is no interface defined yet for such utility programs. 



Simply running them as a basic program is not feasible, I think (it would overwrite the shell itself, for one thing) and we couldn't find a way to "JSR" into a basic program such that on exit control flow returns to the caller.



OK. I was thinking of utility programs designed to work with the shell. At the moment you have the command that starts the editor. It will work only if the program is stored in the current directory. In the future you may have other utilities that can be started from within the shell. I just thought it would easier to store these programs using an absolute path.

TomXP411
Posts: 1785
Joined: Tue May 19, 2020 8:49 pm

New productivity upload: Dos Shell

Post by TomXP411 »



On 8/2/2022 at 9:41 PM, Stefan said:




OK. I was thinking of utility programs designed to work with the shell. At the moment you have the command that starts the editor. It will work only if the program is stored in the current directory. In the future you may have other utilities that can be started from within the shell. I just thought it would easier to store these programs using an absolute path.



The obvious problem is that different people will want to store their utilities in different places. 

The solution is probably to store the path in memory, either using a configuration file, or take the CP/M approach and patch the executable with the desired path. (That would be faster, although it would require a separate "patch" program that knows the address of each of the pre-configured filenames.)

User avatar
desertfish
Posts: 1098
Joined: Tue Aug 25, 2020 8:27 pm
Location: Netherlands

New productivity upload: Dos Shell

Post by desertfish »


or just use a fixed convention such as "shell-cmds" and tell the user not to interfere ?

User avatar
desertfish
Posts: 1098
Joined: Tue Aug 25, 2020 8:27 pm
Location: Netherlands

New productivity upload: Dos Shell

Post by desertfish »


Just uploaded a new version with an experimental API for external commands loaded from disk, at $4000 in memory.  See github page for details about the API

Post Reply