Graphics Programs Reference
In-Depth Information
From /usr/include/unistd.h
/* Standard file descriptors. */
#define STDIN_FILENO 0 /* Standard input. */
#define STDOUT_FILENO 1 /* Standard output. */
#define STDERR_FILENO 2 /* Standard error output. */
Writing bytes to standard output's file descriptor of 1 will print the bytes;
reading from standard input's file descriptor of 0 will input bytes. The standard
error file descriptor of 2 is used to display the error or debugging messages
that can be filtered from the standard output.
0x511
Linux System Calls in Assembly
Every possible Linux system call is enumerated, so they can be referenced
by numbers when making the calls in assembly. These syscalls are listed in
/usr/include/asm-i386/unistd.h.
From /usr/include/asm-i386/unistd.h
#ifndef _ASM_I386_UNISTD_H_
#define _ASM_I386_UNISTD_H_
/*
* This file contains the system call numbers.
*/
#define __NR_restart_syscall 0
#define __NR_exit 1
#define __NR_fork 2
#define __NR_read 3
#define __NR_write 4
#define __NR_open 5
#define __NR_close 6
#define __NR_waitpid 7
#define __NR_creat 8
#define __NR_link 9
#define __NR_unlink 10
#define __NR_execve 11
#define __NR_chdir 12
#define __NR_time 13
#define __NR_mknod 14
#define __NR_chmod 15
#define __NR_lchown 16
#define __NR_break 17
#define __NR_oldstat 18
#define __NR_lseek
19
#define __NR_getpid
20
#define __NR_mount
21
#define __NR_umount
22
#define __NR_setuid
23
#define __NR_getuid
24
Search WWH ::




Custom Search