The NOP instruction

No operation.

Format of the NOP instruction

InstructionDescription
NOPA one-byte instruction with no operation.

This instruction performs no operation. It occupies a place in the instruction stream and spends time executing, but does not affect the state of the processor (registers, flags), except for the IP register. The machine code of the nop instruction is 90h.

Usage example

It is used to create small delays or to align code.

title Author: Evgeny Sergeevich Dovgopolov

.model small
.stack 100h

code segment public        ; Start of the code segment
    assume cs:code

    main proc              ; Start of the main procedure
        nop                ; Do nothing

        mov     ax, 4C00h  ; Copy the process termination function number into ah and the value into al
        int     21h        ; Call the interrupt
    main endp              ; End of the main procedure

code ends                  ; End of the code segment
end main                   ; End of file. The main procedure is the entry point

Example taken from the textbook "HANDYFAR - MASM (Evgeny Sergeevich Dovgopolov)".

Processor status flags

CF
No
PF
No
AF
No
ZF
No
SF
No
TF
No
IF
No
DF
No
OF
No