[Info-vax] BASIC and AST routines
Craig A. Berry
craigberry at nospam.mac.com
Thu Nov 18 17:43:21 EST 2021
On 11/17/21 5:14 PM, John Doppke wrote:
> So I've been playing with writing AST routines (stubbornly) in BASIC.
> They work ok, but I've found I have to declare the routine as having
> 5 'standard' parameters - "function long AST long (p1, p2, p3, p4,
> p5)". I'm not sure what the 5 parameters are, but doing anything
> with them is usually a bad idea. I communicate with my main program
> using common or event flags.
>
> Now I need an AST for a call that requires a parameter -
> SMG$ENABLE_UNSOLICITED_INPUT. I've tried adding a parameter in my
> usual list in different ways but I can't get it to work. Every time
> it's called I get a reserved opcode exception. (A DCLAST call with
> my AST works ok).
>
> Can anyone shed some light on what the parameters are that BASIC is
> getting? I'll probably end up writing this one in MACRO, but I want
> to understand what is happening.
There is an example in the docs here:
<https://docs.vmssoftware.com/vsi-openvms-rtl-screen-management-smg-manual/#_5935disable_broadcast_trapping>
of calling SMG$ENABLE_UNSOLICITED_INPUT. The example does not work
as-is on post-Alpha architectures -- you have to declare the AST
routines as FUNCTION INTEGER and not SUB. But as far as parameter
passing, if memory serves, what it does works.
More information about the Info-vax
mailing list