Author: Kaslai
Posted: 23 Nov 2012 08:45:27 pm (GMT -5)
Writing using mnemonics does make your code slightly more portable in the sense of transferring it to another CPU that is instruction compatible but not pin compatible, like from the TI-84+ ASIC to the GameBoy ASIC. All of the ROM calls will be totally different though and those make up the meat of any program. Transferring algorithms that don't use ROM calls works fine though.
There are plenty of disassemblers out there, and in fact, most software cracking and other illegal activities are done using disassemblers. There are even some projects that attempt to decompile C and C++ executables, but unless the programmer chose to leave symbols in, any names and structures that you can pull out will be fairly nonsensical. many simple things can also be way overcomplicated by the decompiler. C++ templates are a prime example of this. Any C preprocessor defines are lost, library files are all mixed up, data and code can get confused, inlines aren't extracted... It's all a huge mess really. For most intents and purposes, compiling is a one way street.
_________________
![]()
![]()
![]()
![]()
Posted: 23 Nov 2012 08:45:27 pm (GMT -5)
elfprince13 wrote: | ||
Just to be clear to any new programmers reading this topic - this sentence could only possibly make sense as a comparison between assembly and straight machine code. Assembly is about as unportable as it gets, unless you're writing assembly language for a virtual machine. |
Writing using mnemonics does make your code slightly more portable in the sense of transferring it to another CPU that is instruction compatible but not pin compatible, like from the TI-84+ ASIC to the GameBoy ASIC. All of the ROM calls will be totally different though and those make up the meat of any program. Transferring algorithms that don't use ROM calls works fine though.
There are plenty of disassemblers out there, and in fact, most software cracking and other illegal activities are done using disassemblers. There are even some projects that attempt to decompile C and C++ executables, but unless the programmer chose to leave symbols in, any names and structures that you can pull out will be fairly nonsensical. many simple things can also be way overcomplicated by the decompiler. C++ templates are a prime example of this. Any C preprocessor defines are lost, library files are all mixed up, data and code can get confused, inlines aren't extracted... It's all a huge mess really. For most intents and purposes, compiling is a one way street.
_________________



