Hello World Disassembly
Assembly Code:
.386 is the processor model. Which I think is for 32 bit processors. There's also this .486 one, but that's for 16 bit I think.
I'm not sure what casemap does. I don't think I need to worry about it yet.
What's interesting is in MessageBox I pass it the address of the string Hello World rather then then the actual string.
end must have the label that serves as the entry point for the code.
Disassembly:
I think this PUSH hello.00403000 is the address of the string. It's pushed on the stack. which to be honest I don't get completely then messagebox is called.
Not sure about the last two lines, but I'll find out in a bit.
Code:
.386 .model flat, stdcall option casemap:none include \masm32\include\windows.inc include \masm32\include\kernel32.inc include \masm32\include\user32.inc includelib \masm32\lib\kernel32.lib includelib \masm32\lib\user32.lib .data HelloWorld db "Hello World!", 0 .code start: invoke MessageBoxA, NULL, addr HelloWorld, addr HelloWorld, MB_OK invoke ExitProcess, 0 end start
I'm not sure what casemap does. I don't think I need to worry about it yet.
What's interesting is in MessageBox I pass it the address of the string Hello World rather then then the actual string.
end must have the label that serves as the entry point for the code.
Disassembly:
Code:
00401000 >/$ 6A 00 PUSH 0 ; /Style = MB_OK|MB_APPLMODAL 00401002 |. 68 00304000 PUSH hello.00403000 ; |Title = "Hello World!" 00401007 |. 68 00304000 PUSH hello.00403000 ; |Text = "Hello World!" 0040100C |. 6A 00 PUSH 0 ; |hOwner = NULL 0040100E |. E8 0D000000 CALL <JMP.&user32.MessageBoxA> ; \MessageBoxA 00401013 |. 6A 00 PUSH 0 ; /ExitCode = 0 00401015 \. E8 00000000 CALL <JMP.&kernel32.ExitProcess> ; \ExitProcess 0040101A .-FF25 00204000 JMP DWORD PTR DS:[<&kernel32.ExitProcess>; kernel32.ExitProcess 00401020 $-FF25 08204000 JMP DWORD PTR DS:[<&user32.MessageBoxA>] ; user32.MessageBoxA
Not sure about the last two lines, but I'll find out in a bit.



Nice coloring.
, so beautiful everyone learning