[fabacad] Re: assening an address

  • From: Saif Abrar <saif.abrar@xxxxxxxxxxx>
  • To: fabacad@xxxxxxxxxxxxx
  • Date: Mon, 10 Apr 2006 11:39:56 +0530

Actually i am trying to give you a hint as to how you can do it.
i use gcc (over Linux) and it works fine for me.
As you can see from the error-list
"samp.c", line 4: warning: volatile is a keyword in ANSI C
it means that yr compiler is recognizing 'volatile'.
you need to look into yr compiler's manual how to use it.


Regards,
Syed Saif Abrar
Philips Semiconductors / CTO / System Technology & Architecture
Philips Towers, # 1, Murphy Road, Ulsoor, Bangalore-8, India
Ph: +91-80-25579000, Extn: 1536
Fax: +91-80-25561243


                                                                           
                                                                           
                                                                           
                                                                        To 
                                       fabacad@xxxxxxxxxxxxx               
                                                                        cc 
     Mohamed Ibrahim                                                       
     Quraish                                                       Subject 
     <royalibrahim@yahoo.              [fabacad] Re: assening an address   
     com>                                                   Classification 
                                                                           
     Sent by:                                                              
     fabacad-bounce@freel                                                  
     ists.org                                                              
                                                                           
     04/10/2006 11:25 AM                                                   
                                                                           
      Please respond to                                                    
     fabacad@xxxxxxxxxxxx                                                  
              g                                                            
                                                                           
                                                                           




Hi,

I was getting the following error when I tried to compile the code in a
program <samp.c>.

"samp.c", line 4: warning: volatile is a keyword in ANSI C
"samp.c", line 4: undefined symbol: volatile
"samp.c", line 4: syntax error before or at: unsigned
"samp.c", line 5: undefined symbol: address
"samp.c", line 6: cannot dereference non-pointer type
"samp.c", line 7: cannot dereference non-pointer type
I am using SUN Solaris's "cc" compiler.

Regards,
Ibrahim

Saif Abrar <saif.abrar@xxxxxxxxxxx> wrote:
 Dear Nayeem,
 I suppose that you are trying to do the access using C.

 In C, you can read/write to a hardware location as follows
 volatile unsigned int* address;
 int k;
 address = 0xff00; //assing adrs value
 *address = 5; //write to adrs
 k = *address; //read from adrs

 I hope this helps.

 Regards,
 Syed Saif Abrar
 Philips Semiconductors / CTO / System Technology & Architecture
 Philips Towers, # 1, Murphy Road, Ulsoor, Bangalore-8, India
 Ph: +91-80-25579000, Extn: 1536
 Fax: +91-80-25561243





 To
 fabacad@xxxxxxxxxxxxx
 cc
 mohammad uddin
 in> [fabacad] assening an address
 Classification
 Sent by:
 fabacad-bounce@freel
 ists.org

 04/10/2006 10:17 AM

 Please respond to
 fabacad@xxxxxxxxxxxx
 g








 Salamvalakum Saif Bhai,


 I want to search a particular
 character/number between some particular memory
 locations How can I assign the harware location
 i.e.., memory location to a variable. suppose I wann
 check for number 2001 between ox00fff0 and ox00ffff
 how can i do that, I am getting segmentation error if
 I am assigning it to an variable.


 Regards,

 Nayeem.



 __________________________________________________________
 Yahoo! India Matrimony: Find your partner now. Go to
 http://yahoo.shaadi.com
 ===========================================================
 Post messages:fabacad@xxxxxxxxxxxxx
 View archive: //www.freelists.org/archives/fabacad
 Subscribe: fabacad-request@xxxxxxxxxxxxx ; Subject: 'subscribe'
 Un-subscribe: fabacad-request@xxxxxxxxxxxxx ; Subject: 'unsubscribe'


 ===========================================================
 Post messages:fabacad@xxxxxxxxxxxxx
 View archive: //www.freelists.org/archives/fabacad
 Subscribe: fabacad-request@xxxxxxxxxxxxx ; Subject: 'subscribe'
 Un-subscribe: fabacad-request@xxxxxxxxxxxxx ; Subject: 'unsubscribe'



Regards
A.M'd Ibrahim Quraish


Yahoo! Messenger with Voice. PC-to-Phone calls for ridiculously low rates.



=========================================================== 
Post messages:fabacad@xxxxxxxxxxxxx
View archive: //www.freelists.org/archives/fabacad
Subscribe: fabacad-request@xxxxxxxxxxxxx ; Subject: 'subscribe'
Un-subscribe: fabacad-request@xxxxxxxxxxxxx ; Subject: 'unsubscribe'

Other related posts: