home.social

#desmetc — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #desmetc, aggregated by home.social.

  1. btw the #ELKS maintainer has also been hacking on #DesmetC and has his own fork (though still closely related to the main DOS repo) that is able to compile an increasingly large amount of stuff natively from within ELKS :blobcheerbounce: It's great seeing ongoing interest in on-target 8086 development, as opposed to just cross builds.

  2. The first round of test generation for #DesmetC is complete, yielding over 30,000 test cases for integer comparison, integer arithmetic, and constant folding. Numerous bugs dating to the late 1980s were found and corrected. This is now out for review as pull request 9.

    #retrocomputing #softwarearchaeology

  3. On the plus side I seem to have corrected lots of #DesmetC mul/div/mod bugs in one fell swoop by rewriting the relevant part of its codegen, lmao. So many type hacks, gone.

    On the minus side, I think now I might be finding some bugs in #OpenWatcom C, which was supposed to be my infallible test oracle, dammit ;D

  4. Latest #DesmetC "explorations with machete and torch": the compiler source has numbered constants for each supported C datatype. Normally you'd use enum for this sort of thing, but this codebase used #defines. The constants were numbered in a strange order, and I wanted to re-sort them in the order of the "usual arithmetic conversions", to simplify some logic. This broke code-gen, emitting illegal instructions. Several hours later, I found that CCHAR=1 and CINT=2 were directly used in hex math determining which x86 opcode to emit. When I renumbered those constants, it caused absurd instructions to be generated. After correcting that problem, we are now back to self-hosting o.k.
    I'm hoping this will make it possible to retire a bunch of one-off type promotion logic scattered around the compiler, in favor of a few central functions closely mapping to the C89 standard.

    #retrocomputing #SoftwareArchaeology