Image Map Image Map
Results 1 to 5 of 5

Thread: An interactive BASIC interpreter implemented in Python 3

  1. #1

    Post An interactive BASIC interpreter implemented in Python 3

    If this is of interest to anyone, Iíve written a BASIC interpreter in Python. This started as a personal project, but I mention it here as Iíve put quite a lot of work into it and the implementation is non-trivial. I think Iíve done a reasonably elegant and well structured piece of work. Error checking is comprehensive and error reporting should at least allow the user to narrow down which line of their BASIC program is invalid.

    Iíve implemented all of the major control structures as well as numeric and string variables. There is also support for numeric and string arrays.

    The interpreter is interactive in the style of a 1980s home computer (which was my introduction to programming, via the TI99/4a, RML 380Z and BBC Micro). At the prompt you may enter unstructured BASIC statements to create a program, run, list and save it, as well as load previously written BASIC programs. Given that it is written in Python 3, the interpreter should run on multiple platforms.

    The interpreter is available for free in Github using this link: https://github.com/richpl/PyBasic.

  2. #2
    Join Date
    Jan 2007
    Location
    Pacific Northwest, USA
    Posts
    32,507
    Blog Entries
    18

    Default

    Does Python 3 exist for Z80 or 8088?

  3. #3

    Default

    Nope, but I hope the interpreter will enable those without access to one of those old architectures to experience what it was like programming them using BASIC.

  4. #4
    Join Date
    Jan 2005
    Location
    Principality of Xeon (NJ)
    Posts
    1,349

    Default

    Interested when time and energy permits.

    Clearly you wanted to see the end.result. But was this an.exercise.in Python? What about building a 64 bit basic interpreter outright?

  5. #5

    Default

    An exercise in interpreter writing primarily, and I can write Python. My C is too rusty to write anything which runs natively.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •