Answered You can hire a professional tutor to get the answer.

QUESTION

I need help writing a piece of assembly code (x86-64) on a Linux platform. The goal is to write assembly routine that performs unsigned integer

I need help writing a piece of assembly code (x86-64) on a Linux platform. The goal is to write assembly routine that performs unsigned integer multiplication, without using the imul instruction (or mul, or any instruction that multiplies for you). 

These are the specifications from my instructor:

The Specification:

• The register %edi will contain the argument a.

• The register %esi will contain the argument b.

• The register %eax will carry the return value, the product of a and b.

• You may use registers %rax, %rcx, %rdx, %rsi, %rdi, %r8, %r9, %r10 and %r11 as scratch registers, i.e., you may modify their values without penalty. Plan your register usage accordingly!

• You may not modify the values of registers %rbx, %rbp, %rsp, %r12, %r13, %r14 and %r15.

• You may not modify the values of any external memory locations.

This is my code so far:

  .globl times

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question