Compile Error W/BTFSS

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 4.
To post in this forum you must have a registered copy of Flowcode 4 or higher. To sign up for this forum topic please use the "Online Resources" link in the Flowcode Help Menu.

Moderator: Benj

Post Reply
jbell
Flowcode V4 User
Posts: 13
Joined: Mon Jul 18, 2011 11:04 pm
Has thanked: 1 time
Contact:

Compile Error W/BTFSS

Post by jbell »

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
Attachments
BasicTimeUnit.fcf
(5 KiB) Downloaded 214 times

medelec35
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

Post by medelec35 »

Hi Jim,
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
Martin

jbell
Flowcode V4 User
Posts: 13
Joined: Mon Jul 18, 2011 11:04 pm
Has thanked: 1 time
Contact:

Re: Compile Error W/BTFSS

Post by jbell »

Martin,

That's got it!

Thanks a lot for your help....

Jim Bell

medelec35
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

Post by medelec35 »

Your welcome,
Glad it worked for you.
Thanks for the update.

Martin
Martin

Post Reply