Translate the following C code into assembler int a 2 int b

Translate the following C code into assembler.

int a = 2;

int b = 9;

int c = a+b;

         (Hint: c should be a variable in .bss section. You may use rax accumulator for a+b)

Solution

Assembly code of the given C code:

add a, b, c # sum of the b and c stored in a

Translate the following C code into assembler. int a = 2; int b = 9; int c = a+b; (Hint: c should be a variable in .bss section. You may use rax accumulator for

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site