[SOLVED] CSC3210 Assignment #5

30.00 $

Category:
Click Category Button to View Your Next Assignment | Homework

You will receive the following solution file(s) instantly after successful payment:

zip file icon Assignment-5-i4ed8t.zip (399.1 KB)
Assignment Instructions Updated Recently? Submit Below and we will provide new Solution!
Submit New Instructions
đź”’ Securely Powered by:
Secure Checkout
Rate this product

1.

  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.

  2. (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.
  • Assignment-5-i4ed8t.zip