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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
02/24/03 15:28
Read: times


 
#39908 - RE: 8051 assembly to C converter
Responding to: ???'s previous message
The best solution is a text editor that can open two windows at a time. CodeWright is an example of such an editor. You open the existing assembly code source file in one window. You compose the new C code in the other window. The efficiency of this process is directly related to how well you know 8052 assembly language as well as amount of experience you have with C.

It can be wise to structure the new C program in much the same way as the existing assembly language. Try to keep subroutune boundaries and functions of each the same.

If the original assembly language has any complex algorithms it is sometimes necessary to sketch out a flow chart of the code so that you can understand the flow of control. Without this it can sometimes be difficult to derive correspondingly efficient C code.

If the existing code had a lot of computational logic you will find that many lines of code reduce to very much simpler formulas written in the C syntax. As such the assember code may have math oriented subroutines that will not need to even be converted.

It is also common to find a whole batch of utility type subroutines in the assembler source code that will disappear upon the conversion to C. These will include string handling routines, conversion routines, and the before mentioned math routines.

Good Luck.
Michael Karas




List of 7 messages in thread
TopicAuthorDate
8051 assembly to C converter            01/01/70 00:00      
   RE: 8051 assembly to C converter            01/01/70 00:00      
      RE: 8051 assembly to C converter            01/01/70 00:00      
         RE: 8051 assembly to C converter            01/01/70 00:00      
            RE: 8051 assembly to C converter, Oren            01/01/70 00:00      
            Oren, Erik            01/01/70 00:00      
   RE: 8051 assembly to C converter            01/01/70 00:00      

Back to Subject List