测试.asm:
org 0100h
[BITS 16]
mov eax, 0
[BITS 32]
mov eax, 0
然后编译反汇编如下:
nasm test.asm -o test.com
ndisasm -o 0x0100 test.com
结果:
00000100 66B800000000 mov eax,0x0
00000106 B80000 mov ax,0x0
00000109 0000 add [bx+si],al
所以从结果中,我们可以看到[BITS 16]
use eax
,[BITS 32]
use ax
,为什么?结果该不该翻?