Question: 2. Jump conditions (10 pts). Write a sentence to explain each of the 5 test conditions jXX-jge, jz, jl, jn, jnz. For each one, tell
2. Jump conditions (10 pts). Write a sentence to explain each of the 5 test conditions jXX-jge, jz, jl, jn, jnz. For each one, tell what is in the value of R11 at the end of the program with each of the 5 test conditions. (see MSP430 x4xx Family Users Guide, section 4.6.2) .text clr.w R11 counter mov.w #3,R12 ; for loop? again: inc.w R11 increment the counter tst.w R12 10{ done sub.w #1 ,R12 ; jmp again; jmp done: $infinite loop to end 3. if, then, else (10 pts). A list of numbers (word size) in memory is made of positive and negative numbers, and the length is not known, but the list is terminated by a zero. Write an assembly language program to count the number of positive numbers (R10) and count the number of negative numbers (R11) in the list. The start of the list is at 'List. In the example below, the final result would be R10-3, R11-2 Label yalue List Memory 23FC address data Ox23FC 88 0x23FD4 A Ox23FE Ox23FFC Ox2400 7 D 0x2401 A 0x2402 0x2403 0x2404 0x2405 0x2406 0x2407 3 C o 0
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
