Sei sulla pagina 1di 91

UNIT-1

1. Introduction to Microprocessors
2. Internal Architecture of 8086
3. Addressing modes of 8086.
Introduction to Microprocessors:
What is a microprocessor?
Microprocessor is multi purpose
programmable logic device which performs
arithmetic operations as well as logic operations
and which is integrated on a single IC.
TYPES OF COMPUTERS:
1.Super computer
2.Main frames
3.Mini computer
4.Microcomputer
Super computer
• The supercomputer is the most powerful variant of the
computer, which is used for specific purposes only.
• They are very expensive and require a number of employees to
utilize.
• The super computers are used for the immense number of
mathematical and computational calculations.
As an example, weather forecasting requires a large number
of data, and the supercomputer is needed to analyze the data.
Mainframe computer
• The mainframe computer is also like supercomputer based on
performance and fastness.
• But the difference between the two types are, the
supercomputers are used for a single purpose when the
mainframe computer works for multiple purposes.
• It can support hundreds to thousands of tasks at a time. In
some cases, the mainframe computers are faster than the
supercomputer. 
• They are mostly used to perform bulk data processing works
like statics, transaction processing, census data processing, and
much more works
• Some of the examples of the computer include IBM Z Series.
Minicomputer
• The minicomputer is designed for the small organization
works such as control, instrumentation, communication
switching, human interaction, record keeping, and other
purposes.
• They become popular as personal computers with the
evaluation of time.
• Though they are called a minicomputer, they are basically
midsized, both in power and size.
• The minicomputer is capable of supporting up to 4 to 200
users with its multiprocessing system.
• They implement the computer to become possible with the
utilization of minimal instruction set, less expensive
peripherals, transistor, and core memory technologies.
Microcomputer
• The microcomputer is based on a simple microprocessor
as its central processor unit.
• They are very small and inexpensive when compared
with the other variants.
• They include the microprocessor, and minimal I/0
mounted circuits, memory unit on a single printed circuit
board.
• The microcomputers are basically the small smart gadgets
we use nowadays, like smartphones, smartwatches,
tablets, etc.
• The uses of the micro-computer made it possible for us to
bring small and tiny gadgets tools.
BLOCK DIAGRAM OF COMPUTER
• Mainly computer system consists of three parts, that are
central processing unit (CPU), Input Devices, and Output
Devices

• The Central Processing Unit (CPU) is divided into two parts


again: arithmetic logic unit (ALU) and the control unit (CU).
The set of instruction is in the form of raw data..

• The data is entered through input devices such as the


keyboard, mouse, etc. This set of instruction is processed by
the CPU after getting the input by the user, and then the
computer system produces the output. The computer can show
the output with the help of output devices to the user, such as 
monitor, printer, etc.
Computer's Central Processing Unit (CPU) built on a single
Integrated Circuit (IC) is called a microprocessor.

A digital computer with one microprocessor which acts as a CPU


is called microcomputer.
• Block Diagram of a Microcomputer
• A microprocessor consists of an ALU, control unit and register
array.

• Where ALU performs arithmetic and logical operations on the


data received from an input device or memory.

• Control unit controls the instructions and flow of data within


the computer. And, register array consists of registers
identified by letters like B, C, D, E, H, L, and accumulator.
Evolution of Microprocessors:
We can categorize the microprocessor according to the generations or
according to the size of the microprocessor:
First Generation (4 - bit Microprocessors):
• The first microprocessor was introduced in 1971 by Intel Corp
It was named Intel 4004 as it was a 4 bit processor. It was a processor on a
single chip. It could perform simple arithmetic and logic operations such
as addition, subtraction, boolean AND and boolean OR.
It had a control unit capable of performing control functions like fetching
an instruction from memory, decoding it, and generating control pulses to
execute it.
It was able to operate on 4 bits of data at a time.
This first microprocessor was quite a success in industry. Soon other
microprocessors were also introduced. Intel introduced the enhanced
version of 4004, the 4040.
Second Generation (8 - bit Microprocessor)

The first 8 bit microprocessor which could perform arithmetic and logic
operations on 8 bit words was introduced in 1973 again by Intel.
This was Intel 8008 and was later followed by an improved version,
Intel 8088. Some other 8 bit processors are Zilog-80 and Motorola
M6800.
In 1974 Intel introduced the first 8-bit general purpose microprocessor
is 8085.
It is 8.bit microprocessor all the registers and alu operate on 8-bit data
size.
It contain 16address lines,8- data lines.
The memory capacity is 64kb.
Third Generation (16 - bit Microprocessor):
The 8-bit processors were followed by 16 bit processors.
The third generation microprocessors, introduced in 1978 were
represented by Intel's 8086, Zilog Z800 and 80286, which were 16 -
bit processors with a performance like minicomputers.
Fourth Generation (32 - bit Microprocessors):
Several different companies introduced the 32-bit microprocessors, but
the most popular one is the Intel 80386.
Fifth Generation (64 - bit Microprocessors):
From 1995 to now we are in the fifth generation. After 80856, Intel
came out with a new processor namely Pentium processor followed
by Pentium Pro CPU, which allows multiple CPUs in a single system
to achieve multiprocessing.
• Other improved 64-bit processors are Celeron, Dual, Quad, Octa
Core processors.
Microprocessor Year of Invention Word Length Memory Pins Clock Remarks
addressing
Capacity

4004 1971 4-bit 1 KB 16 750 KHz First


Microprocessor
8085 1976 8-bit 64 KB 40 3-6 MHz Popular 8-bit
Microprocessor
8086 1978 16-bit 1MB 40 5-8 MHz Widely used in
PC/XT
80286 1982 16-bit 16MB real, 4 68 6-12.5 MHz Widely used in
GB virtual PC/AT
80386 1985 32-bit 4GB real, 132 14X14 20-33 MHz Contains MMU
64TB virtual PGA on chip
80486 1989 32-bit 4GB real, 168 17X17 25-100 MHz Contains MMU,
64TB virtual PGA cache and
FPU, 1.2
million
transistors

Pentium 1993 32-bit 4GB real,32- 237 PGA 60-200 Contains 2


bit ALUs,2
address,64-bit Caches, FPU,
data bus 3.3 Million
transistors,
3.3 V, 7.5
million
transistors
Pentium Pro 1995 32-bit 64GB real, 36- 387 PGA 150-200 MHz It is a data
bit address flow processor.
bus It contains
second level
cache also,3.3
V

Pentium II 1997 32-bit - - 233-400 MHz All features


Pentium pro
plus MMX
technology,3.3
V, 7.5 million
transistors

Pentium III 1999 32-bit 64GB 370 PGA 600-1.3 MHz Improved
version of
Pentium II; 70
new SIMD
instructions

Pentium 4 2000 32-bit 64GB 423 PGA 600-1.3 GHz Improved


version of
Pentium III

Itanium 2001 64-bit 64 address 423 PGA 733 MHz-1.3 64-bit EPIC
lines GHz Processor
Basic Terms used in Microprocessor:
• Instruction Set - The group of commands that the microprocessor
can understand is called Instruction set. It is an interface between
hardware and software.
• Bus - Bus is a group of conducting wires which carries information,
all the peripherals are connected to microprocessor through Bus.
• . A microprocessor will have three types of buses, i.e., data bus,
address bus, and control bus.
Address bus :
It is a group of conducting wires which carries address only.Address
bus is unidirectional because data flow in one direction, from
microprocessor to memory or from microprocessor to Input/output
devices
Data bus:
It is a group of conducting wires which carries Data only.Data bus is
bidirectional because data flow in both directions, from microprocessor
to memory or Input/Output devices and from memory or Input/Output
devices to microprocessor.
Control bus:
It is a group of conducting wires, which is used to generate timing and
control signals to control all the associated peripherals, microprocessor
uses control bus to process data, that is what to do with selected
memory location. Some control signals are:Memory read
• Memory write
• I/O read
• I/O Write
• Opcode fetch
Applications of Microprocessors:
The application of microprocessors is increasing day by day.
Some of the applications are:
1) Analytical scientific instruments 2) Smart terminals
3) Stacker crane controls 4) Conveyor controls
5) Word processor 6) Point of scale systems
7) Standalone electronics cash system 8) Electronic games
9) Vending and dispensing machines 10) Market scales 11)
Traffic light controls 12) Home heating and lighting
controls
13) Security & fire alarm system 14) Home appliances
15) Computer aided instruction 16) On line control of lab
instrumentation
17) Desktop computers 18) Check processor
19) Payroll system 20) Inventory control
21) Automatic type setting 22) Compact business machines
23) Medical instrumentation 24) Automobile diagnostics
25) Data communication processing 26) Optical character
recognition
27) I/O terminal for computers.
Intel 8086:
• Intel 8086 microprocessor is the enhanced version of Intel 8085
microprocessor. It was designed by Intel in 1976.
• The 8086 microprocessor is a16-bit, N-channel, HMOS
microprocessor. Where the HMOS is used for "High-speed Metal
Oxide Semiconductor".
• Intel 8086 is built on a single semiconductor chip and packaged in a
40-pin IC package. The type of package is DIP (Dual Inline
Package).
• Intel 8086 uses 20 address lines and 16 data- lines. It can directly
address up to 220 = 1 Mbyte of memory.
• It consists of a powerful instruction set, which provides operation
like division and multiplication very quickly.
• 8086 is designed to operate in two modes, i.e., Minimum and
Maximum mode.
• Maximum mode is suitable for system having multiple processors
• Minimum mode is suitable for system having a single processor

