Looking at the fig-FORTH listing, I see two different methods used for taking 2 values off the stack and replacing them with a single value. For example, PLUS uses this method:
Code:
PLUS CLC
LDA 0,X
ADC 2,X
STA 2,X
LDA 1,X
ADC 3,X
STA 3,X
INX
INX
JMP NEXT
while other operations like AND, etc. use this:
Code:
XOR LDA 0,X
EOR 2,X
PHA
LDA 1,X
EOR 3,X
INX
INX
JMP PUT
As near as I can tell, they both have the same stack effect (n1 n2 -- n3), the only difference is one is a few bytes longer but a few cycles faster, while the other is a few bytes shorter but a few cycles slower. Is that correct?