8051- 8 Bit Division

8-Bit Division

THEORY:

  • Using the accumulator, Division is performed and the result is stored.
  • Immediate addressing is employed.
  • The div instruction writes the result in the accumulator

INPUT:

  • MOV A,# 08H
  • MOV F0,#02H 

OUTPUT:

  • 8600     04H
  • 8601     00H  

PROGRAM:

ADDRESSOPCODESMNEMONICSCOMMENDS
850074 08MOV A,#08 
850275 F0 02MOV F0,#02 
850584DIV AB 
850690 86 00MOV DPTR,#8600 
8509F0MOVX @DPTR,A 
850AA3INC DPTR 
850BE5 F0MOV A,F0 
850DF0MOVX @DPTR,A 
850E80 FEHERE:       SJMP HERE 

You may also like...

error: Content is protected !!