flat assembler
Message board for the users of flat assembler.

Index > Windows > how to do this with fasm? (about link)

Author
Thread Post new topic Reply to topic
nisoze



Joined: 09 Oct 2008
Posts: 2
nisoze 09 Oct 2008, 20:37
We can do it with masm32
Code:
link.exe /subsystem:windows  /section:.text,REW  test.obj    


******************
/section:.text,REW ;is important for me
******************

The question is:
How to do it with fasm ?


Regards
Post 09 Oct 2008, 20:37
View user's profile Send private message Send e-mail Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4624
Location: Argentina
LocoDelAssembly 09 Oct 2008, 20:56
REW = Read, Execute, Write?

Try:
Code:
format PE GUI 4.0
entry start

include 'win32ax.inc'

section '.code' code readable executable writable
start:
  invoke  MessageBox, 0, "something", "testing", 0
  invoke  ExitProcess, 0


section '.idata' import data readable writeable

  library kernel32,'KERNEL32.DLL',\
          user32,'USER32.DLL'

  include 'api\kernel32.inc'
  include 'api\user32.inc'
    


No need for linking, fasm will output an executable directly with that code
Post 09 Oct 2008, 20:56
View user's profile Send private message Reply with quote
nisoze



Joined: 09 Oct 2008
Posts: 2
nisoze 10 Oct 2008, 05:40
So thanks
Post 10 Oct 2008, 05:40
View user's profile Send private message Send e-mail 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.