Potentially useful BASIC extensions


New Member
Nov 6, 2019
I found "EnhBASIC" aka Enhanced BASIC from Lee Davison. Even though his BASIC is (a) not under an accessible license, and (b) appears to be an unauthorized extension of MSBASIC anyway, it does have some extensions that I think are organic and worth consideration:

Functions for setting, clearing, and testing bits in an address (yes, in BASIC).

DEC and INC ... for BASIC variables (neat!). E.G. DEC A. His version appears to be chainable, as well... so you could do DEC A, B and it decrements both. Or DEC A,A to subtract two (and it's faster than A = A - 2).

"DO" and "LOOP" statements that can be controlled tail-fashion with WHILE and UNTIL. Very nice if you're used to programming in C and want something that vaguely approaches the for( ; ; ) construct.

DOKE and DEEK for pushing words to and from addresses and variables.


Exclusive OR. He calls it EOR, but I prefer XOR.

A function that returns the address of a variable or array. Useful if you want to work with buffers... or create a dynamic hunk of assembly then call it with SYS or whatever.
  • Like
Reactions: JustinBaldock


New Member
Jul 22, 2019
Since there is only going to be ~30k for Basic programs and variables, I would like to see one of the banks of switchable ram be usable for Basic variable storage similar to how the C128 managed basic variables. The basic garbage collector can be improved by dividing that 64K bank into chunks and then using a generational garbage collection algorithm.