GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Programming  >  C
Go To First  |  Previous Question  |  Next Question 
 C  |  Question 192 of 453    Print  
what is far pointer?

  
Total Answers and Comments: 8 Last Update: July 08, 2008     Asked by: ash_k6 
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: jintojos
 
Far pointers are mainly used for 32 bit addressing that is the segment offset addressing.
Normal pointers can onLy access the memory locations which is allocated by the compiler for that program. Far pointers are used for referencing memory locations beyond the data segment.
For example referencing Video memory location we use
char far * =0xb0008000;
here 0xb000 is the segment address and 0x8000 is the offset address. Thanks

Above answer was rated as good by the following members:
sunilkanna
February 09, 2006 10:03:57   #1  
chandhi        

RE: what is far pointer?

acessing the external memery


 
Is this answer useful? Yes | No
February 09, 2006 10:05:44   #2  
chandrika        

RE: what is far pointer?

Acessing the external memory.


 
Is this answer useful? Yes | No
February 09, 2006 10:10:18   #3  
koteshwar        

RE: what is far pointer?
hi all far pointer is always treated as a 32-bit pointer and contains both segment address and offset address ..BY using far pointer we can have multiple code segments which in turn allow u to have programs longer than 64KB
 
Is this answer useful? Yes | No
February 11, 2006 03:46:53   #4  
anup        

RE: what is far pointer?

suppose if your code segment is 32k then any pointer declared can access a memory location within this range but not beyond this range.

thus if a far pointer is used you can access beyond this range (lets say upto 64k).


 
Is this answer useful? Yes | No
March 28, 2006 07:57:50   #5  
PRABHU        

what is NULL pointer?

hi

plese can u explain ........

what is NULL pointer?


 
Is this answer useful? Yes | No
March 29, 2006 12:07:56   #6  
ashish khandelwal        

RE: what is far pointer?

hi thanks for replying.but the answer was too short to be understand.

anyway if u hv any queries u can ask.


 
Is this answer useful? Yes | No
April 11, 2006 01:29:42   #7  
mahendra        

RE: what is far pointer?
When the function is present out side the segment it requires base address and offsetaddress. To access the function the base and offset addersses are required to specify. This is like the far jump. The farpointer is a 32-bit pointer outside the segment. The segment size is based on the size of the IP register(Instruction Pointer ). Some times it is 64kb some times it is 32kb this depends on the processor.
 
Is this answer useful? Yes | No
July 07, 2008 07:15:12   #8  
jintojos Member Since: May 2008   Contribution: 29    

RE: what is far pointer?
Far pointers are mainly used for 32 bit addressing that is the segment offset addressing.
Normal pointers can onLy access the memory locations which is allocated by the compiler for that program. Far pointers are used for referencing memory locations beyond the data segment.
For example referencing Video memory location we use
char far * 0xb0008000;
here 0xb000 is the segment address and 0x8000 is the offset address. Thanks

 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape