Daniele Esposti's Blog

Disassembly C code for fun – Part 4: floats and SSE2

Today we look at the disassembly of a functions involving floats and SSE2 instructions. As I stated in the first post Disassembly C code for fun: part 1 the C code is compiled for a x86-64 architecture which means the CPU has the SSE/SSE2 instructions sets by default. The code...


Count elements in an iterator

Counting elements in a list, tuple or dictionary in Python is trivial, count the elements in a iterator is not. Because of the nature of a generator it’s not possibile to know how many elements will be returned from the iterator, only one element is returned at time and the...


Disassembly C code for fun - Part 3: for loop

…And it’s already the third post about disassembly C code for fun. Today we disassembly a simple for..loop cycle Update: Don’t miss the next post Disassembly C code for fun – Part 4: floats and SSE2 Disassembly time First the C code: #include <stdio.h> int main() { for (int i...


Disassembly C code for fun: part 2

So, in the previous post Disassembly C code for fun: part 1 I didn’t used as example the well known “Hello World!” code, but for a good reason: I need to explain some basics of the disassembly process (prologue, epilogue, stack, etc.) before proceed any further. Anyway in this post...


Disassembly C code for fun: part 1

I’m currently reading The C Programming Language by Ritchie and Kernighan to learn the C language from ground zero. I already write sometimes C/C++ code but it’s always a good idea to learn a already known language from the chapter 1 specially if you learn it by practice skipping the...