Computer Architecture Lab/Winter2006/HoeftPirkWeirHuang/InstructionSetII
Appearance
Instruction Set
[edit | edit source]Instruction | Fixed Opcode | Variable Opcode | Semantics | Affected flags |
---|---|---|---|---|
3 operands | 0 instructions unused | |||
Add | 0000 | ddddrrrraaaa | D = R + A | CZON |
Adc | 0001 | ddddrrrraaaa | D = R + A + c | CZON |
Sub | 0010 | ddddrrrraaaa | D = R - A | CZON |
Sbc | 0011 | ddddrrrraaaa | D = R - A - c | CZON |
CMPI | 0100 | rrrriiiiiiii | R - I | CZON |
And | 0101 | ddddrrrraaaa | D = R & A | |
Or | 0110 | ddddrrrraaaa | D = R or A | |
Xor | 0111 | ddddrrrraaaa | D = R ^ A | |
LDB0 | 1000 | rrrriiiiiiii | R[0] = I; R[1] = 0; R[2] = 0; R[3] = 0; | |
LDB1 | 1001 | rrrriiiiiiii | R[1] = I; R[2] = 0; R[3] = 0; | |
LDB2 | 1010 | rrrriiiiiiii | R[2] = I; R[3] = 0; | |
LDB3 | 1011 | rrrriiiiiiii | R[3] = I; | |
RJMP | 1100 | iiiiiiiiiiii | PC = I | |
BRNE | 11010 | iiiiiiiiiii | ||
BREQ | 11011 | iiiiiiiiiii | ||
BRCC | 11100 | iiiiiiiiiii | ||
BRCS | 11101 | iiiiiiiiiii | ||
2 operands | 0 instructions unused | |||
ADDI | 11110000 | rrrriiii | R = R + I | CZON |
ADCI | 11110001 | rrrriiii | R = R + I + c | CZON |
SUBI | 11110010 | rrrriiii | R = R - I | CZON |
SBCI | 11110011 | rrrriiii | R = R - I - c | CZON |
CMP | 11110100 | rrrrcccc | R - C | CZON |
LSR | 11110101 | rrrrssss | R >>= S | C |
LSL | 11110110 | rrrrssss | R <<= S | C |
ASR | 11110111 | rrrrssss | R >>>= S | |
ROR | 11111000 | rrrrssss | R = R ROR S | C |
ROL | 11111001 | rrrrssss | R = R ROL S | |
MOV | 11111010 | ddddssss | D = S | |
LD | 11111011 | ddddaaaa | D = [A] | |
ST | 11111100 | ddddaaaa | [A] = D | |
LSRI | 11111101 | rrrriiii | R = R >> i | |
LSLI | 11111110 | rrrriiii | R = R << i | |
1 operand | 9 instructions unused | |||
JMP | 111111110000 | rrrr | PC = R | |
CALL | 111111110001 | rrrr | PC => [SP]; SP--; PC = R | |
PUSH | 111111110010 | rrrr | R => [SP]; SP-- | |
POP | 111111110011 | rrrr | SP++; [SP] => R; | |
NEG | 111111110100 | rrrr | R = -R | |
COM | 111111110101 | rrrr | R = ¬R | |
PAR | 111111110110 | rrrr | C = 1s in R | |
0 operands | 3 instructions unused | |||
RET | 1111111111110000 | SP++; [SP] => PC | ||
RETI | 1111111111110001 | |||
CLI | 1111111111110010 | Interrupt flag = 0 | ||
SEI | 1111111111110011 | Interrupt flag = 1 | ||
SKIPCC | 1111111111110100 | |||
SKIPCS | 1111111111110101 | |||
SKIPNE | 1111111111110110 | |||
SKIPEQ | 1111111111110111 | |||
SKIPNO | 1111111111111000 | |||
SKIPOV | 1111111111111001 | |||
SKIPNOTNEG | 1111111111111010 | |||
SKIPNEG | 1111111111111011 | |||
1111111111111100 | ||||
1111111111111101 | ||||
1111111111111110 | ||||
NOP | 1111111111111111 |