Question: 1. A string is stored in the memory at location string. Write an ARM assembly language program in ARMSimulator to count the number of characters
1. A string is stored in the memory at location string. Write an ARM assembly language program in ARMSimulator to count the number of characters in the given string. The string is terminated with a 0. You can use the following assembler directive to store the string:
string: .asciz This is my string
Use R0 to store the result.
2. Modify the program written in Problem 1 to count the number of times a particular character appears in the string. The character is stored in the memory after the string as follows:
string .asciz This is my string char .ascii T
Use R1 to store the result.
Step by Step Solution
There are 3 Steps involved in it
Certainly Ill guide you through writing an ARM assembly language program to solve both parts of the problem Well be using ARMSimulator syntax Part 1 C... View full answer
Get step-by-step solutions from verified subject matter experts
