飞扬的Blog
主页
登录
【nasm】字节和机器码互相转换
"date"
:
"2020-06-24 03:33:31"
"classfiy"
:
"c++"
"author"
:
"飞扬"
"viewTimes"
:
268
返回
##机器码转字节 ###cmd: > nasm.exe -f bin -o ``test.bin`` ``test.asm`` ``test.asm``是个文本文件,内容如下: > [bits ``32``] mov eax,0x1 [bits ``32``] 这段中的32是位数,16,32,64 输出的 ``test.bin`` 是个二进制文件,读取就是转换后的字节码 ##字节转机器码 ###cmd: > ndisasm.exe -b 32 test.bin 这里的转换直接在 cmd 中显示出来 ##附上这两个文件: [nasm.exe](https://sqcdn.hasagei.com/fysmartblog/files/1/nasm.exe "nasm.exe") [ndisasm.exe](https://sqcdn.hasagei.com/fysmartblog/files/1/ndisasm.exe "ndisasm.exe")