flat assembler
Message board for the users of flat assembler.

flat assembler > Linux > Why syscalls in all fasm examples explained in comments

Author
Thread Post new topic Reply to topic
ProMiNick



Joined: 24 Mar 2012
Posts: 317
Location: Russian Federation, Sochi
Why not included something like this?
Code:
;linux 2.6.35 compatible x86-32 syscalls table
sys_restart_syscall             = 0
sys_exit                        = 1
sys_fork                        = 2
sys_read                        = 3
sys_write                       = 4
sys_open                        = 5
sys_close                       = 6
sys_waitpid                     = 7
sys_creat                       = 8
sys_link                        = 9
sys_unlink                      = 10
sys_execve                      = 11
sys_chdir                       = 12
sys_time                        = 13
sys_mknod                       = 14
sys_chmod                       = 15
sys_lchown16                    = 16
;old break syscall holder
sys_stat                        = 18
sys_lseek                       = 19
sys_getpid                      = 20
sys_mount                       = 21
sys_oldumount                   = 22
sys_setuid16                    = 23
sys_getuid16                    = 24
sys_stime                       = 25
sys_ptrace                      = 26
sys_alarm                       = 27
sys_fstat                       = 28
sys_pause                       = 29
sys_utime                       = 30
;old stty syscall holder
;old gtty syscall holder
sys_access                      = 33
sys_nice                        = 34
;old ftime syscall holder
sys_sync                        = 36
sys_kill                        = 37
sys_rename                      = 38
sys_mkdir                       = 39
sys_rmdir                       = 40
sys_dup                         = 41
sys_pipe                        = 42
sys_times                       = 43
;old prof syscall holder
sys_brk                         = 45
sys_setgid16                    = 46
sys_getgid16                    = 47
sys_signal                      = 48
sys_geteuid16                   = 49
sys_getegid16                   = 50
sys_acct                        = 51
sys_umount                      = 52
;old lock syscall holder
sys_ioctl                       = 54
sys_fcntl                       = 55
;old mpx syscall holder
sys_setpgid                     = 57
;old ulimit syscall holder
sys_olduname                    = 59
sys_umask                       = 60
sys_chroot                      = 61
sys_ustat                       = 62
sys_dup2                        = 63
sys_getppid                     = 64
sys_getpgrp                     = 65
sys_setsid                      = 66
sys_sigaction                   = 67
sys_sgetmask                    = 68
sys_ssetmask                    = 69
sys_setreuid16                  = 70
sys_setregid16                  = 71
sys_sigsuspend                  = 72
sys_sigpending                  = 73
sys_sethostname                 = 74
sys_setrlimit                   = 75
sys_old_getrlimit               = 76
sys_getrusage                   = 77
sys_gettimeofday                = 78
sys_settimeofday                = 79
sys_getgroups16                 = 80
sys_setgroups16                 = 81
old_select                      = 82
sys_symlink                     = 83
sys_lstat                       = 84
sys_readlink                    = 85
sys_uselib                      = 86
sys_swapon                      = 87
sys_reboot                      = 88
sys_old_readdir                 = 89
sys_old_mmap                    = 90
sys_munmap                      = 91
sys_truncate                    = 92
sys_ftruncate                   = 93
sys_fchmod                      = 94
sys_fchown16                    = 95
sys_getpriority                 = 96
sys_setpriority                 = 97
;
sys_statfs                      = 99
sys_fstatfs                     = 100
sys_ioperm                      = 101
sys_socketcall                  = 102
sys_syslog                      = 103
sys_setitimer                   = 104
sys_getitimer                   = 105
sys_newstat                     = 106
sys_newlstat                    = 107
sys_newfstat                    = 108
sys_uname                       = 109
sys_iopl                        = 110
sys_vhangup                     = 111
;
sys_vm86old                     = 113
sys_wait4                       = 114
sys_swapoff                     = 115
sys_sysinfo                     = 116
sys_ipc                         = 117
sys_fsync                       = 118
sys_sigreturn                   = 119
sys_clone                       = 120
sys_setdomainname               = 121
sys_newuname                    = 122
sys_modify_ldt                  = 123
sys_adjtimex                    = 124
sys_mprotect                    = 125
sys_sigprocmask                 = 126
;
sys_init_module                 = 128
sys_delete_module               = 129
;
sys_quotactl                    = 131
sys_getpgid                     = 132
sys_fchdir                      = 133
sys_bdflush                     = 134
sys_sysfs                       = 135
sys_personality                 = 136
;
sys_setfsuid16                  = 138
sys_setfsgid16                  = 139
sys_llseek                      = 140
sys_getdents                    = 141
sys_select                      = 142
sys_flock                       = 143
sys_msync                       = 144
sys_readv                       = 145
sys_writev                      = 146
sys_getsid                      = 147
sys_fdatasync                   = 148
sys_sysctl                      = 149
sys_mlock                       = 150
sys_munlock                     = 151
sys_mlockall                    = 152
sys_munlockall                  = 153
sys_sched_setparam              = 154
sys_sched_getparam              = 155
sys_sched_setscheduler          = 156
sys_sched_getscheduler          = 157
sys_sched_yield                 = 158
sys_sched_get_priority_max      = 159
sys_sched_get_priority_min      = 160
sys_sched_rr_get_interval       = 161
sys_nanosleep                   = 162
sys_mremap                      = 163
sys_setresuid16                 = 164
sys_getresuid16                 = 165
sys_vm86                        = 166
;
sys_poll                        = 168
sys_nfsservctl                  = 169
sys_setresgid16                 = 170
sys_getresgid16                 = 171
sys_prctl                       = 172
sys_rt_sigreturn                = 173
sys_rt_sigaction                = 174
sys_rt_sigprocmask              = 175
sys_rt_sigpending               = 176
sys_rt_sigtimedwait             = 177
sys_rt_sigqueueinfo             = 178
sys_rt_sigsuspend               = 179
sys_pread64                     = 180
sys_pwrite64                    = 181
sys_chown16                     = 182
sys_getcwd                      = 183
sys_capget                      = 184
sys_capset                      = 185
sys_sigaltstack                 = 186
sys_sendfile                    = 187
;
;
sys_vfork                       = 190
sys_getrlimit                   = 191
sys_mmap_pgoff                  = 192
sys_truncate64                  = 193
sys_ftruncate64                 = 194
sys_stat64                      = 195
sys_lstat64                     = 196
sys_fstat64                     = 197
sys_lchown                      = 198
sys_getuid                      = 199
sys_getgid                      = 200
sys_geteuid                     = 201
sys_getegid                     = 202
sys_setreuid                    = 203
sys_setregid                    = 204
sys_getgroups                   = 205
sys_setgroups                   = 206
sys_fchown                      = 207
sys_setresuid                   = 208
sys_getresuid                   = 209
sys_setresgid                   = 210
sys_getresgid                   = 211
sys_chown                       = 212
sys_setuid                      = 213
sys_setgid                      = 214
sys_setfsuid                    = 215
sys_setfsgid                    = 216
sys_pivot_root                  = 217
sys_mincore                     = 218
sys_madvise                     = 219
sys_getdents64                  = 220
sys_fcntl64                     = 221
;
;
sys_gettid                      = 224
sys_readahead                   = 225
sys_setxattr                    = 226
sys_lsetxattr                   = 227
sys_fsetxattr                   = 228
sys_getxattr                    = 229
sys_lgetxattr                   = 230
sys_fgetxattr                   = 231
sys_listxattr                   = 232
sys_llistxattr                  = 233
sys_flistxattr                  = 234
sys_removexattr                 = 235
sys_lremovexattr                = 236
sys_fremovexattr                = 237
sys_tkill                       = 238
sys_sendfile64                  = 239
sys_futex                       = 240
sys_sched_setaffinity           = 241
sys_sched_getaffinity           = 242
sys_set_thread_area             = 243
sys_get_thread_area             = 244
sys_io_setup                    = 245
sys_io_destroy                  = 246
sys_io_getevents                = 247
sys_io_submit                   = 248
sys_io_cancel                   = 249
sys_fadvise64                   = 250
;
sys_exit_group                  = 252
sys_lookup_dcookie              = 253
sys_epoll_create                = 254
sys_epoll_ctl                   = 255
sys_epoll_wait                  = 256
sys_remap_file_pages            = 257
sys_set_tid_address             = 258
sys_timer_create                = 259
sys_timer_settime               = 260
sys_timer_gettime               = 261
sys_timer_getoverrun            = 262
sys_timer_delete                = 263
sys_clock_settime               = 264
sys_clock_gettime               = 265
sys_clock_getres                = 266
sys_clock_nanosleep             = 267
sys_statfs64                    = 268
sys_fstatfs64                   = 269
sys_tgkill                      = 270
sys_utimes                      = 271
sys_fadvise64_64                = 272
;
sys_mbind                       = 274
sys_get_mempolicy               = 275
sys_set_mempolicy               = 276
sys_mq_open                     = 277
sys_mq_unlink                   = 278
sys_mq_timedsend                = 279
sys_mq_timedreceive             = 280
sys_mq_notify                   = 281
sys_mq_getsetattr               = 282
sys_kexec_load                  = 283
sys_waitid                      = 284
;
sys_add_key                     = 286
sys_request_key                 = 287
sys_keyctl                      = 288
sys_ioprio_set                  = 289
sys_ioprio_get                  = 290
sys_inotify_init                = 291
sys_inotify_add_watch           = 292
sys_inotify_rm_watch            = 293
sys_migrate_pages               = 294
sys_openat                      = 295
sys_mkdirat                     = 296
sys_mknodat                     = 297
sys_fchownat                    = 298
sys_futimesat                   = 299
sys_fstatat64                   = 300
sys_unlinkat                    = 301
sys_renameat                    = 302
sys_linkat                      = 303
sys_symlinkat                   = 304
sys_readlinkat                  = 305
sys_fchmodat                    = 306
sys_faccessat                   = 307
sys_pselect6                    = 308
sys_ppoll                       = 309
sys_unshare                     = 310
sys_set_robust_list             = 311
sys_get_robust_list             = 312
sys_splice                      = 313
sys_sync_file_range             = 314
sys_tee                         = 315
sys_vmsplice                    = 316
sys_move_pages                  = 317
sys_getcpu                      = 318
sys_epoll_pwait                 = 319
sys_utimensat                   = 320
sys_signalfd                    = 321
sys_timerfd_create              = 322
sys_eventfd                     = 323
sys_fallocate                   = 324
sys_timerfd_settime             = 325
sys_timerfd_gettime             = 326
sys_signalfd4                   = 327
sys_eventfd2                    = 328
sys_epoll_create1               = 329
sys_dup3                        = 330
sys_pipe2                       = 331
sys_inotify_init1               = 332
sys_preadv                      = 333
sys_pwritev                     = 334
sys_rt_tgsigqueueinfo           = 335
sys_perf_event_open             = 336
sys_recvmmsg                    = 337    

