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

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

[avr-gcc-list] avr-as macro calls with char constant


From: Klaus Rudolph
Subject: [avr-gcc-list] avr-as macro calls with char constant
Date: Wed, 7 Mar 2001 09:07:43 +0100 (MET)

Hi All,

I have a problem with assembler macro calls. I find no
way to get a char constant work within a macro call, only
the hex constant works fine. Why? Is there a way to change
this behavior. A work around maybe?
Here the example:


********************************************

#define maintmp r18

; The macro which works fine

.macro WorkAtKey Key Function
    cpi maintmp, \Key
    brne l1_WorkAtKey\@
    rcall \Function
    rjmp start
l1_WorkAtKey\@:
.endm


; the macro calls for function to key assignment
start:
    WorkAtKey 0x61 func1        ; this works well
    ;WorkAtKey 'b' func2        ; this gives the error ***ERROR***
    ; is there a way to make that work with direct
    ; giving the char quoted or not to the macro call????

;and the functions ...

func1:
ret

func2:
ret

************************************************
EOF


Thanks

Klaus

P.S. In hope this list is not only for discuss C-language problems
with the avr? If so, tell me. Thanks

-- 
Sent through GMX FreeMail - http://www.gmx.net




reply via email to

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