30 July 2015

Tip: How to create short jmp

When doing some assembler I noticed an important optimization setting for jumps. To force the compiler to generate short jumps (short jmp, short jz, short jnz) the Branch optimization setting must be >= 1.


A short jump requires 2 bytes of opcode instructions. Otherwise a jump takes 6 bytes. Short jumps are only generates when the target is within 127 bytes offset, of course.

1 comment:

  1. Hello. I made a program from the editor works well but fails to compile stack overflow. I discovered that what caused the text control "LB1" that he entered a character called the CHANGE, GOTFOCUS and LOSTFOCUS functions. Remove the function change and fix the problem. note: translated from Spanish to google