From: Marcin C. <sa...@sa...> - 2012-08-21 10:45:13
|
>> Matthias Trute <mt...@we...> wrote: > Hi, > >> avrasm2 generally does not allow using not-yet-defind >> labels in macros like this. > > really? I doubt it. To be correct: ifdef returns false for forward references and therefore jmp is assembled by AVRASM2. >> 2) add a nop after "rjmp" in the "jmp_" macro to keep >> sizes of the macro expansion constant. > > That would contradict one of the 2 intentions of > the macro: size savings (the other one is speed). I agree, but... > 3) get an smart jump instruction. ... how do solve the problem: jmp_ A: nop nop A: The final address of A depends on the size of jmp_ expansion, that may be 1 word or 2 words. Size of the jmp_ expansion depends on how for A is. Isn't that a circular reference? //Marcin |