Please Note That MS-DOS COM Files Can Only Run In Computers That Support Running legacy MS-DOS code. So 64-bit Machines Are Out Of The Question.
When you first create your project, instead of building the project the traditional way, there is a menu item under Build that allows you to assemble your NASM assembly code to a COM file, as you can see below:
Then a dialog should come up (shown below), and the dialog should be self explanatory. So click on Build and you should have the COM file inside the project’s bin folder.
Q: Why doesn’t the Run Dialog come up asking to Run or Debug the COM file.
A: For security purposes, running COM files can be risky if the machine cannot run or doesn’t allow running legacy 16-bit code.
Q: If MS-DOS deprecated why implement this feature?
A: Well, a user requested the feature and since NASM can natively assemble COM files implementing the feature wasn’t that hard to do.