Features of 8086
• It has an instruction queue, which is capable of storing six
instruction bytes from the memory resulting in faster processing.
• It was the first 16-bit processor having 16-bit ALU, 16-bit registers,
internal data bus, and 16-bit external data bus resulting in faster
processing.
• It is available in 3 versions based on the frequency of operation −
– 8086 → 5MHz
– 8086-2 → 8MHz
– (c)8086-1 → 10 MHz
• It uses two stages of pipelining, i.e. Fetch Stage and Execute Stage,
which improves performance.
• Fetch stage can prefetch up to 6 bytes of instructions and stores
them in the queue.
• Execute stage executes these instructions.
• It has 256 vectored interrupts.
• It consists of 29,000 transistors.
• Architecture of 8086
• 8086 contains two independent functional units: 
1.Bus Interface Unit (BIU) 
2. Execution Unit (EU).
The segment registers, instruction pointer and 6-byte instruction queue
are associated with the bus interface unit (BIU).
The functions of BIU:
• Handles transfer of data and addresses,
• Fetches instruction codes, stores fetched instruction codes in first-in-
first-out register set called a queue,
• Reads data from memory and I/O devices,
• Writes data to memory and I/O devices,
• It relocates addresses of operands since it gets un-relocated operand
addresses from EU. The EU tells the BIU from where to fetch
instructions or where to read data.
It has the following functional parts:
• Instruction Queue: When EU executes instructions, the BIU gets
6-bytes of the next instruction and stores them in the instruction
queue and this process is known as instruction pre fetch. This
process increases the speed of the processor.
• When EU executes instructions and is ready for its next instruction,
then it simply reads the instruction from this instruction queue
resulting in increased execution speed.
• Fetching the next instruction while the current instruction executes
is called pipelining.
• Segment Registers: A segment register contains the addresses of
instructions and data in memory which are used by the processor to
access memory locations. It points to the starting address of a
memory segment currently being used.
• There are 4 segment registers in 8086
• Code Segment Register (CS): Code segment of the memory
holds instruction codes of a program.
• Data Segment Register (DS): The data, variables and
constants given in the program are held in the data segment of
the memory.
• Stack Segment Register (SS): Stack segment holds addresses
and data of subroutines. It also holds the contents of registers
and memory locations given in PUSH instruction.
• Extra Segment Register (ES): Extra segment holds the
destination addresses of some data of certain string
instructions.
Instruction Pointer (IP): The instruction pointer in the 8086 microprocessor
acts as a program counter. It indicates to the address of the next instruction to b
Execution Unit (EU)
• The EU receives opcode of an instruction from the queue, decodes it
and then executes it. While Execution unit decodes or executes an
instruction, then the BIU fetches instruction codes from the memory
and stores them in the queue.
• The BIU and EU operate in parallel independently. This makes
processing faster. This is called pipelining.
• General purpose registers, stack pointer, base pointer and index
registers, ALU, flag registers (FLAGS), instruction decoder and timing
and control unit constitute execution unit (EU). Let's discuss them:
• General Purpose Registers: There are four 16-bit general purpose
registers: AX (Accumulator Register), BX (Base Register), CX
(Counter) and DX. Each of these 16-bit registers are further subdivided
into 8-bit registers as shown below:
General Purpose Registers: There are four 16-bit general purpose
registers: AX (Accumulator Register), BX (Base Register), CX (Counter)
and DX. Each of these 16-bit registers are further subdivided into 8-bit
registers as shown below:

