Skip to content

EkBass/BazzBasic

Repository files navigation

BazzBasic

BazzBasic is a BASIC interpreter built to work with the .NET10 Framework.

It supports many of the features of BASIC interpreters from the 80s, but also offers something modern.

Development

So far, EkBass has been responsible for the development of BazzBasic.

BazzBasic is released under the open source MIT license.

Its source code is available and visible to everyone in the project's GitHub repository.

Currently, the development work is done in the Windows 11 operating system, but with quite a bit of effort it can also be translated to Linux or MacOS.

Main functionalities

Most familiar BASIC features work either completely or almost completely as users of traditional BASIC languages ​​are used to using them.

User-Defined Functions

With or without recursion.

DEF FN factorial$(n$) 
    IF n$ <= 1 THEN 
        RETURN 1 
    END IF 
    RETURN n$ * FN factorial$(n$ - 1)
END DEF

PRINT FN factorial$(5) ' Output: 120
PRINT FN factorial$(10) ' Output: 3628800

SDL2 Graphics

BazzBasic offers a reasonable sampling of SDL2 features.

If your program uses graphic features, SDL2.dll must be in the same directory. This does not apply to console-only programs.

See Graphics Commands

Sounds

BazzBasic includes a sound system built on SDL2_mixer, supporting audio playback with both background and blocking modes.

See Sound Commands

Source Control

With the INCLUDE function, you can split the source code into different files and folders or generate tokenized libraries.

See Preprocessor or Generating libraries

Data types

Unlike many traditional BASIC interpreters, which required strong typing and often separated different data types with suffixes such as $ or %, BazzBasic copes smoothly with untyped data.

Typeless Variables and Constants

Variables automatically hold either numbers or strings:

LET num$ = 42            ' Number
LET text$ = "Hello"      ' String
LET mixed$ = "123"       ' String (quoted)

See Variables & Constants

Arrays

BazzBasic arrays are fully dynamic and support numeric, string, or mixed indexing.

DIM MyArray$
MyArray$("name") = "John Smith"
MyArray$("age") = 42

See Arrays

Getting Started

More Resources

BazzBasic size

Currently, BazzBasic requires about 70 megabytes + SDL2.dll

PublishTrimmed=true would reduce its size, but thorough testing is needed first.

BazzBasic includes .NET 10 assemblies during compilation, which affects the file size.

.NET 10, although a bit bulky, still offers compatibility far into the future.,