lecture07

lecture07 - ECE252 Microprocessors Spring 2011 Lecture 07:...

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

View Full Document Right Arrow Icon
Jie Hu, ECE/NJIT, Spring 2011 ECE252 L07-Inst. Set.1 ECE252 Microprocessors Spring 2011 Lecture 07: Arithmetic Instructions Jie Hu http://web.njit.edu/~jhu/ece252/002
Background image of page 1

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

View Full DocumentRight Arrow Icon
Jie Hu, ECE/NJIT, Spring 2011 ECE252 L07-Inst. Set.2 Block Diagram of Macintosh 512K Motherboard Processor 68000 I/O Interface 6522 Real- time clock Serial I/O 8530 Floppy disk controller System ROM RAM buffers and Mux PAL decoders Dynamic RAM 512KB Sound logic Video logic Speaker Video display Control signals Modem Printer Mouse Keyboard System bus Disk drive
Background image of page 2
Jie Hu, ECE/NJIT, Spring 2011 ECE252 L07-Inst. Set.3 Review of Last Lecture Addressing Modes Absolute short Absolute long Program counter indirect with displacement Program counter indirect with index implied addressing Condition Codes X: the extend flag, N: the negative flag, Z: the zero flag, V: the overflow flag, C: the carry flag
Background image of page 3

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

View Full DocumentRight Arrow Icon
Jie Hu, ECE/NJIT, Spring 2011 ECE252 L07-Inst. Set.4 Today’s Lecture 68000 Instruction Set Data transfer Register exchange/swap: EXG, SWAP Memory address: LEA, MOVEA Move data: MOVE, MOVEQ Stack operation: PEA, LINK, UNLK, MOVEM Move peripheral data: MOVEP Arithmetic Addition, subtraction Extension, negate, clear Comparison Multiplication, division Test & set, test
Background image of page 4
Jie Hu, ECE/NJIT, Spring 2011 ECE252 L07-Inst. Set.5 Data Transfer Group EXG Exchange registers LEA Load effective address LINK Link and allocate MOVE Move data MOVEA Move address MOVEM Move multiple registers MOVEP Move peripheral data MOVEQ Move quick PEA Push effective address SWAP Swap register halves UNLK Unlink
Background image of page 5

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

View Full DocumentRight Arrow Icon
Jie Hu, ECE/NJIT, Spring 2011 ECE252 L07-Inst. Set.6 Data Transfer: EXG EXG: exchange registers. Operands must be either data registers or address registers Exchange is always 32-bit transfer No effect on condition codes Assembler syntax: EXG Dx/Ax, Dy/Ay Size={Long} Examples: Assume D3=$09, D5=$FF0090, A1=$8000, D2=$20A00 EXG D3, D5 ;D3=?, D5=? EXG A1, D2 ;A1=?, D2=?
Background image of page 6
Jie Hu, ECE/NJIT, Spring 2011 ECE252 L07-Inst. Set.7 Data Transfer: SWAP SWAP: swap register halves swap the upper and lower halves of a data register No effect on condition codes Assembler syntax: SWAP Dn Size = {Word} Examples if D5 = $3CFF9100 SWAP D5 ;New D5 = $91003CFF
Background image of page 7

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

View Full DocumentRight Arrow Icon
Jie Hu, ECE/NJIT, Spring 2011 ECE252 L07-Inst. Set.8 Data Transfer: LEA LEA: load effective address Loads a 24-bit address into an address register Provides a way to obtain the effective address (ea) used in an instruction No effect on condition codes Assembler syntax: LEA <ea>, An <ea> = (An) = d16An = d8(An,Xn) Size = {Long} Examples LEA $8500, A1 ;A1 = $8500 ;(NO sign extension)
Background image of page 8
Jie Hu, ECE/NJIT, Spring 2011 ECE252 L07-Inst. Set.9 Data Transfer: MOVEA MOVEA: move address The destination register is always an address register Source operand supports all addressing modes Word and longword sizes are supported
Background image of page 9

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

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

This note was uploaded on 03/29/2012 for the course ECE 252 taught by Professor Rosenstark during the Spring '99 term at NJIT.

Page1 / 33

lecture07 - ECE252 Microprocessors Spring 2011 Lecture 07:...

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