Assembly language-the principle of branch instructions

       The instructions that can modify IP, or modify CS and IP at the same time are collectively referred to as transfer instructions. In a nutshell, a transfer instruction is an instruction that can control the CPU to execute code somewhere in the memory.

The transfer behavior of 8086CPU has the following categories.

      When only the IP is modified, it is called intra-segment transfer, such as jmp ax.

      When CS and IP are modified at the same time, it is called inter-segment transfer, such as jmp 1000:0.

Due to the different scope of IP modification by the transfer instruction, the transfer within the segment is divided into short transfer and near transfer.

      The modification range of the short transfer IP is -128 ~ 127.

      The modification range of the near transfer IP is -32768 ~ 32767.

The transfer instructions of 8086CPU are divided into the following categories.

      Unconditional transfer instructions (such as: jmp)

      Conditional branch instruction

      Loop instructions (eg: loop)

      process

      Interrupt

Guess you like

Origin blog.csdn.net/ma2595162349/article/details/108543436