What is the meaning of / 4 in FF / 4?

One site that I usually refer to for x86 documentation contains several command codes with a slash and a number. For example, jmpnear absolute indirect gives FF /4, while jmpfar absolute indirectly gives FF /5.

What do /4u mean /5?

To run a quick little test, I connected to a 32-bit process, allocated a bit of memory, and added assembler jmp dword ptr[0x12345678]; the generated bytecode was FF 25 78563412. I understand the endianess address, but how 25does it relate to /4or /5?

I assume that I generated jmpfar, and that /5means that there were five bytes as parameters (4 bytes for address + 1 byte for 25). I'm still confused by where it comes from 25.

+4
source share
1 answer

In the Intel Reference Guide, section "3.1.1.1 Opcode Column in the Summary Table of Instructions":

  • / digit - a digit from 0 to 7 indicates that the ModR / M bit command uses only the r / m operand (register or memory). The register area contains a digit that provides an extension for the instruction operation code.
  • / r - indicates that the bit ModR / M instructions includes a register operand and the operand r / m.

ModR/M, ,

+9

Source: https://habr.com/ru/post/1545138/


All Articles