[comp.os.minix] DOS -> Minix *.EXE -> a.out

kjh@pollux.usc.edu (Kenneth J. Hendrickson) (09/22/90)

In article <31178@nigel.ee.udel.edu> JAGBDED1%PANAM.BITNET@ricevm1.rice.edu writes:
>   I was noting that PC Minix has a utility to turn .exe files into MINIX
>executables. Does Amiga Minix have something to convert AmigaDOS executables?

I am not aware of any such utility.  If you have one, please post it!

Some thoughts:
It probably could only handle small model .EXE, because of Minix's
64k+64k limitation.  In addition, there would have to be something done
about any BIOS calls.  Such a utility would probably be extremely hard
to develop, if not impossible.

-- 
Ken Hendrickson N8DGN/6       kjh@usc.edu      ...!uunet!usc!pollux!kjh

awb@almond.ed.ac.uk (Alan W Black) (09/23/90)

In article <27242@usc.edu> kjh@pollux.usc.edu (Kenneth J. Hendrickson) writes:
>In article <31178@nigel.ee.udel.edu> JAGBDED1%PANAM.BITNET@ricevm1.rice.edu writes:
>>   I was noting that PC Minix has a utility to turn .exe files into MINIX
>>executables. Does Amiga Minix have something to convert AmigaDOS executables?
>
>I am not aware of any such utility.  If you have one, please post it!
>
>Some thoughts:
>It probably could only handle small model .EXE, because of Minix's
>64k+64k limitation.  In addition, there would have to be something done
>about any BIOS calls.  Such a utility would probably be extremely hard
>to develop, if not impossible.
>
>-- 
>Ken Hendrickson N8DGN/6       kjh@usc.edu      ...!uunet!usc!pollux!kjh

