On Thu, Aug 12, 2010 at 6:05 AM, sandeep kumar <[email protected]> wrote: > i used gcc -S to view assembly listing of my program on intel pc > found the instructions and the syntax are much different from that we > find on intel micro processor books(think those programs no longer > work on linux) > why is this new assembly for linux and does it mean assembly changes > from os to os regardless of architecture
GCC, from what I recollect, needs to have an assembler to convert C code into executable binary. I guess it just so happened that the assembler they implemented used different syntax/notation. To answer your second question, machine instructions only depend on the architecture. The two assemblers might have different syntax but the result will use the same instructions. HTH, SB -- l...@iitd - http://tinyurl.com/ycueutm
