Computer Instructions: Types of Operations
- Transfer of Control (= Control Flow) Operations:
- NOP: ("no-op: no operation") don't do anything, and go to the next instruction. Example: NOP.
- HLT: ("halt") stop a program's execution, and exit the program. Example: HLT.
- JMP: ("jump") unconditionally jump to (= go to) another instruction. Example: JMP X will cause the CPU to continue exeuction starting from the instruction inside address X; otherwise, it'll continue to the next instruction.
- JZ: ("jump on zero") jump to (= go to) another instruction if the zero flag of the status register is on. Example: JZ Y will jump to the instruction inside address Y if the zero flag is $1$; otherwise, it'll continue to the next instruction.
- JNZ: ("jump on not zero") jump to (= go to) another instruction if the zero flag of the status register is off. Example: JNZ Y will jump to the instruction inside address Y if the zero flag is $0$; otherwise, it'll continue to the next instruction.
- JN: ("jump on negative") jump to (= go to) another instruction if the sign flag of the status register is on. Example: JN X will jump to the instruction inside address X if the sign flag is $1$; otherwise, it'll continue to the next instruction.
- JNN: ("jump on not negative") jump to (= go to) another instruction if the sign flag of the status register is off. Example: JNN X will jump to the instruction inside address X if the sign flag is $0$; otherwise, it'll continue to the next instruction.