Multiple choiceQuestion 1 · Recall
Loading…
By the end you can name Cambridge's five instruction groups, put any opcode from the 9618 set into the right group, and explain why comparing is a group of its own.
The instruction set for this syllabus has nineteen opcodes. Remembering nineteen separate facts is hard; remembering five groups and then placing a name is much easier.
The groups are not invented for the exam — they are how the instruction set is designed. Each group exists because a processor has to do that kind of job:
| Group (Cambridge wording) | Does what | Opcodes |
|---|---|---|
| Data movement | copies values between memory and registers | LDM LDD LDI LDX LDR MOV STO |
| Input and output of data | the only doorway to the person using the computer | IN OUT |
| Arithmetic operations | the actual calculating | ADD SUB INC DEC |
| Unconditional and conditional instructions | decides which instruction runs next, or stops the program | JMP JPE JPN END |
| Compare instructions | records whether two values were equal | CMP CMI |
All nineteen are there, and none appears twice.
The arithmetic unit can only work on values that are already in a register. Before you can add two numbers, something has to fetch them; after adding, something has to put the result back.
That is what the seven data movement instructions are for: LDM, LDD, LDI, LDX and LDR bring values in, STO puts a value back out, and MOV copies between registers.
Notice that the addressing mode is part of the load instruction's name (LDM immediate, LDD direct, LDI indirect, LDX indexed). That is convenient: the group stays "data movement" however the value is found.