'\" t .pc .TH PCBASIC 1 .SH NAME pcbasic \- A free, cross\-platform emulator for the GW\-BASIC family of interpreters\|. .SH DESCRIPTION PC\-BASIC is a free, cross\-platform interpreter for GW\-BASIC, Advanced BASIC (BASICA), PCjr Cartridge Basic and Tandy 1000 GWBASIC\|. It interprets these BASIC dialects with a high degree of accuracy, aiming for bug\-for\-bug compatibility\|. PC\-BASIC emulates the most common video and audio hardware on which these BASICs used to run\|. PC\-BASIC runs plain\-text, tokenised and protected \|.BAS files\|. It implements floating\-point arithmetic in the Microsoft Binary Format (MBF) and can therefore read and write binary data files created by GW\-BASIC\|. .SH SYNOPSIS \fBpcbasic\fR [\fIprogram\fR\||\fIpackage\fR [\fIoutput\fR]] [\fIOPTION\fR] \|.\|.\|. .SH POSITIONAL ARGUMENTS Positional arguments must come before any options, must not start with a dash \fB\-\fR\|. Any positional arguments that follow options will be ignored\|. .IP "\fIprogram\fR" If a \|.BAS program is specified as the first positional argument, it will be run\|. The \fB\-\-run\fR, \fB\-\-load\fR and \fB\-\-convert\fR options override this behaviour\|. .IP "\fIpackage\fR" If a zipfile package or directory is specified as the first positional argument, any contained configuration file PCBASIC\|.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 \fB\-\-run\fR, \fB\-\-load\fR and \fB\-\-convert\fR options to alter the behaviour of the package\|. .IP "\fIoutput\fR" If a second positional argument is specified, it sets the output file for file format conversion\|. This argument is ignored unless the \-\-convert option is given\|. .SH OPTIONS .IP " \fB\-\-allow\-code\-poke\fR[\fB=True\fR\||\fB=False\fR] " Allow programs to POKE into code memory\|. .IP " \fB\-\-aspect=\fR\fIx\fR,\fIy\fR " Set the display aspect ratio to \fIx\fR:\fIy\fR\|. Only has an effect if combined with \fB\-\-interface=graphical\fR\|. .IP " \fB\-b\fR " Use the command\-line interface\|. This is identical to \fB\-\-interface=cli\fR\|. .IP " \fB\-\-border=\fR\fIwidth\fR " Set the width of the screen border as a percentage from 0—100\|. The percentage refers to the total width of the borders on both sides as a fraction of the usable screen width\|. Only has an effect if combined with \fB\-\-interface=graphical\fR\|. .IP " \fB\-c=\fR\fIstatement\fR[\fB:\fR\fIstatement\fR \|.\|.\|.] " Execute commands as a shell\|. This is a convenience shorthand and identical to \fB\-\-interface=none\fR \fB\-\-quit=True\fR \fB\-\-exec=\fR\fIstatement\fR[\fB:\fR\fIstatement\fR \|.\|.\|.] \|. .IP " \fB\-\-caption=\fR\fItitle\fR " Set the title bar caption of the PC\-BASIC window\|. Default \fItitle\fR is PC\-BASIC\|. .IP " \fB\-\-cas1=\fR\fItype\fR\fB:\fR\fIvalue\fR " Attach a resource to the CAS1: cassette device\|. \fItype\fR\fB:\fR\fIvalue\fR can be \fBWAV:\fR\fIwav_file\fR Connect to the RIFF Wave file \fIwav_file\fR with data modulated in IBM PC cassette format\|. \fBCAS:\fR\fIcas_file\fR Connect to the PCE/PC\-BASIC CAS tape image \fIcas_file\fR\|. .IP " \fB\-\-codepage=\fR\fIcodepage_id\fR[\fB:nobox\fR] " Load the specified codepage\|. The codepage determines which characters are associated to a given character byte or, in the case of double\-byte codepages, two character bytes\|. The available codepages are stored in the codepage/ directory; by default, these are: \fB437\fR \fB720\fR \fB737\fR \fB775\fR \fB806\fR \fB850\fR \fB851\fR \fB852\fR \fB853\fR \fB855\fR \fB856\fR \fB857\fR \fB858\fR \fB860\fR \fB861\fR \fB862\fR \fB863\fR \fB864\fR \fB865\fR \fB866\fR \fB868\fR \fB869\fR \fB874\fR \fB932\fR \fB934\fR \fB936\fR \fB938\fR \fB949\fR \fB950\fR \fB1258\fR \fBalternativnyj\fR \fBarmscii8a\fR \fBbig5\-2003\fR \fBbig5\-hkscs\fR \fBgeorgian\-academy\fR \fBgeorgian\-ps\fR \fBiransystem\fR \fBiscii\-as\fR \fBiscii\-be\fR \fBiscii\-de\fR \fBiscii\-gu\fR \fBiscii\-ka\fR \fBiscii\-ma\fR \fBiscii\-or\fR \fBiscii\-pa\fR \fBiscii\-ta\fR \fBiscii\-te\fR \fBkamenicky\fR \fBkoi8\-r\fR \fBkoi8\-ru\fR \fBkoi8\-u\fR \fBmazovia\fR \fBmik\fR \fBosnovnoj\fR \fBpascii\fR \fBruscii\fR \fBrussup3\fR \fBrussup4ac\fR \fBrussup4na\fR \fBviscii\fR \|. See the list of codepages in the User\|'s Guide for details\|. The specifier \fBnobox\fR 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 \fBnobox\fR is set, they will be displayed as DBCS\|. .IP " \fB\-\-config=\fR\fIconfig_file\fR " Read a configuration file\|. The system default configuration is always read first, but any preset group of options in a configuration file replaces the whole equivalent default preset group\|. .IP " \fB\-\-com1=\fR\fItype\fR\fB:\fR\fIvalue\fR " Attach a resource to the COM1: serial device\|. \fItype\fR\fB:\fR\fIvalue\fR can be one of the following\|. \fBPORT:\fR\fIdevice_name\fR Connect to a serial device\|. \fIdevice_name\fR can be a device name such as COM1 or /dev/ttyS0 or a number, where the first serial port is number 0\|. \fBSOCKET:\fR\fIhost\fR\fB:\fR\fIsocket\fR Connect to a TCP socket on a remote or local host\|. \fBRFC2217:\fR\fIhost\fR\fB:\fR\fIsocket\fR Connect using the RFC2217 protocol to a TCP socket on a remote or local host\|. \fBSTDIO:\fR[\fBCRLF\fR] Connect to standard I/O of the calling shell\|. If \fBCRLF\fR 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\|. If this option is not specified, the COM1: device is unavailable\|. .IP " \fB\-\-com2=\fR\fItype\fR\fB:\fR\fIvalue\fR " Attach a resource to the COM2: serial device\|. See \-\-com1\|. .IP " \fB\-\-convert=\fR{\fBA\fR\||\fBB\fR\||\fBP\fR}" Convert program to one of the following formats: \fBA\fR Plain text \fBB\fR Tokenised \fBP\fR Protected If \fIoutput\fR is not specified, write to standard output\|. If program is not specified, use the argument of \fB\-\-run\fR or \fB\-\-load\fR\|. If none of those are given, read from standard input\|. Overrides \fB\-\-resume\fR, \fB\-\-run\fR and \fB\-\-load\fR\|. .IP " \fB\-\-mouse\-clipboard\fR[\fB=True\fR\||\fB=False\fR] " Enable clipboard operations with the mouse\|. If \fBTrue\fR (default), select text with the left mouse button to copy and paste with the middle mouse button\|. .IP " \fB\-\-ctrl\-c\-break\fR[\fB=True\fR\||\fB=False\fR] " If \fBFalse\fR, follow GW\-BASIC behaviour where Ctrl+C breaks AUTO and INPUT but not program execution or LIST\|. If \fBTrue\fR, treat Ctrl+C exactly like Ctrl+Break and Ctrl+Scroll Lock when \fB\-\-interface=graphical\fR\|. With \fB\-\-interface=\fR{\fBtext\fR\||\fBcli\fR}, Ctrl+C is always treated like Ctrl+Break\|. Default is \fBTrue\fR\|. .IP " \fB\-\-current\-device=\fR{\fBCAS1\fR\||\fB@\fR\||\fBA\fR\||\fBB\fR \|.\|.\|. \||\fBZ\fR}" Set the current device to the indicated PC\-BASIC drive letter or \fBCAS1\fR for the cassette device\|. The device chosen should be mounted to an actual location using \-\-mount (or \-\-cas1 if the cassette device is chosen)\|. .IP " \fB\-\-debug\fR[\fB=True\fR\||\fB=False\fR] " Developer option \- use only if you know what you\|'re doing\|. Enable debugging extension\|. .IP " \fB\-\-dimensions=\fR\fIx\fR,\fIy\fR " Set window dimensions to \fIx\fR by \fIy\fR pixels\|. This overrides \-\-scaling=native and \-\-aspect\|. Only has an effect if combined with \fB\-\-interface=graphical\fR\|. .IP " \fB\-d\fR \fB\-\-double\fR[\fB=True\fR\||\fB=False\fR] " Enable double\-precision transcendental math functions\|. This is equivalent to the \fB/d\fR option in GW\-BASIC\|. .IP " \fB\-e=\fR\fIstatement\fR[\fB:\fR\fIstatement\fR \|.\|.\|.] \fB\-\-exec=\fR\fIstatement\fR[\fB:\fR\fIstatement\fR \|.\|.\|.] " Execute BASIC statements\|. The \fIstatement\fRs 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 \fB:\fR\|. 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 \fB:\fR will be interpreted as part of a string if quoted with single quotes \fB\[dq]\fR\|. If your calling shell interprets such quotes, you should properly escape them\|. .IP " \fB\-\-extension=\fR\fImodule_name\fR[\fB,\fR\fImodule_name\fR \|.\|.\|. ] " Developer option \- use only if you know what you\|'re doing\|. Load extension module(s)\|. .IP " \fB\-\-font=\fR\fIfont_name\fR[\fB,\fR\fIfont_name\fR \|.\|.\|. ]" Use the specified fonts for the interface\|. The last fonts specified take precedence, previous ones are fallback\|. The available fonts are stored in font/\|. By default, the following fonts are available: \fBdefault\fR \fBcga\fR \fBmda\fR \fBvga\fR \fBolivetti\fR \fBtandy1\fR \fBtandy2\fR \|. The font names freedos, 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\|. .IP " \fB\-\-fullscreen\fR[\fB=True\fR\||\fB=False\fR] " Fullscreen mode\|. Only has an effect if combined with \fB\-\-interface=graphical\fR\|. .IP " \fB\-h\fR \fB\-\-help\fR " Show a usage message and exit\|. .IP " \fB\-\-hide\-listing=\fR\fIline_number\fR " Disable listing and saving to plain text of lines beyond \fIline_number\fR, as in GW\-BASIC beyond 65530\|. Use with care as this allows execution of hidden lines of code\|. Default is to list all lines\|. .IP " \fB\-\-hide\-protected\fR[\fB=True\fR\||\fB=False\fR] " Disable listing and saving to plain text of protected files, as in GW\-BASIC\|. Use with care as this allows execution of hidden lines of code\|. .IP " \fB\-i=\fR{\fIinput_file\fR\||{\fBSTDIO\fR\||\fBSTDIN\fR}[\fB:RAW\fR]} \fB\-\-input=\fR{\fIinput_file\fR\||{\fBSTDIO\fR\||\fBSTDIN\fR}[\fB:RAW\fR]} " Retrieve keyboard input from \fIinput_file\fR, except if KYBD: is read explicitly\|. Input from KYBD: files is always read from the keyboard, following GW\-BASIC behaviour\|. If \fIinput_file\fR is \fBSTDIO:\fR or \fBSTDIN:\fR, keyboard input will be read from standard input\|. If \fBRAW\fR is specified, input will be treated as codepage bytes\|. If not, it will be treated as the locale\|'s encoding (probably UTF\-8)\|. .IP " \fB\-\-interface=\fR[\fBnone\fR\||\fBcli\fR\||\fBtext\fR\||\fBgraphical\fR] " Choose the type of interface\|. Not all interfaces will be available on all systems\|. The following interface types may be available: \fBnone\fR Filter for use with pipes\|. Also \fB\-n\fR\|. \fBcli\fR Command\-line interface\|. Also \fB\-b\fR\|. \fBtext\fR ANSI text interface\|. Also \fB\-t\fR\|. \fBgraphical\fR SDL2 graphical interface\|. The following values for this option are deprecated: \fBansi\fR ANSI text interface\|. Synonym for \fBtext\fR\|. \fBsdl2\fR SDL2 graphical interface\|. Synonym for \fBgraphical\fR\|. \fBpygame\fR PyGame graphical interface\|. Please use \fBgraphical\fR instead\|. \fBcurses\fR NCurses text interface\|. Please use \fBtext\fR instead\|. The default is \fBgraphical\fR\|. .IP " \fB\-k=\fR\fIkeystring\fR \fB\-\-keys=\fR\fIkeystring\fR " Insert the \fIkeystring\fR into the keyboard buffer\|. \fIkeystring\fR may contain escape codes such as \[rs]r for return, \[rs]n for line feed and \[rs]x\fIXX\fR to enter CHR$(&H\fIXX\fR)\|. \fIkeystring\fR may contain e\-ASCII codes to indicate keypresses that do not have a regular character encoding\|. For example, \[rs]0\[rs]x0F indicates Shift+Tab\|. .IP " \fB\-l=\fR\fIprogram\fR \fB\-\-load=\fR\fIprogram\fR " Start in direct mode with the BASIC \fIprogram\fR loaded\|. .IP " \fB\-\-logfile=\fR\fIlog_file\fR " Write error and warning messages to \fIlog_file\fR instead of stderr\|. .IP " \fB\-\-lpt1=\fR\fItype\fR\fB:\fR\fIvalue\fR " Determine where the output goes when writing to the LPT1: parallel device\|. \fItype\fR\fB:\fR\fIvalue\fR can be \fBPRINTER:\fR[\fIprinter_name\fR][\fB:\fR\fItrigger\fR] Output is written to a printer\|. If \fIprinter_name\fR is not specified, the default printer is used\|. Windows and CUPS printers are supported\|. The printer will be activated when a file on LPT1:\fItrigger\fR sets an additional trigger to activate the printer: \fBline\fR After every line break\|. \fBpage\fR After every page break\|. \fBclose\fR No additional trigger The default is \fBclose\fR\|. \fBFILE:\fR\fIfile_name\fR Output is written to a file or character device such as \fB/dev/stdout\fR on Unix or \fBLPT1\fR on Windows\|. \fBSTDIO:\fR Output is written to the standard output of the calling shell\|. \fBPARPORT:\fR\fIport_number\fR Output is written to a Centronics parallel port, where \fIport_number\fR is \fB0\fR 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 \fBFILE:LPT1\fR instead\|. The default is \fBPRINTER:\fR, so that output goes to the default printer specified by the operating system\|. .IP " \fB\-\-lpt2=\fR\fItype\fR:\fIvalue\fR " Attach a resource to the LPT2: parallel device\|. See \fB\-\-lpt1\fR\|. 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\|. .IP " \fB\-\-lpt3=\fR\fItype\fR:\fIvalue\fR " Attach a resource to the LPT3: parallel device\|. See \fB\-\-lpt1\fR\|. 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\|. .IP " \fB\-f=\fR\fInumber_of_files\fR \fB\-\-max\-files=\fR\fInumber_of_files\fR " Set maximum number of open files to \fInumber_of_files\fR\|. This is equivalent to the \fB/f\fR option in GW\-BASIC\|. Default is \fB3\fR\|. .IP " \fB\-\-max\-memory=\fR\fImax_memory\fR[\fB,\fR\fIbasic_memory_blocks\fR] " Set the maximum size of the data memory segment to \fImax_memory\fR and the maximum size of the data memory available to BASIC to \fIbasic_memory_blocks\fR*16\|. In PC\-BASIC, the minimum of these values is simply the data memory size; the two values are allowed for compatibility with the \fB/m\fR option in GW\-BASIC\|. .IP " \fB\-s=\fR\fIrecord_length\fR \fB\-\-max\-reclen=\fR\fIrecord_length\fR " Set maximum record length for RANDOM files to \fIrecord_length\fR\|. Default is \fB128\fR, maximum is \fB32767\fR\|. This is equivalent to the \fB/s\fR option in GW\-BASIC\|. .IP " \fB\-\-monitor=\fR{\fBrgb\fR\||\fBcomposite\fR\||\fBgreen\fR\||\fBamber\fR\||\fBgrey\fR\||\fBmono\fR} " Sets the monitor type to emulate\|. Available types are: \fBrgb\fR RGB colour monitor (default)\|. \fBcomposite\fR Composite colour monitor\|. \fBgreen\fR Green\-tinted monochrome monitor\|. \fBamber\fR Amber\-tinted monochrome monitor\|. \fBgrey\fR Greyscale monochrome monitor\|. \fBmono\fR Green\-tinted monochrome monitor (same as \fBgreen\fR)\|. On SCREEN 2 with \fB\-\-video=\fR{\fBpcjr\fR\||\fBtandy\fR\||\fBcga\fR}, \fB\-\-monitor=composite\fR enables (crude) colour artifacts\|. .IP " \fB\-\-mount=\fR[\fIdrive\fR\fB:\fR\fIpath\fR[\fB,\fR\fIdrive\fR\fB:\fR\fIpath\fR \|.\|.\|. ]] " Assign the path \fIpath\fR to drive letter \fIdrive\fR:\|. The path can be absolute or relative\|. If this option is not specified: on Windows, all Windows drive letters will be assigned to PC\-BASIC drive letters; on other systems, the current working directory is assigned to Z:\|. If this option is specified but empty, do not mount any drives (except the internal device @:)\|. .IP " \fB\-n\fR " Run PC\-BASIC as a command\-line filter\|. Same as \fB\-\-interface=none\fR\|. .IP " \fB\-o=\fR\fIoutput_file\fR[\fB:append\fR] \fB\-\-output=\fR\fIoutput_file\fR[\fB:append\fR] " Send screen output to \fIoutput_file\fR, except if SCRN: is written to explicitly\|. Output to SCRN: files will always be shown on the screen, as in GW\-BASIC\|. If the specifier \fBappend\fR is given, the output file is appended to rather than overwritten\|. If \fIoutput_file\fR is \fBSTDIO:\fR or \fBSTDOUT:\fR, screen output will be sent to standard output\|. .IP " \fB\-\-peek=\fR[\fIseg\fR\fB:\fR\fIaddr\fR\fB:\fR\fIval\fR[\fB,\fR\fIseg\fR\fB:\fR\fIaddr\fR\fB:\fR\fIval\fR \|.\|.\|. ]] " Define PEEK preset values\|. If defined, DEF SEG \fIseg\fR:? PEEK(\fIaddr\fR) will return \fIval\fR\|. .IP " \fB\-\-preset=\fR\fIoption_block\fR " Load machine preset options\|. A preset option corresponds to a section defined in a config file by a name between square brackets, like [this] \fB\-\-preset=this\fR 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\|. .IP " \fB\-\-prevent\-close\fR[\fB=True\fR\||\fB=False\fR] " Suppress window close event\|. This allows BASIC to capture key combinations that normally close the window\|. Graphical interface only\|. By default, the operating system\|'s key combination to close a window (usually Alt+F4) terminates PC\-BASIC\|. Set \fB\-\-prevent\-close\fR to allow BASIC to capture this key combination instead\|. This is useful if your program uses this key combination\|. .IP " \fB\-q\fR \fB\-\-quit\fR[\fB=True\fR\||\fB=False\fR] " Quit interpreter when execution stops\|. If combined with \-\-run, PC\-BASIC quits when the program ends\|. If set in direct mode, PC\-BASIC quits after the first command is executed\|. .IP " \fB\-\-reserved\-memory=\fR\fInumber_of_bytes\fR " Reserve \fInumber_of_bytes\fR 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\|. .IP " \fB\-\-resume\fR[\fB=True\fR\||\fB=False\fR] " Resume from saved state\|. Overrides \-\-run and \-\-load\|. .IP " \fB\-r=\fR\fIprogram\fR \fB\-\-run=\fR\fIprogram\fR " Run the specified \fIprogram\fR\|. Overrides \-\-load\|. .IP " \fB\-\-scaling=\fR{\fBsmooth\fR\||\fBcrisp\fR\||\fBnative\fR} " Choose scaling method\|. \fBsmooth\fR The display is smoothly scaled to the largest size that allows for the correct aspect ratio\|. \fBcrisp\fR The display is scaled to the same size as with \fBsmooth\fR, but without smoothing\|. \fBnative\fR Scaling and aspect ratio are optimised for the display\|'s native pixel size, without smoothing\|. \fB\-\-scaling=native\fR overrides \-\-aspect\|. Default is \fBsmooth\fR\|. Only has an effect if combined with \fB\-\-interface=graphical\fR\|. .IP " \fB\-\-serial\-buffer\-size=\fR\fIsize\fR " Set serial input buffer \fIsize\fR\|. Default is 256\|. If set to 0, serial communications are disabled\|. .IP " \fB\-\-shell=\fR[\fIshell\-executable\fR] " Enable the SHELL statement to run the operating system command interpreter \fIshell\-executable\fR\|. The executable \fIshell\-executable\fR should support MS\-DOS\|'s COMMAND\|.COM calling conventions, in particular its /C switch\|. Example command interpreters are CMD\|.EXE on Windows and \[dq]wine cmd\|.exe\[dq] on Unix\|. If \fIshell\-executable\fR is empty (as it is by default), the SHELL statement is disabled\|. .IP " \fB\-\-soft\-linefeed\fR[\fB=True\fR\||\fB=False\fR] " Do not treat 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\|. .IP " \fB\-\-sound\fR[\fB=True\fR\||\fB=False\fR] " \fBFalse\fR Suppress sound output\|. \fBTrue\fR Output sound, if a sound driver is available (default)\|. If sound is on, PC\-BASIC will try to use the SDL2 library first; if it is not available, it will try PortAudio\|. If neither is available, sound will be disabled\|. The following values for this option are deprecated: \fBnone\fR Suppress sound output\|. Use \fBFalse\fR instead\|. \fBinterface\fR Use the native sound engine of the interface\|. Use \fBTrue\fR instead\|. \fBsdl2\fR Use the SDL2 sound generator\|. \fBportaudio\fR Use the PortAudio sound generator\|. \fBbeep\fR Use the built\-in speaker\|. .IP " \fB\-\-state=\fR\fIstate_file\fR " Set the save\-state file to \fIstate_file\fR\|. Default is pcbasic\|.session in the Application Data directory\|. .IP " \fB\-\-syntax=\fR{\fBadvanced\fR\||\fBpcjr\fR\||\fBtandy\fR} " Choose BASIC dialect\|. Available dialects are: \fBadvanced\fR IBM BASICA \fBgwbasic\fR Microsoft GW\-BASIC \fBpcjr\fR IBM PCjr Cartridge BASIC \fBtandy\fR Tandy 1000 GW\-BASIC\|. Default is \fBadvanced\fR\|. .IP " \fB\-t\fR " Use text\-based interface\|. Same as \fB\-\-interface=text\fR\|. .IP " \fB\-\-term=\fR\fIterminal_program\fR " Set the terminal program run by the PCjr TERM command to \fIterminal_program\fR\|. This only has an effect with \fB\-\-syntax=\fR{\fBpcjr\fR\||\fBtandy\fR}\|. .IP " \fB\-\-text\-width=\fR{\fB40\fR\||\fB80\fR} " Set the number of columns in text mode at startup\|. Default is \fB80\fR\|. .IP " \fB\-\-text\-encoding=\fR[\fIencoding\fR] " Set the text encoding\|. Text files (i\|.e\|. plain\-text programs and files opened for INPUT and OUTPUT) stored on a disk device will be assumed to be encoded in \fIencoding\fR\|. Examples of valid encodings are utf\-8, utf\-16, latin\-1\|. Please ensure that all characters in the current codepage are included in the encoding you choose; if this is not the case then such characters will be replaced by � or ?\|. If \fIencoding\fR is not set, text files will be treated as raw bytes in the current PC\-BASIC codepage\|. .IP " \fB\-\-utf8\fR[\fB=True\fR\||\fB=False\fR] " Set the text encoding to UTF\-8\|. This option is deprecated and ignored if \-\-text\-encoding is set\|. Use \fB\-\-text\-encoding=utf\-8\fR instead\|. .IP " \fB\-v\fR \fB\-\-version\fR " Print PC\-BASIC version string and exit\|. .IP " \fB\-\-video=\fR\fIadapter\fR " Set the video adapter to emulate\|. Available adapters: \fBvga\fR Video Graphics Array \fBega\fR Enhanced Graphics Adapter \fBcga\fR Color/Graphics Adapter \fBmda\fR Monochrome Display Adapter \fBhercules\fR Hercules Graphics Adapter \fBpcjr\fR IBM PCjr graphics \fBtandy\fR Tandy 1000 graphics \fBolivetti\fR Olivetti M24 graphics Default is \fBvga\fR\|. .IP " \fB\-\-video\-memory=\fR\fIsize\fR " Set the amount of emulated video memory available\|. This affects the number of video pages that can be used\|. On PCjr and Tandy, this can be changed at runtime through the CLEAR statement; at least 32768 needs to be available to enter SCREEN 5 and SCREEN 6\|. Default is \fB16384\fR or PCjr and Tandy and \fB262144\fR on other machine presets\|. .IP " \fB\-w\fR \fB\-\-wait\fR[\fB=True\fR\||\fB=False\fR] " If \fBTrue\fR, PC\-BASIC waits for a keystroke before closing the window on exit\|. Only works for \fB\-\-interface=graphical\fR or \fB\-\-interface=text\fR\|. Default is \fBFalse\fR\|. .IP " \fB\-\-options=\fR\fIgwbasic_options\fR " Set GW\-BASIC\-style command\-line switches\|. This is a convenience option to facilitate migration from GW\-BASIC\|. \fIgwbasic_options\fR is a string that may contain the following options: \fB/d\fR Enable double\-precision floating\-point math functions\|. See also \fB\-\-double\fR\|. \fB/f:\fR\fIn\fR Set the maximum number of open files\|. See also \fB\-\-max\-files\fR\|. \fB/s:\fR\fIn\fR Set the maximum record length for RANDOM files\|. See also \fB\-\-max\-reclen\fR\|. \fB/c:\fR\fIn\fR Set the size of the receive buffer for COM devices\|. See also \fB\-\-serial\-buffer\-size\fR\|. \fB/i\fR Statically allocate file control blocks and data buffer\|. Note that this is already the default approach in GW\-BASIC and PC\-BASIC so that this option has no effect\|. \fB/m:\fR\fIn\fR,\fIm\fR Set the highest memory location to \fIn\fR and maximum BASIC memory size to \fIm\fR*16 bytes\|. See also \fB\-\-max\-memory\fR\|. \fB>\fR\fIfilename\fR Write screen output to \fIfilename\fR\|. See also \fB\-\-output\fR\|. \fB>>\fR\fIfilename\fR Append screen output to \fIfilename\fR\|. See also \fB\-\-output\fR\|. \fB<\fR\fIfilename\fR Read keyboard input from \fIfilename\fR\|. See also \fB\-\-input\fR\|. GW\-BASIC\-style switches are not case sensitive\|. Note that the symbols used in these switches may have different meaning in the shell from which PC\-BASIC is called; you should quote and escape the options as necessary\|. .SH EXAMPLES .IP "\fBpcbasic\fR" Start PC\-BASIC in direct mode, emulating GW\-BASIC/BASICA with VGA graphics\|. .IP "\fBpcbasic \-\-codepage=950\fR" Start PC\-BASIC using the Big\-5 codepage\|. .IP "\fBpcbasic Foobar\|.baz\fR" Start PC\-BASIC with package Foobar\|. Load the settings from the package; usually this will run a main program contained in the package\|. .IP "\fBpcbasic Foobar\|.baz \-\-convert=A \-\-text\-encoding=utf\-8\fR" List the main program of package Foobar to standard output as UTF\-8\|. .IP "\fBpcbasic MYPROG\|.BAS \-\-mount=A:\|./files,B:\|./morefiles\fR" Mount the current directory\|'s subdirectory files as drive A: and subdirectory morefiles as drive B:, then run MYPROG\|.BAS\|. .IP "\fBpcbasic \-\-mount=A:C:\[rs]fakeflop\fR" Run PC\-BASIC with Windows directory C:\[rs]fakeflop mounted as A: drive\|. .IP "\fBpcbasic Z:\[rs]INFO\|.BAS \-\-preset=mda \-\-monitor=amber\fR" Run INFO\|.BAS in the current directory on an emulated MDA with amber tinted monitor\|. .IP "\fBpcbasic /home/me/retro/COMP\|.BAS \-\-preset=cga \-\-monitor=composite\fR" Run COMP\|.BAS stored at /home/me/retro on an emulated CGA machine with a composite monitor\|. .IP "\fBpcbasic PCJRGAME\|.BAS \-\-preset=pcjr \-k=\|'start\[rs]r\|'\fR" Run PCJRGAME\|.BAS on an emulated PCjr and feed in the keystrokes startEnter\|. .IP "\fBpcbasic BANNER\|.BAS \-\-lpt2=PRINTER:\fR" Run BANNER\|.BAS in default mode with the default printer attached to LPT2:\|. .IP "\fBpcbasic \-\-resume\fR" Resume the most recently closed PC\-BASIC session\|. .IP "\fBpcbasic \-c ?1+1\fR" Execute the BASIC command PRINT 1+1 in the command\-line interface and return to the calling shell\|. .SH FILES .IP "\fI$XDG_CONFIG_HOME/PCBASIC\|.INI\fR or \fI~/\|.config/pcbasic\-2\|.0/PCBASIC\|.INI\fR" User configuration file\|. Options in this file take the form of command\-line options without the preceding \fB\-\-\fR\|. One option per line\|. Options added under the [pcbasic] header are loaded by default\|. Options added under another header will be loaded if the \fB\-\-preset\fR option group of that name is loaded\|. .IP "\fI$XDG_DATA_HOME/pcbasic\|.session\fR or \fI~/\|.local/share/pcbasic\-2\|.0/pcbasic\|.session\fR" Saved state of the last PC\-BASIC session\|. Continue the last session with \fB\-\-resume\fR\|. This file is saved in a binary storage format and not meant to be edited or exchanged\|. .SH ENVIRONMENT There are no environment settings specific to PC\-BASIC\|. However, BASIC programs may access the environment through the ENVIRON$ function and could therefore have their own environment settings\|. .SH AUTHOR PC\-BASIC is written and maintained by Rob Hagemans \|.