Re: Nasm Error
- From: Dave Yeo <dave.r.yeo@xxxxxxxxx>
- Date: Fri, 30 Nov 2007 05:19:41 GMT
On 11/29/07 01:01 am, Frank Kotler wrote:
fred smith wrote:
...Only too happy to help :-) I'll send them up to you shortly.
Got 'em, and put 'em up on SF:
http://nasm.sf.net
You point out in your note:
"
Some limitations though, and they don't really bother me because I use Nasm to output DOS .EXE .COM or ELF32 binaries, is that anyone using Nasm on OS/2 wont be able to produce native OS/2 Binaries, OS/2 Can only load DOS based .EXE's in a DOS session, in an OS/2 Command prompt session, a DOS session will be spawned if a DOS executable is attempted to be run. OS/2's native .EXE format is IBM's Linear Executable format (os2_le os2_lx format), and is the only format that will run natively in a OS/2 Command prompt session (or in the OS/2 Presentation manager GUI). It shouldnt pose any problem, I doubt there are many people (if any at all) that write programs natively for OS/2 in pure assembler.
"
Okay... that would be a "linker issue"... or Nasm probably *could* produce a LE/LX header in "flat binary", too (it will for MZ, PE, and ELF - I don't see why not...). If the "native OS/2 linker" (???) or the OpenWatcom linker you used to link Nasm use OMF, Nasm should handle it. If it's COFF, Nasm should do that, too. If it's something completely different... back to flat binary. :)
I see the "MZ" sig in the Nasm binary you sent me, and the "dos stub" says "This is an OS/2 32-bit executable" where I'd expect to see "This program requires Windows" (or "cannot be run in a dos session" or whatever). Doesn't look all that "far out". I'll bet Nasm would do it! I understand that your interest is in developing your OS, not programming for OS/2...
Thanks for those binaries, Fred. Our other OS/2 user thanks you, too! :)
Best,
Frank
OS/2 uses OMF natively and using the native linkers (link386 for Warp v3 and v4 and ilink for later versions also wlink) should be able to create a binary with -f obj. Also aout object files can be linked with LD or using emxbind be bound into an executable.
I just tested nasm v2rc3 by building lame with somebodies handwritten makefile and using -f aout it linked with gcc produced objects and created a working lame.exe. (gcc needs LDFLAGS=-Zomf to create omf objects otherwise creates aout. Latest gcc is 3.3.5 here).
While I don't know of anyone using pure assembler nasm is used for various projects like lame for optimized code.
Dave
ps I also built nasm v2 with gcc using the configure route. Seems ok as well though the tests makefile is broken.
.
- References:
- Nasm Error
- From: fred smith
- Re: Nasm Error
- From: H. Peter Anvin
- Re: Nasm Error
- From: fred smith
- Re: Nasm Error
- From: H. Peter Anvin
- Re: Nasm Error
- From: fred smith
- Re: Nasm Error
- From: Frank Kotler
- Re: Nasm Error
- From: fred smith
- Re: Nasm Error
- From: Frank Kotler
- Nasm Error
- Prev by Date: Re: keyboard/mouse programming
- Next by Date: Re: Nasm Error
- Previous by thread: Re: Nasm Error
- Next by thread: Re: keyboard/mouse programming
- Index(es):
Relevant Pages
|