The code you show is 16 bit code for MSDOS. 64 bit versions of Windows can't run 16 bit code, except via an emulator or virtual pc. I'm not aware of a version of Visual Studio that can produce 16 bit code. You can try to find a downloadable version of a 16 bit tool set to assemble the code, such as Masm 6.11 (do a web search).
If interested in 16 bit C or C++, Microsoft Visual C/C++ 4.1 usually includes the 16 bit toolset, but not Masm, so you'll still need Masm 6.11 and you can combine the files into common directories. The Microsoft 16 bit toolsets can run on 32 bit versions of windows, or on an MSDOS emulator or a virtual pc running MSDOS (with emm386 setup, as a dos extender is used by the toolset). If using virtual pc, I recommend using a USB stick for transferring files to or from the virtual pc.
A complete Microsoft 16 bit toolset includes MASM (ml.exe), C/C++ compiler, Linker, CodeView (cv.exe - source level debugger), QuickHelp (qh.exe) - help utility), Programmer's Workbench (pwb.exe - IDE), H2INC (converts a C .h include file into a MASM .inc include file, NMAKE (make utility), DOSXNT (dos extender used by the toolset itself), ... . I'm not sure where you could find a complete toolset.