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"