cx is counter register;
so loop will execute until cx!=0 ;
content of cx= 0Ah
A=10 in hex;
statement doloop:
dec ax; decrement value of ax cx times
loop doloop;
simply add ( ax + ( -cx ) )
=> 0000 0000 0000 0000 + ( 2's compliment of cx = 1111 1111 1111 0110)
=> 1111 1111 1111 0110= FFF6, cx =0000h