flat assembler
Message board for the users of flat assembler.

Index > Main > Why not OMF

Goto page 1, 2  Next
Author
Thread Post new topic Reply to topic
penguinglx



Joined: 05 Aug 2007
Posts: 10
penguinglx 05 Aug 2007, 06:57
Hi I started using FASM for my project yesterday
I wrote a module in Fasm and compiled it to Obj file so I could link it with another obj files using tlink32.exe
But it didnt work since tlink32.exe doesnt support COFF .

What can I do , I was about to convert COFF 2 OMF but coff2omf.exe released by borland doesnt work with OBJ files ,it only works with LIB files.

Can u upgrade this FASM ? or can u tell me some tools to convert COFF to OMF ?
THANKS
Post 05 Aug 2007, 06:57
View user's profile Send private message Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1902
DOS386 05 Aug 2007, 07:02
> Hi I started using FASM for my project yesterday
> I wrote a module in Fasm and compiled it to Obj

COFF Sad

IIRC, only free assemblers supporting OMF are NASM, LZASM, and (MA$M syntax, bad (?)) WASM ...

> Can u upgrade this FASM

awaiting answer from Tomasz ...
Post 05 Aug 2007, 07:02
View user's profile Send private message Reply with quote
penguinglx



Joined: 05 Aug 2007
Posts: 10
penguinglx 05 Aug 2007, 07:13
Well , actually I could u NASM for my project but I dont know if NASM support SSE x instructions , So I decided to move my butt to FASM since it's been said that FASM support MMX,SSE,SSE2,3 , and one more thing I dont like NASM much coz it has too many syntaxes , and Im kinda lazy to read its doc
Post 05 Aug 2007, 07:13
View user's profile Send private message Reply with quote
Niels



Joined: 17 Sep 2006
Posts: 255
Niels 05 Aug 2007, 07:58
Is 'Borland' refering to the FreeCommandLineCompiler...

Changing to http://www.delorie.com/djgpp/, you can use FASM-output right away.

Niels
Post 05 Aug 2007, 07:58
View user's profile Send private message Reply with quote
Niels



Joined: 17 Sep 2006
Posts: 255
Niels 05 Aug 2007, 08:23
penguinglx wrote:
and Im kinda lazy to read its doc


Maybe for you it's different, but when I started with ASM the NASM doc was one of the reasons to pick NASM, it's a rather 'easy' switch later on to FASM; There is reason to switch later on. Wink

Niels
Post 05 Aug 2007, 08:23
View user's profile Send private message Reply with quote
Japheth



Joined: 26 Oct 2004
Posts: 151
Japheth 05 Aug 2007, 08:26
the COFF2OMF tool of Digital Mars C++ can convert .OBJ files to OMF.

Another option is to use OW's wlink, which accepts both OMF and COFF modules, but my experience with wlink is that is has problems with files generated by Non-OW compilers/assemblers.
Post 05 Aug 2007, 08:26
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8354
Location: Kraków, Poland
Tomasz Grysztar 05 Aug 2007, 14:11
I guess the only true reason why it never got implemented into fasm was my own stubbornness. I did not like OMF format, the COFF and ELF specifications were much more appealing to me, and thus I never even tried to incorporate such support into fasm (also, a few things would have perhaps to be done a bit differently inside fasm in order to get decent OMF support).
Post 05 Aug 2007, 14:11
View user's profile Send private message Visit poster's website Reply with quote
gunblade



Joined: 19 Feb 2004
Posts: 209
gunblade 05 Aug 2007, 15:52
Would it not be possible to simply "emulate" (wrong word.. but cant remember the right one) OMF? I've seen people re-writting the ELF header by hand, and then just telling fasm to compile it as a flat binary. It was in some competition to try and get the smallest (working) ELF header i believe.

The only pain might be dealing with the "sections" and alignments, but it still must be possible, just a bit more hastle.
Post 05 Aug 2007, 15:52
View user's profile Send private message Reply with quote
MichaelH



Joined: 03 May 2005
Posts: 402
MichaelH 05 Aug 2007, 22:05
Hi gunblade, have you got a link to that competition? I've been meaning for a long time to make a handmade elf formatted app for fasm.
Post 05 Aug 2007, 22:05
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 05 Aug 2007, 22:14
Michael, take a look at http://ellocodelassembler.googlepages.com/elf.zip (ignore "formatter example.asm" for now and just take a look into "example.asm").

Also take a look at http://www.muppetlabs.com/~breadbox/software/tiny/teensy.html which was of great help when I was "designing" my elf package.

PS: And look http://www.muppetlabs.com/~breadbox/software/tiny/ as well
Post 05 Aug 2007, 22:14
View user's profile Send private message Reply with quote
penguinglx



Joined: 05 Aug 2007
Posts: 10
penguinglx 06 Aug 2007, 06:09
Niels wrote:
Is 'Borland' refering to the FreeCommandLineCompiler...

Changing to http://www.delorie.com/djgpp/, you can use FASM-output right away.

Niels


Well , there was one time I used DJGPP and NASM for my DOS projects , But I gave it up coz I couldnt use VESA 2.0 32-bit Subroutines (may be there was some problems since I was on Windows Xp ,and maybe It didnt allow me to do so or so...), I was unable to get the Base Address of the Video Ram . I did everything and try to read carefully VESA doc 2.0 to make it work as 32-bit style . But It didnt make it (may be I need to read WIndows 95 Secrets to get it on). Anyway I moved to BCC 5.5 FREE CMDLINE CMPILER


I have just taken a look at that link for DJGPP 2.0 , they say you need some auxiliary tools to work with DJGPP 2.0 for Windows Apps or another compiler
that AUX pack is RSXNTDJ , but all the links are dead now . And more over does DJGPP 2.0 support OPENGL Libs and headers ?

