inside my block _asm i am creating a couple loops and then taking the mult loop and dividing it by the sum. i am new to assembly. the numbers i'm adding up are 1-100 = 5050. The numbers that are multiplied are 1-10 = 3628800. Then multiply the value in Total by -1 and divide by the Sum. this is a start below....need some guidance.

PHP Code:
#include <iostream>

using namespace std;

void main ()
    {
    
long Sum;
    
long Total;
    
long Result;
    
long Remainder;
    
_asm
        
{
         
mov eax0
         mov ecx
100

l1
:
         
add eaxecx
         mov Sum
eax
         inc eax
         loop l1

         
xor eaxeax
         mov ecx
10
l2
:
         
imul eax
         mov Total
edx
         inc eax
         loop l2    


         mov eax
Total
         mov ebx
Sum
         idiv ebx
         mov Result
eax
         mov Remainder
edx
 
}
    
cout << "Sum is        " << Sum << endl;
    
cout << "Total is      " << Total << endl;
     
cout << "Result is     " << Result << endl;
    
cout << "Remainder is  " << Remainder << endl;