Hi there,
In previous versions of Flowcode, I used to be able to insert assembly code (asm) into my program via the 'C Code' component.
I used to do this as a workaround to the odd bug in Flowcode, or to ensure registers are set up correctly.
I would drop in the 'C Code' component, then enter my code as follows:
asm{
CLRF PORTG
BCF CM1CON, CON
CLRF LATG
BANKSEL ANCON2
MOVWF ANCON2
BANKSEL TRISG
MOVLW 0x04
MOVWF TRISG
}
Unfortunately, after switching to Flowcode 7, I've been really struggling with using the 'asm' command; when I compile I always get an error message - I've attached an image of a typical message.
Is there a way to get this feature to work again?
C Code (asm)
Moderator: Benj
- 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: C Code (asm)
Maybe try this instead.
Code: Select all
#asm
CLRF PORTG
BCF CM1CON, CON
CLRF LATG
BANKSEL ANCON2
MOVWF ANCON2
BANKSEL TRISG
MOVLW 0x04
MOVWF TRISG
#endasm
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