In this section we delve a bit more deeply into the microprocessor and its support, with a look at some of the different types of memory. We also look at some of the uses to which memory is put. This section puts some of the flesh on the bones, so to speak so you may wish to look at another section and come back here later.
Earlier we saw how memory can be built up into a sort of tower block. All operations are carried out in this area and all sorts of information is stored there. This includes a picture of the screen. The screen display is made up of rows of dots called pixels. A number of pixels can be turned on together to display a character (letter of the alphabet, number, symbol). We can display a certain number of lines of characters on the screen, the number depending on how large the characters are. This also means we can only have a certain number of characters to a line. Each character is represented by a binary number and stored in a memory location. The screen is known as a memory mapped screen because each part of it is represented by a memory location. If the character is to be displayed in a particular colour then we also need to be able to store the colour information somewhere. A variety of screen modes can be created defining these parameters. The more colours you use the more memory gets taken up by the display and the less is available for programs.
To get around this problem a separate block of memory was created purely to hold the screen display. On the BBC series of micros this was known as shadow memory. On a PC it is known as video RAM.
The processor, for certain operations, requires memory locations which are protected from the user to hold temporary data, status information etc. These locations are shown on the memory map (see chapter 1) and known as scratchpad memory. This memory must be capable of responding to the processor in the minimum time and in a large computer system will be formed from high speed integrated circuit chips. In microcomputers and minicomputers a compromise must be made between speed and cost, and typically in such systems the scratchpad memory is of the same type as the main user memory. In more expensive systems higher quality chips are used, providing faster response times and the scratchpad memory can be set apart from the main memory map.
In order that the computer system will operate intelligently coherently and perform all the available instructions in the required manner the designer of the system must devise programs that are always in the computer to achieve this. They live inside the system. In other words they are resident programs. Such programs are known collectively as system software. Some programs of this type that are commonly encountered are: operating systems, assembler, monitor, editor and loader.
These include routines to perform the entire list of system operations (addition, subtraction, storing in memory etc), and may be usefully used by the user to produce more powerful and more efficient user programs. An example would be the assembler program which is used to assemble mnemonic instructions called assembly language. This program source code is then compiled (by running the program) into a set of machine code instructions to form a machine code program. This machine code program could be a wordprocessor, database, game, language translator, drawing program or whatever. So the system program is used to produce another program. The user must therefore be aware of the list of system instructions. The monitor program is the simplest item of system software and often has the acronym BUG with it eg DEBUG. It monitors what is happening in the machine and can be used to detect faults, errors or bugs in a program under the control of the user. Not all monitors have the same facilities nor are they compatible.
With smaller systems such as microcomputers some of the system software may not be built in since this adds to the cost of the unit. The BBC micro built by Acorn was unique amoungst early home computers in that it had a built in assembler. Some operating systems are supplied with some but not necessarily all of the required system software. Not everybody, for example, will want to write machine code programs.
Transparent to the user is a separate memory with system software (the software has to be stored somewhere!) which provides the control action of the system. This memory is known as the microprogram unit and interprets machine instructions into the essential electronic logic signals of the system.
All computers work on a read/obey sequence. During a read operation an instruction is taken from the memory to the CPU where it is decoded. This generates a set of electronic signals which causes the instruction to be obeyed. What actually happens depends on what the instruction is.
An editor program allows the compilation of a user program in a language which is set at a higher level than machine code. Typical languages are symbolic and are based on the assembler language of the particular machine. However, editors also allow text or graphics characters which may or may not be incorporated into a user program. With an editor you can create, append, overlay, insert, delete, print/copy, list the text, name/rename the text.This means it can act as a crude wordprocessor to build up a page of text, say, or perhaps instructions. With MS-DOS, for example, you can use an editor to create or amend a special file which specifies what happens when you start your MS-DOS session like choosing the disk drive where your files are stored (a file is a block of data - program code, text etc stored on a disk. See the chapter on disks for details). Windows has ini or initialisation files for most applications which can set what colours text appears on screen, for instance.
Editors use FILES to contain the user program and all other user related activity. Entry to the editor is via the operating system whose response is to provide a prompt to indicate the editor's mode of operation. The editor prompt is usually different to the monitor prompt. The file can be stored externally on disk or other medium.
For the convenience of the programmer the source program is written in symbolic code (mnemonics) or more English like statements. BASIC, FORTRAN etc are examples of user-orientated high level languages. The programming 'tree' is as shown.

The source program can be entered directly into the computer system ie bit by bit! (Hardwork, all those ones and noughts!) In such a system there is no protection against program errors, entry errors or electronic errors. In all practical systems the lowest level of entry is via a hex machine code. Such an entry requires an elementary item of system software known as a LOADER which converts hex inputs into binary computer values. It is unusual for such a system to have any means of automatic error detection and correction ie debugging. Entry at this level also requires complementary items of simple system software to specify memory addresses, registers (special bits of memory) and system sequences etc.
If the system is intended for use in program development, simulation etc it is better to input a symbolic code rather than numbers. This becomes the simplest entry point. There will be relatively comprehensive system software to assist the user ie editor, assembler etc. High level languages are generally machine independent and thus permit the user the highest level of freedom from system constraints. If you actually use these languages this will become clearer. Systems with high level language entry require a compiler or interpreter to produce the target program.

