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
