Intel Embedded in gcc

I am trying to compile an old C ++ program project in Code :: Blocks using the gcc compiler, and after fixing some other problems, I hit a wall: there is a file in the project with a built-in ASM-built ASM file and

_asm {
  code here
}

and the compiler refuses to compile it with "error:" _asm "was not declared in this scope."

I spent some time looking for solutions, but the only ones I can find are to add -masm=intelto the build options (which I tried and can't make it work), or convert the code asm ("code here");(which is impossible due to the large number of ASMs). Does anyone know how I can get gcc to compile this code as is, or should I refuse and use a different compiler?

+5
source share
2 answers

GCC uses very different syntax for inline assembler, so you won’t be able to handle it with trivial changes. I see the following options:

  • Rewrite everything in GCC syntax or in C code
  • Make some script to translate to GCC syntax (non-trivial task)
  • Compile code with any compiler for which it was written (MSVC?)
+2
source

gcc " ". gcc, ++ gcc- asm. - , 200 - gcc; , ++.

0

All Articles