Quick Reference to the Shell
GSoft BASIC, the FREE Version! 1.2

(This document is formatted for a monospaced font like Courier.)

Entering Commands
-----------------

Type the command as shown in the command description and press the return key. The command executes immediately.

   Anything shown in uppercase letters should be typed exactly as you see it.  Lowercase letters indicate a field that you need to fill in with some value.  A field enclosed in square brackets is optional.  If the square brackets are followed by a * character, the optional field can be repeated any number of times.

   You can enter programs or BASIC commands, too.  To enter a BASIC command that executes immediately, type the command and press the return key.  To enter a BASIC command into a program, type a line number followed by the command.  For example, to enter a simple BASIC program that counts to 10, type these lines.  End each line by pressing the return key.

   10 FOR I = 1 TO 10
   20    PRINT I
   30 NEXT

You can view the program by typing

   LIST

or run the program by typing

   RUN

   While GSoft BASIC supports line numbers, most GSoft BASIC programs don't use them.  Use the EDIT command to view and edit programs that do not use line numbers.

BYE
---

   Exits GSoft BASIC.

CAT [ pathname ]
----------------
CATALOG [ pathname ]
--------------------

   Catalogs a directory.

   If no path name is given, the current directory is cataloged.  If given, the path name can be a full or partial path name, the name of a volume, or the name of a device.

   The abbreviation CAT can be used instead of the full name of CATALOG.

COPY from to
------------

   Copies a file from one location to another.

CREATE pathname
---------------

   Creates a new directory.

DEBUG [ linenumber | filename ]
-------------------------------

   Runs a program, with the same options as the RUN command.  The difference is that DEBUG enters an ORCA compatible debugger (like ORCA/Debugger or Splat!), breaking on the first line executed.

   Do not use this command unless an ORCA compatible debugger is installed!  ORCA compatible debuggers work by intercepting the 65816 COP instruction.  There is no way for GSoft BASIC to tell if a debugger is installed or not, so it will issue the COP instruction whether or not a debugger is actually present.  If there is no debugger installed, this causes the computer to crash.  While this does no actual harm, the only way to recover is to reboot.

DEL start [ ',' end ]
---------------------

   Deletes a single line or a range of lines.

   The DEL command cannot be used with programs that do not use line numbers on every line.

DELETE filename
---------------

   Deletes the named file.

   The file can be a directory.  After checking to be sure the user really wants to delete the directory and its contents, all files in the directory and the directory itself are deleted.

EDIT [ filename ]
-----------------

   Enters an ORCA compatible editor, displaying the program in memory.  If a file name is given, the file is loaded and edited exactly as if the commands

LOAD filename
EDIT

were used.

LIST [ line-number [ ',' [ line-number ] ] ]
--------------------------------------------

   Lists the entire program, a single line, or a range of lines.

LOAD filename
-------------

   Loads a program from disk.

   The program may be a GSoft BASIC tokenized file, a TXT file, or a BASIC SRC file.  If the file is a TXT or SRC file, it is handled as if the NEW command was used, then each of the lines in the file was typed in turn.

LOCK filename
-------------

   Locks a file. Locked files cannot be renamed, deleted, or written to.

MOVE from to
------------

   Moves a file from one location to another.

NEW
---

   The program is deleted from the workspace.

PR [ line-number [ ',' [ line-number ] ] ]
------------------------------------------

   Works like LIST, but sends the listing to a printer that is supported by the .PRINTER driver.

PREFIX [ pathname ]
-------------------

   Changes the default prefix (GS/OS prefix number 8) to the given path name.

   If no prefix is given, the current value for the prefix is shown.

   A path name consisting of two periods moves up one directory level.

RENAME old new
--------------

   Renames a file.

RENUMBER [first [',' [step] [',' [start] [',' [end]]]]]
-------------------------------------------------------

   Renumbers a program.

   first    First line number to use.
   step     Increment between new line numbers.
   start    First line to renumber.
   end      Last line to renumber.

   If a value is omitted, the assumed value is:

    parameter value
    --------- -----
    first     10
    step      10
    start     0
    end       65535

RUN [ line-number | filename ]
------------------------------

   Runs a program.

   If a number is supplied as a parameter, program execution starts at that line.

   If a file name is supplied as a parameter, the file is loaded and executed.  The file may be a GSoft BASIC tokenized file, a TXT file, or a BASIC SRC file.  If the file is a TXT or SRC file, it is handled as if the NEW command was used, then each of the lines in the file was typed in turn.

SAVE filename
-------------

   Saves a program to disk.

   The file is saved as a GSoft BASIC tokenized file.

SSAVE filename
--------------

   Saves a program to disk.

   The file is saved as an ORCA BASIC source file.

TSAVE filename
--------------

   Saves a program to disk.

   The file is saved as a text file.

UNLOCK filename
---------------

   Unlocks a file locked with the LOCK command. Locked files cannot be renamed, deleted, or written to.
