CPE 325: Embedded Systems Laboratory Laboratory Assignment #4
CPE 325: Embedded Systems Laboratory Laboratory Assignment #4
Laboratory Assignment #4
3. (Bonus: up to 15pts): Write an assembly program where you would declare a string as
shown below. You will then increment the value of any numerals to 1 more than their
current value (wrapping to 0 if the digit is 9). This means you need to change the value in
their original location in memory. For demonstration, you must present the updated values
in the memory browser.
Hint: You need to declare your variable in the data segment (.data) of the code to make them
readable and writable as shown below.
.data
myString: .cstring “I enjoy learning msp430” ;
Hint: Results for the string given above would be: “I enjoy learning msp541”
Questions To Be Addressed:
Please make sure that you have addressed following questions in your demonstration:
1. Describe briefly how you solve Q1.
2. In your memory browser window, show where the values are stored for Q1.
3. In the registers window, show the value of P2OUT at the end of Q2.
4. What is register indirect addressing with auto increment? Do you use it anywhere in your
code? How and Where?
Deliverables
1. Lab report which includes:
a. Screenshots of the memory browser and registers
b. Flowchart for question 1
2. Source files (.asm files) or as directed