
The BASIC interpreter eats up around 600 bytes in the Arduino RAM, leaving about 1.4 kB for BASIC code. Not much, but more than the lowest-end BASIC Stamp. says he started this project to see how ‘old bearded ones’ conjured up so many impressive programs with a few kB of RAM. Tiny BASIC was originally conceived for the Altair 8800 that shipped with 256 bytes of RAM stock, so it seemed like a perfect fit. Posted in Arduino Hacks Tagged arduino, basic, basic interpreter, c++, tiny BASIC Post navigation Right now, all we know is we’ll be spending the weekend digging through our copies of Dr. In a typical 8-bit interpreted BASIC from the day, the line number and initial space would be stored as a single 16-bit unsigned integer, so your example line would be 7 bytes. The variables would typically not be stored in registers on an 8-bit CPU (registers are precious, after all). And remember these are 16-bit variables, not 8. So let’s compare this with the equivalent native code for a 6502. #DOWNLOAD PROGRAM AT90S2313 WITH ARDUINO PROGRAMMING CODE# To make the comparison fair, we’ll assume that the assembler programmer is clever enough that they’ve managed to store both variables in the zero page to avoid complex addressing, and that the carry bit is already clear.

Note that I’ve probably mis-remembered the syntax. I never used Z80 back in the day, but I would imagine something like this: Z80 would be a little shorter because it has more registers and can use double-byte instructions. I started out with P2000T, ZX spectrum and MSX so I stared out with basic just like you.

