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

Assignment Help:

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.


Related Discussions:- Masm procedure to perform letter case conversion

Define the bitwise-exclusive-or operator, Define the Bitwise-Exclusive-OR O...

Define the Bitwise-Exclusive-OR Operator: ^: The bitwise-exclusive-OR operator (^) compares every bit of its first operand to the corresponding bit of its second operand. If on

Programming and solving problems, One person who is specialist at programmi...

One person who is specialist at programming and solving problems with a computer Project Description: Dear Potential computer, hardware, programming and software genius, I

#c++ homework, write c++programm that converts degrees Kelvin (TK) to degr...

write c++programm that converts degrees Kelvin (TK) to degrees Fahrenheit(TR) recall that TF=(9/5)TK and that TF=TR-459.67

Explain looping statements, Looping Statements The statements usually u...

Looping Statements The statements usually used for looping are for, do-while, while. The goto statement can be used for looping, but its use is generally avoided as it leads to

Algorithm, Write algorithms to implement the insertion and deletion operati...

Write algorithms to implement the insertion and deletion operations.

Decode the Code, Smugglers are becoming very smart day by day. Now they hav...

Smugglers are becoming very smart day by day. Now they have developed a new technique of sending their messages from one smuggler to another. In their new technology, they are send

Working of ordered linked list, Working Ordered linked list: • Eachint...

Working Ordered linked list: • Eachinteger in the queue is stored inside of a QueueItem. The QueueItem contains the integer, and a pointer to the next item in the queue. Fo

Example for register storage class - computer programming, Example for Regi...

Example for Register Storage Class - computer programming? main() { register int i; for (i=0; i { ............... ............... } } /* block exit will free the register

Create a custom calculator program, //Create a custom calculator program ca...

//Create a custom calculator program capable of reading the input stream of an expression //and make basic computations to provide answer. //Your program will ask the user to

Define global variable in c++ program, Define global variable in c++ progra...

Define global variable in c++ program: How to define a global variable and need of global variable in c++ program. int main() {    int m=20;    clrscr();    for

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