- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I recently purchased a new computer with Windows XT. I have several mixed programs that I want to revise, using Compaq Visual Fortran v 6.6.C and MASM 6.15. Existing programs use DOS Interrupt 21h to write to disk and printer, but I cannot get recompiled programs to do so. I get the following error:
forrtl: severe [157] Program Exception - access violation
As I said, existing programs run without any problem, but I cannot get new versions of these same programs to work.
I even tried to call FORTRAN routines from the assembler routines, and can get the file to open, but not to write.
Does anyone have any suggestions?
forrtl: severe [157] Program Exception - access violation
As I said, existing programs run without any problem, but I cannot get new versions of these same programs to work.
I even tried to call FORTRAN routines from the assembler routines, and can get the file to open, but not to write.
Does anyone have any suggestions?
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Access to DOS interrupt functions via an assembler routine with a Fortran interface was easy and common using MS (and possibly other) 16-bit compilers. I did this for years with MSF5.1, and thereby extended my Fortran programs to almost any function, with excellent performance. This interrupt function no longer exists within 32-bit Windows (NT, 2K, XP),but rather is simulated as part of Win32 support of a "virtual" DOS environment for 16-bit "legacy" programs; it isn't available at all for native 32-bit programs such as are produced with CVF and IVF.
If you want your Fortran programs to have directaccess to low-level functions, the way to do this in a Win32 environment is to use Win32 API calls, which provide a richer and vastly more capable access to all aspects ofopsys functionality (also more complex: there were some 60 sub-flavors of Int21H, but there areabout 4000 Win32 API functions in the basic set). This restrictsprograms to Win32 systems only, but can also provide vast improvements overFortran-only coding. For example, replacing Fortran file i/o statements with Win32 API calls provides much greater versatility and probably 10x speed improvement. I can provide sample Fortran-Win32 file i/o code on request (pcurtis@kiltel.com).

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page