Hacker News new | ask | show | jobs
by bluescrn 16 days ago
BBC BASIC was far better than C64 BASIC.

It had a nice set of built-in graphics functions and an inline assembler, amongst other things.

I can still remember that VDU 23 was the command to redefine a character, so much easier than doing the same sort of thing on the C64 (copy the character set from ROM to RAM, get the VIC to use the RAM copy with POKE statements, modify the desired character)

2 comments

> It had a nice set of built-in graphics functions

IIRC those were actually in the “OS” ROM, with BASIC just having syntactic sugar to call them, rather than being part of the BASIC ROM itself, so you could call them from elsewhere (i.e. your own assembly code, even if you'd paged the BASIC ROM out to make some RAM available in that bit of the address space on the BBC Master).

> and an inline assembler, amongst other things.

That assembler was great when I was cutting my programming teeth and progressing a bit beyond BASIC to better understand the hardware.

BBC BASIC has some other crucial, more basic, features that were missing from other 8-bit micros. Actual named functions and procedures were key¹, and long variable names were useful² where some BASICs only allowed one or two characters³.

--------

[1] Other BASICs had no more than GOTO and GOSUB/RETURN, usually only allowing you to jump to line numbers, not names/labels. There was even some support for local variables making proper recursion possible up to a point (limited by the small stack).

[2] if limiting for long code due to memory constraints

[3] or allowed more but only respected the first couple, BBC BASIC syntax in theory allowed up to 248 characters⁴ but only respected the first 40 and practically you still limited yourself to a few (say, up to 10 for some for clarity, 1 for things like loop counters to save space in your code, CPU time in the interpreter, and space in the interpreter's variable dictionary).

[4] the absolute limit to what you could actually use in a line, itself having a length limit of 256-minus-a-few, and at that length all you could do was assign a single digit or print the value.

C64 Basic was V2 of a dialect of the Microsoft derived Basic for the PET. It was out of date already compared to the latest V4 because the older version fit into a smaller ROM to save costs.