I have been using the old Turbo C compiler for handling these serial ports. The code is basically programming onto the bare metal, emitting bits to the various 8250 registers discussed in section 3, and aiming and implementing interrupt handler for receiving data.
The BIOS and DOS functions available on DOS machines tend to be completely inadequate for anything interesting and are probably best ignored. I will not bother with them.
See the Turbo C C source and Turbo C Include files. These are Turbo C code for dealing with a serial port in C programs. Only the first two ports are handled, however. More ports will share interrupts 4 and 3, and make for more complications.