#概要
plunkerでassembler-simulatorやってみた。
命令コード調べてみた。
#命令コード
0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | a | b | c | d | e | f | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | NONE | MOV REG TO REG | MOV ADDRESS TO REG | MOV REGADDRESS TO REG | MOV REG TO ADDRESS | MOV REG TO REGARESS | MOV NUMBER TO REG | MOV NUMBER TO ADDRESS | MOV NUMBER TO REGADDRESS | ADD REG TO REG | ADD REGADDRESS TO REG | ADD ADDRESS TO_REG | ADD NUMBER TO REG | SUB REG FROM REG | SUB REGADDRESS FROM REG | SUB ADDRESS FROM REG |
1 | SUB NUMBER FROM REG | INC REG | DEC REG | CMP REG WITH REG | CMP REGADDRESS WITH REG | CMP ADDRESS WITH REG | CMP NUMBER WITH_REG | JMP REGADDRESS | JMP ADDRESS | |||||||
2 | JC_REGADDRESS | JC_ADDRESS | JNC_REGADDRESS | JNC_ADDRESS | JZ_REGADDRESS | JZ_ADDRESS | JNZ_REGADDRESS | JNZ_ADDRESS | JA_REGADDRESS | JA_ADDRESS | JNA REGADDRESS | JNA ADDRESS | ||||
3 | PUSH REG | PUSH REGADDRESS | PUSH ADDRESS | PUSH NUMBER | POP REG | CALL REGADDRESS | CALL ADDRESS | RET | MUL REG | MUL REGADDRESS | MUL ADDRESS | MUL NUMBER | ||||
4 | DIV REG | DIV REGADDRESS | DIV ADDRESS | DIV NUMBER | AND REG WITH REG | AND REGADDRESS WITH REG | AND ADDRESS WITH REG | AND NUMBER WITH REG | OR REG WITH REG | OR REGADDRESS WITH REG | OR ADDRESS WITH_REG | OR NUMBER WITH REG | XOR REG WITH REG | XOR REGADDRESS WITH REG | ||
5 | XOR ADDRESS WITH REG | XOR NUMBER WITH REG | NOT REG | |||||||||||||
6 | SHL REG WITH REG | SHL REGADDRESS WITH REG | SHL ADDRESS WITH REG | SHL NUMBER WITH REG | SHR REG WITH REG | SHR REGADDRESS WITH REG | ||||||||||
7 | SHR ADDRESS WITH REG | SHR NUMBER_ ITH REG |
以上。