Sunday, August 19, 2018

Q) Write as assemble language program to add two 8 bit data which is stored in memory location 2030H and 2031H and display the result output port 03H using 8085 microprocessor.
   Solution
         program                                                      comment
LDA2030H                                                          -load the data from memory location 2030H to accumulator
MOV B,A                                                             -move the data from accumulator to B register
LDA2031H                                                          -load the data from memory location 2031H to accumulator
ADD B                                                                 - Add the two datas
OUT 03H                                                              -display the result
HLT                                                                       -stop

No comments:

Post a Comment

huhiuh