;Program to find largest of numbers
MOV R3,#04H ; Counter initialization
MOV R0,#40H ; Starting address
MOV A,@R0
INC R0
L1: MOV B,@R0
  CJNE A,B,L2 ; Comparing two numbers
L2: JNC L3 ; Checking for condition ‘greater than’
  MOV A,@R0
L3: INC R0
  DJNZ R3,L1
  MOV 50H,A