Original BBC Basic - subset of BBC Basic (BBCSDL/BB4W)

Discussions about the BBC BASIC language, with particular reference to BB4W and BBCSDL
JohnnyRockets
Posts: 7
Joined: Fri 28 Jun 2019, 23:41

Original BBC Basic - subset of BBC Basic (BBCSDL/BB4W)

Post by JohnnyRockets »

Hi all,

I'm a newbie for sure to BBC Basic in general, so I am asking this question quite naively!

I was a Commodore 64/VIC-20 computer kid in the 80's, but I sure would have LOVED to have a BBC Micro (but probably hard to get in the USA at that time!).

Anyway... my question...
Is the "original BBC Basic" language kind of a subset of our modern BBC Basic language (BBCSDL/BB4W)?

I'm sure it's not so simple as that... but I wondered if programs written in the original BBC Basic would "generally" run in the modern Windows version?

Thanks,


Johnny
Hated Moron

Re: Original BBC Basic - subset of BBC Basic (BBCSDL/BB4W)

Post by Hated Moron »

JohnnyRockets wrote: Wed 29 Nov 2023, 19:44 I wondered if programs written in the original BBC Basic would "generally" run in the modern Windows version?
If they are 'pure BASIC' programs, generally yes. But because of memory and speed constraints BBC Micro programs often incorporated 6502 assembly language code, or direct hardware pokes into memory, etc. which inevitably makes them incompatible. So you would need to check on a case-by-case basis.

There are a few 'BBC Micro' programs amongst the examples supplied with BBCSDL, which have only trivial changes from the original (such as returning to the menu on pressing ESCape): ANIMAL.BBC, POEM.BBC, SINE.BBC, WELCOME.BBC.

There was recently a competition to fill the screen by writing characters* in a 'spiral'. This is what I wrote, it runs without any modification in virtually every variety of BBC BASIC, from the BBC Micro via the Acorn Archimedes and Brandy to BBCSDL:

Code: Select all

   10 MODE 1
   20 VDU 5,19,1,4,0,0,0
   30 GCOL 0,129 : CLG
   40 VDU 23,205,&80,&40,&20,&10,&08,&04,&02,&01
   50 VDU 23,206,&01,&02,&04,&08,&10,&20,&40,&80
   60 X = 608 : Y = 512 : N = 1
   70 REPEAT
   80   FOR I = 1 TO N : MOVE X,Y : VDU 205.5 + RND(1) : X = X+32 : T = INKEY(1) : NEXT
   90   FOR I = 1 TO N : MOVE X,Y : VDU 205.5 + RND(1) : Y = Y+32 : T = INKEY(1) : NEXT
  100   N = N+1
  110   FOR I = 1 TO N : MOVE X,Y : VDU 205.5 + RND(1) : X = X-32 : T = INKEY(1) : NEXT
  120   FOR I = 1 TO N : MOVE X,Y : VDU 205.5 + RND(1) : Y = Y-32 : T = INKEY(1) : NEXT
  130   N = N+1
  140 UNTIL N > 40
  150 END
* The characters were required to be two specific graphics symbols, 205 & 206, from the Commodore 64 character set,.