<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Malik Huzaifa on Medium]]></title>
        <description><![CDATA[Stories by Malik Huzaifa on Medium]]></description>
        <link>https://medium.com/@malikhuzaifaahmad555?source=rss-aeafb5df0ba5------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*cBIS4inX8hxDE7j5NI1dVw.jpeg</url>
            <title>Stories by Malik Huzaifa on Medium</title>
            <link>https://medium.com/@malikhuzaifaahmad555?source=rss-aeafb5df0ba5------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 17:52:24 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@malikhuzaifaahmad555/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[STRING DATA TRANSFERS]]></title>
            <link>https://medium.com/@malikhuzaifaahmad555/string-data-transfers-12dc04c2c78e?source=rss-aeafb5df0ba5------2</link>
            <guid isPermaLink="false">https://medium.com/p/12dc04c2c78e</guid>
            <category><![CDATA[networking]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[news]]></category>
            <dc:creator><![CDATA[Malik Huzaifa]]></dc:creator>
            <pubDate>Tue, 17 Dec 2024 11:19:55 GMT</pubDate>
            <atom:updated>2024-12-17T11:19:55.706Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/695/1*5h6zJAhp3D_LoOpu5ygDjw.png" /><figcaption>String Data Transfers</figcaption></figure><p>There are five string data transfer instructions: LODS, STOS, MOVS, INS, and OUTS. Each string instruction allows data transfers that are either a single byte, word, or doubleword (or if repeated, a block of bytes, words, or doublewords). Before the string instructions are presented, the operation of the D flag-bit (direction), DI, and SI must be understood as they apply to the string instructions. In the 64-bit mode of the Pentium 4 and Core2, quadwords are also used with the string instructions such as LODSQ.</p><h4>The Direction Flag</h4><p>The direction flag (D, located in the flag register) selects the auto-increment or the auto-decrement operation for the DI and SI registers during string operations. The direction flag is used only with the string instructions. The CLD instruction clears the D flag and the STD instruction sets it . Therefore, the CLD instruction selects the auto-increment mode and STD selects the auto-decrement mode . Whenever a string instruction transfers a byte, the contents of DI and/or SI are incremented<br>or decremented by 1. If a word is transferred, the contents of DI and/or SI are incremented or decremented by 2.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/530/1*ItUFB2yMCQoMIjdcG0Ds3A.png" /><figcaption>Direction Flag</figcaption></figure><p>Doubleword transfers cause DI and/or SI to increment or decrement by 4. Only the actual registers used by the string instruction are incremented or decremented. For example,<br>the STOSB instruction uses the DI register to address a memory location. When STOSB executes, only the DI register is incremented or decremented without affecting SI. The same is true of the LODSB instruction, which uses the SI register to address memory data. A LODSB instruction will only increment or decrement SI without affecting DI.</p><h4>DI and SI</h4><p>During the execution of a string instruction, memory accesses occur through either or both of the DI and SI registers. The DI offset address accesses data in the extra segment for all string instructions<br>that use it. The SI offset address accesses data, by default, in the data segment. The segment assignment of SI may be changed with a segment override prefix, as described later in this chapter. The DI<br>segment assignment is always in the extra segment when a string instruction executes.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=12dc04c2c78e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>