Program to perform a conversion on characters in a text file, Assembly Language

Assignment Help:

Write an assembly language program to perform a rot131 conversion on characters in a text file.  The program should read charatcers from the input file, perform the rot13 conversion, and write the characters to the output file.  The program should read the buffer size (large or small), name of an input file, and the name of an output file from the command line.  For example:

ed-vm% ./rot13  -b l  -i file.txt  -o tmp.txt

The provided main program calls the following routines:

? A getOptions() procedure that reads and checks the command line arguments. The command line arguments must be in the format of:  /b= /i= /o= in that order.  The buffer size should be "l" or "s".  To check the file name, attempt to open the file.  If the files open correctly, the routine should return the file descriptor (for each file).  If there is an error, an appropriate error message should be displayed (see examples).

? A readBuff() procedure to read the input file and return the characters in a buffer.  The procedure will use the buffer address, file descriptor, and buffer size flag to read the file.  The procedure should return the characters in the buffer and the count of characters.  The procedure should also return a flag (true/false) for the last read.

? A rotate13() procedure to perform the rot13 function on the characters in the buffer.  The rot13 function is as follows:

NewCharacter = (Character+13) mod 26

The procedure will use the buffer address and character count.

? A writeBuff() procedure to write the modified buffer to the output file.  The procedure will use the buffer address, file descriptor, and count of characters.

To ensure efficient I/O operations, the program must buffer the data read and written.  For this assignment, the buffer size should be either 2 for the 'small' or 60,000 for the 'large' buffer size.

Note, a utility for testing will be made available on the class web page.

Note, your procedures must be placed into a separate file and linked with the provided main.  Refer to the handout for directions how to link multiple files.  Only the procedures file, not the provided main, will be submitted on-line.  As such, you must not change the provided main!

Testing

A batch file to execute the program on a series of pre-defined inputs will be provided.  The test script compares the program output to pre-defined expected output (based on the example I/O).


Related Discussions:- Program to perform a conversion on characters in a text file

Project 1: Text Conversion, I need a text conversion program written in ass...

I need a text conversion program written in assembly language

Assembling a program-microprocessor, Assembling a program Microsoft Ass...

Assembling a program Microsoft Assembler MASM is one of the simple to use and famous assemblers.  All the references and discussions in this section are belonging to the MASM.

Write an assembly language program, Your assignment for this project is to ...

Your assignment for this project is to write an assembly language program that checks if the user's input is a valid ISBN number. A sample run of your program might look like:

L.A, How is bob different from johnny in the outsiders

How is bob different from johnny in the outsiders

Intel 8259 interrupt controller-microprocessor, Intel 8259 interrupt contro...

Intel 8259 interrupt controller :  The 8088 processor has only two interrupt control inputs, and interrupt request (INTR) and non mask able interrupt (NMI). NMI are interrupts t

Introduction to evaluation, This unit introduces the topic of evaluating in...

This unit introduces the topic of evaluating interactive products. It is a short unit as evaluation is discussed in more detail in Block 4. Its brevity should give you additional t

Port mapped or mapped input output, Port Mapped I/O or I/O Mapped I/O I...

Port Mapped I/O or I/O Mapped I/O I/O devices are mapped into a separate address space. This is generally accomplished by having a different set of signal lines to denote a mem

Third generation microprocessor, III rd Generation Microprocessor: T...

III rd Generation Microprocessor: The single 3rd generation microprocessor chip having 64-pins began with the introduction of 16-bit Intel 8086 in 1978. The other essential

Program for generate mips assembly code that runable on spim, Project Overv...

Project Overview In this series of projects you will write a compiler for a small subset of Pascal.  In this assignment, you will start writing the syntax analysis and code gen

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd