BME303_lecture9 - BME303 Intro. to Computing LC-3:...

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

View Full Document Right Arrow Icon
BME303 Intro. to Computing 1 LC-3: Instruction Set Opcodes (total of 15) 1. Operate instructions: ADD, AND, NOT 2. Data movement instructions: LD, LDI, LDR, LEA, ST, STR, STI 3. Control instructions: BR, JSR/JSRR, JMP, RTI, TRAP Opcode Operand(s) 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 0 0 0 1 1 1 0 0 1 0 0 0 0 1 1 0
Background image of page 1

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

View Full DocumentRight Arrow Icon
BME303 Intro. to Computing 2 What is Data Movement? R0 1101 1111 1101 1111 R1 0001 0001 0000 0000 R2 0000 0000 0000 0000 R3 0000 0000 0000 0000 R4 1101 1111 0001 1101 R5 0000 0000 0000 0000 R6 1101 0010 0000 1110 R7 1111 1111 1111 1111 x0000 0000 0000 0000 0000 x0001 1101 1111 0001 1101 x0002 1111 1111 1111 1111 x0003 0010 0010 1101 0000 x0004 1101 1111 1101 1111 x0005 0001 0001 0000 0000 x0006 1000 1111 1101 1111 Registers Memory xFFF9 0000 0000 0000 0000 xFFFA 1101 1111 0001 1101 xFFFB 1111 1111 1111 1111 xFFFC 0010 0010 1101 0000 xFFFD 1011 0101 1101 0101 xFFFE 0000 0000 0000 0000 xFFFF 1000 1111 1101 1111 Input/Output (Ch9)
Background image of page 2
BME303 Intro. to Computing 3 Why move data? R0 1101 1111 1101 1111 R1 0001 0001 0000 0000 R2 0000 0000 0000 0000 R3 0000 0000 0000 0000 R4 1101 1111 0001 1101 R5 0000 0000 0000 0000 R6 1101 0010 0000 1110 R7 1011 1110 1111 1011 x0000 0000 0000 0000 0000 x0001 1101 1111 0001 1101 x0002 1111 1111 1111 1111 x0003 0010 0010 1101 0000 x0004 1101 1111 1101 1111 x0005 0001 0001 0000 0000 x0006 1000 1111 1101 1111 Registers Memory xFFF9 0000 0000 0000 0000 xFFFA 1101 1111 0001 1101 xFFFB 1111 1111 1111 1111 xFFFC 0010 0010 1101 0000 xFFFD 1011 0101 1101 0101 xFFFE 0000 0000 0000 0000 xFFFF 1000 1111 1101 1111 The ADD instruction C = A + B A B 0 0 0 1 111 000 0 00 100 R7 R0 R4
Background image of page 3

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

View Full DocumentRight Arrow Icon
BME303 Intro. to Computing 4 How do we move data? R0 1101 1111 1101 1111 R1 0001 0001 0000 0000 R2 0000 0000 0000 0000 R3 0000 0000 0000 0000 R4 1101 1111 0001 1101 R5 0000 0000 0000 0000 R6 1101 0010 0000 1110 R7 1111 1111 1111 1111 x0000 0000 0000 0000 0000 x0001 1101 1111 0001 1101 x0002 1111 1111 1111 1111 x0003 0010 0010 1101 0000 x0004 1101 1111 1101 1111 x0005 0001 0001 0000 0000 x0006 1000 1111 1101 1111 Registers Memory A Opcode Operand(s) 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 opcode DR or SR Address bits Dilemma: How to express a 16-bit address with only 9 bits?
Background image of page 4
BME303 Intro. to Computing 5 Addressing Modes 4 addressing modes for data movement: 1. Direct 2. Indirect 3. Base+Offset 4. Immediate In memory (explicitly in the instruction itself)
Background image of page 5

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

View Full DocumentRight Arrow Icon
BME303 Intro. to Computing 6 Data Movement Instructions Load – read data from memory to register LD: direct mode LDI: indirect mode LDR: base+offset mode Store -- write data from register to memory ST: direct mode STI: indirect mode STR: base+offset mode Load effective address -- compute address, save in register LEA: immediate mode does not access memory In memory
Background image of page 6
BME303 Intro. to Computing 7 Memory Addressing Modes PC+1 IR IR[8:0] + address Memory Direct data
Background image of page 7

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

View Full DocumentRight Arrow Icon
BME303 Intro. to Computing 8 Direct (PC-Relative): LD
Background image of page 8
BME303 Intro. to Computing 9 Direct (PC-Relative): ST
Background image of page 9

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

View Full DocumentRight Arrow Icon
BME303 Intro. to Computing
Background image of page 10
Image of page 11
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/24/2010 for the course BME 303 taught by Professor Ren during the Fall '08 term at University of Texas at Austin.

Page1 / 47

BME303_lecture9 - BME303 Intro. to Computing LC-3:...

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

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