Previous Table of Contents Next


The instruction-set architecture of a computer system is usually thought of as the interface between the hardware and the lowest-level software. At the time of Husson’s definition of computer architecture, much programming was still done without using HLLs. A better definition of computer architecture today might be “the attributes of the system as seen by the compiler,” because few programmers deal with binary machine-language programs.

With multiple levels, it is more accurate to think about a computer having multiple architectures, although the binary instruction-set architecture still plays the most important role in most computers. When someone talks about the ability of one computer to execute the programs of another computer with no changes, they often say that the first can execute the binaries of the second computer. They mean that the programs can be moved without even requiring a recompile. The binary machine language of one computer is contained in the other computer.

Software Design

Within a computer system, there are generally two types of software: system software and application software. Operating systems, assemblers, and compilers are examples of system software. Application software, on the other hand, is aimed at the end user of the system and is often uniquely tailored for a particular business.

In the past, it was argued that both the system programmer and the application programmer needed access to the lowest-level architecture. This access was usually accomplished through an assembler. There were many reasons for this argument. Precious little memory was available for most programs, the processors were slow and expensive, and the compilers for HLLs were not very sophisticated. When they needed to get the last ounce of performance out of the machine, “real” programmers used assembly language.

Many believe that assembly-level programming is a relic of the past, something no longer used; but that’s not true. Most operating systems in use today incorporate lots of assembler code. This is true not only for the older operating systems, those that have their roots in the 1960s or early 1970s, but also for newer ones. The PC operating systems are good examples. Microsoft’s Windows 95 is written mostly in Intel assembly language.

The original PC processors had very limited resources. Memories had a maximum size of 64K. One kilobyte is equal to 210, or 1024 bytes, where a byte is an 8-bit entity in memory used to store a character or digit. Memory was so expensive that the operating system could take no more than 4K. The use of assembly language allowed programmers to squeeze the code into the smallest possible space. So much of the operating system was written in assembler that, even when memory sizes increased because of dropping technology costs, it was not practical to go back and rewrite the original code.

Using an assembler to optimize the size and performance of a program does work, but it has at least one major drawback: All programs are tied directly to the hardware. Any change to the hardware can cause some or all of the programs to be rewritten.

To illustrate this, consider a computer that contains eight registers. A register, which is part of the processor datapath, is a high-speed storage area where data and addresses can be kept temporarily while being used by the processor. Registers are generally used to improve the performance of a program. Assume further that each register is 16 bits wide and that the programmer may load and store the registers at will. The existence of these registers and their characteristics show through to the assembly-language programmer. Therefore, every program written at the assembler level for this computer will know about the eight registers and will be dependent on them being there.

Let’s now assume that advances in hardware technology make it possible for the engineers to extend the register space to have sixteen 32-bit registers for the same cost as the original eight smaller ones. The questions is, “What is the impact on the programs written for the original computer?” The answer depends on how the changes were made and how well the original architecture was planned for expansion.

Suppose the original architecture anticipated the change to 16 registers. Enough space could have been reserved in each instruction to address 16 registers, even though only 8 registers were originally implemented. Four-bit fields would be needed in each instruction using registers, because there are 16 unique combinations of 1s and 0s in 4 bits. Old programs can run unchanged on the new hardware. Note that the old programs would still use only 8 registers. New programs could use all 16 registers.

Now instead, suppose that the architecture did not anticipate the change and leave room for future expansion. The new architecture cannot increase the number of registers without causing changes to every instruction that uses registers. It is not possible to stretch a 3-bit field in an instruction to 4 bits without some breakage to existing programs.

One of the many architectures unable to increase the number of user registers is the Intel Pentium Pro. This architecture is living with the number of registers selected for the Intel 386 processor. Although the Pentium Pro architecture would benefit from having more registers, the impact of rewriting all the existing assembler-level software to take advantage of the new registers would be too great.

What about increasing the size of the registers from 16 to 32 bits? In general, increasing the size has less of an impact than changing the number of registers. If just the size is increased, old programs will still run, but they will only use 16 of the 32 bits in the new registers. Again, this information is embedded in the logic of the program and is difficult to change.

There are countless examples of programs running today that are unable to use the full resources of the hardware. The Intel 386 processor first introduced in 1985 was a 32-bit design, meaning its hardware registers are 32 bits wide. Since that time all x86 Intel processors, including the 486, Pentium, Pentium II, and Pentium Pro, have been 32-bit designs. Yet much of the PC software running on these newer processors is only 16-bit software. The original programs and the operating systems were written at a time when only the 16-bit Intel 286 hardware was available. Even the newer Windows 95 operating system is written mostly in 16-bit assembler code. The effort to rewrite all this PC application and system software to take advantage of 32-bit hardware has already taken 12 years, and the transition is still not completed.


Previous Table of Contents Next

Copyright © NEWS/400 Books