Minimalist shell for Amstrad CPC with m4. People not interest by QuickCMD by No Recess may not be interest by bndsh... Bndsh consists in a simple line editor where you'll type various commands. The additional value in comparison to the BASIC prompt of the Amstrad is the ability to propose completions a better integration of RSX with string parameters and a native folder management.
The main difference between BNDSH and QUICKCMD is that QUICKCMD is an application, whereas BNDSH replace the system call TEXT_INPUT (&BD5E) by a modified one.
However, fell free to test and provide patches as there are tons of bugs.
The line edition is similar to the one provided by the BASIC and can be used in the following way: COMMAND [ARGUMENT...].
- If command is an
internal commandthe internal command is executed. - If command is an
RSX, the RSX is executed with the following string arguments (currently only up to 2 arguments are possible). - If command is a
folderthen it becomes the working directory. - If command is a
filethen the firmware tries to load and launch it. If it succeed you have no more access to bndsh. (highly limited has bndsh is still not in ROM) - Otherwise the system displays an error message.
The current internal commands are:
basicto inform that the remaining part of the line concerns a BASIC instruction (only useful when a commad/executable/RSX has the same name than a BASIC instruction and would be automatically selected instead)clearto clear the screen (ascls).crtcto display crtc number.exitto jump to BASIC interpreterheaderto display the header of a filehelpto display the list of internal commandslssimilar to cat (M4 required)moreprint an ASCII file on screenmvrename a file (some order of parameters thanmvof unix, not|RENofAMSDOS)pwdto print the current working directory (M4 required)romto manage the roms (currently nothing more that a listing)
The original shortcuts are:
- left: move cursor to the left
- right: move cursor to the right
- CONTROL + left: move cursor to the beginnig of the line
- CONTROL + right: move cursor to the end of the line
- CONTROL + up: move cursor to the beginnig of the text
- CONTROL + down: move cursor to the end of the text
- SHIFT + left: move copy cursor to the left
- SHIFT + right: move copy cursor to the right
- SHIFT + up: move copy cursor to the up
- SHIFT + down: move copy cursor to the dowa
- CONTROL + TAB: switch between insert/replace modes
- BREAK: breaks the input control flow
- ENTER: validate and execute the instruction of the line by the BASIC interpreter
The additional shortcuts are:
- TAB: control autocompletion on filenames, RSX, internal commands. Note that there are still bugs there
- ENTER: before the BASIC interpreter manages the line, the shell execute its own instructions
The additional RSX commands are:
|DSKSEARCH,"KEY"orDSKSEARCH KEYmakes a search on CPCRULEZ and print on screen pairs of code and filename (M4 ROM needed)|DSKGET,"CODE"orDSKGET CODEdownload the 1st DSK file from the archive identified by the code (given by DSKSEARCH). A current limitation of the|HTTPGETRSX imposes to manually rename the downloaded file:MV BRIDGE.PHP MYDSK.DSK.
- Better integration of RSX (currently only 2 string arguments are possible ...)
- More internal commands if needed
- Ability to bypass internal commands or rsx
- Better RAM management (use the latest page of the latest bank available on the machine in order to work on CPC6128 without extra RAM)
- Autocompletion is a bit capricious (files search fails elswhere than in the root folder, completion sometimes fail)
- The ROM must be deactivate to launch some program (ESC at startup) with RUN"XXX; no idea why
- The auto run features considers that the file is a binary one (so expect a nice reboot for basic ones)
$ ./bootstrap.sh make-
Mandatory
- Ramcard or equivalent (Megaflash, X-Mem, M4, ...)
- Additional Memory (X-Mem, ...)
-
Optional
- M4 (the project has less interest without it)
Use your rom manager to put BNDSH.ROM in the slot of your choice. Note that I have never tested in another place than 1.
The indirection is automatically installed.
If you want to disable BNDSH, pres ESC while the firmware initialises the ROMs.