Introduction to System Commands

Rewritten July 2022

As its name suggests, A-Shell is a shell program: an environment for running programs which sits above the native operating system and provides additional services to facilitate application development and portability. Like other shell programs, A-Shell presents the user with a prompt, frequently referred to herein as the "dot prompt" since the default prompt consists of a period. At this prompt the user can enter commands for standard operations such as changing directories, execute high-level file operations like DIR, COPY, ERASE, PRINT, etc., set parameters for and retrieve information about the environment, track other processes, and of course run, compile and edit programs. Generically these kinds of commands are known as "shell commands;" but to avoid confusion with other levels and types of shell commands, such as Linux or Windows shell commands, they are referred to in this documentation as "A-Shell System Commands" or just "System Commands".

A-Shell System Commands are actually written in A-Shell BASIC and thus are nearly the same as regular programs except:

•   The file extension is LIT instead of RUN.

•   The default location—i.e., search path—is the SYS: directory, DSK0:[1,4]

•   Although they can be interactive, they typically accept parameters via command line arguments and switches

•   They are executed by name without the need for the RUN, e.g. "DIR" instead of "RUN DIR".

See the following topics for more details and a complete list of System Commands. Also see Command Files for information on how sequences of system commands can be strung together in executable files.

Old copy, replaced with above 7/4/22. Leave for now, delete in six months.

Although A-Shell is primarily a development and runtime environment, it also contains an emulation of the AMOS monitor mode (aka "dot prompt") for the benefit of applications, developers, and users that rely on monitor mode for auxiliary operations. Examples of such operations include copying and erasing files, performing maintenance on ISAM files, getting system status, building function key translation tables, displaying directory lists, dumping files, and logging to different PPNs—and of course, running, compiling, and editing programs.

The operations just described are all implemented via program files, which under both AMOS and A-Shell, have the extension "LIT" and are thus sometimes referred to as "LIT commands." Under AMOS, the LIT name was thought to derive from the idea that these were "literal" commands (i.e. machine language to be executed literally by the CPU) as opposed to commands that are interpreted by some higher-level software (like BASIC programs). Under A-Shell, they are implemented in BASIC and thus the LIT extension may be a bit misleading, but we decided to stick with it nonetheless since the distinction is no longer relevant.

Some of the A-Shell LIT commands are essentially replacements for existing host operating system utilities (e.g. COPY, DIR, ERASE), but others are so AMOS or A-Shell-oriented that there would be no host operating system equivalent (e.g. ISMDMP, ISMUTL, SUBMIT, SYSTAT, etc). Even for the first category, the many differences between AMOS and Windows or UNIX syntax make the A-Shell emulations of the AMOS LIT commands worthwhile. For example, what would be the Windows/UNIX equivalent of the command "COPY [,0]=*.RUN/Q"?

Although LIT commands are useful in themselves and often typed directly by users at the "dot prompt", they are more commonly grouped together in CMD or DO files, which are conceptually equivalent to BAT or script files under Windows or shell scripts under UNIX. Due to the obvious utility of being able to create a complex series of command operations that can be invoked via a single command line, they are extensively used in most existing applications. This, perhaps more than any other reason, is the justification for implementing so many of the AMOS LIT commands in A-Shell—i.e., so that existing CMD and DO files would not have to be rewritten when porting applications from AMOS. A section on the details of writing Command Files is included at the end of this document.