[Top][All Lists]

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

Re: [avr-gcc-list] assembler expressions

From: Jesper Hansen
Subject: Re: [avr-gcc-list] assembler expressions
Date: Sun, 6 Mar 2005 13:53:27 +0100

On Sun, 6 Mar 2005 20:52, Jesper Hansen wrote:
I know, and you also get the wrong result !
That's why the typecasts are needed. (Or a different way to obtain the
correct result).
I think it MUST be possible to do this in the assembler (or preprocessor or
it's SO easy in C.

Well you are asking the _assembler_ to compute an expression in C.
The assembler does assembly, not C :)

(My impression is the C compiler computes the constants not the preprocessor)

You could put the assembly inside inline assembly clauses in a C file.

Perhaps that's what's going wrong. I would expect the preprocessor to work it out,
or at least that was what I was hoping :-)
I just think there HAVE to be a way to do this directly in the assembly file, instead of involving a C file. In this case, the assembly code is a standalone project,
and there would be no other files.


reply via email to

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