Going through the tutorial, my code:
AREA MyFirstExample, Code, ReadOnly ENTRY MOV r0,#4 MOV r1,#5 ADD r2,r0,r1 S B S END
When I build I get the following error:
MyFirstExample.s(6): error: A1163E: Unknown opcode S , expecting opcode or Macro ".\Objects\MyFirstExample.axf" - 1 Error(s), 0 Warning(s).
There is a space in front of the S. I need help resolving this error.
B . ; LOOP TO SELF
Symbols need to be in the first column
Yeah, I think some books use:
Stop B Stop ;infinite loop
which is more clear. In defense of the tutorial, it does have correct spacing in the pdf, and a descriptive comment. If user simply copies and pastes code, the spacing was still correct for me.
But there is an "e1" instead of "r1" in the first example. I'm not sure where that "e1" is from.
I guess you are using an old tutorial
Sometimes, giving labels meaningful names is useful. imho, that example really should be one of those 'sometimes'!
I guess you are using an old tutorial, here: alanclements.org/ARMgradedExamples.pdf
The spacing is probably off. Try the following:
For more information, read the following documentation: infocenter.arm.com/.../index.jsp
S B S
That's not a valid opcode. And you've probably not defined a macro of that name.
Comment the line out (by putting a ; before the S B S and try again
View all questions in Keil forum