Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

What does "far" in BYTE far *Temp; mean?

Status
Not open for further replies.

SphinX

Advanced Member level 3
Joined
Jan 25, 2002
Messages
822
Helped
58
Reputation
116
Reaction score
29
Trophy points
1,308
Location
EGYPT
Activity points
7,045
Salam,

Code:
         BYTE far *Temp;
         Temp  = (BYTE far *)0xA0005555; /* set up address to be A000:5555h    */
         *Temp = 0xAA;                            /* write data 0xAA to the address     */

Please what does "far" mean here ?


Thanks
 

Re: BYTE far *Temp;

Far, means that the pointer is double word address, insted of word. So you can point more than the segment your are working. (generaly Data segment).
 

    SphinX

    Points: 2
    Helpful Answer Positive Rating
Re: BYTE far *Temp;

Hi
Far prefix mean that a variable declared have a size of LARGE MODE in memory mode.
if you selected LARGE MODE in memory mode then Far don't need.
Far only use when select COMPACT MODE or SMALL MODE but use LARGE MODE for a variable.(MIXER MODE)
 

Re: BYTE far *Temp;

in small memory model pointer only poins to offset inside the segment but in far

pointer both segment and offset are stored .this is only in 16 bit compilers.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top