Understand and apply the basic machine-code operations of:
- load
- add
- subtract
- store
- branching (conditional and unconditional)
- compare
- logical bitwise operators (AND, OR, NOT, XOR)
- logical shift right
- logical shift left
- halt
Operation | AQA Assembly Instruction | Explanation |
---|---|---|
Load | LDR Rd, <memory ref> |
Load the data in the specified location into register d |
Add | ADD Rd, Rn, <operand> |
Add the value in register n to the value of the operand (may be a decimal value or a memory location), and store the result in register d |
Subtract | SUB Rd, Rn, <operand> |
Subtract the value specified by <operand> to the value in register n and store the result in register d |
Store | STR Rd, <memory ref> |
Store the value of register d in the specified memory address |
Branch (Unconditional) | B <label> |
Always branch (jump) to the instruction at position <label> in the program |
Branch (Conditional) | B<condition> <label> |
Branch to the instruction at position <label> if the condition is met |
Compare | CMP Rn, <operand> |
Compare the value of register n with the operand |
AND | ||
OR | ||
NOT | ||
XOR | ||
Logical Shift Right | ||
Logical Shift Left | ||
Halt |