Chapter4 Address - ELEC 2220 – Computer Systems Chapter 4...

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ELEC 2220 – Computer Systems Chapter 4 Operand Addressing Modes ELEC 2220 Computer Systems Operand addressing modes Ways to specify operands for an instruction: Inherent : operand location is implied by the instruction mnemonic Immediate : operand immediately follows instruction code in memory Memory : operand must be read from or written to a designated memory address Direct – specify the memory address directly Indirect – specify a way to determine the address ELEC 2220 Computer Systems Inherent (Register) Addressing No “operands” listed with the instruction No memory is accessed Operand is in a default register. clra ; 0 a aba ; a + b a decb ; b - 1 b inx ; x + 1 x EXAMPLE 2-9 0000 1806 1 aba ; A + B -> A 0002 08 2 inx ; X+1 -> X 0003 B781 3 exg a,b ; A <-> B Source: Cady/Sibrigoth “Software and Hardware Engineering ELEC 2220 Computer Systems Immediate addressing. Figure 4-4 Data immediately follows op-code in memory. Op-code Data If 16-bit data, then the op-code is followed by first the high byte, and then the low byte of the data. “big endian” format N N+1 Address: ELEC 2220 Computer Systems Example 4-2 Immediate Addressing 0000 8640 1 ldaa #64 ; Decimal 64 -> A 0002 8664 2 ldaa #$64 ; Hexadecimal 64 -> A 0004 CE1234 3 ldx #$1234 ; Hexadecimal 1234 -> X Program addresses Instruction codes “Source” assembly language statements. Created by the assembler Note: CASM12 designates decimal by ! (example: !64) Code Warrior and most other assemblers assume decimal by default (no special designator). Source: Cady/Sibrigoth “Software and Hardware Engineering ELEC 2220 Computer Systems Immediate addressing with labels Value1 equ $34 org $0800 Bob: dc.1 $56 ……… ldaa #Value1 ; $34 a ldx #Bob ; $0800 x ldaa Bob ; $56 a (Extended) ldaa 0,x ; $56 a (Indexed) Label “Bob” is a symbolic reference to address $0800. After “ldx”, register IX also contains address $0800. ELEC 2220 Computer Systems Direct/Extended Addressing The instruction “directly” specifies the address of the operand The address of the operand follows the op-code in memory “Extended” => full 16-bit address “Direct” => address range $0000-$00FF. Instruction includes only low byte of address Examples ldaa $1000 ;extended ldaa $45 ;direct ELEC 2220 Computer Systems Extended memory addressing. Figure 4-5 Op-code Data address H Data address L N N+1 N+2 Data Operand address follows op-code in memory (big-endian format) Address “points” to location of operand ELEC 2220 Computer Systems Direct memory addressing....
View Full Document

This note was uploaded on 09/23/2011 for the course ELEC 2220 taught by Professor Staff during the Summer '08 term at Auburn University.

Page1 / 30

Chapter4 Address - ELEC 2220 – Computer Systems Chapter 4...

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

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