Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In C language all strings are an array of characters. All references to arrays are pointers in C, that is why a string is declared

In C language all strings are an array of characters. All references to arrays are pointers in C, that is why a string is declared as a char *" in C language. The string array consists of an array of ASCII characters that are terminate by a NULL character, i.e., the last character of every character string array is a NULL (OxO). When a NULL character is encountered by a program it indicates to the programmer that the string has ended. Write an ARM Assembly language program to scan any NULL terminated string (i.e., an array) of ASCII characters to replace all occurrences of a given ASCII character with another ASCII character. As an example, string labeled myString is shown below. Your program should replace all occurrences of the character 'm' in the string, with character 'w'. Any other characters, punctations, numbers present in the string should be ignored. For your convenience assembler/compiler will translate 'm' and 'w' to correct ASCII equivalent character values. If the character 'm' is found, the program should replace it with 'w'. This search and replace should continue until the end of the string, i.e. NULL is reached. When your program ends, all occurrences of 'm' should be replaced with 'w'. Remember: The program should work for ANY string that is NULL terminated, not just the one below. Note: This program can be run in the simulator, but the result cannot be observed, as the myString will be loaded in Flash memory. Your program cannot change Flash memory. To see the changes you have to load myString in RAM

. If you want to see the changes in RAM let me know, I can give you a function to load the string in RAM, but it will change the pointers. myString DCB "Computer memory is randomly filled",0 Flowchart: AREA strCharReplacement, CODE, READONLY ENTRY EXPORT main main DONE B DONE myString DCB "Computer memory is randomly filled",0 ENDPlease help me to write a program in ARM Assembly language in Kiel software. Please add flowchart and code. Thankyou

1) Please add flowchart

2) please help me fill out the code

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Combinatorial Testing In Cloud Computing

Authors: Wei-Tek Tsai ,Guanqiu Qi

1st Edition

9811044805, 978-9811044809

More Books

Students also viewed these Programming questions