Question: Write a new assembly function, lab02d, which takes does the following . It takes as an argument from main0 some long long int. 2. It
Write a new assembly function, lab02d, which takes does the following . It takes as an argument from main0 some long long int. 2. It adds 1000 to that value 3. It stores this value into a location in the data segment with a tag of "myvalue" 4. It returns the address of where this value was stored back to main as a long long int I've written code that covers 1-3, but I don't know how to do 4. Please add and feel free to make corrections to my code. Thanks 1.section 2 .globl lab02d .text ADD X0, X0, #1000 ADRP X5, myvalue ADD X5, X5, :1o12 :myvalue //loads last 12 bits of myvalue into X5 STUR , [X5, #0] BR X30 //adds 1000 to X0 //loads top 21 bits of myvalue into X5 6 //stores val from X0 into X5 10 12section.date 13 myvalue: .byte 16
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
