subject
Engineering, 29.02.2020 04:15 tyreannag7696

Add a new assembly file to your Lab03 project called lab03b. S (use the procedure you used in Lab02 to add this file and make sure it gets called from main. c) In this file, write an ARMv8 program with the following specifications: Reserve space in memory for a variable called UIN of size double word. The initial value of UIN will be the sum of the digits in your UIN .The program should implement the following piece of C-code: for i -0 i <10; i++) UIN UIN-1This is what I have so far, but it is not working.

ADD X5, XZR, XZR // adding 21 to X5 to represent a 9 digit UIN

ADD X5, X5, #21

ADD X0, XZR, XZR // ADDING 10 from 0 to get 10

ADD X0, X0, #10

loop: CBZ X0, L2 // If X0 is not 0 keep looping

SUB X0, X0, #1 // SUBTRACTING 1 FROM X0 so it will loop 10 times

SUB X5, X5, #1 // subtract 1 from the sum of the UIN (21)

B loop // loop back to CBZ

L2:

STUR X5, [SP, #0] // Store final UIN answer

BR X30

.section .data

ansver
Answers: 2

Another question on Engineering

question
Engineering, 04.07.2019 18:10
Steel is coated with a thin layer of ceramic to protect against corrosion. what do you expect to happen to the coating when the temperature of the steel is increased significantly? explain.
Answers: 1
question
Engineering, 04.07.2019 18:10
During a steady flow process, the change of energy with respect to time is zero. a)- true b)- false
Answers: 2
question
Engineering, 04.07.2019 18:10
Different types of steels contain different elements that alter the characteristics of the steel. for each of the following elements, explain what the element does when alloyed with steel.
Answers: 2
question
Engineering, 04.07.2019 18:10
The filament of an incandescent lamp has a temperature of 2000k. calculate the fraction of radiation emitted in the visible light band if the filament is approximated as blackbody
Answers: 2
You know the right answer?
Add a new assembly file to your Lab03 project called lab03b. S (use the procedure you used in Lab02...
Questions
question
Mathematics, 22.09.2019 19:30
Questions on the website: 13722363