From: Frank K. <fbk...@co...> - 2003-10-09 13:40:01
|
bg...@si... wrote: > how to write gui win program with nasm > ______________________________________ Hi bgcq, Sorry for the delayed response, and I hope you don't mind me transferring your message to the newly-created "nasm-users" list. You can subscribe to it at: http://lists.sourceforge.net/lists/listinfo/nasm-users I'm not much of a Windows programmer. I can do: ;------------------- ; assemble: nasm -f obj hwmb.asm ; link: alink -oPE hwmb.obj win32.lib extern MessageBoxA extern ExitProcess segment .data USE32 title1 db 'A Windows Program', 0 string1 db 'Look, Ma! A Windows program!', 0 segment .text USE32 ..start push dword 0Ch ; button type - supposed to be 0, push dword title1 ; but I need all the help I can get :) push dword string1 push dword 0 ; our "handle", I think call MessageBoxA push dword 0 call ExitProcess ;-------------------- ... but I don't know if that really qualifies as a "gui Windows app", since we haven't created a window. For a "real" Windows program, you'd first register a window class, then create your window, then pretty much sit in a loop fielding messages. I *do* have a few examples of that, but not really cleaned up enough to post. One of the best sources of examples might be to download NaGoA - http://www.visual-assembler.pt.vu/ - whether you use the IDE or not, there are a *ton* of examples included with it. You might also want to take a look at Sheroc's complete package based on Jibz's Xstruc macros. I think it's only got one example with it... http://www.freewebs.com/remains/NASM32PACKAGE.exe I'll try to come up with a "minimal real window" example. Maybe someone else has got one? Well, only a few subscribers to the list, as yet... maybe in a while when we get some subscribers, someone will have one :) Please do subscribe to that list (if you're inclined), and we'll see if we can get some discussion going. Best, Frank |