Skip to main content

Minimal BASIC interpreter for running MININEC

Project description

Author:

Ralf Schlatterbeck <rsc@runtux.com>

This is a BASIC interpreter for an old dialect of the language used in early IBM PCs. It is written in Python. I wrote this over a weekend to be able to run old MININEC code (the linked version of MININEC contains some small fixes). It has almost no error checking (it relies on the code being correct not trying to aid you in writing a new program in BASIC, I think the world does not need new code in BASIC). If you’re looking for a working BASIC interpreter, look at the pcbasic implementation, it is also in Python but faithfully reproduces the memory limitations of the machines at the time. And it seems to use single-precision floating point numbers. This is why I wrote my own interpreter: I needed to compare computations in double precision and I could not fit some examples into the limited memory of pcbasic.

I’m probably not going to put much work into improving this code, it has achieved the purpose: Running (and debugging in Python) old MININEC code to allow me to compare the computations in BASIC to my re-implementation of MININEC in Python, pymininec.

Changes

Version 0.3: Fix rules for printlist

The syntax of parameters to the PRINT statement can either use a semicolon (or a comma) to separate expressions or just put the expressions together without a separator. The latter had some quite ad-hoc rules and I’ve removed many of them, the result removes a reduce/reduce conflict…

Version 0.2: First working (released) version

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

yabasi-0.3.tar.gz (19.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

yabasi-0.3-py3-none-any.whl (18.6 kB view details)

Uploaded Python 3

File details

Details for the file yabasi-0.3.tar.gz.

File metadata

  • Download URL: yabasi-0.3.tar.gz
  • Upload date:
  • Size: 19.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for yabasi-0.3.tar.gz
Algorithm Hash digest
SHA256 759f2d46012b67414097c15512d43961b7c22af62c975ac26ad782d680c070d1
MD5 791a6dfdb4544010bc5c99744f779c80
BLAKE2b-256 d8e5331b62aae490dcc3b53e0f2dfa72a97ac381d671a74ae98dbd59cb4878ae

See more details on using hashes here.

File details

Details for the file yabasi-0.3-py3-none-any.whl.

File metadata

  • Download URL: yabasi-0.3-py3-none-any.whl
  • Upload date:
  • Size: 18.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for yabasi-0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 7e6142eb4e4b6d71fe2a6f8b0ae135c3df01663226b4442c74cc32650202f69d
MD5 44d9144c8f2f6836a0d52e724f9821a9
BLAKE2b-256 2175ee23e783b3bcb1279e95147243ecdc40ad41c28ebb28b0b3c99cd8a63838

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page