Hi,
I used assembly to program PIC MCUs long time ago. I switched to C because it's faster to develop. However from time to time I need to write some assembly code - especially for interrupts. Sometimes I want to write the whole firmware in assembler. The problem is that since microchip migrated to XC there is lamost no documentation for assembly language. I remember there were 2 ways to define variables in ram:
CBLOCK - absolute addressing
and
.delay udata_acs
variable_name res 1 ; number of bytes
That's not compatible with XC. Also I used to return from high priority interrupt like this:
RETFIE fast
now it's:
RETFIE f
What is the define for "access" and "banked"?
And most things are not well documented, or not documented at all. Where can I find assembly documentation and code examples. The whole "Microchip Libraries for Applications" is written in C. I can't easily search for application notes written in XC assembly which I can use as examples. I don't know how to reserve space for a variable in RAM ...
And the reason to write in assembly? It's really nice that they made high priority interrupts in PIC18 with automatic storage of most important registry. You can do really low latency interrupts. But not in C - it stores 10-20 more registers with 2 cycle MOVFF instructions and these registers are not even used.