TRISB=%00000000 '0 all out
led0 var portB.0
comptval VAR BYTE
val1 VAR BYTE
init:
low led0
comptval=0
val1=255
start:
comptval=comptval+1
asm
readval
movwf _val1
test
bcf status,2
movf _comptval,0
xorwf _val1,0
btfss status,2
goto _start
bsf _led0
endasm
pause 500
goto start
I try to do the same with word comptval var word and val1 var word in ASM
No idea to do in asm to work with more than 8 bits
Can you help me
BB
Bookmarks