News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Getting started

Started by roddym, February 28, 2010, 06:48:46 PM

Previous topic - Next topic

roddym

Quote from: jj2007 on March 02, 2010, 07:51:53 AM

include \masm32\include\masm32rt.inc

.code
AppName db "Masm32:", 0

start: MsgBox 0, "Hello World", addr AppName, MB_OK
exit

end start


I've also tried :

include \masm32\include\masm32rt.inc

.code
AppName db "Masm32:", 0

start:
mov eax,9h
mov ebx,9h
add eax,ebx
MsgBox 0, eax, addr AppName, MB_OK
exit

end start


trying to find out how to show the result in the message box can anyone walk me through it ?


qWord

MsgBox 0, str$(eax), addr AppName, MB_OK
FPU in a trice: SmplMath
It's that simple!

roddym

see now I love it as I now can figure things out faster thank you all I'll see what I can do for now

roddym

is there a list I'm not seeing that list how to get things like menus etc ?

qWord

FPU in a trice: SmplMath
It's that simple!

roddym

can't get it to work wonder if I have winrar lol

roddym

include \masm32\include\masm32rt.inc

.code
AppName db "Masm32:", 0
AppName2 db "Masm33:", 0
AppName3 db "Masm34:", 0

start:
mov eax,1h
MsgBox 0, str$(eax), addr AppName, MB_OK
add eax,eax
inc eax
MsgBox 0, str$(eax), addr AppName2, MB_OK
add eax,eax
inc eax
MsgBox 0, str$(eax), addr AppName3, MB_OK
exit

end start


It works for the first 2 but the third only changes the title the number should change but it doesn't it's the mersenne sequence if you'd like to know so 1,3,7, right now it's going 1 3 & 3


qWord

eax,edx and ecx can be used by API-call without saving them. Edi, esi and ebx are preserved (inside API-callback you must preserve them if used). Also eax is used as return value for functions, so that its content allways change. This is called WinABI - Windows Application Binary Interface.
You must save EAX (e.g. on stack), because it is changed by MessageBox.
FPU in a trice: SmplMath
It's that simple!

roddym

thanks I changed it to ebx it worked better