“@far int* @near IntegerPointer;”的含义

发布于 2024-08-08 02:31:35 字数 129 浏览 5 评论 0原文

我有以下定义。

far int* near IntegerPointer;

这是否意味着,放置在“近”内存中的指针指向放置在远内存区域中的整数。

谁能澄清一下。

I have the following definition.

far int* near IntegerPointer;

Does this mean, a pointer placed in 'near' memory pointing to a integer placed in far memory area.

Can anyone please clarify.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

夜还是长夜 2024-08-15 02:31:35

是的,你说得对。

从右到左读取声明(从内到外):

@far int* @near IntegerPointer;
                ^^^^^^^^^^^^^^

IntegerPointer 是一个

@far int* @near IntegerPointer;
          ^^^^^

IntegerPointer 是一个@near

@far int* @near IntegerPointer;
        ^

IntegerPointer 是一个@near pointer

@far int* @near IntegerPointer;
     ^^^

IntegerPointer 是一个@near 指针指向int

@far int* @near IntegerPointer;
^^^^

IntegerPointer 是一个@near 指针@far
或者 IntegerPointer 是一个指向 @far int 的 @near 指针

@near@far 意味着什么,但我几乎不知道。

Yes, you got that right.

Read declarations (from the inside out and) from right to left:

@far int* @near IntegerPointer;
                ^^^^^^^^^^^^^^

IntegerPointer is a

@far int* @near IntegerPointer;
          ^^^^^

IntegerPointer is a @near

@far int* @near IntegerPointer;
        ^

IntegerPointer is a @near pointer

@far int* @near IntegerPointer;
     ^^^

IntegerPointer is a @near pointer to int

@far int* @near IntegerPointer;
^^^^

IntegerPointer is a @near pointer to int @far
or IntegerPointer is a @near pointer to @far int

What @near and @far means, though, I have almost no idea.

浅忆 2024-08-15 02:31:35

[心灵力量开启] 是的,你是对的。 :) [psyhic power off]

很简单

@far int* IntegerPointer;

,就是指向内存的指针,而

int* @near IntegerPointer;

看起来像是放置在内存中的指针。

[psyhic power on] Yes you are right. :) [psyhic power off]

Just simple

@far int* IntegerPointer;

would be just pointer to far memory, whereas

int* @near IntegerPointer;

looks like pointer placed in near memory.

喜爱纠缠 2024-08-15 02:31:35
@near unsigned char var;
// Variable located anywhere in 64K address space Variable located anywhere in 64K address space 

来源:
http://www.cosmic-software.com/faq/faq16.php

@near unsigned char var;
// Variable located anywhere in 64K address space Variable located anywhere in 64K address space 

Source:
http://www.cosmic-software.com/faq/faq16.php

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文