The assembler code object program will be in a format which will be recognised by the assembler, but which will not correspond to the required format of the target binary code. Sections of source code can be identified by labels (eg section 1, section 2). These will be symbolic in that the actual address where the code is to be located will be calculated by the assembler. The labels can be meaningful and give the user an indication of what the section of code does. These location names can also be used in instructions. eg LOAD thisaddress HERE. These sort of instructions or directives do not correspond to target program lines. The actual instruction will be in the form of a mnemonic eg for the previous instruction it might be LDH thisaddress.
Object program lines can be entirely text. Comments can be added to aid the understanding of the programmer or indeed anyone reading the code.. In compiling the object program into the target program instructions the assembler passes through ignoring the comments and checking for errors. Each line is replaced by its calculated binary values. So we do not need to know the specific machine's detailed binary instruction values and therefore we can write our program on any machine (setting aside external storeage methods), although at assembler level there are limitations imposed by the type of processor because there is a specific set of instructions that can be used. Those instructions vary from processor to processor for the same tasks, although similarities may be seen.
Some programs do not come on disks etc but are stored on chips. They are instantly available to the computer. But how do they get there?
We have said that at its lowest level a computer program is a series of ones and noughts. Imagine a series of fuses. Some are blown blocking the current, others are ok allowing the current through. In other words they act as switches some being on, some off. Permanently. Suppose that they are all in a row and that we can miniaturise them such that they will fit on to a silicon chip with thousands of other rows of fuses. Then we have a whole program on a chip. The chip is known as Programmable Read Only Memory (PROM) and can only be written to. However, special types of PROM are erasable by flooding them with ultraviolet light. These are known as EPROMs or Erasable Programmable Read Only Memory.
PROMs are typically used in games consoles as they are very difficult to copy. In some computer systems the operating system and/or system software can be found on a chip. Some microcomputers have languages on chips or even software such as wordprocessors and databases.
Although the concept seems to have fallen out of favour the BBC micro introduced a concept called sideways ROM and sideways RAM. The computer was limited in user memory to 32k and when you switched on you were put into BASIC. If you were to load, say, a wordprocessor or another language you would not have much memory left. But if you were able to get rid of the BASIC program you could use the space it occupied for the language or wordprocessor.
These other programs could be switched in as required - a process known as paging so the ROMs were also known as paged ROMs. Of course, you could even extend the operating system by adding your own commands. And if one of these ROMS were actually RAM you could use the space for extra data or, perhaps, load your own ROM from disk.
Many early processors such as the Z80 and 6502 could only address (or see) a maximum of 64k of memory, yet machines were introduced based around these processors which had much more RAM - typically 128k or 512k. They had several banks of memory which were switched in or paged as required. The processes were in many ways similar to that used for sideways RAM. Today this would be known as conventional memory, although because processors can address higher amounts of memory there is no need to have multiple banks of RAM.
Computers started to appear with memory of 1M and above as processors became more powerful. PC terminology began to prevail. The problem was that there was a limit of 640k when using DOS (the operating system for PCs). This limit was decided in the early years when it was thought that noone would need any more. An early attempt to overcome this barrier was to introduce expanded memory which could only be used by programs. As technology improved this was replaced but to provide compatability with earlier programs and in case a program needs to manipiulate large blocks of memory expanded memory can be simulated by a memory manager. This extra RAM is divided into chunks and paged in as required. Each chunk fits into a gap in the bottom 1M.
Conventional memory (ie up to 640k) is used for programs and system data and operations. The video memory sits in an area known as upper memory which is the area between 640k and 1M. This came about because some of the early chips used in PCs were capable of accessing up to 1M and because DOS could only use 640k the extra space was put to other uses. Extended memory is anything above 1M and can only become available by using the appropriate memory manager. You also need the correct processor. On a PC this would be a 286, 386, 486, Pentium etc. If your machine has 8M RAM then 7M is extended memory.
High memory is the first 64k of extended memory. It is given a special name because DOS can access this area. To save conventional memory you can load DOS into High Memory leaving more room for the system.
A cache is a portion of memory which tries to guess what item of data is going to be needed next. It fetches and loads data so that if it is needed it can come from memory rather than from the slow harddisk. RAM is (almost) instantaneous to fetch things from. By comparison peripherals are slow because they have moving mechanical parts. A cache is like a buffer in some respects in that there is a queue of data in store waiting to be processed but it is more intelligent. It is most often used with hard disk and optical drive systems to speed up the flow of data.
A buffer, on the other hand, is a special small bit of RAM used as a holding area. Data amasses in this area in a queue before being picked up and dealt with elsewhere. For example, when you type a character on the keyboard it goes into a keyboard buffer where it waits until it can be interpreted.
Contents Introduction Communications Input Numbers Operating systems Disks History