Microcontroller 8-Bit Addition

8- BIT ADDITION

ALGORITHM:

  • Initialize the pointer to the memory for data and result.
  • The ADD instruction writes the result in the accumulator.
  • Store the result into Memory from A registers.

INPUT:

  • MOV A,# 13
  • ADD A,#14  

OUTPUT:

  • 8600     27H  
ADDRESSOPCODESMNEMONICSCOMMENTS
850074 13  MOV A,#13Give 8 bit first data in A register
850224 14  ADD A,#14Give  8 bit second  data in acc move
8504     90 86 00  MOV DPTR,#8600           Store  in 8600 memory location
8507       F0  MOVX @DPTR,AStore the value acc move
850880 FEHERE:     SJMP HEREEnd

You may also like...

error: Content is protected !!