How can I pass a value in the W register to a flowcode variable ? is it possible to have a program with subroutines in an ASM block ?
regards
steve forsyth
passing variables
- 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:
Re: passing variables
Hello
Yes it is possible to create assembler subroutines, data on this should be in the BoostC manual located in the Flowcode V3/BoostC folder.
You can pass the W register value to a Flowcode variable by doing the following.
Flowcode byte variable named "flowvar" would become "FCV_FLOWVAR" in C code and "_FCV_FLOWVAR" in assembler.
Bit fussy on assembler but here goes.
asm
{
movwf _FCV_FLOWVAR
}
Yes it is possible to create assembler subroutines, data on this should be in the BoostC manual located in the Flowcode V3/BoostC folder.
You can pass the W register value to a Flowcode variable by doing the following.
Flowcode byte variable named "flowvar" would become "FCV_FLOWVAR" in C code and "_FCV_FLOWVAR" in assembler.
Bit fussy on assembler but here goes.
asm
{
movwf _FCV_FLOWVAR
}
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