Decompiling
Rick Murray (539) 13850 posts |
Moved out of the announcements so it can be discussed asides from the ROOL/ROS announcement…
I played with a VB decompiler many years ago. Compilers are fairly regular in their code generation so undoing it shouldn’t be too hard. You’ll lose variable names and such but the code structure should be intact. Justin Fletcher was famously able to spot something in the original HAL by looking at the disassembly because he was made of awesome just that familiar with how Norcroft generated code… |
Anthony Vaughan Bartram (2454) 458 posts |
Sounds like Justin was a human decompiler :-) So in this instance, I find it interesting to think about the case where there is never was any C code, but only ASM source code and then applying a decompiler logic (with intermediate representation and data path tracking) to produce an equivalent representation in C (even if it were imperfect and needed manual fix up). Thus creating C code for more of RISC OS. Unfortunately, I’ve been too busy with various other projects (both work related) and RISC OS related, such as RDSP. I looked at one and it seemed primarly interested in tracking data lifetimes. It doesn’t have to work perfectly, just to provide a degree of automation. I understand the Window Manager in RISC OS is in ASM (Not got the code to hand – so I’m not sure if that’s right). If it were partially automated / partially manually transcoded to C, then I conjecture it would be easier to extend and modify. |