PAUSE x
Interrupts a program for x/50ths of a second.
PBOX x,y,xx,yy
PCIRCLE x,y,r [,phi0,phi1]
PELLIPSE z,y,rx,ry [,phi0,phi1]
PRBOX x,y,xx,yy
These commands are the same as BOX, CIRCLE, ELLIPSE and RBOX, except that filled shapes are drawn.
PEEK(x)
DPEEK(x)
LPEEK(x)
Return the contents of the memory starting at address x. PEEK returns 1 byte, DPEEK returns 2 bytes and LPEEK return 4 bytes. For DPEEK and LPEEK, x must be an even number.
PI
Returns the value of pi, i.e. 3.141592...
PLOT x,y
Plots a point at screen co-ordinates x,y.
POINT x,y
Returns the colour value of pixel x,y.
POKE x,n
DPOKE x,n
LPOKE x,n
Writes 1, 2 or 4 bytes to memory starting at address x, where n is the value to be written. With DPOKE and LPOKE, x must be an even number.
POLYLINE n,x(),y() [OFFSET xx,yy]
POLYFILL n,x(),y() [OFFSET xx,yy]
POLYMARK n,x(),y() [OFFSET xx,yy]
Draws a polygon (filled or lined) or marks the corners of an n cornered shape. x() and y() are arrays containing the corner coordinates. An offset from the top left of the screen may be specified.
POS(x)
Returns the cursor column position. x is ignorred.
PRINT [AT(x,y);] expression [(, or ; or ') expression ...]
PRINT #n,expression [(, or ; or ') expression ...]
Sends data to the screen or data channel n. Multiple expressions must be separated by a semicolon (no spacing), a comma (items are printed at 16 column intervals), or an apostrophe (items are separated by 1 space).
PRINT USING "format",expression [,expression ...] [;]
PRINT #n, USING "format",expression [,expression ...] [;]
Issues formatted output to the screen or data channel. format may be constructed from:
# Saves space for a digit
. Decimal point
+ Plus sign
- Minus sign
* Leading zeros are replaced by '*'
$$ Prefixes the dollar symbol
, Inserts a comma
^^^^ Exponent form e+100
^^^^^ Exponent form e+1000
! Displays the first character of a string
&s; Displays the whole string
\..\ Displays as many characters as the length of \..\
PROCEDURE name [(parameter list)]
Marks the beginning of a sub-routine which can be executed using the GOSUB command. The end of the procedure is marked by RETURN. By default variables are passed by value. They may be passed by reference using the indirection operator *.
PUT x,y,a$ [,mode]
Places a graphics block on screen at x,y that has previously been grabbed using GET
.
PUT #n,i
Writes a record to the random access file on channel n. i is the relative record key (1 to 65535).

Q

QUIT
Causes a return to the desktop. Same as SYSTEM.

R

RANDOM(x)
Returns a random integer between 0 and x.
RBOX x,y,xx,yy
Draws a rectangle with rounded corners. x,y represents the top left-hand corner and xx,yy the bottom right-hand corner.
RELSEEK [#]n,x
Moves the random access file pointer on channel n back -x, or forward x records.
REM
'
Comment statement which is ignorred. The apostrophe may be used as a shorthand for REM.
REPEAT ... UNTIL end
Creates a pre-defined loop that is executed at least once until the condition end is true.
RESERVE n
Increase or decreases the memory available to GFA BASIC.
RESTORE label
Places the DATA pointer at label.
RESUME
RESUME NEXT
RESUME label
Exits from an error routine defined with ON ERROR GOSUB. RESUME repeats the error, RESUME NEXT continues execution from after the erronous command, and RESUME label branches to a label. Only RESUME label is possible after a fatal error.
RETURN
Terminates a sub-routine.
RIGHT$(string$ [,n])
Returns the rightmost character, or rightmost n characters from a string.
RMDIR "directory"
Removes an empty directory.
RND
Returns a random number between 0 and 1.

S

SAVE "filename"
PSAVE "filename"
Saves a program file. With PSAVE, the program is not listed when it is next loaded, but executed immediately.
SEEK [#]n,x
Sets the file pointer position to the xth byte in the file on channel n.
SETCOLOR i,r,g,b
SETCOLOR i,n
Defines the rgb level for colour register i. Alternatively, n may be specified as n=r*256+g*16+b.
SETTIME "hh[:]mm[[:]ss]","day.month.year"
Sets the Atari systems date and time.
SGET var$
Reads the screen into a string variable.
SGN(x)
Returns -1 if x is negative, 1 if it is postive, otherwise 0.
SHOWM
Reveals the mouse pointer. Reverse of HIDEM.
SIN(x)
Returns the sine of x which is in radians.
SOUND channel,volume,note,octave [,duration]
SOUND channel,volume,note,#period [,duration]
Generates musical notes, where:
Channel Is either 1, 2 or 3
Note Is a value in the range 1 to 12 for c, c#, d, d# e f f# g g# a a# b respectively
Octave Is of the range 1 to 8
Duration Is measured in 50ths of a second
#period Is calculated using TRUNC(125000/frequency + 0.5)
SPACE$(x)
Creates a string of x spaces.
SPC(n)
Creates n spaces in a print command.
SPOKE x,n
SDPOKE x,n
SLPOKE x,n
Writes 1, 2 or 4 bytes into the memory starting at address x.
SPRITE a$ [,x,y]
Places the sprite defined in a$ at x,y, or if no coordinates are given, deletes it.
a$ = MKI$(x) + MKI$(y) + MKI$(mode) + MKI$(sccol) + MKI$(spcol) + bitpattern
where mode is either 0 (normal) or 1 (xor), sccol is the screen colour (mostly 0), spcol is the sprite colour (mostly 1) and bitpattern consists of alternating 16 bit words representing the screen and sprite.
SPUT var$
Copies var$ to the screen. See SGET.
SQR(x)
Returns the square root of x.
STOP
Stops execution of a program. The program may be resumed by typing CONT.
STR$(x)
Transforms the value x into a character string.
STRING$(n,string)
STRING$(n,c)
Creates a string by repeating string or CHR$(c) n times.
SUB var,n
Subtracts n from var.
SWAP var1,var2
Exchanges the values of 2 variables or array elements.
SYSTEM
Forces a return to the desktop. Same as QUIT.

T

TAB(n)
Sets the tabulator to the nth column.
TAN(x)
Returns the tangent of x which is in radians.
TEXT x,y [,l] ,string
Places text (in a format defined by DEFTEXT) at x,y.
TIME$
Returns the system time in the format hh:mm:ss.
TITLEW n,"title"
Gives the window numbered n a title.
TRON
TROFF
Switches the trace function on and off.
TRUE
Symbolic constant -1.
TRUNC(x)
Returns the integer portion of x.
TYPE(*pointer)
Determines the type of pointer at which a pointer is set. Returning 0 for var, 1 for var$, 2 for var%, 3 for var!, 4 for var(), 5 for var$(), 6 for var%() and 7 for var!().

U

UPPER$(var$)
Transforms lowercase letters in a string to uppercase.

V

VAL(x$)
Transforms x$ into a number.
VAL?(x$)
Determines the number of characters (starting from the left of a string) that can be converted using VAL.
VAPTR(var)
Determines the starting address of the variable var.
VDIBASE
Determines the address above the GFA BASIC area that GEM uses.
VOID expression
Disregards the result of an expression.
VSYNC
Synchronizes screen updates to the vertical refresh rate to reduce flicker.

W

WAVE voc,envelope,form,length,duration
Produces noise from the 3 sound channels.
WHILE condition ... WEND
Creates a conditional loop that executes while the condition is true.
WRITE [#n] [expression [, expression ...]]
Writes data to a screen or file. Strings are quoted. All data items are comma separated.

Other

*
The indirection operator. This is used to pass variables to procedures by reference. Note that by default, variables are passed by value, in effect copies of the variable are passed.
    a%=1
    GOSUB test(*a%)
    PRINT a
    END
    '
    PROCEDURE test(b%)
       *b%=2
    RETURN
    
In the above example 2 will be displayed.
a==b
Where a is approximately equal to b. Only 28 bits of the mantissa are compared.