|
|
|
|
Name |
|
Syntax |
|
Description |
|
BLOAD |
|
BLOAD "D:name" |
|
Binary loads file name (DOS option L with /N). |
|
BRUN |
|
BRUN "D:name" |
|
Binary load and run file name (DOS option L). |
|
DELETE |
|
DELETE "D:name" |
|
Deletes the file name (DOS option D). |
|
DIR |
|
DIR |
|
Disk directory (DOS option A). |
|
DIR |
|
DIR "Dn:*.*" |
|
Directory of drive #n, note that wildcard extenders may be used. |
|
LOCK |
|
LOCK "D:name" |
|
Locks the file name (DOS option F). |
|
RENAME |
|
RENAME "D:old,new" |
|
Renames the file name (DOS option E). |
|
UNLOCK |
|
UNLOCK "D:name" |
|
Unlocks the file name (DOS option G). |
|
|
|
|
|
Name |
|
Syntax |
|
Description |
|
CIRCLE |
|
CIRCLE x,y,r |
|
Plots a circle with center at x,y and radius r. |
|
CIRCLE |
|
CIRCLE x,y,r,r2 |
|
R2 is an optional "vertical radius" for true circles or ellipses. |
|
CLS |
|
CLS |
|
Clears the screen. |
|
CLS |
|
CLS #6 |
|
Clear screen opened in channel 6. |
|
FCOLOR |
|
FCOLOR n |
|
Determines fill color. |
|
FILLTO |
|
FILLTO x,y |
|
A fill command analagous to the BASIC commands "POSITION x,y: XIO18,#6,0,0,"S:" |
|
PAINT |
|
PAINT x,y |
|
Another type of fill command, this one is a recursive routine that will
fill any closed object as long as x,y are inside it. |
|
TEXT |
|
TEXT x,y,a$ |
|
Bit-blocks text in a$ at x,y. |
|
|
|
|
|
Name |
|
Syntax |
|
Description |
|
DPOKE |
|
DPOKE m,v |
|
Pokes location m,m+1 with 2-byte integer v: (0 <= v <= 65535). |
|
MOVE |
|
MOVE m,m1,m2 |
|
Block transfer; moves m2 (number of bytes) from starting position m to
new starting position m1. |
|
-MOVE |
|
-MOVE m,m1,m2 |
|
Same as MOVE but copies starting with the last byte of the block. |
|
BPUT |
|
BPUT #n,adr,len |
|
Block Put; same as: FOR I=0 TO len-1:PUT #n,PEEK (adr+I):NEXT I |
|
BGET |
|
BGET #n,adr,len |
|
Block Get; same as: FOR I=0 TO len-1:GET #N,A:POKE (adr+I):NEXT I |
|
%PUT |
|
%PUT #n,a |
|
Until now, there was no convenient way to put numeric values onto disk
or cassette files other than by using PRINT, which converted them to
strings first, a slow and cumbersome process. %PUT puts the number to
the device "as is," in 6-byte FP format. |
|
%GET |
|
%GET #n,A |
|
Get a number stored with %PUT from the device and store it in variable.
Again, this is much faster than using "INPUT #n, A". |
|
|
|
|
|
Name |
|
Syntax |
|
Description |
|
REPEAT |
|
REPEAT |
|
Start a REPEAT-UNTIL loop. |
|
UNTIL |
|
UNTIL |
|
Terminate when condition met. |
|
WHILE |
|
WHILE |
|
Start a WHILE-WEND loop to end when condition met. |
|
WEND |
|
WEND |
|
Terminate a WHILE-END loop. |
|
ELSE |
|
ELSE |
|
Optional extension for IF. The IF condition must not be followed by a
"THEN", but terminated by end-of-line or colon. |
|
ENDIF |
|
ENDIF |
|
Ends an IF-ELSE-ENDIF or IF-ELSE condition. Note that this allows an IF
condition to span more than one BASIC line, provided the "IF" statement
is structured as shown in Note 5. |
|
DO |
|
DO |
|
Starts an "infinite" DO loop. |
|
LOOP |
|
LOOP |
|
Cycle back to the start of a DO loop. |
|
EXIT |
|
EXIT |
|
Exit a DO-LOOP loop. |
|
PROC |
|
PROC name |
|
Start definition of procedure. |
|
ENDPROC |
|
ENDPROC |
|
End definition of procedure. |
|
EXEC |
|
EXEC name |
|
Execute procedure name. |
|
|
|
|
|
Name |
|
Syntax |
|
Description |
|
PAUSE |
|
PAUSE n |
|
Pause processing for n/50 seconds. |
|
RENUM |
|
RENUM n,i,j |
|
Renumber the program starting at line #n, first number is #i, increment
is #j. This function will handle GOTOs, TRAPs, and all other line
references except those which involve variables or computed values. |
DEL |
|
DEL n,i |
|
Delete lines n-i. |
|
DUMP |
|
DUMP |
|
Display all variables and values. For numeric arrays, the numbers are
the DIMed values plus one. For strings, the first number is the current
LENgth of it and the second number is the DIMed size of it. DUMP also
lists procedure names and labels with their line values. |
|
DUMP |
|
DUMP name |
|
DUMP to device, such as "P:" or "D:DUMP.DAT". |
|
TRACE |
|
TRACE |
|
Trace program during execution. |
|
TRACE |
|
TRACE - |
|
Turns trace mode off (Default). |
|
DSOUND |
|
DSOUND n,f,d,v |
|
Form of SOUND which activates channel-pairing for increased frequency
range. |
|
DSOUND |
|
DSOUND |
|
Turns off all sounds. |
|
GO TO |
|
GO TO n |
|
Alternate form of GOTO. |
|
*L |
|
*L |
|
Turn line-indent on (Default). |
|
*L |
|
*L - |
|
Turns line-indent off. |
|
*F |
|
*F (or *F +) |
|
Special mode for FOR..NEXT loops which corrects a bug in Atari BASIC.
Seems that in Atari BASIC, an "illegal" reverse loop like "FOR X=2 TO
1:PRINT X:NEXT X" will execute once even though the condition is met
initially (X is already greater than 1). Turbo BASIC fixes this bug,
but leaves it available for Atari BASIC programs which may take
advantage of it. |
|
*F |
|
*F - |
|
Turns off the special FOR..NEXT mode to make Turbo BASIC act like Atari
BASIC. |
|
*B |
|
*B (or *B +) |
|
Command which allows the break key to be trapped via the "TRAP" command
within a program. |
|
*B |
|
*B - |
|
Turns off the special BREAK key mode. |
|
-- |
|
-- |
|
Special form of REM which puts 30 dashes in a program listing. |
|
# |
|
# name |
|
Assigns the current line number to the label name. This is a convenient
way to get around the problem of renumbering when using variables as line
numbers. Labels can be thought of as a special form of variable, as they
occupy the variable name table along with the "regular" variables. We
also believe that the number of variables allowed has been increased from
128 to 256 to allow for the addition of these labels. |
|
GO# |
|
GO# name |
|
Analagous to the GOTO command. |
|
CLOSE |
|
CLOSE |
|
Close channels 1-7. |
|
DIM |
|
DIM a(n) |
|
Will automatically assign a value of zero to all elements of the numeric
array being dimensioned, and null characters to all elements of a string
(The LEN is still variable, however, and initially zero). |
|
GET |
|
GET name |
|
Wait for a key press, assign the value to name. Same as "OPEN
#7,4,0,"K:":GET #7,name:CLOSE #7". |
|
INPUT |
|
INPUT "text";a,b... |
|
Prints text as a prompt before asking for variable(s), same as
Microsoft-BASIC. |
|
LIST |
|
LIST n, |
|
List program from line #n to end. |
|
ON |
|
ON a EXEC n1,n2,... |
|
Variation of ON...GOSUB for procedures. N1, n2 and so on are names of
procedures to be run. ON a GO# n1,n2,... Similar to ON...GOTO except
that line labels are used instead of line numbers.
|
|
POP |
|
POP |
|
This command now pops the runtime stack for all four types of loops. |
|
PUT |
|
PUT n |
|
Same as "PRINT CHR$(n)"; |
|
RESTORE |
|
RESTORE #name |
|
Restores the data line indicated by the label name. |
|
RND |
|
RND |
|
Parentheses are no longer needed at the end of this command, but it will
still work if they are there. |
|
SOUND |
|
SOUND |
|
Turn off all sounds. |
|
TRAP |
|
TRAP #name |
|
TRAPs to the line referenced by the label name. |
|
|
|
|
|
Name |
|
Syntax |
|
Description |
|
HEX$ |
|
HEX$(n) |
|
Convert n to hex string. |
|
DEC |
|
DEC(a$) |
|
Convert hex string A$ to decimal. |
|
DIV |
|
n DIV i |
|
Integer quotient of n/i. |
|
MOD |
|
n MOD i |
|
Integer remainder of n/i. |
|
FRAC |
|
FRAC(a) |
|
Fractional part of a. |
|
TRUNC |
|
TRUNC(a) |
|
Truncates fractional part of a. |
|
RAND |
|
RAND(n) |
|
Generates random number 0-n. |
|
$ |
|
$nnnn |
|
Allows input of hexidecimal numbers, but they are converted to decimal.
Ex: "FOR I=$0600 to $067F" => "FOR I=1536 to 1663". |
|
& |
|
n & i |
|
8-bit boolean AND. |
|
! |
|
n ! i |
|
8-bit boolean OR. |
|
EXOR |
|
n EXOR i |
|
8-bit Exclusive-OR. |
|
DPEEK |
|
DPEEK(m) |
|
Double-PEEK of m,m+1. |
|
TIME |
|
TIME |
|
Time of day (numeric). |
|
TIME$ |
|
TIME$ |
|
Time of day string, HHMMSS. Unfortunately, the time commands don't work
properly because they were written for European Ataris which operate at
50 Hz, instead of 60 Hz like American ones, the net result being that
they gain 12 minutes each hour. |
|
INKEY$ |
|
INKEY$ |
|
Returns last character typed. |
|
INSTR |
|
INSTR(x$,a$) |
|
Returns relative location of start of string A$ within
X$ (returns 0 if not found). The match must be exact; strings with the
same letters but differences in case or type (normal or inverse) will not be found. |
|
INSTR |
|
INSTR(x$,a$,i) |
|
i specifies the starting point of the search. |
|
UINSTR |
|
UINSTR(x$,a$) |
|
Same as INSTR, does not distinguish between case or inverse characters.
Ex: UINSTR("HeLlO","hello") returns 1. |
|
UINSTR |
|
UINSTR(x$,a$,i) |
|
Specifies optional starting point. |
|
ERR |
|
ERR |
|
Value of last error number. |
|
ERL |
|
ERL |
|
Line last error occurred at. |
|
Constants |
|
%0, %1, %2, %3 |
|
These four constants simply stand for the numbers 0-3, respectively.
The difference with using these in a program is that "X=1" requires 10
bytes, whereas "X=%1" only needs 4. (Numbers require 7 bytes, 6 for the
number plus an identifier preceding it. It is always a good practice to
make variables for numbers that are used more than three times in a
program). |
|