RE: [avr-gcc-list] Calling C functions from assembly

2006-10-16 Thread Schwichtenberg, Knut
Simon,

the easiest way to find out how gcc would call a function, is to write a
small C-programm calling the function and let it compile only to
assembler by a "make testprog.s", while testprog.c is the source. There
you will find all details without additonal reading. You should set the
optimization to -O0 otherwise you will see what gcc does with unused
code.

Cheers 

Knut 

> -Original Message-
> From: 
> [EMAIL PROTECTED]
> g 
> [mailto:[EMAIL PROTECTED]
> ongnu.org] On Behalf Of Simon Han
> Sent: Monday, October 16, 2006 7:56 PM
> To: avr-gcc-list@nongnu.org
> Subject: [avr-gcc-list] Calling C functions from assembly
> 
> Hi all,
>   
>   This must be the most stupid question of the year.  :P
> 
>   Is there a way to call C functions from assembly?  Can 
> someone point  
> me an example of this?
> 
> Thank you very much,
> Simon
> 
> 
> 
> ___
> AVR-GCC-list mailing list
> AVR-GCC-list@nongnu.org
> http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
> 


___
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list


Re: [avr-gcc-list] Calling C functions from assembly

2006-10-16 Thread Galen Seitz
Simon Han <[EMAIL PROTECTED]> wrote:

> Hi all,
>   
>   This must be the most stupid question of the year.  :P
> 
>   Is there a way to call C functions from assembly?  Can someone
> point  me an example of this?
> 

If you are asking about parameter passing and such, you can find the
calling conventions here:
  http://www.nongnu.org/avr-libc/user-manual/FAQ.html#faq_reg_usage

galen


___
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list


[avr-gcc-list] Calling C functions from assembly

2006-10-16 Thread Simon Han

Hi all,

This must be the most stupid question of the year.  :P

	Is there a way to call C functions from assembly?  Can someone point  
me an example of this?


Thank you very much,
Simon



___
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list


Re: [avr-gcc-list] Is this what we get for trying to help?

2006-10-16 Thread Parthasaradhi Nayani
Dear Mr. David,Thanks a lot for the mail and from now on I will remember to "reply all" rather than just "reply". Your words about the student are very apt and as you rightly said SMS-speak must be out. Thanks once again.RegardsNayaniDavid Brown <[EMAIL PROTECTED]> wrote: Hi Nayani,The reason your replies don't appear on the list is that this mailing list is set up so that replies are sent to the poster, not the list.  I can't remember why it is setup this way, but I remember there was a discussion about it a long time ago.  The list moderators and organisers had good reasons for having the list this way - and if Joerg and the others find the list faster or easier this way, then fair enough.  The trick for most email clients is to click "Reply All" rather than just "Reply",
 and adjust the addresses as desired.Regarding the obnoxious student - you just have to ignore such people. It's an unfortunate fact of mailing list (or Usenet) life.  On a moderated list like this, they are less of a problem, but there seem to be steadily more students (and, more depressingly, "professionals") who think others should do their work for them, and have no respect or manners.  Keep your flame-proof underwear on when posting, and filter out any posts where "you" is spelt "u", or where the poster can't find the shift key (there is nothing wrong with spelling mistakes or grammatical errors - but SMS-speak is right out).Best regards,DavidParthasaradhi Nayani wrote:> Dear all,> > I have been following this list for more than a year to learn GCC better > and offer suggestions as and when felt that I was capable of offering a > comment to any of the posts. Though I
 was not posting any replies in the > recent past, I had been folowing the topics. I had posted some questions > earlier and they appeared in this list but surprisingly my replies to > this list are not appearing ant threfore, I have included the personal > mail id of Mr. Joerg Wunsch.> > Recently I saw a post and replied to it and got the following reply from > the sender. I sent my reply with an intension of helping the student, > but please see the mail I received. I copy paste the contents for your > perusal.> > > hello ,>  1 . i want to tell you that the connections can be changed if>  u get the working code .>  2 . i want to tell you that the program can be modified>  according to our own needs .>  3 . Dont try to become oversmart . People other than you have the>  experience of writing a code  .> 
 4 . Avoid sending your stupid replies in case you dont have the>  answer to what the user asked for .>  5 . The only conclusion is that you are idiot .> > Have fun with your own replies you idiot> Ankur Handa> > > On Fri, 13 Oct 2006, Parthasaradhi Nayani wrote:> >  > Hello,>  >>  > How can you use working code of one board (whose connections may be> different from yours) on your board? All you need to know is the> initialisation sequence and writing commands/data. Is you LCD connected > in 8> bit mode or 4 bit mode? Check the following link for example code.>  >>  > www.lampex.com>  >>  > Best wishes>  > Nayani P>  >>  >>  > Ankur <[EMAIL PROTECTED]> wrote:>  > Hello everyone ,>  >  I am new to this mailing list . I need a favour
 from you . If>  >  anyone has a working code for LCD interfaced to ATmega8 , can>  >  you send it to me . I am really in a great need of this . Whatever>  >  i wrote is not working properly .>  >>  > Thanks in advance>  > Ankur Handa>  >>  >>  > ___>  > AVR-GCC-list mailing list>  > AVR-GCC-list@nongnu.org>  > http://lists.nongnu.org/mailman/listinfo/avr-gcc-list>  >> > > > Thank you all.> > Regards> Nayani P>  
		Do you Yahoo!? 
