• Instructions for building the Hi-Tech C v3.09 Cross Compiler

    From =?UTF-8?B?0JDQvdC00YDQtdC5INCd0LjQu@21:1/5 to All on Fri Jul 22 09:12:53 2022
    Instructions for building the Hi-Tech C v3.09 Cross Compiler for Linux, MacOS, or Windows can be found at https://github.com/nikitinprior/Cross_compiler_z80

    Andrey Nikitin

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From David Given@21:1/5 to nikiti...@gmail.com on Wed Aug 17 08:28:50 2022
    On Friday, 22 July 2022 at 18:12:54 UTC+2, nikiti...@gmail.com wrote:
    Instructions for building the Hi-Tech C v3.09 Cross Compiler for Linux, MacOS, or Windows can be found at https://github.com/nikitinprior/Cross_compiler_z80

    I may have missed it, but where do you actually get the source code from?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?B?0JDQvdC00YDQtdC5INCd0LjQu@21:1/5 to All on Thu Aug 18 06:50:18 2022
    среда, 17 августа 2022 г. в 20:28:51 UTC+5, david...@gmail.com:
    On Friday, 22 July 2022 at 18:12:54 UTC+2, nikiti...@gmail.com wrote:
    Instructions for building the Hi-Tech C v3.09 Cross Compiler for Linux, MacOS, or Windows can be found at https://github.com/nikitinprior/Cross_compiler_z80
    I may have missed it, but where do you actually get the source code from?

    C source code is obtained by disassembling executable programs into assembly language. After that, the resulting assembly language program is examined and C code is obtained from it. The resulting code is then compiled and compared with the disassembled
    code. If necessary, the C code is modified to better match the original binary image. In a similar way it was possible to restore almost all compiler programs. Naturally, the restored code is not the original code, but it is very close to it. The
    resulting source code can already be compiled by modern compilers. The result is a cross compiler for modern operating systems that generates code almost identical to the original compiler for CP/M.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?B?0JDQvdC00YDQtdC5INCd0LjQu@21:1/5 to All on Thu Aug 18 09:10:29 2022
    четверг, 18 августа 2022 г. в 20:30:31 UTC+5, david...@gmail.com:
    On Thursday, 18 August 2022 at 15:50:20 UTC+2, nikiti...@gmail.com wrote:
    среда, 17 августа 2022 г. в 20:28:51 UTC+5, david...@gmail.com:
    On Friday, 22 July 2022 at 18:12:54 UTC+2, nikiti...@gmail.com wrote:
    Instructions for building the Hi-Tech C v3.09 Cross Compiler for Linux, MacOS, or Windows can be found at https://github.com/nikitinprior/Cross_compiler_z80
    I may have missed it, but where do you actually get the source code from?
    C source code is obtained by disassembling executable programs into assembly language. After that, the resulting assembly language program is examined and C code is obtained from it. The resulting code is then compiled and compared with the
    disassembled code. If necessary, the C code is modified to better match the original binary image. In a similar way it was possible to restore almost all compiler programs. Naturally, the restored code is not the original code, but it is very close to it.
    The resulting source code can already be compiled by modern compilers. The result is a cross compiler for modern operating systems that generates code almost identical to the original compiler for CP/M.
    I understand, but there's no reference to a repository of the converted source code or to the tools needed to do the conversion.

    in the repository https://github.com/nikitinprior/dcgen
    files with .asm extension are Disassembled version and After compiling C source code. This repository is the first attempt to get the source code in C language. Further work has been done to fix bugs and fix the code. Especially for recovery, no special
    tools were used. All work was done by hand, relying on common sense. The compiler generates code using some rules. These rules were noticed and using them an attempt was made to recreate the source code. Completely documenting the re-creation process is
    quite a big and quite complex job. When recreating the compiler code, the task was not to describe the entire algorithm of the actions performed and teach someone to do such transformations. To solve such a problem requires desire, a lot of free time and
    painstaking work. For the compiler, this work is done. It may contain errors, which, having the source code, are now easier to detect and fix. The main result is the availability of source code, which prolongs the life of a good compiler and allows
    interested people to see how it was implemented. From my point of view, the task has been completed completely.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From David Given@21:1/5 to nikiti...@gmail.com on Thu Aug 18 08:30:30 2022
    On Thursday, 18 August 2022 at 15:50:20 UTC+2, nikiti...@gmail.com wrote:
    среда, 17 августа 2022 г. в 20:28:51 UTC+5, david...@gmail.com:
    On Friday, 22 July 2022 at 18:12:54 UTC+2, nikiti...@gmail.com wrote:
    Instructions for building the Hi-Tech C v3.09 Cross Compiler for Linux, MacOS, or Windows can be found at https://github.com/nikitinprior/Cross_compiler_z80
    I may have missed it, but where do you actually get the source code from?
    C source code is obtained by disassembling executable programs into assembly language. After that, the resulting assembly language program is examined and C code is obtained from it. The resulting code is then compiled and compared with the
    disassembled code. If necessary, the C code is modified to better match the original binary image. In a similar way it was possible to restore almost all compiler programs. Naturally, the restored code is not the original code, but it is very close to it.
    The resulting source code can already be compiled by modern compilers. The result is a cross compiler for modern operating systems that generates code almost identical to the original compiler for CP/M.

    I understand, but there's no reference to a repository of the converted source code or to the tools needed to do the conversion.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?B?0JDQvdC00YDQtdC5INCd0LjQu@21:1/5 to All on Thu Aug 18 09:20:24 2022
    четверг, 18 августа 2022 г. в 21:10:30 UTC+5, Андрей Никитин:
    четверг, 18 августа 2022 г. в 20:30:31 UTC+5, david...@gmail.com:
    On Thursday, 18 August 2022 at 15:50:20 UTC+2, nikiti...@gmail.com wrote:
    среда, 17 августа 2022 г. в 20:28:51 UTC+5, david...@gmail.com:
    On Friday, 22 July 2022 at 18:12:54 UTC+2, nikiti...@gmail.com wrote:
    Instructions for building the Hi-Tech C v3.09 Cross Compiler for Linux, MacOS, or Windows can be found at https://github.com/nikitinprior/Cross_compiler_z80
    I may have missed it, but where do you actually get the source code from?
    C source code is obtained by disassembling executable programs into assembly language. After that, the resulting assembly language program is examined and C code is obtained from it. The resulting code is then compiled and compared with the
    disassembled code. If necessary, the C code is modified to better match the original binary image. In a similar way it was possible to restore almost all compiler programs. Naturally, the restored code is not the original code, but it is very close to it.
    The resulting source code can already be compiled by modern compilers. The result is a cross compiler for modern operating systems that generates code almost identical to the original compiler for CP/M.
    I understand, but there's no reference to a repository of the converted source code or to the tools needed to do the conversion.
    in the repository https://github.com/nikitinprior/dcgen
    files with .asm extension are Disassembled version and After compiling C source code. This repository is the first attempt to get the source code in C language. Further work has been done to fix bugs and fix the code. Especially for recovery, no
    special tools were used. All work was done by hand, relying on common sense. The compiler generates code using some rules. These rules were noticed and using them an attempt was made to recreate the source code. Completely documenting the re-creation
    process is quite a big and quite complex job. When recreating the compiler code, the task was not to describe the entire algorithm of the actions performed and teach someone to do such transformations. To solve such a problem requires desire, a lot of
    free time and painstaking work. For the compiler, this work is done. It may contain errors, which, having the source code, are now easier to detect and fix. The main result is the availability of source code, which prolongs the life of a good compiler
    and allows interested people to see how it was implemented. From my point of view, the task has been completed completely.

    https://github.com/nikitinprior/ contains the source code for almost all compiler utilities. The descriptions for each program provide instructions on how this code must be compiled to obtain the final result.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?B?0JDQvdC00YDQtdC5INCd0LjQu@21:1/5 to All on Fri Aug 19 06:00:22 2022
    пятница, 19 августа 2022 г. в 15:42:08 UTC+3, david...@gmail.com:
    On Thursday, 18 August 2022 at 18:20:25 UTC+2, nikiti...@gmail.com wrote:
    четверг, 18 августа 2022 г. в 21:10:30 UTC+5, Андрей Никитин:
    [...]
    https://github.com/nikitinprior/ contains the source code for almost all compiler utilities. The descriptions for each program provide instructions on how this code must be compiled to obtain the final result.
    Thanks --- that looks great. I did actually try that myself a couple of years ago but I was using Ghidra, which doesn't produce runnable C code from Z80 machine code. I did manage to identify most of the libc, though.

    I will note that the projects are marked as having the GPL license when actually the Hitech C license still applies!

    Thanks for the kind words.
    HI-TECH SOFTWARE has allowed the free use of its software product with the obligatory requirement to indicate copyright. The restored C code is released to the public under the GPL, but in several places I remind you that
    "All copyrights to the restored code still belong to HI-TECH SOFTWARE."

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From David Given@21:1/5 to nikiti...@gmail.com on Fri Aug 19 05:42:06 2022
    On Thursday, 18 August 2022 at 18:20:25 UTC+2, nikiti...@gmail.com wrote:
    четверг, 18 августа 2022 г. в 21:10:30 UTC+5, Андрей Никитин:
    [...]
    https://github.com/nikitinprior/ contains the source code for almost all compiler utilities. The descriptions for each program provide instructions on how this code must be compiled to obtain the final result.

    Thanks --- that looks great. I did actually try that myself a couple of years ago but I was using Ghidra, which doesn't produce runnable C code from Z80 machine code. I did manage to identify most of the libc, though.

    I will note that the projects are marked as having the GPL license when actually the Hitech C license still applies!

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)