[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] Asm Operator for Address Negation
From: |
Ram Kumar Rengaswamy |
Subject: |
Re: [avr-gcc-list] Asm Operator for Address Negation |
Date: |
Thu, 10 Aug 2006 11:37:35 -0700 |
Hi Paulo,
The following suggestion worked :-)
You can always compile a simple C program into assembly and modify
the result to your needs instead of writing it from scratch...
I hope this helps,
For reference, the correct syntax is:
#---------- permsCheckAsm.S--------------------
.section .text
.global permsCheck
permsCheck:
movw r30, r24
subi r30, lo8(-(permsTable)) ;<-- An extra set of parentheses around
the symbol name
sbci r31, hi8(-(permsTable))
ret
Thanks everyone,
-Ram