There was a program distributed with MINIX PC 1.2 (and probably 1.1)
which fits this description.  With 1.2, bootstrap code was included to
help people compile minix under MSDOS.  This allowed you to
compile the MINIX library and build "executables" under msdos, then they
had to be converted to minix a.out format.  These executable would
not run under MSDOS (as they required a minix kernel to run on) nor
is it the case that arbitrary MSDOS program would convert (well they
would but wouldn't run under MINIX).

This program (dos2out) is mentioned in Andy's book, but was never
designed to convert random programs only minix programs compiled under
MSDOS.  Any other program which attempt this is probably to difficult,
I think the only reasonable way it could be done would be to write a 
PC emulator under MINIX (under 32bit version).

So to get back to JAGBDED1's original question, on the Amiga, AmigaOS
binaries could only be converted reasonable if they had been compiled 
with the minix libraries (ahd that would be so much easier to do under
MINIX).

Alan

Alan W Black                          80 South Bridge, Edinburgh, UK
Dept of Artificial Intelligence       tel: (+44) -31 225 7774 x228 or x223
University of Edinburgh               email: awb@ed.ac.uk

cechew@bruce.cs.monash.OZ.AU (Earl Chew) (09/24/90)

In <27242@usc.edu> kjh@pollux.usc.edu (Kenneth J. Hendrickson) writes:

>Some thoughts:
>It probably could only handle small model .EXE, because of Minix's
>64k+64k limitation.  In addition, there would have to be something done
>about any BIOS calls.  Such a utility would probably be extremely hard
>to develop, if not impossible.

The utility is called dos2out. I think you might still be able to get it as
part of the mcc or s2asm package. It is used to convert cross compiled
executables to Minix a.out format. It doesn't do any semantic analysis of the
executable -- it basically strips the .exe header and prepends an a.out header.
Thus you won't be able to do things like converting tcc.exe into tcc :-(

Earl
-- 
Earl Chew, Dept of Computer Science, Monash University, Australia 3168
EMAIL: cechew@bruce.cs.monash.edu.au PHONE: 03 5655447 FAX: 03 5655146
----------------------------------------------------------------------

sbang@iesd.auc.dk (Stig Bang) (09/24/90)

In article <27242@usc.edu> kjh@pollux.usc.edu (Kenneth J. Hendrickson) writes:

>   In article <31178@nigel.ee.udel.edu> JAGBDED1%PANAM.BITNET@ricevm1.rice.edu writes:
>   >   I was noting that PC Minix has a utility to turn .exe files into MINIX
>   >executables. Does Amiga Minix have something to convert AmigaDOS executables?
>
>   I am not aware of any such utility.  If you have one, please post it!
>
>   Some thoughts:
>   It probably could only handle small model .EXE, because of Minix's
>   64k+64k limitation.  In addition, there would have to be something done
>   about any BIOS calls.  Such a utility would probably be extremely hard
>   to develop, if not impossible.
>
>   -- 
>   Ken Hendrickson N8DGN/6       kjh@usc.edu      ...!uunet!usc!pollux!kjh

If any one knows a utility for allowing DOS execution under MINIX, I would sure like to know
that too! Since I am considering moving on to MINIX, this feature is vital for me. 

Something puzzels me, though; The 64k+64k memory limitation You mention. In the release 
notes for MINIX 1.5, A. S. Tannenbaum writes:

>   3.1 ADDITIONAL MINIX 1.5 FEATURES (IBM VERSION):
>     - Runs in protected mode on 286 and 386
>     - Support for extended memory up to 16M on 286 and 386
                                          ^^^^^^^^^^

Doesn't this mean that I can execute programs larger than 64k+64k 
on my 286 (even MINIX programs)?

Sincerely

sbang@iesd.auc.dk

kirkenda@eecs.cs.pdx.edu (Steve Kirkendall) (09/25/90)

In article <SBANG.90Sep24173145@euler.iesd.auc.dk> sbang@iesd.auc.dk (Stig Bang) writes:
>In article <27242@usc.edu> kjh@pollux.usc.edu (Kenneth J. Hendrickson) writes:
>
>>In article <31178@nigel.ee.udel.edu> JAGBDED1%PANAM.BITNET@ricevm1.rice.edu writes:
>>>   I was noting that PC Minix has a utility to turn .exe files into MINIX
>>>executables. Does Amiga Minix have something to convert AmigaDOS executables?
>>
>>   I am not aware of any such utility.  If you have one, please post it!
>>
>If any one knows a utility for allowing DOS execution under MINIX, I would
>sure like to know that too! Since I am considering moving on to MINIX, this
>feature is vital for me. 

There is no utility that can convert DOS programs into Minix programs.
There is no utility that can convert Amiga programs into Minix programs.
There is no utility that can convert ST programs into Minix programs.

However: Some people have copied the Minix #include files and libraries to
(for example) DOS, recompiled the Minix libraries using a DOS compiler such
as Turbo-C, and then recompiled the kernel and/or utilities.  This gives you
a Minix program that is stored in DOS format.  Programs do exist to convert
this to Minix format -- for the PC and ST, at least.

PC people do this because the Minix-PC compiler is dreadfully slow, and it
generates bulky, inefficient code.  ST people *DON'T* do this much, because the
68000 compiler runs faster, and bulky code is no problem.

(Other compilers are available that run under Minix.  PC users can use Bruce's
BCC, which compiles faster but produces even worse code.  68k users can use
Sozobon C, C68, or GCC.)

>Something puzzels me, though; The 64k+64k memory limitation You mention. In the release 
>notes for MINIX 1.5, A. S. Tannenbaum writes:
>
>>   3.1 ADDITIONAL MINIX 1.5 FEATURES (IBM VERSION):
>>     - Runs in protected mode on 286 and 386
>>     - Support for extended memory up to 16M on 286 and 386
>                                          ^^^^^^^^^^
>Doesn't this mean that I can execute programs larger than 64k+64k 
>on my 286 (even MINIX programs)?

No, it means you can run lots of little processes at the same time, and you can
have a huge hard-disk cache or RAM disk.

-------------------------------------------------------------------------------
Steve Kirkendall    kirkenda@cs.pdx.edu    uunet!tektronix!psueea!eecs!kirkenda