Better ENTER code

This commit is contained in:
David Schmenk 2014-06-30 13:46:36 -07:00
parent 6c1a1c18af
commit bb3904c884

View File

@ -1440,82 +1440,74 @@ JMPTMP JMP (TMP)
;* ENTER FUNCTION WITH FRAME SIZE AND PARAM COUNT
;*
ENTER +INC_IP
LDA (IP),Y
STA FRMSZ
+INC_IP
LDA (IP),Y
STA NPARMS
STY IPY
LDA IFPL
PHA
SEC
SBC FRMSZ
SBC (IP),Y
STA IFPL
LDA IFPH
PHA
SBC #$00
STA IFPH
LDY #$01
PLA
STA (IFP),Y
DEY
PLA
STA (IFP),Y
LDA NPARMS
BEQ ENTER5
+INC_IP
STY IPY
LDA (IP),Y
BEQ +
ASL
TAY
INY
ENTER4 LDA ESTKH,X
- LDA ESTKH,X
STA (IFP),Y
DEY
LDA ESTKL,X
STA (IFP),Y
DEY
INX
DEC NPARMS
BNE ENTER4
ENTER5 LDY IPY
DEY
CPY #$01
BNE -
+ LDY #$01
PLA
STA (IFP),Y
DEY
PLA
STA (IFP),Y
LDY IPY
JMP NEXTOP
;
ENTERX +INC_IP
LDA (IP),Y
STA FRMSZ
+INC_IP
LDA (IP),Y
STA NPARMS
STY IPY
STA ALTRDOFF
LDA IFPL
PHA
SEC
SBC FRMSZ
SBC (IP),Y
STA IFPL
LDA IFPH
PHA
SBC #$00
STA IFPH
LDY #$01
PLA
STA (IFP),Y
DEY
PLA
STA (IFP),Y
LDA NPARMS
BEQ ENTERX5
+INC_IP
STY IPY
LDA (IP),Y
STA ALTRDOFF
BEQ +
ASL
TAY
INY
ENTERX4 LDA ESTKH,X
- LDA ESTKH,X
STA (IFP),Y
DEY
LDA ESTKL,X
STA (IFP),Y
DEY
INX
DEC NPARMS
BNE ENTERX4
ENTERX5 STA ALTRDON
DEY
CPY #$01
BNE -
+ LDY #$01
PLA
STA (IFP),Y
DEY
PLA
STA (IFP),Y
STA ALTRDON
LDY IPY
JMP NEXTOP
;*