Assembler

Post here to discuss any new features, components, chips, etc, that you would like to see in Flowcode.
Post Reply
keithh534
Posts: 13
http://meble-kuchenne.info.pl
Joined: Sun Aug 08, 2021 11:20 pm

Assembler

Post by keithh534 »

Are there any plans to include an "Assembler" Command Icon for writing Assembly code for Microchip MCUs?

Steve-Matrix
Matrix Staff
Posts: 1253
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 167 times
Been thanked: 277 times

Re: Assembler

Post by Steve-Matrix »

You can add assembly language within a C icon using "#asm" or "asm()" like this:

Code: Select all

#asm
 BCF 0,3
 BANKSEL(_var)
 RLF (_var)&07fh
 RLF (_var+1)&07fh
#endasm

 // or alternatively:
 asm("BCF 0,3");
 asm("BANKSEL _var");
 asm("RLF (_var)&07fh");
 asm("RLF (_var+1)&07fh");

stefan.erni
Valued Contributor
Posts: 758
Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 149 times
Been thanked: 171 times

Re: Assembler

Post by stefan.erni »

Hi keithh534

Assembly code for Microchip MCU is not for all PIC the same. PIC32 has a different assembler code.

What I can recommend to you is to use Flowcode's C code for the PIC32 to set and get some register.

regards

Stefan

keithh534
Posts: 13
Joined: Sun Aug 08, 2021 11:20 pm

Re: Assembler

Post by keithh534 »

Thank you!

Post Reply