This does not look too friendly:
__asm("command 1"
"command 2"
"command 3");
Do I really have to put a doublequote around every line?
Also… since multiline string literals do not work in GCC, I could not cheat with that either.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I always find some examples on Internet that the guy manually insert a tab and new-line instead of \t and \n, however it doesn’t work for me. Not very sure if your example even compile.. but this is how I do:
Or put double quotes around each line, instead of using
\line-continuation. C string literals separately only by whitespace (including a newline) are concatenated into one long string literal. (Which is why you need the\ninside it, so it’s separate lines when it’s seen by the assembler).This is less ugly and makes it possible to put C comments on each line.