+ 14
Is it possible to use an assembly coding in a c++ code on Sololearn ?
Is it possible to use an assembly coding in a c++ code on Sololearn ? I know that is possible on a computer IDE but is that possible for Sololearn ? I have already try to use assembly coding in a c++ code but on Sololearn this create a lot of exception . May be the assembly code is different for Sololearn. This is the code what i have use: #include <iostream> using namespace std; int main() { asm { move eax, 10;//create a variable add eax, 10; //add 10 } cout<<eax; return 0; } Can you help me ?
6 Answers
+ 13
yes you can. sololearn uses gcc. so use the following format __asm__ (/* assembly body */ );
https://code.sololearn.com/cwpJgrivL0Mk/?ref=app
https://www.cs.uaf.edu/2012/fall/cs301/lecture/10_01_link_with_cpp.html
+ 9
@jay, @Babak Sheykhan, thank you ^^
+ 8
It supports AT&T assembly syntax.
Try this:
https://code.sololearn.com/c6TMOWzn7kC4/?ref=app
+ 7
Ok, thank you for replying.
+ 4
I have tried it on SL's ide too, it seems to not be supported unfortunately
+ 4
@jay ty