can anyone please help me on how to write a code using mplap PIC18F26J11 to divide 2 binary numbers. already started the code but i dont know how to do the rest.
after my initialization
for example [0101,0011]
MOVF PORTB,0 ; move data in port-b to w-reg
MOVWF 0X0; move data in w-reg to address 0x0
MOVWF 0X1; move same data in 0x01
SWAPF 0X0,1; swap data in 0x0 and save it in itself
MOVLW 0X0F; move [0000,1111] into w-reg
ANDWF 0X0,1; and data in oxo with data in w-reg and save it in itself
ANDWF 0X1,1; and data in ox1 with data in w-reg and save it in itself
MOVF 0X0,0; move data in 0x0 into w-reg
this is where i got stuck because i could'nt find a function that says *DIVF* and the answer is will be moved in to PORT-C
help please
after my initialization
for example [0101,0011]
MOVF PORTB,0 ; move data in port-b to w-reg
MOVWF 0X0; move data in w-reg to address 0x0
MOVWF 0X1; move same data in 0x01
SWAPF 0X0,1; swap data in 0x0 and save it in itself
MOVLW 0X0F; move [0000,1111] into w-reg
ANDWF 0X0,1; and data in oxo with data in w-reg and save it in itself
ANDWF 0X1,1; and data in ox1 with data in w-reg and save it in itself
MOVF 0X0,0; move data in 0x0 into w-reg
this is where i got stuck because i could'nt find a function that says *DIVF* and the answer is will be moved in to PORT-C
help please