Ticket #44126

Create minicmd as in ROM-DOS

Open Date: 2022-03-16 17:20 Last Update: 2022-03-17 18:01

5 - Medium
5 - Medium


From https://www.bttr-software.de/forum/board_entry.php?id=18814 by user 'roytam':

I wonder if you can create a super-mini edition of it, something like ROM-DOS's minicmd.com?

Additional information from ROM-DOS Configuring the Kernel [05 July 2006].pdf:

Further size reductions are possible by replacing the complete command interpreter
(command.com) with minicmd that is configurable to the exact DOS kernel commands
you wish to support. Minicmd can provide space savings up to 40K.
Minicmd is provided in the ROM-DOS Software Development Kit. The default
installation of ROM-DOS creates a subdirectory within the ROM-DOS directory called
"Minicmd". Within this directory is the file MINICMD.H. By modifying this Header file
the exact commands supported can be specified and the overhead from unnecessary or
unwanted commands is removed.

And from Single User ROM-DOS Guide.pdf (also in ROM-DOS User's Guide.pdf:

Mini-Command Interpreter
Note: The Mini-Command Interpreter is not provided with the SUV version of ROM-DOS.

Some ROM-DOS applications run on standard PCs and require full command interpreter functionality. Some ROM-DOS
applications do not require a command interpreter; for instance, when the application is loaded at boot time and runs until the
power is turned off.
The mini-command interpreter (MINICMD.COM) suits applications that require a limited and possibly tailored command
interpreter. MINICMD.COM contains only the basic functions of COMMAND.COM and is only 4KB as opposed to the
34KB of COMMAND.COM. MINICMD.COM supports program launching, limited batch file execution, echo control, and
environment management. MINICMD.COM can also be used to load applications specified in the AUTOEXEC.BAT file at
boot time.
/P (permanent) is the only option to MINICMD.COM. The permanent option causes MINICMD.COM to remain loaded at
all times and is used by ROM-DOS when initially loading MINICMD.COM. The permanent option causes MINICMD.COM
to ignore the EXIT command. The environment size (/E) option is not implemented. The initial environment size can be
specified when building ROM-DOS using the _env_para variable in the SYSGEN.ASM file.

External Commands
MINICMD.COM executes applications and batch files in the same manner as COMMAND.COM. MINICMD.COM
searches in the local directory for the program or batch file and then uses the directories specified in the PATH environment
variable. The search precedence is .COM file, .EXE file, then .BAT file.

Internal Commands
MINICMD.COM supports several internal commands. Each internal command can be enabled or disabled by means of a
#define statement in the file MINICMD.H. A description of each internal command is given in the following table.

(abbreviated list by 'bttr')

Configuring the Mini-Command Interpreter
MINICMD.COM is configurable and commands can be added to or removed from it. After modifications, MINICMD.COM
must be rebuilt using the Borland C compiler and assembler provided in the Datalight SDTK.
The command-table structure contained in CMDMAIN.C lists the internal commands and the associated C-function called
when that command is entered on the command line. Removing an entry from the command-table structure makes that
command unavailable.
A new internal command can be added by adding the command name, along with the name of the C-function into the
command-table structure. Each new C-function is placed into a separate file so it can be added or removed easily.
The C-prototype for functions implementing a mini-COMMAND is:
  void do_cmd(char *args);
When an internal command is entered, the function in the command-table is called with the text options following the
command on the command line. For example:
  C:\>DIR \bin\abc
The function to implement the DIR command is called with the args option equal to \bin\abc.

Ticket History (3/3 Histories)

2022-03-16 17:20 Updated by: bttr
  • New Ticket "Create minicmd as in ROM-DOS" created
2022-03-16 17:53 Updated by: mateuszviste

Not a SvarCOM goal. and I don't want it to become an ifdef-ridden monster like busybox.

This should probably be some separate, specialized assembly-crafted project. Good luck.

2022-03-17 18:01 Updated by: bttr
  • Status Update from Open to Closed
  • Resolution Update from None to Rejected

I have nothing to add.

Attachment File List

No attachments


You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » Login