<2kbyte 6502 Tiny Basic?

Topics related to older 6502-based hardware and systems including (but not limited to) the MOS Technology KIM-1, Synertek SYM-1, and Rockwell AIM-65.
User avatar
barrym95838
Posts: 2056
Joined: 30 Jun 2013
Location: Sacramento, CA, USA

Re: <2kbyte 6502 Tiny Basic?

Post by barrym95838 »

Thank you for the update, Will. I'm totally fine with you posting here, because I agree that some of your techniques have universal 8-bit appeal ... and you're providing us with a challenging target for our own experiments.
Got a kilobyte lying fallow in your 65xx's memory map? Sprinkle some VTL02C on it and see how it grows on you!

Mike B. (about me) (learning how to github)
User avatar
VinCBR900
Posts: 53
Joined: 08 Sep 2017
Location: UK Expat living in Washington State, US

Re: <2kbyte 6502 Tiny Basic?

Post by VinCBR900 »

Hullo,
well its been a while since I originally posted asking for <2Kbyte tiny basic. So I had a go myself using Claude.

Attached is a file which will load into the (Superb) Kowalski emulator - it has a little BASIC program already in the program space you can LIST and RUN without having to type anything in. Ensure the Serial term emulator is enabled at $e000 and 65c02 Assembly extensions.

Sadly, it is not <2 kbyte but closer to 4kbyte, so I ended up with a crapper version of Woz's Apple BASIC. It is tokenized so has some performance, but not optimized for speed.

Anyway, enjoy. I'll upload to Github at some point, and will share the stripped down, slower non-tokenized versions that is just over 2kbyte soon.
Attachments
tinybasic53.asm
65C02 Tiny Basic V5.3 by V Crabtree
(55.88 KiB) Downloaded 30 times
User avatar
VinCBR900
Posts: 53
Joined: 08 Sep 2017
Location: UK Expat living in Washington State, US

Re: <2kbyte 6502 Tiny Basic?

Post by VinCBR900 »

And after a bit more wrestling with Claude, here is a < 2kbyte stripped down version that has further potential for hand optimization e.g. INSLINE/DELINE, DIV/MUL, Statement Dispatcher. Modern AI is amazing.

Currently about a dozen bytes free and is not tokenized, so about 5x slower than the tokenized versions.

Load in Kawalski, enable 65C02 instructions and terminal emulation, LIST, RUN, no typing required.

Enjoy!
Attachments
microbasic6.asm
2kbyte Tiny Basic (MicroBasic) V6 by Vincent Crabtree
(36 KiB) Downloaded 29 times
User avatar
BigDumbDinosaur
Posts: 9425
Joined: 28 May 2009
Location: Midwestern USA (JB Pritzker’s dystopia)
Contact:

Re: <2kbyte 6502 Tiny Basic?

Post by BigDumbDinosaur »

VinCBR900 wrote:
...here is a < 2kbyte stripped down version...
It will assemble, but doesn’t run—gets stuck at the PUTCH sub in the I/O stubs section, nothing is displayed in the terminal window and there is no response to typing.

BTW, you should probably add a .opt proc65c02,swapbin,caseinsensitive statement as the first line in your source code to make it clear to the assembler how things are to be processed.  Otherwise, things may not behave as wanted.
x86?  We ain't got no x86.  We don't NEED no stinking x86!
User avatar
VinCBR900
Posts: 53
Joined: 08 Sep 2017
Location: UK Expat living in Washington State, US

Re: <2kbyte 6502 Tiny Basic?

Post by VinCBR900 »

Thats odd, which one do you mean, 4k or 2k version? Both seem to work fine for me

Did you enable terminal emulation in the settings?
Attachments
2kb.png
User avatar
BigDumbDinosaur
Posts: 9425
Joined: 28 May 2009
Location: Midwestern USA (JB Pritzker’s dystopia)
Contact:

Re: <2kbyte 6502 Tiny Basic?

Post by BigDumbDinosaur »

VinCBR900 wrote:
Thats odd, which one do you mean, 4k or 2k version? Both seem to work fine for me

Did you enable terminal emulation in the settings?
I did.  The Kowalski simulator and I are old friends, going back more than 20 years.  :D

One thing I noticed is your version of the simulator is an older one.  The current version is 1.4.1.0.  Wondering if that may have something to do with it.

————————————————————
EDIT: Changed the current Kowalski version due to Daryl releasing a new one.
Last edited by BigDumbDinosaur on Wed Mar 11, 2026 1:37 pm, edited 2 times in total.
x86?  We ain't got no x86.  We don't NEED no stinking x86!
User avatar
VinCBR900
Posts: 53
Joined: 08 Sep 2017
Location: UK Expat living in Washington State, US

Re: <2kbyte 6502 Tiny Basic?

Post by VinCBR900 »

Apologies if that sounded patronizing.

I downloaded the 1.4 Kowalski simulator and the first time I ran it it didnt work, but then I animated it and then it has been working properly ever since, so dunno?

Anyhow using Claude I created my own version of a 65c02 simulator so you could try that. Cheers!

https://github.com/VinCBR900/65c02-Tiny-BASIC
User avatar
BigDumbDinosaur
Posts: 9425
Joined: 28 May 2009
Location: Midwestern USA (JB Pritzker’s dystopia)
Contact:

Re: <2kbyte 6502 Tiny Basic?

Post by BigDumbDinosaur »

VinCBR900 wrote:
I downloaded the 1.4 Kowalski simulator and the first time I ran it it didnt work, but then I animated it and then it has been working properly ever since, so dunno?
On which version of Windows are you running Kowalski?  I have not run into any operational problems with it, although I do run it on an old Windows XP SP3 machine, not a modern Windows version.
Quote:
Anyhow using Claude I created my own version of a 65c02 simulator so you could try that. Cheers!
Who’s Claude?  :?:  Just kidding!

Thanks for the offer.  I’m not doing anything with the 65C02 at this time, just the 65C816.
x86?  We ain't got no x86.  We don't NEED no stinking x86!
User avatar
BillO
Posts: 1038
Joined: 12 Dec 2008
Location: Canada

Re: <2kbyte 6502 Tiny Basic?

Post by BillO »

I have run the Kawalski simulator on Windows 10 Pro without any issue.
Bill
Post Reply