From c62e133afb34fc38445af7bbe61e88cf45e9a7e3 Mon Sep 17 00:00:00 2001 From: WlodekM Date: Thu, 3 Apr 2025 12:28:21 +0300 Subject: it works, holy shit --- 65c02.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '65c02.ts') diff --git a/65c02.ts b/65c02.ts index 9d286d9..f1368a9 100644 --- a/65c02.ts +++ b/65c02.ts @@ -288,7 +288,7 @@ export default class The65c02 { this.programCounter.increment() const neg = offset.bit(7); offset.setBit(7, false) - return this.programCounter.num() + (offset.num() * (neg ? -1 : 1)) + return this.programCounter.num() + (offset.num() + (neg ? -128 : 0)) case 'zero-page': return this.getZPAddr() case 'zero-page, X-indexed': -- cgit 1.4.1-2-gfad0