Question: 19. Ima Loserstudent, takes an assembly language class. For one of his assignments, he found this piece of code on laying around on internet, and

19. Ima Loserstudent, takes an assembly language class. For one of his assignments, he found this piece of code on laying around on internet, and he chooses to submit it for his project instead of writing the project code for himself. Ima didn't bother to check the code and neither did his buddies he shared it with. The code is supposed to divide the unsigned number (passed into a procedure via AX) by 6410 and add 3210 to the division's remainder (returned in AX), and restore any registers other than AX to their original values.. Fix the code by changing the given instructions and comments, and optimize it for execution. (10) ; initialization stuff calculate proc ;there is a number in ax. Calculate (AX%64 + 32) mov DX, O ; clear out DX for divide not DX mov AX, 64; initialization div BX add AX, 52, add 52 to the remainder pop DX ; restore DX ret calculate endp 20. The following code, which is incorrect, is supposed to add the numbers from 1 to 50 decimal, and place them in a variable called summation. Correct the code so that it will function properly. (10 pts) Summation db ? Sum: MOV AX, 0002h ADD AX, summation INC AX CMP AX, 0050h JGE Sum
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
