1
0
mirror of https://github.com/dschmenk/PLASMA.git synced 2025-04-05 03:37:43 +00:00

Squeeze a few more cycles out of call/leave sequence

This commit is contained in:
David Schmenk 2014-11-06 14:56:40 -08:00
parent 8125949370
commit c5bed1e661
3 changed files with 14 additions and 9 deletions

View File

@ -26,10 +26,13 @@ SEGBEGIN JMP VMINIT
;* SYSTEM INTERPRETER ENTRYPOINT
;*
INTERP PLA
CLC
ADC #$01
STA IPL
PLA
ADC #$00
STA IPH
LDY #$01
LDY #$00
JMP FETCHOP
;*
;* ENTER INTO USER BYTECODE INTERPRETER
@ -852,7 +855,6 @@ ENTER INY
BCS +
DEC IFPH
+ INY
STY IPY
LDA (IP),Y
ASL
TAY
@ -865,7 +867,7 @@ ENTER INY
DEY
STA (IFP),Y
BNE -
+ LDY IPY
+ LDY #$02
JMP NEXTOP
;*
;* LEAVE FUNCTION

View File

@ -180,10 +180,13 @@ OPTBL !WORD ZERO,ADD,SUB,MUL,DIV,MOD,INCR,DECR ; 00 02 04 06 08 0A 0C 0E
;* ENTER INTO BYTECODE INTERPRETER
;*
DINTRP PLA
CLC
ADC #$01
STA IPL
PLA
ADC #$00
STA IPH
LDY #$01
LDY #$00
LDA #>OPTBL
STA OPPAGE
JMP FETCHOP
@ -1451,7 +1454,6 @@ ENTER INY
BCS +
DEC IFPH
+ INY
STY IPY
LDA (IP),Y
ASL
TAY
@ -1464,7 +1466,7 @@ ENTER INY
DEY
STA (IFP),Y
BNE -
+ LDY IPY
+ LDY #$02
JMP NEXTOP
;
ENTERX INY

View File

@ -109,12 +109,14 @@ NEXTOPH INC IPH
;* SYSTEM INTERPRETER ENTRYPOINT
;*
INTERP PLA
CLC
ADC #$01
STA IPL
PLA
ADC #$00
STA IPH
LDY #$00
STY IPX
INY
JMP FETCHOP
;*
;* ENTER INTO USER BYTECODE INTERPRETER
@ -951,7 +953,6 @@ ENTER INY
BCS +
DEC IFPH
+ INY
STY IPY
LDA (IP),Y
ASL
TAY
@ -964,7 +965,7 @@ ENTER INY
DEY
STA (IFP),Y
BNE -
+ LDY IPY
+ LDY #$02
JMP NEXTOP
;*
;* LEAVE FUNCTION