[Info-vax] disabling a CTRL/Y ast
VAXman- at SendSpamHere.ORG
VAXman- at SendSpamHere.ORG
Wed Jan 6 13:06:29 EST 2016
In article <c9fcc0f9-fffb-46b4-854c-db7c9f0719e4 at googlegroups.com>, Tom Adams <tadamsmar at gmail.com> writes:
>On Wednesday, January 6, 2016 at 10:54:22 AM UTC-5, Stephen Hoffman wrote:
>> On 2016-01-06 15:15:09 +0000, Tom Adams said:
>>
>> > Section 5.4.3.2 here:
>> >
>> > http://www2.hmc.edu/www_common/OVMS072-OLD/72final/6136/6136pro_019.html
>> >
>> > explains how to enable a ctrl/y ast using IO$M_CTRLYAST. It also says:
>> >
>> > "This function code is also used to disable the AST."
>> >
>> > but I cannot figure out the arguments of the QIOW call that would
>> > disable the AST.
>> >
>> > How does one disable the AST?
>>
>>
>> That doesn't do what you want.
>>
>> That disables the AST that was set -- by specifying 0 as the AST routine
>> address -- but in the case you're still working toward, you want no ^Y.
>>
>> "P1---Address of the AST service or 0 if the corresponding AST is disabled"
>>
>> See the lib$enable_ctrl and lib$disable_ctrl calls to enable and
>> disable the associated CLI-level handling -- which is what you want and
>> need here, if you're not going to segment the code to avoid the problem
>> -- and also see replies to your previous postings here.
>>
>>
>>
>> --
>> Pure Personal Opinion | HoffmanLabs LLC
>
>I want to turn ctrl/y into a noop in certain regions of code and turn ctrl/y into an exit in other regions of code.
>
>I do find that it is necessary to run lib$disable_ctrl at the beginning of the program and lib$enable_ctrl at the end of the program to restore the previous CLI state, but I need to run asts to do the rest.
Then I'd suggest you not muck with the CLI's CTRL/Y AST and just implement a
CTRL/Y in your code. For the first case you mention (ie. NOOP), you could
establish a NOOP AST (eg. IOC$RETURN). When you want it to be an exit, you
establish the CTRL/Y AST to be SYS$EXIT (be sure you account for exit code).
--
VAXman- A Bored Certified VMS Kernel Mode Hacker VAXman(at)TMESIS(dot)ORG
I speak to machines with the voice of humanity.
More information about the Info-vax
mailing list