SpartaDOS X Reference Manual |
The Command Processor — Commands |
BASIC Command |
Purpose | This command enters the internal BASIC in your XL or XE computer
(1200XL does not have internal BASIC). |
|
Syntax | BASIC [/N] [d:][path][fname] [parameters] |
|
Type | External — uses CAR.COM on device CAR: |
|
Related | CAR,
SET |
|
Remarks | If no filename is given, control is given to the
internal BASIC of your XL/XE computer. If you do specify a filename, the internal BASIC is enabled and the
binary file you specified is loaded and run. The optional
"parameters" are whatever the program "fname" needs. The
"/N" option returns to BASIC after running "fname", instead of the command processor which is the default. To automatically load and run a BASIC program from the command processor, read the I/O Redirection Section in the "Advanced Features" chapter.
This command is recognized by the command processor as an internal command that chains to the external program "CAR.COM", so both the CAR and BASIC commands share the same external program. CAR.COM is memory resident while you are in the BASIC environment, so MEMLO will be slightly higher during this period. SpartaDOS X has a MEM.SAV facility somewhat like that of Atari DOS 2, but much more powerful. The environment variable "BASIC" should be set to the file you wish to use as the memory-save file for BASIC. If no such environment variable exists, then the memory-save feature is disabled. If this feature is disabled, BASIC will be entered cold (there will be no program in user memory). The default value of the "BASIC" variable is "I:>BAS.SAV". You of course may change this with the SET command, for example: SET BASIC=D8:BASIC.SAV sets the variable to "D8:BASIC.SAV". To see the current value of "BASIC" (and all the other environment variables) just type: SET and to clear the variable (i.e. disable the BASIC memory-save feature) type SET BASIC (See the SET command for a further explanation.) With the memory-save feature enabled, if a problem is encountered when loading or saving the memory file (BASIC.SAV by default), an error message will appear. If this happens while loading the memory file, you will be prompted with the old MEMLO (when the file was saved). If an error exists while saving the memory file, you will be notified of that. In either case, you will have the option to abort and correct the problem or to proceed, deleting the memory file. Press the <ESC> key if you wish to abort or <RETURN> to proceed. More detail of the two situations that can occur follows:
In addition to saving the contents of user memory, the memory-save feature saves page 0 (from $80-$FF), and pages 4-6. This means that you may alternate between BASIC and CARtridge without losing what you were working on. When you enter BASIC the memory-save file is loaded, allowing you to edit a BASIC program, go to DOS, reboot the computer, and enter BASIC with exactly what you were working on before rebooting the system (as long as the memory-save file is present and valid). Performing a cold start (a jump to $E477) while in BASIC will cause the SpartaDOS X cartridge and the external cartridge plugged into the SpartaDOS X cartridge, if any, to be disabled. This will have the same effect as typing COLD /N from the command processor. |
Previous page |