Writing cross-platform code, especially for early games where you're using a fairly restricted set of the platform code (and even less if you're doing a software renderer), is similarly not that hard in the common case if you've thought about it/have experience with it. There are a few different approaches, but even just having a single file that has POSIX and DOS compatibility functions (ie, above the stuff the C standard provides) and some macros could probably get you 90% of the way there.
I don't mean to downplay how hard it is to, say, support multiple renderers, which is a problem that came later, or porting code that was written without any thought given to future portability. But given they knew they were supporting two platforms, it's not that hard to do (compared to the other, actually hard, stuff they did).