RE: [avr-gcc-list] Binding a register pair to a pointer
register unsigned char counter asm (r3) Pointers live in register pairs, you must not specify an odd number. However, I guess that specifying a GPR explicitly is not what you want? You can find some examples on the following page. The page is in german but the examples should give you some hints. http://www.roboternetz.de/wissen/index.php/Inline-Assembler_in_avr-gcc#Zugriff_aufs_SRAM regards Georg-Johann ___ Sensationsangebot verlängert: WEB.DE FreeDSL - Telefonanschluss + DSL für nur 16,37 Euro/mtl.!* http://dsl.web.de/?ac=OM.AD.AD008K15039B7069a ___ AVR-GCC-list mailing list AVR-GCC-list@nongnu.org http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
[avr-gcc-list] Binding a register pair to a pointer
Hello all, I have a time critical application where I have to process an external interrupt request. When the interrupt occurs, I have to read a port and store this data pointed by a pointer. In order to reduce the time taken by pushes and pops, I would like to bind a register pair to a char pointer. My search for examples has not yielded any results. I have tried something like unsigned char *ptr asm (x) but this is throwing out an error. Can some one show me an example on how to achieve this? Thank you. Nayani P ___ AVR-GCC-list mailing list AVR-GCC-list@nongnu.org http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
RE: [avr-gcc-list] Binding a register pair to a pointer
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] org] On Behalf Of Parthasaradhi Nayani Sent: Tuesday, December 09, 2008 11:45 AM To: avr-gcc-list@nongnu.org Subject: [avr-gcc-list] Binding a register pair to a pointer Hello all, I have a time critical application where I have to process an external interrupt request. When the interrupt occurs, I have to read a port and store this data pointed by a pointer. In order to reduce the time taken by pushes and pops, I would like to bind a register pair to a char pointer. My search for examples has not yielded any results. I have tried something like unsigned char *ptr asm (x) but this is throwing out an error. Can some one show me an example on how to achieve this? Thank you. This is describe in the avr-libc user manual, in the FAQ. ___ AVR-GCC-list mailing list AVR-GCC-list@nongnu.org http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
RE: [avr-gcc-list] Binding a register pair to a pointer
Hello Weddington, Thanks for the mail, but the FAQ example is as follows: register unsigned char counter asm (r3) The above is an example for a single byte value, but I would like to bind a pointer which is a 16 bit value and perhaps the X register may be used. I tried using constraints also but the complier complains. An example line of code on how to do this will be highly appreciated. Thank you. Regards Nayani --- On Wed, 12/10/08, Weddington, Eric [EMAIL PROTECTED] wrote: From: Weddington, Eric [EMAIL PROTECTED] Subject: RE: [avr-gcc-list] Binding a register pair to a pointer To: [EMAIL PROTECTED], avr-gcc-list@nongnu.org Date: Wednesday, December 10, 2008, 12:45 AM This is describe in the avr-libc user manual, in the FAQ. ___ AVR-GCC-list mailing list AVR-GCC-list@nongnu.org http://lists.nongnu.org/mailman/listinfo/avr-gcc-list