Skip to content

gilsim12/pcbasic

 
 

Repository files navigation

PC-BASIC

A free, cross-platform emulator for the GW-BASIC family of interpreters.

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.

PC-BASIC is free and open source software released under the GPL version 3.

See also the PC-BASIC home page.


Quick Start Guide

This quick start guide covers installation and elementary use of PC-BASIC. For more information, please refer to the full PC-BASIC documentation which covers usage, command-line options and a comprehensive GW-BASIC language reference. This documentation is also included with the current PC-BASIC release.

If you find bugs, please report them on the SourceForge discussion page or open an issue on GitHub. It would be most helpful if you could include a short bit of BASIC code that triggers the bug.

Installation

Packaged distributions can be downloaded from one of the following locations:

On Windows:

  • run the installer
  • to start, click PC-BASIC in your Start menu

On OS X:

  • mount the disk image
  • to start, double click the PC-BASIC app

On Linux and other Unix:

  • untar the archive
  • run sudo ./install.sh. You may be asked to install further dependencies through your OS's package management system.
  • to start, click PC-BASIC in your Applications menu or run pcbasic on the command line.

If the options above are not applicable or you prefer to install from source, please consult INSTALL.md for detailed instructions.

Usage essentials

Click on the PC-BASIC application icon or run pcbasic on the Windows, OSX or Linux command line and PC-BASIC will start in direct mode with no program loaded. The default emulation target is GW-BASIC 3.23 on a generic IBM-compatible PC with a VGA video card.

A few selected command-line options:
pcbasic PROGRAM.BAS runs the program file named PROGRAM.BAS directly.
pcbasic --preset=tandy starts with the emulation target set to Tandy GW-BASIC on a Tandy 1000.
pcbasic --preset=pcjr starts with the emulation target set to Cartridge BASIC on an IBM PCjr.
pcbasic -h shows all available command line options.

If you prefer to run PC-BASIC from a GUI, you can set the required options in the configuration file instead. The configuration file is stored in the following location:

OS Configuration file
Windows %APPDATA%\pcbasic\PCBASIC.INI
OS X ~/Library/Application Support/pcbasic/PCBASIC.INI
Linux ~/.config/pcbasic/PCBASIC.INI

The expression %APPDATA% is a Windows variable pointing to the folder in your roaming profile where applications store their data and settings. Typing the expression as above in the Windows Explorer should get you to the right place. Under Windows 7, %APPDATA% normally is the location C:\Users\YourUsername\AppData\Roaming\ where you replace YourUsername with your Windows login name.

For example, you could include the following line in the section [pcbasic] in PCBASIC.INI, to emulate IBM PCjr Cartridge Basic:

preset=pcjr  

BASIC survival kit

PC-BASIC starts in direct mode, a 1980s-style interface operated by executing BASIC commands directly. There is no menu, nor are there any of the visual clues that we've come to expect of modern software.

A few essential commands to help you get around:
LOAD "PROGRAM" loads the program file named PROGRAM.BAS into memory, but does not run it yet.
LIST displays the BASIC code of the current program.
RUN starts the current program.
SAVE "PROGRAM",A saves the current program to a human-readable text file named PROGRAM.BAS.
NEW immediately deletes the current program from memory.
SYSTEM exits PC-BASIC immediately, discarding any unsaved program or data.

Use one of the key combinations Ctrl+Break, Ctrl+Scroll Lock, Ctrl+C or F12+B to interrupt a running program and return to direct mode.

Getting programs

The following pages have GW-BASIC program downloads, lots of information and further links.

About

PC-BASIC - A free, cross-platform emulator for the GW-BASIC family of interpreters

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 51.3%
  • HTML 42.1%
  • Visual Basic .NET 5.4%
  • Shell 0.7%
  • CSS 0.3%
  • NSIS 0.2%