The loop continues while the unsigned value of ECX is greater than zero and zero flag is clear. The following code is the execution logic of them:
ECX = ECX - 1
if (ECX > 0 and ZF = 0)
jump to destination
The code on the right shows an array whose integer elements are sorted ascendingly.
It scans each number in an array until a nonnegative number is found.
It then applies addition to the remaining nonnegative numbers.
|
|
|
Adding up the Nonnegative Integers
|
|
|
“I’m not arguing, I’m just explaining why I’m right.”
― Unknown
|
|