16-bit registers 8-bit high-order registers 8-bit low-order registers

AX AH AL

BX BH BL
CX CH CL
DX DH DL
Index Register: The following four registers are in the group of
pointer and index registers:Stack Pointer (SP)
• Base Pointer (BP)
• Source Index (SI)
• Destination Index (DI)
ALU: It handles all arithmetic and logical operations. Such as
addition, subtraction, multiplication, division, AND, OR, NOT
operations.
Flag Register: It is a 16-bit register which exactly behaves like a flip-
flop, means it changes states according to the result stored in the
accumulator. It has 9 flags and they are divided into 2 groups i.e.
conditional and control flags.Conditional Flags: This flag represents
the result of the last arithmetic or logical instruction executed.
Conditional flags are:
– Carry Flag
– Auxiliary Flag
– Parity Flag
– Zero Flag
– Sign Flag
– Overflow Flag
• Control Flags: It controls the operations of the execution unit.
Control flags are:
– Trap Flag
– Interrupt Flag
– Direction Flag
• Flag register format:
The Flags Register
• It is a 16-bit register, also called Program Status Word (PSW).
Seven bits remain unused while the rest nine are used. Six are
status flags and three are control flags.
The control flags can be set/reset by the programmer.
• Trap flag − It is used for single step control and allows the user to
execute one instruction at a time for debugging. If it is set, then the
program can be run in a single step mode.
• Interrupt flag − It is an interrupt enable/disable flag, i.e. used to
allow/prohibit the interruption of a program. It is set to 1 for
interrupt enabled condition and set to 0 for interrupt disabled
condition.
• Direction flag − It is used in string operation. As the name suggests
when it is set then string bytes are accessed from the higher
memory address to the lower memory address and vice-a-versa.
Conditional Flags
It represents the result of the last arithmetic or logical instruction executed.
Following is the list of conditional flags −
• Carry flag − This flag indicates an overflow condition for arithmetic
operations.
• Auxiliary flag − When an operation is performed at ALU, it results in a
carry/barrow from lower nibble (i.e. D0 – D3) to upper nibble (i.e. D4 –
D7), then this flag is set, i.e. carry given by D3 bit to D4 is AF flag. The
processor uses this flag to perform binary to BCD conversion.
• Parity flag − This flag is used to indicate the parity of the result, i.e.
when the lower order 8-bits of the result contains even number of 1’s,
then the Parity Flag is set. For odd number of 1’s, the Parity Flag is reset.
• Zero flag − This flag is set to 1 when the result of arithmetic or logical
operation is zero else it is set to 0.
• Sign flag − This flag holds the sign of the result, i.e. when the result of
the operation is negative, then the sign flag is set to 1 else set to 0.
• Overflow flag − This flag represents the result when the system capacity
is exceeded.
The status flags are set/reset depending on the results of some
arithmetic or logical operations during program execution.
• 1. CF (Carry Flag) is set (CF=1) if there is a carry out of the
MSB position resulting from an addition operation or
subtraction.
• 2. AF (Auxiliary Carry Flag) AF is set if there is a carry out
of bit 3 resulting from an addition operation.
• 3. SF (Sign Flag) set to 1 when result is negative. When result
is positive it is set to 0.
• 4. ZF (Zero Flag) is set (ZF=1) when result of an arithmetic
or logical operation is zero. For non-zero result this flag is
reset (ZF=0).
• 5. PF (Parity Flag) this flag is set to 1 when there is even
number of one bits in result, and to 0 when there is odd
number of one bits.
• 6. OF (Overflow Flag) set to 1 when there is a signed
overflow. For example, when you multiply FFH by 11H not
one byte).
Addressing modes 0f 8086:
• Addressing mode indicates a way of locating data or operands.
• Depending up on the data type used in the instruction and the memory
addressing modes, any instruction may belong to one or more addressing
modes or same instruction may not belong to any of the addressig modes.

There are eight addressing modes in 8086 MPU. These modes are:
• Immediate Addressing Mode
• Register Addressing Mode
• Direct Addressing Mode
• Register Indirect Addressing Mode
• Based Addressing Mode
• Indexed Addressing Mode
• Based-Index Addressing Mode
• Based-Index with displacement addressing mode
Immediate Addressing

In this type of addressing, immediate data is a part of instruction,


