Writing an Assembly Program to add from 1 to 100
问题 So im trying to add 1+2+3... and so on...without using brute force. Y=∑_1^100▒X_i, the numbers Xi are stored in consecutive memory locations starting at location 100. I am using the IAS instruction set: I just cant seem to get this done. I dont even know where to begin, no real loops or if statements 回答1: You have 4 different possible approaches, that I will write in x86 since my knowledge of IAS is very limited, but you can apply the same logic 1/ Brute force xor eax, eax mov ecx, 100