What is a far pointer? Where we use it?
Question :
What is a far pointer? Where we use it?
In large data model (compact, large, huge) the address B0008000 is acceptable because in these model all pointers to data are 32bits long. If we use small data model(tiny, small, medium) the above address won‘t work since in these model each pointer is 16bits long. If we are working in a small data model and want to access the address B0008000 then we use far pointer. Far pointer is always treated as a 32bit pointer and contains a segment address and offset address both of 16bits each. Thus the address is represented using segment : offset format B000h:8000h. For any given memory address there are many possible far address segment : offset pair. The segment register contains the address where the segment begins and offset register contains the offset of data/code from where segment begins.
Similar Questions
What is a NULL Pointer? Whether it is same as an uninitialized pointer?
In C, why is the void pointer useful? When would you use it?
What is near pointer?
What is a normalized pointer, how do we normalize a pointer?
What is a huge pointer?
What is a far pointer? Where we use it?
Difference between pass by reference and pass by value?
What are the differences between malloc () and calloc ()?
What are the uses of a pointer?
What is a pointer?