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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
11/05/08 07:48
Read: times


 
#159698 - Keil and reasoning
Responding to: ???'s previous message
Sorry, Andy, I overlooked this one.

Andy Neil said:
With Keil, to use inline assembler, the compiler just generates an assembler source as its output. You then have to pass that through the assembler to generate an Object file.

I think this is what all compilers (except the new HiTech OCG perhaps) do, don't they? So this is not Keil's special.
Andy Neil said:
This means you lose all your 'C' source symbol information.

I don't see, why. I will experiment at home if time permits, but I see no reason why would the compilation (i.e. translation from C to asm) hide symbols such as global variables and other function's names.

There are certainly preprocessor issues, that's certainly true.

However, even if all of this would be true, the same holds if you place the asm part into a separate file, isn't it? So it's no better not worse to do it inline (as a function of course, that's my assertion from the very beginning).

Andy Neil said:
It may mean that you can't use (certain) optimisations.

Well, I would go for the pain to do a part of the program in asm IN ORDER to hand-optimise a critical part, so I don't care about what optimisations the compiler could come up with.

Andy Neil said:
It can also mess-up the build system's dependencies.

I don't know what is this, pardon me.

Andy Neil said:
It's probably also responsible for Global Warming and the current Credit Crisis...

Contrary. Hand-optimised code consumes less resources - we trade the energy spent by programmer for the energy spent on manufacturing more memory, more electricity - all this converts directly to money, so if this spares money, it certainly decreases Global Warning, too.
I am too weak in economics to comment on the relationship to the current Credit Crisis, so you might be right on that one.

IANAKE (I Am Not A Keil Expert)

JW


List of 48 messages in thread
TopicAuthorDate
Asm and C            01/01/70 00:00      
   Depends!            01/01/70 00:00      
      Also            01/01/70 00:00      
         No! Not Inline!!            01/01/70 00:00      
            why not inline?            01/01/70 00:00      
               I agree with Andy (at least for Keil), but ....            01/01/70 00:00      
                  Keil specifically            01/01/70 00:00      
                     Keil and reasoning            01/01/70 00:00      
                        Jan...Take it from experience...            01/01/70 00:00      
                           can you please explain?            01/01/70 00:00      
                              Example??            01/01/70 00:00      
                                 I am curious            01/01/70 00:00      
                              Use these references in lieu of examples:            01/01/70 00:00      
                              I explained it earlier; example here            01/01/70 00:00      
                                 I now see the point with Keil...            01/01/70 00:00      
                                    Often intrinsic use of inline assembler            01/01/70 00:00      
                                       Not a safe assumption?            01/01/70 00:00      
                                          No, extrapolation not allowed            01/01/70 00:00      
                                          but if it is a macro...            01/01/70 00:00      
                                             A limited example            01/01/70 00:00      
                                                an opinion            01/01/70 00:00      
                     Keil specifically - more            01/01/70 00:00      
               Why Not inline C            01/01/70 00:00      
               Inline assembler - Avoid! Avoid!!            01/01/70 00:00      
                  in order to keep things together            01/01/70 00:00      
                     I do            01/01/70 00:00      
                        from where I sit...            01/01/70 00:00      
                           you said it            01/01/70 00:00      
                              this has nothing to do with it            01/01/70 00:00      
                                 asm *functions* embedded in C-majority source file            01/01/70 00:00      
                                 Whay Not???            01/01/70 00:00      
                                    My view point on ASM in C            01/01/70 00:00      
                                       That is the point            01/01/70 00:00      
                                 here is one - at least re Keil            01/01/70 00:00      
                     Maybe not here, but...            01/01/70 00:00      
            I do not disagree            01/01/70 00:00      
   Compiler ?            01/01/70 00:00      
      Get the manual when/where you get the compiler            01/01/70 00:00      
   and C in asm ?            01/01/70 00:00      
      C first?            01/01/70 00:00      
         not used to call compiler generated asm so translate by hand            01/01/70 00:00      
      if a compiler can do it            01/01/70 00:00      
      depends on the compiler            01/01/70 00:00      
         SDCC...            01/01/70 00:00      
            What assembler?            01/01/70 00:00      
               SB-asm            01/01/70 00:00      
                  In principle this should work.            01/01/70 00:00      
                  OTOH, why not simply write in ASM?            01/01/70 00:00      

Back to Subject List