• iocase@lemmy.zip
    link
    fedilink
    English
    arrow-up
    5
    ·
    edit-2
    4 hours ago

    Yeah it’s 99% written in assembly which if you know assembly is fucking hard.

    You don’t even have primitives like division in assembly. You have to write that code yourself to tell the processor how to divide two numbers and handle a remainder… Modern CPUs are different now in that they have that as a built in feature but back then they didn’t.

    Like the famous joke about assembly: “to bake an apple pie in assembly, first you must create the entire universe”

    • macros@feddit.org
      link
      fedilink
      English
      arrow-up
      3
      ·
      4 hours ago

      Yes assembly is complicated, but more like error prone and tedious than fucking hard, which still makes the game a huge achievement, especially considering its complexity. I haven’t had RCT crash on me even once for which I admire the author! What you miss compared to a programming language are named variables and especially structures, named functions and loops can be simulated (as can everything a higher language like C can do) and are just not as comfortable. And you have to have a way more intimated knowledge of the inenr workings of the processors you want to run your software on, than with higher languages.

      Div has been part of the Intel assembler since the 8086 from 1978, long before RCT was written. The first processor supporting it is from 1952! (The IBM 701), fdiv (Floating point divide) was widely available on Home-PCs since the 8087 from 1980. By the time RCT was written there where already comfort functions integrated into processor instructions sets like setting single bytes with BTS or scaled index addressing. Still writing software with a programming language was way easier and faster. But the result would never be as optimized as a good assembly program.