From e5a253ea9e9d249ad330ac2c8184ce79e3e38847 Mon Sep 17 00:00:00 2001 From: "Juan J. Martinez" Date: Mon, 8 May 2023 23:26:11 +0100 Subject: Fix PC addre in call [r1 : r2] --- vm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'vm.c') 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; -- cgit v1.2.3