takao21203
- Joined Apr 28, 2012
- 3,702
The fact it seems to be so much intellectually demanding to write programs, I am tempted to look at this whole thing again.sir,( to all the above )
thanks for all you have suggested ;
I have an idea but don't know how to implement it some thing like Reverse Engineering
eg.:-
"C" Language code's converted to the BINARY Language code's With the help of C Compiler (Like Dev C++ / Keil μVer 4 "C" code's converted to Binary Code's)
And
"ASM" Language Code's converted to the Binary Language Code's with the help of " 'ASM' Compiler ( like " ASM51 " ASSEMBLY Language code's converted to Binary Code's ( may be I don't know))
Now
can we convert that HEX => Binary code's to Binary => "C" code's.
if yes how?
I have indeed learned C language. If you know assembler its not difficult, just a different way of spelling and you basically dont need the opcodes.
To translate ASM to C is not good, rather program in C genuinely.
C is hardware independent all the same for the small 8bit ICs.
Assembler is different for each and a phlethora to remember all and so easy to have bugs creep in,
need to do basic things manually, only have 8bit natively and so on.
You could actually code the C script with any IDE, MPLABX is good since you have a simulator and is free, later port to specific IC.
You need to understand properly memory, array, pointer, bits, ALU operation, allocation, include files.
If not maybe it can be kind of a learning experience but you will be stuck all the time.
IT is possible to try convert ASM to C almost 1:1 but not the easiest or best way, in C your not as much bound, it might be slower
and taking more memory in the end but that doesnt really count anymore.
Write the whole thing in C from scratch, using MPLABX with simulator, look at tasks definition, then port to the IC youre going to use.
So the guru would use include files, functions for the IO.
This is how petitfs is done, to use the FAT32 SD card, can compile on almost any 8bit IC, only
needs a few modifications for hardware IO.
you would need a few years and some 100 programs to learn this technology, but worth to think about this when you program.
Make it hardware independent and portable as much as possible.