avr-libc-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-libc-dev] inline assembler, 2nd register


From: Klaus Kloos
Subject: [avr-libc-dev] inline assembler, 2nd register
Date: Sun, 1 Jun 2003 10:16:30 +0200

Hello

Im new to this mailinglist. Ive searched the archive, but found no mail helping me. I have a problem getting the 2nd register of a 16bit pointer to PRGMEM in assembler.

I want to have something like PRG_RDB(), but for 16bit.

lengthMin is a register for the result., aktRectP is the pointer to the program memory.

        __asm__ (                               \
                "lpm %[reg0in],z+" "\n\t"                   \
                "lpm %[reg1in],z+" "\n\t"                   \
                : [reg0out] "=r" (lengthMin)          \
: [inAdr] "z" (aktRectP), [reg0in] "r" (lengthMin), [reg1in] "r" (lengthMin) \
        );

reg1in has to be the register aboth reg0in. How can I get this?

Is there a posibility to suppess the warning about the uninitialized lengthMin without setting it to a value in before (which will give me unwanted additional code)?

I have found '__AVR_ENHANCED__' in prgmspace.h. Where is it defined?
On my mega16 it is set. On what platforms is it set?

Many thanks for your help.

Greetings klaus.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]