Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
34 views1 page

Addition Program: Org 00H CLR A Mov 20H,#10 MOV R0,#20H Again: ADD A,@03 DEC@R0 CJNE@R0,#00H, AGAIN MOV 30H, A END

This program performs addition using a loop. It clears register A, loads the values 10 and 20H into registers, then enters a loop that adds the value at memory location 03H to register A, decrements the value in register 0, and continues the loop until register 0 is 0. After the loop, it stores the final value of register A at memory location 30H.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views1 page

Addition Program: Org 00H CLR A Mov 20H,#10 MOV R0,#20H Again: ADD A,@03 DEC@R0 CJNE@R0,#00H, AGAIN MOV 30H, A END

This program performs addition using a loop. It clears register A, loads the values 10 and 20H into registers, then enters a loop that adds the value at memory location 03H to register A, decrements the value in register 0, and continues the loop until register 0 is 0. After the loop, it stores the final value of register A at memory location 30H.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Addition program

ORG 00H
CLR A
mov 20H,#10
MOV R0,#20H
AGAIN:

ADD A,@03

DEC@R0
CJNE@R0,#00H,AGAIN
MOV 30H,A
END

You might also like