Hi Miskin,
Thanks for joining us.
Hi Alex,
Yeah, "wrong forum" is the simple answer, but we might be able to help a little in spite of that. I don't think any assembler is really an inline assembler - certain compilers will allow inline assembler in a certain syntax. I have recently heard that some version of MinGW GCC will accept Nasm syntax, but I can't confirm that. In any case, this isn't it. Looks more like Masm syntax to me. ("mov c, eax" is a dead giveaway!)
But ignoring syntax, does it make any sense? The compiler is going to generate a prolog to "main" with three local variables. Then, I think you're going to need to open an "_asm" block, probably surrounded with "{}"s. I don't think "_asm_test:" is going to do it(?). Then you do "enter 0, 0" - a prolog (of sorts) with no local variables. I doubt if you want that. Then you add a couple of variables - main's locals? Then you "leave" and "ret"... but nothing but "main" has been "call"ed at this point - probable crash. At best, you'd "ret" from "main" and never execute the "printf" line. I think you'd want to lose the "enter", "leave", and "ret" and do it all "in line" with "main".
Or... we could make it a "Nasm question" and assemble a separate module with Nasm and link it with a C "main" - not "in line" at all. There may be some compiler that will allow you to use Nasm syntax for inline assembly, but I don't think that's what you've got there... Good luck with it, in any case.
Best,
Frank