Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a new assembly function, lab02d, which takes does the following . It takes as an argument from main0 some long long int. 2. It

image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Internals A Deep Dive Into How Distributed Data Systems Work

Authors: Alex Petrov

1st Edition

1492040347, 978-1492040347

More Books

Students also viewed these Databases questions