[comp.os.vms] Pascal gurus !!!!!!!! Here me ?????????????

CARTER@MITBATES.BITNET (05/18/88)

>I have got a little problem with a Pascal file. What should it do ????
>There is a little loop which generates ouput. Before this loop starts
>an AST-routine is started that is waiting for CTRL-C. When CTRL-C comes
>the output should be stopped and the program should be continued.
>What does it do ??  The AST-routine ist started and sees an CTRL-C
>immedeately.   Why ??? Have a look at the program.

The problem is that you have put the address of your AST routine in the
wrong place. You have placed it in the ASTADR parameter slot. That parameter
is used for an AST service routine. This is called after the QIO operation
is successfully completed, which is why it seems to get a CTRL-C right away.
You want to put the address for your AST routine in the P1 parameter.

So,

  ios:=sys$qiow(, int( TT_Chan ), io_func,, Cancel_AST,,,,,,,);

becomes,

  ios:=sys$qiow(, int( TT_Chan ), io_func,,,, Cancel_AST,,,,,);

Tony Carter
MIT Bates Linac
CARTER@MITBATES.BITNET