2 - BME 303 Lecture 13 Continue: LC-3 Instructions Exam...

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

View Full Document Right Arrow Icon
1 BME 303 Lecture 13 • Continue: LC-3 Instructions • Exam definitely graded by Thursday • Haven’t had a chance to address grading issues for HW #2 & #3
Background image of page 1

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

View Full DocumentRight Arrow Icon
2 Homework Sets = Lab Assignments • One lab assignment (in-class plus take- home parts) = one homework grade • Half done (and graded) during lab • Half due (and graded) during following lab – Missing a lab without prior arrangements will be equivalent to not turning in one homework! (remaining half from previous week plus half of this week) • Attend your own lab unless you have made prior arrangements
Background image of page 2
LC-3 Data Path Examine instructions in terms of how they propagate information through the data path.
Background image of page 3

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

View Full DocumentRight Arrow Icon
5 NOT (Register) Note: Src and Dst could be the same register.
Background image of page 4
6 ADD/AND (Register) Note:Any of Src1, Src2, and Dst could be the same .
Background image of page 5

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

View Full DocumentRight Arrow Icon
7 ADD/AND (Immediate) Note: Immediate field is sign-extended . Note: Src1 and Dst could be the same register.
Background image of page 6
8 Instructions • Operate – Manipulate data directly: ADD, AND, NOT • Data Movement (“load” and “store”) – Move data between memory and registers: LD, LDI, LDR, LEA, ST, STI, STR • Control (jump, branch, return, …) – Change the sequence of instruction execution: BR, JMP/RET, JSR/JSRR, RTI, TRAP
Background image of page 7

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

View Full DocumentRight Arrow Icon
9 Data Movement Instructions • Load effective address (LEA) – compute address, save in register (immediate mode) • Load (LD*)– read data from memory to register • Store (ST*) – write data from register to memory Operand Specifier (addressing mode) DR or SR Opcode 1 1 1 0 0 1 0 1 1 0 1 0 0 1 1 1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Operand(s) Opcode
Background image of page 8
10 Immediate, Direct, and Indirect Addressing Modes (or Why Bother?) • Task: load value from memory location 0x4108 to register R5 LOAD R5 Memory at 0x4108 • How: We want to specify address directly – instruction: 16-bit – address: 16-bit – opcode: 4-bit, SR or DR: 3-bit • Puzzle: Only 9 bits are available, what to do about 7 missing bits?
Background image of page 9

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

View Full DocumentRight Arrow Icon
11 LD: Direct Addressing Mode • Direct mode addressing • Computes PC-relative address , and loads the contents of the memory at that address into a register . • DR = mem[PC +1 + SEXT(PCoffset9)] • Note: It is the contents of the memory that is stored in the register, not the address . PCoffset9 DR LD 1 0 1 1 1 1 1 1 0 1 0 1 0 1 0 0 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Operand(s) Opcode
Background image of page 10
12 LD: Direct Addressing Mode • Example (instruction 0010 101 011111101 at address 0x4000): (1a) PC = 0x4000, PC+1 = 0x4001 (1b) PCoffset9 = IR<8:0> = 0 1111 1101 sign extension (SEXT) of IR<8:0>: SEXT(PCoffeset9) = 0x00FD (2) PC+1 + SEXT(PCoffset9) = 0x40FE MAR (3) MDR=mem[MAR] (4) DR = R5 ± MDR = mem[PC+1 + SEXT(PCoffset9)] = mem[0x40FE]
Background image of page 11

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

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

This note was uploaded on 09/06/2009 for the course BME 303 taught by Professor Ren during the Spring '08 term at University of Texas at Austin.

Page1 / 37

2 - BME 303 Lecture 13 Continue: LC-3 Instructions Exam...

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

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