简体   繁体   中英

Opcodes:hexadecimal assembly instructions

The page at http://ref.x86asm.net/coder64.html#xF0 gives various hexadecimal opcodes.

In my Visual studio dissambly, i have

FF E0 jmp rax

I just found pasting 'jmp rax' and assembling in https://defuse.ca/online-x86-assembler.htm#disassembly gives the corresponding hex opcode ( FF E0 in this case).

But is there any manual or documentation showing how can we find out the hex equavalent of jump instructions.( eg. i want to find out equivalent of jmp rbx ) Thanks

Yes, the Intel SDM, volume 2, has complete information on encoding instructions.

Felix Cloutier's site contains the same information in a web-friendly format.

This page of that site covers the jmp instruction. It shows that jmp rm32 is encoded as ff /4 . The /4 represents three bits of the rmmod byte (bits 5:3) that serve as an extension to the instruction. The other bits encode the source. Bits 7:6 are 11 to indicate a register. Bits 2:0 identify which register. In ff e0 , bits 2:0 are 000 indicating rax. To use rbx, bits 2:0 would be 011, giving ff e3 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM