1.
- (10 points) Write a recursive procedure in assembly language that take a 16-bit unsigned integer, n as input, and computer the following series:
1 +2+3+ .. + n
For example, if n = 4, the procedure computes1 + 2 + 3 + 4- – Â The procedure stores the result in EAX register.
- – Â Use stack frame to implement the procedure.
- – Â Run your program using the debugger to verify your answers.
§ Use Step Into instead of Step Over to keep track of the stack, ESP, EBP, EIP during debugging.
Submit the following:
§ Rename the asm file using your last name as Lastname.asm and submit it. § Screenshot of the code
§ Then run the code until you reach INVOKE ExitProcess, 0
§ Then take a screenshot of the EAX register containing the result.
- (5 point) How many bytes of stack space will be used by the Factorial subroutine just before it executes the first return statement, when n=3?
o Submit the answers to B in the following: § Lastname.pdf
- §  Submityoursourcecodebyonlyuploading.ASMfileandyourpdffileusingiCollegeintherespectiveassignment dropbox:
- §  Lastname1.ASM
- §  Commentheaderfor.ASMfiles:Description: This program ………….
- §  Followtheprogramstandardsaspresentedinyourbook.
- §  Paymoreattentiontocodecommentsandconsistentindentation.
- §  Createanewprojectforeveryquestion.Donotuseoneprojectwithmultiple.asmfiles.




