summary refs log tree commit diff
path: root/instructions/JSR.ts
diff options
context:
space:
mode:
authorWlodekM <[email protected]>2025-04-02 21:12:13 +0300
committerWlodekM <[email protected]>2025-04-02 21:12:13 +0300
commitcec2dc2b9f2598cdf341627fe2ab91c37d637eac (patch)
tree4050ddb4a1413ac19cd352c752fd3ca43bd53a96 /instructions/JSR.ts
parent2f63e169edb3ba1e95a33719c021e1bab9d9ac8c (diff)
yea
Diffstat (limited to 'instructions/JSR.ts')
-rw-r--r--instructions/JSR.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/instructions/JSR.ts b/instructions/JSR.ts
index 59d95d8..5614d9b 100644
--- a/instructions/JSR.ts
+++ b/instructions/JSR.ts
@@ -2,6 +2,7 @@ import type The65c02 from "../65c02.ts";
 
 export default function (this: The65c02, mode: string) {
     const location = this.getAddr(mode, ['absolute']);
-    this.push(this.programCounter.num())
+    this.push(this.programCounter.num() & 0x00FF)
+    this.push(this.programCounter.num() & 0xFF00)
     this.programCounter.set(location)
 }
\ No newline at end of file