summary refs log tree commit diff
path: root/instructions/JSR.ts
diff options
context:
space:
mode:
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