{"action":"opened","issue":{"url":"https://api.github.com/repos/DGivney/assemblytutorials/issues/8","repository_url":"https://api.github.com/repos/DGivney/assemblytutorials","labels_url":"https://api.github.com/repos/DGivney/assemblytutorials/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/DGivney/assemblytutorials/issues/8/comments","events_url":"https://api.github.com/repos/DGivney/assemblytutorials/issues/8/events","html_url":"https://github.com/DGivney/assemblytutorials/issues/8","id":197440736,"number":8,"title":"int 80h is deprecated, prefer syscall?","user":{"login":"catb0t","id":3238748,"avatar_url":"https://avatars.githubusercontent.com/u/3238748?v=3","gravatar_id":"","url":"https://api.github.com/users/catb0t","html_url":"https://github.com/catb0t","followers_url":"https://api.github.com/users/catb0t/followers","following_url":"https://api.github.com/users/catb0t/following{/other_user}","gists_url":"https://api.github.com/users/catb0t/gists{/gist_id}","starred_url":"https://api.github.com/users/catb0t/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/catb0t/subscriptions","organizations_url":"https://api.github.com/users/catb0t/orgs","repos_url":"https://api.github.com/users/catb0t/repos","events_url":"https://api.github.com/users/catb0t/events{/privacy}","received_events_url":"https://api.github.com/users/catb0t/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-12-24T00:47:49Z","updated_at":"2016-12-24T00:47:49Z","closed_at":null,"body":"From what I've read, \"`int 80h` to call the Linux Kernel\" is deprecated.\r\n\r\nFrom Stack Overflow [What is better on x86, “int 0x80” or “syscall”?](http://stackoverflow.com/q/12806584/4532996):\r\n\r\n>  - `syscall` is default way of entering kernel mode on `x86-64`. This instruction is not available in 32 bit modes of operation *on Intel processors*.\r\n>  - `sysenter` is an instruction most frequently used to invoke system calls in 32 bit modes of operation. It is similar to `syscall`, a bit more difficult to use though, but that is kernel's concern.\r\n>  - **`int 0x80` is a legacy way to invoke a system call and should be avoided.**\r\n\r\nSo for code that works on both 32- and 64-bit, `syscall` should be used. For multiarch code to run under 32-bit mode on a 64-bit processor, `sysenter` should be used.\r\n\r\nI'm very impressed with the quality of http://asmtutor.com but I'm rather disappointed there is not even a *mention* of `syscall`.\r\n\r\nThe system call numbers are different between `int 80h` and `syscall`. \r\n\r\n[This is a table about the `syscall` numbers][syscall] and [this][int] is one for `int 80h`.\r\n\r\nDo you think this change is worth it? \r\n\r\n[syscall]: http://blog.rchapman.org/posts/Linux_System_Call_Table_for_x86_64/\r\n[int]: http://asm.sourceforge.net/syscall.html"}}
{"actor":{"display_login":"catb0t"}}