Last edited by Bio_Hazard1282_rPi3 on 22 Jul 2019 11:00:31 am; edited 2 times in total

Hello everyone. I'm creating a new project called z80 program UN-SQUISHIER, hence the title. This tool is intended to do the exact opposite of the AsmComp( command. So for example, if you compiled AsmPrgmFDCB24DEC9, the result of that is ?xyLinecosh»╣(fnInt(Disp sinh»╣(. The program reverses that. Mainly so you can copy and paste it and show it to others so they can type it in. I'm sorry to say this program doesn't decompile the whole program at once, rather line-by-line. But either there are kinks in the program coding or in Celtic 3, not all assembly programs are un-squished correctly. The hex code is available, but I cannot guarantee it is 100% correct. Here is the source code below of what I have:

Overall the un-squishing process is pretty quick, I tried to make this as simple and small as possible. Let me know what you guys think if there are any improvements that can be made with my program. I uploaded this to ticalc.org, upload pending.

Well too bad because this has nothing to do with a "decompiler" :p
The actual name that even TI used is indeed squishing/unsquishing.
One step further would be disassembling (to get asm code from the bytes/hex), then further again would be decompiling, to (pseudo-)C if it applies.

AsmComp( probably stands for AssemblyCompress(, not AssemblyCompile(. Also, TI is just bad at naming things. "Compile" already has a meaning, which is to convert a higher-level language like C into assembly code or machine code. Likewise, "decompile" means to convert assembly code or machine code into the original higher-level language. This is much harder to do than desquishing, which is just converting bytes to hex, and disassembly, which is converting machine code into opcodes, because most compilers make optimizations to the code which are difficult to reverse. Naming your program a "decompiler" would imply that it performed the much more sophisticated task of converting programs into the original ICE or C source, which would be misleading.

Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.