.title ctrlc $IODEF .psect ctrlc_data, long,wrt,noshr,noexe CTRLC_PRESSED:: .blkl chan: .word 0 iosb: .blkw 4 syscommand: .ascid "SYS$COMMAND:" .psect ctrlc_code, long,nowrt,exe,shr ; ; Enable the AST ; .entry CTRLC_TRAP_ON, ^M<> clrl CTRLC_PRESSED ; clear flag movl #1, R0 tstw chan ; if first time then... bneq 1$ $ASSIGN_S chan=chan, devnam=syscommand ; ... assign channel blbc R0, 2$ ; error in assign? 1$: bsb queue_ast ; queue AST 2$: ret ; ; Queue the AST ; queue_ast: $QIOW_S chan=chan, func=#IO$_SETMODE!IO$M_CTRLCAST, - iosb=iosb, p1=CTRLC_TRAP_AST ; queue AST blbc R0, 1$ ; error in QIO? cvtwl iosb, R0 ; return iosb status 1$: rsb ; ; AST to set CTRLC_PRESSED ; .entry CTRLC_TRAP_AST, ^M<> movl #-1, CTRLC_PRESSED ; set flag to true bsb queue_ast ; requeue the AST ret .end