<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: mixed language - fortran and assembly in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/mixed-language-fortran-and-assembly/m-p/1745868#M178744</link>
    <description>&lt;P&gt;That error usually points to a calling convention or stack alignment issue especially when moving from 32-bit to 64-bit. In x64 (ml64), Windows uses a different calling convention (fastcall), so things like parameter passing, shadow space (32 bytes), and stack alignment (16-byte) really matter. If your assembly routine isn’t respecting that, you’ll hit access violations like this. Also double-check symbol naming and how the routine is declared in Fortran (bind(C) can help).&lt;/P&gt;&lt;P data-unlink="true"&gt;On a broader note, debugging mixed-language workflows like this is where smarter tooling and AI translation&amp;nbsp; &amp;amp; analysis tools can help streamline things.&lt;/P&gt;</description>
    <pubDate>Mon, 27 Apr 2026 07:31:03 GMT</pubDate>
    <dc:creator>translinguist02</dc:creator>
    <dc:date>2026-04-27T07:31:03Z</dc:date>
    <item>
      <title>mixed language - fortran and assembly</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/mixed-language-fortran-and-assembly/m-p/1703481#M176283</link>
      <description>&lt;P&gt;My laptop is running Windows 10 32-bit and I use the Intel compiler "ifort".&amp;nbsp; From Fortran I can call assembly routines assembled using Masm32.&amp;nbsp; My desktop is running Windows 10 64-bit and I use the Intel OneAPI compiler "ifx".&amp;nbsp; I now assemble the assembler routine with ml64 in the Visual Studio 2022 package.&amp;nbsp; However, any calls from Fortran to an assembly routine bombs with the following error:&lt;/P&gt;&lt;P&gt;forrtl: severe (157): Program Exception - access violation&lt;BR /&gt;Image PC Routine Line Source&lt;BR /&gt;FF.EXE 00007FF7C66D8A19 Unknown Unknown Unknown&lt;BR /&gt;Exception is raised during stack walking&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone know what this error means and how I can fix this program?&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jul 2025 15:02:13 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/mixed-language-fortran-and-assembly/m-p/1703481#M176283</guid>
      <dc:creator>Ken_Woolridge</dc:creator>
      <dc:date>2025-07-15T15:02:13Z</dc:date>
    </item>
    <item>
      <title>Re: mixed language - fortran and assembly</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/mixed-language-fortran-and-assembly/m-p/1703549#M176289</link>
      <description>&lt;P&gt;&lt;A href="https://stevelionel.com/drfortran/2000/12/15/dont-touch-me-there-what-error-157-access-violation-is-trying-to-tell-you/" target="_blank"&gt;Don't Touch Me There - What error 157 (Access Violation) is trying to tell you - Doctor Fortran&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The calling mechanisms on x64 are very different from IA-32, with the first few arguments passed in registers. You probably need to rewrite the assembler code to compensate.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jul 2025 20:40:16 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/mixed-language-fortran-and-assembly/m-p/1703549#M176289</guid>
      <dc:creator>Steve_Lionel</dc:creator>
      <dc:date>2025-07-15T20:40:16Z</dc:date>
    </item>
    <item>
      <title>Re: mixed language - fortran and assembly</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/mixed-language-fortran-and-assembly/m-p/1703755#M176306</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Where can I get a reference manual for 64-bit assembly language which better explains this manner of calling assembly routines?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;What registers is IFX sending the assembly routine?&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;This document "fortran-compiler_developer-guide-reference_2025.2-767251-855933.pdf" only discusses mixed Fortran and C&lt;/DIV&gt;&lt;DIV&gt;programming - not assembly.&amp;nbsp; Why not assembly???&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I need to know how IFX is calling the assembly routine in order for the assembly routine to get the correct info.&lt;/DIV&gt;&lt;DIV&gt;Is IFX passing addresses in the registers?&amp;nbsp; or data?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;What a nightmare!&lt;/DIV&gt;</description>
      <pubDate>Wed, 16 Jul 2025 16:12:47 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/mixed-language-fortran-and-assembly/m-p/1703755#M176306</guid>
      <dc:creator>Ken_Woolridge</dc:creator>
      <dc:date>2025-07-16T16:12:47Z</dc:date>
    </item>
    <item>
      <title>Re: mixed language - fortran and assembly</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/mixed-language-fortran-and-assembly/m-p/1703803#M176312</link>
      <description>&lt;P&gt;ifx follows the x64 calling convention.&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/cpp/build/x64-calling-convention?view=msvc-170" target="_blank"&gt;x64 Calling Convention | Microsoft Learn&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The Intel documentation has never discussed calling assembler, as it is, nowadays, an esoteric topic.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jul 2025 22:44:16 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/mixed-language-fortran-and-assembly/m-p/1703803#M176312</guid>
      <dc:creator>Steve_Lionel</dc:creator>
      <dc:date>2025-07-16T22:44:16Z</dc:date>
    </item>
    <item>
      <title>Re: mixed language - fortran and assembly</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/mixed-language-fortran-and-assembly/m-p/1703943#M176320</link>
      <description>&lt;P&gt;It is not an "esoteric topic" for me.&amp;nbsp; Is there NO information on this???&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jul 2025 12:03:08 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/mixed-language-fortran-and-assembly/m-p/1703943#M176320</guid>
      <dc:creator>Ken_Woolridge</dc:creator>
      <dc:date>2025-07-17T12:03:08Z</dc:date>
    </item>
    <item>
      <title>Re: mixed language - fortran and assembly</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/mixed-language-fortran-and-assembly/m-p/1703945#M176322</link>
      <description>&lt;P&gt;Esoteric for me, last used it in 1989 to talk to a "device" attached to a serial port. I asked AI and the answer was:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;"Yes, assembly language is still used in modern software development, though its usage is specialized and often found in performance-critical or low-level contexts.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;While high-level languages are dominant for general-purpose programming, assembly remains relevant for tasks requiring direct hardware manipulation, specialized processor instructions, or optimizing performance bottlenecks.&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp;"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;So I think the AI agent thinks it esoteric also....&amp;nbsp; A GITHUB entitled "Understanding Windows x64 Assembly" looked like it might be helpful.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jul 2025 12:12:21 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/mixed-language-fortran-and-assembly/m-p/1703945#M176322</guid>
      <dc:creator>andrew_4619</dc:creator>
      <dc:date>2025-07-17T12:12:21Z</dc:date>
    </item>
    <item>
      <title>Re: mixed language - fortran and assembly</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/mixed-language-fortran-and-assembly/m-p/1703956#M176325</link>
      <description>&lt;P&gt;If you program in assembler, and I did so for decades, there is adequate information on how calls are made and arguments passed. You will definitely want to declare your assembler routine as BIND(C) in Fortran so that arguments are passed in a more regular fashion.&lt;/P&gt;&lt;P&gt;I will say that in the nearly 40 years I did Fortran support, I can count the number of times I was asked about calls to assembly on one hand.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jul 2025 13:30:12 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/mixed-language-fortran-and-assembly/m-p/1703956#M176325</guid>
      <dc:creator>Steve_Lionel</dc:creator>
      <dc:date>2025-07-17T13:30:12Z</dc:date>
    </item>
    <item>
      <title>Re: mixed language - fortran and assembly</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/mixed-language-fortran-and-assembly/m-p/1745868#M178744</link>
      <description>&lt;P&gt;That error usually points to a calling convention or stack alignment issue especially when moving from 32-bit to 64-bit. In x64 (ml64), Windows uses a different calling convention (fastcall), so things like parameter passing, shadow space (32 bytes), and stack alignment (16-byte) really matter. If your assembly routine isn’t respecting that, you’ll hit access violations like this. Also double-check symbol naming and how the routine is declared in Fortran (bind(C) can help).&lt;/P&gt;&lt;P data-unlink="true"&gt;On a broader note, debugging mixed-language workflows like this is where smarter tooling and AI translation&amp;nbsp; &amp;amp; analysis tools can help streamline things.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Apr 2026 07:31:03 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/mixed-language-fortran-and-assembly/m-p/1745868#M178744</guid>
      <dc:creator>translinguist02</dc:creator>
      <dc:date>2026-04-27T07:31:03Z</dc:date>
    </item>
  </channel>
</rss>

