Chapter-1 (Week 1 & 2)
Chapter-1 (Week 1 & 2)
Chapter-1 (Week 1 & 2)
Intel 8008
Intel released 8008 in 1971 which is an extended 8-bit version of 4004 microprocessor.
It executed instructions at the rate of 20 μs (50,000 instructions per second).
Addressed expanded memory of 16K bytes. Memory size often specified in K bytes. A
byte is generally an 8-bit-wide binary number and a K is 1024 bytes.
Contained additional instructions, 48 totals. Provided opportunity for application in
more advanced systems.
Considering the demanding uses for 8008 (Somewhat small memory size, slow speed,
and instruction set limited 8008 usefulness), Intel introduced 8080 microprocessor in
1973 - the first of the modem 8-bit microprocessors.
Page 1- 2
CoSc3025- Microprocessor and Assembly Language Programming
Six months after Motorola Corporation introduced its MC6800 microprocessor. Soon,
other companies began to introduce their own versions of the 8-bit microprocessor.
Table 1.1 lists several of these early microprocessors and their manufacturers.
Intel 8080
8080 address more memory and execute additional instructions. It executed them 10
times faster than the 8008.
An addition that took 20 μs (50,000 instructions per second) on an 8008-based system
required only 2.0 μs (500,000 instructions per second) on an 8080-based system.
Also, the 8080 was compatible with TTL (transistor-transistor logic), whereas the 8008
was not directly compatible.
The 8080 also addressed four times more memory (64K bytes) than the 8008 (l6K
bytes).
The 8085 Microprocessor
In 1977, Intel Corporation introduced an updated version of the 8080—the 8085. The
8085 was the last 8-bit, general-purpose microprocessor developed by Intel.
o Intel has managed to sell well over 100 million copies of the 8085
microprocessor, its most successful 8-bit, general-purpose microprocessor.
Although only slightly more advanced than an 8080 microprocessor, the 8085 executed
software at an even higher speed.
An addition that took 2.0 μs (500,000 instructions per second on the 8080) required
only 1.3 μs (769,230 instructions per second) on the 8085.
The main advantages of the 8085 were its internal clock generator, internal system
controller, and higher clock frequency.
Page 1- 3
CoSc3025- Microprocessor and Assembly Language Programming
One other feature found in the 8086/8088 was a small 4- or 6-byte instruction cache or
queue that prefetched a few instructions before they were executed. The queue sped the
operation of many sequences of instructions and proved to be the basis for the much
larger instruction caches found in modem microprocessors.
The increased memory size and additional instructions in the 8086 and 8088 have led
to many sophisticated applications for microprocessors. Improvements to the
instruction set included multiply and divide instructions, which were missing on earlier
microprocessors.
In addition, the number of instructions increased from 45 on the 4004, to 246 on the
8085, to well over 20,000 variations on the 8086 and 8088 microprocessors. These
microprocessors are called CISC (complex instruction set computers) because of the
number and complexity of instructions.
The 16-bit microprocessor also provided more internal register storage space than the
8-bit microprocessor.
Page 1- 4
CoSc3025- Microprocessor and Assembly Language Programming
Intel also may allow the Pentium to replace some of the RISC (reduced instruction set
computer) machines that currently execute one instruction per clock.
The 64-bit modification allows the microprocessor to address more than 4G bytes of
memory through a wider 64-bit address.
The biggest advancement in the technology is not the 64-bit operation, but the inclusion
of multiple cores.
Each core executes a separate task in a program, which increases the speed of execution
Programs that do this are called multithreaded applications.
Currently, Intel manufactures dual and quad core versions, but in the future the number
of cores will likely increase to eight or even sixteen.
The problem faced by Intel is that the clock speed cannot be increased to a much higher
rate, so multiple cores are the current solution to providing faster microprocessors.
Page 1- 8
CoSc3025- Microprocessor and Assembly Language Programming
Table 1.2: List of microprocessors with their data size, memory size, number of transistors
and instructions.
YEAR NAME DATA MEMORY # OF # OF
SIZE SIZE TRANSISTO INSTRUCTIO
RS NS
1971 4004 4 4096 4-bit 2,300 45
1973 8008 8 16Kbytes 3,500 48
1973 8080 8 64Kbytes 6,000 48
1973 MC6800 8 64Kbytes
1977 8085 8 64Kbytes 6,500 246
1977 Z80 8 64Kbytes 8,500
1978 8086 16 1Mbytes 29,000 >20,000
1979 8088 16 1Mbytes 29,000
1983 80286 16 16Mbytes 134,000
1986 80386 32 4Gbytes 275,000
1989 80486(i486) 32 4Gbytes 1.2 Million
1993 80586(pentium) 32 4Gbytes 3.3 Million
1995 Pentium Pro 32 4Gbytes 5.5 Million
1997 Pentium II 32 4Gbytes 7.5 Million
1999 Pentium III 32 4Gbytes 9.5 Million
2000 Pentium IV 32 4Gbytes 21 Million
2000 Itanium Processor 64 64Gbytes 15,000,000
Table 1.2 presents list of microprocessors with their data size, memory size, number of
transistors and instructions.
Page 1- 9
CoSc3025- Microprocessor and Assembly Language Programming
Page 1- 10
CoSc3025- Microprocessor and Assembly Language Programming
o TPA (transient program area), system area, and XMS (extended memory
system).
The type of microprocessor in your computer determines whether an extended memory
system exists.
o Computer based on old 8086 or 8088 (a PC or XT), the TPA (640K bytes) and
systems area (384K bytes) exist, but there is no extended memory area.
o First 1M byte of memory is often called the real or conventional memory system.
o Systems based on the 80286 through the Core2 not only contain the TPA (640K
bytes) and system area (384K bytes), they also contain extended memory. These
Page 1- 12
CoSc3025- Microprocessor and Assembly Language Programming
machines are called AT class machines, e.g. PS/l and PS/2, produced by IBM.
Sometimes, these machines are also referred to as ISA (industry standard
architecture) or EISA (extended ISA) machines.
A change beginning with the introduction of the Pentium microprocessor and the ATX
class machine is the addition of a bus called the PCI (peripheral component
interconnect) bus.
ISA machine contains an 8-bit peripheral bus that is used to interface 8-bit devices to
the computer in the 8086/8088-based PC.
AT class machine, also called an ISA machine, uses a l6-bit peripheral bus for interface
and may contain the 80286 or above microprocessor.
The EISA bus is a 32-bit peripheral interface bus found in a few older 80386DX- and
80486-based systems.
o Three newer buses have appeared in ATX class systems. The first to appear was
the USB (universal serial bus).
o The second newer bus is the AGP (advanced graphics port) for video cards. The
advanced graphics port transfers data between the video card and the
microprocessor at higher speeds (66 MHz, with a 64-bit data path, or 533M bytes
per second)
o The latest new buses to appear are the serial ATA interface (SATA) for hard disk
Page 1- 13
CoSc3025- Microprocessor and Assembly Language Programming
drives and the PCI Express bus for the video card. The SATA bus transfers data
from the PC to the hard disk drive at rates of 150M bytes per second or 300M
bytes for SATA-2.
The TPA
The transient program area (TPA) holds the DOS, any currently active or inactive DOS
application programs and other programs that control the computer system.
o The TPA is a DOS concept and not really applicable in Windows.
o The length of the TPA is 640K bytes.
Figure 1.4 shows the organization of the TPA in a computer system running DOS.
Many areas of the TPA are used for system programs, data, and drivers.
It also shows a large area of memory available for application programs.
To the left of each area is a hexadecimal number that represents the memory addresses
Page 1- 14
CoSc3025- Microprocessor and Assembly Language Programming
that begin and end each data area. Hexadecimal memory addresses or memory locations
are used to number each byte of the memory system.
Windows Systems
Modern computers use a different memory map with Windows than the DOS memory
maps.
The Windows memory map appears in Figure 1.5 has two main areas, a TPA and a
system area.
I/O Space
The I/O space in a computer system extends from I/O port 0000H to port FFFFH. (An
I/O port address is similar to a memory address, except that instead of addressing
memory, it addresses an I/O device.)
The I/O devices allow the microprocessor to communicate with the outside world.
Page 1- 15
CoSc3025- Microprocessor and Assembly Language Programming
To view the memory map on your computer in Windows, go to the Control Panel,
Performance and Maintenance, System, Hardware tab, Device Manager, View tab, then
select resources by type and click on the plus next to Input/Output (I/O).
Table 1.2 shows the arithmetic and logic operations executed by the Intel family of
microprocessors.
These operations are very basic, but through them, very complex problems are solved.
Data are operated upon from the memory system or internal registers. Data widths are
variable and include a byte (8 bits), word (16 bits), and double word (32 bits).
Beginning with the 80486, the microprocessor contained a numeric coprocessor that
allowed it to perform complex arithmetic using floating-point arithmetic.
The numeric coprocessor is also capable of performing integer operations on
quadwords (64 bits).
Microprocessor is also able to make simple decisions based upon numerical facts.
Page 1- 16
CoSc3025- Microprocessor and Assembly Language Programming
Page 1- 17
CoSc-2043: Microprocessor and Assembly Language
Figure 1.6: The block diagram of a computer system showing the address, data, and control
bus structure.
Table 1.4 The Intel family of microprocessor bus and memory sizes.
Address Bus:
The address bus is ‘unidirectional’, over which the microprocessor sends an address
code to the memory or input/output.
The address bus requests a memory location from the memory or an I/O location from
the I/O devices.
If I/O is addressed, the address bus contains a 16-bit I/O address from 0000H through
FFFFH. The 16-bit I/O address, or port number, selects one of 64K different I/O
devices. If memory is addressed, the address bus contains a memory address, which
Page 1- 14
CoSc-2043: Microprocessor and Assembly Language
Data bus
The data bus is 'bi-directional'
The data bus transfers information between the microprocessor and its memory and I/O
address space.
Data transfers vary in size, from 8 bits wide to 64 bits wide in various members of the
Intel microprocessor family.
The advantage of a wider data bus is speed in applications that use wide data. For
example, if a 32-bit number is stored in memory, it takes the 8088 microprocessor four
transfer operations to complete because its data bus is only 8 bits wide. The 80486
accomplishes the same task with one transfer because its data bus is 32 bits wide.
Control Bus:
The control bus contains lines that select the memory or I/O and cause them to perform
a read or write operation.
The control bus is used by the microprocessor to send out or receive timing and control
signals in order to coordinate and regulate its operation and to communicate with other
devices, i.e. memory or input/output.
In most computer systems, there are four control bus connections: MRDC (memory
read control), MWTC (memory write control), IORC (I/O read control), and IOWC
(I/O write control).
Overbar indicates that the control signal is active-low; that is, it is active when a logic
zero appears on the control line. For example, if IODC=0, the microprocessor is writing
data from the data bus to an I/O device whose address appears on the address bus.
Microprocessor reads the contents of a memory location by sending the memory an
address through the address bus. Next, it sends the memory read control signal (MRDC)
to cause the memory to read data. Finally, the data read from the memory are passed to
the microprocessor through the data bus.
Whenever a memory write, I/O write, or I/O read occurs, the same sequence ensues,
except that different control signals are issued and the data flow out of the
microprocessor through its data bus for a write operation.
Page 1- 15
CoSc-2043: Microprocessor and Assembly Language
Word-Sized Data
Byte ordering, or endianness, is a major architectural consideration.
If we have a two-byte integer, the integer may be stored so that the least significant byte
is followed by the most significant byte or vice versa.
In little endian machines, the least significant byte is followed by the most significant
byte.
Big endian machines store the most significant byte first (at the lower address).
As an example, suppose we have the hexadecimal number 12345678.
The big endian and small endian arrangements of the bytes are shown below.
The least significant byte always stored in the lowest-numbered memory location.
Most significant byte is stored in the highest.
This method of storing a number is called the little endian format.
Alternate method is called the big endian format.
Numbers are stored with the lowest location containing the most significant data.
Not used with Intel microprocessors.
The big endian format is used with the Motorola family of microprocessors.
Hexadecimal number system
The hexadecimal number system uses sixteen characters to represent umbers: 0 through 9 and
A through F; A is worth ten, B is worth eleven, …, and F is fifteen. In assembly program, the
hexadecimal will be indicated by the letter h.
Example:
7Fh is the number 127(7*16+15*1) and its equivalent binary number is 01111111b.
The conversion between binary and hexadecimal is simple. To covert from hexadecimal to
binary: just represent each hexadecimal digit by four binary digits: Example: 74Dh =
011101001101b
To convert from binary to hexadecimal: break the binary number into groups of four digits, and
Page 1- 16
CoSc-2043: Microprocessor and Assembly Language
Character representation
Each character is represented by a byte or two hexadecimal digits according to ASCII code.
For example:
ASCII code 41h 42h 5Ah 61h 62h 7Ah 30h 39h
Letter A B Z a b z 0 9
In assembly the ASCII representation of character can be defined by enclosing the characters
in paired single (‘) or double (“) quotes. Example: ‘A’ ‘e’ “9”
Note ‘A’ = 41h, ‘a’ = 61h and “9” = 39h
Page 1- 17