Lecture 14 - Lecture 14 – 10/1/10 • Announcements –...

Info iconThis preview shows pages 1–3. 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
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Lecture 14 – 10/1/10 • Announcements – Come see me if you are not doing well in the class! • Last Week (P&P 4-5) – Von-Neumann Model – LC-3 Computational & Memory Instructions • This Week (P&P 5, 9.1-2) – Test #1 – LC-3 Control Instructions – TRAP and JSR instructions (covered in P&P 9.1-9.2) • Next Week – LC-3 Program Execution CS310 Fall 2010 - Boral Control Instructions • Alter the sequence of instructions – By changing the PC • Three flavors in LC-3 – Conditional branches • May be taken • PC-relative addressing – Unconditional jumps • Always taken – TRAPs • Calls to the OS for service • Upon completion of service control is returned to the instruction that immediately follows the TRAP CS310 Fall 2010 - Boral Condition Codes • N, Z, P registers – 1-bit wide – Exactly one is set to “1” the other to “0” as a side effect by any instruction that writes a value to a register • ADD, AND, NOT, LD, LDR, LDI, LEA • Used by conditional branch instruction to determine whether the branch should be taken • Other ways to do conditional branches possible – Direct instructions CS310 Fall 2010 - Boral Branch Instruction • Several variants – Specifies condition code (n, z, p) – Branch taken if corresponding Condition Code Register is on – BRp, BRn, BRz, BRnz, BRnp, BRzp, BRnzp, BR – Opcode is the same in all cases (0000) • PC-relative addressing used to compute target address...
View Full Document

This note was uploaded on 11/30/2010 for the course CS 310 taught by Professor Fussell during the Spring '08 term at University of Texas.

Page1 / 8

Lecture 14 - Lecture 14 – 10/1/10 • Announcements –...

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