Perhaps if you came to this node you were wondering how to write a .com file with DOS debug.

First you must either have a knowledge of assembly language (of which I have none), or a convenient program to type in (look up!).

When you are typing in the program in it will display memory locations on the left of every line. The first should be xxxx:0100. After you have finished writing the program, it will be xxxx:yyyy. Subtract the 0100 from the yyyy value on the last line (the line where you hit enter without typing anything.) For example, when I typed in the above assembly, it went from 106C:0100 to 106C:0118. 0118 - 0100 is 18. You will need this number in a second.

Now pick a name and location for your fancy new program. For the program above I decided it should be "flasher" and I would place it on the root of my C drive. Use the N command to tell the debug program this. Type "N C:\path\name.com". In my example I typed "N C:\flasher.com".

Do you still remember the number you got 2 paragraphs back? Now you need it. Type "R CX". Then type in that number.

For the final step, type "W" It should respond with "Writing <number> bytes". Check and see if it saved your fancy new program.


Side note: If you are using the program above, try changing the ffff in the 5th line to various other values for different effects.