Acorn Computers BBC Micro Model B w/8271 — Acorn BBC Micro Model B w/8271 User Guide Manual PDF

389 43 The operating system and how to make use of it What is the operating system? The operating system (or the machine operating system (MOS) to give it its full title) is a program which controls the operation of the computer. The MOS for the BBC Microcomputer lives in ROM, and is activated automatically as soon as the microcomputer is switched on. The MOS runs constantly, performing repetitive tasks with such speed that you are not even aware that anything is going on; indeed, the MOS has already done a tremendous amount of work before you even press a key!

The functions performed by the MOS include scanning the keyboard, updating the screen, performing analogue-to-digital conversions (for input from joysticks) and controlling the sound generator.The MOS is a large and complex machine code program (more about machine code later), consisting of a number of routines which perform functions such as those listed above. Like all computer programs, the MOS will not do anything until it is told to (although as already mentioned, just switching the computer on, and leaving it on, tells the MOS to do quite a lot).

All the functions performed by the MOS can be made available to other machine code programs, and one machine code program which you will be familiar with is BASIC. BASIC provides an easy way of using the microcomputer’s computing power, and it makes constant use of the MOS routines to get input from the keyboard and reflect that input on the screen. How ever, the degree of control over the MOS provided by BASIC is limited. For example, typing COLOUR 9 RETURN in MODE 2 will cause subsequent screen display to appear in flashing red/cyan, the ‘work’ being done by the MOS routines. However, BASIC provides no way of varying the flash rate.

There are three principal ways of achieving fine control of this kind: 1. Using *FX commands 2. Calling operating system routines from BASIC 3. Calling operating system routines from assembly language Although the rest of this chapter covers all of the above three topics, you are referred to the next chapter for a detailed introduction to assembly language.