Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Unexpected characters at end of line

I Writing a code that loops 1000 times in assembly language, although I keep getting these errors:

main.s(48): error: A1137E: Unexpected characters at end of line
main.s(53): error: A1137E: Unexpected characters at end of line
main.s(55): error: A1163E: Unknown opcode endloop , expecting opcode or Macro
".\SimpleProject.axf" - 3 Error(s), 0 Warning(s).

Here is an Example of my code:

MOV R0, #1, i = 1;
startloop   
    cmp R0, #1000
    BGT endloop
        ADD R1, R1, R0
        ADD R0, R0, #1, i++;
        B startloop
endloop

line (48) refers to:

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

MOV R0, #1, i = 1;

>Solution :

Try changing the erroneous line to:

MOV R0, #1

Clearly i = 1; was supposed to be a comment, but you accidentally typed a comma instead of whatever comment character is supported by your assembler. Read the documentation of your assembler to learn comment syntax.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading