Dos Shell

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

Dos Shell

Post by desertfish »

This is a "unix" inspired Dos Shell with a bunch of builtin commands to make day to day file operations (much) more convenient than via a regular Basic prompt.

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

A short description of the commands and the source code (Prog8) is available on github

There is some preliminary support for running separate external shell commands (or 'plugins' if you like), details on how to write those are on github as well. Finally, the pwd command can print a wrong result on official kernal roms, because it tries to use a new feature to obtain the current directory that has not yet been added into the offical rom at the time this post was created.

Screenshot_20230118_233543.jpg
Screenshot_20230118_233543.jpg (113.64 KiB) Viewed 52589 times
Try It Now!
Note: it looks like the shell's file functions act a bit unreliably in the web-emulator. Sometimes you get errors, sometimes not. On the real downloadable emulators, it works fine.
Attachments
shell.zip
(29.89 KiB) Downloaded 22 times
Last edited by desertfish on Sat Oct 26, 2024 2:35 pm, edited 6 times in total.
bleggett29
Posts: 14
Joined: Fri Jun 30, 2023 8:41 am

Re: Dos Shell

Post by bleggett29 »

Can this be compiled as a ROM? If so, what are the steps to do so? I'd like to insert this into my custom X16ROM like I've already done with x16edit. Thanks
User avatar
Adiee5
Posts: 8
Joined: Thu Jan 26, 2023 7:08 pm
Location: Poland
Contact:

Re: Dos Shell

Post by Adiee5 »

bleggett29 wrote: Wed Aug 30, 2023 2:06 am Can this be compiled as a ROM? If so, what are the steps to do so? I'd like to insert this into my custom X16ROM like I've already done with x16edit. Thanks
i guess you could rework the program, to be usable in the rom, but it'll require serious modification of the source code and potentially break compatibility with existing external commands for the shell. but anyway, why'd you want to embed it into ROM?
User avatar
desertfish
Posts: 1095
Joined: Tue Aug 25, 2020 8:27 pm
Location: Netherlands

Re: Dos Shell

Post by desertfish »

As Adiee5 already pointed out it would require substantial rework of the assembly code of the program.

Prog8 is not designed to create code that is ROMable, unfortunately.
bleggett29
Posts: 14
Joined: Fri Jun 30, 2023 8:41 am

Re: Dos Shell

Post by bleggett29 »

Thanks.
It was to be for my own curiosity, really. But taking a day to ponder, it probably wasn't a good idea to begin with.
User avatar
desertfish
Posts: 1095
Joined: Tue Aug 25, 2020 8:27 pm
Location: Netherlands

Re: Dos Shell

Post by desertfish »

updated the program with a bug fix for launching programs that are not named in "normal" case.
User avatar
desertfish
Posts: 1095
Joined: Tue Aug 25, 2020 8:27 pm
Location: Netherlands

Re: Dos Shell

Post by desertfish »

Updated with "time" and "date" commands, message of the day file support, and tab filename completion.
elscorcho
Posts: 4
Joined: Mon Jul 13, 2020 9:31 pm

Re: Dos Shell

Post by elscorcho »

So, my board came in yesterday and I'd like to add shell.prg to my autoboot.x16, but there's a problem.

My monitor required some geometry adjustments to get the image to fit on screen, which I saved to nvram. However, shell resets the screen geometry back to default on startup which hides the prompt.

I find the shell very nice to use. Is there a simple workaround for this issue?
User avatar
desertfish
Posts: 1095
Joined: Tue Aug 25, 2020 8:27 pm
Location: Netherlands

Re: Dos Shell

Post by desertfish »

I'm working on an updated version with improved configuration options. Stay tuned.
User avatar
desertfish
Posts: 1095
Joined: Tue Aug 25, 2020 8:27 pm
Location: Netherlands

Re: Dos Shell

Post by desertfish »

We're testing a new version of the shell with all configuration being done in a separate config script that you can tailor to your needs
Post Reply