On Wednesday, 27 January 2016 at 17:50:09 UTC, Ola Fosheim Grøstad wrote:
BASIC was polished and shipped with literally every single home computer in the 80s. Primitive yes, but widely used. Much more so than D. It did exactly what it was supposed to do and didn't have any incomplete features.

Well i'd say it had incomplete features, having goto/gosub and global variables; Although it worked it bred spaghetti code like crazy.

I'm sure BASIC would have had more features if they could have fit them into the ROM; But like the TCC (Tiny C Compiler) they first added what was most important and added additional features afterwards until they couldn't fit anything else while shaving every byte they could along the way.

Curiously i wrote a de-tokenizer a year or something ago and some of the features bled through a bit quite obviously; All math and number storage being done with a 6 byte BCD packed format (that I'm told is also used in calculators) while the line numbers were unsigned shorts (probably for sorting reasons). It had the interesting effect of having to convert the 16bit line number using division while printing the program out, and then just outputting the numbers for everything else with a quick conversion from BCD to string.

But BASIC shined most when there was so little memory. It wasn't uncommon to have only 4k for available RAM; And you could write short yet useful programs in 4k.

Reply via email to