5 Instruction Set

The 3 types of instructions.

5.1 Data Transfer Instructions

Instructions that move data between registers and/or memory.

5.1.1 Register Data Transfer

5.1.2 Memory Data Transfer

5.2 Data Processing Instructions

5.2.1 Arithmetic Instructions

Supports register direct and immediate addressing (for rightmost operand only).

5.2.2 Logical instructions

Boolean operators; S suffix influences N/Z flags.

5.3 Program Control Instructions

To disrupt the program’s normal sequential flow, the contents of the Program Counter (PC) is modifed, either directly or by using Branch instruction.

If a branch is executed based on some condition(s), it is a Conditional Branch or Branch on Conditional Code (Bcc).

If the condition in the conditional code (cc) is true, a displacement is added to the PC. Note that the PC value is 8 bytes ahead of the current Bcc being executed.

The displacement range is ±32\pm32MB.

The 15 conditional codes. Each code will be prefixed with ’B’ in the code.

Signed vs unsigned values

Example of using different condition codes for the same function.

BNE tests for Z=0
BPL test for N=0