Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Computer Organization/Assembly Language CSC13351 Assessment Project Objectives o

ID: 3811053 • Letter: C

Question

Computer Organization/Assembly Language CSC13351 Assessment Project Objectives of the project I. To assess your understanding of basic programming structures in assembly language. 2. To assess your knowledge of programming with MASM (Microsoft Macro Assembler) and Visual Studio Problem Description & Programs write an assembly language program in MASM to perform the following tasks: Generate the first N numbers of the sequence: 0, 1, 1, 2, 4, 7, 13, 24 the sequence is generated as Fn Fn-1 F, Fn-3 with seed values F 0, F2 1, Fs 1. You will define a DWORD array to store the sequence, and define the following procedures: 1) main prompt users to enter the length of the sequence N, call genseq to generate the sequence of N integers, can sumSeq to calculate the sum of the sequence: call displayseq to display the sequence and the sum. 2) genseq generate the sequence 3) s umseq: calculate the sum of the sequence. 4) displayseq: display the sequence and the sum with a call WriteDec statement. A sample of run: How many integers in the sequence will be generated? The sequence is The sum of the sequence is

Explanation / Answer

.data
   COUNT = 48;
   Fibs dd 0, 1, COUNT DUP(0);

.code
main PROC

   mov esi, offset Fibs; offset array;
   mov ecx, COUNT;       
   mov ebx, 4;       
   call DumpMem;

   mov ecx, COUNT;   
   mov esi, offset Fibs
   NextPlease:;
       mov eax, [esi];    //Get me the data from location at ESI
       add eax, [esi+4];   //add into the eax the data at esi + another double (next mem loc)
       mov [esi+8], eax;   //Move that data into the memory location after the second number
       add esi, 4;           //Update the pointer
   loop NextPlease;  


   ;Here be dragons
   mov esi, offset Fibs; offset array; //were to start
   mov ecx, COUNT;        //count of items
   mov ebx, 4;        //size
   call DumpMem;

   exit;
main ENDP

END main

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote