📄 out.htm
字号:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"><HTML><HEAD><TITLE>80386 Programmer's Reference Manual -- Opcode OUT</TITLE></HEAD><BODY><B>up:</B> <A HREF="c17.htm">Chapter 17 -- 80386 Instruction Set</A><BR><B>prev:</B><A HREF="OR.htm"> OR Logical Inclusive OR</A><BR><B>next:</B><A HREF="OUTS.htm"> OUTS/OUTSB/OUTSW/OUTSD Output String to Port</A><P><HR><P><H1>OUT -- Output to Port</H1><PRE>Opcode Instruction Clocks DescriptionE6 ib OUT imm8,AL 10,pm=4*/24** Output byte AL to immediate port numberE7 ib OUT imm8,AX 10,pm=4*/24** Output word AL to immediate port numberE7 ib OUT imm8,EAX 10,pm=4*/24** Output dword AL to immediate port numberEE OUT DX,AL 11,pm=5*/25** Output byte AL to port number inDXEF OUT DX,AX 11,pm=5*/25** Output word AL to port number inDXEF OUT DX,EAX 11,pm=5*/25** Output dword AL to port number in DX</PRE><EM><H3>Notes</H3><PRE> *If CPL <= IOPL **If CPL > IOPL or if in virtual 8086 mode</PRE></EM><H2>Operation</H2><PRE>IF (PE = 1) AND ((VM = 1) OR (CPL > IOPL))THEN (* Virtual 8086 mode, or protected mode with CPL > IOPL *) IF NOT I-O-Permission (DEST, width(DEST)) THEN #GP(0); FI;FI;[DEST] := SRC; (* I/O address space used *)</PRE><H2>Description</H2>OUT transfers a data byte or data word from the register (AL, AX, orEAX) given as the second operand to the output port numbered by thefirst operand. Output to any port from 0 to 65535 is performed by placingthe port number in the DX register and then using an OUT instructionwith DX as the first operand. If the instruction contains an eight-bit portID, that value is zero-extended to 16 bits.<H2>Flags Affected</H2>None<H2>Protected Mode Exceptions</H2>#GP(0) if the current privilege level is higher (has less privilege) thanIOPL and any of the corresponding I/O permission bits in TSS equals 1<H2>Real Address Mode Exceptions</H2>None<H2>Virtual 8086 Mode Exceptions</H2>#GP(0) fault if any of the corresponding I/O permission bits in TSSequals 1<P><HR><P><B>up:</B> <A HREF="c17.htm">Chapter 17 -- 80386 Instruction Set</A><BR><B>prev:</B><A HREF="OR.htm"> OR Logical Inclusive OR</A><BR><B>next:</B><A HREF="OUTS.htm"> OUTS/OUTSB/OUTSW/OUTSD Output String to Port</A></BODY>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -