Page 1 of 1

Assembler

Posted: Thu Nov 10, 2022 6:23 pm
by keithh534
Are there any plans to include an "Assembler" Command Icon for writing Assembly code for Microchip MCUs?

Re: Assembler

Posted: Fri Nov 11, 2022 9:06 am
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");

Re: Assembler

Posted: Fri Nov 11, 2022 10:53 am
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

Re: Assembler

Posted: Sat Nov 12, 2022 1:35 pm
by keithh534
Thank you!