<br><br><div class="gmail_quote">On Mon, Feb 18, 2013 at 5:07 AM, horseriver <span dir="ltr">&lt;<a href="mailto:horserivers@gmail.com" target="_blank">horserivers@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

hi:)<br>
<br>
  I have compiled a .S file ,using command gcc -c x.S -o x.<br>
  Then I use objdump to look up its asm code, even find that some code is not the<br>
  same as that .S file , more important is , some code in origin  .S file has disappear .<br>
<br>
  what is about the reason ? If it is due to version , why some code chould get lost after compile?<br>
<br></blockquote><div>Couple of things<br>1. Please don&#39;t piggy back questions over the unrelated topic, that is totally misdirecting the discussion.<br>2. You ask a lot of question related to compilation and stuff, which are off-topic here, why not READ a little bit more or consult relevant documentation?<br>

3. You seem to do no homework before asking viz googling or reading basic books on relevant topic for example in this case reading a book on assembly language programming.<br><br>When you write any assembly code(or for that matter any code) your code is written to be read by HUMANS and not machines. For machines a lot of that code is redundant and has no use so machine code will be generated in such a form that it is most optimized for the execution. For example take any *.c code and do <br>

<br>#gcc -S *.c<br>you will see an equivalent assembly code. It may not exactly be similar to the code which you will write in assembly for same logic. There are some rules according to which compilers generate code, please read some book on compilers and lex and yacc. <br>

<br><br><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
thanks!<br>
</blockquote></div><br><br clear="all"><br>-- <br>Thank you <br>Warm Regards<br>Anuz<br>