Any tips? ;)
I know the _basics_ of assembler, and I "followed" two tutorials earlier today.
One was creating a messagebox, and the other a window. I don't understand everything of the window-tutorial though (can't find the url right now either)...
Any tips of
1) Nice tutorials/guides so I can learn more
2) Programs to use? I use notepad/MASM 6.14 right now. ;)

And btw, sorry if this has been posted (I'm kinda sure it has been). I searched a little but I didn't find a thread about it.. :)

Edit: Oooops. Didn't notice the sub-forums. *reading tutorials* :)
Posted on 2002-06-10 21:51:57 by Jarjar

First, welcome to the board. We're not very '7ee4' here, so don't worry about re-posting someone else's question. (If someone remembers, they will post a link to a nice answer.)

(But searching for previous posts is guarnteed quicker then just re-asking).

The only, but truly very good guids to windows programming under assembler are Iczelion's tutorials (linked to by this board somewhere). Unfortunately, they assume you already know how to program in assembly. THAT info is hard to find. I'm self-taught in asm from years back (on other platforms), so I can't offer any advice there.

Hunt around, read some more tutorials till you feel you have a feel for it, then try coding some simple app. You WILL discover problems during that coding, and figuring out what you need to solve them will take you to that magic place.

Good luck.
Posted on 2002-06-10 22:13:24 by Ernie
Just to give you visual on windows programming: it's like any object you see in the real world, you supply the details, it's specification and create it, then you determine the result - was it successful?, did it did crumble? what was it like? How did it look?...

You see it's the same as the MessageBox API call, you need 4 specifications/details of the API and you call the API to create the message box then a return value in EAX will determine the result.

The MessageBox API needs 4 parameters: hWnd, lpText, lpCaption, uType.

for now, forget about hWnd cause it will just confuse you. For lpText you specify the address of the text to be displayed. lpCaption for the address of the text to be displayed on the title bar of the MessageBox. For the uType, you have options like MB_ABORTRETRYIGNORE, MB_CANCELTRYCONTINUE, MB_ABORTRETRYIGNORE, MB_OK, MB_OKCANCEL, MB_RETRYCANCEL, MB_YESNO and MB_YESNOCANCEL.

Depending on what you specify for the uType parameter will determine what your MessageBox will look like. If you specify MB_OK - you'll see an OK button on the MessageBox. If it's MB_OKCANCEL you'll see OK and CANCEL buttons...

After you call the API you then have to determine what the user clicked on. Assuming you specified MB_OKCANCEL for the uType parameter, it's intuitive that the user may click either OK or CANCEL so you must be prepared to handle these events. Now if the user clicked OK you can check if eax == IDOK, if it's not then the user must've clicked cancel.

.model flat, stdcall
option casemap:none
include \masm32\include\
include \masm32\include\
include \masm32\include\
includelib \masm32\lib\user32.lib
includelib \masm32\lib\kernel32.lib

MsgCaption db "Hello Cruel World",0
MsgBoxText db "Click either OK or CANCEL",0

MsgOK db "You clicked OK", 0
MsgCANCEL db "You clicked CANCEL", 0

invoke MessageBox, NULL,addr MsgBoxText, addr MsgCaption, MB_OKCANCEL
.IF (eax == IDOK)
invoke MessageBox, NULL,addr MsgOK, addr MsgCaption, MB_OK
invoke MessageBox, NULL,addr MsgCANCEL, addr MsgCaption, MB_OK
invoke ExitProcess,NULL
end start
There are more options for the MessageBox API, get the platform sdk and it will solve most of your problems and questions. Generally window programming is event driven meaning you create a possibility of events and handle those events - just like you handled the OK and CANCEL buttons.
Posted on 2002-06-10 22:21:23 by stryker
stryker: thanks, learned some stuff from that (the IDOK for example, i tried yes/no and a little other stuff with .ELSEIF, worked fine :)).
I've done too much assembly today... time to rest (05:55am :rolleyes: )
Posted on 2002-06-10 22:52:56 by Jarjar
hi Jarjar welcome.

first off i would goto iczelion site and look at his tutorials there. its that same ones you've read here but they are in html format and a much easier read. iczelion has also posted source code the different people have contributed you can take a look at. his site is at:

another good tutorial written by Thomas can be found at:

alot of people like to jump directly into the gui programing aspect of assembly programing. you will need to reference the msdn quite a bit since we use a considerable amout of api calls in our code.

if your interested in learning in more about assembly language read The Art of Assembly Language Programming at its an excellent reference. it doesnt provide anything about win32 gui programming and was originally intended as a referece for dos programming but is still very useful.

a very nice IDE to use right now is RadASM by KitilO. you can make your gui in a matter of a few minutes and has most everything you will need to jump right in to assembly programming.
Posted on 2002-06-10 23:38:11 by smurf


ROTFL!!! :grin:
Posted on 2002-06-11 01:48:54 by bazik