News for hackers. Stuff that matters.
Re:Some dark corners of C by nonpme on Saturday March 09, 2013 @11:36AM (#5348810)
On some slides there is shown how particular function is expressed in assembly. I know nothing about that language (I'm talking about assembly; I know c and even like it) and when I tried to find anything how to learn this I faced some problems. I don't know, where should I start, how should I start etc. Can someone point me to good resources or starting points (I prefer linux than windows if that's matters)?

(Sorry for of offtopic)

Re:Some dark corners of C by scotttsai on Saturday March 09, 2013 @12:33PM (#5348993)
The assembly used were relatively simple and for x86-64 Linux (You can tell it's not for Windows by how function arguments were passed).

You can actually get a firm grasp of the basics just by reading chapter 3 from Computer Systems: A Programmer's Perspective (http://csapp.cs.cmu.edu/public/samples.html) and practice writing some simple command line programs.

Re:Some dark corners of C by kps on Saturday March 09, 2013 @11:39AM (#5348820)
You shouldn't read too much into the assembly output from any particular compiler (except maybe dmr's for the PDP-11), but the de facto standard command line option "-S" will cause a *nix compiler to generate a ".s" file containing assembly rather than a binary.
Re:Some dark corners of C by nonpme on Saturday March 09, 2013 @11:44AM (#5348839)
Wow, I didn't know about -S option, thanks for the tip! I know it may not be optimal assmbly code, but that's still interesting code to read.