Title: | Digital Fortran |
Notice: | Read notes 1.* for important information |
Moderator: | QUARK::LIONEL |
Created: | Thu Jun 01 1995 |
Last Modified: | Fri Jun 06 1997 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 1333 |
Total number of notes: | 6734 |
Hi, I have a Fortran program (a collection of individual subroutine modules) which uses COMMON blocks to pass data into/out of subroutines. I want to use/edit the assembly code of one of these subroutines but any variable passed using a COMMON block becomes zero in the assembled code. Any variable passed as a parameter is fine. To alter the code to explicitly pass all variables would be a very long job. Does anybody know of any way to solve the problem? Thanks in advance. Donna [Posted by WWW Notes gateway]
T.R | Title | User | Personal Name | Date | Lines |
---|---|---|---|---|---|
1230.1 | Your question is a bit too general to have a good answer | TLE::EKLUND | Always smiling on the inside! | Wed Mar 19 1997 14:56 | 17 |
I do not have a general answer to your question. A labelled COMMON block is typically divided up into disjoint pieces by the compiler with certain names used for each piece. Variables falling into any particular piece are transformed into the base symbol for the piece together with an offset. Code is generated accordingly. I have not looked at how easy/hard this may make the resulting .s file to modify. I have a couple of suggestions. Give us an example of what you are trying to do. Perhaps we can offer either a clear Fortran solution (preferred), or a way to do what you want using ASMs (next best) or a way to modify your existing Fortran source to make the .s file easier to tailor to your needs. Cheers! Dave Eklund |