1987-05-15 09:11:10 +00:00
|
|
|
.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
|
|
|
|
.sect .text
|
|
|
|
.define sigtrp~
|
|
|
|
.define trp~,save~,retu~
|
|
|
|
! $Header$
|
1984-07-19 12:51:00 +00:00
|
|
|
|
|
|
|
indir = 0
|
1987-05-15 09:11:10 +00:00
|
|
|
signal = 060
|
1984-07-19 12:51:00 +00:00
|
|
|
|
1987-05-15 09:11:10 +00:00
|
|
|
sig1: mov sig.trp+0,-(sp)
|
1984-07-19 12:51:00 +00:00
|
|
|
br 1f
|
1987-05-15 09:11:10 +00:00
|
|
|
sig2: mov sig.trp+2,-(sp)
|
1984-07-19 12:51:00 +00:00
|
|
|
br 1f
|
1987-05-15 09:11:10 +00:00
|
|
|
sig3: mov sig.trp+4,-(sp)
|
1984-07-19 12:51:00 +00:00
|
|
|
br 1f
|
1987-05-15 09:11:10 +00:00
|
|
|
sig4: mov sig.trp+6,-(sp)
|
1984-07-19 12:51:00 +00:00
|
|
|
br 1f
|
1987-05-15 09:11:10 +00:00
|
|
|
sig5: mov sig.trp+010,-(sp)
|
1984-07-19 12:51:00 +00:00
|
|
|
br 1f
|
1987-05-15 09:11:10 +00:00
|
|
|
sig6: mov sig.trp+012,-(sp)
|
1984-07-19 12:51:00 +00:00
|
|
|
br 1f
|
1987-05-15 09:11:10 +00:00
|
|
|
sig7: mov sig.trp+014,-(sp)
|
1984-07-19 12:51:00 +00:00
|
|
|
br 1f
|
1987-05-15 09:11:10 +00:00
|
|
|
sig10: mov sig.trp+022,-(sp)
|
1984-07-19 12:51:00 +00:00
|
|
|
br 1f
|
1987-05-15 09:11:10 +00:00
|
|
|
sig11: mov sig.trp+024,-(sp)
|
1984-07-19 12:51:00 +00:00
|
|
|
br 1f
|
1987-05-15 09:11:10 +00:00
|
|
|
sig12: mov sig.trp+026,-(sp)
|
1984-07-19 12:51:00 +00:00
|
|
|
br 1f
|
1987-05-15 09:11:10 +00:00
|
|
|
sig13: mov sig.trp+030,-(sp)
|
1984-07-19 12:51:00 +00:00
|
|
|
br 1f
|
1987-05-15 09:11:10 +00:00
|
|
|
sig14: mov sig.trp+032,-(sp)
|
1984-07-19 12:51:00 +00:00
|
|
|
br 1f
|
1987-05-15 09:11:10 +00:00
|
|
|
sig15: mov sig.trp+034,-(sp)
|
1984-07-19 12:51:00 +00:00
|
|
|
br 1f
|
1987-05-15 09:11:10 +00:00
|
|
|
sig16: mov sig.trp+036,-(sp)
|
1984-07-19 12:51:00 +00:00
|
|
|
br 1f
|
|
|
|
1:
|
|
|
|
jsr pc,trp~
|
|
|
|
rti
|
|
|
|
|
|
|
|
sigtrp~:
|
|
|
|
jsr pc,save~
|
|
|
|
tst (sp)+
|
|
|
|
mov (sp)+,r1
|
|
|
|
mov (sp)+,r0
|
|
|
|
ble sig.bad
|
1987-05-15 09:11:10 +00:00
|
|
|
cmp r0,$020
|
1984-07-19 12:51:00 +00:00
|
|
|
bhi sig.bad
|
|
|
|
mov r0,call+02
|
|
|
|
asl r0
|
|
|
|
mov sig.trp-2(r0),r3
|
1987-05-15 09:11:10 +00:00
|
|
|
cmp r1,$0400
|
1984-07-19 12:51:00 +00:00
|
|
|
bhis 1f
|
|
|
|
mov sig.adr-2(r0),r2
|
|
|
|
bne 2f
|
|
|
|
sig.bad:
|
|
|
|
mov $-1,r0
|
|
|
|
sigbad:
|
|
|
|
mov r0,-(sp)
|
|
|
|
mov r0,-(sp)
|
|
|
|
jmp retu~
|
|
|
|
1: cmp r1,$-3
|
|
|
|
blo sig.bad
|
|
|
|
mov r1,r2
|
|
|
|
inc r2
|
|
|
|
inc r2
|
|
|
|
2: mov r1,sig.trp-2(r0)
|
|
|
|
mov r2,call+04
|
1987-05-15 09:11:10 +00:00
|
|
|
sys indir ; .data2 call
|
1984-07-19 12:51:00 +00:00
|
|
|
bcs sigbad
|
|
|
|
asr r0
|
|
|
|
bcc 1f
|
|
|
|
mov $-3,-(sp)
|
|
|
|
clr -(sp)
|
|
|
|
jmp retu~
|
|
|
|
1: mov r3,-(sp)
|
|
|
|
clr -(sp)
|
|
|
|
jmp retu~
|
|
|
|
|
1987-05-15 09:11:10 +00:00
|
|
|
.sect .data
|
|
|
|
call: sys signal
|
|
|
|
.data2 0, 0
|
1984-07-19 12:51:00 +00:00
|
|
|
sig.trp:
|
1987-05-15 09:11:10 +00:00
|
|
|
.data2 -2, -2, -2, -2
|
|
|
|
.data2 -2, -2, -2, -2
|
|
|
|
.data2 -2, -2, -2, -2
|
|
|
|
.data2 -2, -2, -2, -2
|
1984-07-19 12:51:00 +00:00
|
|
|
sig.adr:
|
1987-05-15 09:11:10 +00:00
|
|
|
.data2 sig1, sig2, sig3, sig
|
|
|
|
.data2 sig5, sig6, sig7, 0
|
|
|
|
.data2 0, sig10, sig11, sig12
|
|
|
|
.data2 sig13, sig14, sig15, sig16
|