Assembly language--jcxz instruction

     jcxz instruction

     The jcxz instruction is a conditional transfer instruction, all conditional transfer instructions are short transfers,

     Include the shifted displacement in the corresponding machine code, not the destination address. The range of IP modification is -128~127.

     Instruction format: jcxz label (if (cx)=0, transfer to the label for execution.)

     When (cx) = 0, (IP) = (IP) + 8-bit shift

     8-bit displacement = the address at the "label"-the address of the first byte after the jcxz instruction;

     The range of 8-bit displacement is -128~127, expressed in complement;

     The 8-bit displacement is calculated by the compiler at compile time.

     When (cx)!=0, do nothing (the program is executed downward)

 

Reference: <<Assembly Language>> Wang Shuang

Guess you like

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