and appears in the form of successive byte or bytes.
Example: MOV AX, 0005H.
In the above example, 0005H is the immediate data. The
immediate data may be 8- bit or 16-bit in size.

2. Direct addressing mode:


In the direct addressing mode, a 16-bit memory address (offset)
directly specified in the instruction as a part of it.
Example: MOV AX, [5000H].
3. Register addressing mode:
In the register addressing mode, the data is stored in a register and it is
referred using the particular register. All the registers, except IP, may be used
in this mode.

Example: MOV BX, AX


4. Register indirect addressing mode:
Sometimes, the address of the memory l o c a t i o n which contains data or
operands is determined in an indirect way, using the offset registers. The
mode of addressing is known as register indirect mode. In this
addressing mode, the offset address of data is in either BX or SI or DI
Register. The default segment is either DS or ES.
Example: MOV AX, [BX].
5. Indexed addressing mode:
In this addressing mode, offset of the operand is stored one of the index
registers. DS & ES are the default segments for index registers SI & DI
respectively.
Example: MOV AX, [SI] Here, data is available at an offset address stored
in SI in DS
6. Register relative addressing mode:
In this addressing mode, the data is available at an effective address formed
by adding an 8-bit or 16-bit displacement with the content of any one of the
register BX, BP, SI & DI in the default (either in DS & ES) segment.
Example: MOV AX, 50H [BX]
7. Based indexed addressing mode:
The effective address of data is formed in this addressing mode, by adding
content of a base register (any one of BX or BP) to the content of an index
register (any one of SI or DI). The default segment register may be ES or
DS.

Example: MOV AX, [BX][SI]


8. Relative based indexed:

The effective address is formed by adding an 8 or 16-bit displacement with


the sum of contents of any of the base registers (BX or BP) and any one of
the index registers, in a default segment.

Example: MOV AX, 50H [BX] [SI]


Memory Segmentation:
• In memory, data is stored as bytes.
• Each byte has a specific address.
• Intel 8086 has 20 lines address bus.
• With 20 address lines, the memory that can be addressed is 220
bytes.
• 220 = 1,048,576 bytes (1 MB).
• 8086 can access memory with address ranging from 00000 H
to FFFFF H.
• Segmentation is the process in which the main memory of the
computer is divided into different segments and each segment has its
own base address. It is basically used to enhance the speed of
execution of the computer system, so that processor is able to fetch and
execute the data from the memory easily and fast.
• In 8086, memory has four different types of segments.

These are:
• Code Segment
• Data Segment

• Stack Segment
• Extra Segment
• Code Segment Register (CS): Code segment of the memory holds
instruction codes of a program.
• Data Segment Register (DS): The data, variables and constants
given in the program are held in the data segment of the memory.
• Stack Segment Register (SS): Stack segment holds addresses and
data of subroutines. It also holds the contents of registers and
memory locations given in PUSH instruction.
• Extra Segment Register (ES): Extra segment holds the
destination addresses of some data of certain string instructions.
• Each of these segments are addressed by an address stored in
corresponding segment register.
• These registers are 16-bit in size.
• Each register stores the base address (starting address) of the
corresponding segment.
• Because the segment registers cannot store 20 bits, they only
store the upper 16 bits.
• The number of address lines in 8086 is 20, 8086 BIU will send
20bit address, so as to access one of the 1MB memory
locations.
• The four segment registers actually contain the upper 16 bits
of the starting addresses of the four memory segments of 64
KB each with which the 8086 is working at that instant of
time.
• To access any memory location it needs the 20-bit address, so
we have to calculate the 20-bit physical address.
• Bellow is the one way of positioning four 64 kilobyte segments
within the 1M byte memory space of an 8086.
Types Of Segmentation –
• Overlapping Segment – A segment starts at a particular
address and its maximum size can go up to 64kilobytes. But if
another segment starts along this 64kilobytes location of the
first segment, then the two are said to be Overlapping Segment.

• Non-Overlapped Segment – A segment starts at a particular


address and its maximum size can go up to 64kilobytes. But if
another segment starts before this 64kilobytes location of the
first segment, then the two segments are said to be Non-

