[Info-vax] BASIC and AST routines

Dave Froble davef at tsoft-inc.com
Tue Nov 23 20:40:53 EST 2021


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:
>>>> On 2021-11-22, VAXman-  @SendSpamHere.ORG <VAXman- at SendSpamHere.ORG> wrote:
>>>>> In article <sngp1p$aud$2 at dont-email.me>, Simon Clubley
>>>>> <clubley at remove_me.eisner.decus.org-Earth.UFP> writes:
>>>>>> On 2021-11-19, Dave Froble <davef at tsoft-inc.com> wrote:
>>>>>>> I'm going to confess to curiosity.  Why are R0, R1, SP, and PC passed to
>>>>>>> an AST
>>>>>>> routine?
>>>>>>
>>>>>> Because it's another example of VMS functionality being implemented
>>>>>> at way too low an abstraction level because of the need to support
>>>>>> Macro-32 as an application programming language.
>>>>>
>>>>> BULLSHIT!  If you believe that's true, please provide an illustrating example.
>>>>> I'll be waiting...
>>>>
>>>> That VMS API passes in a stack pointer, a PC and what were originally
>>>> two architecture-specific registers.
>>>>
>>>> That kind of information simply would not be exposed at application
>>>> code level in a modern version of that API as it would (rightly) be
>>>> treated as an implementation specific detail that would be handled
>>>> by the compiler.
>>>>
>>>> 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.

> 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.

> 2) Why are those arguments there?

Now there is the interesting question.  Does anyone think they would have been 
implemented if there was no use for them?  There is or was a reason, even if it 
was done in case some future use might need them.

-- 
David Froble                       Tel: 724-529-0450
Dave Froble Enterprises, Inc.      E-Mail: davef at tsoft-inc.com
DFE Ultralights, Inc.
170 Grimplin Road
Vanderbilt, PA  15486



More information about the Info-vax mailing list