Rewrite the following instructions such that each of them is
Rewrite the following instructions such that each of them is conditionally executed according to the given flag(s) setting.
Solution
Solution:
| instruction | flags | conditional instruction |
| ADD R1,R2,R3 | C=1&Z=0 | if Cflag is set to R1=R2+R3 and not equal |
| RSB R2,R3,R4 | Z=0&N=V | Not equal R2,R3,R4 and R4>=R2,R3 |
| MOV R0,R1 | V=1 | R0=R1, overflow |
