source: trunk/libs/newlib/src/newlib/libc/sys/sysvi386/signal.S

Last change on this file was 444, checked in by satin@…, 6 years ago

add newlib,libalmos-mkh, restructure shared_syscalls.h and mini-libc

File size: 435 bytes
Line 
1/ According to the iBCS2 book, signal() has 0x30 in %eax, and the address
2/ of a function in %edx.  This function is where a signal handler will
3/ return to; it should just adjust the stack pointer, and call $f,$0.
4/ Strange but true.
5        .globl  signal
6
7sigret:
8        addl    $4, %esp
9        lcall   $0xf, $0
10signal:
11        movl    $0x30, %eax
12        movl    sigret, %edx
13        lcall   $7,$0
14        jb      _cerror
15/ The iBCS2 book also clears out %eax here, which seems to be broken.
16        ret
Note: See TracBrowser for help on using the repository browser.