Author Topic: 16 bit mz and ne exe  (Read 6089 times)

Offline michael weaser

  • Jr. Member
  • *
  • Posts: 9
16 bit mz and ne exe
« on: March 24, 2013, 04:36:01 PM »
how do you create a mz .exe header for dos and how do you make the ne .exe header for 16 bit windows?

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2547
  • Country: us
Re: 16 bit mz and ne exe
« Reply #1 on: March 24, 2013, 08:36:11 PM »
Use an appropriate linker.

If you really insist on throwing perfectly good linkers into the unemployment lines... you can use "-f bin" and "just" stuff the appropriate bytes into the appropriate places. For an MZ header, there are macros in the "misc" directory of the Nasm source code to assist. The NaGoA includes have macros for a PE header...
http://home.myfairpoint.net/fbkotler/nagoa20120202.zip
(a somewhat "updated" version) There MAY be something for NE in there (too much sun on my monitor to read it comfortably at the moment). As I think you know, NE is rather "rare" these days...

I'd go with the "linker" option, if you can...

Best,
Frank


Offline michael weaser

  • Jr. Member
  • *
  • Posts: 9
Re: 16 bit mz and ne exe
« Reply #2 on: April 13, 2013, 04:19:58 PM »
I got the files to make MZ and PE headers in Nasm but No NE header. Is there any other files or way to help me make NE exe header in nasm. I just can't find any way to create a NE header.

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2547
  • Country: us
Re: 16 bit mz and ne exe
« Reply #3 on: April 13, 2013, 07:09:19 PM »
http://www.fileformat.info/format/exe/corion-ne.htm

Does that help at all? (just the first thing I found)

If we were to attempt to create an NE header, do you have a way to determine if it's right? A system that expects to run NE? Or a "known good" NE executable we could compare to? I know nothing about the format, I'm afraid...

Best,
Frank


 

SMF spam blocked by CleanTalk