They developed Doom on NeXT with highly portable C code. The reason for that is they were more productive on NeXT workstations (development and map design). Doom has been easily ported to every platform because they designed it to be easily ported. Recommended reading: https://fabiensanglard.net/gebbdoom/
Not only that but it was due to their portable software architecture which was by design. Carmack isolated the platform dependent stuff so that you can port it to any other platform without too much effort.
The great majority of platform dependent code is video output, keyboard handling, sound and network.
The functions for that that call dos/x86-specific code are neatly separated by the rest in appropriately named files, so itβs really easy to know what you will need to modify, without a million other distractors.