Code:
;linux 2.6.35 compatible x86-64 syscalls table
sys_read                        = 0
sys_write                       = 1
sys_open                        = 2
sys_close                       = 3
sys_newstat                     = 4
sys_newfstat                    = 5
sys_newlstat                    = 6
sys_poll                        = 7
sys_lseek                       = 8
sys_mmap                        = 9
sys_mprotect                    = 10
sys_munmap                      = 11
sys_brk                         = 12
sys_rt_sigaction                = 13
sys_rt_sigprocmask              = 14
stub_rt_sigreturn               = 15
sys_ioctl                       = 16
sys_pread64                     = 17
sys_pwrite64                    = 18
sys_readv                       = 19
sys_writev                      = 20
sys_access                      = 21
sys_pipe                        = 22
sys_select                      = 23
sys_sched_yield                 = 24
sys_mremap                      = 25
sys_msync                       = 26
sys_mincore                     = 27
sys_madvise                     = 28
sys_shmget                      = 29
sys_shmat                       = 30
sys_shmctl                      = 31
sys_dup                         = 32
sys_dup2                        = 33
sys_pause                       = 34
sys_nanosleep                   = 35
sys_getitimer                   = 36
sys_alarm                       = 37
sys_setitimer                   = 38
sys_getpid                      = 39
sys_sendfile64                  = 40
sys_socket                      = 41
sys_connect                     = 42
sys_accept                      = 43
sys_sendto                      = 44
sys_recvfrom                    = 45
sys_sendmsg                     = 46
sys_recvmsg                     = 47
sys_shutdown                    = 48
sys_bind                        = 49
sys_listen                      = 50
sys_getsockname                 = 51
sys_getpeername                 = 52
sys_socketpair                  = 53
sys_setsockopt                  = 54
sys_getsockopt                  = 55
stub_clone                      = 56
stub_fork                       = 57
stub_vfork                      = 58
stub_execve                     = 59
sys_exit                        = 60
sys_wait4                       = 61
sys_kill                        = 62
sys_newuname                    = 63
sys_semget                      = 64
sys_semop                       = 65
sys_semctl                      = 66
sys_shmdt                       = 67
sys_msgget                      = 68
sys_msgsnd                      = 69
sys_msgrcv                      = 70
sys_msgctl                      = 71
sys_fcntl                       = 72
sys_flock                       = 73
sys_fsync                       = 74
sys_fdatasync                   = 75
sys_truncate                    = 76
sys_ftruncate                   = 77
sys_getdents                    = 78
sys_getcwd                      = 79
sys_chdir                       = 80
sys_fchdir                      = 81
sys_rename                      = 82
sys_mkdir                       = 83
sys_rmdir                       = 84
sys_creat                       = 85
sys_link                        = 86
sys_unlink                      = 87
sys_symlink                     = 88
sys_readlink                    = 89
sys_chmod                       = 90
sys_fchmod                      = 91
sys_chown                       = 92
sys_fchown                      = 93
sys_lchown                      = 94
sys_umask                       = 95
sys_gettimeofday                = 96
sys_getrlimit                   = 97
sys_getrusage                   = 98
sys_sysinfo                     = 99
sys_times                       = 100
sys_ptrace                      = 101
sys_getuid                      = 102
sys_syslog                      = 103
sys_getgid                      = 104
sys_setuid                      = 105
sys_setgid                      = 106
sys_geteuid                     = 107
sys_getegid                     = 108
sys_setpgid                     = 109
sys_getppid                     = 110
sys_getpgrp                     = 111
sys_setsid                      = 112
sys_setreuid                    = 113
sys_setregid                    = 114
sys_getgroups                   = 115
sys_setgroups                   = 116
sys_setresuid                   = 117
sys_getresuid                   = 118
sys_setresgid                   = 119
sys_getresgid                   = 120
sys_getpgid                     = 121
sys_setfsuid                    = 122
sys_setfsgid                    = 123
sys_getsid                      = 124
sys_capget                      = 125
sys_capset                      = 126
sys_rt_sigpending               = 127
sys_rt_sigtimedwait             = 128
sys_rt_sigqueueinfo             = 129
sys_rt_sigsuspend               = 130
sys_sigaltstack                 = 131
sys_utime                       = 132
sys_mknod                       = 133
;
sys_personality                 = 135
sys_ustat                       = 136
sys_statfs                      = 137
sys_fstatfs                     = 138
sys_sysfs                       = 139
sys_getpriority                 = 140
sys_setpriority                 = 141
sys_sched_setparam              = 142
sys_sched_getparam              = 143
sys_sched_setscheduler          = 144
sys_sched_getscheduler          = 145
sys_sched_get_priority_max      = 146
sys_sched_get_priority_min      = 147
sys_sched_rr_get_interval       = 148
sys_mlock                       = 149
sys_munlock                     = 150
sys_mlockall                    = 151
sys_munlockall                  = 152
sys_vhangup                     = 153
sys_modify_ldt                  = 154
sys_pivot_root                  = 155
sys_sysctl                      = 156
sys_prctl                       = 157
sys_arch_prctl                  = 158
sys_adjtimex                    = 159
sys_setrlimit                   = 160
sys_chroot                      = 161
sys_sync                        = 162
sys_acct                        = 163
sys_settimeofday                = 164
sys_mount                       = 165
sys_umount                      = 166
sys_swapon                      = 167
sys_swapoff                     = 168
sys_reboot                      = 169
sys_sethostname                 = 170
sys_setdomainname               = 171
stub_iopl                       = 172
sys_ioperm                      = 173
;
sys_init_module                 = 175
sys_delete_module               = 176
;
;
sys_quotactl                    = 179
;
;
;
;
;
;
sys_gettid                      = 186
sys_readahead                   = 187
sys_setxattr                    = 188
sys_lsetxattr                   = 189
sys_fsetxattr                   = 190
sys_getxattr                    = 191
sys_lgetxattr                   = 192
sys_fgetxattr                   = 193
sys_listxattr                   = 194
sys_llistxattr                  = 195
sys_flistxattr                  = 196
sys_removexattr                 = 197
sys_lremovexattr                = 198
sys_fremovexattr                = 199
sys_tkill                       = 200
sys_time                        = 201
sys_futex                       = 202
sys_sched_setaffinity           = 203
sys_sched_getaffinity           = 204
;
sys_io_setup                    = 206
sys_io_destroy                  = 207
sys_io_getevents                = 208
sys_io_submit                   = 209
sys_io_cancel                   = 210
;
sys_lookup_dcookie              = 212
sys_epoll_create                = 213
;
;
sys_remap_file_pages            = 216
sys_getdents64                  = 217
sys_set_tid_address             = 218
sys_restart_syscall             = 219
sys_semtimedop                  = 220
sys_fadvise64                   = 221
sys_timer_create                = 222
sys_timer_settime               = 223
sys_timer_gettime               = 224
sys_timer_getoverrun            = 225
sys_timer_delete                = 226
sys_clock_settime               = 227
sys_clock_gettime               = 228
sys_clock_getres                = 229
sys_clock_nanosleep             = 230
sys_exit_group                  = 231
sys_epoll_wait                  = 232
sys_epoll_ctl                   = 233
sys_tgkill                      = 234
sys_utimes                      = 235
;
sys_mbind                       = 237
sys_set_mempolicy               = 238
sys_get_mempolicy               = 239
sys_mq_open                     = 240
sys_mq_unlink                   = 241
sys_mq_timedsend                = 242
sys_mq_timedreceive             = 243
sys_mq_notify                   = 244
sys_mq_getsetattr               = 245
sys_kexec_load                  = 246
sys_waitid                      = 247
sys_add_key                     = 248
sys_request_key                 = 249
sys_keyctl                      = 250
sys_ioprio_set                  = 251
sys_ioprio_get                  = 252
sys_inotify_init                = 253
sys_inotify_add_watch           = 254
sys_inotify_rm_watch            = 255
sys_migrate_pages               = 256
sys_openat                      = 257
sys_mkdirat                     = 258
sys_mknodat                     = 259
sys_fchownat                    = 260
sys_futimesat                   = 261
sys_newfstatat                  = 262
sys_unlinkat                    = 263
sys_renameat                    = 264
sys_linkat                      = 265
sys_symlinkat                   = 266
sys_readlinkat                  = 267
sys_fchmodat                    = 268
sys_faccessat                   = 269
sys_pselect6                    = 270
sys_ppoll                       = 271
sys_unshare                     = 272
sys_set_robust_list             = 273
sys_get_robust_list             = 274
sys_splice                      = 275
sys_tee                         = 276
sys_sync_file_range             = 277
sys_vmsplice                    = 278
sys_move_pages                  = 279
sys_utimensat                   = 280
sys_epoll_pwait                 = 281
sys_signalfd                    = 282
sys_timerfd_create              = 283
sys_eventfd                     = 284
sys_fallocate                   = 285
sys_timerfd_settime             = 286
sys_timerfd_gettime             = 287
sys_accept4                     = 288
sys_signalfd4                   = 289
sys_eventfd2                    = 290
sys_epoll_create1               = 291
sys_dup3                        = 292
sys_pipe2                       = 293
sys_inotify_init1               = 294
sys_preadv                      = 295
sys_pwritev                     = 296
sys_rt_tgsigqueueinfo           = 297
sys_perf_event_open             = 298
sys_recvmmsg                    = 299
sys_fanotify_init               = 300
sys_fanotify_mark               = 301
sys_prlimit64                   = 302
sys_name_to_handle_at           = 303
sys_open_by_handle_at           = 304
sys_clock_adjtime               = 305
sys_syncfs                      = 306
sys_sendmmsg                    = 307
sys_setns                       = 308
sys_getcpu                      = 309
sys_process_vm_readv            = 310
sys_process_vm_writev           = 311
sys_kcmp                        = 312
sys_finit_module                = 313    

8 kb each

_________________
I don`t like to refer by "you" to one person.
My soul requires acronim "thou" instead.
Post 28 Jan 2019, 12:31
View user's profile Send private message Send e-mail Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 7289
Location: Kraków, Poland
For a small introductory example, showing a number directly makes it a bit more palpable.

But in general, it's perhaps also a symptom of standard headers for Linux never really succeeding. Perhaps there was never a real need for them? Projects like HeavyThing end up using their own standards anyway.
Post 29 Jan 2019, 08:43
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2019, Tomasz Grysztar.

Powered by rwasa.