addition 8 bit
DESCRIPTION
ProgramTRANSCRIPT
![Page 1: Addition 8 Bit](https://reader035.vdocuments.mx/reader035/viewer/2022072117/563dbbbc550346aa9aafce22/html5/thumbnails/1.jpg)
An Assembly Language Program to perform addition of two 8-bit numbers using 8085?
Algorithm
1) Start the program by loading the first data into Accumulator.2) Copy the data to a register.3) Get the second data and load into Accumulator.4) Add the two register contents.5) Check for carry.6) Store the value of sum and carry in memory location.7) Terminate the program.
Program
MEMORY LABEL MNEMONIC OPCODE COMMENT
4200 MVI C,00 OE Initialize C register to 004201 004202 LDA 4500 3A
Load value to accumulator4203 004204 454205 MOV B, A 47 Copy the content of
Accumulator to B register.4206 LDA 4501 3A
Load the value to Accumulator4207 014208 454209 ADD B 80 Add the value of register B to
A420A JNC LOOP D2
Jump on no carry420B 0E420C 42420D INR C OC Increment value register C420E LOOP STA 4100 32
Store the value of Accumulator420F 004210 454211 MOV A,C 79 Copy the content of register C
to Accumulator4212 STA 4101 32
Store the value of Accumulator (CARRY)
4213 014214 414215 HLT 76 Halt the program
Observation
Input at 4500 : 32H
4501 : FFH
![Page 2: Addition 8 Bit](https://reader035.vdocuments.mx/reader035/viewer/2022072117/563dbbbc550346aa9aafce22/html5/thumbnails/2.jpg)
Output at 4100 : 31H
4101 : 01H