ChapterM3

ChapterM3 - 9/10/2009 ELEC 2220 Computer Systems Chapter 3....

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

View Full Document Right Arrow Icon
9/10/2009 1 ELEC 2220 Computer Systems Chapter 3 Instruction Se Chapter 3. Instruction Set ELEC2220 Auburn University Soo-Young Lee Department of Electrical and Computer Engineering Auburn University 3. Instruction Set: Chapter Objectives • How a computer operation is specified Æ Instruction • Instruction Format Data Transfer Instructions • Arithmetic Instructions • Logic and Shift/Rotate Instructions • Branch Instructions ELEC2220 Auburn University Condition code bits Flags
Background image of page 1

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

View Full DocumentRight Arrow Icon
9/10/2009 2 3-1. M68HC12 Architecture – All memory and I/O are mapped in a common 64 Kbytes address space. The same set of instructions can be used to access memory, I/O ports, and control registers. – 8-bit and 16-bit operands – Most instructions involve a register (including accumulator). Load, Store, … – An instruction is 1 ~ 6 bytes long. – An instruction may involve 0~2 operands. – Instruction Format ELEC2220 Auburn University Prebyte Opcode •P o s t b y t e Immediate operand, addresses (offset, effective address) Prebyte Opcode Postbyte Immed., Addr. 0~4 bytes 3-1. M68HC12 Architecture – Examples (Instruction Format) ldaa 7,y movb $800,$801 Prebyte Opcode Postbyte Immed., Addr. A6 47 18 0C 08 00 08 01 ELEC2220
Background image of page 2
9/10/2009 3 3-2. Data Transfer Instructions 3-2-1. Load (LD r ) – Copy memory content into a register r . • Source: any addressing mode except for inherent • Destination: register (A,B,D,SP,X,Y) – N, Z and V are updated (0 Æ V). – Load Effective Address (LEA r ) • Load X, Y or SP with an effective address. • Source: indexed addressing only • No flag updated ELEC2220 Auburn University • Used to change EA in X, Y or SP 3-2. Data Transfer Instructions • Load (LD r ) , Load Effective Address (LEA r ) ELEC2220 Auburn University
Background image of page 3

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

View Full DocumentRight Arrow Icon
9/10/2009 4 3-2. Data Transfer Instructions 3-2-2. Store (ST r ) – Copy the content of a register r to memory. • Source: register (A,B,D,SP, X, Y) • Destination: any addressing mode except for immediate and inherent – N, Z and V are updated (0 Æ V) ELEC2220 Auburn University 3-2. Data Transfer Instructions 3-2-3. Transfer (TFR r,R ) and Exchange (EXG r,R ) – TFR: transfer the content of a register r to another register R – EXG: swap the contents of two registers r R EXG: swap the contents of two registers, & – A register can be CCR. – Flags are not updated except when CCR is involved. – You may use the following formats: • TAB, TBA: N, Z and V are updated (0 Æ V) • TSX, TSY, TXS, TYS, XGDX, XGDY (M68HC11), no flag updated ELEC2220 Auburn University – Sign Extension (SEX r,R ) • Do sign-extension on r into R r : A, B, CCR R : D , X, Y, SP
Background image of page 4
9/10/2009 5 3-2. Data Transfer Instructions
Background image of page 5

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

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

Page1 / 19

ChapterM3 - 9/10/2009 ELEC 2220 Computer Systems Chapter 3....

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

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