Texas Instruments MSP430x4xx User Manual
Page 87

Instruction Set
3-53
RISC 16−Bit CPU
* NOP
No operation
Syntax
NOP
Operation
None
Emulation
MOV
#0, R3
Description
No operation is performed. The instruction may be used for the elimination of
instructions during the software check or for defined waiting times.
Status Bits
Status bits are not affected.
The NOP instruction is mainly used for two purposes:
-
To fill one, two, or three memory words
-
To adjust software timing
Note:
Emulating No-Operation Instruction
Other instructions can emulate the NOP function while providing different
numbers of instruction cycles and code words. Some examples are:
Examples:
MOV
#0,R3
; 1 cycle, 1 word
MOV
0(R4),0(R4)
; 6 cycles, 3 words
MOV
@R4,0(R4)
; 5 cycles, 2 words
BIC
#0,EDE(R4)
; 4 cycles, 2 words
JMP
$+2
; 2 cycles, 1 word
BIC
#0,R5
; 1 cycle, 1 word
However, care should be taken when using these examples to prevent
unintended results. For example, if MOV 0(R4), 0(R4) is used and the value
in R4 is 120h, then a security violation will occur with the watchdog timer
(address 120h) because the security key was not used.