Here we will see how to add two 8-bit numbers without carry in 8085.
Write 8085 Assembly language program to perform 8-bit addition without carry. The numbers are stored at F100, and F101. Result will be stored at F102.
In 8085, there is ADD instruction to add two numbers. We will set the HL pair to point the numbers, then load accumulator with the number. Then add with ADD M operation which can add items from memory pointed by HL pair and accumulator.
|F000||21, 01, F1|| ||LXI H,F100H||Point to get the numbers|
|F003||7E|| ||MOV A,M||Load first number to A|
|F004||23|| ||INX H||Point to next operand|
|F005||86|| ||ADD M||Add M with A|
|F006||23|| ||INX H||Point to next location|
|F007||77|| ||MOV M,A||Store result|
|F008||76|| ||HLT||Terminate the program|