I know you said you're using openwatcom, but if you're not familiar with DOS, I'd suggest running through https://fabiensanglard.net/Compile_Like_Its_1992/index.php to build Wolfenstein with Borland C 3.1. The public Keen Dreams repo is very similarly structured and will build with BC3.1 as well.
Getting data into and out of the more accurate emulators can be a pain. Personally I use VirtualBox with a 32-bit Windows image to do builds. It has network access and VirtualBox shared folders connect it to my desktop. It can run DOS and 32-bit windows toolchains, which covers everything that existed in the DOS programming days. To get things to either PCem, or my real 386sx, I mount a virtual floppy image in VirtualBox, or connect a Sabrent USB drive to write a real floppy, respectively.
(Something like PC-NFS or Microsoft's DOS SMB client would be the easiest way to get data into PCem/86box/etc. I'm yet to set it up).
I know you said you're using openwatcom, but if you're not familiar with DOS, I'd suggest running through https://fabiensanglard.net/Compile_Like_Its_1992/index.php to build Wolfenstein with Borland C 3.1. The public Keen Dreams repo is very similarly structured and will build with BC3.1 as well.
Others have mentioned the Abrash black book. The example code is available in OCR'd form (and compiled!) at https://github.com/othieno/GPBB/tree/master/codebase/source . Some scrolling examples (but not in color mode!) are in https://github.com/othieno/GPBB/tree/master/codebase/source/... - you can use them to see the difference between Virtualbox (which doesn't emulate the finer details of a VGA) and emulators like 86box/PCem/DosBox.
Getting data into and out of the more accurate emulators can be a pain. Personally I use VirtualBox with a 32-bit Windows image to do builds. It has network access and VirtualBox shared folders connect it to my desktop. It can run DOS and 32-bit windows toolchains, which covers everything that existed in the DOS programming days. To get things to either PCem, or my real 386sx, I mount a virtual floppy image in VirtualBox, or connect a Sabrent USB drive to write a real floppy, respectively.
(Something like PC-NFS or Microsoft's DOS SMB client would be the easiest way to get data into PCem/86box/etc. I'm yet to set it up).