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
精彩评论