3 ms·
isn't 0x80 the syscall opcode on x86?
by rahimiali 6y ago
isn't 0x80 the syscall opcode on x86?
- FartyMcFarter 6y agoYou might be thinking of "int 0x80" which gets assembled to 0xCD 0x80. According to this stackoverflow answer, "int 0x80" is a Linux-specific legacy way to do syscalls: https://stackoverflow.com/questions/12806584/what-is-better-int-0x80-or-syscall-in-32-bit-code-on-linux https://stackoverflow.com/questions/12806584/what-is-better-...
- rahimiali 6y agothat's indeed my confusion. thank you for explaining.
- toast0 6y agoint 0x80 is legacy, and x86, but it isn't specific to Linux. FreeBSD (and AFAIK other BSDs) also use(d) it; most likely any Unix system on x86 that doesn't require a processor with sysenter/syscall instructions would use int 0x80 to do syscalls.