<?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[Using ASM (x86) with Qt on MacOS with CMake. How?]]></title><description><![CDATA[<p dir="auto">Hello all!</p>
<p dir="auto">Trying to find any examples of how to setup using ASM (x86) in Qt project with CMake. Is there any manuals or examples?</p>
<p dir="auto">For now trying to run this examples <a href="https://firexfly.com/clang-inline-assembly/" target="_blank" rel="noopener noreferrer nofollow ugc">https://firexfly.com/clang-inline-assembly/</a></p>
<p dir="auto">Have this kind of errors:</p>
<pre><code>error: unknown register name '%eax' in asm
</code></pre>
<p dir="auto">or</p>
<pre><code>error: unrecognized instruction mnemonic, did you mean: fmov, mov, movi, movk, movn, movz, smov, umov?
</code></pre>
<p dir="auto">What is missing by me?</p>
]]></description><link>https://forum.qt.io/topic/162829/using-asm-x86-with-qt-on-macos-with-cmake.-how</link><generator>RSS for Node</generator><lastBuildDate>Thu, 23 Apr 2026 02:56:03 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/162829.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 26 Jul 2025 06:43:15 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Using ASM (x86) with Qt on MacOS with CMake. How? on Wed, 06 Aug 2025 12:37:07 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/bogong">@<bdi>bogong</bdi></a> That's a very commendable goal. If your purpose is just to learn low-level programming principles, I'd suggest you to actually not start with x86 assembly. The CISC micro-architecture of Intel and AMD processors is hugely complex after decades of evolution while remaining backwards compatible all the way to the original 8086. It leads to the assembly language having all kinds of strange and arbitrary limitation, which you probably don't want to lose sanity on for just learning the principles.</p>
<p dir="auto">ARM assembly may be smoother, or actually - you can play around with assembly for one of the PDP-derived architectures (VAX, m68k, ...) with an emulator. They are straightforward to program for (my university's computing fundamentals course was taught with PDP-11 assembly language... and I'm not that old).</p>
<p dir="auto">Also, in case you don't know about the NAND-to-Tetris course, I warmly recommend taking it to learn about computing down to the logic gate level.</p>
]]></description><link>https://forum.qt.io/post/830136</link><guid isPermaLink="true">https://forum.qt.io/post/830136</guid><dc:creator><![CDATA[IgKh]]></dc:creator><pubDate>Wed, 06 Aug 2025 12:37:07 GMT</pubDate></item><item><title><![CDATA[Reply to Using ASM (x86) with Qt on MacOS with CMake. How? on Wed, 06 Aug 2025 13:14:01 GMT]]></title><description><![CDATA[<p dir="auto">6502 assembly, simple, elegant :)  Bit limited on memory though...</p>
]]></description><link>https://forum.qt.io/post/830138</link><guid isPermaLink="true">https://forum.qt.io/post/830138</guid><dc:creator><![CDATA[JonB]]></dc:creator><pubDate>Wed, 06 Aug 2025 13:14:01 GMT</pubDate></item><item><title><![CDATA[Reply to Using ASM (x86) with Qt on MacOS with CMake. How? on Wed, 06 Aug 2025 12:37:07 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/bogong">@<bdi>bogong</bdi></a> That's a very commendable goal. If your purpose is just to learn low-level programming principles, I'd suggest you to actually not start with x86 assembly. The CISC micro-architecture of Intel and AMD processors is hugely complex after decades of evolution while remaining backwards compatible all the way to the original 8086. It leads to the assembly language having all kinds of strange and arbitrary limitation, which you probably don't want to lose sanity on for just learning the principles.</p>
<p dir="auto">ARM assembly may be smoother, or actually - you can play around with assembly for one of the PDP-derived architectures (VAX, m68k, ...) with an emulator. They are straightforward to program for (my university's computing fundamentals course was taught with PDP-11 assembly language... and I'm not that old).</p>
<p dir="auto">Also, in case you don't know about the NAND-to-Tetris course, I warmly recommend taking it to learn about computing down to the logic gate level.</p>
]]></description><link>https://forum.qt.io/post/830136</link><guid isPermaLink="true">https://forum.qt.io/post/830136</guid><dc:creator><![CDATA[IgKh]]></dc:creator><pubDate>Wed, 06 Aug 2025 12:37:07 GMT</pubDate></item><item><title><![CDATA[Reply to Using ASM (x86) with Qt on MacOS with CMake. How? on Mon, 04 Aug 2025 18:09:55 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/igkh">@<bdi>IgKh</bdi></a> Just trying to learn it for myself. Need to know and understand how it works on low-level. My life-path is moving me to the low-level applications development from developing 'just-UI'. Always trying to learn something. Need to know how-it-works on the level of electricity.</p>
]]></description><link>https://forum.qt.io/post/830040</link><guid isPermaLink="true">https://forum.qt.io/post/830040</guid><dc:creator><![CDATA[bogong]]></dc:creator><pubDate>Mon, 04 Aug 2025 18:09:55 GMT</pubDate></item><item><title><![CDATA[Reply to Using ASM (x86) with Qt on MacOS with CMake. How? on Sun, 27 Jul 2025 20:46:40 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/bogong">@<bdi>bogong</bdi></a> said in <a href="/post/829721">Using ASM (x86) with Qt on MacOS with CMake. How?</a>:</p>
<blockquote>
<p dir="auto">What is missing by me?</p>
</blockquote>
<p dir="auto">That the error messages imply that you try to use x86 assembly but your compilation is targeting arm64 (hence the assembler's complaints about the <code>eax</code> register not existing; and you getting offered ARM mnemonics like <code>movz</code>, probably in response to you trying to use the <code>movl</code> mnemonic which is x86 only).</p>
<ul>
<li>Make sure you target only x86_64 in your build (in CMake, you have  <code>CMAKE_OSX_ARCHITECTURES</code>).</li>
<li>Or if you want to target ARM, you need to use ARM assembly code which is completely different to x86 assembly.</li>
<li>If you are building universal binaries, then you need to write a different version of the inline assembly block for each architecture, and direct to the correct one with preprocessor macros.</li>
</ul>
<p dir="auto">May I ask why you think you need inline assembly? There is quite possibly an easier approach.</p>
]]></description><link>https://forum.qt.io/post/829765</link><guid isPermaLink="true">https://forum.qt.io/post/829765</guid><dc:creator><![CDATA[IgKh]]></dc:creator><pubDate>Sun, 27 Jul 2025 20:46:40 GMT</pubDate></item></channel></rss>