GW-BASIC Commands

Reference

COMMANDUSAGE
AUTOThis command is used to automatically generate line
numbers
CLSThis command is used to clear the screen
NEWThis command is used to clear the Memory.
SAVEThis command is used to save the program on disk.
LISTThis command is used to list all or part of the program
currently in memory.
LOADThis command is used to load a program file from disk
into main memory.
FILESThis command is used to display the list of files from
specified drive. IMPORTANT: DOS files are 8.3 in length.
If you have more than this in host OS then the file
may not be able to be found.
RUNThis command is used to execute the program currently
in memory.
EDITThis command is used to edit a specified program line  
currently in memory
DELETEThis command is used to delete a specified program line
in current memory.
RENUMThis command is used to renumber the program lines  in
RAM.
KILLThis command is used to delete a program from disk.
SYSTEMThis command is used to exit from GW-BASIC and return
to operating system.
LLISTThis command is used to list all or part of the program
currently in the memory  to the printer.

Examples

RENUM [new|.] [, [old|.] [, increment]]

RENUM
Renumbers the entire program. The first new line number will be 10. Lines increment by 10.

RENUM 300,,50
Renumbers the entire program. The first new line number will be 300. Lines increment by 50.

RENUM 1000,900,20
Renumbers the lines from 900 up so they start with line number 1000 and are incremented by 20.

SAVE [,a] [,p]

SAVE “COM2”, a
Saves the file com2.bas in the ASCII format.

SAVE “PROG”, p
Saves the file prog.bas in binary format, and protects access.

FILES [filter_spec]

FILES
Shows all files in current directory

FILES “Z:”
Shows all files in Z: drive (if it exists)

Leave a Reply

Your email address will not be published. Required fields are marked *