[comp.os.os2] COM files under OS2?

kushner@ux3.lbl.gov (Gary Kushner) (12/10/89)

   I just noticed that some of OS2's commands are .com files.  Does

anyone know format of os2 .com files?  They can't just be byte streams

like under dos can they?



-Gary

ander@pawl.rpi.edu (Michael R. Primm) (12/10/89)

OS/2's "COM" files are just standard "new-EXE" files with the name COM on
the end.  I believe the same is true of several of the standard DOS       
utilities in DOS 3.3 and 4.0 (EXE files disguised as COM files).  I think
the reasons are mostly historical.
                                                    --Mike Primm

swh@hpcupt1.HP.COM (Steve Harrold) (12/12/89)

Re: COM files

I suspect the following statement is true for OS/2.  It is definitely
the case for DOS...

The DOS loader uses the .COM and .EXE extensions merely as *indicators*
that the file is loadable as a program.  Once the file is loaded, DOS
looks at the first two bytes to see if has a COM or an EXE format.  The
magic signature for an EXE file are the characters "MZ".  If "MZ" is found,
an EXE file is processed, if anything else, DOS treats the file as a COM.