Unofficial Hacker News companion — get notified on comment replies, and more.

Borland's DOS compilers, rebuilt from their own binaries (opens external site)

260 points by frostbyte7 2 days ago | github.com | 95 comments on HN | Vote on HN (opens Hacker News) |

View full thread · View on Hacker News

Comment thread (6)

  1. While we're at it: Commented disassembly of Turbo Pascal 3.01A for DOS: https://pcengines.ch/tp3.htm Commented disassembly of Turbo Pascal 3 for CP/M Z80: https://mark-ogden.uk/mirrors/www.cirsovius.de/CPM/Projekte/... Disassembly/leak of TURBO.EXE (IDE + Compiler) from TP6. Written in TP6 and assembly, but without comments.
    Replies (3)
    1. I forgot to add the link for the last one : https://exmortis.narod.ru/index_eng.html (Compilers - Ctrl+F tpascal.zip)
    2. Another CP/M decompilation is also available at https://www.memotech.franken.de/CPM80/
    3. The fun thing with TP3 is that it's not optimizing at all. When reverse engineering a COM file created by it (pre-AI), I ended up writing an automated matching decompiler.
      Replies (1)
      1. I would be very interested in studying your work. I have manually decompiled several programs written in TP3 and TP7 using only a disassembler (ndisasm). In my opinion, these compilers are optimizing, but the optimizations are opportunistic.
        Replies (1)
        1. I'm pretty sure TP3 isn't optimizing, it also says so in the page you linked above.

          I dumped my decompiler source here: https://github.com/ashdnazg/obrut

          It's an unreadable mess, but if you find anything interesting/useful, do tell.