Presentation is loading. Please wait.

Presentation is loading. Please wait.

Computer Science 210 Computer Organization

Similar presentations


Presentation on theme: "Computer Science 210 Computer Organization"— Presentation transcript:

1 Computer Science 210 Computer Organization
Machine Language Instructions: Computation

2 Types of Instructions Operate (computation): NOT, AND, ADD
Data movement: LD, LDR, LDI, LEA, ST, STR, STI Control: BR, JMP, JSR, JSRR, RET, RTI, TRAP

3 Bitwise NOT RDst  NOT RSrc R3  NOT R5
RDst  NOT RSrc NOT Dst Src R3  NOT R5

4 Data Path for NOT RDst  NOT RSrc
NOT Dst Src RDst  NOT RSrc

5 Bitwise AND (2 flavors) RDst  RSrc1 AND RSrc2 RDst  RSrc1 AND Data
RDst  RSrc1 AND RSrc2 AND Dst Src Src2 RDst  RSrc1 AND Data AND Dst Src imm5 Data is the sign-extend of imm5 Clear R1

6 ADD (2 flavors) RDst  RSrc1 ADD RSrc2 RDst  RSrc1 ADD Data
RDst  RSrc1 ADD RSrc2 ADD Dst Src Src2 RDst  RSrc1 ADD Data ADD Dst Src imm5 Data is the sign-extend of imm5 Increment R1

7 Data Path for AND/ADD (register mode)
AND Dst Src Src2 ADD Dst Src Src2 RDst  RSrc1 AND RSrc2 0 bit means register mode RDst  RSrc1 ADD RSrc2

8 Data Path for AND/ADD (immediate mode)
AND Dst Src imm5 ADD Dst Src imm5 RDst  RSrc1 AND Data 1 bit means immediate mode RDst  RSrc1 ADD Data

9 Other Useful Operations
Decrement the contents of a given register Copy the contents of RA to RB Subtract RB from RA and store the result in RC

10 The LC-3 Simulator Various versions, ours comes from U Texas
Supports assembly, loading of object files, and visualized execution Next, Step, Finish, Continue, Stop Can edit PC, registers, and memory

11 Using the Simulator Run /opt/lc3tools/lc3sim-tk
Enter instructions starting at x3000 Set PC to x3000, then Next or Continue

12 Memory access: load and store instructions
For Wednesday Memory access: load and store instructions


Download ppt "Computer Science 210 Computer Organization"

Similar presentations


Ads by Google