>> Have you examined the assembly code that GCC generates for your C++ program?
A very polite way of saying, "why are you even using assembly, when you don't understand assembly?"
A very polite way of saying, "why are you even using assembly, when you don't understand assembly?"
The OP clearly does understand assembly enough to start doing project Euler type problems, which is a good way to learn basic programming in any language. They get a solution in assembler which is more than many people here would be able to do I suspect.
And they're looking to expand their knowledge by asking on stack-overflow about something they don't understand.
So why do you think they should they be met with rudeness and hostility?