flat assembler
Message board for the users of flat assembler.

Index > Main > Why not OMF

Goto page Previous  1, 2
Author
Thread Post new topic Reply to topic
Octavio



Joined: 21 Jun 2003
Posts: 366
Location: Spain
Octavio
f0dder wrote:
rugxulo: IMHO if you're going to do C/C++ development, you might as well use a full optimizing compiler (intel, microsoft, or GCC). ]

IMHO cc386 is a full optimizing compiler, i tried it with a few files and the results are better than with gcc.
Post 12 Dec 2007, 16:50
View user's profile Send private message Visit poster's website Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3170
Location: Denmark
f0dder
You must have compared it to a really ancient GCC then, or without optimization enabled in GCC.
Post 13 Dec 2007, 10:35
View user's profile Send private message Visit poster's website Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2140
Location: Estonia
Madis731
iiv├Ál laaf Very Happy from Agner's:{...supporting the SSE4 and SSE5 instruction sets...}
Post 13 Dec 2007, 12:09
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
OzzY



Joined: 19 Sep 2003
Posts: 1029
Location: Everywhere
OzzY
rugxulo wrote:
*bump*

Anyone tried Agner Fog's OBJCONV?


Thanks! I've been searching for such tool for a long time. It converts formats and also disassembles *.obj files.

I didn't try it yet for COFF-OMF, but I'll try it tomorrow for linking FASM and D (DMD uses OMF).

But for disassembling *.obj it's cool!
Look this:
Code:
format MS COFF

do_something:
mov eax,2
mov ebx,3
add eax,ebx
ret
    

I assembled.
And it disassembled it with objconv:
Code:
; Disassembly of file: test.obj
; Sun Jan 20 00:52:22 2008

; Mode: 32 bits
; Syntax: MASM/ML
; Instruction set: 80386

.386
option dotname
.model flat


.flat   SEGMENT BYTE PUBLIC 'CODE'                      ; section number 1

.flat   LABEL NEAR
        mov     eax, 2                                  ; 0000 _ B8, 00000002
        mov     ebx, 3                                  ; 0005 _ BB, 00000003
        add     eax, ebx                                ; 000A _ 01. D8
        ret                                             ; 000C _ C3
.flat   ENDS

END
    


Nice! Very Happy

The nice thing is that this tool comes with source. Will learn a lot from it.
Post 20 Jan 2008, 03:59
View user's profile Send private message Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3170
Location: Denmark
f0dder
Disassembling .obj is obviously easier than .exe, since you get a lot of symbol information to assist you... but cute nonetheless Smile

If you make the function PUBLIC, the symbol name for your proc really should be picked up...
Post 20 Jan 2008, 09:27
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
penguinglx wrote:

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).
...
Anyway I moved to BCC 5.5 FREE CMDLINE CMPILER


Probably Windows' fault (as mentioned), but I dunno personally. Anyways, you can supposedly "stubit" BC55 .EXEs to run in DOS via WDOSX (although I haven't tried, so I dunno how successful that is).

BTW, DJGPP is a bit more robust and stable (still updated) vs. that old Borland compiler (esp. C++, I assume). But use whatever you want.

penguinglx wrote:

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 ?


Never tried RSXNTDJ, so I dunno how good it is. Yes, I noticed too that the links are dead, dunno why, hopefully someone archived it somewhere.

Anyways, it's probably easier to just use MinGW or OpenWatcom (supports DOS and Win32).

As far as OpenGL is concerned, try this (untested by me, heh, sorry if that annoys you, DOS386): Wink

Quote:

http://www.mesa3d.org/

Mesa is an open-source implementation of the OpenGL specification - a system for rendering interactive 3D graphics.

A variety of device drivers allows Mesa to be used in many different environments ranging from software emulation to complete hardware acceleration for modern GPUs.


... and this:

Quote:

http://www.mesa3d.org/README.DJ

Mesa 6.3 DOS/DJGPP Port v1.7
~~~~~~~~~~~~~~~~~~~~~~~~~~~~



Description:
~~~~~~~~~~~~

Well, guess what... this is the DOS port of Mesa 6.3, for DJGPP fans... Whoa!
The driver has its origins in ddsample.c, written by Brian Paul and found by me
in Mesa 3.4.2.

Legal:
~~~~~~

Mesa copyright applies, provided this package is used within Mesa. For anything
else, see GPL.

...

Tested on:
CPU: AMD Athlon XP 1800+
Mainboard: GA-7VTXE w/ 512 MB DDRAM
Video card: Voodoo5 6000 AGP w/ 128 MB SDRAM
DJGPP: djdev 2.04 + gcc v3.4.3 + make v3.80
OS: DOS and Win98SE

...

v1.6 (aug-2004)
+ implemented NUL driver
+ added DMesaGetProcAddress and glutGetProcAddress
* reorganized fxMesa wrapper to handle multiple contexts
! fixed a horrible bug in VGA initialization routine
! fixed partial clears

v1.7 (???-2005)
+ enabled OpenGL 2.0 support
+ added support for sw texture compression
+ added FreeGLUT specific functions
* no more GLX sources in DOS GLUT
* made GLUT timer callbacks less accurate but safer

...

Contact:
~~~~~~~~

Name: Daniel Borca
E-mail: dborca_AT_users_DOT_sourceforge_spamsux_net
WWW: http://www.geocities.com/dborca/

Post 25 Jan 2008, 04:19
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
penguinglx wrote:
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


From the latest 2.01 doc:

Quote:

It supports from the upto and including `Pentium', `P6', `MMX',
`3DNow!', `SSE', `SSE2', `SSE3' and `x64' opcodes. NASM has a strong
support for macro conventions.


So yeah, it should support everything. But of course, FASM has been around longer, so it might be more stable (or faster, smaller, "better", heh), but feel free to try both.

P.S. The argument is true about choosing what OS to target before using a compiler: e.g. Vista is horrible at DOS b/c DPMI is (always!) limited to 32 MB (hopefully fixed in SP1). However, if you've got XP or older, you should be fine (in that regard, at least). HX is good but doesn't support virtual memory (like DJGPP's CWSDPMI), so take that into consideration too (not that you probably care, but just FYI).
Post 25 Jan 2008, 04:28
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 Previous  1, 2

< 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-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.