Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Do these functions look correct for x86-64 assembly, and how would i solve the volume of a cube Be able to write a function in

Do these functions look correct for x86-64 assembly, and how would i solve the volume of a cube image text in transcribed
image text in transcribed
Be able to write a function in assemble language such as: - factorial function - function to compute product of 6 numbers. - function to compute average of 4 numbers. - function to compute volume of cube. forctions: factorial: mov % rdi , \%rax muv ral to rax dec \% rdi decrement olord: cmp $1, \%rd compare 1 to \%ord: jne loop if not equal, jump to loop. mor$1, \% rax mov $1, to rax loop: ret cmp $1, \%ord cmp1 to rd: Jle end if =1 go to end mul ord: mol rd: wl rax dec \%rd decrement rel: jemploop. loop again end: average: add \%rd: \%rsi rsi = rsitrd: add \%orsi, olordx rdx=rdx+rsi add % ordx, %cxrex=rcx+rdx shr $2,%rcx divide rex by 22. mov \%orex, orax mav, rex. to rax ret

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 And Transaction Processing

Authors: Philip M. Lewis, Arthur Bernstein, Michael Kifer

1st Edition

0201708728, 978-0201708721

More Books

Students also viewed these Databases questions

Question

=+ (c) Show that if & is countable, then f(. ) is countable.

Answered: 1 week ago

Question

e. What do you know about your ethnic background?

Answered: 1 week ago

Question

b. Why were these values considered important?

Answered: 1 week ago