- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
I have a Fortran-77 program and the target is to execute it within DOSBox - an x86 emulator with DOS. (http://www.dosbox.com/) The main reason for it is, that DOSBox can be executed on hardware for which no Fortran compiler is available. In this special case the idea is to run DOSBox on iOS and then execute the Fortran program.
I compiled the program with Intel Visual Fortran for ia32. But when I execute the program in DOSBox I only see the "DOS-Stub": "This program cannot be run in dos mode".
I experimented with some ifort compiler options like "/arch:IA32". Unfortunately, I am totally stuck and have no idea what the problem is.
What Windows dependencies are generated by ifort? Are there compiler options to create a "real" DOS executable? Are there options to generate a better error message to guide me to another solution?
Sincerly,
Timo
- Balises:
- Intel® Fortran Compiler
Lien copié
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
A 16-bit DOS executable? No. Assuming you chose a 32-bit configuration, you get a 32-bit Windows executable. This can be run in a 32-bit command prompt environment. DOSbox is intended to run 16-bit DOS programs. There's no issue running Intel Fortran programs on Windows systems without a compiler - you either need to install the redistributable DLLs or link statically. But neither of these will help with DOSbox.
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
Intel Fortran does not generate 16-bit EXEs. It depends heavily on the Microsoft Windows DLLs at run-time, and those will not work in a 16-bit environment (native or emulated).
You probably need a compiler that generates 16-bit EXEs (or 32-bit EXEs for 16-bit OSes that support DOS extenders.) The only currently available compiler that I know of which may satisfy that requirement is OpenWatcom Fortran. You can also try to obtain old 16-bit compiler such as MS Fortran 5.3, Lahey Personal, etc., on the second-hand market.
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
Thank you very much for your fast and valuable answers. It saves me a lot of time by stopping investigating into this direction. I will give the older compilers a try.
Steve, you mentioned, it is possible to link statically. And in another thread I found the possibility to choose "Single-threaded" as Runtime-Library. However, in the project settings of Visual Studio I can only select "Multi-Threaded" as target. Would it be possible to create a statically linked "Single-Threaded" 32-bit executable and run it with a DOS extender (like DOS/32A) in DOSBox? Or does all executables generated by Intel Visual Fortran require Windows?
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
"Single-threaded" is no longer an option. What you want is "Multi-Threaded" (not Multi-Threaded DLL).
Windows is required.
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
Thank you for your help. I have found some solutions, which work with DOSBox:
- Installing "Microsoft Fortran 5.3" within DOSBox and compile 16-bit executables
- Installing "Microsoft Fortran PowerStation 1.0" within DOSBox and create 32-bit executables with a DOS-extender
- Use OpenWatcom (for example install in Windows 7) to generate 16- and 32-bit executables which can be run in DOSBox
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
Are you sure you need to run a 16-bit application?
Often the term "DOS Box" refers to being a Console Application (text only box, usually white on black but changeable). You would only need to cross compile the application if your target machine was an actual 8086, 80186, 80286 (or like CPU). IOW a museum piece.
If you do need to build a 16-bit application, then using old compilers, do the build on your old processor. That failing, use DOSbox to instantiate a 16-bit virtual machine. Then install the older compiler into the virtual machine and use that for your build and test, then export to your old CPU.
Jim Dempsey
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
If possible, I don't want to use DOSBox. But currently, I don't see a better alternative for running the FORTRAN-77 program on the iPad. The iPad has a 32-Bit ARM processor and I would love to run the Fortran program natively on the device.
Jim, do you know a compiler which is able to cross-compile a F77 program to be run on the ARM processor?
The optimal solution would be to compile F77 submodules into dynamic libraries (.dylib) to be used in iOS programs coded in Objective-C or Swift. Any other ideas?
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
Others seem to have tried this. Google search yielded this link, where it is stated that it can be done if you are willing to put in the effort:
http://apple.stackexchange.com/questions/40471/is-there-a-fortran-compiler-emulator-for-ios

- S'abonner au fil RSS
- Marquer le sujet comme nouveau
- Marquer le sujet comme lu
- Placer ce Sujet en tête de liste pour l'utilisateur actuel
- Marquer
- S'abonner
- Page imprimable