﻿# Introduction

_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 ASB 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".

Additional points:

- Binary Compatibility

While A-Shell’s system commands are binary compatible across A-Shell platforms, they are not binary compatible with the AMOS LIT commands. In fact, as previously mentioned, A-Shell’s LIT commands are simply ASB programs that have been renamed from .RUN to .LIT, and which have appropriate startup logic to process command line arguments. You can create your own system commands by doing the same thing.

- Host Command Execution

While A-Shell's set of System Commands is sufficient for most tasks, and has the advantage of being portable, you can also invoke host operating system (or host shell) commands without leaving A-Shell. This is accomplished via the [HOST](host.md) or [SHLEXC](shlexc.md) commands. For example:

.HOST grep ABCD /vm/logs/a\* > alogs.lst \&    ; (Unix) execute grep in background

.host explore      ; (Windows) launch explorer

.shlexc schedule.xlsx    ; (Windows) launch app registered for xlsx files

- Command Scripting

As with most other shells, A-Shell supports a scripting mechanism to allow command sequences to be combined and stored in files to be executed as a set. See [Command Files](commandfiles.md) for more details.

See the following topics for more details and a complete list of System Commands.

**Subtopics**

- [Syntax](syntaxsyscmd.md)

- [Wildcards](wildcards.md)

- [Command Search Path](commandsearchpath.md)

- [Command Line Editing and Recall](commandlineediting.md)