][ APPLESOFT COMMANDS ][

Page 1 of 24

Usage Key

f = File Name A$ = String X = Variable x,y,z = Real numbers

COMMAND REFERENCE

CommandDescription
ABS(x)Absolute (positive) value of x
ANDLogical "and" in an IF statement
ASC("A")ASCII value of a character
ASC(A$)ASCII value of string's first character
ATSee DRAW, XDRAW, HLIN and VLIN
ATN(x)Arctangent of x in radians
CALL nBranch to machine language routine at n
CHR$(n)Character whose ASCII value is n
CLEARClear all variables and strings
COLOR=nSet lo-res color to n (0-15)
CONTContinue an Applesoft program
COS(x)Cosine of x in radians
DATA A$,x,y,zStrings and values to be READ
DEF FN A(X)=f(x)Define a function
DEL n,mDelete program lines n through m
DIM X(n)Dimension a numerical array
DIM A$(n)Dimension a string-array or string
DRAW n AT i,jDraw hi-res shape n at i,j
ENDStop a program with no message (see STOP)
EXP(x)e(2.718289) to the xth power
FLASHSet flashing screen output (40-columns)
FNSee DEF FN
FOR X=n TO mLet X=n, X=n+1… until X=m
FRE(0)Amount of free memory available
GET A$Wait for one-character user input
GET XWait for one-number user input
GOSUB nBranch to subroutine at line n
GOTO nBranch to line n
GRView and clear Lo-Res page 1
HCOLOR=nSet Hi-Res color to n (0-7)
HGRView and clear upper Hi-Res page 1
HGR2View and clear upper Hi-Res page 2
HIMEM:nSet highest memory address available
HLIN n,m AT jDraw a horizontal Lo-Res line
HOMEClear text screen to black
HPLOT i,jPlot a Hi-Res point
HPLOT i,j TO n,mDraw a Hi-Res line
HTAB nPosition cursor at horizontal position n
IF… THEN…Logical "if" true, "then" execute
IN#nTake input from Slot n
INPUT X (or A$)Wait for user input
INPUT "ABC";A$ (or X)Print & wait for input
INT(RND(1)*n)Random integer 0 to n-1
INT(x)Integer value of x
INVERSESet black-on-white text output
LEFT$(A$,n)Left n characters of a string
LEN(A$)Number of characters in a string
LET X=YSet X equal to Y ("LET" is optional)
LISTList program from beginning
LIST-nList to line n
LIST n-List from line n
LIST n-mList lines n through m
LOADLoad a program from tape
LOG(x)Natural logarithm of x
LOMEM:nSet start-of-variable location
MID$(A$,n,m)m characters of A$, starting at n
NEWDelete current program from memory
NEXTDefine bottom of a FOR-NEXT loop
NORMALSet normal white-on-black text output
NOTLogical "not" in an IF statement
NOTRACECancel TRACE
ON X GOSUB n,m…GOSUB Xth line number
ON X GOTO n,m…Branch to Xth line number
ONERR GOTO nBranch to line n if error occurs
ORLogical "or" in an IF statement
PDL(n)Value (0-255) of paddle n (0-3)
PEEK(n)Memory value at location n
PLOT i,jPlot a Lo-Res dot
POKE n,mSet location n to value m
POPCancel most recent GOSUB
POS(0)Horizontal cursor position
PR#nSend output to slot n
PRINTSkip a text line
PRINT "ABC"Print characters within quotes
PRINT XPrint value of variable X
READ A$Read a DATA string
READ XRead a DATA value
RECALL XRetrieve array from tape
REMProgrammer's remark follows
RESTORESet pointer to first DATA element
RESUMEContinue program where error occurred
RETURNBranch back to statement after GOSUB
RIGHT$(A$,n)Last n characters of a string
RND(0)Repeat last random number
RND(1)Random number (0 to 0.999999999)
ROT=nSet rotation of a shape to n (0-64)
RUNExecute program from beginning
RUN nExecute program from line n
SAVESave program to tape
SCALE=nSet scale of DRAW or XDRAW
SCRN(i,j)Lo-res screen color at point i,j
SGN(X)Sign (+1, -1 or 0) of X
SHLOADLoad shape table from tape
SIN(x)Sine of x in radians
SPC(n)n spaces in a PRINT statement
SPEED=nCharacter output rate (0-255)
SQR(x)Square root of x
STEP nIncrement-size in a FOR-NEXT loop
STOPHalt program and print line number
STORE XStore array on tape
STR$(x)String equivalent of value x
TAB(n)Position cursor in a PRINT statement
TAN(x)Tangent of x in radians
TEXTSwitch to text mode; cancel windows
TRACEPrint line numbers as executed
USR(x)Pass x to a machine language subroutine
VAL(A$)Numeric value of a string
VLIN n,m AT iDraw a vertical Lo-Res line
VTAB nMove cursor to text line n
WAIT i,j,kInsert conditional pause
XDRAW n AT i,jDRAW in opposite color
?Same as PRINT
&Call a User Defined Routine