Advertisement

What is a far pointer?

Started by August 19, 2000 12:13 AM
1 comment, last by 40 Thieves 24 years, 4 months ago
I''m looking for a good explination of what a far pointer is... a web site or just a description here would be cool... thanks guys. 40 www.databyss.com www.omlettesoft.com "Don''t meddle in the affairs of wizards, for they are subtle and quick to anger."
-40
As far as I know, far pointers are just left over from the days of dos coding and 16 bit pointers. A far pointer would point to a memory address "far away", that had an address that required 32 bits. In Windows, all pointers are 32 bit, so that no longer exists.
Of course, I could be completely confusing this with something else, but, I *think* that''s right...
Advertisement
Just a little more clarification
DOS memory is divided up into 64k blocks. To reference stuff in the same block you would need a near pointer(16bit/2bytes). To reference something in a separate 64k block you''d need a far pointer(20 bit) 20 bit? Yup, the compiler had to analyze a far pointer by breaking it into two segments and doing some math. Always a slowdown and I remember seeing one game that forced all the functions as near to keep them in the same block)(about a 30-50% increase)

ZoomBoy
Developing a 2D RPG with skills, weapons, and adventure.
See my character editor, Tile editor, diary, 3D Art resources at
Check out my web-site

This topic is closed to new replies.

Advertisement