Hello:
Which could be the simplest already existing 'executable file format'
(a.out, coff, elf, exe, etc) ?
pepito
Executable file format
RE:Executable file format
I'm not sure, though from what I have learned of the PE (.exe) format, I can say with certainty that it is *not* one of them! (Since it is based on the COFF format, the two are probably quite similar). I far as I know, the .com file is probably closest thing to straight binary - maybe that would be a good starting point?
RE:Executable file format
hi pepito,
I believe though elf is not simple but still using it will pay off in the future.
rgds
Gandalf
I believe though elf is not simple but still using it will pay off in the future.
rgds
Gandalf
RE:Executable file format
If you want the simplist file format the, COM file is it,they do not come much simpler than eg:
1)find program on disk.
2)allocate all memory.
3)get file size.
4)load file size bytes form file.
5)default CS and SS to load address,IP to 100h and SP to FFFEh.
(This is in dos).
ASHLEY4.
1)find program on disk.
2)allocate all memory.
3)get file size.
4)load file size bytes form file.
5)default CS and SS to load address,IP to 100h and SP to FFFEh.
(This is in dos).
ASHLEY4.
RE:Executable file format
>Which could be the simplest already existing 'executable file format'
.COM files are a good starting point for a 16-bit OS. But .COM files are
essentially plain binary files, which have their disadvantages:
http://my.execpc.com/~geezer/osd/exec/index.htm#binary
For a 32-bit OS, use the "native" file format produced by whatever linker
you're using: DJGPP COFF for DJGPP, Win32 PE COFF for Windows-based
compilers, and ELF for Linux compilers (usually GCC).
With static linking, code to load DJGPP COFF, Win32 PE COFF, and ELF
executables are all roughly equal in complexity:
http://my.execpc.com/~geezer/osd/exec/i ... m#snippets
djcoff.c - 3.7K, 121 lines of code
elf.c - 4.4K, 134 lines of code
pecoff.c - 5.5K, 178 lines of code
If you later want to support dynamic linking, I would use either ELF
or Win32 PE COFF.
.COM files are a good starting point for a 16-bit OS. But .COM files are
essentially plain binary files, which have their disadvantages:
http://my.execpc.com/~geezer/osd/exec/index.htm#binary
For a 32-bit OS, use the "native" file format produced by whatever linker
you're using: DJGPP COFF for DJGPP, Win32 PE COFF for Windows-based
compilers, and ELF for Linux compilers (usually GCC).
With static linking, code to load DJGPP COFF, Win32 PE COFF, and ELF
executables are all roughly equal in complexity:
http://my.execpc.com/~geezer/osd/exec/i ... m#snippets
djcoff.c - 3.7K, 121 lines of code
elf.c - 4.4K, 134 lines of code
pecoff.c - 5.5K, 178 lines of code
If you later want to support dynamic linking, I would use either ELF
or Win32 PE COFF.
RE:Executable file format
OK,
I see that the simplest 'executable file format' (.com) is not the best chioce!
I will try COFF or ELF...
Thank you very much for every one!
pepito
I see that the simplest 'executable file format' (.com) is not the best chioce!
I will try COFF or ELF...
Thank you very much for every one!
pepito