Imma try Japheth's way .
Anyway thanks
Post 06 Aug 2007, 06:09
View user's profile Send private message Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3175
Location: Denmark
f0dder 06 Aug 2007, 10:05
Niels wrote:

Changing to http://www.delorie.com/djgpp/, you can use FASM-output right away.

Doesn't DJGPP still use gnu-coff rather than ms-coff format? Causes very funny effects if you try to use ms-coff object files with a gnu-coff linker, because of relocation format differences.

penguinglx: do yourself a favor and find "vc2003 toolkit" from Microsoft, it's a far better compiler than Borland's. Unfortunately Microsoft doesn't offer the download anymore, since in their mind vc2003 has been superceded by their 2005 Express editions (which are fine and all, but a much larger download).

Only worry about DJGPP if you really want to make DOS apps, but imho even then there's better choices (win32 compiler with a PE-executable supporting dos extender). If you want to use GCC (which DJGPP does), check out the http://www.mingw.org project.
Post 06 Aug 2007, 10:05
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 06 Aug 2007, 10:23
f0dder: FASM can output some "COFF" format to, not just "MS COFF". I never used it, so i am not sure if it is gnu-coff of different COFF "implementation".
Post 06 Aug 2007, 10:23
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1902
DOS386 06 Aug 2007, 10:40
pengu wrote:

Quote:
was one time I used DJGPP and NASM for my DOS projects , But I gave it up coz I couldnt use VESA 2.0 32-bit Subroutines (may be there was some problems since I was on Windows Xp ,and maybe It didnt allow me to do so or so...), I was unable to get the Base Address of the Video Ram . I did everything and try to read carefully VESA doc 2.0 to make it work as 32-bit style . But It didnt make it


Unsurprisingly Sad

1. It might be a good idea to decide for what OS or "OS" you want to develop before selecting a compiler Idea
2. DGJPP is indeed a very bad choice for Vi$ta or XP Sad
3. VESA 2.0 is the preferred way to develop DOS GUI apps Idea
4. It didn't work because it's crippled off from XP Shocked

Quote:
I have just taken a look at that link for DJGPP 2.0 , they say you need some auxiliary tools to work with DJGPP 2.0 for Windows Apps


Quote:
does DJGPP 2.0 support OPENGL Libs and headers ?


Probably no ... would be useless and redundant Confused

fodder wrote:

Quote:
worry about DJGPP if you really want to make DOS apps


Right.

Quote:
imho even then there's better choices (win32 compiler with a PE-executable supporting dos extender).


Disagree Sad

Quote:
want to use GCC the http://www.mingw.org project


Right.

_________________
Bug Nr.: 12345

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

Status: Closed: NOT a Bug
Post 06 Aug 2007, 10:40
View user's profile Send private message Reply with quote
MichaelH



Joined: 03 May 2005
Posts: 402
MichaelH 06 Aug 2007, 11:26
Awesome Loco, just what I was looking for, thank you.
Post 06 Aug 2007, 11:26
View user's profile Send private message Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2341
Location: Usono (aka, USA)
rugxulo 06 Aug 2007, 16:28
I think OBJ/OMF has way too many quirks to be supported (easily, at least). YASM has had this as a TODO for quite a while and (AFAIK) hasn't started yet. But OpenWatcom does support it because it's the "only format which truly supports all x86 features" (or something like that, I dunno how true that is).

Yeah, I'm sure it's easier / better (IMO and Tomasz's too, probably) to just use NASM or LZASM instead of expecting FASM to add it. Else somebody somewhere needs to write a decent COFF2OBJ and put it on Sourceforge!!

P.S. NASM "stable" 0.98.39 supports `Pentium', `P6', `MMX', `3DNow!', `SSE' and `SSE2' opcodes (and the newer development branch, 0.99.01, srcs only, supports x86-64 stuff).

EDIT:
Quote:

Agner Fog's OBJCONV (GPL license), currently at v1.02 (Oct 12, 2007). It's a object file converter and disassembler.

http://www.agner.org/optimize/objconv.zip

Included binary is Win32, works with HXRT in DOS.


Last edited by rugxulo on 12 Dec 2007, 14:57; edited 1 time in total
Post 06 Aug 2007, 16:28
View user's profile Send private message Visit poster's website Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3175
Location: Denmark
f0dder 07 Aug 2007, 10:37
Imho if you do 32bit development, you don't need OMF.

It's a pretty quirky format indeed, but while it does have some smart things in it, it's too much of a mess to bother with, imho. Especially because of all the vendor extensions that "might not be 100% properly documented" >_<
Post 07 Aug 2007, 10:37
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 07 Aug 2007, 17:55
There is no advantage to FASM supporting it besides letting you use FASM's strengths (clear syntax? macros? x86-64?) with OBJ-only compilers (e.g. Digital Mars, CC386, OpenWatcom). Just use an assembler that already supports it instead of waiting forever for FASM to get it. And for stuff from scratch, as vid says, you don't need it.

P.S. f0dder, ever tried CC386 yet? It's got HX support now! Wink
Post 07 Aug 2007, 17:55
View user's profile Send private message Visit poster's website Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3175
Location: Denmark
f0dder 08 Aug 2007, 00:29
rugxulo: never actually used CC386, but I've downloaded it a couple of times during the years Smile. IMHO if you're going to do C/C++ development, you might as well use a full optimizing compiler (intel, microsoft, or GCC). But I'd consider playing with CC386 if needed a compiler to output code for one of my VMs, should be easier to deal with than GCC :]
Post 08 Aug 2007, 00:29
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 12 Dec 2007, 14:59
*bump*

Anyone tried Agner Fog's OBJCONV?
Post 12 Dec 2007, 14:59
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:  
Goto page 1, 2  Next

< 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.