Difference between revisions of "Acquainting yourself with SpecBAS"

From SinclairFAQ
Jump to: navigation, search
Line 12: Line 12:
 
  10 PRINT "Hello World"
 
  10 PRINT "Hello World"
 
  20 PRINT "Goodbye": PRINT "World"
 
  20 PRINT "Goodbye": PRINT "World"
This should now be stored in memory, and displayed at the top of the window. To execute a program, enter the command> RUN. To stop a program that is running and return to the editor, press escape. To save a program to disk, enter> SAVE "filename" . To retrieve a saved program, enter> LOAD "filename" . The command> NEW will erase a program from memory. Individual lines can be erased by entering their line number alone ( to erase line 20, simply enter> 20 ).
+
This should now be stored in memory, and displayed at the top of the window. To execute a program, enter the command> RUN. To save a program to disk, enter> SAVE "filename" . To retrieve a saved program, enter> LOAD "filename" . The command> NEW will erase a program from memory. Individual lines can be erased by entering their line number alone ( to erase line 20, simply enter> 20 ). Entering> QUIT will exit SpecBAS.
 +
 
 +
==Editor controls==
 +
 
 +
ctrl + cursor up    =  select previous line
 +
ctrl + cursor down  =  select next line
 +
ctrl + f1          =  edit selected line
 +
escape              =  terminate, or 'break into' program

Revision as of 00:14, 14 January 2011


A quick guide to getting started in SpecBAS

The BASICs for new users

When SpecBAS starts up, you will be greeted with a window, which is blank other than a copyright message. SpecBAS is controlled by BASIC commands, which can be typed into the 'command line' at the bottom of the screen, and executed by pressing enter/return. If SpecBAS does not understand the command, the cursor will move to the point of the error and flash red. The layout will be familiar to anyone who has had experience of old 8-bit computers such as the Sinclair or Timex machines.

Hello World

Commands can be stored into memory by pre-fixing them with a line number, they are arranged by line number to form a program. The program currently stored in memory will be displayed at the top of the window. More than one command can be stored on one line, or executed from the command line, by separating them with a ":" colon. For example, enter the following program:

10 PRINT "Hello World"
20 PRINT "Goodbye": PRINT "World"

This should now be stored in memory, and displayed at the top of the window. To execute a program, enter the command> RUN. To save a program to disk, enter> SAVE "filename" . To retrieve a saved program, enter> LOAD "filename" . The command> NEW will erase a program from memory. Individual lines can be erased by entering their line number alone ( to erase line 20, simply enter> 20 ). Entering> QUIT will exit SpecBAS.

Editor controls

ctrl + cursor up    =  select previous line
ctrl + cursor down  =  select next line
ctrl + f1           =  edit selected line
escape              =  terminate, or 'break into' program