Question: 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

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
Get step-by-step solutions from verified subject matter experts
