Yahoo Groups archive

AVR-Chat

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

Thread

asm in Crossworks

asm in Crossworks

2009-06-15 by kozzyamadeus@ymail.com

Hi all,
Is there a way to mix asm instructions with C code on Crossworks for AVR? Tried asm("..."); but not works.
Regards,

Re: [AVR-Chat] asm in Crossworks

2009-06-16 by leon Heller

----- Original Message ----- 
Show quoted textHide quoted text
From: <kozzyamadeus@ymail.com>
To: <AVR-Chat@yahoogroups.com>
Sent: Monday, June 15, 2009 10:53 PM
Subject: [AVR-Chat] asm in Crossworks


> Hi all,
> Is there a way to mix asm instructions with C code on Crossworks for AVR? 
> Tried asm("..."); but not works.
>

Their MSP430 compiler doesn't support in-line assembler, but has a compiler 
intrinisic _OPC which inserts a word into the instruction stream:

 #include <in430.h>

  _OPC(0x4302); // mov.w #0, sr

There is probably something similar for the AVR compiler.

Leon

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.