1: / Overlay support mod's -- save and restore __ovno --- wfj 11/3/80 2: / Overlay switch forced on return to insure overlay is loaded. 3: / C library -- signal 4: 5: / signal(n, 0); /* default action on signal(n) */ 6: / signal(n, odd); /* ignore signal(n) */ 7: / signal(n, label); /* goto label on signal(n) */ 8: / returns old label, only one level. 9: 10: emt = 104000 / Overlay trap. 11: .globl __ovno / Current overlay number --- see ovcsv.s 12: 13: rtt = 6 14: .signal = 48. 15: .globl _signal, cerror 16: 17: _signal: 18: mov r5,-(sp) 19: mov sp,r5 20: mov 4(r5),r1 21: cmp r1,$NSIG 22: bhis 2f 23: mov 6(r5),r0 24: mov r1,0f 25: asl r1 26: mov dvect(r1),-(sp) 27: mov r0,dvect(r1) 28: mov r0,0f+2 29: beq 1f 30: bit $1,r0 31: bne 1f 32: asl r1 33: add $tvect,r1 34: mov r1,0f+2 35: 1: 36: sys 0; 9f 37: bes 3f 38: bit $1,r0 39: beq 1f 40: mov r0,(sp) 41: 1: 42: mov (sp)+,r0 43: mov (sp)+,r5 44: rts pc 45: 2: 46: mov $22.,r0 / EINVAL 47: 3: 48: jmp cerror 49: 50: NSIG = 0 51: tvect: 52: jsr r0,1f; NSIG=NSIG+1 53: jsr r0,1f; NSIG=NSIG+1 54: jsr r0,1f; NSIG=NSIG+1 55: jsr r0,1f; NSIG=NSIG+1 56: jsr r0,1f; NSIG=NSIG+1 57: jsr r0,1f; NSIG=NSIG+1 58: jsr r0,1f; NSIG=NSIG+1 59: jsr r0,1f; NSIG=NSIG+1 60: jsr r0,1f; NSIG=NSIG+1 61: jsr r0,1f; NSIG=NSIG+1 62: jsr r0,1f; NSIG=NSIG+1 63: jsr r0,1f; NSIG=NSIG+1 64: jsr r0,1f; NSIG=NSIG+1 65: jsr r0,1f; NSIG=NSIG+1 66: jsr r0,1f; NSIG=NSIG+1 67: jsr r0,1f; NSIG=NSIG+1 68: jsr r0,1f; NSIG=NSIG+1 69: jsr r0,1f; NSIG=NSIG+1 70: jsr r0,1f; NSIG=NSIG+1 71: jsr r0,1f; NSIG=NSIG+1 72: 73: 1: 74: mov __ovno,-(sp) /Save current overlay number. 75: mov r1,-(sp) 76: mov r2,-(sp) 77: mov r3,-(sp) 78: mov r4,-(sp) 79: sub $tvect+4,r0 80: asr r0 81: mov r0,-(sp) 82: asr (sp) 83: jsr pc,*dvect(r0) 84: tst (sp)+ 85: mov (sp)+,r4 86: mov (sp)+,r3 87: mov (sp)+,r2 88: mov (sp)+,r1 89: mov (sp)+,r0 / Determine pervious overlay. 90: emt / Force that overlay to be loaded. 91: mov r0,__ovno / reset __ovno appropriately. 92: mov (sp)+,r0 93: rtt 94: .data 95: 9: 96: sys .signal; 0:..; .. 97: .bss 98: dvect: .=.+[NSIG*2]