C H A P T E R T W O Command Dictionary 2.1 Shell Phraseology This is a sequence of characters describing the location of a directory to the Shell. There are three methods that the Shell recognises, which were described in chapter one of this manual. A file path is a directory path with a file name specified after the directory path. The file name is appended to the directory path and separated by a single slash ('/'), but no spaces. Some commands can operate in different ways. Such commands allow the user to tailor their operation by selecting options. These options are invoked by the use of "selectors". In general these are a sequence of characters prefixed by "&". Details are given for each command where such selectors exist. [RETURN] indicates that the key marked RETURN or ENTER should be pressed. 2.2 Internal Commands Internal commands are commands which exist as part of the main operating system code. As such, they do not need to be loaded from the disc, and hence execute almost immediately. Another advantage is that the commands can be executed as subroutines to other commands, or from within transient programs such as text editors. They are usually very common or useful routines. 2.2.1 The CD command Description :Change Directory Format :CD Changes the position (or location) of the working directory within the tree structure. The working directory is used for specifying relative path names. A good habit to get into is creating a directory for every topic the computer is used for. When dealing with that topic, use CD to move into the related directory. If the is not given, the user will be returned to their home directory. CD can be abbreviated by simply entering the directory path followed by a colon:- 1>CD /COM --> 1>/COM: Example:1>CD [RETURN] This makes your home directory the current directory. This places you in the same position as when you first started the session. 2.2.2 The LF command Description :List Files Format :LF [] Lists the contents of the given directory, or the working directory if no directory path is given. The files are listed in the following format:- DRIVE {} USER <1 .. 15> [++<>] [++] Example:1>LF /COM Lists the contents of the COMmand directory. These are the system program files for external commands. 2.2.3 The PWD Command Description :Print Working Directory. Format :PWD Prints the absolute path to the working directory. This command can't be abbreviated (see ALIAS). 2.2.4 The CAT command Description :ConCATenate. Format :CAT ++<[] > Outputs the contents of the given files to the VDU. The listing will be paused after a window full has been displayed. Pressing [SPACE] will enable the listing to continue. If several files are specified, there will be no break between the display of each file in the sequence. As mentioned above, CAT will usually operate even if it is sending the results to a screen window of smaller size. If paging does not appear to be correct, however, ^S can be pressed to pause the display, and ^Q to restart it. Note that while CAT will display the contents of the object file produced by the COMP program (see later) the contents will not be displayed correctly. This is because such files are stored as true ASCII-rather than the TEXT format used by Centrox. If the selector "A" is given then the following file will be treated as a true ASCII file. This allows object code produced by COMP to be listed. Note that the "A" selector only holds for one file-it must be invoked before EVERY file path that requires it if several file paths are given. Note that due to memory restrictions, CAT does NOT translate the backward single quote character into a double quote character and hence text files may look odd. Example:1>CAT -/login.usr This lists the contents of your login file. The commands that are shown by this command will be executed as soon as Centrox is able, and before you type your first command. :2>CAT &A ascii1.dat text.dat &A ascii2.dat Lists an ASCII file, followed by a text file and finishes by listing another ASCII file. 2.2.5 The DATE Command Format :Date [] Takes the given date - or the current date if none was given - and works out the day that the date occurred on. The result is then output in the following form:- , Note that the date is given to the routine as a number whilst the month may be given numerically or literally. In the resulting output, the day is given literally, as is the month. The year, of course, is always input-and output-numerically. The system used to calculate the date takes into account the various "modifications" made to the calendar. It works out the date according to the Protestant version of the Julian calendar. The routine used by the Shell was first published in Amstrad Action. The source code from which the routine was derived was written by Gary Nugent and published in the July '87 issue of Amstrad Action. Note that the Shell will ask the user to set the correct date when signing on, failure to set the date correctly will not "upset" the system but since an illegal date can't be entered, there is little point in not entering the date correctly-the facility was provided for the user, not the machine. Example:1>DATE 28 2 1967 2>DATE 28 February 1967 3>D. 28 F. 1967 These all show the same information..the day that I was born, Tuesday, February the 28th 1967. Note the abbreviations employed in the third example. Error Messages "Illegal date"-The date you supplied was not legal. "No such date"-The date you supplied is legal, but was removed when the protestants corrected the calendar. "The date is:"-Standard reply. 2.2.6 The TIME Command Format :TIME Displays the current time on the VDU. The time is displayed in the following format:- : Note that the Shell will request the user to set the time while signing on. Note that the Shell will "ring" the chimes on the hour using the chime bell (see ECHO). As with the DATE command, incorrect setting of the time is not a problem, however an illegal time will be rejected. If the Shell is left in direct command mode for more than about 2 hours, its internal clock will lose time. If left in direct mode for any length of time, there will also be a slight delay after RETURN is pressed, while the clock is updated. This command can't be abbreviated (see ALIAS). Error Messages "The time is: