Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is both "03 c8" and "01 c1" = add ecx, eax

Tags:

x86

assembly

While using cheat engine I stumbled upon that both of these opcodes results in the same assembly code:

03C8 add ecx,eax

and

01C1 add ecx,eax

Why is this and is there any difference?

like image 822
Tyilo Avatar asked Nov 07 '12 12:11

Tyilo


1 Answers

The 01 form is add r/m, r, the 03 form is add r, r/m. Since both operands are registers, it can be encoded either way.

like image 177
harold Avatar answered Nov 15 '22 11:11

harold