What is the size of each asm instruction?

前端 未结 2 1457
野性不改
野性不改 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 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.

提交回复
热议问题