   C128 BASIC 7.0 QUICK REFERENCE LIST AND OTHER C128 INFO

Note:Consult the C128 System Guide for detailed descriptions of these
     commands/functions and the proper format to use them.


Disk/Tape/Printer Commands
--------------------------

APPEND          APPEND #logical file number,"filename",Drive number 
                <ON,>Udevice 
BACKUP          BACKUP source Ddrive number TO destination Ddrive number
                <ON,>Udevice 
BLOAD           BLOAD "filename",Ddrive number ,Udevice number 
                ,Bbank number ,Pstart address 
BOOT            BOOT "filename",Ddrive number <ON,>Udevice 
BSAVE           BSAVE "filename",Ddrive number ,Udevice number 
                ,Bbank number ,Pstart address TO Pend address
CATALOG         CATALOG Ddrive number <ON,>Udevice number ,wildcard string 
CLOSE           CLOSE file number
CMD             CMD logical file number,write list 
COLLECT         COLLECT Ddrive number <ON,>Udevice 
CONCAT          CONCAT "file 2",Ddrive number TO"file 1",Ddrive number 
                <ON,>Udevice 
COPY            COPY "source filename",Ddrive number TO"destination filename"
                ,Ddrive number <ON,>Udevice 
DCLEAR          DCLEAR Ddrive number <ON,>Udevice 
DCLOSE          DCLOSE #logical file number <ON,Udevice 
DIRECTORY       DIRECTORY Ddrive number ,<ON,>Udevice ,wildcard 
DLOAD           DLOAD "filename",Ddrive number ,Udevice number 
DOPEN           DOPEN #logical file number,"filename,<S/P> ",Lrecord
                length ,Ddrive number <ON,>Udevice number ,w 
DSAVE           DSAVE "filename",Ddrive number <ON,>Udevice number 
DVERIFY         DVERIFY "filename",Ddrive number <ON,>Udevice number 
GET#            GET# file number,variable list
HEADER          HEADER "diskname",i.d. ,Ddrive number <ON,>Udevice number 
INPUT#          INPUT# file number,variable list
LOAD            LOAD "filename",device number ,relocate flag 
OPEN            OPEN logical file number,device number,secondary address 
                ,"filename,filetype,mode" /,cmd string >
PRINT#          PRINT# file number,print list
RECORD          RECORD# logical file number,record number,byte number 
RENAME          RENAME "old filename"TO"new filename",Ddrive number 
                ,Udevice number 
SAVE            SAVE "filename" ,device number ,EOT flag 
SCRATCH         SCRATCH "filename",Ddrive number ,Udevice number 
VERIFY          VERIFY "filename",device number ,relocate flag 


Graphics Commands
-----------------

BOX             BOX color source ,X1,Y1,X2,Y2 ,angle ,paint 
CHAR            CHAR color source ,x,y,string ,RVS 
CIRCLE          CIRCLE color source ,X,Y,Xr ,Yr ,sa ,ea ,angle ,inc 
COLLISION       COLLISION type,statement 
COLOR           COLOR source number,color number
DRAW            DRAW color source ,X1,Y1TO X2,Y2 ...
GRAPHIC         GRAPHIC mode,clear ,s 
                GRAPHIC CLR
LOCATE          LOCATE x,y
MOVSPR          MOVSPR number,x,y
                MOVSPR number +/- x, +/- y
                MOVSPR number,x;y
                MOVSPR number,x angle #y speed
PAINT           PAINT color source ,x,y,mode 
SCALE           SCALE n,xmax,ymax 
SCNCLR          SCNCLR mode number
SPRCOLOR        SPRCOLOR smcr-1 ,smcr-2 
SPRDEF          SPRDEF
SPRITE          SPRITE
<number>,on/off ,fgnd ,priority ,x-exp ,y-exp ,mode 
SPRSAV          SPRSAV <origin>,<destination>
SSHAPE/GSHAPE   SSHAPE string variable,X1,Y1,X2,Y2 
                GSHAPE string variableX,Y ,mode 
