Instruction | Description | Example |
MOV destination,source | Copies the constant or the value from the address pointed by source to the address pointed by destination, destination cannot be a constant. | MOV #5,23 - Copies 23 to the memory cell with address 5. MOV R1,#15 - Copies value from memory cell with address 15 to register R1. |
ADD destination,source | Adds destination and source and stores the result in register or address pointed by destination, because of that destination cannot be a constant. | ADD R0,5 - Adds the content of register R0 and constant 5 and stores the result in register R0. |
SUB destination,source | Subtracts source from destination and stores the result in register or address pointed by destination, because of that destination cannot be a constant. | SUB R0,5 - Subtracts 5 from the content of register R0 and stores the result in register R0. |
MUL destination,source | Multiplies destination and source and stores the result in register or address pointed by destination, because of that destination cannot be a constant. | MUL R0,5 - Multiplies the content of register R0 and constant 5 and stores the result in register R0. |
DIV destination,source | Divides destination by source and stores the result in register or address pointed by destination, because of that destination cannot be a constant. | DIV R0,5 - Divides the content of register R0 by constant 5 and stores the result in register R0. |
JMP line | Jumps to the specified line. | JMP 0 - Jumps to the first instruction. |
JZ line | Conditional jump. Jumps to the specified line, only if the result of last instruction was equal to 0. | JZ 0 - Jumps to the first instruction. |
JNZ line | Conditional jump. Jumps to the specified line, only if the result of last instruction was not equal to 0. | JNZ 0 - Jumps to the first instruction. |
JG line | Conditional jump. Jumps to the specified line, only if the result of last instruction was greater than 0 ( > ). | JG 0 - Jumps to the first instruction. |
JNG line | Conditional jump. Jumps to the specified line, only if the result of last instruction was not greater than 0 ( <= ). | JNG 0 - Jumps to the first instruction. |
JL line | Conditional jump. Jumps to the specified line, only if the result of last instruction was less than 0 ( < ). | JL 0 - Jumps to the first instruction. |
JNL line | Conditional jump. Jumps to the specified line, only if the result of last instruction was not less than 0 ( >= ). | JNL 0 - Jumps to the first instruction. |