to: predrose(predrose)
please explain that why the value of the ax is zero in your code ? if there is no loop, the inc ax instruction must be executed once. why ax is still zero?
if you can not understand, I can tell you the reason is the inc ax instruction being executed 0xFFFF+1 times, then ax is overflow to zero(please check the AC flag).
Here another simple code, please test it:
100 mov cx,0
103 loop 100
104 int 3
hmm, the two instructions will satirize you. So, do not designating the others are newbeis arbitrary before you considering.
Please use debug to test belowing code:
100 mov ax,0
103 mov cx,0
106 inc ax
107 loop 106
109 int 3
g=100
She screen output: EAX=0 ECX=0
So we have consider for the question: NO loop, CX=0.
The newbies on the CSDN have more, too.
Dear all of Newbies:
See my first code and then execting it.
If you doesn't explict for the question, please see the instruction set reference (Intel Developer manual 2)(3-393 Pages)