BTG _option_reg, 0

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 2 and 3.

Moderators: Benj, Mods

Post Reply
bert
Posts: 23
Joined: Wed Feb 28, 2007 11:58 pm
Location: The Netherlands

BTG _option_reg, 0

Post by bert »

I want to toggle bit 0 of the OPTION_REG register with asm, like this (entered in a C-box):

asm
{
BTG _option_reg, 0
}


but for some reason it gives an arror and won't compile. I think this is valid Microchip assembler. Any (asm) suggestions how to get this to work?

Bert

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Post by Benj »

Hello Bert

There is a BoostC manual in the Flowcode V3/BoostC directory. This should provide some help.

Do you have to use assembler. Eg here is some C code to do the same function.

Code: Select all

if (test_bit(OPTION_REG , 0))
        clear_bit (OPTION_REG , 0);
else  set_bit (OPTION_REG , 0);

bert
Posts: 23
Joined: Wed Feb 28, 2007 11:58 pm
Location: The Netherlands

Post by bert »

I will check out the C manual, I didn't even know I had one :)

Post Reply