迪文科技论坛

 找回密码
 立即注册
搜索
查看: 191|回复: 5

[Question] Question about the rule of VP and SP address spacing ?

[复制链接]

9

主题

65

回帖

264

积分

中级会员

Rank: 3Rank: 3

积分
264
发表于 2023-7-13 13:30:22 | 显示全部楼层 |阅读模式
Hi, I got lots of helps and thanks for all !

I am in the process of setting up the Variable Pointer (VP) and the Screen Pointer (SP) addresses.
While I understand the general principles behind their usage,
I am seeking clarification on why specific address spacing is required between the VP and SP addresses.

I've noticed that in many examples and tutorials,
a certain amount of address spacing is deliberately maintained between VP and SP addresses.
Could you please explain the technical reasons behind this requirement ?
回复

使用道具 举报

0

主题

857

回帖

5255

积分

论坛元老

Rank: 8Rank: 8

积分
5255
发表于 2023-7-13 13:37:38 | 显示全部楼层
SP records the various properties set by the display control and also occupies the variable address. Therefore, after setting the SP address, attention should be paid to the interval, usually 0x10 addresses, when setting VP or SP for new controls in the future
回复

使用道具 举报

0

主题

452

回帖

1万

积分

论坛元老

Rank: 8Rank: 8

积分
11553
发表于 2023-7-13 13:39:21 | 显示全部楼层
本帖最后由 Serena 于 2023-7-13 13:40 编辑

The VP address and SP address share the same address range, which is distinguished to avoid conflicts caused by pointer address confusion, resulting in characters not being displayed, incorrect position display, and abnormal data display etc.

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x
回复

使用道具 举报

9

主题

65

回帖

264

积分

中级会员

Rank: 3Rank: 3

积分
264
 楼主| 发表于 2023-7-13 17:53:16 | 显示全部楼层

Thanks for your answers, DWIN_LZ and  Serena !

I see that I should provide some more range between the VP address,
and it's depend on my data size of VP at Control.

For example, if I'm using <Text Display> and set the length to 32
I should skip 32 x 2 bytes for finding the next VP address.

But, how I can guess about SP address ?
Is there any length (or else) on it ?
回复

使用道具 举报

0

主题

713

回帖

7658

积分

论坛元老

Rank: 8Rank: 8

积分
7658
发表于 2023-7-13 21:25:45 | 显示全部楼层
本帖最后由 DWIN-ARK 于 2023-7-13 21:30 编辑
jhpark 发表于 2023-7-13 17:53
Thanks for your answers, DWIN_LZ and  Serena !

I see that I should provide some more range between ...

dear,
SP address needs to be calculated according to the address length describing the control property. In order to be compatible with a maximum control property, different controls can be separated by 0x10 (16) addresses, such as 0x8000 for the first control and 0x8010 for the next one.


本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x
回复

使用道具 举报

9

主题

65

回帖

264

积分

中级会员

Rank: 3Rank: 3

积分
264
 楼主| 发表于 2023-7-14 12:42:14 | 显示全部楼层
DWIN-ARK 发表于 2023-7-13 21:25
dear,
SP address needs to be calculated according to the address length describing the control pro ...

Thanks DWIN-ARK, and I see !!
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|迪文科技论坛 ( 京ICP备05033781号-1 )

GMT+8, 2024-12-28 16:40 , Processed in 0.081409 second(s), 23 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表