[COFF] machine code translation, as mental architecture models
Dan Cross
crossd at gmail.com
Sun Jul 14 00:25:39 AEST 2024
On Sat, Jul 13, 2024 at 5:57 AM Ralph Corderoy <ralph at inputplus.co.uk> wrote:
> John and Paul wrote:
> > > > > The VAX MACRO compiler takes in VAX assembly source code, not
> > > > > binary VAX instructions.
> > > >
> > > > Does anyone know how extensively they used the macro facilities?
> > > > You can write much higher level stuff as macros than as single
> > > > instructions, which makes it a lot easier to do efficient
> > > > translation.
> > >
> > > Macros were used very extensively in VAX MACRO, both for user
> > > programming and in the operating system. All of the low-level
> > > system calls for user programs were implemented and documented as
> > > macros. The OS assembly code made heavy use of macros as well.
> >
> > Oh, no wonder the translator worked so well.
>
> Well, doesn't it depend on whether VAX MACRO kept the macros as
> high-level entities when translating them, or if it processed macros in
> the familiar way into instructions that sat at the same level as
> hand-written ‘assembler’. I don't think this thread has made that clear
> so far.
The non-VAX compilers for Macro-32 do expansion. That is, they don't
just recognize macros and treat them as intrinsics or primitives that
are specially optimized. Macro is not C, where you can treat "library"
functions defined in the standard specially. John Reagan, of VSI, has
posted about XMACRO (the Macro compiler for x86) in various places.
For instance, here:
https://comp.os.vms.narkive.com/F05qmMaD/x86-cross-tools-kit#post4
This post, and others, suggests to me that XMACRO is definitely doing
macro expansion before compilation proper.
- Dan C.
More information about the COFF
mailing list