d .title CONTROLC: generalized CTRL-C interrupt handler .ident /02/ ,; ; Roger Hauck ; Smithsonian Institution X; Astrophysical Observatory ; Cambridge, Mass. 02138 ; (617)495-7151 or (FTS)830-7151 ; January, 1981 ; L .mcall $iodef,$trnlog,$assign,$qiow_s,$getchn  $iodef  $dcdef x  .macro .errsignal ?p1 @ blbs r0,p1  pushl r0  calls #1,g^lib$signal lp1:  .endm 4  .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 T stacklen: ;amt. of space to allocate on stack  .psect kernel ttname: .ascic /SYS$COMMAND/ ;terminal name H .entry enable_ctrl_c,^m  movl 8(ap),r3 ;r3->fixed storage t 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 h 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 T$ $dassgn_s @4(ap) $ .errsignal % ret % % .end