The Machine Operating System (MOS) or OS is a discontinued computer operating system (OS) used in Acorn Computers' BBC computer range. It included support for four-channel sound, graphics, file system abstraction, and digital and analogue input/output (I/O) including a daisy-chained expansion bus. The system was single-tasking, monolithic and non-reentrant.

Versions 0.10 to 1.20 were used on the BBC Micro, version 1.00 on the Electron, version 2 was used on the B+, and versions 3 to 5 were used in the BBC Master series.

Acorn MOS

The final BBC computer, the BBC A3000, was 32-bit and ran RISC OS, which kept on portions of the Acorn MOS architecture and shared a number of characteristics (e.g. "star commands" CLI, "VDU" video control codes and screen modes) with the earlier 8-bit MOS.

Acorn MOS

Versions 0 to 2 of the MOS were 16 KiB in size, written in 6502 machine code, and held in read-only memory (ROM) on the motherboard. The upper quarter of the 16-bit address space (0xC000 to 0xFFFF) is reserved for its ROM code and I/O space.

Acorn MOS

Versions 3 to 5 were still restricted to a 16 KiB address space, but managed to hold more code and hence more complex routines, partly because of the alternative 65C102 central processing unit (CPU) with its denser instruction set plus the careful use of paging.

User interface

The original MOS versions, from 0 to 2, did not have a user interface per se: applications were expected to forward operating system command lines to the OS on its behalf, and the programming language BBC BASIC ROM, with 6502 assembler built in, supplied with the BBC Micro is the default application used for this purpose. The BBC Micro would halt with a Language? error if no ROM is present that advertises to the OS an ability to provide a user interface (called language ROMs). MOS version 3 onwards did feature a simple command-line interface, normally only seen when the CMOS memory did not contain a setting for the default language ROM.

Application programs on ROM, and some cassette and disc-based software also, typically provide a command line, useful for working with file storage such as browsing the currently inserted disc. The OS provides the line entry facility and obeys the commands entered, but the application oversees running the command prompt.

Cassette and disc based software typically relies on BBC BASIC's own user interface in order to be loaded, although it is possible to configure a floppy disk to boot up without needing to have BASIC commands executed, this was rarely used in practice.

In BBC BASIC, OS commands are preceded with an asterisk or passed via the OSCLI keyword, to instruct BASIC to forward that command directly to the OS. This led to the asterisk being the prompt symbol for any software providing an OS command line; MOS version 3 onwards officially uses the asterisk as the command prompt symbol. When referring to an OS command, they generally include the asterisk as part of the name, for example , , etc., although only the part after the asterisk is the command. The asterisk was called a "star" and the commands were called "star commands".

Unrecognised commands are offered to any service (extension) ROMs; filing system ROMs will often check to see if a file on disc matches that name, the same most other command-line interfaces do. The operating system call OSWORD with accumulator = 0 does however offer programs single line input (with ctrl-U for clear line and the cursor copying keys enabled) with basic character filtering and line length limit.

The MOS command line interpreter features a rather unusual idea: abbreviation of commands. To save typing a dot could be used after the first few characters, such as for and for . was abbreviated to alone. , the command to catalogue (list) a cassette or disc, can be abbreviated down to .

Service ROMs

3rd party ROMs generally also support command abbreviation, leading to ambiguity where two service ROMs provide commands which are very similar in name but possibly different in function. In this case, the MOS would prioritise the command from the ROM in the higher numbered ROM slot, e.g., 7 has precedence over 6.

Some 3rd party suppliers would get around this by prefixing their star commands with other letters. For example, Watford Electronics ROMS would have their star commands prefixed with W thus making them unique.