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
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
 

Moof

Full Member level 2
Full Member level 2
Joined
Nov 21, 2003
Messages
149
Helped
7
Reputation
14
Reaction score
3
Trophy points
1,298
Location
Argentina
Activity points
1,230
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

conkhicon

Advanced Member level 4
Full Member level 1
Joined
Aug 31, 2004
Messages
107
Helped
3
Reputation
6
Reaction score
0
Trophy points
1,296
Activity points
1,015
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)
 

aamiralikhoja

Member level 5
Member level 5
Joined
Aug 11, 2004
Messages
90
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
708
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

Top