From 20a6655c0fceed55421907b6bb35b5f9dfbe9b94 Mon Sep 17 00:00:00 2001 From: Dave Schmenk Date: Tue, 30 Jun 2020 08:25:17 -0700 Subject: [PATCH] Clean up frame allocate calc --- src/vmsrc/apple/plvm03.s | 19 +++++++++---------- src/vmsrc/apple/plvmjit03.s | 6 +++--- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/src/vmsrc/apple/plvm03.s b/src/vmsrc/apple/plvm03.s index 1c4c874..6aad547 100755 --- a/src/vmsrc/apple/plvm03.s +++ b/src/vmsrc/apple/plvm03.s @@ -1328,15 +1328,14 @@ ENTER LDA IFPH PHA ; SAVE ON STACK FOR LEAVE LDA IFPL PHA + LDA PPL ; ALLOCATE FRAME INY - LDA (IP),Y - EOR #$FF SEC - ADC PPL + SBC (IP),Y STA PPL STA IFPL - LDA #$FF - ADC PPH + LDA PPH + SBC #$00 STA PPH STA IFPH INY @@ -1357,13 +1356,13 @@ ENTER LDA IFPH ;* ;* LEAVE FUNCTION ;* -LEAVE INY ;+INC_IP - LDA (IP),Y +LEAVE LDA IFPL + INY ;+INC_IP CLC - ADC IFPL + ADC (IP),Y STA PPL - LDA #$00 - ADC IFPH + LDA IFPH + ADC #$00 STA PPH PLA ; RESTORE PREVIOUS FRAME STA IFPL diff --git a/src/vmsrc/apple/plvmjit03.s b/src/vmsrc/apple/plvmjit03.s index 2e1a5c7..7b00e70 100755 --- a/src/vmsrc/apple/plvmjit03.s +++ b/src/vmsrc/apple/plvmjit03.s @@ -160,11 +160,11 @@ OPTBL !WORD ZERO,CN,CN,CN,CN,CN,CN,CN ; 00 02 ;* SYSTEM INTERPRETER ENTRYPOINT ;* INTERP PLA - CLC - ADC #$01 + CLC + ADC #$01 STA IPL PLA - ADC #$00 + ADC #$00 STA IPH LDY #$00 STY IPX