Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You are to design, write, assemble, and simulate an assembly language program which will calculate the factorial N ! of an unsigned 1 - byte

You are to design, write, assemble, and simulate an assembly language program which will calculate the
factorial N! of an unsigned 1-byte number N.
The factorial of N is defined as: 0!=1 and N!=1*2*3*..*(N-1)* N, for N >0
For example, for N=8, N!=40320= $9D80.
One way to calculate N! is iteratively in N steps:
1. calculate 1!
2. calculate 2!=1!*2
3. calculate 3!=2!*3
4. calculate 4!=3!*4
...
N. calculate N!=(N-1)!*N
For this lab, N is a 1 byte number, while the result (N!) is stored as a 2-byte number in NFAC in BIG
ENDIAN format
YOU MUST FOLLOW THE C PROGRAM BELOW 1 TO 1, DO NOT CHANGE. my current assmebly program isn't calculating correctly, when N is set to 8 it says the NFAC is $0D80 which is incorrect. So please help me. And if you could change my program as little as possible and DO NOT go against the psudocode as it must be 1 to 1
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intranet And Web Databases For Dummies

Authors: Paul Litwin

1st Edition

0764502212, 9780764502217

More Books

Students also viewed these Databases questions