ARM Technical Support Knowledge Articles

USING NOP IN C

Applies to: C51 C Compiler

Answer


Information in this article applies to:


QUESTION

What is the syntax for using an NOP instruction in C?

ANSWER

The C51 Compiler comes with an intrinsic library function you may call to invoke the NOP instruction. The NOP instruction is inserted inline. For example:

#include <intrins.h>

void tst_nop (void)  {

   P1 = 0xFF;

   _nop_ ();    // delay
   _nop_ ();
   _nop_ ();

   P1 = 0x00;

}

MORE INFORMATION

Article last edited on: 2005-09-22 11:34:06

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential