13.07.2015 Views

Volume 3: General-Purpose and System Instructions - Stanford ...

Volume 3: General-Purpose and System Instructions - Stanford ...

Volume 3: General-Purpose and System Instructions - Stanford ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

24594 Rev. 3.10 February 2005 AMD64 TechnologyOUTSOUTSBOUTSWOUTSDOutput StringCopies data from the memory location pointed to by DS:rSI to the I/O port address(0000h to FFFFh) specified in the DX register, <strong>and</strong> then increments or decrements therSI register according to the setting of the DF flag in the rFLAGS register.If the DF flag is 0, the instruction increments rSI; otherwise, it decrements rSI. Itincrements or decrements the pointer by 1, 2, or 4, depending on the size of the valuebeing copied.The OUTSx instruction uses an explicit memory oper<strong>and</strong> (second oper<strong>and</strong>) todetermine the type (size) of the value being copied, but always uses DS:rSI for thelocation of the value to copy. The explicit register oper<strong>and</strong> specifies the I/O portaddress <strong>and</strong> must always be DX.The no-oper<strong>and</strong>s forms of the instruction use the DS:[rSI] register pair to point to thedata to be copied <strong>and</strong> the DX register as the destination. The mnemonic specifies thesize of the I/O port <strong>and</strong> the type (size) of the value being copied.The OUTSx instruction supports the REP prefix. For details about the REP prefix, see“Repeat Prefixes” on page 10.If the oper<strong>and</strong> size is 64-bits, OUTS only writes to a 32-bit I/O port.If the CPL is higher than the IOPL or the mode is virtual mode, OUTSx checks the I/Opermission bitmap in the TSS before allowing access to the I/O port. See <strong>Volume</strong> 2 fordetails on the TSS I/O permission bitmap.Mnemonic Opcode DescriptionOUTS DX, mem8OUTS DX, mem16OUTS DX, mem326E6F6FOutput the byte in DS:rSI to the port specified in DX, thenincrement or decrement rSI.Output the word in DS:rSI to the port specified in DX, thenincrement or decrement rSI.Output the doubleword in DS:rSI to the port specified in DX, thenincrement or decrement rSI.OUTSx 221

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!