For all people interested in the continued usage and evolution of the BASIC programming language.

HomeVB 7+VB 1-6FBQB64QB45GW-BASICMicroRetro



Enhanced BASIC is a BASIC interpreter for the 6502 and compatible microprocessors. It is constructed to be quick and powerful and easily ported to most 6502 systems. It requires few resources to run and includes instructions to facilitate easy low level handling of hardware devices. It also retains most of the powerful high level instructions from similar BASICs.

EhBASIC was created by Lee Davidson, an engineer from Wales, who apparently shared a lot of his hobby with the community through his website. Lee Davidson passed away September 2013. If it weren’t for individuals such as Hans Otten, Lee’s works may have disappeared into oblivion after his passing with the subsequent shut down of his website.







Starting EhBASIC will mostly depend on how you set up your system to start it. The following assumes you are trying to run EhBASIC using the example monitor and Michal Kowalski’s 6502 simulator, though this should not differ too much from the startup of EhBASIC on a real system.

You should then be presented with the [C]old/[W]arm prompt as seen here. As the simulator has just been started you should now press C for a cold start. This should present you with the Memory size ? prompt. Now type either carriage return, in which case EhBASIC calculates available memory space automatically, or enter the total size of the memory in either decimal, hex or binary followed by a carriage return.

E.g. to set the physical memory size to 8k bytes.

In decimal ..

Memory size ? 8192

.. or in hex ..

Memory size ? $2000

.. or in binary.

Memory size ? %10000000000000

EhBASICs program memory is then allocated from Ram_base, which is usually $0300, up to the limit specified. Any remaining RAM, or any RAM not continuous from EhBASICs memory, may be used to contain user subroutines or data. If you did not enter a number greater than the minimum required to run EhBASIC, or there is not the minimum memory present, then EhBASIC will return to the Memory size ? prompt.

Do not type a number larger than the physical memory present. EhBASIC assumes you know what you are doing and does not check the specified memory size. Trying to use non-existent RAM will, at best, corrupt your string variables. This check can easily be implemented, the code is already in place but is commented out. See the source for more details.

There is no Terminal width ? prompt as with some BASICs, the default is for no terminal width limit to be set. However if you wish to set a terminal width, and a TAB step size, there is a WIDTH command available, see WIDTH in the EhBASIC language reference.If the memory sizing was successful then EhBASIC will respond with the total number of bytes available for both programs and variables and then the Ready prompt. The display should look something like the image on the right.

You are now ready to start using EhBASIC.

I wasn’t able to get the above instructions to work as prescribed. If you have any experience in getting the above to work, please reach out to me with instructions so that we can share this with everyone.



After some research was I able to find an emulator/simulator and functioning version of EhBASIC thanks to Seth Morabito and his SYMON - A 6502 System Simulator project.

With that said, there was a bit of fiddling that was necessary to get things working…

However, this is where I ran into a problem. The docs state that this file should automatically load but this doesn’t appear to be the case (and I’ve reported the issue - awaiting a response). To work around this…

From here you can follow the above instructions on usage.

This, of course, assumes you have a recent version of Java installed.


SYMON has a Composite Video (View -> Video Window) that emulates the output of the MOS 6545 CRT Controller. The following code can be entered in EhBASIC to fill the screen with all the available printable characters.

10 J = 0
20 FOR I = 28672 TO 29672
40 IF J < 255 THEN J = J + 1 ELSE J = 0
60 END



More Information