Final answer:
To collect the data in assembly language, prompt the user for a name and the number of times money was spent. Use procedures to get the name and number of items, store amounts as read, compute the total spending, and display a summary of a person. Allocate arrays for names and spending amounts.
Step-by-step explanation:
To collect the data required in assembly language, you would need to prompt the user for a name and the number of times money was spent. In this case, the name can have a maximum of 40 characters and the spending amount should be no more than 80 times. You would need to allocate arrays for the names and spending amounts for each person.
Using a procedure, you can get the name and number of items from the user, using the esi and edi registers to pass offsets. Then, you can use another procedure to store the amounts as read from the user. For example, if the first person spent 5 times, you would load the first 5 slots of their array.
Before getting the amounts, you would clear the screen and display the person's name using the esi and edi registers. You can use the same procedure for both persons and call it with each person.
After that, you can use another procedure to compute the total spending for one person, using the esi and edi registers to pass necessary offsets. You can call this procedure twice, once for each person.
Finally, write a procedure to display a summary of a person and pass any offsets needed to use this procedure with each person. Remember to store all spending data in cents using dwords.