0195136047.pdf

(Joyce) #1

318 DIGITAL BUILDING BLOCKS AND COMPUTER SYSTEMS


a detailed knowledge of the computer structure, is rather tedious and error-prone.Assembly-
languageprogramming is developed by using symbolic names, known asmnemonics,and
matching machine-language instructions on a more or less one-for-one basis. Anassembler
is then used to translate assembly-language programs into their equivalent machine-language
programs. Because both assembly-language and machine-language programmings are specific
to a particular computer,high-level languages(HLL) such as Fortran, Pascal, Basic, LISP, and
C have been developed such that programs written by using them could be run on virtually any
computer. Also, these are problem-oriented languages, which allow the user to write programs in
forms that are as close as possible to the human-oriented languages.
Aninterpretertranslates each high-level-language statement into its equivalent set of
machine-language instructions, which are then executed right away. Interpretive languages such
as Basic are very inefficient for programs with loops (repetitive instructions). The inefficiency is
corrected by acompiler, which translates the complete high-level language into machine language.
Once the whole program is compiled, it can be executed as many times as desired without any
need for recompilation. Examples of compiler languages are Fortran, Pascal, and C.
An operating system, such as DOS, VMS, or UNIX, consisting of a set of system programs,
performs resource management and human-to-machine translation, supporting a given computer
architecture. Operations such as starting and stopping the execution, as well as selecting a specific
compiler or assembler for translating a given program into machine language, are taken care of by
the operating system, which is unique for a given microcomputer, minicomputer, or mainframe.

Architecture


Replacing the ALU and CU (i.e., CPU) of Figure 6.3.1 by a microprocessor, and storing
instructions and data in the same memory, one arrives at a stored-program computer or a
microcomputer. Abus,which is a set of wires carrying address, data, and control signals, is
employed for interconnecting the major components of a microcomputer system. The address lines
are unidirectional signals that specify the address of a memory location of an I/O device. With a
typical 24-bit address bus, the microprocessor can access 2^24 (over 16 million) memory locations.
Memory is generally organized in blocks of 8, 16, or 32 bits. The data bus is a bidirectional bus,
varying in size from 8 to 32 bits, which carries data between the CPU, MU, and I/O units. The
control bus provides signals to synchronize the memory and I/O operations, select either memory
or an I/O device, and request either the read or the write operation from the device selected.
While there are virtually countless variations in microprocessor circuit configurations, the
system architecture of a typical microprocessor is shown in Figure 6.3.2. Thearithmetic logic
unit(ALU) accepts data from the data bus, processes the data as per program-storage instructions
and/or external control signals, and feeds the results into temporary storage, from which external
control and actuator control functions can be performed. Theaccumulatorsare parallel storage
registers used for processing the work in progress, temporarily storing addresses and data, and
housekeeping functions. Thestacksprovide temporary data storage in a sequential order and are
of use during the execution of subroutines. Asubroutineis a group of instructions that appears
only once in the program code, but can be executed from different points in the program. The
program counteris a register/counter that holds the address of the memory location containing
the next instruction to be executed. Thestatus registercontains condition-code bits orflags(set
to logic 1 or logic 0, depending on the result of the previous instruction) that are used to make
decisions and redirect the program flow. Thecontrol unit(CU), which consists of the timing
and data-routing circuits, decodes the instruction being processed and properly establishes data
paths among the various elements of the microprocessor. Interconnections may take the form of
Free download pdf