1. (20 Pts) Write a program that uses a loop to generate the first 10 values of the Fibonacci number sequence, described by the following formula: Fib(1) = 1, Fib(2) = 1, Fib(n) = Fib(n-1)+ Fib(n-2) Save the sequence sequentially in a defined memory location. 2. (20 Pts) Write a program that defines an integer array in memory, and then uses a loop with indirect or indexed addressing to reverse the elements of an integer array, in place. Do not copy the elements to any other array. Use the SIZEOF, TYPE, and LENGTHOF operators to make the program as flexible as possible if the array size and type should be changed in the future. 3. (20 Pts) Write a program with a loop and indirect addressing that copies a string from source to target, reversing the character order in the process. Use the following variables: source BYTE "This is the source string",0 target BYTE SIZEOF source DUP ('') 4. (40 Pts) Write a program to test the following procedures from Table 5-1 in section 5.4. a. Clrscr b. Delay c. DumpMem d. DumpRegs e. GetDateTime f. IsDigit g. Randomize h. Random32 i. RandomRange j. ReadChar k. ReadDec 1. ReadHex m. ReadInt n. ReadString o. StrLength p. WaitMsg q. WriteBin r. WriteChar s. WriteHex t. WriteInt Your program must include at least one instance of each of the procedures. Your program must be interactive, user-friendly, and display clear/logical output results. Note: There are 3 Library Test Programs in Section 5.4 that can be used as models, if desired.

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter8: I/o Streams And Data Files
Section: Chapter Questions
Problem 8PP: (Data processing) A bank’s customer records are to be stored in a file and read into a set of arrays...
Question

only do part 1 need help with that the most
do it using MASM x86

1. (20 Pts) Write a program that uses a loop to generate the first 10 values of the Fibonacci
number sequence, described by the following formula:
Fib(1) = 1,
Fib(2) = 1,
Fib(n) = Fib(n-1)+ Fib(n-2)
Save the sequence sequentially in a defined memory location.
2. (20 Pts) Write a program that defines an integer array in memory, and then uses a loop
with indirect or indexed addressing to reverse the elements of an integer array, in place.
Do not copy the elements to any other array. Use the SIZEOF, TYPE, and LENGTHOF
operators to make the program as flexible as possible if the array size and type should be
changed in the future.
3. (20 Pts) Write a program with a loop and indirect addressing that copies a string from
source to target, reversing the character order in the process. Use the following variables:
source BYTE "This is the source string",0
target BYTE SIZEOF source DUP ('')
4. (40 Pts) Write a program to test the following procedures from Table 5-1 in section 5.4.
a. Clrscr
b.
Delay
c. DumpMem
d. DumpRegs
e. GetDateTime
f. IsDigit
g. Randomize
h. Random32
i. RandomRange
j. ReadChar
k. ReadDec
1. ReadHex
m. ReadInt
n. ReadString
o. StrLength
p. WaitMsg
q. WriteBin
r. WriteChar
s. WriteHex
t. WriteInt
Your program must include at least one instance of each of the procedures.
Your program must be interactive, user-friendly, and display clear/logical output results.
Note: There are 3 Library Test Programs in Section 5.4 that can be used as models, if desired.
Transcribed Image Text:1. (20 Pts) Write a program that uses a loop to generate the first 10 values of the Fibonacci number sequence, described by the following formula: Fib(1) = 1, Fib(2) = 1, Fib(n) = Fib(n-1)+ Fib(n-2) Save the sequence sequentially in a defined memory location. 2. (20 Pts) Write a program that defines an integer array in memory, and then uses a loop with indirect or indexed addressing to reverse the elements of an integer array, in place. Do not copy the elements to any other array. Use the SIZEOF, TYPE, and LENGTHOF operators to make the program as flexible as possible if the array size and type should be changed in the future. 3. (20 Pts) Write a program with a loop and indirect addressing that copies a string from source to target, reversing the character order in the process. Use the following variables: source BYTE "This is the source string",0 target BYTE SIZEOF source DUP ('') 4. (40 Pts) Write a program to test the following procedures from Table 5-1 in section 5.4. a. Clrscr b. Delay c. DumpMem d. DumpRegs e. GetDateTime f. IsDigit g. Randomize h. Random32 i. RandomRange j. ReadChar k. ReadDec 1. ReadHex m. ReadInt n. ReadString o. StrLength p. WaitMsg q. WriteBin r. WriteChar s. WriteHex t. WriteInt Your program must include at least one instance of each of the procedures. Your program must be interactive, user-friendly, and display clear/logical output results. Note: There are 3 Library Test Programs in Section 5.4 that can be used as models, if desired.
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage