updated catchsig.s

This commit is contained in:
ceriel 1992-05-15 13:31:19 +00:00
parent 60edf5b3ea
commit 4f11d0433d
2 changed files with 7 additions and 6 deletions
mach/minix/libsys

View file

@ -120,5 +120,6 @@ _wait.c
_write.c _write.c
_sendrec.s _sendrec.s
brksize.s brksize.s
catchsig.s
vectab.c vectab.c
errno.c errno.c

View file

@ -1,7 +1,7 @@
.define _begsig .define __begsig
.sect .text; .sect .rom; .sect .data .sect .text; .sect .rom; .sect .data
.extern _begsig .extern __begsig
.extern _vectab, _M .extern __vectab, __M
mtype = 2 ! M+mtype = &M.m_type mtype = 2 ! M+mtype = &M.m_type
.sect .text .sect .text
_begsig: _begsig:
@ -19,13 +19,13 @@ _begsig:
mov ax,bx ! ax = signal number mov ax,bx ! ax = signal number
dec bx ! vectab[0] is for sig 1 dec bx ! vectab[0] is for sig 1
add bx,bx ! pointers are two bytes on 8088 add bx,bx ! pointers are two bytes on 8088
mov bx,_vectab(bx) ! bx = address of routine to call mov bx,__vectab(bx) ! bx = address of routine to call
push (_M+mtype) ! push status of last system call push (__M+mtype) ! push status of last system call
push ax ! func called with signal number as arg push ax ! func called with signal number as arg
call (bx) call (bx)
back: back:
pop ax ! get signal number off stack pop ax ! get signal number off stack
pop (_M+mtype) ! restore status of previous system call pop (__M+mtype) ! restore status of previous system call
pop es ! signal handling finished pop es ! signal handling finished
pop ds pop ds
pop bp pop bp