Far pointer

Uses your system voice; voice and rate in settings.

Snapshot

≈ 1 min read

Names in other languages

No names in other languages are held for this entry yet.

Article bodies are English and are not machine-translated. A name in another language is not a translation of the article.

In a segmented architecture computer, a far pointer is a pointer to memory in a specific context, such as a segment selector making it possible to point to addresses outside of the default segment. Comparison and arithmetic on far pointers is problematic: there can be several different segment-offset address pairs pointing to one physical address.

In a segmented architecture computer, a far pointer is a pointer to memory in a specific context, such as a segment selector making it possible to point to addresses outside of the default segment. Comparison and arithmetic on far pointers is problematic: there can be several different segment-offset address pairs pointing to one physical address. include int main() { char far *p = (char far *)0x55550005; char far *q = (char far *)0x53332225; *p = 80; (*p)++; printf("%d", *q); return 0; } Output of the following program: 81; Because both addresses point to same location. Physical Address = (value of segment register) × 0x10 + (value of offset). Location pointed to by pointer is : 0x5555 × 0x10 + 0x0005 = 0x55555 Location pointed to by pointer is : 0x5333 × 0x10 + 0x2225 = 0x55555 So, and both point to the same location 0x55555. ==Notes== ==References==

Text derived from https://en.wikipedia.org/w/index.php?oldid=1362156739 under CC BY-SA 4.0; modifications have been made.