UMBC | CMSC211 |
The C program will declare two strings of the same size. Ask the user to enter a string and then you will print out both strings, showing the starting conditions. All output is do be done in the C portion only.
Use the assembly language to move the data from the first string to the second string. Make sure that you set the first string to an empty string by setting the first element of the array to a null byte. When you move the string, you must copy it backwards and do a simple case conversion.
Your C program is to call a function called flipIt( ), and you must call flipIt() with the address of the two strings. In the function flipIt, you are to go into assembly, do the work and come out. All messages are to be printed out from the C code, using printf( ).
The output of your program will look like this (Green is from the program, and red is the user intput):
Enter a string: Move me! string A: Move me! String B: Going into assembly language Back from assembly language String A: String B: !EM EVOm
;; Filename: 6789prj5.c ;; Name: Ima Student ;; SSAN: 6789 ;; Date: 3 Dec 2002 ;; Course: CMSC-211 ;; Description: ;; Analysis: ;; Input: ;; Output: ;; Formulas: ;; Constraints: ;; Assumpitons: ;; Design: (Your psuedocode goes here. Must be detailed) ;; Notes: (As needed, such has how to assemble.)
UMBC CMSC211 | CSEE | |