lecture07

lecture07 - ECE252 Microprocessors Fall 20008 Lecture 07:...

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

View Full Document Right Arrow Icon
Jie Hu, ECE/NJIT, Fall 2008 ECE252 L07-Inst. Set.1 ECE252 Microprocessors Fall 20008 Lecture 07: Condition Codes, Program Control Jie Hu http://web.njit.edu/~jhu/ece252
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, Fall 2008 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, Fall 2008 ECE252 L07-Inst. Set.3 Review of Last Lecture 68000 Addressing Modes: Absolute long PC with displacement PC with index Implied addressing 68000 Instruction Set: Data transfer Register exchange/swap: EXG, SWAP Memory address: LEA, MOVEA Move data: MOVE, MOVEQ Arithmetic addition, subtraction, multiplication, division
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, Fall 2008 ECE252 L07-Inst. Set.4 Today’s Lecture Condition Codes X: the extend flag, N: the negative flag, Z: the zero flag, V: the overflow flag, C: the carry flag 68000 Instruction Set Arithmetic Program Control
Background image of page 4
Jie Hu, ECE/NJIT, Fall 2008 ECE252 L07-Inst. Set.5 68000 Programming Model: Status Register T - S - - I 2 I 1 I 0 X N Z V C 0 4 8 9 10 13 15 System Byte User Byte (Condition Code Register) Trace bit Supervisor state Interrupt mask Extend Negative zero Overflow Carry Condition Codes
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, Fall 2008 ECE252 L07-Inst. Set.6 Condition Codes Whether to execute a conditional instruction or not depends on the condition flags it’s checking Most 68000 instructions affect the state of the five flags (X, N, Z, V, C) that form the condition code register (CCR) Condition code register X: the extend flag N: the negative flag Z: the zero flag V: the overflow flag C: the carry flag
Background image of page 6
Jie Hu, ECE/NJIT, Fall 2008 ECE252 L07-Inst. Set.7 Condition Codes N: The negative flag. N flag is set (to 1) if the MSB of the result is set (1), and cleared otherwise. The actual MSB used depends on the size of the
Background image of page 7

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

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

Page1 / 21

lecture07 - ECE252 Microprocessors Fall 20008 Lecture 07:...

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

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