6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Tue May 14, 2024 4:33 am

All times are UTC




Post new topic Reply to topic  [ 18 posts ]  Go to page Previous  1, 2
Author Message
PostPosted: Fri Feb 03, 2023 1:24 am 
Offline

Joined: Sat Feb 19, 2022 10:14 pm
Posts: 147
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.


Top
 Profile  
Reply with quote  
PostPosted: Fri Feb 03, 2023 6:04 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8182
Location: Midwestern USA
tmr4 wrote:
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.

You’re repeating what Alarm Siren and I had already posted. The OP has himself convinced with this 24-bit stuff.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Sun Feb 05, 2023 6:31 pm 
Offline

Joined: Sat Feb 19, 2022 10:14 pm
Posts: 147
BigDumbDinosaur wrote:
You’re repeating what Alarm Siren and I had already posted.

Yup. I thought using the OP's own example might help get the point across.


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 7 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: