(Assembly language MSP430) 1. Strings are placed in memory and their end is marked with a byte equal to zero (\0). This

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

(Assembly language MSP430) 1. Strings are placed in memory and their end is marked with a byte equal to zero (\0). This

Post by answerhappygod »

(Assembly language MSP430)
1. Strings are placed in memory and their end is marked with abyte equal to zero (\0). This simplifies the use because it onlyneeds the initial address, while the final address is indicated by0. The figure below shows an example of a small string that isloaded from the address 0x2400. Of course, each letter isrepresented by its ASCII code.
Assembly Language Msp430 1 Strings Are Placed In Memory And Their End Is Marked With A Byte Equal To Zero 0 This 1
Assembly Language Msp430 1 Strings Are Placed In Memory And Their End Is Marked With A Byte Equal To Zero 0 This 1 (99.04 KiB) Viewed 8 times
a) Write SIZE_STR subroutine which receives the start address ofa string in R5 and returns its length in R10. The zero that marksthe end of the string must not be counted.
b) Write CHK_STR subroutine that compares two strings of thesame length whose addresses are in R5 and R6. The subroutinereturns: • if the strings are identical --> flag Z = 1 and • ifthe strings are not identical --> flag Z = 0
0x2400 0x2401 R P 0x2402 0x2403 O V 0x2404 A 0x2405 0x2406 U 0x2407 0x2408 0 M 0x2409
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply