Description
- Write a procedure named ArrayFill that fills an array of ten (10) numbers with the geometric progression 3, 6, 12, 24, … etc. You must only use the first two integers in the series to generate the series. The procedure receives two arguments: the first is the offset of an array, and the second is an integer that specifies the array length. The first argument is passed by value and the second is passed by reference. In the main program, you should set the parameters of the array and print the array values before and after call to the procedure.
Please embed your code into your homework solution along with a screen shot of the run of the program.
- Draft a program that adds two BCD numbers (9-digits each). The first BCD number is stored in an array named myAuburnID, and the second in an array named All1s. The first number is your actual Auburn ID number; the second is 111111111h. Your program should do the following:
- Display contents of the memory before program execution,
- Add myAuburnID and All1s.
- Store the sum in a variable named Result, and;
- Display contents of memory post execution.
Please embed your code into your homework solution along with a screen shot post execution.
- Draft a procedure called AddThree that is similar to the AddTwo program within the slides (at or about #30). AddThree receives three parameters x, y and z from the stack and outputs a value equal to x + 2*y + z. In order to receive credit, your submission must do the following:
- Pass parameters x, y, and z by value on the stack using the push instruction. Use x= 102, y = 54 and z = 23,
- AddThree must get its inputs from the stack,
- Call AddThree and print the result to the screen.
Please embed your code into your homework solution along with a screen shot post execution.