Hi
I have a lot of ASM snippets and I am in the process of trying to recode most of them to C. It is a long and tedious process it seems to make sure they are identical and function identically.
Is there any scripts or tooling that can automate this process to rebuild the structural syntax and I relabel the global and local defines as needed after the process completes?
I'm sure, my 8051 is monitoring things like ADC temp IC's, voltage metering, and transmitting serial data to wireless modules. I intend to have .net front end that can call the flash routine so that if the user wants to have some control over the 8051 like can't C to F or whatever, that the .net app can read the serial stream and give the user some feedback. I am also toying with labview to have similiar results. There is more than one 8051 in the system so I've dedicated certain 51's for task specific functions.
But again most of the asm is already written, I just want to convert it to C since it would be easier for me to read than retrace all my steps. I also have a partner I'm bringing in on the project and is fairly good with C vs. asm...so if I can unify both sides of the equation, it just makes life a bit easier.
Does that make sense?
Did you write the assembler part?
Why did you write in assembler in the first place, if you don't have space or timing requirements to use assembler?
I wrote it in assembly because the design I used was mirrored from a fully functional smart chip semicoductor control system. My buddy gave me the schematics of the design and the rom files. He wrote the handlers and system constructs for the machine and he have me the source code so I could learn the system.
I used that baseline in asm to write my older code. They didn't use C on that design, so I had no reason to write in such. That was in 1992. I've recently pulled this system from the ashes since it has a new goal for a project that someone has asked me to get off the ground. Just trying to make life a bit easier......and I don't think I even knew about Keil back in the day.
Seems like I'm going backwards, but it will pay off in the long run, so hence the push for me to rewrite my functional existing code to something I'm alot more comfortable with.
"I intend to have .net front end that can call the flash routine"
No, you can't call 8051 functions remotely!
You need to provide a command/control interface - the PC sends a command, the 8051 does the necessaries, then the 8051 returns its response.
"like can't C to F or whatever"
Pardon??
" the .net app can read the serial stream and give the user some feedback"
This must be the key to it:
As far as the .NET app is concerned, it is just talking to a serial stream - it sends command to it, and receives responses from it in accordance with your interface specification. There is no need for the .NET app to have any knowledge whatsoever of how the remote unit is implemented - whether it's an 8051, another PC, written in 'C', or assembler, or whatever.
Similarly, the 8051 just receives commands on its serial stream, acts accordingly, and sends its response(s). Again, there is no need for the 8051 to have any knowledge whatsoever of how the remote unit is implemented - whether it's a PC, another 8051, or whatever.