The uBASIC interpreter
Find a file
Jeremy Green 84e3f7df65
Update README.md
Removed ref to test.c
2025-09-04 22:38:15 +01:00
.vscode Fix line ending for windows 2025-09-02 21:01:56 +01:00
.gitattributes Enable uBasic to run from the command line 2025-09-02 20:09:51 +01:00
.gitignore Enable uBasic to run from the command line 2025-09-02 20:09:51 +01:00
LICENSE Added file LICENSE. 2013-12-21 22:46:35 +02:00
Makefile New instructions PEEK and POKE to call outside routines. 2013-12-23 19:06:17 +02:00
makefile.bat Update make file to output ubasic.exe 2025-09-03 11:00:14 +01:00
README.md Update README.md 2025-09-04 22:38:15 +01:00
run-ubasic.c Fix line ending for windows 2025-09-02 21:01:56 +01:00
test-string.bas Adjust debugging 2025-09-03 17:48:24 +01:00
test.bas Enable uBasic to run from the command line 2025-09-02 20:09:51 +01:00
tests.c New instructions PEEK and POKE to call outside routines. 2013-12-23 19:06:17 +02:00
tokenizer.c Adjust debugging 2025-09-03 17:48:24 +01:00
tokenizer.h Adjust debugging 2025-09-03 17:48:24 +01:00
ubasic.c Adjust debugging 2025-09-03 17:48:24 +01:00
ubasic.h New instructions PEEK and POKE to call outside routines. 2013-12-23 19:06:17 +02:00
vartype.h Moved VARIABLE_TYPE to vartype.h. VARIABLE_TYPE functions. 2013-12-21 23:59:44 +02:00

uBasic: a really simple BASIC interpreter

http://dunkels.com/adam/ubasic/

Written in a couple of hours, for the fun of it. Ended up being used in a bunch of places!

The (non-interactive) uBASIC interpreter supports only the most basic BASIC functionality: if/then/else, for/next, let, goto, gosub, print, and mathematical expressions. There is only support for integer variables and the variables can only have single character names. I have added an API that allows for the program that uses the uBASIC interpreter to get and set BASIC variables, so it might be possible to actually use the uBASIC code for something useful (e.g. a small scripting language for an application that has to be really small).