Answer:
Please check the attachment for both a. and b.
Explanation:
The algorithm as well as the assembly language code for the b. part is demonstrated on the soft print attached.
Remember by (6 C 3) and (3 C 2) it means various combinations from P1, P2, P3, T1, T2, T3. 6 C 2 = 20, and hence in that case there will be 20 combinations. 3 C 2= 3, and hence there will be 3 combinations in that case, and you can write them down quite easily. Rest are as being explained in the soft print attached. However, do not forget to divide combination for CA by 3, and by 2 for PA. This is not mentioned in the soft print. Please correct this there.
And the assemble code is self explained. However, to clear; j1 and jump is used for implementing the conditional jump.