Presentation is loading. Please wait.

Presentation is loading. Please wait.

COMPSCI 210 Semester 2 - 2014 Tutorial 6 – Revision.

Similar presentations


Presentation on theme: "COMPSCI 210 Semester 2 - 2014 Tutorial 6 – Revision."— Presentation transcript:

1 COMPSCI 210 Semester Tutorial 6 – Revision

2 2

3 Solution – Exercise (a)ADD R3, R2, #0 (b)NOT R3, R3 ADD R3, R3, #1 ADD R1, R2, R3 (c) ADD R1, R1, #0 (e) AND R2, R2, #0

4 4

5 Solution – Exercise ( LEA R1, #1 ) ( LDR R2, R1, #2 ) ( TRAP 0x25 )

6 6

7 7

8 Solution – Exercise NOT R4, R3 ADD R4, R4, #1 ADD R1, R4, R2 BRz Done BRn Reg3 BRp Reg2 Reg3 ADD R1, R3, #0 BRnzp Done Reg2 ADD R1, R2, #0 Done TRAP 0x25

9 9 What is the equivalent instruction for HALT ?

10 Solution – Exercise TRAP 0x25 has the same effect as using HALT


Download ppt "COMPSCI 210 Semester 2 - 2014 Tutorial 6 – Revision."

Similar presentations


Ads by Google