Write an ARM program to
- in the data area, o declare and initialize two NULL-terminated strings labeled as StrOne, and StrTwo.
- define a symbolic name called MAX_LEN and equivalent it with a number like 100 or greater. (Hint:
EQU must be used here.) o reserved a chunk of zeroed memory with a size of (MAX_LEN + 1), label this chunk of memory as MixStr. (You may assume that the sum of the lengths of StrOne and StrTwo is no greater than
MAX_LEN)
- Store each one of the above three labels as a word with an address label, e.g., adrStrOne DCD StrOne for StrOne, and EXPORT each address label, e.g., EXPORT adrStrOne.
- in the main program, o Merge the first string labeled by StrOne and the second string labeled by StrTwo in a unit of one.
- Store the ASCII string as a NULL-terminated string to memory labeled as MixStr o If one string is longer than the other one, just copy the rest of the longer one to MixStr
- g., Hello Metro State! and I like assembly programming. should be mixed as HIe llliok eM eatsrsoe mSbtlayt ep!rogramming.
Reviews
There are no reviews yet.