I was trying to solve a problem and I read that this code converts a number from hex to decimal I mean why . My idea is that div is just for division can somebody answer my questions that I left as comments
MOV A,#0FFH ;why do we need to do this
MOV P1,A ;P1 as an INPUT
MOV A,P1 ;Get data from P1
MOV B,#10 ;to convert from hex to decimal
DIV AB ;that the question why does div used to do this conversion
MOV R7,B ;does this put 10 in the register r7
MOV B,#10
DIV AB
MOV R6,B ;it does also puts 10 in the register r6?
MOV R5,A ;if A <10 (why does this do )