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
BTG _option_reg, 0
- 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:
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.
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);
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel