Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Re: *** H E L P ***

2008-02-28 by Don Kinzer

--- In AVR-Chat@yahoogroups.com, Tom <tjkeller1@...> wrote:
>I am getting:
> ../embedded_asm.c:63: error: expected ')' before '(' token

You do have to follow the recipe.

asm volatile (

"mov r16, %0" "\n\t"
"mov r17, %1" "\n\t"
"mov r18, %2" "\n\t"
"mov r19, %3" "\n\t"

"mov %3, r19" "\n\t"
"mov %2, r18" "\n\t"
"mov %1, r17" "\n\t"
"mov %0, r16" "\n\t"

: "=r" (var1), "=r" (var2), "=r" (var3), "=r" (var4)
:
: "r16", "r17", "r18", "r19"
);

Perhaps this is simply an exercise but the code does nothing other 
than use CPU cycles.

Don Kinzer
ZBasic Microcontrollers
http://www.zbasic.net

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.