1: / C library -- signal
   2: 
   3: / signal(n, 0); /* default action on signal(n) */
   4: / signal(n, odd); /* ignore signal(n) */
   5: / signal(n, label); /* goto label on signal(n) */
   6: / returns old label, only one level.
   7: 
   8: rtt     = 6
   9: signal  = 48.
  10: .globl  _signal, cerror
  11: 
  12: _signal:
  13:         mov     r5,-(sp)
  14:         mov     sp,r5
  15:         mov     4(r5),r1
  16:         cmp     r1,$NSIG
  17:         bhis    2f
  18:         mov     6(r5),r0
  19:         mov     r1,0f
  20:         asl     r1
  21:         mov     dvect(r1),-(sp)
  22:         mov     r0,dvect(r1)
  23:         mov     r0,0f+2
  24:         beq     1f
  25:         bit     $1,r0
  26:         bne     1f
  27:         asl     r1
  28:         asl     r1
  29:         add     $tvect,r1
  30:         mov     r1,0f+2
  31: 1:
  32:         sys     0; 9f
  33:         bes     3f
  34:         bit     $1,r0
  35:         beq     1f
  36:         mov     r0,(sp)
  37: 1:
  38:         mov     (sp)+,r0
  39:         mov     (sp)+,r5
  40:         rts     pc
  41: 2:
  42:         mov     $22.,r0         / EINVAL
  43:         clr     -(sp)
  44: 3:
  45:         tst     (sp)+
  46:         jmp     cerror
  47: 
  48: NSIG = 0
  49: tvect:
  50:         mov r0,-(sp); mov dvect+[NSIG*2],r0; br 1f; NSIG=NSIG+1
  51:         mov r0,-(sp); mov dvect+[NSIG*2],r0; br 1f; NSIG=NSIG+1
  52:         mov r0,-(sp); mov dvect+[NSIG*2],r0; br 1f; NSIG=NSIG+1
  53:         mov r0,-(sp); mov dvect+[NSIG*2],r0; br 1f; NSIG=NSIG+1
  54:         mov r0,-(sp); mov dvect+[NSIG*2],r0; br 1f; NSIG=NSIG+1
  55:         mov r0,-(sp); mov dvect+[NSIG*2],r0; br 1f; NSIG=NSIG+1
  56:         mov r0,-(sp); mov dvect+[NSIG*2],r0; br 1f; NSIG=NSIG+1
  57:         mov r0,-(sp); mov dvect+[NSIG*2],r0; br 1f; NSIG=NSIG+1
  58:         mov r0,-(sp); mov dvect+[NSIG*2],r0; br 1f; NSIG=NSIG+1
  59:         mov r0,-(sp); mov dvect+[NSIG*2],r0; br 1f; NSIG=NSIG+1
  60:         mov r0,-(sp); mov dvect+[NSIG*2],r0; br 1f; NSIG=NSIG+1
  61:         mov r0,-(sp); mov dvect+[NSIG*2],r0; br 1f; NSIG=NSIG+1
  62:         mov r0,-(sp); mov dvect+[NSIG*2],r0; br 1f; NSIG=NSIG+1
  63:         mov r0,-(sp); mov dvect+[NSIG*2],r0; br 1f; NSIG=NSIG+1
  64:         mov r0,-(sp); mov dvect+[NSIG*2],r0; br 1f; NSIG=NSIG+1
  65:         mov r0,-(sp); mov dvect+[NSIG*2],r0; br 1f; NSIG=NSIG+1
  66:         mov r0,-(sp); mov dvect+[NSIG*2],r0; br 1f; NSIG=NSIG+1
  67:         mov r0,-(sp); mov dvect+[NSIG*2],r0; br 1f; NSIG=NSIG+1
  68:         mov r0,-(sp); mov dvect+[NSIG*2],r0; br 1f; NSIG=NSIG+1
  69:         mov r0,-(sp); mov dvect+[NSIG*2],r0; br 1f; NSIG=NSIG+1
  70: 1:
  71:         mov     r1,-(sp)
  72:         mov     r2,-(sp)
  73:         mov     r3,-(sp)
  74:         mov     r4,-(sp)
  75:         jsr     pc,(r0)
  76:         mov     (sp)+,r4
  77:         mov     (sp)+,r3
  78:         mov     (sp)+,r2
  79:         mov     (sp)+,r1
  80:         mov     (sp)+,r0
  81:         rtt
  82: .data
  83: 9:
  84:         sys     signal; 0:..; ..
  85: .bss
  86: dvect:  .=.+[NSIG*2]

Defined functions

NSIG defined in line 69; used 42 times
signal defined in line 9; used 1 times
  • in line 84
tvect defined in line 49; used 1 times
  • in line 29

Defined variables

dvect defined in line 86; used 22 times
Last modified: 1975-05-14
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 994
Valid CSS Valid XHTML 1.0 Strict