NOP Question
2004-04-27 by Beeno Rabbit
Yahoo Groups archive
Index last updated: 2026-04-28 23:31 UTC
Thread
2004-04-27 by Beeno Rabbit
Dear All,
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.
Beeno2004-04-27 by Robert Adsett
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, III2004-04-27 by Sten Larsson
If your assembler does not have NOP (the ARM architecture does not have it), use for instance: MOV R0, R0 /sten Nohau Corp
----- Original Message -----
From: "Beeno Rabbit" <beenorabbit@...>
To: <lpc2000@yahoogroups.com>
Sent: Tuesday, April 27, 2004 10:28 AM
Subject: [lpc2000] NOP Question
Dear All,
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.
Beeno2004-04-28 by Beeno Rabbit
----- Original Message -----From: Robert AdsettSent: Wednesday, April 28, 2004 1:52 AMSubject: Re: [lpc2000] NOP QuestionAt 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
2004-04-29 by lpc2100
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" <beenorabbit@u...>
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.2004-04-29 by Michael Anburaj
Hi Beeno,
#define NOP __asm \
{ \
nop; \
}
should work for both ADS & SDT.
Cheers,
-Mike.
--- Beeno Rabbit <beenorabbit@...> 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.
>
>
__________________________________
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs
http://hotjobs.sweepstakes.yahoo.com/careermakeover2004-04-29 by Michael Anburaj
Hi all, The Arm uCOS-II port includes Thumb mode tasks now!!! Features: 1. The OS can be built for either ARM or Thumb mode tasks. 2. The following 3 tool-chains can be used to build: ADS, SDT or GCC (arm-elf-gcc) 3. The uCOS kernel takes just over 4K bytes of ROM (text & const sections) in Thumb mode when built using SDT. ADS might yield a better code. 4. Includes HAL for LPC241x. Download page: http://geocities.com/michaelanburaj/uCOS/index.html http://geocities.com/michaelanburaj/ Cheers, -Mike. __________________________________ Do you Yahoo!? Win a $20,000 Career Makeover at Yahoo! HotJobs http://hotjobs.sweepstakes.yahoo.com/careermakeover
2004-04-29 by Paul Blackburn
If you do decide to use the MOV R0, R0 option instead of the NOP please check whether you are compiling your code in ARM or Thumb mode.
MOV R0, R0 is a NOP in ARM mode but in Thumb mode this affects the condition code flags in the CPSR. (for more details check the Instruction Set Reference Document).
So if you are using Thumb mode use MOV R8, R8 (or any of the high registers) instead.
If you just use NOP then the compiler will use MOV R0, R0 or MOV R8, R8 accordingly..
Paul.
-----Original
Message-----
From: lpc2100
[mailto:lpc2100@...]
Sent: Thursday, April 29, 2004
2:19 AM
To: lpc2000@yahoogroups.com
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.
2004-05-04 by Beeno Rabbit
----- Original Message -----From: lpc2100Sent: Thursday, April 29, 2004 9:18 AMSubject: [lpc2000] Re: NOP QuestionYou 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.