int 80h, x86 (32), BSD (posix):
http://www.int80h.org/bsdasm/#the-syscalls-file
int 80h, x86 (32), linux:3 STD POSIX { ssize_t read(int fd, void *buf, size_t nbyte); }
4 STD POSIX { ssize_t write(int fd, const void *buf, size_t nbyte); }
есть пример на ассемблере (example reads a number from the keyboard and displays it on the screen)
https://www.tutorialspoint.com/assembly ... _calls.htm
int 80h -> vDSO, linux:3 sys_read
4 sys_write
http://qaru.site/questions/22776/what-i ... or-syscall
http://articles.manugarg.com/systemcallinlinux2_6.html
linux, номера:Kernel also setups system call entry/exit points for user processes. Kernel creates a single page in the memory and attaches it to all processes' address space when they are loaded into memory. This page contains the actual implementation of the system call entry/exit mechanism. Definition of this page can be found in the file /usr/src/linux/arch/i386/kernel/vsyscall-sysenter.S. Kernel calls this page virtual dynamic shared object (vdso)
...
Userland processes (or C library on their behalf) call __kernel_vsyscall to execute system calls. Address of __kernel_vsyscall is not fixed. Kernel passes this address to userland processes using AT_SYSINFO elf parameter.
https://github.com/torvalds/linux/blob/ ... all_32.tbl
https://github.com/torvalds/linux/blob/ ... all_64.tbl3 i386 read sys_read __ia32_sys_read
4 i386 write sys_write __ia32_sys_write
x86_64, linux:0 common read __x64_sys_read
1 common write __x64_sys_write
https://github.com/torvalds/linux/blob/ ... entry_64.S
entry_64.S:107 писал(а): * 64-bit SYSCALL instruction entry. Up to 6 arguments in registers.
*
* This is the only entry point used for 64-bit system calls. The
* hardware interface is reasonably well designed and the register to
* argument mapping Linux uses fits well with the registers that are
* available when SYSCALL is used.