Binomial Coefficients Program Requirements

Write an assembly language program and create an accompanying problem document.

Program Requirements

Design a recursive procedure to calculate Binomial Coefficients.

The procedure should expect two arguments on the stack, and should return the answer in eax. Only eax may be altered by your procedure. If you use local storage, it must be allocated on the stack.

Binomial(4,2) should return 6

Binomial(3,0) should return 1

etc.

This procedure must be in a file by itself.

You must also create an application that allows the user to enter an integer. The program then must use the binomial coefficient procedure to calculate the coefficients of (a+b)n. These should be displayed on one line of output.

The program should repeat until 0 is entered.

Remember to document the program, as well as each procedure, as required by the CS370 Coding and Documentation Standards.

Sample Output

Please enter an integer: 3

1 3 3 1

Please enter an integer: 4

1 4 6 4 1

Please enter an integer: 0

Bye!

Problem Document

The problem document will contain:

1. Pseudo-code algorithm(s) for main and the binomial procedures.

Do NOT mention the stack or registers in the pseudo code.

2. A test plan and results.

**Subject Computer Science Assembly Language Programming**