Get on board. You're invited to try the new Yahoo! Mail.___
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list


Re: [avr-gcc-list] LCD code

2006-10-16 Thread Javier Almansa Sobrino
see this link:

http://www.linuxfocus.org/English/May2002/article236.shtml

In this project you can take some pieces of code to control a LCD.
-- 
Nunca confies en un S.O. del que no tienes código fuente ;-)


Javier Almansa Sobrino.
Ingeniero Técnico en Sistemas.

Grupo de Investigación ARCo.
Escuela Superior de Informática. Ciudad Real
Tel: (+34)926 29 53 00 Ext: 3705



___
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list


Re: [avr-gcc-list] Is this what we get for trying to help?

2006-10-16 Thread David Brown

Hi Nayani,

The reason your replies don't appear on the list is that this mailing 
list is set up so that replies are sent to the poster, not the list.  I 
can't remember why it is setup this way, but I remember there was a 
discussion about it a long time ago.  The list moderators and organisers 
had good reasons for having the list this way - and if Joerg and the 
others find the list faster or easier this way, then fair enough.  The 
trick for most email clients is to click "Reply All" rather than just 
"Reply", and adjust the addresses as desired.


Regarding the obnoxious student - you just have to ignore such people. 
It's an unfortunate fact of mailing list (or Usenet) life.  On a 
moderated list like this, they are less of a problem, but there seem to 
be steadily more students (and, more depressingly, "professionals") who 
think others should do their work for them, and have no respect or 
manners.  Keep your flame-proof underwear on when posting, and filter 
out any posts where "you" is spelt "u", or where the poster can't find 
the shift key (there is nothing wrong with spelling mistakes or 
grammatical errors - but SMS-speak is right out).


Best regards,

David


Parthasaradhi Nayani wrote:

Dear all,

I have been following this list for more than a year to learn GCC better 
and offer suggestions as and when felt that I was capable of offering a 
comment to any of the posts. Though I was not posting any replies in the 
recent past, I had been folowing the topics. I had posted some questions 
earlier and they appeared in this list but surprisingly my replies to 
this list are not appearing ant threfore, I have included the personal 
mail id of Mr. Joerg Wunsch.


Recently I saw a post and replied to it and got the following reply from 
the sender. I sent my reply with an intension of helping the student, 
but please see the mail I received. I copy paste the contents for your 
perusal.



hello ,
 1 . i want to tell you that the connections can be changed if
 u get the working code .
 2 . i want to tell you that the program can be modified
 according to our own needs .
 3 . Dont try to become oversmart . People other than you have the
 experience of writing a code  .
 4 . Avoid sending your stupid replies in case you dont have the
 answer to what the user asked for .
 5 . The only conclusion is that you are idiot .

Have fun with your own replies you idiot
Ankur Handa


On Fri, 13 Oct 2006, Parthasaradhi Nayani wrote:

 > Hello,
 >
 > How can you use working code of one board (whose connections may be
different from yours) on your board? All you need to know is the
initialisation sequence and writing commands/data. Is you LCD connected 
in 8

bit mode or 4 bit mode? Check the following link for example code.
 >
 > www.lampex.com
 >
 > Best wishes
 > Nayani P
 >
 >
 > Ankur <[EMAIL PROTECTED]> wrote:
 > Hello everyone ,
 >  I am new to this mailing list . I need a favour from you . If
 >  anyone has a working code for LCD interfaced to ATmega8 , can
 >  you send it to me . I am really in a great need of this . Whatever
 >  i wrote is not working properly .
 >
 > Thanks in advance
 > Ankur Handa
 >
 >
 > ___
 > AVR-GCC-list mailing list
 > AVR-GCC-list@nongnu.org
 > http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
 >



Thank you all.

Regards
Nayani P





___
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list