Theory Assambl
Theory Assambl
ASSEMBLY LEVEL
HIGH-LEVEL LANGUAGE
LANGUAGE
Addressing Modes
Last Updated : 14 Feb, 2023
Example: MOV AL, 35H (move the data 35H into AL register)
Register mode: In register addressing the operand is placed in one of
8 bit or 16 bit general purpose registers. The data is in the register
that is specified by the instruction.
Here one register reference is required to access the data.
The 8086 CPUs let you access memory indirectly through a register
using the register indirect addressing modes.
MOV AX, [BX](move the contents of memory location s
addressed by the register BX to the register AX)
Von-Neumann computer architecture:
Von-Neumann computer architecture design was proposed in 1945.It
was later known as Von-Neumann architecture.
Historically there have been 2 types of Computers:
1. Fixed Program Computers – Their function is very specific and they
couldn’t be reprogrammed, e.g. Calculators.
2. Stored Program Computers – These can be programmed to carry
out many different tasks, applications are stored on them, hence the
name.
Modern computers are based on a stored-program concept introduced
by John Von Neumann. In this stored-program concept, programs and
data are stored in the same memory. This novel idea meant that a
computer built with this architecture would be much easier to
reprogram.
The basic structure is like this,
It is also known as ISA (Instruction set architecture) computer and is
having three basic units:
6. Accumulator (ACC):
Holds the intermediate results of computations.
Used for arithmetic and logical operations.
In one bus organization, a single bus is used for multiple purposes. A set
of general-purpose registers, program counters, instruction registers,
memory address registers (MAR), memory data registers (MDR) are
connected with the single bus. Memory read/write can be done with
MAR and MDR. The program counterpoints to the memory location from
where the next instruction is to be fetched. Instruction register is that
very register will hold the copy of the current instruction. In the case of
one bus organization, at a time only one operand can be read from the
bus.
As a result, if the requirement is to read two operands for the operation
then the read operation needs to be carried twice. So that’s why it is
making the process a little longer. One of the advantages of one bus
organization is that it is one of the simplest and also this is very cheap to
implement. At the same time a disadvantage lies that it has only one bus
and this “one bus” is accessed by all general-purpose registers, program
counter, instruction register, MAR, MDR making each and every
operation sequential. No one recommends this architecture nowadays.
Two Bus Organization
To overcome the disadvantage of one bus organization another
architecture was developed known as two bus organization. In two bus
organizations, there are two buses. The general-purpose register can
read/write from both the buses. In this case, two operands can be
fetched at the same time because of the two buses. One bus fetch
operand for ALU and another bus fetch for register. The situation arises
when both buses are busy fetching operands, the output can be stored
in a temporary register and when the buses are free, the particular
output can be dumped on the buses.
There are two versions of two bus organizations, i.e., in-bus and out-bus.
From in-bus, the general-purpose register can read data and to the out
bus, the general-purpose registers can write data. Here buses get
dedicated.
Three Bus Organization
In three bus organizations we have three buses, OUT bus1, OUT bus2,
and an IN bus. From the out buses, we can get the operand which can
come from the general-purpose register and evaluated in ALU and the
output is dropped on In Bus so it can be sent to respective registers. This
implementation is a bit complex but faster in nature because in parallel
two operands can flow into ALU and out of ALU. It was developed to
overcome the busy waiting problem of two bus organizations. In this
structure after execution, the output can be dropped on the bus without
waiting because of the presence of an extra bus. The structure is given
below in the figure.
The main advantages of multiple bus organizations over the single bus
are as given below.
1. Increase in size of the registers.
2. Reduction in the number of cycles for execution.
3. Increases the speed of execution or we can say faster execution.
1. Registers
Registers are small, high-speed memory units located in the CPU. They
are used to store the most frequently used data and instructions.
Registers have the fastest access time and the smallest storage capacity,
typically ranging from 16 to 64 bits.
2. Cache Memory
Cache memory is a small, fast memory unit located close to the CPU. It
stores frequently used data and instructions that have been recently
accessed from the main memory. Cache memory is designed to minimize
the time it takes to access data by providing the CPU with quick access
to frequently used data.
3. Main Memory
Main memory, also known as RAM (Random Access Memory), is the
primary memory of a computer system. It has a larger storage capacity
than cache memory, but it is slower. Main memory is used to store data
and instructions that are currently in use by the CPU.
Types of Main Memory
Static RAM: Static RAM stores the binary information in flip flops and
information remains valid until power is supplied. It has a faster access
time and is used in implementing cache memory.
Dynamic RAM: It stores the binary information as a charge on the
capacitor. It requires refreshing circuitry to maintain the charge on the
capacitors after a few milliseconds. It contains more memory cells per
unit area as compared to SRAM.
4. Secondary Storage
Secondary storage, such as hard disk drives (HDD) and solid-state drives
(SSD), is a non-volatile memory unit that has a larger storage capacity
than main memory. It is used to store data and instructions that are not
currently in use by the CPU. Secondary storage has the slowest access
time and is typically the least expensive type of memory in the memory
hierarchy.
5. Magnetic Disk
Magnetic Disks are simply circular plates that are fabricated with either a
metal or a plastic or a magnetized material. The Magnetic disks work at a
high speed inside the computer and these are frequently used.
6. Magnetic Tape
Cache Memory
Last Updated : 05 Jun, 2024
S1 I1 I2
S2 I1 I2
S3 I1 I2
S4 I1 I2
Stage / Cycle 1 2 3 4 5 6 7 8
S1 I1 I2
S2 I1 I2
S3 I1 I2
S4 I1 I2