[Info-vax] VAX Macro to C conversion
John Reagan
xyzzy1959 at gmail.com
Tue Jul 9 09:03:52 EDT 2019
On Tuesday, July 9, 2019 at 12:15:48 AM UTC-4, Michael Moroney wrote:
> Simon Clubley <> writes:
>
> >On 2019-07-08, Michael Moroney <> wrote:
> >> seasoned_geek <> writes:
> >>
> >>>On Monday, June 24, 2019 at 7:39:07 AM UTC-5, Simon Clubley wrote:
> >>>>
> >>>> How much work would be involved in a rewrite of the shadowing code in C ?
> >>>>
> >>
> >>>Careful there. You are forgetting the C compiler is roughly 2 decades behind in
> >>>standards and capabilities.
> >>
> >> Out-of-date C compilers would be the least of the problems with such a
> >> rewrite.
>
> >Yes, but if you were implementing something like this from scratch
> >these days, you would use C instead of Macro-32 simply because of
> >all the major advantages C brings you, even with an old compiler.
>
> My comment was regarding how truly evil the Macro-32 shadowing code is, not the
> merits of conversion of Macro to C or anything else.
>
> New or significantly rewritten VMS code for x86 is almost always in C, with the
> exception of extremely specific code is in x86 assembler like SWIS/interrupt code.
The shadow driver has its own home-made "threading" package. Plus almost every routine can possible jump into the middle of another routine. So you can enter through the prologue of routine "A", jump into "B", conditionally jump into "C" and exit through one of several epilogues. The Macro compiler has to keep lots of breadcrumbs so the epilogues will restore the right values to the right registers. That would all be difficult to mechanically translate into C (or anything else). It would require algorithm changes. The current design is best suited for an "assembler-style" language that supports such things.
More information about the Info-vax
mailing list