I am migrating an old program developed in mplab with mpsam, however I can't find a way to solve two lines of code that are generating errors in the new MPLAB X IDE v4.0 with pic-as. Attached is the migrated code pointing out where it is generating errors.
#include <xc.inc>
CONFIG FOSC = HS
CONFIG WDTE = OFF
CONFIG PWRTE = ON
CONFIG BOREN = OFF
CONFIG LVP = OFF
CONFIG CPD = OFF
CONFIG WRT = OFF
CONFIG CP = OFF
ORG 0x00
GOTO INICIO
ms_20:
clrf TMR0
;The following line gives me an error
movlw .80
xorwf TMR0,w
;The following line gives me an error
bnz $-3
return
INICIO:
bsf STATUS, 5
bcf STATUS, 6
movlw 00000000B
movwf TRISB
movlw 00000111B
movwf OPTION_REG
bcf STATUS, 5
bcf STATUS, 6
clrf PORTB
bsf PORTB,0
call ms_20
bcf PORTB,0
call ms_20
goto m0
m0:
bsf PORTB,0
call ms_20
bcf PORTB,0
call ms_20
goto m0
END
The original code in the old version is as follows:
LIST P=16F877A
INCLUDE<P16F877A.INC>
_CONFIG 0x3F31
ORG 0x00
goto INICIO
ms_20 clrf TMR0
movlw .80
xorwf TMR0,w
bnz $-3
return
INICIO bsf STATUS, 5
bcf STATUS, 6
movlw B'00000000'
movwf TRISB
movlw B'00000111'
movwf OPTION_REG
bcf STATUS, RP0
bcf STATUS, RP1
clrf PORTB
bsf PORTB,0
call ms_20
bcf PORTB,0
call ms_20
goto m0
m0 bsf PORTB,0
call ms_20
bcf PORTB,0
call ms_20
goto m0
END