# HG changeset patch # User Paul Boddie # Date 1435422492 -7200 # Node ID c18aa3a5597fddccc0fc62a41f43e5115f43064b # Parent 14046c81ccbfb9d7184e2344c1c8a070b861c9c0 Keep $70 as the current stack pointer. diff -r 14046c81ccbf -r c18aa3a5597f switcher.oph --- a/switcher.oph Sat Jun 27 17:51:51 2015 +0200 +++ b/switcher.oph Sat Jun 27 18:28:12 2015 +0200 @@ -53,14 +53,12 @@ ; obtain the stack location of the stored PC MSB tsx txa - clc - adc #6 ; offset of MSB (, Y, X, A, F, LSB, MSB) sta $70 lda #$01 ; $01xx sta $71 - ldx #0 - lda ($70, x) + ldy #6 ; offset of MSB (, Y, X, A, F, LSB, MSB) + lda ($70), y ; reference the stack location and compute PC MSB & $80 and #$80