MOV DPTR,#0Ah ; an external address
MOV RO,#0Ah ;array counter
MOV R1,#0h ;to count number even numbers
odd: DJNZ R0,loop
In alp programming its important to look that loops are executed only when we need ,coz as is said,compiler executes sequentially.If u dont branch them correctly ,the program may go wrong.