Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Does the Intel 64 and IA-32 Architectures Software Developer's Manual Description of OUT Instruction contain errors?

In Volume 2, CHAPTER 4 INSTRUCTION SET REFERENCE, M-U, the description of OUT Instruction has this sentence:

"using the DX register as a source operand allows I/O ports from 0 to 65,535 to be accessed."

I think when using OUT instruction, the DX register is specify the IO port not the source operand.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

What the manual says is correct, even if the wording is a bit unclear.
When using an immediate parameter to specify the port number (like OUT imm8, AX), you are limited to ports 0-255 as the immediate operand is 8 bits.

When using DX to specify the port number (like OUT DX, EAX), all 65536 ports can be used.

The term ‘source operand’ is a bit misleading, as in the above example, the contents of EAX are output to the port specified by DX. So, the contents of DX specify the destination port number.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading