<?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"><channel><title><![CDATA[Inline-Assembler: C++ Variable in Register und int]]></title><description><![CDATA[<p>Moin Moin,<br />
hoffe erstmal das ich hier richtig bin (wusste nicht ob das zu C++ oder Assembler gehört).<br />
Ich möchte eine Variable</p>
<pre><code>unsigned int temp;
</code></pre>
<p>in das Register ES packen, wie macht man so was? Habe nur mit Assembler(Intel/MS Syntax) gearbeitet und nicht mit AT&amp;T Syntax oder Inline-Assembler. Und wie nutzt man denn Befehl int (in Inline-Assembler)? Mein Compiler ist der &quot;clang LLVM compiler&quot; aka GCC/G++.</p>
<p>BD</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/326496/inline-assembler-c-variable-in-register-und-int</link><generator>RSS for Node</generator><lastBuildDate>Mon, 25 May 2026 18:03:04 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/326496.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 21 Jun 2014 09:53:35 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Inline-Assembler: C++ Variable in Register und int on Sat, 21 Jun 2014 09:53:35 GMT]]></title><description><![CDATA[<p>Moin Moin,<br />
hoffe erstmal das ich hier richtig bin (wusste nicht ob das zu C++ oder Assembler gehört).<br />
Ich möchte eine Variable</p>
<pre><code>unsigned int temp;
</code></pre>
<p>in das Register ES packen, wie macht man so was? Habe nur mit Assembler(Intel/MS Syntax) gearbeitet und nicht mit AT&amp;T Syntax oder Inline-Assembler. Und wie nutzt man denn Befehl int (in Inline-Assembler)? Mein Compiler ist der &quot;clang LLVM compiler&quot; aka GCC/G++.</p>
<p>BD</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2404875</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2404875</guid><dc:creator><![CDATA[Inline]]></dc:creator><pubDate>Sat, 21 Jun 2014 09:53:35 GMT</pubDate></item><item><title><![CDATA[Reply to Inline-Assembler: C++ Variable in Register und int on Sat, 21 Jun 2014 10:20:15 GMT]]></title><description><![CDATA[<blockquote>
<p>Und wie nutzt man denn Befehl int (in Inline-Assembler)?</p>
</blockquote>
<p>Es macht einen interrupt. Unter Linux nutzt man bspw. <code>int 0x80</code> für einen Syscall.</p>
<p>So sähe der Code aus:</p>
<pre><code>unsigned temp = 752;
	asm(&quot;movl %0, %%eax;&quot; ::&quot;r&quot;(temp) :&quot;%eax&quot; );
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2404881</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2404881</guid><dc:creator><![CDATA[Columbo]]></dc:creator><pubDate>Sat, 21 Jun 2014 10:20:15 GMT</pubDate></item><item><title><![CDATA[Reply to Inline-Assembler: C++ Variable in Register und int on Sat, 21 Jun 2014 11:04:17 GMT]]></title><description><![CDATA[<p>Inline schrieb:</p>
<blockquote>
<p>Mein Compiler ist der &quot;clang LLVM compiler&quot; aka GCC/G++.</p>
</blockquote>
<p>Ähm, das sind zwei unterschiedliche Compiler.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2404887</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2404887</guid><dc:creator><![CDATA[oenone]]></dc:creator><pubDate>Sat, 21 Jun 2014 11:04:17 GMT</pubDate></item><item><title><![CDATA[Reply to Inline-Assembler: C++ Variable in Register und int on Sat, 21 Jun 2014 23:13:31 GMT]]></title><description><![CDATA[<p>Kann ich auch noch gleich was zu Inline-Assembler fragen? <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /><br />
Ja? Cool!<br />
Also:</p>
<p>Wie funktioniert eigentlich das ansprechen der Segemntregister?<br />
Nach <a href="http://lowlevel.eu" rel="nofollow">lowlevel.eu</a> heißt es:</p>
<pre><code>[i]Register werden in der Ausgabe- und Eingabeliste folgendermaßen bezeichnet: a, b, c, d stehen für eax, ebx, ecx, edx (bzw. die entsprechenden Word- und Byte-Varianten, je nach Größe der übergebenen Variablen), D für edi und S für esi[/i]
</code></pre>
<p>Was ist dann der Buchstabe für die Segmentregister?</p>
<p>LG</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2404982</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2404982</guid><dc:creator><![CDATA[LightBoom]]></dc:creator><pubDate>Sat, 21 Jun 2014 23:13:31 GMT</pubDate></item><item><title><![CDATA[Reply to Inline-Assembler: C++ Variable in Register und int on Sun, 22 Jun 2014 08:34:40 GMT]]></title><description><![CDATA[<p><a href="http://en.wikipedia.org/wiki/X86_memory_segmentation" rel="nofollow">Auf x86</a>: cs, ds, ss, es, fs und gs.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2404991</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2404991</guid><dc:creator><![CDATA[Biolunar]]></dc:creator><pubDate>Sun, 22 Jun 2014 08:34:40 GMT</pubDate></item></channel></rss>