View previous topic :: View next topic |
Author |
Message |
yujsg
Joined: 20 Jun 2007 Posts: 15
|
Posted: Thu Jul 19, 2007 8:06 am Post subject: FTN77 ver3.55, FTN77 ver4.03 & FTN95 ver5.10 |
|
|
Dear all,
I have a large code, which has been developed over 15 years. It was using FTN77 ver3.55, a 16-bit compiler, which needs DBOS (DBOS cannot run on any 32-bit OS). The built executables can only run on Windows 98, but not any other 32-bit OS based on NT technology,like NT, 2000 & XP.
Now I need to rebuild the program using a 32-bit compiler, which is either FTN77 ver4.03 or FTN95 ver5.10. But the program contains inline assembler, which has "SVC 3", and it also makes calls to "Real Mode Interface" routines like ALLOCATE_REAL_MODE_MEMORY@.
The problems I am facing now are: (1) I received compilation error "SVC 3 *** Invalid mnemonic" in FTN77 ver4.03, which does not happen when I compile the program in FTN77 ver3.55 and FTN95 ver5.10; (2) I received run-time error in FTN95 ver5.10, since it does not have routines like "ALLOCATE_REAL_MODE_MEMORY@", which is only available in FTN77 ver3.55 and ver4.03.
Thanks for your time to read my long question! Please give advice. |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7926 Location: Salford, UK
|
Posted: Thu Jul 19, 2007 10:38 am Post subject: |
|
|
FTN77 is nolonger supported. This applies to both the Win16/DBOS and the Win32 versions.
I assume that the error reports are due to the fact that you are trying to compile Win16/DBOS code using a Win32 compiler.
If you want to rebuild for Win32 then you will have to rewrite the code so that it does not use Real Mode. This applies to both Win32 FTN77 and FTN95. FTN95 will almost always compile valid Win32 FTN77 code so you would be advised to use FTN95 if you go ahead and convert to Win32. |
|
Back to top |
|
|
yujsg
Joined: 20 Jun 2007 Posts: 15
|
Posted: Thu Jul 19, 2007 8:02 pm Post subject: |
|
|
Thanks Paul for your prompt reply!
So in FTN95, how can I call the DOS or BIOS routines using the inline assembler instructions? |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7926 Location: Salford, UK
|
Posted: Fri Jul 20, 2007 6:26 am Post subject: |
|
|
There is no simple answer to this. Some Real Mode instructions are nolonger needed. Others must be converted to equivalent Protected Mode instructions. You can still use assembly instructions in FTN95 but you should not need to do so.
All that you can do is to rework the code and refer to the FTN95 documentation. We might be able to help you with the conversion but we would have to charge a fee for this work. |
|
Back to top |
|
|
yujsg
Joined: 20 Jun 2007 Posts: 15
|
Posted: Fri Jul 20, 2007 6:43 am Post subject: |
|
|
Thanks Paul! I got it. Actually the reason why I like to convert my program into Win32 is that I need it to call a Win32 DLL, which is written in C++. I don't think I can do that if my FORTRAN program is still a Win16 application, can I? |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7926 Location: Salford, UK
|
Posted: Fri Jul 20, 2007 5:18 pm Post subject: |
|
|
There is no way that I know to link Win16 and Win32 object files/dlls. |
|
Back to top |
|
|
|