Write an ARM Assembly language program for adding three numb

Write an ARM Assembly language program for adding three numbers.

Solution

Program:

ADD r0,r1,r2

ADD r0,r3

Stop B Stop

END

Explanation:

ADD r0,r1,r2 // Add r1 and r2 and store in r0

ADD r0,r3 // Add r0 and r3 and store in r0

Stop B Stop // Branch to the line labelled Stop

END // END is an assemble directive that tells the assembler there is not more code to follow. It ends the program.

 Write an ARM Assembly language program for adding three numbers.SolutionProgram: ADD r0,r1,r2 ADD r0,r3 Stop B Stop END Explanation: ADD r0,r1,r2 // Add r1 and

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site