Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Re: [lpc2000] Re: NOP Question

2004-05-04 by Beeno Rabbit

The following code works well :)
__asm
{
MOV r0, r0
}

----- Original Message -----
From: lpc2100
Sent: Thursday, April 29, 2004 9:18 AM
Subject: [lpc2000] Re: NOP Question

You can use the following in your C function. This should work for
ADS 1.2 C compiler. Please post if it works or not.

Does gcc support __asm ?

__asm
{
NOP
}

OR

__asm
{
MOV r0, r0
}


ADS 1.2 assembler supports the NOP pseudo instruction.

Relevant text from the assembler guide
http://www.arm.com/pdfs/DUI0068B_ADS1_2_Assembler.pdf

NOP ARM pseudo-instruction
NOP generates the preferred ARM no-operation code.

The following instruction might be used, but this is not guaranteed:
MOV r0, r0
Syntax
NOP

Usage
NOP cannot be used conditionally. Not executing a no-operation is the
same as executing
it, so conditional execution is not required.
ALU status flags are unaltered by NOP.

--- In lpc2000@yahoogroups.com, "Beeno Rabbit"
wrote:
> I am using ADS2.1 compiler (Code Warrior). I don't know how to
code "NOP" in the C code.
> Any example for this?
>
> Beeno
>
>
>
> ----- Original Message -----
> From: Robert Adsett
> To: lpc2000@yahoogroups.com
> Sent: Wednesday, April 28, 2004 1:52 AM
> Subject: Re: [lpc2000] NOP Question
>
>
> At 01:28 AM 4/28/04 +0800, you wrote:
> >I am a new user of lpc2000 series. I don't know
> >how to write "NOP" in the C code. I have tried
> >_asm("NOP") and #asm("nop") but failed.
> Two questions:
> Which compiler?
> What do you mean by failed?
>
> Robert
>
> " 'Freedom' has no meaning of itself. There are always
restrictions,
> be they legal, genetic, or physical. If you don't believe me,
try to
> chew a radio signal. "
>
> Kelvin Throop, III
>
>
>
> --------------------------------------------------------------------
----------
> Yahoo! Groups Links
>
> a.. To visit your group on the web, go to:
> http://groups.yahoo.com/group/lpc2000/
>
> b.. To unsubscribe from this group, send an email to:
> lpc2000-unsubscribe@yahoogroups.com
>
> c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service.

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.