开发者

Meaning of "@far int* @near IntegerPointer;"

I have the following definition.

far in开发者_如何学编程t* near IntegerPointer;

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

Can anyone please clarify.


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.


[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.


@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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