aboutsummaryrefslogtreecommitdiff
path: root/vm.c
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2023-05-08 23:26:11 +0100
committerJuan J. Martinez <jjm@usebox.net>2023-05-08 23:26:11 +0100
commite5a253ea9e9d249ad330ac2c8184ce79e3e38847 (patch)
tree7d064bfc27e01e4bc7a8f21ef77a53b0be8e2224 /vm.c
parent0194f9c3bbb460647ce5a22e4e8e7859398d8da0 (diff)
downloadtr8vm-e5a253ea9e9d249ad330ac2c8184ce79e3e38847.tar.gz
tr8vm-e5a253ea9e9d249ad330ac2c8184ce79e3e38847.zip
Fix PC addre in call [r1 : r2]
Diffstat (limited to 'vm.c')
-rw-r--r--vm.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/vm.c b/vm.c
index 5f4b1ce..6652e2b 100644
--- a/vm.c
+++ b/vm.c
@@ -379,8 +379,7 @@ uint8_t tr8_eval(Tr8 *vm)
vm->write_m(--vm->sp, vm->pc & 0xff);
vm->write_m(--vm->sp, vm->pc >> 8);
-
- vm->pc = vm->read_m(addr) | (vm->read_m(addr + 1) << 8);
+ vm->pc = addr;
}
}
break;