flat assembler
Message board for the users of flat assembler.
  
|  Index
      > Tutorials and Examples > Including Assembly in C++ | 
| Author | 
 | 
| UniverseIsASimulation 27 Nov 2019, 15:25 Hey, guys!
 I've just posted a video in which I show an easy way to include Assembly into C++. What do you think about it? I think it might help novice people get into Assembly. | |||
|  27 Nov 2019, 15:25 | 
 | 
| redsock 14 Dec 2019, 09:12 Converting assembly language into its C/gcc/asm("") directive style include is interesting for sure, though I am not sure I would classify it as easy. Lots of possibilities to screw up this fragile process.
 Admittedly Windows is not my thing anymore, but can't fasm produce a Windows object file that could be ABI compliant and linkable to an otherwise normal C/C++ project like I do for Linux? | |||
|  14 Dec 2019, 09:12 | 
 | 
| donn 14 Dec 2019, 16:47 If I followed that correctly, your method includes asm as inline asm() blocks in C++ projects? That's more flexible than linking against MS COFF functions in ways since you have to deal with the calling conventions. On the other hand, you have to have some C++ where you can plop the inlined asm.
 Vid has an example using the MS COFF function linking method: https://flatassembler.net/examples/msvc.zip which is similar to the Linux HeavyThing method. Using the function linking method, you can call functions and access variables even from other asm, without C++. I've found it very useful, but inlining asm using automation is worth exploring too. | |||
|  14 Dec 2019, 16:47 | 
 | 
| < Last Thread | Next Thread > | 
| Forum Rules: 
 | 
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.