Line Swapper is a MASM-based assembly language program that swaps the content of two specific lines in a given text file. It demonstrates the use of file handling and string manipulation in assembly language. The program takes an input file, an output file, and two line numbers as input, swaps the specified lines, and saves the result in the output file.
- Accepts an input file and an output file as parameters.
- Swaps the content of two user-specified lines in the input file.
- Outputs the modified content to a separate file.
To run this program, you need:
- MASM (Microsoft Macro Assembler) installed on your system.
- DOSBox (for running MASM in modern environments).
- The input file must be present in the same directory as the assembly (
.asm
) file.
- Place your input text file in the same directory as the
.asm
file. - Open DOSBox and navigate to the directory containing your
.asm
file. - Assemble the program using MASM: