pcbasic
[program|package
[output]]
[OPTION] ...
Positional arguments must come before any options, must not start with a dash -.
Any positional arguments that follow options will be ignored.
program.BAS program is specified as the first positional argument,
it will be run.
The
--run,
--load and
--convert options
override this behaviour.
packagePCBASIC.INI
will be loaded; usually, it will run a program file in the package.
All other command-line options will override the package configuration file,
note in particular the potential of the
--run,
--load and
--convert options
to alter the behaviour of the package.
output--convert option is given.
--allow-code-poke[=True|=False]
POKE into code memory.
--aspect=x,y
x:y.
Only has an effect if combined with --interface=graphical.
-b
--interface=cli.
--border=width
--interface=graphical.
-c=statement[:statement ...]
--interface=none
--quit=True
--exec=statement[:statement ...]
.
--caption=title
title is PC-BASIC.
--cas1=type:value
CAS1: cassette device.
type:value can be
WAV:wav_filewav_file
with data modulated in IBM PC cassette format.
CAS:cas_filecas_file.
--codepage=codepage_id[:nobox]
codepage/ directory; by default, these are:
4377207377758068508518528538558568578588608618628638648658668688698749329349369389499501258alternativnyjarmscii8abig5-2003big5-hkscsgeorgian-academygeorgian-psiransystemiscii-asiscii-beiscii-deiscii-guiscii-kaiscii-maiscii-oriscii-paiscii-taiscii-tekamenickykoi8-rkoi8-rukoi8-umazoviamikosnovnojpasciirusciirussup3russup4acrussup4navisciinobox disables box-drawing recognition
for double-byte character set code pages. By
default, sequences of box-drawing characters are recognised by an
algorithm that isn't as smart as it thinks it is, and displayed as
box drawing rather than as DBCS characters. If nobox
is set, they will be displayed as DBCS.
--config=config_file
--com1=type:value
COM1: serial device.
type:value can be one of the following.
PORT:device_name
device_name
can be a device name such as COM1 or
/dev/ttyS0 or a number,
where the first serial port is number 0.
SOCKET:host:socket
RFC2217:host:socket
STDIO:[CRLF]
CRLF is specified, PC-BASIC replaces CR
characters with LF on its output and LF
with CR on its input. This is more intuitive on Unix shells.
When using a Unix console, you should use stty -icanon
to enable PC-BASIC to read input correctly.
COM1: device is
unavailable.
--com2=type:value
COM2: serial device. See
--com1.
--convert={A|B|P}ABPoutput is not specified, write to
standard output. If program is not specified, use the argument of
--run or
--load. If none of those are
given, read from standard input. Overrides
--resume,
--run and --load.
--mouse-clipboard[=True|=False]
True (default),
select text with the left mouse button to copy and paste with the middle mouse button.
--ctrl-c-break[=True|=False]
False, follow GW-BASIC behaviour
where Ctrl+C breaks AUTO
and INPUT but not program execution or
LIST.True, treat
Ctrl+C exactly like
Ctrl+Break and
Ctrl+Scroll Lock when --interface=graphical.--interface={text|cli},
Ctrl+C is always treated like
Ctrl+Break.True.
--current-device={CAS1|@|A|B ... |Z}CAS1 for the cassette device. The device chosen
should be mounted to an actual location using
--mount (or --cas1
if the cassette device is chosen).
--debug[=True|=False]
--dimensions=x,y
x by
y pixels. This overrides
--scaling=native
and --aspect.
Only has an effect if combined with --interface=graphical.
-d
--double[=True|=False]
/d option in GW-BASIC.
-e=statement[:statement ...]
--exec=statement[:statement ...]
statements are executed
after loading any program but before entering into direct mode or
running it. Multiple statements can be entered by separating them with colons :.
These will be executed as if they were entered as separate statements, not as a single compound statement:
even if statements such as GOTO or LIST are included, the following statements will still be executed.
The character : will be interpreted as part of a string if quoted with
single quotes ". If your calling shell interprets such quotes, you should properly escape them.
--extension=module_name[,module_name ... ]
--font=font_name[,font_name ... ]font/. By default, the following fonts are
available:
defaultcgamdavgaolivettitandy1tandy2freedos, univga, and unifont
are treated as synonyms of default unless a font with one of these names
is available. This behaviour is deprecated and these synonyms will be removed in a future version.
See the list of fonts in the User's Guide for details.
--fullscreen[=True|=False]
--interface=graphical.
-h
--help
--hide-listing=line_number
line_number, as in
GW-BASIC beyond 65530. Use with care as this allows execution of hidden
lines of code. Default is to list all lines.
--hide-protected[=True|=False]
-i={input_file|{STDIO|STDIN}[:RAW]}
--input={input_file|{STDIO|STDIN}[:RAW]}
input_file,
except if KYBD: is read explicitly. Input from
KYBD: files is always read from the keyboard,
following GW-BASIC behaviour.
input_file is STDIO:
or STDIN:, keyboard input will be read from standard input.
If RAW is specified, input will be treated as codepage bytes.
If not, it will be treated as the locale's encoding (probably UTF-8).
--interface=[none|cli|text|graphical]
none-n.cli-b.text-t.graphicalansitext.sdl2graphical.pygamegraphical instead.cursestext instead.graphical.
-k=keystring
--keys=keystring
keystring into the keyboard buffer.
keystring may contain escape codes such as \r for return,
\n for line feed and \xXX to enter CHR$(&HXX).
keystring may contain e-ASCII codes to
indicate keypresses that do not have a regular character encoding. For example,
\0\x0F indicates Shift+Tab.
-l=program
--load=program
program loaded.
--logfile=log_file
log_file instead of stderr.
--lpt1=type:value
LPT1: parallel device.
type:value can be
PRINTER:[printer_name][:trigger]printer_name is not specified, the default
printer is used. Windows and CUPS printers are supported.LPT1:trigger sets an additional trigger
to activate the printer:
line
page
close
close.
FILE:file_name/dev/stdout on Unix or LPT1 on Windows.
STDIO:PARPORT:port_numberport_number
is 0 for the first parallel port, etc.
This option only works with physical parallel ports. To write to a Windows printer or other
device mapped with NET USE LPT1:, use FILE:LPT1 instead.
PRINTER:, so that output goes to the default printer
specified by the operating system.
--lpt2=type:value
LPT2: parallel device.
See --lpt1.
Note that, unlike LPT1:, printers connected to LPT2:
do not get activated when a program terminates.
If this option is not specified, LPT2: is unavailable.
--lpt3=type:value
LPT3: parallel device.
See --lpt1.
Note that, unlike LPT1:, printers connected to LPT3:
do not get activated when a program terminates.
If this option is not specified, LPT3: is unavailable.
-f=number_of_files
--max-files=number_of_files
number_of_files. This is
equivalent to the /f option in GW-BASIC.
Default is 3.
--max-memory=max_memory[,basic_memory_blocks]
max_memory and the maximum size of the data
memory available to BASIC to
basic_memory_blocks*16. In PC-BASIC, the
minimum of these values is simply the data memory size; the two
values are allowed for compatibility with the
/m option in GW-BASIC.
-s=record_length
--max-reclen=record_length
RANDOM files to
record_length. Default is 128, maximum is
32767. This is equivalent to the
/s option in GW-BASIC.
--monitor={rgb|composite|green|amber|grey|mono}
rgbcompositegreenambergreymonogreen).
SCREEN 2 with
--video={pcjr|tandy|cga},
--monitor=composite enables (crude) colour artifacts.
--mount=[drive:path[,drive:path ... ]]
path to drive letter drive:.
The path can be absolute or relative.
Z:.
If this option is specified but empty, do not mount any drives (except the internal device @:).
-n
--interface=none.
-o=output_file[:append]
--output=output_file[:append]
output_file, except
if SCRN: is written to explicitly. Output to
SCRN: files will always be shown on the screen, as in
GW-BASIC.
append is given,
the output file is appended to rather than overwritten.
output_file is STDIO:
or STDOUT:, screen output will be sent to standard output.
--peek=[seg:addr:val[,seg:addr:val ... ]]
PEEK preset values. If defined,
DEF SEG seg:? PEEK(addr) will return
val.
--preset=option_block
[this] --preset=this will load all
settings defined in that section. Available presets depend on your
configuration file. See the list of default presets in the User's Guide.
--prevent-close[=True|=False]
--prevent-close to allow BASIC to capture
this key combination instead. This is useful if
your program uses this key combination.
-q
--quit[=True|=False]
--run, PC-BASIC quits when the program
ends. If set in direct mode, PC-BASIC quits after the first
command is executed.
--reserved-memory=number_of_bytes
number_of_bytes of memory at the
bottom of the data segment. For compatibility with GW-BASIC.
Default is 3429 bytes. Lowering this value makes more string and
variable space available for use by programs.
--resume[=True|=False]
--run and
--load.
-r=program
--run=program
program. Overrides
--load.
--scaling={smooth|crisp|native}
smoothcrispsmooth,
but without smoothing.
native--scaling=native
overrides --aspect.
smooth.
Only has an effect if combined with --interface=graphical.
--serial-buffer-size=size
size. Default is
256. If set to 0, serial communications are disabled.
--shell=[shell-executable]
SHELL
statement to run the operating system command interpreter shell-executable.
The executable shell-executable should support MS-DOS's
COMMAND.COM calling conventions, in particular its /C switch.
Example command interpreters are CMD.EXE on Windows and "wine cmd.exe" on Unix.
If shell-executable is empty (as it is by default),
the SHELL statement is disabled.
--soft-linefeed[=True|=False]
LF in text and program files as a line break. This enables
the highest level of compatibility with GW-BASIC files. If this option is set,
any Linux or Mac text files need to be converted to DOS text before using them with PC-BASIC.
--sound[=True|=False]
FalseTruenoneFalse instead.interfaceTrue instead.sdl2portaudiobeep--state=state_file
state_file.
Default is pcbasic.session in the Application Data
directory.
--syntax={advanced|pcjr|tandy}
advancedgwbasicpcjrtandyadvanced.
-t
--interface=text.
--term=terminal_program
TERM
command to terminal_program. This only has an
effect with --syntax={pcjr|tandy}.
--text-width={40|80}
80.
--text-encoding=[encoding]
INPUT
and OUTPUT) stored on a disk device will be assumed to be encoded in
encoding. Examples of valid encodings are
utf-8, utf-16, latin-1.
encoding is not set, text files will be treated as
raw bytes in the current PC-BASIC codepage.
--utf8[=True|=False]
--text-encoding is set.
Use --text-encoding=utf-8 instead.
-v
--version
--video=adapter
vgaegacgamdaherculespcjrtandyolivettivga.
--video-memory=size
CLEAR statement;
at least 32768 needs to be available to enter
SCREEN 5 and SCREEN 6.
Default is 16384 or PCjr and Tandy and 262144 on other
machine presets.
-w
--wait[=True|=False]
True, PC-BASIC waits for a keystroke before
closing the window on exit. Only works for
--interface=graphical or
--interface=text. Default is False.
--options=gwbasic_options
gwbasic_options is a string that may contain
the following options:
/d
--double.
/f:n
--max-files.
/s:n
RANDOM files.
See also --max-reclen.
/c:n
COM devices.
See also --serial-buffer-size.
/i
/m:n,m
n and maximum
BASIC memory size to m*16 bytes.
See also --max-memory.
>filename
filename.
See also --output.
>>filename
filename.
See also --output.
<filename
filename.
See also --input.