It should be 18 .
Zero Flag (Z) – After any arithmetical or logical operation if the result is 0 (00)H, the zero flag becomes set i.e. 1, otherwise it becomes reset i.e. 0.
(23) base 8 = 19 in decimal
Add R1 + R2 = 19
DCR R2 = 19 -1 = 18
Now it enters into the loop .
As 18 != 0 again execution goes to ADD R2, R1 ( R1 = 0 , R2 = 18 )
so after execution R2 = 17 and again enter into the loop . like it will continue until it will not 0