0% found this document useful (0 votes)
15 views

04 - Memory Organization 1

Uploaded by

dasalchin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

04 - Memory Organization 1

Uploaded by

dasalchin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 22

Memory Organization Concepts

CCS 3001: Computer Organization with Assembly


Programming
ORGANIZATION OF MEMORY
Storing Words in Memory
Big Endian
Little Endian

Address Value
1003 90
1002 AB
1001 12
1000 CD
ORGANIZATION OF MEMORY
Storing Words in Memory
Big Endian
Little Endian

Address Value
1003 90
1002 AB
1001 12
1000 CD
ORGANIZATION OF MEMORY
Storing Words in Memory
Big Endian
Little Endian

Address Value
1003 90
1002 AB
1001 12
1000 CD
What's a Register
A CPU contains very fast memory called registers. For
example, a MIPS ISA stores 32 32-bit registers.
Think of a register as a black box that contains an
array.
CPU Registers
CPU registers are very special memory locations
constructed from flips-flops. They are not part of main
memory; the CPU implements them on- chip. All
arithmetic and locations operations occur in the CPU
registers.
Registers contain 16 bits in size, and in hexadecimal
format
Registers default value is set to 0000H
CPU Register Types
General Purpose Registers
Segment Registers
Index Registers
Pointer Registers
General Purpose Registers
AX - the accumulator register
BX - the base address register
CX - the count register
DX - the data register

 The AX register (Accumulator) – is where the most arithmetic and logical


computations take place. Although most arithmetic and logical operations are
done in other register, it is often more efficient to use the AX.
 The BX registers (Base) – it is commonly used to hold indirect addresses.
(Character String Manipulation)
 The CX registers (Count) – as its name implies, counts things. Used to
count off the number of iterations in a loop or specify the number of
characters in a string.
 The DX register (Data) – has two special purposes: it holds the overflow
from certain arithmetic operations, and it holds l/O addresses when accessing
data.
Segment Registers
CS-code segment: points at the segment containing the
currently executing machine and instructions.
DS-Data Segment: generally points at global variables
for the program.
ES-Extra Segment: an extra segment register.
SS-Stack Segment: points at the segment containing
the 8086 stack. The stack is where the 8086 store’s
important machine state information, subroutine return
addresses, procedure parameters , and local variables
Index and Pointer Registers
The SI and DI register (Source Index and
Destination Index) these register are pointers (much
like the BX register) to indirectly access memory.
The BP register (Base Pointer) – similar to the BX
register. Generally used to access parameter and local
variables in a procedure.
The SP (Stack Pointer) – has a very special purpose – it
maintains the program stacks. The register is not for
arithmetic computations. The proper operations of most
programs defends upon the careful use if this register.
IP – Instruction Pointer: contains the address of the
currently executing instruction
Understanding Registers

 AL stands for “AX’s L.B.


 AH stands for “ AX’s H.B.”
 The name of the other 8 bit register mean the same thing with
respect to BX, CX and DX.
 AX, BX, CX, DX are 8 bit registers that is accessing its higher
and lower nibble is easy for it is divided into 4 bits it each.
Reading the Memory Map
Reading the Memory Map
Memory Map in Debug
MOST USED INSTRUCTION FOR
REGISTER HANDLING
Mnemonic Meaning Format Operation
MOV Move MOV D,S (D)←(S)
Addressing Modes
Address space is the maximum amount of memory that
a processor can address. Some processors use a multi-
level addressing scheme, with main memory divided into
segments or pages and some or all instructions mapping
into the current segment(s) or page(s).
Addressing Modes:
 REGISTER ADDRESSING
 REGISTER INDIRECT ADDRESSING
 IMMEDIATE ADDRESSING
 INDEX ADDRESSING
 BASE ADDRESING
 BASE INDEX ADDRESSING
REGISTER ADDRESSING
REGISTER INDIRECT ADDRESSING
IMMEDIATE ADDRESSING
INDEX ADDRESSING
BASE ADDRESING
BASE INDEX ADDRESSING

You might also like