EE357Unit4b_ColdfireISA_Notes

EE357Unit4b_ColdfireISA_Notes - EE 357 Unit 4b EE 357 Unit...

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

View Full Document Right Arrow Icon
E 357 Unit 4b EE 357 Unit 4b CF Assembly Basics © Mark Redekopp, All rights reserved PERATIONS AND OPERATIONS AND INSTRUCTIONS © Mark Redekopp, All rights reserved oldfire Instruction Classes Coldfire Instruction Classes • Data Transfer – Move data between processor & memory – Move data between registers w/in processor an specify B W L size – Can specify .B, .W, .L size •A L U – Performs arithmetic and logic operations – Only .L size => Ops. must be on a full 32-bit longword contents • Control / Program Flow nconditional/Conditional Branch – Unconditional/Conditional Branch – Subroutine Calls • Privileged / System Instructions © Mark Redekopp, All rights reserved – Instructions that can only be used by OS or other “supervisor” software (e.g. STOP, certain HW access instructions, etc.) perand Locations Operand Locations • In almost all instruction sets, , operands can be… – A register value (e.g. D0) value in a memory location Mem. Proc. – A value in a memory location (e.g. value at address 0xC8) – A constant stored in the struction itself (known as an Inst. A D ... Inst. 00 Data 01 C8 Reg. LU Reg. instruction itself (known as an ‘immediate’ value) [e.g. ADDI #1,D0] h i t ti t Data ALU C9 ... Thus, our instructions must be able to specify which of these three locations is © Mark Redekopp, All rights reserved where the operand is located
Background image of page 1

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

View Full DocumentRight Arrow Icon
ata Transfer Instruction Data Transfer Instruction • MOVE.s src,dst – .s = __________________________ – Copies src operand to dst operand SRC operand specifies data in a: pp • Reg. (e.g. D0 or A4) • Mem. = Specified with the address of desired source location • Immediate = Constant (preceded w/ ‘#’ sign in assembly instruc.) – DST operand specifies a location to put the source data & can be a: • Reg. • Mem. = Specified with the address of desired destination location • Examples – MOVE.B D0,0x1C ; 0x = hex modifier • Moves the byte from reg. D0 to __________________________________ © Mark Redekopp, All rights reserved – MOVE.W #0x1C,D0 ; # = Immediate (no # = address/mem. oprnd.) • Moves the _______________________________ egisters & Data Size Registers & Data Size ost CF 1 Most CF instructions specify what size of data to 31 0 Byte operations only access bits 7-0 of Byte 7 Dx: operate on – MOVE.B a register (upper bits are left alone) 31 0 Word 15 Ax/Dx: – MOVE.W – MOVE.L i t i Word operations only access bits 15-0 of a register (upper bits are left alone) • Register sizes are _____________ 31 0 Longword Ax/Dx: © Mark Redekopp, All rights reserved _____________ Longword operations use the entire 32-bit value xamples Examples itial Conditions: 1 2 3 4 5 6 7 8 0: Initial Conditions: D0: A A A A B B B B D1: 1: • MOVE.B D0,D1 D1: D1: • MOVE.W #0xFEDC,D1 D1: • MOVE.L D0,D1 © Mark Redekopp, All rights reserved emory & Data Size Memory & Data Size Recall… Address Memory operands are addressed by their starting address and size – Whereas registers operands always 7C F8 0x000 Word @ Addr. 0 13 5A start with LSB and get appropriate size data, memory operands get the appropriate sized data from starting address and continuing towards larger ord in D0 31 0 Word 15 Dx: addresses
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 17

EE357Unit4b_ColdfireISA_Notes - EE 357 Unit 4b EE 357 Unit...

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

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