The JMP instruction

The JMP instruction is used for unconditional transfer of program control to the specified memory address.

The JMP instruction format

InstructionDescription
JMP addr16 Performs an unconditional jump to an address or label.

Usage example

; Author: Evgeny Sergeevich Dovgopolov

main:
    mvi     a, 02h  ; Load the hexadecimal value 02h into register A
    jmp     Skip    ; Perform an unconditional jump to the label Skip

    add     a       ; This code will not be executed

Skip:
    xra     a       ; Clear register A

    hlt             ; Stop program execution

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

Processor status flags

S
No
Z
No
AC
No
P
No
CY
No