mirror of
https://github.com/pnx/m16vm
synced 2026-06-16 03:44:55 +02:00
src/cpu.c: implement JR instruction
This commit is contained in:
parent
1eef46cc5e
commit
900e1d87c4
1 changed files with 2 additions and 1 deletions
|
|
@ -79,7 +79,8 @@ static void execute(struct instr *instr) {
|
|||
cpu_set_pc(instr->j.addr);
|
||||
break;
|
||||
case OP_JR :
|
||||
debug("jr\t#r%i(#%i)\n", instr->i.rs, instr->i.imm);
|
||||
debug("jr\tr%i(#%i)\n", instr->i.rs, instr->i.imm);
|
||||
cpu_set_pc(reg[instr->r.rs] + instr->i.imm);
|
||||
break;
|
||||
case OP_BEQ :
|
||||
debug("beq\tr%i r%i #%i\n", instr->ri.rs, instr->ri.r0, instr->ri.offset);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue