diff options
author | Juan J. Martinez <jjm@usebox.net> | 2023-05-01 16:15:21 +0100 |
---|---|---|
committer | Juan J. Martinez <jjm@usebox.net> | 2023-05-01 16:15:21 +0100 |
commit | c081dfe226c6e92865cbb97d8e9a2ef86d8c6acb (patch) | |
tree | c3761b67d705f370388d8e9758431f73ef0adf98 /vm.c | |
parent | 18a3b0c84c1d755546da27f0117e1ea09e2118de (diff) | |
download | tr8vm-c081dfe226c6e92865cbb97d8e9a2ef86d8c6acb.tar.gz tr8vm-c081dfe226c6e92865cbb97d8e9a2ef86d8c6acb.zip |
Assign the value of the register
Diffstat (limited to 'vm.c')
-rw-r--r-- | vm.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -202,7 +202,7 @@ uint8_t tr8_eval(Tr8 *vm) case 2: if (FL(instr)) /* LD [r1:r2], r3 */ - vm->ram[ADDR(vm->regs[R1(instr)], vm->regs[R2(instr)])] = R3(instr); + vm->ram[ADDR(vm->regs[R1(instr)], vm->regs[R2(instr)])] = vm->regs[R3(instr)]; else /* LD r3, [r1:r2] */ vm->regs[R3(instr)] = vm->ram[ADDR(vm->regs[R1(instr)], vm->regs[R2(instr)])]; |