WIDTH           WIDTH n
WINDOW          WINDOW top left col,top left row,bot right col,bot right row
                ,clear 


Music/Sound Commands
--------------------

ENVELOPE        ENVELOPE n,,atk ,dec ,sus ,rel ,wf ,pw 
FILTER          FILTER freq ,lp ,bp ,hp ,res 
PLAY            PLAY "Vn,On,Tn,Un,Xn,elements"
SOUND           SOUND v,f,d,dir ,m ,s ,w ,p 
TEMPO           TEMPO n
VOL             VOL volume level


Machine Language Commands
-------------------------

BANK            BANK bank number
FETCH           FETCH #bytes,insta,expb,expsa
MONITOR         MONITOR
POKE            POKE address,value
STASH           STASH #bytes,insta,expb,expsa
SWAP            SWAP #bytes,insta,expb,expsa
SYS             SYS address,a ,x ,y ,s 
WAIT            WAIT <Location>,<mask-1>,mask-2> 


Text Screen Commands
--------------------

PRINT           PRINT print list 
PRINT USING     PRINT #filenumber  USING "format list";print list
PUDEF           PUDEF "nnnn"


Decision-Making Commands
------------------------

BEGIN/BEND      IF condition THEN BEGIN:statement
                statement
                statement BEND:ELSE BEGIN
                statement
                statement BEND
DO/LOOP/WHILE/  DO UNTIL condition/WHILE condition statementsEXIT 
UNTIL/EXIT      LOOPUNTIL condition/WHILE condition 
FOR/TO/STEP/    FOR variable=start value TO end valueSTEP increment 
NEXT
IF/THEN/ELSE    IF expression THEN statements:ELSE else-clause 
ON              ON expression <GOTO/GOSUB> line#1,line#2,... 


Processing Commands
-------------------

CLR             CLR
DATA            DATA list of constants
DEF FN          DEF FN name(variable)=expression
DIM             DIM variable(subscripts),variable(subscripts) ...
END             END
GET             GET variable list
GETKEY          GETKEY variable list
GOSUB           GOSUB line number
GOTO            GOTO line number
INPUT           INPUT "prompt string"; variable list
KEY             KEY key number,string 
LET             LET variable=expression
READ            READ variable list
REM             REM message
RESTORE         RESTORE line # 
RETURN          RETURN
RUN             RUN line # 
                RUN "filename",Ddrive number ,Udevice number 
STOP            STOP


System Commands
---------------

AUTO            AUTO line# 
CONT            CONT
DELETE          DELETE first line -last line 
FAST            FAST
GO64            GO64
HELP            HELP
LIST            LIST first line -last line 
NEW             NEW
RENUMBER        RENUMBER new starting line number ,increment ,old
                starting line number 
RESUME          RESUME line#/NEXT 
SLEEP           SLEEP n
SLOW            SLOW
TRAP            TRAP line# 
TROFF           TROFF
TRON            TRON


BASIC 7.0 Functions
-------------------

ABS             ABS(X)
ASC             ASC(X$)
ATN             ATN(X)
BUMP            BUMP(N)
CHR$            CHR$(X)
COS             COS(X)
DEC             DEC(hexidecimal-string)
ERR$            ERR$(N)
EXP             EXP(X)
FNxx            FNxx(x)
FRE             FRE(X)
HEX$            HEX$(X)
INSTR           INSTR(string 1,string 2,starting position )
INT             INT(X)
JOY             JOY(N)
LEFT$           LEFT$(string,integer)
LEN             LEN(string)
LOG             LOG(X)
MID$            MID$(string,starting position,length )
PEEK            PEEK(X)
PEN             PEN(n)
PI              (symbol of PI)
POINTER         POINTER(variable name)
POS             POS(X)
POT             POT(n)
RCLR            RCLR(N)
RDOT            RDOT(N)
RGR             RGR(X)
RIGHT$          RIGHT$(<string>,<numeric>)
RND             RND(X)
RSPCOLOR        RSPCOLOR(register)
RSPPOS          RSPPOS(sprite number,position/speed)
RSPRITE         RSPRITE(sprite number,characteristic)
RWINDOW         RWINDOW(n)
SGN             SGN(X)
SIN             SIN(X)
SPC             SPC(X)
SQR             SQR(X)
STR$            STR$(X)
TAB             TAB(X)
TAN             TAN(X)
USR             USR(X)
VAL             VAL(X$)
XOR             XOR(n1,n2)


ESCape Key Functions
--------------------

@   Erase everything from cursor to end of screen window
A   Automatic insert mode
B   Set bottom right corner of screen window (at current cursor location)
C   Cancel insert and quote modes
D   Delete current line
E   Set cursor to non-flashing mode
F   Set cursor to flashing mode
G   Enable bell (by Control-G)
H   Disable bell
I   Insert a line
J   Move to beginning of current line
K   Move to end of current line
L   Turn on scrolling
M   Turn off scrolling
N   Return to normal (non-reverse video) screen display (80-column only)
O   Cancel automatic insert mode
P   Erase everything from beginning of line to cursor
Q   Erase everything from cursor to end of line
R   Reverse video screen display (80-column only)
S   Change to block cursor
T   Set top left corner of screen window (at current cursor location)
U   Change to underline cursor
V   Scroll screen up one line
W   Scroll screen down one line
X   Toggle between 40 and 80 columns
Y   Restore default TAB stops
Z   Clear all TAB stops


Function Key Default Settings
-----------------------------

  F1        F2        F3        F4
GRAPHIC   DLOAD"   DIRECTORY  SCNCLR

  F5        F6        F7        F8
DSAVE"      RUN      LIST     MONITOR


SPRDEF Mode Command Summary
---------------------------

CLR key        Erases entire work area
M key          Turns on/off multicolor sprite
CTRL 1-8       Selects sprite foreground color 1-8
CMDR 1-8       Selects sprite foreground color 9-16
1 key          Turns on pixels in the background color
2 key          Turns on pixels in the foreground color
3 key          Turns on areas in multicolor1
4 key          Turns on areas in multicolor2
A key          Turns on/off automatic cursor movement
CRSR keys      Moves cursor (+) within work area
RETURN         Moves cursor to start of next line
HOME key       Moves cursor to top left corner of work area
X key          Expands sprite horizontally
Y key          Expands sprite vertically
Shift RETURN   Saves sprite from work area & returns to SPRITE NUMBER prompt
C key          Copies one sprite to another
STOP key       Turns off displayed sprite & returns to SPRITE NUMBER prompt
               without changing sprite
RETURN key     Exits SPRDEF mode
(at SPRITE
NUMBER prompt)


Defaults for ENVELOPE Statement
-------------------------------

ENVELOPE #      INSTRUMENT

0               Piano
1               Accordion
2               Calliope
3               Drum
4               Flute
5               Guitar
6               Harpsichord
7               Organ
8               Trumpet
9               Xylophone


40 and 80 Column Color Codes
----------------------------

40-COLUMN FORMAT    80-COLUMN FORMAT

 1  Black            1  Black
 2  White            2  White
 3  Red              3  Dark Red
 4  Cyan             4  Light Cyan
 5  Purple           5  Light Purple
 6  Green            6  Dark Green
 7  Blue             7  Dark Blue
 8  Yellow           8  Light Yellow
 9  Orange           9  Dark Purple
10  Brown           10  Dark Yellow
11  Light Red       11  Light Red
12  Dark Gray       12  Dark Cyan
13  Medium Gray     13  Medium Gray
14  Light Green     14  Light Green
15  Light Blue      15  Light Blue
16  Light Gray      16  Light Gray




Feel free to distribute this to any and all, as everything here was taken
directly from the C-128 System Guide.

