What is the size of each asm instruction?

前端 未结 2 1455
野性不改
野性不改 2020-12-17 19:44

What is the size of each asm instruction? Every instruction takes how many bytes? 8 bytes? Four for the opcode and Four for the argument? What happens when you have one opco

相关标签:
2条回答
  • 2020-12-17 19:55

    Machine code size depends on the processor's architecture.

    For example, on IA-32, the instruction size varies from 1 to 6 bytes (or more).

    0 讨论(0)
  • 2020-12-17 20:17

    The size of a machine instruction depends on the processor architecture - there are architectures with fixed size instruction, but you are obviously refering to the IA-32 and Intel 64 and they have strongly varing instruction lengths. The instruction pointer is of course always incremented by the length of the processed instruction.

    You can download the IA-32 and Intel 64 manuals from Intel - they contain almost everything you can know about the architecture. You can find an opcode map and instruction set format in Intel® 64 and IA-32 Architectures Software Developer’s Manual Volume 2B: Instruction Set Reference, N-Z on pages 623 to 768.

    0 讨论(0)
提交回复
热议问题