hello, All:
I have a little puzzle on NASM, I write a very simple case:
[bits 32]
segment .text
global _start
_start:
mov eax, 4
mov ebx, 2
ret
then, compiled it as:
C:\ASM>nasm first.asm -o first.exe -l first.lst
but, When I disassembling the first.exe, I get the code like this:
C:\ASM>ndisasm -b 32 first.exe
00000000 B8 db 0xB8
00000001 0400 add al,0x0
00000003 0000 add [eax],al
00000005 BB02000000 mov ebx,0x2
0000000A C3 ret
My question is: where the mov eax,0x4 in disassembly code? and where
the two add statements come from? where the "00000000
B8 db 0xB8" come from?
Thank you all!


|