开发者

How to simply get a machine code of exactly one assembly instruction?

How to simply get a code of exactly one开发者_Go百科 assembly instruction?

For example for "mov eax 0x14". I want to get it in linux terminal preferably with gcc or gdm.


$ echo "mov eax, 0x14" | as -o /dev/null -al -msyntax=intel -mnaked-reg
GAS LISTING             page 1


   1 0000 B8140000  mov eax,0x14
   1      00


rasm2 from the radare2 package fits this purpose nicely:

$ rasm2 'nop'
90
$ rasm2 -d '90'
nop

http://radare.org/y/?p=examples&f=rasm

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