litwr wrote:
Let's work with an example
Code:
zpptr1 byte 1,2,3
zpptr2 byte 4,5,6
We can use these pointers, for instance in instruction LDA [zpptr1]. I need to write exactly 3 bytes (not 4!) if I want to change the value of pointer zpptr1. I also hardly call the normal 65816 access to a 3-byte value as trimming.
Normally you'd use 32-bit pointers with the 4th byte unused.
Code:
zpptr1 byte 1,2,3,4
zpptr2 byte 5,6,7,8
To change the pointers, you have two 16-bit writes with 16-bit registers. And you only need a single 16-bit write when the bank byte isn't changing.