命令符 |
|
命令名 | 符 | 書式 | 機能 | |||||||
---|---|---|---|---|---|---|---|---|---|---|
7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | |||
ADD | 0 | 0 | 0 | 1 | ra1 | ra0 | rb1 | rb0 | ADD ra,rb | ra = ra + rb , c と z を変化 |
SUB | 0 | 0 | 1 | 0 | ra1 | ra0 | rb1 | rb0 | SUB ra,rb | ra = ra - rb , ↑ |
AND | 0 | 0 | 1 | 1 | ra1 | ra0 | rb1 | rb0 | AND ra,rb | ra = ra & rb , ↑ |
OR | 0 | 1 | 0 | 0 | ra1 | ra0 | rb1 | rb0 | OR ra,rb | ra = ra | rb , ↑ |
XOR | 0 | 1 | 0 | 1 | ra1 | ra0 | rb1 | rb0 | XOR ra,rb | ra = ra ^ rb , ↑ |
NOT | 0 | 1 | 1 | 0 | ra1 | ra0 | rb1 | rb0 | NOT ra,rb | ra = !rb , ↑ |
SHU | 0 | 1 | 1 | 1 | ra1 | ra0 | rb1 | rb0 | SHU ra,rb | ra = rb >> 1 , c = rb.7 , z を変化 |
SHD | 1 | 0 | 0 | 0 | ra1 | ra0 | rb1 | rb0 | SHD ra,rb | ra = rb << 1 , c = rb.0 , z を変化 |
MOVR | 1 | 0 | 0 | 1 | ra1 | ra0 | rb1 | rb0 | MOVR ra,rb | ra = rb |
MOVI | 1 | 0 | 1 | 0 | 0 | 0 | ra1 | ra0 | MOVI ra,imm | ra = imm |
MOVMR | 1 | 0 | 1 | 1 | ra1 | ra0 | ir1 | ir0 | MOVMR ra,ir | ra = m[ir] |
MOVRM | 1 | 1 | 0 | 0 | ra1 | ra0 | ir1 | ir0 | MOVRM ir,ra | m[ir] = ra |
MOVPR | 1 | 1 | 0 | 1 | ra1 | ra0 | ir1 | ir0 | MOVPR ra,ir | ra = p[ir] |
MOVRP | 1 | 1 | 1 | 0 | ra1 | ra0 | ir1 | ir0 | MOVRP ir,ra | p[ir] = ra |
MOVRX | 0 | 0 | 0 | 0 | rp1 | rp0 | 0 | 0 | MOVRX rp | ix = rp |
MOVRY | 0 | 0 | 0 | 0 | rp1 | rp0 | 0 | 1 | MOVRY rp | iy = rp |
MOVXR | 0 | 0 | 0 | 0 | rp1 | rp0 | 1 | 0 | MOVXR rp | rp = ix |
MOVYR | 0 | 0 | 0 | 0 | rp1 | rp0 | 1 | 1 | MOVYR rp | rp = iy |
JMP | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | JMP address | ip = address |
JMPC | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 1 | JMPC address | c が 1 なら ip = address |
JMPZ | 1 | 1 | 1 | 1 | 0 | 0 | 1 | 0 | JMPZ address | z が 1 なら ip = address |
JMPR | 1 | 1 | 1 | 1 | 0 | 0 | 1 | 1 | JMPR jr | ip = jr |
JMPRC | 1 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | JMPRC jr | c が 1 なら ip = jr |
JMPRZ | 1 | 1 | 1 | 1 | 0 | 1 | 0 | 1 | JMPRZ jr | z が 1 なら ip = jr |
MOVJ | 1 | 1 | 1 | 1 | 0 | 1 | 1 | 0 | MOVJ address | jr = address |
CALL | 1 | 1 | 1 | 1 | 0 | 1 | 1 | 1 | CALL address | m[sp] = ip, ip = address, sp = sp - 2 |
RET | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | RET | ip = m[sp], sp = sp + 2 |
PUSH | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 1 | PUSH rx | m[sp] = rx, sp = sp - sc |
POP | 1 | 1 | 1 | 1 | 1 | 0 | 1 | 0 | POP rx | rx = m[sp], sp = sp + sc |
EI | 1 | 1 | 1 | 1 | 1 | 0 | 1 | 1 | EI | 割り込み有効 |
DI | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | DI | 割り込み無効 |
INC | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 1 | INC rx | rx = rx + 1 |
DEC | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | DEC rx | rx = rx - 1 |
NOP | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | NOP | 動作なし |
LDSR | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | LDSR | R0 = SR |
LDIR | 1 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | LDIR | R0 = IR |
STMR | 1 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | STMR | MR = R0 |
RETI | 1 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | RETI |
ip = m[sp] SR = m[sp] sp = sp + 3 |
ADDC | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | ADDC |
r0 = r0 + r1 + c , c と z を変化 |
SUBC | 0 | 0 | 1 | 1 | 0 | 1 | 0 | 1 | SUBC |
r0 = r0 - r1 - c , c と z を変化 |
ROU | 0 | 0 | 1 | 1 | 1 | 0 | 1 | 0 | ROU |
r0 = r0 >> 1 , c = r0.7 , z を変化 |
ROD | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | ROD |
r0 = r0 << 1 , c = r0.0 , z を変化 |
CMP | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | CMP |
r0 - r1 , c と z を変化 |
MOVX | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | MOVX address |
IX = address |
MOVY | 0 | 1 | 0 | 0 | 1 | 0 | 1 | 0 | MOVY address |
IY = address |
MOVS | 0 | 1 | 0 | 0 | 1 | 1 | 1 | 1 | MOVS address |
SP = address |
LDCPR | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | LDCPR |
R0 = CPR |
LDDPR | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | LDDPR |
R0 = DPR |
STCPR | 0 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | STCPR |
CPR = R0 |
STDPR | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | STDPR |
DPR = R0 |
MOVFR | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | MOVFR |
R0 = RF(R2) |
MOVRF | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 1 | MOVRF |
RF(R2) = R0 |
INCR2 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | INCR2 |
R2 = R2 + 1 |
DECR2 | 0 | 0 | 1 | 0 | 1 | 1 | 1 | 1 | DECR2 |
R2 = R2 - 1 |
|