BBC Micro architecture reference

on-topic acorn-related discussions not covered by the other forums
Post Reply
User avatar
Richard Russell
Posts: 2524
Joined: Sun Feb 27, 2011 10:35 am
Location: Downham Market, Norfolk
Contact:

BBC Micro architecture reference

Post by Richard Russell »

Someone at the Raspberry Pi forum wrote today "on the original BBC Micro, BASIC was the operating system", which could hardly be more wrong!
That was effectively true of some home computers, but the BBC Micro was of course one of the first (if not the first) to make a clear distinction between the 'language' and the 'operating system'.

I'd like to point him to some online resource which would explain the architecture of the BBC Micro, how the language and OS occupy separate ROMs and separate address spaces, how they communicate through defined (Tube-compatible) interfaces and so on. But I don't know where such a resource can be found. Can anybody suggest something?
I am suffering from 'cognitive decline' and depression. If you have a comment about the style or tone of this message please report it to the moderators by clicking the exclamation mark icon, rather than complaining on the public forum.
User avatar
Bobbi
Posts: 684
Joined: Thu Sep 24, 2020 12:32 am
Contact:

Re: BBC Micro architecture reference

Post by Bobbi »

The Advanced User Manual explains things well enough I was able to get Applecorn working. (Applecorn is a re-implementation of the MOS for the Apple II which allows the Beeb language ROMs to run unchanged.)
User avatar
Richard Russell
Posts: 2524
Joined: Sun Feb 27, 2011 10:35 am
Location: Downham Market, Norfolk
Contact:

Re: BBC Micro architecture reference

Post by Richard Russell »

Bobbi wrote:
Wed Oct 13, 2021 2:54 am
The Advanced User Manual explains things well enough
So is there a URL that I could post which will take him directly to the relevant section?
I am suffering from 'cognitive decline' and depression. If you have a comment about the style or tone of this message please report it to the moderators by clicking the exclamation mark icon, rather than complaining on the public forum.
cmorley
Posts: 1576
Joined: Sat Jul 30, 2016 8:11 pm
Location: Oxford
Contact:

Re: BBC Micro architecture reference

Post by cmorley »

Richard Russell wrote:
Tue Oct 12, 2021 11:19 pm
the BBC Micro was of course one of the first (if not the first) to make a clear distinction between the 'language' and the 'operating system'.
The distinction is not clear on the Model A/B. If you remove all language ROMs the machine is useless* (see below) and hangs at the Language? message. There is no command line interface accessible. You cannot interact with the OS, there is no "monitor" and you cannot invoke any filesystem to load anything for you. The supervisor came later (Master?).

Other languages (e.g. EXMON) can be used to interact with the OS (*FX etc) so BASIC is not part of the OS - that is clear. However a language (or other program) is required to interact with the OS as a user - so the distinction is blurred. With keyboard UI being part of the language it is understandable why people might conflate the OS and BASIC.

Opinion: I think once the Master added the supervisor CLI then the OS feels more like an OS and less like a BIOS/bootloader to me.

edit *: You can SHIFT-BREAK into something from a filesystem (e.g. DFS disc with OPT 2 set) so not entirely useless.
User avatar
Richard Russell
Posts: 2524
Joined: Sun Feb 27, 2011 10:35 am
Location: Downham Market, Norfolk
Contact:

Re: BBC Micro architecture reference

Post by Richard Russell »

cmorley wrote:
Wed Oct 13, 2021 7:25 am
The distinction is not clear on the Model A/B.
I would absolutely argue that it is.
If you remove all language ROMs the machine is useless
That's to be expected: a working machine needs both a 'language' (which may be just a monitor or shell or a non-interactive application) and an 'OS'. That characteristic doesn't in the slightest reduce the clarity of distinction between the two, in my opinion. Indeed the fact that you can switch between different languages or shells or applications reinforces it.
However a language (or other program) is required to interact with the OS as a user - so the distinction is blurred.
Sorry, I can't see that argument at all. It is not the function of an OS to 'interact with a user', rather it's to interface with a language or other application via a well-defined API.

The last thing I expected was for somebody here to argue that one of the defining features of the BBC Micro, perhaps the most important defining feature of all, isn't actually the case!
I am suffering from 'cognitive decline' and depression. If you have a comment about the style or tone of this message please report it to the moderators by clicking the exclamation mark icon, rather than complaining on the public forum.
User avatar
BigEd
Posts: 4444
Joined: Sun Jan 24, 2010 10:24 am
Location: West Country
Contact:

Re: BBC Micro architecture reference

Post by BigEd »