Overlapped Segment.
Advantages of the Segmentation The main advantages of
segmentation are as follows:
• It provides a powerful memory management mechanism.
• Data related or stack related operations can be performed in
different segments.
• Code related operation can be done in separate code segments.
• It allows to processes to easily share data.
• It allows to extend the address ability of the processor, i.e.
segmentation allows the use of 16 bit registers to give an
addressing capability of 1 Megabytes. Without segmentation,
it would require 20 bit registers.
• It is possible to enhance the memory size of code data or stack
segments beyond 64 KB by allotting more than one segment
for each area.
Rules of Segmentation: Segmentation process follows some
rules as follows:
• The starting address of a segment should be such that it can be
evenly divided by 16.
• Minimum size of a segment can be 16 bytes and the maximum
can be 64 kB.
• Each of these segments are addressed by an address stored in
corresponding segment register.
• These registers are 16-bit in size.
• Each register stores the base address (starting address) of the
corresponding segment.
• Because the segment registers cannot store 20 bits, they only
store the upper 16 bits.
How is a 20-bit address obtained if there are only 16- bit
registers?
• The 20-bit address of a byte is called its Physical Address.
• But, it is specified as a Logical Address.
• Logical address is in the form of: Base Address : Offset
• Offset is the displacement of the memory location from the
starting location of the segment.
• The value of Data Segment Register (DS) is 2222 H.
• To convert this 16-bit address into 20-bit, the BIU appends 0H
to the LSBs of the address.
• After appending, the starting address of the Data Segment
becomes 22220H.
• If the data at any location has a logical address specified as:
• 2222 H : 0016 H
• Then, the number 0016 H is the offset.

• 2222 H is the value of DS.


• To calculate the effective address of the memory, BIU uses the
following formula:
• Effective Address = Starting Address of Segment + Offset
• To find the starting address of the segment, BIU appends the
contents of Segment Register with 0H.
• Then, it adds offset to it.
• Therefore:
• EA = 22220 H
+ 0016 H
------------
22236 H
Max. Size of Segment
• All offsets are limited to 16-bits.
• It means that the maximum size possible for segment is 216 =
65,535 bytes (64 KB).
• The offset of the first location within the segment is 0000 H.

• The offset of the last location in the segment is FFFF H


The contents of the following registers are:
• CS = 1111 H
• DS = 3333 H
• SS = 2526 H
• IP = 1232 H
• SP = 1100 H
• DI = 0020 H
• Calculate the corresponding physical addresses for the address
bytes in CS, DS and SS.
1. CS = 1111 H
• The base address of the code segment is 11110 H.
• Effective address of memory is given by 11110H + 1232H =
12342H.
2. DS = 3333 H
• The base address of the data segment is 33330 H.
• Effective address of memory is given by 33330H + 0020H =
33350H.
3. SS = 2526 H
• The base address of the stack segment is 25260 H.
• Effective address of memory is given by 25260H + 1100H =
26350H.
The value of Code Segment (CS) Register is 4042H and the value of
different offsets is as follows:
BX: 2025H , IP: 0580H , DI: 4247H
Calculate the effective address of the memory location pointed by the CS
register.

Ans:
• The offset of the CS Register is the IP register.
• Therefore, the effective address of the memory location pointed by the
CS register is calculated as follows:

• Effective address= Base address of CS register X 10 H + Address of IP

= 4042H X 10H + 0580H = (40420 + 0580)H = 41000H


Calculate the effective address for the following register:
SS: 3864H, SP: 1735H, BP: 4826H
Ans:
• Both SP and BP are the offsets for Stack Register (SS). The address
calculated when BP is taken as the offset gives the starting address of
the stack. The address when SP is taken as the offset denotes the
memory location where the top of the stack lies.
• Therefore, the effective address for both these cases is:

• (SS X 10H) + SP = 3640H X 10H + 1735H = 36400H + 1735H =


38135H
• (SS X 10H) + BP = 3640H X 10H + 4826H = 36400H + 4826H =
41226H
The value of the DS register is 3032H. And the BX register
contains a 16 bit value which is equal to 3032H. 0008H is added
to BX. ADD BX, 0008H.The register AX contains some value
which needs to be stored at a location as follows: MOV [BX],AX
Calculate the address at which the value of the AX will be stored.
Ans:
• After executing the first instruction, the value of BX Register
is as follows: BX = 3040H
• The BX register is an offset of the Data Segment (DS) register.
So, the location at which the value of the AX register will be
stored is calculated as follows:
• (DS X 10H) + BX = 3032H X 10H +3040H = 30320H +
3040H = 33360H

Potrebbero piacerti anche