| Munish Kumar 07/02/09 14:41 Read: 154 times Chandigarh India |
#166677 - Didnt get it... Responding to: Karim Fallahzadeh's previous message |
Are you trying to ask this ? :
when a C program is translated to machine code, do all the assembly commands get used in the final machine code? This is possible but not necessarily always, e.g. you can put nothing but while(1) in your main program & then most of the assy. instructions wont be there in the compiled output except for the ones which would be required for the infinite loop. for example while(1) would amount something like: C:0x0478 80FE SJMP C:0478 You can also always write the program that makes use of every instruction, but in assembly only. In C, it is more or less dependent on whether the compiler thinks a particular instruction should be included or not decoding a particular C statement. This is called compiler optimazation, if I am not mistaken. |
| Topic | Author | Date |
| c compilers | Karim Fallahzadeh | 07/02/09 14:17 |
| Didnt get it... | MUNISH KUMAR | 07/02/09 14:41 |
| Why do you ask? | Andy Neil | 07/02/09 16:50 |
| Depends a lot on processor and compiler | Per Westermark | 07/02/09 21:26 |
| Other examples: | Christoph Franck | 07/03/09 03:16 |
| Not necessarily true | Andy Neil | 07/03/09 03:47 |
| Hand-crafted libraries | Per Westermark | 07/03/09 04:12 |
| I don't see this as compiler output | Andy Neil | 07/03/09 04:18 |
Seemed to be quite explicit question | Per Westermark | 07/03/09 04:42 |



