creating a generator assistance-PLEASE

I need some assistance, creating a generator that would create binary com files. I have the simple code to run the first one

Here is what I have that will run in Dos box, but I need to make the program the next time it runs, create the next com file that will look different, I just am not sure how to create the program where the second time it runs it would move the pointer to start at a different point, then create a different com file say, then if it was run again it would generate the COM or binary files created need to be able to run on a 16 bit machine. I have visual studio and tried to create classes, although do not know how to create a binary file from visual studio. I also tried within turbo c++ with dosbox although I am not familiar with how to code with those tools so I am kind of stuck. Thanks for any assistance.

a 100h
push cs
pop ds
mov dx, msg
mov ah, 9
int 21h
mov ax, 4c01h
int 21h
db 'Hello World!$'
rcx 299
Topic archived. No new replies allowed.