6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Mon May 20, 2024 9:01 pm

All times are UTC




Post new topic Reply to topic  [ 16 posts ]  Go to page Previous  1, 2
Author Message
PostPosted: Wed Mar 02, 2022 9:14 pm 
Offline

Joined: Wed Aug 21, 2019 6:10 pm
Posts: 217
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"


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 16 posts ]  Go to page Previous  1, 2

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: