Page 10 of 10
Re: <2kbyte 6502 Tiny Basic?
Posted: Fri Feb 16, 2024 4:09 pm
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.
Re: <2kbyte 6502 Tiny Basic?
Posted: Tue Mar 03, 2026 8:37 pm
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.
Re: <2kbyte 6502 Tiny Basic?
Posted: Wed Mar 04, 2026 6:57 pm
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!
Re: <2kbyte 6502 Tiny Basic?
Posted: Wed Mar 04, 2026 8:28 pm
by BigDumbDinosaur
...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.
Re: <2kbyte 6502 Tiny Basic?
Posted: Wed Mar 04, 2026 8:45 pm
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?
Re: <2kbyte 6502 Tiny Basic?
Posted: Thu Mar 05, 2026 3:26 am
by BigDumbDinosaur
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. 
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.
Re: <2kbyte 6502 Tiny Basic?
Posted: Tue Mar 10, 2026 8:51 pm
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
Re: <2kbyte 6502 Tiny Basic?
Posted: Wed Mar 11, 2026 1:36 pm
by BigDumbDinosaur
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.
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.
Re: <2kbyte 6502 Tiny Basic?
Posted: Thu Mar 12, 2026 5:21 pm
by BillO
I have run the Kawalski simulator on Windows 10 Pro without any issue.