Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
04/20/04 20:20
Read: times


 
#68927 - Use Assembler.
Responding to: ???'s previous message
Iztok Moravsek said:
Is there any possibility to force C language to generate...


No - there is no way to force any 'C' compiler to generate any specific machine instructions. That's the whole point.

If it really matters that much to you (and you may well have good reasons), then you will have to write this particular function in Assembler.

If you need specific machine instructions, there is no point in messing about trying to coerce a 'C' compiler - and run the risk that it might change due to side effects of other code, or option changes, or compiler updates, or any number of other reasons.

The only way to guarantee specific machine instructions is to use assembler.

There is no problem in calling 'C' from assembler - there's a whole section in the Manual on how to do it.

List of 18 messages in thread
TopicAuthorDate
Keil Halt            01/01/70 00:00      
   Use Assembler.            01/01/70 00:00      
   RE: Keil Halt            01/01/70 00:00      
      RE: Keil C51 uses DJNZ            01/01/70 00:00      
         RE: Keil C51 uses DJNZ            01/01/70 00:00      
            RE: Keil C51 uses DJNZ            01/01/70 00:00      
   Optimise your C            01/01/70 00:00      
      RE: DJNZ            01/01/70 00:00      
   RTFM?            01/01/70 00:00      
      RE: RTFM?            01/01/70 00:00      
         RE: RTFM?            01/01/70 00:00      
            RE: RTFM?            01/01/70 00:00      
               RE: RTFM?            01/01/70 00:00      
                  RE: RTFM?            01/01/70 00:00      
                     Keil Halt - Primer            01/01/70 00:00      
                        RE: Keil Halt - Primer            01/01/70 00:00      
                           This way lies disaster!!            01/01/70 00:00      
   RE: Keil Halt            01/01/70 00:00      

Back to Subject List