cp-1_lect_11 - changing the contents of any register, how...

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

View Full Document Right Arrow Icon
5/10/10
Background image of page 1

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

View Full DocumentRight Arrow Icon
5/10/10
Background image of page 2
5/10/10
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/10/10
Background image of page 4
5/10/10
Background image of page 5

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

View Full DocumentRight Arrow Icon
5/10/10
Background image of page 6
5/10/10
Background image of page 7

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

View Full DocumentRight Arrow Icon
5/10/10
Background image of page 8
5/10/10
Background image of page 9

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

View Full DocumentRight Arrow Icon
5/10/10
Background image of page 10
5/10/10
Background image of page 11

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

View Full DocumentRight Arrow Icon
5/10/10
Background image of page 12
5/10/10
Background image of page 13

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

View Full DocumentRight Arrow Icon
5/10/10
Background image of page 14
5/10/10
Background image of page 15

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

View Full DocumentRight Arrow Icon
5/10/10
Background image of page 16
5/10/10 Operate Instructions NOT Unary Operation Register Addressing mode Data Path Que: Can you take both Src and Dst as the same
Background image of page 17

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

View Full DocumentRight Arrow Icon
5/10/10 Register Addressing mode Operate Instructions Continued Binary Operation
Background image of page 18
5/10/10 Immediate Addressing mode 0 4 Operate Instructions Continued Exam ple1: ADD R1, R2, # -3 Let, R2 5 Sign Extensio n Literal
Background image of page 19

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

View Full DocumentRight Arrow Icon
5/10/10 Exercise 5.13 How might one use a single LC-3 instruction to move the value in R2 into R3? The LC-3 has no subtract instruction. How could one perform the following operation using only three LC-3 instructions? Using only one LC-3 instruction and without
Background image of page 20
Background image of page 21
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: changing the contents of any register, how might one set the condition codes based on the value that resides in R1? Is there a sequence of LC-3 instructions that will cause the condition codes at the end of the sequence to be N=1, Z=1, and P=0? Write an LC-3 instruction that clears the ADD R3, R2, #0 NOT R3, R3 ADD R3, R3, #1 ADD R1, R2, R3 ADD R1, R1, #0 AND R1, R1, # -1 NO AND R2, R2, 5/10/10 Data Movement Instructions Seven Instructions LD, LDR, LDI, LEA, ST, STR, STI The format is as below: 8 9 1 1 1 1 1 5 1 2 Opcode DR or SR Address Generation bits o Addressing Modes (PC-Relative, Indirect, Base+Offset, and Immediate)...
View Full Document

This note was uploaded on 05/07/2010 for the course CS&IS TA C162 taught by Professor Kavitha during the Spring '09 term at Birla Institute of Technology & Science.

Page1 / 21

cp-1_lect_11 - changing the contents of any register, how...

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

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