Hi folks! :) I'm here with a problem of Assembly 8086 (x86) (NASM). I´m trying calculate the sum of all numbers, which are odd, lowers than X (X = number defined by user) Already solved the problem in C # and C + +, but i need the Assembly Code. In C#: [CODE="C#"] int num = 0; int res = 0; int all = 0; int soma = 0; num = Convert.ToInt32(Console.ReadLine()); while (all < num) { all++; res = all % 2; if (res == 1) { soma += all; } else { continue; } } Console.WriteLine(soma);[/CODE] In C++: …

Member Avatar
Member Avatar
+0 forum 1

The End.