i have a programm in armv6 assembly which calculates the result of (x +y)^2
this code doesn't work, and returns: "Unsupported ARM syscall: 0xffffffdf"
.global _start
.text
_start:
MOV r0, #4
MOV r1, #5
MOV r7, #1
BL calc
SWI #0
calc:
ADD r7, r0, r1
MUL R0, R7, R7
MOV PC, LR
but this one is slightly edited and works (or it doesn't?):
.global _start
.text
_start:
MOV r0, #4
MOV r1, #5
MOV r7, #1
BL calc
BL exit
calc:
ADD r7, r0, r1
MUL R0, R7, R7
MOV PC, LR
exit:
LDR r7, =1
SWI 0
can anyone please tell me why the first code is not working? is the second one even valid?