×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

NEAR and FAR...

NEAR and FAR...

NEAR and FAR...

(OP)
I know this is a simple question but...

Are NEAR & FAR the same as Private & Public in VB, vc++ & java, respectively?

where the scope of near / private is limited to the current module and Far / Public is not limited to the module?

Have Fun, Be Young... Code BASIC
-Josh Stribling

http://cubee.topcities.com

RE: NEAR and FAR...

The behaviour of NEAR and FAR can roughly be compared with private/public, but it's not the same.

A NEAR memory reference assumes that the address you need is in an active memory segment of which the base address is stored in a register (the reference is "private" to the current code/data segment). If you want to reference an address in another segment, you have to specify the segment base: a FAR reference ("public" because the reference can be accessed at any time from any location).
Private and public, on the other hand, belong to an artificial programming approach, in essence all functions are public, only the compiler prohibits you to use them so. In practice, however, private functions will usually be defined NEAR and public functions FAR. Optimizing compilers (like C++ with option -O3) can produce machine code depending on the use of the source code, so in some cases public data may also be NEAR.

Regards,
Bert Vingerhoets
vingerhoetsbert@hotmail.com
http://student.vub.ac.be/~bvingerh/
Don't worry what people think about you. They're too busy wondering what you think about them.

RE: NEAR and FAR...

there is an FAQ stating a URL where to download the intel manuals. These manuals explain everything about the programming assemly on the 80x86 and specifically explains the differences of what occurs and how the processor reacts when near and far opcodes are used.

and ofcorse a whole lot more ;)
straiph

"There are 10 types of people in this world, those who know binary and those who don't!"

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close