4 ms·
BBC BASIC is surprisingly efficient for an interpreted language. It kind of had to be, running on processors that slow.
by LeoPanthera 3y ago
BBC BASIC is surprisingly efficient for an interpreted language. It kind of had to be, running on processors that slow.
- KerrAvon 3y agoSome good discussion of that on The BBC BASIC wiki entry: https://en.wikipedia.org/wiki/BBC_BASIC https://en.wikipedia.org/wiki/BBC_BASIC (paragraph beginning "Due to a number of optimizations[…]".
- crimbles 3y agoAlso you could swap out hot spots with assembly trivially as it had an inline assembler. And you had indirect pointers in it!
- mavhc 3y agoThe OP's code has REM based assembly it in to save space
- kragen 3y agois that assembly or is that the dithering table
- alphabetter 3y agoYes, the REM is the lookup table used in line 70. Because BBC Basic had a built-in assembler it was pretty uncommon for BBC programs to inline machine code as raw data (unlike some other computers from BITD).
- londons_explore 3y agojust a table of constants.
- kragen 3y agoall the basics i used on processors that slow were surprisingly inefficient, even for an interpreted languages i thought they had to be, running on processors with that little memory. though later on i learned about forth, which is surprisingly efficient for an interpreted language a more likely explanation is that sophie wilson was just a better hacker than bill gates and paul allen
- iainmerrick 3y agoYeah, BBC BASIC is really good. Both the language design and the implementation. I loved it at the time, and the more I think back on it the more impressed I am. Like it had a very decent suite of floating-point routines, which if I remember right were very performant. In a 32KB ROM!
- forinti 3y agoBasic was actually a 16KB ROM. MOS occupied another 16KB ROM.
- iainmerrick 3y agoDang, you're right, I was misremembering.
- crq-yml 3y agoSome of the improvement in BBC BASIC over Microsoft's BASIC is attributable to the larger ROM(the first Altair BASIC was just 4k), but it's also that the BBC Micro's 6502 and DRAM was clocked higher than contemporaries. It's just a faster, more refined 8-bit machine all around.