Question: Can Someone answer this quickly its due TONIGHT. I just dont have the time to do it cause i have an Exam. **In Assembly Code***

Can Someone answer this quickly its due TONIGHT. I just dont have the time to do it cause i have an Exam. **In Assembly Code***
1. (15 marks) Convert the following program into assembly. The main method should be in one module, and the factorial and power procedures in another Do NOT use global variables (ie, a data section),unless defined globally in the pseudo-code below. Pass parameters via the stack only. Return values should use eax. Remember to preserve the register values INSIDE your functions String intPrompt"Please enter an integer value:'" String hexPrompt = "Please enter a hex value: String error = "Value too large for multiplication" main Display(intPrompt) unsigned int a = Read!nt() Display (hexPrompt) unsigned int bReadHex ) unsigned int result-factorial (a) if result1 Display (error) else Display(result) unsigned int powerpower a, b) Display (power) unsigned int factorial unsigned int n ) unsigned int result-1; while (n> 0 result *= n; if ( result > 32-bit max value ? { return-l ni return result unsigned int power unsigned int base, unsigned int exp if exp0) return base return base power base, exp 1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
