You can also use any assembler (e.g. MASM or TASM) that uses standard Intel mnemonics and operand syntax.
asm asg2;
If it assembles without errors you can "link" it into an
executable MS-DOS "COM" (.com) file using the command:
val /co asg2;
Then you can run the program by typing
asg2
code segment public ; (1)
assume cs:code,ds:code ; (2)
start: org 100h ; (3)
and the following 2 lines at the end of your code:
code ends ; (1)
end start ; (3)
to perform these functions. When your program is executed, DOS
will load the code into memory, set the DS and CS segment
registers to the appropriate values, set SS to the top of the 64k
segment and start execution at location CS:100H.
Your code should terminate using the instruction
int 20h
to return control to DOS