Microprocessor, Microcomputer and Assembly Language
Microprocessor, Microcomputer and Assembly Language
Microprocessors,
Microcomputers, and
Assembly Language
The microprocessor plays a significant role in the chapter concludes with an overview of microprocessor
everyday functioning of industrialized societies. The applications in the context of the entire spectrum of
microprocessor can be viewed as a programmable various computer applications and presents a block
logic device that can be used to control processes or diagram of a temperature control system as an
to turn on/off On the other hand,
devices.
microprocessor can be viewed as a data processing
the application of the microprocessor-based system.
The microprocessor communicates and operates
unit or a computing unit of a computer. The
in thebinary numbers 0 and 1, called bits. Each
microprocessor is a programmable integrated device microprocessor has a fixed set of instructions in the
that has computing and decision-making capability
form of binary patterns called a machine language.
similar to that of the central processing unit (CPU) of
a computer. Nowadays, the microprocessor is being However, it is difficult for humans to communicate
called in the language of Os and ls. Therefore, the binary
Used in a wide range of products called
instructions are given abbreviated names, called
microprocessor-based products or systems. The
microprocessor can be embedded in a larger system, mnemonics, which form the assembly language for
can be a stand alone unit controlling processes, or it a given microprocessor. This chapter explains both
Can function as the CPU of a computer called a the machine language and the assembly language of
microcomputer. This chapter introduces the basic the microprocessor, known as the 8085. The
sinucture of a microprocessor based product and shows advantages of assembly language are compared with
how the same structure is applicable to high-level languages (such as BASIC, C, C++, and
microcomputers and other large computers. The Java).
MICROPROCESSOR-BASED SYSTEMS: HARDWARE AND INTERFACINO
. MICROPROCESSORS
FIGURE 1.1
A Programmable Machine
Memory
Miero Tnput
processor
Output
MICROPROCESSORS. MICROCOMPUTERS. AND ASSEMBLY LANGUAGE 5
tum traffic lights on and off, compute mathematical functions, or keep track of a guidance
system. This system may be simple or sophisticated, depending on its applications, and it is
recognized by various names depending upon the purpose for which it is designed/ The
microprocessor applications are classified primarily in two categories: reprogrammable
systems and embedded systems. In reprogrammable systems, such as microcomputers, the
microprocessor is used for computing and data processing. These systems include general
purpose microprocessors capable of handling large data, mass storage devices (such as
disks and CD-ROMs), and peripherals such as printers; a personal computer (PC) is a
typical illustration. In embedded systems, the microprocessor is a part of a final product
and is not available for reprogramming to the end user. A copying machine is a typical
example of an embedded system. The microprocessors used in these systems are generally
categorized as: (1) microcontrollers that include all the components shown in Figure 1.
on one chip, and (2) general purpose microprocessors with discrete components shown in
Figure 1.1,Embedded systems can also be viewed as products that use microprocessors to
perform their operations; they are known as microprocessor-based products. Examples
include a wide range of products such as washing machines, dishwashers, automobile
dashboard controls, traffic light controllers, and automatic testing instruments.
BINARY DIGITS
The microprocessor operates in binary digits, 0 and 1, also known as bits. Bit is an
abbreviation for the term binary digit. These digits are represented in terms of electrical
voltages in the machine: generally, 0 represents one voltage level, and 1 represents another.
The digits 0 and 1 are also synonymous with low and high, respectively.
Each microprocessor recognizes and processes a group of bits called the word, and
microprocessors are classified according to their word length. For example, a processor
with an 8-bit word is known as an 8-bit microprocessor, and a processor with a 32-bit word
is known as a 32-bit
microprocessor.
A MICROPROCESSOR AS A PROGRAMMABLE DEVICE
The fact that the microprocessor is programmable means it can be instructed to perform
given tasks within its capability. A piano is a programmable machine; it is capable of
generating various kinds of tones based on the number of keys it has. A musician selects
keys depending upon the musical score printed on a sheet. Similarly, today's microprocessor
1S designed to understand and execute many binary instructions. It is a multipurpose machine:
It can be used to
perform various sophisticated computing functions, as well as simple
Tasks such as turning devices on or off. A programmer can seBlect appropriate instructions
and ask the microprocessor to perform various tasks on a given set of data.
The person who designs a piano determines the frequency (tone) for a given key and
une scope of the piano music. Similarly, the engineers designing a microprocessor determine
set of tasks the microprocessor should perform and design the necessary logic cireuits
and provide the user with a list of the instructions the processor will understand. For example,
an instruction for
adding two numbers may look like a group of eight binary digits, suchas
6 MICROPRoCESSOR-BASED SYSTEMS: HARDwARE AND
INTERFACI
100 OXXX. These instnuctions are simply a pattern of Os and Is. The user
(programmer
selects instnictions from the list and determines the sequence of execution for a given task
These instructions are entered or stored in storage, called mnemory, which can be read hu
the microprocessor.
MEMORY
Memory is like the pages of a notebook with space for a fixed numnber of binary number
on each line. However. these pages are generally made of semiconductor material. Typically,
each line is an 8-bit register that can store eight binary bits, and several of these register
are arranged in a sequence called memory. These registers are always grouped together in
powers of two. For example, a group of 1024 (20) 8-bit registers on a semiconductor chip
is known as IK byte of memory; 1K is the closest approximation in thousands.* The user
writes the necessary instructions and data in memory through an input device (described
below). and asks the microprocessor to perform the given task and find an answer. The
answer is generally displayed at an output device (described below) or stored in memory
INPUT/OUTPUT
The user can enter instructions and data into memory through devices such as a keyboard
or simple switches. These devices are called input devices, similar to eyes and ears in a
human body. The microprocessor reads the instructions from the memory and processes
the data according to those instructions. The result can be displayed by a device such as
seven-segment LEDs (Light Emitting Diodes) or printed by a printer. These devices are
called output devices.
In the late 1960s, the CPU was designed with discrete components on various boards. chi
With the advent of integrated circuit technology, it became possible to build the CPU on a dev
single chip; this came to be known as a microprocessor, and the traditional block diagram
shown in Figure 1.2(a) can be replaced by the block diagram shown in Figure 1.206). A 1.1
The terms Sin
computer with a microprocessor as its CPU is known as a microconmputer.
inve
I n computer terminology, IK is equal to 1024. In scientific terminology, Ik is equal to 1000.
AMICROPROCESSORS, MICROCOMPUTERS, AND ASSEMBLY LANGUAGE 1
CPU
Arithmetic/
Logic Unit
(ALU)
nInput Control
Unit Output
--t-
Memory
(a)
Microcontroller
MPU
Micro
processor
Input as Output Memory O
CPU
Peripheral Devices
A/D Converter
Timer Serial I/O
Memory
(b) )
FIGURE 1.2
(a) Traditional Block Diagram of a Computer. (b) Block Diagram of a Computer with the
Microprocessor as CPU; and (c) Block Diagram of a Microcontroller
microprocessor and microprocessor unit (MPU) are often used synonymously. MPU implies
a complete processing unit with the necessary control signals. Because of the limited number
of available pins on a microprocessor package, some of the signals (such as control and
multiplexed signals) need to be generated by using discrete devices to make the
microprocessor a complete functional unit or MPU.
Assemiconductor fabrication technology became more advanced, manufacturers were
able to place not only MPU but also memory and I/O interfacing circuits on a single chip:
this is known as a microcontroller or microcontroller unit (MCU). A microcontroller is
esentially an entire computer on a single chip. Figure 1.2(0) shows that the microcontroller
chip also includes additional devices such as an A/D converter, serial I/O, and timers (these
devices are discussed in later chapters).
50s; an entire circuit consisting of several transistors, diodes, and resistors could b
designed on a single chip. In the early 1960s, logic gates known as the 7400 series wer
commonly available as ICs, and the technology of integrating the circuits of a logic gate o
a single chip became known as small scale integration (SSI). As semiconductor technolog
advanced, more than 100 gates were fabricated on one chip; this was called medium-sca
integration (MSI). A typical example of MSI is a decade counter (7490). Within a fe
years. it was possible to fabricate more than 1000 gates on a single chip; this came to b
known as large-scale integration (LSI). Now we are in the era of very-large-scale integratic
(VLS) and super-large-scale integration (SLS). The lines of demarcation between the:
different scales of integration are rather ill defined and arbitrary. As technology improve
more and more logic circuits were built on one chip, and they could be programmed to d
different functions through hard-wired connections. For example, a counter chip can b
programmed to count in Hex or decimal by providing logic 0 or 1 through appropriate p
connections. The next step was the idea of providing Os and ls through a register,
programmable device described in the next section.
HISTORICAL PERSPECTIVE
The microprocessor revolution began with a bold and innovative approach in logic desig
pioneered by Intel engineer Ted Hoff. In 1969, Intel was primarily in the business
designing semiconductor memory; it introduced a 64-bit bipolar RAM chip that year.
the same year, Intel received a contract from a Japanese company, Busicom, to design
programmable calculator. The original design called for 12 different chips with hard-wird
programming. Instead, Ted Hoff suggested a general-purpose chip that could perform varior
logic functions, which could be activated by providing patterns of 0s and Is through registe
with appropriate timing. The group of registers used to store patterns of Os and Is w:
called memory. Thus a programmable calculator was designed successfully with a genen
purpose logic device that can be programmed by storing the necessary patterns of Os and
in memory. Later Intel realized that this small device had computing power that could b
used for many applications. Intel coined the term "'microprocessor" and in 1971 release
the first 4-bit microprocessor as the 4004. It was designed with LSI technology; it ha
2,300 transistors, 640 bytes of memory addressing capacity, and a 108 kHz clock. Thus, th
microprocessor revolution began with this tiny chip.
This invention has been placed on a par with that of the printing press or the intern
combustion engine. Gordon Moore, cofounder of Intel Corporation, predicted that th
number of transistors per integrated circuit would double every 18 months; this came to b
known as "Moore's Law." Since the invention of the 4004, we have processors that ar
designed with more than 700 million transistors, thatcan address one terabyte (1x 10).
memory, and that can operate at 3.33 GHz frequency (see Table 1.1 and Table 18.2 i
Chapterl8).
The Intel 4004 was quickly replaced by the 8-bit microprocessor (the Intel 8008
which was in turn superseded by the Intel 8080. In the mid-1970s, the Intel 8080 w:
widely used in control applications, and small computers were also designed using th
8080 as the CPU; these computers became known as microcomputers. Within a few yea.
after the emergence of the 8080, the Motorola 6800, the Zilog Z80, and the Intel 808
MICROPROCESSORS, MICROCOMPUTERS, AND ASSEMBLY LANGUAGE 9
TABLE 1.1
Intel Microprocessors: Historical Perspective
Year of Number of Initial Clock Addressable
Processor Introduction Transistors Speed Address Bus Data Bus Memory
microprocessors were developed as improvements over the 8080. The 6800 was designed
with a different architecture and the instruction set from the 8080. On the other hand, the
8085 and the Z80 were designed as upward software compatible with the 8080; that is,
they included all the instructions of the 8080 plus additional instructions. As the
microprocessors began to acquire more and more computing functions, they were viewed
more as CPUs rather than as programmable logic devices. Most microcomputers are now
built with 32- and 64-bit microprocessors. Each microprocessor has begun to carve a niche
for its own applications. The 8-bit microprocessors are being used as programmable logic
devices in control applications, and more powerful microprocessors are being used for
mathematical computing (number crunching), data processing, and computer graphics
applications.
Our focus here is on using 8-bit microprocessors as programmable devices in
microprocessor based systems. The overwhelming majority of microprocessor applications
use 8-bit processors or microcontrollers. The range of applications is very wide and
diversified-from the auto industry to home appliances. Recent statistics suggest that the
world wide sales of 8-bit chips is a major segment of the total number of microprocessor
chips sold. However, the most compelling reason to use an 8-bit processor is educational.
o understand the basic concepts underlying the microprocessor device, it is easier to learm
rom a simple 8-bit processor than from a 64-bit processor. And these fundamental concepts
art
easily transferable from 8-bit processors to larger processors.
MICROPROCESSOR-BASED SYSTEMS: HARDWARE AND INTERFACIN
10
1.1.2 Organization of a Microprocessor-Based System
formal structure of a microprocessor-based system or
Figure 13 shows a simplified but it wi
one among many microprocessor-based systems.
product Since a microcomputer is
have the same structure as shown in Figure
1.3. It inciudes three components: microprmcesso
and read-only memory). These
IO (input output). and memory (read/write memory
a common communication path
called a bus. The entir
omponents are organized around
also referred to as a system or a micTocomputer system. and the
group of omponents is
refemed to as sub-systems. At the outset. it is necessary
omponents themselves are
differentiate between the terms microprocessor and microcomputer because of the commoe
misuse of these terms in popular literature. The microproessor is one component of the
is a complete computer similar t
microcomputer. On the other hand. the microcomputer
that CPU functions of the microcomputer are performed by the
any other computer. except
for inpu/output devices. The various
microproesor Similariy. the term peripheral is used
or a microcomputer are shown in Figure 13
components of a microprocessor-based product
and their functions are described in this section.
MICROPROCESSOR
The microprocessor is a cock-driven semiconductor device consisting of electronic ogi
circuits manufactured by using either a large-scale integration (LSD or very-large-scalk
various
integration (VLSID technique. The microprocessor is capable of performing
execution
computing functions and making decisions to change the saquence of program
In large computers. a CPU implemented on one or more circuit boaris performs thes
includs
computing functios. The microprocessor is in many ways similar to the CPU. but
all the logic circuitry. including the control unit. on one chip. The microprocessor can be
divided into three segments for the sake of clarity. as shown in Figure 1.3: arithmeic logis
unit (ALU. register array. and control unit.
AritchmeticLogic Unit This is the area of the microprocessor where various computing
functions ae performei on data. The ALU unit performs such arnthmetic ogerations a
adition and suberaction. and such logic operations as AND. OR. and exclusive OR
Mroprocer
IO
ALU Rogsaer
A
S stem Bus
Mamn
FIGURE 1.3
Mcopmcessor-based System with Bus Arhitectuse
MICROPROCESSORS, MICROCOMPUTERS, AND ASSEMBLY LANGUAGE 11
Register Array This area of the microprocessor consists of various registers identified by
leters such as B. C, D. E, H, andL. These registers are primarily used to store data
temporarily during the execution of a program and are accessible to the user through
instructions.
Control Unit The control unit provides the necessary timing and control signals to all the
operations in the microcomputer. It controls the flow of data between the microprocessor
and memory and peripherals.
Now the question is: What is the relationship among the programming instructions
(binary pattern of Us and 1s), the ALU, and the control unit? This can be explained with the
example of a i ull adder circuit. A full adder circuit can be designed with registers, logic
gates. and a clock. The clock initiates the adding operation. Similarly, the bit pattern of an
instruction initiates a sequence of clock signals, activates the appropriate logic circuits in
the ALU, and performs the task. This is called microprogramming, which is done in the
design stage of the microprocessor. In many ways, this is similar to the process of how our
brain operates. In early childhood, we learn a word, "sit," and physical motions needed for
the action are embedded in our brain. When we hear the word "sit," our brain activates a
series of actions for our muscles and bones and we sit down. In this analogy, the word "sie"
is like an instruction in a microprocessor, and actions initiated by our brain are like
microprograms.
The bit patterns required to initiate these microprogram operations are given to the
programmer in the form of the instruction set of the microprocessor. The programmer
selects appropriate bit patterns from the set for a given task and enters them sequentially in
memory through an input device. When the CPU reads these bit patterns one at a time, it
initiates appropriate microprograms through the control unit, and performs the task specified
in the instructions.
At present, 8-bit processors have become part of microcontrollers. Examples of widely
used 8-bit microcontrollers include the Intel 8051, Zilog Z8, and Motorola HC08 series
and Microchip PIC series. Earlier microcomputers (equivalent of PCs) were designed around
the 8-bit microprocesors. The recent versions of personal computers are designed around
the Intel 32- or 64-bit microprocessors. Single-board microcomputers are commonly used
in college laboratories.
MEMORY
Memory stores such information as instructions and data, and provides that
binary
information to the microprocessor whenever necessary. To execute programs, the
microprocessor reads instructions and data from memory and performs the computing
operations in its ALU section. Results are either transferred to the output section for display
or stored in memory for later use. The memory block shown in Figure 1.3 has two sections:
The Read/Write memory (R/WM) is also known as user memory. It is used to store
user programs and data. In single-board microcomputers, the monitor program monitors
the Hex keys and stores those instructions and data in the R/W memory. The information
stored in this memory can be easily read and altered.
/O (INPUT/OUTPUT)
The third component of a microprocessor-based system is I/O (input/output); it
communicates with the outside world. I/O includes two types of devices: input and output;
these 1/0 devices are also known as peripherals.
The input devices such as a keyboard, switches, and an analog to digital (A/D) converter
transfer binary information (data and instructions) from the outside world to the
microprocessor. Typically, a microcomputer used in college laboratories includes either a
hexadecimal keyboard or an ASCII keyboard as an input device. The hexadecimal (Hex)
keyboard has 16 data keys (0 to 9 and A to F) and some additional function keys to perform
such operations as storing data and executing programs. The ASCII (the term is explained
in Section 1.2) keyboard is similar to a typewriter keyboard, and it is used to enter programs
in an English-like language. Although the ASCII keyboard is found in most microcomputers
(PCs), single-board microcomputers generally have Hex keyboards, and microprocessor
based products such as a microwave oven have decimal keyboards.
The output devices transfer data from the microprocessor to the outside world. They
include devices such as light emitting diodes (LEDs), a cathode ray tube (CRT) or video
screen, a printer, X-Y plotter, a magnetic tape, and digital-to-analog (DIA) converter
Typically, single-board microcomputers and microprocessor-based products (such as a dish
washer or a microwave oven) include LEDs, seven-segment LEDs, and alphanumeric LED
displays as output devices. Microcomputers (PCs) are generally equipped with output devices
such as a video screen (also called a monitor) and a printer.
SYSTEM BUS
The system bus is a communication path between the microprocessor and peripherals; it is
nothing but a group of wires to carry bits. In fact, there are several buses in the system that
will be discussed in the next chapter. All peripherals (and memory) share the same bus;
however, the microprocessor communicates with only one peripheral at a time. The timing
is provided by the control unit of the microprocessor
1. The microprocessor
O reads instructions from memory.
communicates with all peripherals (memory and I/0s) using the system bus.
controls the timing of information flow.
performs the computing tasks specified in a program.
2. The memory
stores binary information, called instructions and data.
Dprovides the instructions and data to the microprocessor on request.
stores results and data for the microprocessor.
3. The input device
enters data and instructions under the control of a program such as a monitor program.
4. The output device
accepts data from the microprocessor as specified in a program.
5. The bus
caries bits between the microprocessor and memory and I/Os.
is an instruction that increments the number in the register called tne Machine lar-
0011 1100
considered low-l
accumulator by one.
1000 0000 is an instruction that adds the number in the register called B to the number is in Eng
language is
are t
the accumulator, and keeps the sum in the accumulator. How, then,
* Hexadecimal numt
The 8085 microprocessor has 246 such
instructions for
bit patterns, amounting to 74 differened
performing various operations. These 74 different instructions are cai
CROPROCESSORS, MICROCOMPUTERS, AND ASSEMBLY LANGUAGE
MICK
15
its instruction set. This binary language
with a predetermined instruction set
is called the
8085 machine language.
Because it is tedious and error-inducive for
people to recognize and write instructions
hinary language, these instructions are, for convenience, written in
in.
hexadecimal code
and entered in a single-board microcomputer by using Hex keys. For
instruction 0011 1100 (mentioned previously) is equivalent to 3C inexample, the binary
hexadecimal. This
instruction can be entered in a single-board microcomputer system with a Hex
Instr
oressing keyboard
two keys: 3 and C. The monitor program of the system translates these by
keys into
pr
their equivalent binary pattern.
Although these symbols do not specify the complete operations, they suggest its
significant part. The complete description of each instruction must be supplied by the
manufacturer. The complete set of 8085 mnemonics is called the 8085 assemblylanguage
and a program written in these mnemonics is called an assembly language program. (Again,
the assembly language, or mnemonics, is specific to each microprocessor. For example,
the Motorola 6800 microprocessor has an entirely different set of binary codes and
nemonics than the 8085. Therefore, the assembly language of the 6800 is far different
from that of the 8085.) An assembly language program written for one microprocessor is
not transferable to a computer with another microprocessor unless the two microprocessors
are compatible in their machine codes.
Machine language and assembly language are microprocessor specific and are both
considered low-level languages. The machine language is in binary, and the assembly
language is in English-like words; however, the microprocessor understands only the binary.
iow, then, are the assembly language mnemonics written and translated into machine
exadecimal numbers are shown either with the subscript 16, or as a number followed by the letter H.
AND I N T E R F A C .
SYSTEMS:
HARDWARE
LNG
MICROPROCESSOR-BASED
on paper (or
in a noteboo
can be written by hand in Sectio
as explained
mnemonics
The assembly,
language or binary code? code, called hand
progran
hexadecimal using a
manually in written electronically
on a computer
and translated
mnemonics can
be translated into binar
the next section) and
1.2.5. Similarly, in the
ASCIl code (explained
Editor in the
an
called assembler.
called an
the program
code by using
ASCII Code in alphabetic letter
1.2.4 with the computer
communicate
machine; to used code is known
computer
is a binary The commonly
A necessary
It is a 7-bit code with
are
translation codes
numbers,
and decinmal Information Interchange.
Standard Code for to either a
as
ASCIl-American
c o m b i n a t i o n from
00H to 7FH is assigned
c o m b i n a t i o n s , and
each
command (see Appendix
E). For example
128 (27) machine
number, a symbol,
or a
41H to 5AH represent
capital
letter. a decimal 9 decimal digits,
39H represent 0
to 00H to IFH
hexadecimal 30H to and initial codes
various symbols,
20H to 2FH represent feed. In microcomputer
letters A through Z, return and line
commands as carriage
such machine and printers are typical
represent video screens,
(called ASCII keyboards), "9" is pressed on
an ASCII
systems. keyboards codes. When the key
ASCII
devices that use character, and the system
examples of in binary, called an ASCII
receives 39H
keyboard, the computer numbers.
characters into appropriate binary
program
translates ASCII
characters than the original 128
many m o r e
use
However, recent computers that provides 256 (2)
Extended ASCII. It is an 8-bit code
combinations; this is
called characters.
combinations are assigned
to various graphics
additional 128
combinations; the
entering the
program
ubject to errors. The other process involves the use of a computer
edious and sub with an
is
aard into
keyboard
by the ASCIT
into the corresponding binary machine codes of the microprocessor. Each
oprocessor has its own assembler because the mnemonics and machine codes are
ific to the microprocessor being used, and each assembler has rules that must be followed
e orogrammer. Personal Computers (PCs-see Section 1.3) are commonly available on
collegecampuses. These computers are based on 16-or 32-bit
micropr
processors with different
aemonics than the 8085 microprocessor. However, the programs known as cross-
mnen
Qcsemblers can be used to translate the 8085 mnemonics into appropriate machine codes.
(Asemblers and cross-assemblers are discussed in Chapter 11.)
FIGURE 1.4
Block Diagram: Translation of Compiler
Object
igh Level Language Program into Source Code or
Code
Machine Code Interpreter
SYSTEMS: HARDWARE
AND INTERFACINe
MICROPROCESSOR-BASED
is in troubleshooting (debugging) in
languages than to find them in a program written an
written in a high-level language
program
assembly language. where programs
such as traffic control and appliance control,
In certain applications
assembly language is suitable. Similarly, in such real-time
small and compact,
waveform into digital data, program efficiency
are
applications as converting high-frequency time should closely match each other without
a
events and
is critical. In real-time applications,
desirable in these applications
delay: therefore, assembly language is highly
significant is not a
in which programs are large and memory
On the other hand. for applications
limitation. high-level languages may be desirable. Typical examples of applications programs
word processors, video games, tax-return preparation, billing,
accounting, and money
are
written by professionals such as programmer=
management. These programs are generally
in high-level languages. The advantage of time saved in debugging a large program may
Now need to
outweigh the disadvantages of memory requirements and inefficiency. we
examine the relationship and the interaction between the hardware (microprocessor, memory,
and /O) and software (languages and application programs)
1.2.7 Operating Systems
The interaction between the hardware and the software is managed by a set of programs
called an operating system of a computer; it oversees all the operations of the computer
The computer transfers information constantly between memory and various peripherals
such as printer, keyboard, and video monitor. It also stores programs on disk. The operating
system is responsible primarily for storing information on the disk and for the communication
between the computer and its peripherals. The functional relationship between the operating
system and the hardware of the computer is shown in Figure 1.5(a).
Figure 1.50b) shows the relationship and the hierarchy among the hardware, the
operating system, high-level languages, and application programs. The operating system is
closest to the hardware and application programs are farthest from the hardware. When the
computer is turned on, the operating systeem is in charge of the system and stays in the
background and provides channels of communications to application programs. Each
computer has its own operating system. In the 1970s, CP/M (Control Monitor
was a widely used
Program)
operating system; it was designed for 8-bit processors such as the Z80
and 8085/8080A. In the 1980s, when 8-bit
processors were replaced by 16-bit processors
in personal computers (PCs), MS-DOS
(Microsoft Disk Operating System) replaced
MS-DOS (also known as DOS or PC-DOS) was CP/M
and it became almost an
designed to handle 16-bit
processor systems,
industry standard for the personal computer. MS-DOS is a text-
based operating system; the commands are
written using a keyboard. In the 1990s, it was
replaced by graphical user interface (GUI) operating
which enabled the user to write systems such as Windows 3.1 and 95,
commands by clicking on icons rather than
In recent 32- and 64-bit using a keyboard.
of UNIX), and Windows
computers, operating systems such as UNIX (or various versions
8 are
commonly used.
19
OMPUTERS,
M I C R O C O M
AND ASSEMBLY LANGUAGE
PROCESSOR
ORS.
AMROPR
RFACING
Operating
System
igh-level
TOrs in a
en in an
rograms
Microprocessor
al-time MPU
ficiency
without
cations.
is not a
rograms
Memory Storage Memory Output
R/W Memory Disk Devices
money Input
Devces ROM CD
ammers
m may
(a)
need to
nemory,
ograms
mputer.
pherals
Derating
nication Computer
Hardware
erating
Operating System
re, the
stem is Utility Programs
nen the Assemi and igh-Level Language
in the
Each Application Programs
gram)
ne Z80
(b)
essors
CP/M. FiGURE 1.5
stems,
text-
eDperating S
Heaystem and Its Functional Relationship with Various Hardware Components
erarchical
it was Relationship between Computer Hardware and Software
nd 95,
board.
Tsions
MICROPROCESSOR-BASB.
COMPUTERS TO
FROM LARGE
SINGLE-CHIP MICROCONTROLLERS
an unprecedented impact
semiconductor technology have had
Since 1950. advances in universiti
1960s, were accessible only to big corporations,
computers. In the computers
has become a c o m m o n word. The range
and government agencies. Now, "computer" multimillion-dollar machi
now available extends
from such sophisticated,
computers the computers nc
to the less-than-$1000 personal computer. All
as the Cray computers
in Figure 1.3
available on the market include
the same basic components shown
are not all the same.
Nevertheless. it is obvious that these computers
are suitat
to serve different purposes. Some
Different types of computers are designed
on and o
are used simply for turning appliances
for scientific calculations, while others
Thus. it is necessary to have an overview
of the entire spectrum of computer applicatio-
Until t
for understanding the topics and applications discussed in this text.
as a context
classified in threecategories: mainframe, mini, an-
1970s. computers were broadly
considerably, and the distinction
microcomputers. Since then, technology has changed
between these categories have been blurred. Initially,
the microcomputer was recognize
nachines were slower and smaller in memory capacity than mainframes. The price range
ced to be anywhere from $25.000 to $ 100,000. Typical examples include such computers
the Digital Equipment PDP 11/45 and the Data General Nova.
However. current lowW-end mainframes and high-end microcomputers (described in
the next section) overlap considerably in price, performance, and applications with traditional
minicomputers. Therefore, the ternm minicomputer is mostly referred to in the historical
context.
1.3.3 Microcomputers
The 4-bit and 8-bit microprocessors became available in the mid-1970s, and initial
were primarily in the areas of machine control and instrumentation. As the
applications
price of the microprocessors and memory began to decline, the applications mushroomed
in almost all areas, such as video games, word processing, and small-business applications.
32-
Early microcomputers were designed around 8-bit microprocessors. Since then, 16-.
and 64-bit microprocessors, such as the Intel Pentium series, Intel Core 13, i5, i7, and the
Power PC series have been introduced, and recent microcomputers are being designed
around these microprocessors. Present day microcomputers can be classified in four groups:
personal (or business) computers (including Laptops and Tablet PCs), work stations, single-
board. and single-chip microcomputers (microcontrollers).
i.e., binary
k and flash drives are used to store programs semipermanently, does not
not disappear when the power is turned off. However, the microprocessor
Ocs
ave direct access to this information; it must copy this information (programs) into system
programs, and application programs are stored on this disk. The flash drive (memory) is
generally used for programs and to make backup copies.
user
wORKSTATIONS
These are high-performance cousins of the personal computers. They are used in engineering
and scientific applications such as computer-aided design (CAD), computer-aided
engineering (CAE), and computer-aided manufacturing (CAM). They generally include
system memory and storage (hard disk) memory in gigabytes, and a high-resolution screen.
The workstations are designed around RISC (reduced instruction set computing)
processors (described in Chapter 18). The RISC processors tend to be faster and more
efficient than the processors used in personal computers. Some of the workstations have
better performance than that of the low-end large computers.
SINGLE-BOARD MICROCOMPUTERS
These microcomputers (as shown in Figure 1.7) are primarily used in college laboratories
and industries for instructional purposes or to evaluate the performance of a given
AAICROPROCESSORS, MICROCOMPUTERS, AND ASSEMBLY LANGUAGE 23
DN291A
TCS526/DPL 85L
A
T252832?
320
23
LANGUAGE
MICROCOMPUTERS, AND ASSEMBLY
MCROPROCESSORS,
8743
AAVS
9NS
TCS5257DPL85L
626
EO
V
sIP 3 2 C
720