相关疑难解决方法(0)

x86中的IN&OUT指令用于什么?

在阅读"理解Linux内核"一书的同时,我已经在IN&OUT中遵循了这些指令.我查阅了参考手册.

5.1.9 I/O指令

这些指令在处理器的I/O端口和寄存器或存储器之间移动数据.

IN    Read from a port
OUT   Write to a port
INS/INSB  Input string from port/Input byte string from port 
INS/INSW  Input string from port/Input word string from port 
INS/INSD  Input string from port/Input doubleword string from port
OUTS/OUTSB    Output string to port/Output byte string to port 
OUTS/OUTSW    Output string to port/Output word string to port 
OUTS/OUTSD    Output string to port/Output doubleword string to port
Run Code Online (Sandbox Code Playgroud)

我没有得到一些东西:

  1. "处理器的I/O端口".这些是什么?为什么我们要在这些端口上读取和写入"字符串"?
  2. 我从来没有遇到过需要使用这些说明的场景.我什么时候需要这些?
  3. 举一些实际的例子.

x86 assembly linux-kernel

55
推荐指数
5
解决办法
7万
查看次数

标签 统计

assembly ×1

linux-kernel ×1

x86 ×1