avr-gcc-list
[Top][All Lists]
Advanced

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

[avr-gcc-list] gcc asm help


From: Mike Bechtold
Subject: [avr-gcc-list] gcc asm help
Date: Wed Jan 31 03:58:04 2001

can any one help me code this example.  I believed that I'm having problems
with the label sections

original code
//    asm ("cp   R24, R25");  // does ClocksUntilEOS==ClockCounts ?
//    asm ("brne EnableOtherIRQs");
calling code.
   brne(R24,R25, "EnableOtherIRQs"); // do I need quotes here?

macro to replace commented out code above.
#define brne(reg1, reg2, label) ({
asm volatile (              \
        "cp R%0, R%1 \n"    \
        "brne %2\n"        \
       :: "I" ((uint8_t)(reg1)), \
          "I" ((uint8_t)(reg2)), \
          "g" (label) \ // what type do I use here?
    );                          \
    })
thanks
Mike

=========================================
Mike Bechtold
Software Technician with Banner Engineering
address@hidden





reply via email to

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