[Info-vax] BASIC and AST routines
Arne Vajhøj
arne at vajhoej.dk
Wed Nov 24 11:05:37 EST 2021
On 11/24/2021 9:08 AM, Simon Clubley wrote:
> On 2021-11-24, Arne Vajhøj <arne at vajhoej.dk> wrote:
>> On 11/24/2021 8:46 AM, Simon Clubley wrote:
>>> On 2021-11-23, Arne Vajhøj <arne at vajhoej.dk> wrote:
>>>>
>>>> 2) Why are those arguments there?
>>>>
>>>> It is not obvious to me why Macro-32 code would want to use them
>>>> any more than C or Basic code.
>>>>
>>>
>>> Nor to me. In an OS with the proper levels of abstraction, those
>>> hardware-specific registers simply should not be needed (or even
>>> visible) to a function used as the target of what is essentially
>>> just another way of doing an asynchronous callback to a function
>>> within an application.
>>
>> So why did you suggest that it was for Macro-32?
>
> I suggested it was needed because clearly something needs to be manually
> preserved by the programmer in Macro-32 code that simply would not be
> an issue if VMS was based around an higher-level language instead.
But it is an observable fact that it is not needed.
>>> Since they are visible, and since they are of no use to a normal
>>> compiled language, there must be some cases where you have to
>>> preserve these values manually in Macro-32, whereas a OS based
>>> around a higher-level language would have its compilers generate
>>> the correct code sequences for you without you having to worry
>>> about any of this at all.
>>
>> So it is there for Macro-32 because VMS C could have had a feature
>> but actually does not that does something that nobody seems to be doing?
>>
>
> No, it's there because the lowest supported application language on
> VMS is Macro-32 instead of C or another language and hence that had
> to be factored into the VMS API design.
>
>> And are there really any difference between the non-existing C:
>>
>> int __damn_ast foobar()
>>
>> and the non-existing Macro-32:
>>
>> .entry foobar
>> .damn_ast
>>
>
> Yes. Code generation in a compiled language is totally abstracted
> away from the source code the compiler is working with.
Except that it is not.
The compiler does what it is instructed to do.
In this case a fictive __damn_ast directive.
> In Macro-32, the assembler is translating the source code, not
> rewriting it, and hence there are only a small number of transformations
> it can do on the source code.
And the MAcro-32 use a fictive damn_ast macro.
In both cases something get added to the code that causes
the compiler to output some code that does something.
Arne
More information about the Info-vax
mailing list