- 8051

8051 ALP to generate look up table for first 10 even numbers

Have a look at my older program on how to find a even number…

ORG 000h
MOV R0,#0Ah              ; you can change this value to N numbers
MOV R1,#00h               ;operand
MOV DPTR,#0Ah         ;memory adress

loop: INC R1
         MOV A,R1
         RRC A
         JNC even
         DJNZ R0,loop
         SJMP end

even: MOVX R1,@DPTR
          INC DPTR                   ; incrementing the pointer
          DJNZ R0,loop

end: NOP

END

Leave a Reply