+1

Why the following code cant able to produce the output??

I am working to learn c/c++ with assembly but the code not generate output ever I got errors ?? Help me to get out of this ??? https://code.sololearn.com/ciqSixXYrjX3/?ref=app

7/11/2019 11:35:00 AM

Nom Butt

5 Answers

New Answer

+1

With some "cosmetic" changes required by GCC, you can do it! Here is your adapted code... https://code.sololearn.com/clpeBTRw26nz/?ref=app

0

Where I can learned to code in cpp with assembly Bilbo Baggins and Paul because Bilbo your method is different and paul your method is different So, I think Im a little bit confused

0

The beautiful of programming is that you can do the same thing in many ways, and you can choose the one that you like best. AT&T syntax, for GCC compilers, is the most classic way (https://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html). Intel syntax is more common in Microsoft CL compilers (https://docs.microsoft.com/it-it/cpp/assembler/inline/writing-functions-with-inline-assembly?view=vs-2019). Happy coding!

0

Thanks bro

-1

That's because you don't follow the inline Assembly syntax. You cannot directly use the c variables in assembly (plus, they most likely won't have the same name) Here is a working implementation: https://code.sololearn.com/cTT646osxyIN/?ref=app