
BASIC comparison sheet Commands Page 31
Vendor
Model
Sound
Beeper
Frequency range
Input
Interactive data input
Allowed input values and keys
Read keyboard directly
Some special key codes
Read display contents as input
DATA/READ/RESTORE
Program files
Tape filename syntax
Other storage devices
Save program to tape in binary
Save multiple programs
Set (password) protection
Save program to other device
Save in ASCII format
Load binary program from tape
Load multiple programs
Load binary program from storage
Load ASCII program
Load "foreign" program
Behavior of comma or semicolon
after prompt
Commands
Tandy Radio Shack Canon Epson
TRS-80 Model 100 X-07 HX-20
Comma is not allowed. "? " is always added to the prompt. Comma suppresses "?" after prompt.
Number or (quoted) string. Unquoted strings are stripped on left end.
Values are separated by commas or ENTER. Empty input leaves values untouched.
A$=INKEY$, returns "" if no key pressed.
N/A A=SCREEN(x,y) returns ASCII code. N/A
Data elements are quoted or unquoted strings or numeric constants.
SAVE"name"
N/A
N/A TITLE "name" makes area read only.
SAVE "device:name" SAVE "device:name"
SAVE "device:name",A
N/A
Use ASCII mode serial I/O.
BEEP, SOUND pitch,duration
Duration of 50 is 1 second.
BEEP pitch,duration
Duration of 20 is 1 second.
SOUND pitch,duration
Duration of 10 is 1 second.
0..16383 (useful: 220..16383)
Frequency=4915680 Hz / pitch
5586: 880 Hz
0: pause
1..48: halftones starting from "do"
49..4095: frequency=19200 Hz / pitch.
1..28: tones C to B in 4 octaves
29..59: halftones, 0: pause
13: 880 Hz
INPUT "prompt";variable(s)
Only one prompt allowed.
Number or (quoted) string. Unquoted
strings are stripped on both ends.
Values are separated by commas.
Empty input causes ?Redo message
except for a single string variable.
A$=INPUT$(count) returns exactly
count key presses.
INIT#1,"KBD:" opens keyboard as file.
A=INP(#1) waits & returns ASCII code.
A=SNS(#1) returns 0 or ASCII code.
A=STICK(0) returns status of cursor keys.
A=STRIG(0) returns status of space bar
A=STRIG(1) returns status of F6.
A$=INPUT$(count) returns exactly
count key presses.
ENTER=13, LEFT/RIGHT=29/28,
UP/DOWN=30/31, BS=8
Use ON KEY to read function keys.
ENTER=13, LEFT/RIGHT=29/28,
UP/DOWN=30/31, HOME/CLR=11/12
F-Keys return strings. STICK(0) gives a
value from 0 to 8 (up=1, up+right=2,...).
ENTER=13, LEFT/RIGHT=29/28,
UP/DOWN=30/31, BS=8, CLR=12
PF-Keys return strings.
"name" (6 chars) with
CSAVE, CLOAD, etc.
"CAS:name" with
SAVE, LOAD, MERGE, OPEN.
Name can be omitted on load and
defaults to first file found.
"name" (6 chars) with
CSAVE, CLOAD, etc.
"CASO:name" (output) or "CASI:name"
(input) with SAVE, LOAD, INIT.
Name can be omitted on load and defaults
to first file found.
"CAS0:name" (8 chars for name).
"CAS1:name" for external tape.
Prefix CAS0: can be omitted.
Name can be omitted on load and
defaults to first file found.
"RAM:name6.ex" is a RAM disk file. The
prefix can be omitted. .ex is .DO for
text, .BA for BASIC, .CO for ml.
Serial I/O: "COM:RBPSX"
Floppy: "0:name6.ex" or "1:..."
"RAM:name6","t" is a RAM disk file of type
"t". Type "P" is a BASIC file.
Serial I/O: "COM:" (TTL) or "OPT:" (optical
coupler)
ROM cartridge: "PAC0:name"
Serial I/O: "COM:(RBPSF)"
Floppy: "d:name", d = A/B/C/D
File name convention for floppy is
unknown.
CSAVE "name"
SAVE "CAS:name"
CSAVE "name"
SAVE "CASO:name"
SAVE "device:name",baud,"mode"
SAVE "device:name",size,"type"
INIT#1,"Device:name",p1,"p2"
LIST#1
CLOAD "name"
LOAD "CAS:name"
CLOAD "name"
LOAD "CASI:name"
LOAD "name"
LOAD "name",R
R starts program.
Format is detected.
LOAD"name" (RAM disk)
LOAD"device:name",p1,"p2" (device)
LOAD "name",R
R starts program.
Format is detected.
INIT#5,"device:name",p1,"p2"
CALL &HEE1F turns on remote control
CALL &HEE33 turns off remote control
Comentários a estes Manuais