DOS and BIOS had some pretty crappy interrupt calls for Serial port access and as DOS was single threaded and you could hang the PC if not careful. In timing critical cases you were safer accessing the serial controller directly.. Of course strictly verboten under any real OS and one of the reasons a lot of older timing critical software was problematic to move to windows or other hardware.