Instruction | Meaning | Notes |
---|---|---|
ADD a, b, c | a = b + c | a, b and c must all be registers |
SUB a, b, c | a = b – c; | a, b and c must all be registers |
NEG a, b | a = – b; | a and b must be registers |
AND a, b, c | a = b & c; | a, b and c must all be registers |
OR a, b, c | a = b | c; | a, b and c must all be registers |
NOT a, b | a = ~ b | a and b must be registers |
SHR a, b, c | a = b >> c; | a and b must be registers, c can be a register or 16-bit immediate |
SHL a, b, c | a = b << c; | a and b must be registers, c can be a register or 16-bit immediate |
MOV a, b | a = b; | if a is a register, b can be register, indirect or immediate if a is indirect, b must be a register |
JMP a | goto a; | a can be an address in a register, or a 16-bit immediate offset from the current PC |
BEQ a, b | if (a == 0) goto b; | a must be a register, b must be a 16-bit immediate offset from the current PC |
BLT a, b | if (a < 0) goto b; | a must be a register, b must be a 16-bit immediate offset from the current PC |
for (i=0; i<10; ++i) x[i] = y[i] + 0x12345678;
(This page: userpages.cs.umbc.edu/olano/class/411-12-2/hw1.html)