BHD: MOV R2,#8 BHD0: ADD A,ACC DA A XCH A,R3 RLC A XCH A,R3 DJNZ R2,BHD0 ADD A,#0B0H JNC BHD1 INC R3 BHD1: MOV A,R3 RET