A simple BASIC interpreter and REPL written in C.
- REPL Interface: Interactive environment for writing and running BASIC programs.
- Memory Management: Configurable memory pool for program and variable storage.
- BASIC Dialect: Supports a variety of standard BASIC keywords and functions.
- Cross-Platform: Built with CMake, supporting both Linux and Windows.
PRINT, LET, IF, THEN, ELSE, GOTO, GOSUB, RETURN, FOR, TO, STEP, NEXT, WHILE, WEND, INPUT, DIM, END, STOP, REM
SCREEN, CIRCLE, LINE, RECT, COLOR, CLEAR, FLIP, POINT, TEXT, SPRITE, FILLED, CLOSE, POLL
- Sprites:
SPRITE LOAD id, "file",SPRITE DRAW id, x, y [, scale],SPRITE FREE id - Input:
POLL MOUSE xvar, yvar [, bvar],POLL KEY kvar
LIST, RUN, NEW, LOAD, SAVE
- Arithmetic:
+,-,*,/,^,MOD - Logical:
AND,OR,NOT - Comparison:
=,<>,<,>,<=,>= - Mathematical:
SQR,INT,ABS,RND,SIN,COS,TAN,LOG,EXP,ATN,SGN - Strings:
LEN,MID$,LEFT$,RIGHT$,STR$,VAL,CHR$,ASC
- C compiler (supporting C23)
- CMake 4.0 or higher
mkdir build
cd build
cmake .. # Add -DNEKO_BASIC_GRAPHICS=OFF to disable graphics
cmake --build .Run the executable to start the REPL:
./neko_basic-m,--mem <size>: Specify the memory pool size in MiB. If not provided, the program will prompt for it on startup.
10 PRINT "Hello, Neko BASIC!"
20 FOR I = 1 TO 5
30 PRINT "Iteration: "; I
40 NEXT I
50 ENDThis project is licensed under the MIT License - see the LICENSE file for details.