vbSlacker
vbSlacker is an ongoing experiment. I've been picking at this for
several years now. This is meant to be a compiler/runtime library
for legacy BASIC code. The goal was to support most of the syntax
and API of Qbasic, QuickBASIC 4.5, and the earlier Visual Basics.
It was intended to compile to native code, and the runtime was to
be C-callable, albeit with some weird macros and inline asm to
handle the stack and registers.
This project is currently not being worked on, but volunteers that
would like to tackle it are always welcome. I pick at this codebase
once in a while, but not heavily.
What works:
- Lots of the standard BASIC runtime API is implemented.
- Garbage collection by Boehm's library.
- A good chunk on interesting documentation on BASIClib internals
got written.
- Abstract console driver module. The SCREEN command would dlopen()
a driver that implemented the console API; this gives you
separate and optional ncurses support, direct-to-/dev/vcsa
support, stdio support, SDL support for graphic modes, etc.
- Abstractions over just about every common OS feature (threads,
i/o, dynamic libraries, etc).
- Regression testing code for some of the subsystems.
- Written with a concern for portability to other OSes/processors.
- A "Windows compatibility layer" for porting legacy code that
tries to fake the DOS/Windows filesystem (and other things) at
the API level. This can be disabled for non-legacy code.
- All internal strings are modifiable by text file without a
recompile. That means translations to other languages are very
easy.
- Lots of other little stuff.
What doesn't work:
- Compiler never got written. We were thinking of generating
portable (but not really human readable) C code, and use a
given system's C compiler, but near the end of the real work,
we opted to try and make a GCC frontend. Never started, though.
- Missing API calls. Stuff that isn't filled in/implemented.
- Never really got into the component subsystem, which was to be
the basis for the GUI subsystem.
- Lots of other little stuff.
In short, this is currently a half-complete BASIC runtime with some
cool ideas. :)
License:
Building/Installing:
-
bzcat vbslacker.tar.bz2 | tar -xvvf -
cd vbslacker
./buildall.sh
cd BASIClib
cp ./vbslacker.cons ./vbslacker.lang /etc
- After that, you can just build BASIClib, or libgc, or the test programs
individually. The only things that use BASIClib right now are the
test programs, so you'll want to:
cd vbslacker/tools/testlib
make
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:../../BASIClib:../../BASIClib/consoledrivers
./testlib
- If you get an "Error #17", then you either didn't copy vbslacker.lang
and vbslacker.cons to /etc, or you didn't set the LD_LIBRARY_PATH, or
something didn't build correctly. Obviously, making this more
user-friendly is a necessity. :)
- Your Mileage May Vary under Windows.
Downloads:
Page maintained by
Ryan C. Gordon.