I wrote an introductory post over here but it's probably not the definitive statement or reference you're looking for:
(There's surely no forum anywhere where everyone has the same opinions about everything)
User avatar
davidb
Posts: 3187
Joined: Sun Nov 11, 2007 10:11 pm
Contact:

Re: BBC Micro architecture reference

Post by davidb »

See the New Advanced User Guide, found in the stardot mirror/backup of bbcdocs.

There are some quite special people on the Raspberry Pi forums. :roll:
User avatar
davidb
Posts: 3187
Joined: Sun Nov 11, 2007 10:11 pm
Contact:

Re: BBC Micro architecture reference

Post by davidb »

Richard Russell wrote:
Wed Oct 13, 2021 10:11 am
The last thing I expected was for somebody here to argue that one of the defining features of the BBC Micro, perhaps the most important defining feature of all, isn't actually the case!
To be fair, the Advanced User Guide says this on page 12:
While the operating system is independent of any particular language and only serves to provide an interface between languages or utility software and the machine hardware, BASIC has been accorded special status. The *BASIC command is resident in the operating system command table and it enables the operating system to select a language in paged ROM not possessing a service entry point (for further details about paged ROMs see chapter 15).
While you can use it without a BASIC ROM, it was clearly expected that BASIC would be present, so you can see why people might conflate the language and the OS. If random users on other forums had encountered a machine booting into LISP, for example, perhaps they wouldn't be confused about it. :D
User avatar
Richard Russell
Posts: 2524
Joined: Sun Feb 27, 2011 10:35 am
Location: Downham Market, Norfolk
Contact:

Re: BBC Micro architecture reference

Post by Richard Russell »

davidb wrote:
Wed Oct 13, 2021 3:44 pm
While you can use it without a BASIC ROM, it was clearly expected that BASIC would be present, so you can see why people might conflate the language and the OS.
I don't think it's that (it would imply detailed knowledge of the Beeb, which is what they lack!). Rather it's because so many other 'home computers' of the era had just one ROM, with BASIC intertwined with everything else and no clear division between the 'language' and 'OS' at all. Typically there would be no way to run any other language anyway, nor any possibility of a 'second processor'.

But clearly you and everybody else think I'm an idiot for even asking the question, so let's drop the subject before I'm banned.
I am suffering from 'cognitive decline' and depression. If you have a comment about the style or tone of this message please report it to the moderators by clicking the exclamation mark icon, rather than complaining on the public forum.
User avatar
danielj
Posts: 8815
Joined: Thu Oct 02, 2008 5:51 pm
Location: Manchester
Contact:

Re: BBC Micro architecture reference

Post by danielj »

:shock: No one's getting banned. :!:
User avatar
BigEd
Posts: 4444
Joined: Sun Jan 24, 2010 10:24 am
Location: West Country
Contact:

Re: BBC Micro architecture reference

Post by BigEd »

It's a really good question, I think. The setup is that we have an OS, probably a language, probably a filesystem, and maybe more. And the OS interface expects and supports this model, which is quite sophisticated. Somewhere, one might hope, this story is laid out plainly. It is after all a feature.
User avatar
Rich Talbot-Watkins
Posts: 1781
Joined: Thu Jan 13, 2005 5:20 pm
Location: Palma, Mallorca
Contact:

Re: BBC Micro architecture reference

Post by Rich Talbot-Watkins »

I would say it's inarguable that the BBC Micro architecture very clearly separated the OS from the language, and was certainly one of the first to do so.

I don't really think it makes a difference that the architecture is not trivially outwardly visible, or that the OS without a language couldn't do much (the same is clearly true for a language like BASIC without an OS!). The two components have totally different concerns, and language ROMs are clearly a higher-level layer sitting above a well-defined and suitably abstracted OS.

That said, it's a shame that they didn't think to build an extremely simple command line prompt into OS 1.20 in the absence of a language. It probably would've occupied about 16 extra bytes!
User avatar
Bobbi
Posts: 684
Joined: Thu Sep 24, 2020 12:32 am
Contact:

Re: BBC Micro architecture reference

Post by Bobbi »

The fact that the BBC Micro language ROMs can run on a completely different 6502 architecture if a suitable MOS is implemented for it demonstrates the machine independence of the language ROMs rather persuasively.
User avatar
1024MAK
Posts: 11080
Joined: Mon Apr 18, 2011 5:46 pm
Location: Looking forward to summer in Somerset, UK...
Contact:

Re: BBC Micro architecture reference

Post by 1024MAK »

Okay, I have some points.

First off though, as far as I am concerned, the Acorn BBC Micro does have separate OS and language (such as BASIC) systems. As clearly the machine can function without the BASIC ROM being present or mapped into the processor memory map.

But before I continue, what do we actually define an OS as being? Some have mentioned a CLI, but some later machines have a WIMP system that may not have a CLI.

Some industrial systems do have a monitor and application software, but although they may have a ROM with some common routines, you can’t really say that they have an OS like the one in a BBC Micro.

Some home computers, such as the Sharp MZ-80A did not have BASIC in ROM. If you wanted BASIC, you had to load it from tape. Was the monitor in it’s 4K byte ROM an OS?

And some other home computers were different. The Jupiter Ace did not have BASIC in ROM. Instead it had FORTH.

And the Memotech MTX had in addition to BASIC, a simple text based language called Noddy.

So as usual, it’s a complex and grey area. Especially as what an OS is varies between different computer generations.

CP/M and MSDOS are significantly different in a lot of ways to Acorn MOS or OS. And all of these are significantly different to the OS systems on most later machines.

Mark
User avatar
davidb
Posts: 3187
Joined: Sun Nov 11, 2007 10:11 pm
Contact:

Re: BBC Micro architecture reference

Post by davidb »

Richard Russell wrote:
Wed Oct 13, 2021 4:54 pm
But clearly you and everybody else think I'm an idiot for even asking the question, so let's drop the subject before I'm banned.
Not at all. I was only trying to explain why people might think that BASIC was the OS. You explained that yourself by noting that other computers were heavily engineered around their own flavours of BASIC, so setting expectations that the BBC Micro was just another example of the type.
User avatar
sweh
Posts: 2566
Joined: Sat Mar 10, 2012 12:05 pm
Location: New York, New York
Contact:

Re: BBC Micro architecture reference

Post by sweh »

1024MAK wrote:
Wed Oct 13, 2021 11:24 pm

But before I continue, what do we actually define an OS as being?
The interface between the hardware and the application. At least that's how I recall it being defined in my OS design classes back in the 80s.

You can consider it an abstraction layer; applications coded to that operating system should be able to execute on other hardware platforms that have an operating system that presents the same abstraction layer (given equivalent capabilities).

Not all machines have this abstraction layer, and expected applications to talk directly to the hardware.

Now the Beeb OS wasn't a good OS in some respects, because it was trivially bypassable (and indeed many games did!) but the OS was there and did provide an abstraction layer.

So this redefines the question; was BASIC an application? Or is it part of the abstraction layer?

I think we can all agree it's an application; the machine will run happily without BASIC installed; the official OS entry points (eg OSWRCH) don't require BASIC to be present; anything coded to the OS abstraction layer will run just fine. So programs written correctly for the B would run on a Master despite hardware changes (direct write to memory? Uh oh.... not in shadow mode! Call the OS routines and your PLOT will work).
Some industrial systems do have a monitor and application software, but although they may have a ROM with some common routines, you can’t really say that they have an OS like the one in a BBC Micro.
Because the ROM doesn't provide the abstraction layer; it's expected that the application talk to the hardware directly. These are great examples of systems without an OS.
Some home computers, such as the Sharp MZ-80A did not have BASIC in ROM. If you wanted BASIC, you had to load it from tape. Was the monitor in it’s 4K byte ROM an OS?
Depends; it could just be a "Loader"; designed to bootstrap an environment and then get out of the way. Did the loaded BASIC only call routines in the ROM, or did it talk to the hardware directly? If the first, then the ROM is also an OS; otherwise that's also a machine without an OS abstraction layer.
Rgds
Stephen
User avatar
sweh
Posts: 2566
Joined: Sat Mar 10, 2012 12:05 pm
Location: New York, New York
Contact:

Re: BBC Micro architecture reference

Post by sweh »

Rich Talbot-Watkins wrote:
Wed Oct 13, 2021 9:48 pm
That said, it's a shame that they didn't think to build an extremely simple command line prompt into OS 1.20 in the absence of a language. It probably would've occupied about 16 extra bytes!
My manager ROM implements something like this, just incase I UNPLUGged every language :-) It presented a * command similar to the Master. Took a bit more than 16 bytes 'cos needed to intercept BRKV ('cos of errors from calling * commands) and ESCAPE key handling, and for some reason I copied the OSWORD 0 datastructure to RAM. I think I ran into issues when calling from ROM. Don't recall. Whole routine took about 80 bytes.
Rgds
Stephen
User avatar
BigEd
Posts: 4444
Joined: Sun Jan 24, 2010 10:24 am
Location: West Country
Contact:

