Masm procedure to perform letter case conversion, C/C++ Programming

Assignment:  write a C program and a MASM procedure.  The C program calls the MASM procedure to perform letter case conversion.

Text sections covered:  12.1 to 12.3.1

Write a C program containing two input arrays and two output arrays.  The first input array consists of lower case alphabetical characters.  The second input array consists of upper case alphabetical characters.  This C program will call a MASM procedure that converts the characters in the input array to either upper or lower case and places them in the output array.  The procedure is called with the following parameters:

            MASMprocedure (input_array, output_array, input_array_length, to_lower);

input_array                  =          the input array as described above

output_array                =          the output array as described above

input_array_length      =          the length (in bytes) of the input array

to_lower                      =          Boolean variable (false = convert to upper case,
                                                true = convert to lower case)

The MASMprocedure declaration in your C program should have a return type of void.

These C variables are to be declared as follows:

char     input_array[] = "lower or upper case letters";

char     output_array[sizeof input_array];

long     input_array_length;

bool     to_lower;

Your C program should call the MASM procedure twice.  The first call should be with the array containing lower case letters that your MASM procedure will convert to upper case.  The second call should be with the array containing upper case letters that your MASM procedure will convert to lower case.

When your C program completes, display both the input arrays and the output arrays.

A few notes you should be aware of:

1)      You do not have to use a header file as described on page 413.  Simply put the extern directive in your main .cpp file.

2)      If you wish to debug your C program (or step through it using breakpoints), you need to set the debug option in the general screen for the C++ compiler.  See the Debug Information

3)      C/C++ long variables are passed as DWORD types to MASM.

4)      C/C++ Boolean variables are passed as BYTE types to MASM.

5)      You should account for the trailing NULL when handling C/C++ strings.

6)      Any use of a JMP instruction in your MASM procedure should use the syntax:

                                     jmp            short         

7)      Create both the .asm and .cpp programs in the same project file within Visual Studio.  Use the same settings for the .asm program as any other .asm program you have written in this class.

Posted Date: 2/23/2013 12:02:55 AM | Location : United States







Related Discussions:- Masm procedure to perform letter case conversion, Assignment Help, Ask Question on Masm procedure to perform letter case conversion, Get Answer, Expert's Help, Masm procedure to perform letter case conversion Discussions

Write discussion on Masm procedure to perform letter case conversion
Your posts are moderated
Related Questions
The new and delete operators The C language has explained library functions- malloc() and free() for dynamic allocation and de-allocation of memory. C++ gives yet another appro

Write a function to determine whether a number is prime: it will return true if the input is prime and false otherwise. Use it to see whether -7 is prime.

When I develop a destructor, do I require to explicitly call the destructors for my member objects?

Create a Document that show information about albums. First create a paragraph or two about the purpose of the page and your interests in music: genres, styles, etc. Next have a

I want VLC Pitch Changing Addon Project Description: Required: Plugin to modify the pitch of running tracks in VLC without changing the speed. Skills required are C Progra

Normal 0 false false false EN-US X-NONE X-NONE

I am working on a program that allows a player to play a game against the computer. In this game the player can only chose to draw 1, 2, or 3 toothpicks. How do I make restrictions


Description A long time ago in a galaxy far, far away, the country Mafghanistan had n cities and m old roads, where each road connected a pair of cities. Due to the treacherous mo

Program is to find the area of room: Program is to find the area of room with default values using classes & object class room   {   private:     int len;     i