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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!