Re: Nasm Error



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.

.



Relevant Pages

  • Re: Nasm Error
    ... 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. ...
    (alt.lang.asm)
  • Re: Machine down.
    ... In my case I very frequently run the maintenance utility to look at and clean up the .INI files. ... frequently in VDMs to operate properly under OS/2 DOS. ... Now, how you go about customizing OS/2 DOS VDM sessions for other than AUTOEXEC.BAT, is that you create your own named .BAT file for a certain DOS VDM program, for which you intend to call from the Desktop. ... DTJ> getting corrupted gradually, then the archived copies ...
    (comp.os.os2.misc)
  • Re: New to Debian Linux - I have NASM experience under DOS 6.22
    ... > simple NASM program under Linux. ... > whether there is a more official or reliable way to make a NASM ... Windows automatically including the "current directory" in the ... directory" is NOT part of that PATH as it is with DOS... ...
    (alt.lang.asm)
  • Re: Orphaned OS/2 (Another View)
    ... I grew to love WordStar and gradually moved to the last version for DOS which is 7.0d. ... I set up VNC over my in-home network for a Windows 2000 computer and a Linux computer. ... and can have a Windows 2000 window and a SuSE Linux window on my main OS/2 box to do all the "new" inovative? ...
    (comp.os.os2.misc)
  • Re: Linker strangeness
    ... but it didn't execute correctly. ... > DOS, but not under windows. ... package, used separate full MASM package, v5.xx or v6.xx, v6.11 is the ... binary (NASM is able to do this w/o external linker) and then include it ...
    (alt.lang.asm)