flat assembler
Message board for the users of flat assembler.

Index > Main > Turning windows hello world eg into a proc in an obj

Author
Thread Post new topic Reply to topic
Dare2



Joined: 21 May 2006
Posts: 4
Dare2 22 May 2006, 10:23
First, greetings to all.

Second, props to Tomasz Grysztar for fasm - awesome.

Third, help!

I can create a simple obj (MS COFF) for simple things like testing, setting bits, etc. Things that have no includes or macros. Smile

I can also compile the "hello world" example (this makes me an ace, right? Razz )

However I cannot turn that example into a proc in an obj. In fact I am a bit lost on the whole include & macro thing. (Do I lose my ace status? Sad )

I wonder if someone would be kind enough to explain how to turn the example:
Code:
include 'win32ax.inc'
.code
  start:
        invoke  MessageBox,HWND_DESKTOP,"Hi! I'm the example program!","Win32 Assembly",MB_OK
        invoke  ExitProcess,0
.end start    

into a procedure in a linkable obj file, called, say, alert, with the title, message and flags (flag values or-ed together) passed in as three parameters.

It may give me an "aha" experience.

Thanks!


PS: I have searched and browsed and read the docs, but nothing has rung any bells


Edit: Right after posting this I found something. (Don't you hate that?) I don't understand it yet, but it seems to be along these lines. My apologies for this post.
Post 22 May 2006, 10:23
View user's profile Send private message Reply with quote
okasvi



Joined: 18 Aug 2005
Posts: 382
Location: Finland
okasvi 22 May 2006, 10:58
Hi Dare2,

format MS-COFF
no .end start nor .code

ill edit when i find a post for you...



edit: http://board.flatassembler.net/topic.php?t=4135
one of the first threads on Windows-section Wink

oh and .code is doable but dont get too comfortable with macros Smile
Post 22 May 2006, 10:58
View user's profile Send private message MSN Messenger Reply with quote
Dare2



Joined: 21 May 2006
Posts: 4
Dare2 22 May 2006, 11:54
Hi okasvi,

Thanks! Very Happy

okasvi wrote:
.. dont get too comfortable with macros Smile


I don't think there is too much danger of that. Smile I don't really have a clue at the moment. Shocked Smile
Post 22 May 2006, 11:54
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.