<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Vax macro to Alpha macro in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/vax-macro-to-alpha-macro/m-p/4401243#M42100</link>
    <description>selahattin,&lt;BR /&gt;&lt;BR /&gt;  Your pcount routine is the least of your problems! What do you do with the information once you've got it?&lt;BR /&gt;&lt;BR /&gt;  Roll-your-own variable argument list processing was fairly simple and reliable on VAX, but it's completely different on Alpha and different again on Itanium. There are lots of things that are likely to break.&lt;BR /&gt;&lt;BR /&gt;You don't say what language you're calling from. Chances are you're going to need to do some rewrites. As others have mentioned, several languages now have native support for variable argument lists. Another option is to declare a fixed argument list, which contains a self describing, variable structure. &lt;BR /&gt;&lt;BR /&gt;(it's a pity that very few language architects seem to have realised that an argument list is really just another data structure)&lt;BR /&gt;</description>
    <pubDate>Wed, 15 Apr 2009 20:27:33 GMT</pubDate>
    <dc:creator>John Gillings</dc:creator>
    <dc:date>2009-04-15T20:27:33Z</dc:date>
    <item>
      <title>Vax macro to Alpha macro</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/vax-macro-to-alpha-macro/m-p/4401237#M42094</link>
      <description>Hello,&lt;BR /&gt; We are trying to create .obj of a macro, which is now running on  vax/vms V5.5-2H4(vax v4200) , on an alpha vms 7.3(DS20-e).&lt;BR /&gt;&lt;BR /&gt; When I compile the macro  on VMS 7.3 I get this :&lt;BR /&gt;L2S::RASIT.OKUR&amp;gt;macro /migrat/diagn=a.a/lis pcount &lt;BR /&gt;&lt;BR /&gt;         $sfdef&lt;BR /&gt;^&lt;BR /&gt;%AMAC-E, unrecognized statement&lt;BR /&gt;at line number 88 in file DSA0:[ERDEMIR.RASIT.OKUR]PCOUNT.MAR;5&lt;BR /&gt;&lt;BR /&gt;         movzbl            @sf$l_save_ap(fp),r0&lt;BR /&gt;^&lt;BR /&gt;%AMAC-E, undefined symbol SF$L_SAVE_AP&lt;BR /&gt;at line number 97 in file DSA0:[ERDEMIR.RASIT.OKUR]PCOUNT.MAR;5&lt;BR /&gt;&lt;BR /&gt;         .end&lt;BR /&gt;^&lt;BR /&gt;%AMAC-E, previous errors prevent further analysis&lt;BR /&gt;at line number 99 in file DSA0:[ERDEMIR.RASIT.OKUR]PCOUNT.MAR;5&lt;BR /&gt;----------------&lt;BR /&gt; On vax system in starlet.mlb I can see the the $sfdef with lib/lis command but on VMS 7.3 I couldnt find these entries in mlb.&lt;BR /&gt;&lt;BR /&gt;I am attaching the source of macro  and the mlb files.&lt;BR /&gt;&lt;BR /&gt;Thanks in advance.</description>
      <pubDate>Wed, 15 Apr 2009 11:55:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/vax-macro-to-alpha-macro/m-p/4401237#M42094</guid>
      <dc:creator>selahattin okur</dc:creator>
      <dc:date>2009-04-15T11:55:58Z</dc:date>
    </item>
    <item>
      <title>Re: Vax macro to Alpha macro</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/vax-macro-to-alpha-macro/m-p/4401238#M42095</link>
      <description>This code uses VAX architecture features.   Specifically, this code is rummaging around in the VAX call frames, looking at the arguments.&lt;BR /&gt;&lt;BR /&gt;The call frames and the calling standard are among the areas that have seen some of the most significant implementation changes among the architectures.&lt;BR /&gt;&lt;BR /&gt;Start by reading the application porting manuals, if you've not already done so.&lt;BR /&gt;&lt;BR /&gt;Some of the interesting stuff is here:&lt;BR /&gt;&lt;A href="http://h71000.www7.hp.com/doc/archived.html" target="_blank"&gt;http://h71000.www7.hp.com/doc/archived.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Some is here:&lt;BR /&gt;&lt;A href="http://www.hp.com/go/openvms/doc/" target="_blank"&gt;http://www.hp.com/go/openvms/doc/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;And start with these two documents:&lt;BR /&gt;&lt;A href="http://h71000.www7.hp.com/doc/82final/5601/aa-pv64e-te.pdf" target="_blank"&gt;http://h71000.www7.hp.com/doc/82final/5601/aa-pv64e-te.pdf&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://h71000.www7.hp.com/doc/73final/documentation/pdf/ovms_migr_appl.pdf" target="_blank"&gt;http://h71000.www7.hp.com/doc/73final/documentation/pdf/ovms_migr_appl.pdf&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;This code pokes around in the VAX stack frames, which means you'll need to figure out exactly what the code is really doing with the saved argument pointer in the stack frame, and migrate it. There are some LIB$ calls that might be of use here, that allow you to more easily navigate the call frames.  But whether you can use those depends on what the code is doing.&lt;BR /&gt;&lt;BR /&gt;PCOUNT.MAR implies you're looking at the program counter (PC), and that sort of thing is specific to the platform.  On recent OpenVMS Alpha and OpenVMS I64 versions, there are SDA extensions that can be used to track the PC addresses, as well as traceback and other routines.  Put another way, there may well be replacement code available in OpenVMS itself; you may need to rework the existing code to use these routines, rather than the more direct work to re-implement what the code was doing.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 15 Apr 2009 12:32:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/vax-macro-to-alpha-macro/m-p/4401238#M42095</guid>
      <dc:creator>Hoff</dc:creator>
      <dc:date>2009-04-15T12:32:30Z</dc:date>
    </item>
    <item>
      <title>Re: Vax macro to Alpha macro</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/vax-macro-to-alpha-macro/m-p/4401239#M42096</link>
      <description>Pcount.mar has been used for the parameter count of the subroutine, where pcount itsel  has been called.</description>
      <pubDate>Wed, 15 Apr 2009 13:06:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/vax-macro-to-alpha-macro/m-p/4401239#M42096</guid>
      <dc:creator>selahattin okur</dc:creator>
      <dc:date>2009-04-15T13:06:40Z</dc:date>
    </item>
    <item>
      <title>Re: Vax macro to Alpha macro</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/vax-macro-to-alpha-macro/m-p/4401240#M42097</link>
      <description>selahattin,&lt;BR /&gt;&lt;BR /&gt;Most likely, MACRO-32 code that dates to VAX/VMS 5.5-2 will require other changes in the declaritives.&lt;BR /&gt;&lt;BR /&gt;The AMACRO compiler is rather strict about what it will allow. &lt;BR /&gt;&lt;BR /&gt;My recommendation is to read the manual on porting VERY carefully, and work through all of the code making the required changes. It is far more frustrating to work one diagnostic at a time.&lt;BR /&gt;&lt;BR /&gt;- Bob Gezelter, &lt;A href="http://www.rlgsc.com" target="_blank"&gt;http://www.rlgsc.com&lt;/A&gt;</description>
      <pubDate>Wed, 15 Apr 2009 13:50:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/vax-macro-to-alpha-macro/m-p/4401240#M42097</guid>
      <dc:creator>Robert Gezelter</dc:creator>
      <dc:date>2009-04-15T13:50:12Z</dc:date>
    </item>
    <item>
      <title>Re: Vax macro to Alpha macro</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/vax-macro-to-alpha-macro/m-p/4401241#M42098</link>
      <description>&lt;!--!*#--&gt;You can't call routine B from routine A to get the number of arguments passed to routine A on an Alpha, like you could on a VAX.&lt;BR /&gt;&lt;BR /&gt;Instead you have to use a language extension to get the number of arguments to a routine in that routine itself.&lt;BR /&gt;&lt;BR /&gt;In the routine is in Fortran just use the IARGCOUNT intrinsic.  It's return value is the number of arguments of the calling routine:&lt;BR /&gt;NARGS = IARGCOUNT()&lt;BR /&gt;&lt;BR /&gt;In C/C++ use:&lt;BR /&gt;#include &lt;VARARGS.H&gt;&lt;BR /&gt;va_count(nargs);&lt;/VARARGS.H&gt;</description>
      <pubDate>Wed, 15 Apr 2009 14:22:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/vax-macro-to-alpha-macro/m-p/4401241#M42098</guid>
      <dc:creator>Jess Goodman</dc:creator>
      <dc:date>2009-04-15T14:22:24Z</dc:date>
    </item>
    <item>
      <title>Re: Vax macro to Alpha macro</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/vax-macro-to-alpha-macro/m-p/4401242#M42099</link>
      <description>Ok.  I've unrar'd that archive and had a look at the code.  (First time I've seen a rar archive in this corner of the programming universe, too.)&lt;BR /&gt;&lt;BR /&gt;Here's what matters from within the rar...&lt;BR /&gt;&lt;BR /&gt;        .entry            pcount,^m&amp;lt;&amp;gt;&lt;BR /&gt;         movzbl            @sf$l_save_ap(fp),r0&lt;BR /&gt;         ret&lt;BR /&gt;&lt;BR /&gt;Here's some related reading...&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://h71000.www7.hp.com/wizard/wiz_6246.html" target="_blank"&gt;http://h71000.www7.hp.com/wizard/wiz_6246.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;And here's the detailed and serious reading around the code here...&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://h71000.www7.hp.com/doc/82final/5973/5973pro_004.html#bottom_004" target="_blank"&gt;http://h71000.www7.hp.com/doc/82final/5973/5973pro_004.html#bottom_004&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Here's some very serious example source code...&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.myths.com/~dpm/vms/her/her.c" target="_blank"&gt;http://www.myths.com/~dpm/vms/her/her.c&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Or yes, do use the language-specific constructs for whatever language is in use here.  And if you're using a language that has this argument count extension, this approach will be the easiest way.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 15 Apr 2009 17:10:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/vax-macro-to-alpha-macro/m-p/4401242#M42099</guid>
      <dc:creator>Hoff</dc:creator>
      <dc:date>2009-04-15T17:10:13Z</dc:date>
    </item>
    <item>
      <title>Re: Vax macro to Alpha macro</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/vax-macro-to-alpha-macro/m-p/4401243#M42100</link>
      <description>selahattin,&lt;BR /&gt;&lt;BR /&gt;  Your pcount routine is the least of your problems! What do you do with the information once you've got it?&lt;BR /&gt;&lt;BR /&gt;  Roll-your-own variable argument list processing was fairly simple and reliable on VAX, but it's completely different on Alpha and different again on Itanium. There are lots of things that are likely to break.&lt;BR /&gt;&lt;BR /&gt;You don't say what language you're calling from. Chances are you're going to need to do some rewrites. As others have mentioned, several languages now have native support for variable argument lists. Another option is to declare a fixed argument list, which contains a self describing, variable structure. &lt;BR /&gt;&lt;BR /&gt;(it's a pity that very few language architects seem to have realised that an argument list is really just another data structure)&lt;BR /&gt;</description>
      <pubDate>Wed, 15 Apr 2009 20:27:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/vax-macro-to-alpha-macro/m-p/4401243#M42100</guid>
      <dc:creator>John Gillings</dc:creator>
      <dc:date>2009-04-15T20:27:33Z</dc:date>
    </item>
    <item>
      <title>Re: Vax macro to Alpha macro</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/vax-macro-to-alpha-macro/m-p/4401244#M42101</link>
      <description>&amp;gt;(it's a pity that very few language architects seem to have realised that an argument list is really just another data structure)&lt;BR /&gt;&lt;BR /&gt;In various of the older languages and environments, that's quite true.  In the language software I'm working with now, what you can do in this area is, well, staggering.  Far past passing argument list data structures around, and far more flexible.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 15 Apr 2009 21:54:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/vax-macro-to-alpha-macro/m-p/4401244#M42101</guid>
      <dc:creator>Hoff</dc:creator>
      <dc:date>2009-04-15T21:54:08Z</dc:date>
    </item>
    <item>
      <title>Re: Vax macro to Alpha macro</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/vax-macro-to-alpha-macro/m-p/4401245#M42102</link>
      <description>Thanks for all the replies.&lt;BR /&gt;I've also found the fortran intrinsic function IARGCOUNT, but  we are trying to migrate all the system from vax to alpha with minimum modification.There are so many subroutines and they are really old.&lt;BR /&gt;   The caller routine is fortran like most of the others.&lt;BR /&gt; Thanks again, I will read the documents and give it a try, if I cant succeed, I will use the workarounds.</description>
      <pubDate>Thu, 16 Apr 2009 03:51:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/vax-macro-to-alpha-macro/m-p/4401245#M42102</guid>
      <dc:creator>selahattin okur</dc:creator>
      <dc:date>2009-04-16T03:51:08Z</dc:date>
    </item>
    <item>
      <title>Re: Vax macro to Alpha macro</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/vax-macro-to-alpha-macro/m-p/4401246#M42103</link>
      <description>When you're porting from VAX to Alpha, always look to get rid of these Macro32 subroutines.  &lt;BR /&gt;&lt;BR /&gt;While Macro32 itself is largely portable to OpenVMS Alpha and OpenVMS I64, most folks that wrote Macro32 routines for use with Fortran or similar languages did so for what are usually non-portable reasons.   And there are almost always solutions for these reasons that don't involve Macro32.&lt;BR /&gt;&lt;BR /&gt;The other common Macro32 module that folks need to deal with when porting are the transfer vectors for a shareable image, and that too requires conversion out of Macro32.</description>
      <pubDate>Thu, 16 Apr 2009 13:18:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/vax-macro-to-alpha-macro/m-p/4401246#M42103</guid>
      <dc:creator>Hoff</dc:creator>
      <dc:date>2009-04-16T13:18:48Z</dc:date>
    </item>
  </channel>
</rss>

