473,385 Members | 1,769 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Declaration pointer to a structure as far

1
Hi All,

Consider,

struct ab
{
unsigned char tag;
unsigned char len;
unsigned char value[2];
}

struct cd
{
unsigned char tag;
unsigned char len;
unsigned char value[2];
}

struct ef
{
unsigned char tag;
unsigned char len;
unsigned char value[2];
}

struct fcb
{
struct ab a_b;
struct cd c_d;
struct ef e_f;
}

Now i will declare pointer to a structure fcb as

struct fcb *FCB_add;

Please let me know how to declare pointer to struct fcb as far pointer?
iam using IAR complier for Atmel's AVR controller.

Can i declare as,
struct __far fcb *FCB_add;
or
__far struct fcb *FCB_add;

FCB_add=0x424100;// i want FCB_add should point to the physical address 0x424100.

Please help me.

Thanks
CCS
Apr 20 '07 #1
1 2856
Banfa
9,065 Expert Mod 8TB
Since __far is not a standard C keyword but an extension of the compiler you are using I suggest you check the documentation that came with it. However assuming it has a __far keyword then I suspect you need

struct fcb __far *FCB_add;
Apr 20 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

16
by: Vu Pham | last post by:
I think this problem relates to either c or c++ ( but I am not sure which one ) so I post to both of these news group. I am sorry if I did something wrong here. Is there any difference between...
5
by: anonymous | last post by:
I have a Lex file containing definitions of 2 structures like: %{ struct a {...}; struct b { struct a i; ... }; struct a x;
31
by: RS | last post by:
Hi, Looking to see if the following construct is valid: typedef struct { int foo; char bar; } foobar; Basically, the idea is to have the structure above point to a message buffer that has...
8
by: Mohammad Omer Nasir | last post by:
Hi, i made a structure in header file "commonstructs.h" is: typedef struct A { int i; A( ) {
4
by: Marcin Kasprzak | last post by:
Hello Guys, Silly question - what is the most elegant way of compiling a code similar to this one? <code> typedef struct a { b_t *b; } a_t; typedef struct b {
12
by: Michael.Z | last post by:
Anyone who can help: Given a Table.h file I am writing a Table.c file. I keep getting the compile error: previous declaration of Table was here / conflicting types for I think the...
6
by: kepeng | last post by:
There are 2 abstract base classes: class IB; class IA { //... public: virtual IB* GetB() = 0; }
11
by: Jef Driesen | last post by:
I have the following problem in a C project (but that also needs to compile with a C++ compiler). I'm using a virtual function table, that looks like this in the header file: typedef struct...
8
by: Chad | last post by:
Given the following..... #include <stdlib.h> #include <stdio.h> struct node { int data; struct node *next; };
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.