Lec10_InstructionSet_MemAddress_11

Lec10_InstructionSet_MemAddress_11 - Lecture 10 Instruction...

Info iconThis preview shows pages 1–9. Sign up to view the full content.

View Full Document Right Arrow Icon
CC2202 - 2009/10 1 Lecture 10 Instruction Sets and Addressing Modes
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
CC2202 - 2009/10 2 Learning Objective Instruction set Instruction Format Instruction Types Assemble Language Addressing Modes
Background image of page 2
CC2202 - 2009/10 3 What is an instruction set? The complete collection of instructions that are understood by a CPU Representation Machine Codes (Binary only 0 and 1) Usually represented by assembly codes Elements of an Instruction Operation code (Op code) Do this Source Operand reference To this Result Operand reference Put the answer here Next Instruction Reference When you have done that, do this. ..
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
CC2202 - 2009/10 4 Instruction Cycle State Diagram Remember this State Diagram?
Background image of page 4
CC2202 - 2009/10 5 Instruction Representation In machine code each instruction has a unique bit pattern For human consumption (well, programmers anyway) a symbolic representation is used e.g. ADD, SUB, LOAD Operands can also be represented in this way ADD A,B Problem :How many operands/addresses should be contained in ONE instruction? Simple Instruction Format
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
CC2202 - 2009/10 6 Number of Addresses 3 addresses Operand 1, Operand 2, Result a = b + c; May be a forth - next instruction (usually implicit) Not common Needs very long words to hold everything 2 addresses One address doubles as operand and result a = a + b Reduces length of instruction Requires some extra work Temporary storage to hold some results
Background image of page 6
CC2202 - 2009/10 7 Different Address Format
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
8 Number of Addresses (cont’d) 1 address Implicit second address Usually a register (accumulator) Common on early machines 0 (zero) addresses All addresses implicit Uses a stack e.g. c = a + b
Background image of page 8
Image of page 9
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 08/18/2011 for the course COMP 3868 taught by Professor Keithchan during the Summer '97 term at Hong Kong Polytechnic University.

Page1 / 28

Lec10_InstructionSet_MemAddress_11 - Lecture 10 Instruction...

This preview shows document pages 1 - 9. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online