Lecture 2
Lecture 2, Jul 29, 2009
Sample code for
- sum.c The C program.
- sum.s Corresponding assembly code
- Disassmbled code from ./a.out. Each line has 3 portions. The left most portion is the address of the location, the middle portion is the machine code (in hexadecimal) and the last portion is the assembly code.
How to generate, compile and disassemble.
To compile
$ gcc sum.c
To get the assembly code
$ gcc -S sum.c
To disassemble the machine code
$ objdumb --disassemble ./a.out | less
Last modified on 29 October, 2009 (Thursday)