GARTHWILSON wrote:
[color=#000000] (Perhaps stating the obvious,) a second data stack could use non-ZP space for situations where you don't need the (ZP,X) addressing mode (meaning that stack cells won't be addresses needed for indirection without having to copy them to N first), and abs,X is enough. For that matter, since you don't need the bytes of a cell to be together for addresses for indirects, you can split high and low bytes so that even with an 8-bit index register, you can get 256 cells of 16 bits (or even 32 bits), giving each byte of precision its own page, and EDROP ("extension-stack DROP"?) consists of only a single INX, even for 32-bit.
That's my data stack in xForth... 128 cells deep, low byte indexed from $xx00 and high byte indexed from $xx80 ($9Exx for CX16, somewhere above $CC00 in golden Ram for C64). As the target is a 65c02, (zp,X) is not as useful as in the 65816, and, eg, "LDA SL+1,X : CLC : ADC SL,X : STA SL+,X : LDA SH+1,X : ADC SH,X : SH+1,X : INX : JMP NEXT"