ASSIGNMENT 4
MICRO-
PROCESSOR
BSCPE-3A
AERON L. ALMOSARA
WHAT IS ADDRESSING
MODES?
In computer science, addressing modes refer to the
different ways in which a processor can access
memory to read or write data. A memory address
is a unique identifier that specifies the location of
a specific byte or group of bytes in the memory of
a computer system. Addressing modes determine
how the processor interprets the address that is
used to access memory.
An addressing mode can be thought of as a set of
rules or instructions that specify how to calculate or
interpret the memory address for a given
instruction. Each addressing mode has its own set
of rules and constraints, which determine how
operands are specified and how memory is
accessed.
The choice of addressing mode for a particular
instruction can have a significant impact on the
performance of a computer program.
WHAT IS ADDRESSING
MODES?
Different addressing modes have different
advantages and disadvantages, and some are
better suited for certain types of operations than
others.
Common addressing modes include immediate,
register, direct, indirect, indexed, relative, and stack
addressing. Immediate addressing involves
specifying a constant or literal value directly in the
instruction itself. Register addressing involves
accessing a value stored in a processor register.
Direct addressing involves accessing a memory
location directly using its address. Indirect
addressing involves accessing a memory location
using an address stored in another memory
location. Indexed addressing involves accessing a
memory location by adding a constant or register
value to a base address.
WHAT IS ADDRESSING
MODES?
Relative addressing involves accessing a memory
location using an address that is calculated
relative to the current instruction. Stack addressing
involves accessing values that are pushed onto or
popped off the top of the processor stack.
Overall, addressing modes are a fundamental
concept in computer architecture and play a
critical role in determining how a processor
accesses memory to execute instructions.
WHAT ARE THE SEVEN
TYPES OF ADDRESSING
MODES?
In computer science, addressing modes refer to the
different ways in which a processor can access
memory to read or write data. There are seven
common types of addressing modes:
Immediate addressing: In this mode, the
operand is a constant or literal value that is
included in the instruction itself. For example,
"MOV AX, #10" moves the immediate value of
10 into the AX register.
Register addressing: In this mode, the operand
is a value stored in a processor register. For
example, "MOV AX, BX" moves the value
stored in the BX register into the AX register.
Direct addressing: In this mode, the operand is
the address of the memory location that
contains the value to be accessed. For example,
"MOV AX, [1234H]" moves the value stored at
memory address 1234H into the AX register.
WHAT ARE THE SEVEN
TYPES OF ADDRESSING
MODES?
Indirect addressing: In this mode, the operand
is a memory address that contains the address
of the memory location that contains the value
to be accessed. For example, "MOV AX, [BX]"
moves the value stored at the memory address
contained in the BX register into the AX
register.
Indexed addressing: In this mode, the operand
is a memory address that is calculated by
adding a constant or a value stored in a
register to a base address. For example, "MOV
AX, [BX+SI]" moves the value stored at the
memory address contained in the sum of the
BX and SI registers into the AX register.
Relative addressing: In this mode, the operand
is a memory address that is calculated by
adding a constant or a value stored in a
register to the address of the instruction itself.
WHAT ARE THE SEVEN
TYPES OF ADDRESSING
MODES?
For example, "JMP 10" jumps to the instruction
located at an address that is 10 bytes away
from the current instruction.
Stack addressing: In this mode, the operand is
a value that is pushed onto or popped off the
top of the processor stack. For example, "PUSH
AX" pushes the value stored in the AX register
onto the top of the stack, while "POP BX" pops
the top value off the stack and stores it in the
BX register.