.title CONTROLC: generalized CTRL-C interrupt handler .ident /02/ ; ; Roger Hauck ; Smithsonian Institution ; Astrophysical Observatory ; Cambridge, Mass. 02138 ; (617)495-7151 or (FTS)830-7151 ; January, 1981 ; .mcall $iodef,$trnlog,$assign,$qiow_s,$getchn $iodef $dcdef .macro .errsignal ?p1 blbs r0,p1 pushl r0 calls #1,g^lib$signal p1: .endm .psect ABS,abs ;----DEFINE DISPLACEMENTS FOR STACK STORAGE maxbuf=63 .=0 devnam: .blkq ;descriptor for console device lognam: .blkq ;descriptor for console log. name buffer: .blkb maxbuf ;buffer stacklen: ;amt. of space to allocate on stack .psect CONTROLC,long,exe,pic,shr,nowrt ttname: .ascic /SYS$COMMAND/ ;terminal name .entry enable_ctrl_c,^m movl 8(ap),r3 ;r3->fixed storage movl 4(ap),4(r3) ;save address of module to get the AST ;form descriptors on the stack subl2 #stacklen,sp ;allocate result buffer movl sp,r2 ;r2->stack space movab b^ttname,r1 ;r0->counted string movzbl (r1)+,r0 ;r0buffer movl sp,-(sp) ;-4(r2)-> buffer movl #8,-(sp) ;-8(r2) movl 4(ap),r3 ;3-> comm. block pushl r3 ;give address of communications block calls #1,@4(r3) ;call application subroutine brb CKTERM ;go re-enable .entry disable_ctrl_c,0 $dassgn_s @4(ap) .errsignal ret .end