chancelier
Junior Member level 1
hi evryone
i am a newbie in assembler coding , i did a simple code of multiplying two nembers with rotation using assembler instructions of a 16F84 microcontroller but this code did not work.
i work with MPLAB
here is the code
LIST p=16F84
#include<p16F84.inc>
;declaration des variables
CBLOCK 0x00c
N1:1
N2:1
Re:2
compt:1
ENDC
movlw 8
movwf compt
movlw 0x04
movwf N1
movlw 0x05
movwf N2
movf N1,w
clrf Re
boucle rrf N2,f
btfsc STATUS,C
addwf Re,f
rrf Re,f
rrf Re+1,f
decfsz compt,f
goto boucle
END
registre file
where is the mistake?
can anyone give me an sembling tutorial?
i am a newbie in assembler coding , i did a simple code of multiplying two nembers with rotation using assembler instructions of a 16F84 microcontroller but this code did not work.
i work with MPLAB
here is the code
LIST p=16F84
#include<p16F84.inc>
;declaration des variables
CBLOCK 0x00c
N1:1
N2:1
Re:2
compt:1
ENDC
movlw 8
movwf compt
movlw 0x04
movwf N1
movlw 0x05
movwf N2
movf N1,w
clrf Re
boucle rrf N2,f
btfsc STATUS,C
addwf Re,f
rrf Re,f
rrf Re+1,f
decfsz compt,f
goto boucle
END
registre file
where is the mistake?
can anyone give me an sembling tutorial?