Write a program to copy a string backwards


Data Definitions

Question1) Write a program which contains a definition of each data type listed in Table given below. Initialize each variable to a value which is consistent with its data type.

1467_data types.jpg

Copy a String Backwards

Question2) Write a program using LOOP instruction with indirect addressing which copies a string from source to target , reversing the character order in the process. Use the following variables: source  BYTE "This is the source string",0 target  BYTE  SIZEOF source DUP('# ')
Insert the following statements immediately after loop to display the hexadecimal contents of the target string: movesi,OFFSET target ; offset of variable mov  ebx,1 ; byte format movecx,SIZEOF target ; counter call DumpMem If your program works correctly, it will display the following sequence of hexadecimal bytes: 67 6E 69 72 74 73 20 65 63 72 75 6F 73 20 65 68 74 20 73 69 20 73 69 68 54.

Simple Addition

Question3) Write the program which clears the screen, locates the cursor near the middle of the screen, prompts the user for two integers, adds the integers, and displays their sum.

Question3 a) Use the solution program from the previous question as a starting point. Let this new program repeat the similar steps three times, using a loop. Clear the screen after each loop iteration.

Request for Solution File

Ask an Expert for Answer!!
Programming Languages: Write a program to copy a string backwards
Reference No:- TGS01680

Expected delivery within 24 Hours