[Info-vax] BASIC and AST routines

Arne Vajhøj arne at vajhoej.dk
Tue Nov 23 20:47:16 EST 2021


On 11/23/2021 8:40 PM, Dave Froble wrote:
> On 11/23/2021 2:31 PM, Arne Vajhøj wrote:
>> On 11/23/2021 2:06 PM, Simon Clubley wrote:
>>> On 2021-11-23, Arne Vajhøj <arne at vajhoej.dk> wrote:
>>>> On 11/23/2021 1:37 PM, Simon Clubley wrote:
>>>>> That information is only needed because the lowest supported 
>>>>> application
>>>>> language on VMS is Macro-32 and not C (or another comparable low-level
>>>>> language).
>>>>
>>>> What does the Macro-32 application developers need those
>>>> arguments for that the C application developers does not need
>>>> them for?
>>>
>>> You miss the point Arne.
>>>
>>> If C was the lowest level supported language then the compiler would
>>> simply have a pragma or function attribute that marked it as an AST
>>> routine so that the compiler would generate the required code (or not
>>> generate troublesome code sequences) as required.
>>>
>>> This happens all the time with C language interrupt handlers in some
>>> embedded environments for example.
>>>
>>> The SP/PC/R0/R1 parameters are implementation details that the person
>>> writing the AST routine should never see or have to deal with.
>>
>> ????
>>
>> There are two questions here.
>>
>> 1) How to deal with side effects from those arguments.
>>
>> Basic apparently has a problem. It could be fixed like you describe
>> for C. John Reagan already confirmed that.
> 
> No, Basic does not have any problems.  Works just fine.  No use for 
> arguments 2,3,4,5, just ignore them.

True. But they need to be declared. That was the observation that
started this thread.

BTW, I think it was Hoff not John Reagan that talked about a
keyword to "hide" those arguments. Mea culpa.

>> Neither C nor Macro-32 has the need for such a fix. They just
>> don't access the argument and they are good.
> 
> Same with Basic.

But in those language you do not even need to declare them.

Arne




More information about the Info-vax mailing list