Page 1 of 1
passing variables
Posted: Tue Nov 25, 2008 3:02 pm
by valvo
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
Re: passing variables
Posted: Wed Nov 26, 2008 10:09 am
by Benj
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
}