assembly code for addition ?

Status
Not open for further replies.

Parth86

Member
I am beginner for arm I just want to learn assembly for arm
I have written code
Code:
Area   example , code  readonly
entry

start
mov R0 #5
mov R1#3
add R0, R0,R1
stop B stop
End

I am seeing 7 error massage
assembling lcd.asm...
lcd.asm(1): error A9: SYNTAX ERROR
lcd.asm(2): error A9: SYNTAX ERROR
lcd.asm(3): error A9: SYNTAX ERROR
lcd.asm(4): error A9: SYNTAX ERROR
lcd.asm(5): error A9: SYNTAX ERROR
lcd.asm(6): error A38: NUMBER OF OPERANDS DOES NOT MATCH INSTRUCTION
lcd.asm(7): error A9: SYNTAX ERROR
lcd.asm - 7 Error(s), 0 Warning(s).
 
AREA EXAMPLE -area directive can be used to specify name section of program code and data

which type of example we can write?

ENTRY- first instruction to be executed
CODE- contain Instruction
READONLY- code in read only memory
B - branch instruction
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…