You are on page 1of 13

Instruction Set Architecture

BY: Dr. Ahmed Elmogy

Memory Structure

Dimensions
n-bit words k-bit address

Operations
Read, Load Write, Store
2

Instruction Sequencing

A computer must have instructions capable of performing four types of operations:


Data transfers between the memory and registers Arithmetic and logic operations on data Program sequencing and control I/O transfers

Register Transfer Notation Versus Assembly-Language Notation

R2 [LOC]

Load R2, LOC

[ ] means content of means transfer

R4 [R2]+[R3]

Add R4, R2, R3

Instruction Execution

C [A] + [B]

Branching

Adding n numbers without Looping

Adding n numbers using Looping

Addressing Modes

The different ways for specifying the locations of instruction operands

Generic Addressing Modes

Addressing Modes (Cont.)

Immediate modeThe operand is given explicitly in the instruction

Add R4, R6, #200


Adds the value 200 to the contents of register R6, and places the result into register R4

Addressing Modes (Cont.)

Register modeThe operand is the contents of a processor register Add R4, R2, R3 Registers R2 and R3 hold the two source operands, while R4 is the destination

10

Addressing Modes (Cont.)

The Absolute mode can represent global variables in a program Integer NUM1, NUM2, SUM
allocates a memory location to each of the variables NUM1, NUM2, and SUM

Or
Load R2, NUM1

loads the value in the memory location NUM1 into register R2

11

Addressing Modes (Cont.)

Register indirect mode The effective address of the operand is the contents of a register that is specied in the instruction

12

Indirect Addressing Example

13

You might also like