Machine Organization I

V22.0201 - Fall 1998

Nathan Hull

Assignment I

Due: Thursday, October 8th

1) Join your sub-section's mailing list by sending email to majordomo@cs.nyu.edu. In the body of the message type:

subscribe v22_0201_00XX_fl98
help

Where XX is the section and subsection to which you are assigned.

 

2) Create a program which inputs a number N and then computes the factorial of N. Note that since both input and output are BYTE quantities, there could be an error. Do NOT compute the largest factorial possible ahead of time. If a carry past 255 happens during your calculations, that is the time to signal that an error has occured.

 

Input (N)

Output (N!)

Error Code

1000H

1001H

1002H

The error code is = 1 if the factorial was calculated correctly, and is = 2 if an error occured.

You should submit your finished code to your E-Tutor by Thursday, October 8th.