Code Monkey home page Code Monkey logo

minibasic's Introduction

MiniBASIC

BASIC interpreter for Mini Micro

This is a little project to create an interpreter for the BASIC programming language for Mini Micro. The interpreter itself is written in MiniScript.

NOTE: This project requires Mini Micro v1.2 (released July 2023).

Current Status

MiniBASIC is nearly complete. The full standard BASIC language has been implemented, plus a few nice additions like PLOT, LINE, RECT, ELLIPSE, POLY, and SOUND. For interactive editing, it supports the standard functions plus niceties like EDIT, LISTREM, and RENUMBER.

Features still planned:

  • better error trapping, e.g., using ; between statements rather than :, or use of == instead of =

See the Documentation for general notes as well as a complete reference of all available functions and commands.

Sample Programs

Included in the programs/CC subdirectory are about a hundred classic (old) BASIC demos and games from Creative Computing magazine (via BASIC Computer Games). These should all work now; please open an issue if you find any of them broken.

I'm also starting a second collection of programs written specifically for MiniBASIC, or adapted from other sources. The programs/demo subdirectory contains the first of these. It includes some AppleSoft programs that have been updated to standard MiniBASIC. (Including the classic Apple game Lemonade Stand!)

Try It Yourself!

You can run MiniBASIC on the web at itch.io. You will also find download links there which include the latest preview build of Mini Micro, as well as the MiniBASIC code and sample programs.

If you want to do it all yourself, based on this GitHub repo, then you will need at least a preview release of Mini Micro 1.2 (because it uses some of the latest features of the MiniScript language). So:

  1. download Mini Micro 1.2 or later from MiniScript.org or itch.io.
  2. unpack the downloaded app, and run (you might need to right-click an "open" the first time, as the app is not yet code-signed)
  3. download or clone this repo
  4. in Mini Micro, click on the top disk slot below the screen, and choose "Mount Folder..."
  5. select the folder containing this README.md and basic.ms
  6. type reboot at the Mini Micro prompt (or quit and relaunch)

That should do it! Now whenever Mini Micro starts up, it should go straight into MiniBASIC, which you can recognize by the > prompt.

If something goes wrong, MiniBASIC may crash, and drop you out into the MiniScript (recognizable by the ] prompt). In that case, just type basic to restart MiniBASIC (or, reboot if all else fails).

References

Detailed references on various old BASIC dialects can be hard to find. But here are some:

For discussion, consider:

minibasic's People

Contributors

chinhouse avatar joestrout avatar popey avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

minibasic's Issues

Microsoft BASIC-80: line input

Sure would be nice if MiniBasic has Microsoft BASIC-80's line input command. As it is, there is no reliable way to get a line of arbitrary input from the user.

rem after a dim doesn't work

rem after a dim does not work. For example:

dim pstack(80) rem stack for minprec in expressions

"Error: identifier expected in DIM statement"

shell commands in DATA statements not being treated as data

image
From the original text from Discord:
Look at line 5090. The original input of this line had no spaces separating the data items. Everything after CAT didn't get separated and subsequently became one item when read by the READ statement.

Comments in Basic programs

  1. While REM is supported, rem is not. Would be nice to support both.
  2. The single quote is used as a replacement for rem in some dialects - such as GW-Basic. Would be nice to have that.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.