Hi Folks,
I'm really new to assembly programming, so please bear with me if my problems seem trivial.
I'm trying to "Compile To Hex" the attached snippet of code to make a simple timing loop, but it's choking on the BTFSS line. I've come to this conclusion because if I REM the BTFSS line out, it will compile sucessfully.
Any assistance greatly appreciated.
Jim Bell
Compile Error W/BTFSS
Moderator: Benj
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: Compile Error W/BTFSS
Hi Jim,
Registers should be in lower case and preceded with an underscore. its the bit names that are in uppercase.
Try:
Martin
Registers should be in lower case and preceded with an underscore. its the bit names that are in uppercase.
Try:
Code: Select all
asm
{
WaitLop: movlw 0xFA //Delay Time
nop
loopBas: addlw 0xFF //dec W
btfss _status,Z //Zero flag set?
bra loopBas // No, keep looping
nop // Yes, done
}
Martin
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: Compile Error W/BTFSS
Your welcome,
Glad it worked for you.
Thanks for the update.
Martin
Glad it worked for you.
Thanks for the update.
Martin
Martin