ack/mach/xenix3/libsys/signal.s

128 lines
1.3 KiB
ArmAsm
Raw Normal View History

1987-10-06 16:39:14 +00:00
.sect .text; .sect .rom; .sect .data; .sect .bss
.define _signal
.sect .text
_signal:
push bp
mov bp,sp
push si
push di
mov cx,6(bp)
mov bx,4(bp)
cmp bx,20
jae 1f
mov ax,bx
add bx,bx
push table(bx)
mov table(bx),cx
and cx,cx
je 2f
cmp cx,1
je 2f
add bx,bx
lea cx,tbl(bx)
2:
mov bx,ax
mov ax,48
call syscal
pop bx
jb 4f
and ax,ax
je 5f
cmp ax,1
jne 6f
5:
jmp 7f
6:
xchg ax,bx
jmp 7f
1:
mov ax,22
4:
mov (_errno),ax
mov ax,-1
7:
pop di
pop si
pop bp
ret
ctch:
push bp
mov bp,sp
push ax
push bx
push cx
push dx
push si
push di
mov ax,2(bp)
1988-04-11 10:11:07 +00:00
sub ax,3
1987-10-06 16:39:14 +00:00
sub ax,tbl
shr ax,1
1988-04-11 10:11:07 +00:00
mov bx,ax
shr ax,1
1987-10-06 16:39:14 +00:00
push ax
call table(bx)
pop di
pop di
pop si
pop dx
pop cx
pop bx
pop ax
pop bp
add sp,2
pop (retadr)
pop (dummy)
popf
jmp (retadr)
.sect .bss
retadr: .space 2
dummy: .space 2
.sect .text
1987-11-05 10:34:04 +00:00
.align 2
1987-10-06 16:39:14 +00:00
tbl:
call ctch
1987-10-30 11:30:17 +00:00
.align 2
1987-10-06 16:39:14 +00:00
call ctch
1987-10-30 11:30:17 +00:00
.align 2
1987-10-06 16:39:14 +00:00
call ctch
1987-10-30 11:30:17 +00:00
.align 2
1987-10-06 16:39:14 +00:00
call ctch
1987-10-30 11:30:17 +00:00
.align 2
1987-10-06 16:39:14 +00:00
call ctch
1987-10-30 11:30:17 +00:00
.align 2
1987-10-06 16:39:14 +00:00
call ctch
1987-10-30 11:30:17 +00:00
.align 2
1987-10-06 16:39:14 +00:00
call ctch
1987-10-30 11:30:17 +00:00
.align 2
1987-10-06 16:39:14 +00:00
call ctch
1987-10-30 11:30:17 +00:00
.align 2
1987-10-06 16:39:14 +00:00
call ctch
1987-10-30 11:30:17 +00:00
.align 2
1987-10-06 16:39:14 +00:00
call ctch
1987-10-30 11:30:17 +00:00
.align 2
1987-10-06 16:39:14 +00:00
call ctch
1987-10-30 11:30:17 +00:00
.align 2
1987-10-06 16:39:14 +00:00
call ctch
1987-10-30 11:30:17 +00:00
.align 2
1987-10-06 16:39:14 +00:00
call ctch
1987-10-30 11:30:17 +00:00
.align 2
1987-10-06 16:39:14 +00:00
call ctch
1987-10-30 11:30:17 +00:00
.align 2
1987-10-06 16:39:14 +00:00
call ctch
1987-10-30 11:30:17 +00:00
.align 2
1987-10-06 16:39:14 +00:00
call ctch
1987-10-30 11:30:17 +00:00
.align 2
1987-10-06 16:39:14 +00:00
call ctch
1987-10-30 11:30:17 +00:00
.align 2
1987-10-06 16:39:14 +00:00
call ctch
1987-10-30 11:30:17 +00:00
.align 2
1987-10-06 16:39:14 +00:00
call ctch
1987-10-30 11:30:17 +00:00
.align 2
1987-10-06 16:39:14 +00:00
call ctch
1987-10-30 11:30:17 +00:00
.align 2
1987-10-06 16:39:14 +00:00
.sect .bss
table:
.space 40