Comp 3350: Computer Organization & Assembly LanguageHW # 5: Theme: Data Definitions, Addressing Modes, ArraysAll main questions carry equal weight.(Credit awarded to only those answers for which work has been shown.)[Memory Map] Fill in the following memory diagram with the data provided below. Please assume that the data segment begins at 0x0040400A.
...[Show More]
Comp 3350: Computer Organization & Assembly Language
HW # 5: Theme: Data Definitions, Addressing Modes, Arrays
All main questions carry equal weight.
(Credit awarded to only those answers for which work has been shown.)
- [Memory Map] Fill in the following memory diagram with the data provided below. Please assume that the data segment begins at 0x0040400A.
- [Addressing Modes] Copy the following code into your assembly development environment and single-step through it. For each single step execution, submit the screenshot. For those instructions referencing memory, do the linear address computation (typewritten/handwritten).
I’m having serious issues with visual studio. I’ll be checking in with the professor before HW6
- [Indirect addressing] Write a program that adds the corresponding elements of Array1 and Array2 and stores the results in Array3; e.g. for the 8th element, Array3 [7] ß Array1 [7] + Array2 [7]. Include commands to display the elements of all the arrays. Submit screenshot of the displays of the elements of all the arrays. You can use WriteInt or WriteHex to display the elements of the arrays.
- [Loops] Write a program to compute the sum of first n odd integers. Sum = 1 + 3 + 5…+(2n-1) Your program must:
- Prompt user for integer n,
- Read the value of n from user input
- Calculate Sum, and;
- Print Sum on screen.
Please use the “WriteInt” procedure, not “DumpRegs”. Other relevant procedures: “ReadInt” and “WriteString.” The calculation can be done in many ways, and all submissions that evidence proper programming practice are acceptable. In your homework submission, please embed both the code and one screen shot for n = 15.
str1 BYTE "Enter A Integer: ",0
.code
PromptForN ENDP
EvenInteger PROC USES ecx esi edx
mov eax, 2h ;This is our constant multiplier
mov esi, 1h ;This is our increment multiplier
mov ebx, 0h ;zero out the ebx reg for calculations
LP1:
[Show Less]