Re: BBC Micro architecture reference

Post by BigEd »

I think the observation that a Beeb could be fitted with a language other than Basic should be a winner here: Basic isn't the OS, because Basic can be swapped out. A beeb can be a terminal, or a Pascal or a BCPL system or various other things, and it still runs the Acorn MOS.

On the question of what an OS is, I think that can be looked at as a technical question or a linguistic question. What do people mean when they talk about an OS? I can think of lots of possibilities
- a BIOS which is only the most basic abstraction layer over hardware
- a "glorified loader" like DOS (or CP/M perhaps)
- something which manages memory, interrupts, CPU time, I/O devices, network and filing system
- a layering of abstractions, like Acorn MOS, with an ABI, a VDU system, a choice of filing systems and choice of applications
- something which manages memory allocation, load-time relocation, shared libaries
- something with memory protection and levels of privilege
- something multitasking or multiuser

Or, from a user perspective rather than an engineering perspective
- a command line interface
- a graphical user interface
- a file manager
- a machine monitor

I'm sure there are more possibilities - everyone's perspective will be a little different.
User avatar
1024MAK
Posts: 11080
Joined: Mon Apr 18, 2011 5:46 pm
Location: Looking forward to summer in Somerset, UK...
Contact:

Re: BBC Micro architecture reference

Post by 1024MAK »

Nice summary there Ed :D

Mark
Post Reply

Return to “general”