passing variables

For C and ASSEMBLY users to post questions and code snippets for programming in C and ASSEMBLY. And for any other C or ASM course related questions.

Moderators: Benj, Mods

Post Reply
valvo
Posts: 2
Joined: Thu Nov 06, 2008 2:11 pm
Contact:

passing variables

Post 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

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:

Re: passing variables

Post 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
}

Post Reply