The Blitz/Austro-Speed Decompiler ----------------------------------- This Decompiler will decompile Basic programs that were compiled using the commercial program Blitz! or the PD program Austro-Speed. This program will also find any imbedded Machine Language code included in the compiled code. A good example of this is Austro-Speed itself. When you decompile Austro-Speed you will find a file with an .ml extension saved to disk. This is the ML program that was imbedded in Austro-Speed. You will be asked for the name of the program to decompile and then asked if you wish the Final Output to be compacted. The normal output from the decompiler will have ONE basic command per line. Most listings will end up being extreamly long because of this. If you select compaction then the final output will be compressed to fill each line with as much data as it can without going over the 80 character limit of the Basic Editor. Here is an example of the output from the decompiler. 10 clr 20 poke53280,0 30 poke53281,0 40 print If you have selected the compaction option then the output will look like this. 10 clr:poke53280,0:poke53281,0:print This will make things much easier to understand. The normal one instruction per line will have a .bas file extension (ie filename is the compiled program and filename.bas is the decompiled code) and the compacted basic program will have a .cmp extension (ie filename.cmp). The one line per instruction output is left incase you would like to use it as well. I have included both the source code (decompiler.bas) and an austro-speed compiled version (decompiler). When decompiling a program it can take a very long time. There are 4 different passes the decompiler will make. The first pass will check for Data Statement Information and display each item it finds, check for any imbedded ML code, Basic variables (displayed) and array variables (displayed). The program will also display the address locations for the start and end of the Data Statements, Variables, ML Code and Basic Code within the compiled program. The second pass will begin building the final Basic Program output and add any data statements to the end of the program it has found. The decompiler uses the current processed address location in the compiled program for the line numbers. This is why you will see line numbers start over 8000. I would suggest using a renumbering program after decompiling for more uniform line numbering. The third pass will save any imbedded ML code that has been found within the compile program. The fourth pass will compact the decompiled Basic program if you have requested it. This pass will take almost as long or longer than all three previous passes combined. It will scan the source Basic program for all goto, then and gosub statements and remember the line numbers they are to jump too. It will then rescan the Basic program compressing the code and saving it out to another program. This is very time consuming but WELL WORTH THE WAIT! The three file extensions you can see after decompiling are: .bas - Final one instruction per line number Basic program. .cmp - Final compacted Basic program. .ml - The imbedded ML code found within the compile program. This program has worked without fail on every Blitz! and Austro-Speed compiled program I have found. Sometimes the program will indicate an Austro-Speed compiled program was compiled by Blitz!. There is a reason for this. There were a number of different versions of Austro-Speed and the early versions were very different from the final Austro-Speed release. The last version of Austro-Speed created compiled code that is IDENTICAL to anything compiled by Blitz! and this is why it will indicate that the program was Blitz! compiled.