Question
Write a subroutine called STRLEN that determines the length of a null-terminated ASCII string. Pass the 32-bit start address of the string to the subroutine
Write a subroutine called STRLEN that determines the length of a null-terminated ASCII string. Pass the 32-bit start address of the string to the subroutine in register R0. Return the length, excluding the null byte, in register R7. All registers (except R7) should return to the calling program unchanged.
NOTE: Write a short program which will load the required data into registers and then branch with link to the subroutine.
Write the program in ARM assembly language. Make sure it compiles and executes with VisUAL ARM Emulator that is available on Windows/Mac/Linux. Post code here. Thanks!
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started