NO

Author Topic: PoAsm and bin-files  (Read 346 times)

Offline Mikl___

  • Member
  • *
  • Posts: 15
PoAsm and bin-files
« on: October 20, 2016, 03:20:32 AM »
Hi, All!
Can somebody tell whether the compiler can create binary (*.COM) files?
What are the keys (options) for the compiler and linker are required or recommended to create it?
Thank you in advance

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 1576
Re: PoAsm and bin-files
« Reply #1 on: October 21, 2016, 03:02:00 PM »
I don't think PellesC suite can create any .com file.
A .COM executable is a 16 bits executable preloaded at segmented address 0000:0100H. Means that the file itself can be put in memory starting from address 0000:0100H and run directly without any relocation.
PellesC is a 32/64bits compiler system that produce PE (for 32bits) and PE+ (for 64bits) executables suitable for flat linear addressing.
The PE, or PE+, format includes headers, sections and other structures used by the OS loader to  load and, eventually, relocate code and data in memory.
The linker, POLINK, can't produce any segmented preloaded code.

Offline Mikl___

  • Member
  • *
  • Posts: 15
Re: PoAsm and bin-files
« Reply #2 on: October 21, 2016, 03:23:21 PM »
Hi, frankie!
thanks for the your answer! I really not interested in the 16-bit COM-file, I need 64-bit binary file without  PE-header. PE-header I will write myself. This possibility supports FASM-compiler, I thought that PoAsm-compiler also has such an opportunity

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 1576
Re: PoAsm and bin-files
« Reply #3 on: October 21, 2016, 04:24:38 PM »
PoAsm can produce only obj files, in PECOFF format.
A binary file without PE header can be only absolute code, not linkable anymore.
As far as I understand FASM produce also PECOFF object files that can be linked together with other obj modules.
Of course you can use PECOFF obj's from PoAsm with a different linker/loader, able to read PECOFF obj format, to produce absolute position code.

Offline Mikl___

  • Member
  • *
  • Posts: 15
Re: PoAsm and bin-files
« Reply #4 on: October 22, 2016, 01:07:19 AM »
Hi, frankie!
Thank you very mutch for the your answers