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

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Advertisment ad adsense adlogger