We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. You can edit the question so it can be answered with facts and citations.
Closed 9 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(3)
在Linux中,您使用一个中断:80h。 该中断对应的系统调用可以在这个表中找到< /a>.
In linux, you use one interrupt: 80h. The syscall which that interrupt corresponds to can be found in this table.
Linux 不像 DOS 那样使用中断进行系统调用。 它使用依赖于体系结构的方法来进行系统调用,在 x86 上可以是 int 0x80,但现代 (Pentium+) CPU 应该使用 SYSENTER 指令。 不使用其他软件中断。
通常您不必担心这一点,因为即使在汇编语言中,您可能仍然想使用包装这些的 C 库。
Linux does not use interrupts for system calls the same way DOS does. It uses an architecture-dependent method to make system calls, which on x86 can be int 0x80, but modern (Pentium+) CPUs should use the SYSENTER instruction instead. Other software interrupts aren't used.
Normally you don't worry about this, because even in assembly language, you'll probably still want to use the C library, which wraps these.
恕我直言,中断的连接方式是特定于硬件的。 了解 Linux 内核如何处理目标硬件上的中断可能很有教育意义。
IMHO the way interrupts are hooked up is hardware specific. It may be educational to look how the Linux kernel deals with interrupts on the hardware you are targeting.