Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mov edx, eax
- mov ecx, (LENGTHOF RAW) ;loop counter
- mov esi,OFFSET RAW ;esi = 0 index value
- mov edi,0
- ;loop for variance
- Variance:
- movzx ebx, byte ptr[esi] ;get the value from the array
- mov eax, edx
- sub eax, ebx ;subtract mean value from eax value
- imul eax,eax ;find the square value
- add edi,eax
- add esi,2 ;increment esi by 2 for WORD array
- loop Variance ;repeat Variance until cl=0
- mov edx, OFFSET printVariance ;print the variance string
- call WriteString
- mov ecx,(LENGTHOF RAW)
- cdq
- mov eax, edi
- idiv ecx ;find the variance
- call WriteDec ;print the variance
- call Crlf
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement