Question: In Assembly Language (asm) Can u fix the ERROR. It shows a blank Output screen. Does not print the Mean and Variance. Thanks Include Irvine32.inc

In Assembly Language (asm)

Can u fix the ERROR. It shows a blank Output screen. Does not print the Mean and Variance. Thanks

Include Irvine32.inc

.data

arrayB WORD 2,3,45,56,5,45,4,5,7,8,56,56,4,3,4 printMean Byte "Mean;", 0 printVariance Byte "Var:", 0

.code main PROC

mov cl, (LENGTHOF arrayB) mov esi, OFFSET arrayB mov ebx, 0;

findSum:

movzx eax, byte ptr[esi] add ebx, eax add eax, eax

add esi, 2 loop findSum mov edx, OFFSET printMean

call WriteString mov ecx, (LENGTHOF arrayB) cdq

idiv ecx call WriteDec call Crlf

mov edx, eax mov cl, (LENGTHOF arrayB) mov esi, OFFSET arrayB mov ebx, 0

Variance: movzx eax, byte ptr[esi] sub eax, edx imul eax, eax add ebx, eax mov eax, ebx add esi, 2 loop Variance

mov edx, OFFSET printVariance call WriteString mov ecx, (LENGTHOF arrayB) cdq

idiv ecx call WriteDec call Crlf

exit main ENDP END main

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!