Home

Awesome

LaBASIC

Description

Now you can turn your LaFortuna into an 80s portable computer! What? It's already dumb like an 80s computer? Ah, ok, 70s! Or whenever BASIC was invented.

In case you haven't guessed, LaBASIC is a BASIC interpreter for the LaFortuna board. The reason I decided to create an interpreter is to make programming on the LaFortuna easier. I know nothing can match C, but sometimes you want to hack something quickly and a higher level language is perfect for this. Whether BASIC is the appropriate choice for an interpreted language will be left up for debate to the reader.

Commands

Working:

PRINT 'some string'         # print any string
PRINT ENDL                  # print a new line
PRINT $varname              # print the value of a variable
LED ON                      # turn the LED on
LED OFF                     # turn the LED off
PAUSE 123                   # pause for 123 ms
LET varname = 42            # assign a value to a variable
GOTO 5                      # skip to the instruction on line 5 (1-based index)
READ input                  # read a number with the rotary encoder and store it in a variable

To be implemented:

Future plans

Sources

The code is available on GitHub: https://github.com/aluxian/UoS-CS2-LaBASIC

Credits

I got the idea from Robin Edwards' ArduinoBASIC interpreter:

Based on FortunaOS which includes:

Usage

License

GNU GPL

Copyright (c) 2018 Alexandru Rosianu