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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
05/14/09 11:28
Read: times


 
#165321 - dead easy and it will not work if you do not
Responding to: ???'s previous message
Because I like to use table-driven dispatch routines in ASM, for speed and brevity, I'd probably write the MAIN component in ASM, and use compiled modules from the 'C' compiler as macros or subroutines. I'm not sure how easy that would be, however.
C subroutines to an asm program is dead easy once you have figured out how to do it; however no (keil?) C will work if the main is in asm. This can easily be handled by the following:
void main void
{
assemblermain();
} 

anyhow
void main void
{
while (1)
  {
  task1();
  task2();
  task3();
  task4();
  }
}

comes out identical whether in asm or C

Just a note: once you realize the advantages of C you will end up writing 75-100% of your code in C. the tough part (at least it was for me) is to realize that 75-100% of any code does not need to be super effcient.

Erik



List of 29 messages in thread
TopicAuthorDate
Command Processor            01/01/70 00:00      
   More detail required            01/01/70 00:00      
      Command Processor            01/01/70 00:00      
         Standard Async Serial (updated)            01/01/70 00:00      
         What is it that you need?            01/01/70 00:00      
            Command Processor            01/01/70 00:00      
               What compiler?            01/01/70 00:00      
                  Code to Get command            01/01/70 00:00      
                     Buffer overflow...            01/01/70 00:00      
                        Sorry            01/01/70 00:00      
                     did you retype the code?? ....            01/01/70 00:00      
                        This code is translated            01/01/70 00:00      
                           Alternative parsing            01/01/70 00:00      
                              Code to Get command            01/01/70 00:00      
                           wasteful            01/01/70 00:00      
               I would not do this in 'C'            01/01/70 00:00      
                  Thank you            01/01/70 00:00      
                     Assembler floating point?            01/01/70 00:00      
                        I didn't say he shouldn't use 'C' at all ...            01/01/70 00:00      
                  'C' may not be that bad            01/01/70 00:00      
                     Just this particular function would be very fast in ASM            01/01/70 00:00      
                        Maybe; maybe not...            01/01/70 00:00      
                           The opinion that assembler is faster than C            01/01/70 00:00      
                              In this case, speed isn't a big factor.            01/01/70 00:00      
                                 dead easy and it will not work if you do not            01/01/70 00:00      
                                    no (keil?) C will work if the main is in asm            01/01/70 00:00      
                                       What I was considering            01/01/70 00:00      
                  I WOULD write thsi in C            01/01/70 00:00      
                     Thta doesn't surprise me.            01/01/70 00:00      

Back to Subject List