flat assembler
Message board for the users of flat assembler.

Index > Main > object files

Author
Thread Post new topic Reply to topic
dosin



Joined: 24 Aug 2007
Posts: 337
dosin 15 Jan 2008, 21:19
Fasm test.asm some.obj ?

How would I link a .obj file into my fasm program ...

I been looking through the manual.. and have not found anything yet.. and thought I would ask...

and would it support multible .objs

Thanks in advance...
Post 15 Jan 2008, 21:19
View user's profile Send private message Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4624
Location: Argentina
LocoDelAssembly 15 Jan 2008, 21:23
Imposible with fasm, you need a external tool (a linker). Create an object file (COFF, MSCOFF and ELF are supported) of your program and later use a linker.
Post 15 Jan 2008, 21:23
View user's profile Send private message Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4353
Location: Now
edfed 15 Jan 2008, 23:57
or make an equate file to support your obj file.
and include it in your source. need to load the object when program starts.
Post 15 Jan 2008, 23:57
View user's profile Send private message Visit poster's website Reply with quote
dosin



Joined: 24 Aug 2007
Posts: 337
dosin 16 Jan 2008, 00:52
Thanks... I will give it a try...
Post 16 Jan 2008, 00:52
View user's profile Send private message Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1905
DOS386 16 Jan 2008, 01:22
Quote:
Fasm test.asm some.obj ?


NO, FASM doesn't suport OMF objects, this has been discussed many times, several people complained, Tomasz didn't make any statement on this issue Sad

YES, you need a linker for OBJ's, like VALX.

For 32-bit code you can try come "COFF2OMF" tool (untested, at your risk).

You probably could brew an OBJ manually, as one can do with MZ, LE and PE.

NASM and LZASM do support OMF OBJ.

_________________
Bug Nr.: 12345

Title: Hello World program compiles to 100 KB !!!

Status: Closed: NOT a Bug
Post 16 Jan 2008, 01:22
View user's profile Send private message Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3175
Location: Denmark
f0dder 16 Jan 2008, 11:32
Why use OMF object files when there's COFF? Just find a decent linker Smile
Post 16 Jan 2008, 11:32
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8359
Location: Kraków, Poland
Tomasz Grysztar 16 Jan 2008, 13:26
DOS386 wrote:
NO, FASM doesn't suport OMF objects, this has been discussed many times, several people complained, Tomasz didn't make any statement on this issue Sad

http://board.flatassembler.net/topic.php?p=60922#60922
I explained this in a few other places, too.
Post 16 Jan 2008, 13:26
View user's profile Send private message Visit poster's website Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1905
DOS386 20 Jan 2008, 02:01
http://board.flatassembler.net/topic.php?p=383#383
http://board.flatassembler.net/topic.php?p=22465#22465
http://board.flatassembler.net/topic.php?p=33457#33457
http://board.flatassembler.net/topic.php?p=60922#60922

Tomasz wrote:

> I explained this in a few other places, too.

YES, long time ago. I was somewhat wrong Sad

fodder wrote:

> Why use OMF object files when there's COFF? Just find a Decent Linker

NO. It's not about finding a D.L. or L.D. Laughing - it's about (OK, not very up to date) 16-bit (there is no COFF-16), and using FASM with compilers and linkers using OMF (VALX), and existing OMF stuff.

I'l add a FAQ ASAP Idea
Post 20 Jan 2008, 02:01
View user's profile Send private message Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3175
Location: Denmark
f0dder 20 Jan 2008, 09:26
DOS386: sure, if somebody is doing 16-bit code, they won't be using COFF. (But why write big 16-bit programs these days?).

Most people asking about OMF/COFF, however, tend to be using 32-bit borland tools... and there, the solution is to move to a better toolset.
Post 20 Jan 2008, 09:26
View user's profile Send private message Visit poster's website Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2341
Location: Usono (aka, USA)
rugxulo 25 Jan 2008, 05:12
f0dder wrote:
DOS386: sure, if somebody is doing 16-bit code, they won't be using COFF. (But why write big 16-bit programs these days?).


Why not? 16 MB should be enough for anyon... oh wait, never mind. Laughing


  • legacy code/libs that you want to use
  • still got 286s lying around (not me, sadly, heh)
  • working with embedded systems
  • fun (maybe someone likes the challenge)


Wink

P.S. Try Agner's OBJCONV (via HX if need to run in pure DOS).
Post 25 Jan 2008, 05:12
View user's profile Send private message Visit poster's website 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-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.