__builtin_mac
The compiler supports the simple form of inline assembly
and also an extended form
Code:
asm("template" [ : [ "constraint"(output-operand) [ , ... ] ]
[ : [ "constraint"(input-operand) [ , ... ] ]
[ "clobber" [ , ... ] ]
]
]);
You need to read the user guide to get details on using the extended form.
There is nothing stoping you from writing the code for eeprom read/write in C.
The compiler has several 'built in' functions for common assembly operations, again, the user guide is the place to find details on all the built in functions
Built-In Function List
__builtin_addab __builtin_movsac __builtin_tbloffset
__builtin_add __builtin_mpy __builtin_tblrdh
__builtin_btg __builtin_mpyn __builtin_tblrdl
__builtin_clr __builtin_msc __builtin_tblwth
__builtin_clr_prefetch __builtin_mulss __builtin_tblwtl
__builtin_divf __builtin_mulsu __builtin_write_NVM
__builtin_divmodsd __builtin_mulus __builtin_write_OSCCONL
__builtin_divmodud __builtin_muluu __builtin_write_OSCCONH
__builtin_divsd __builtin_nop __builtin_write_RTCWEN
__builtin_divud __builtin_psvpage
__builtin_dmaoffset __builtin_psvoffset
__builtin_ed __builtin_readsfr
__builtin_edac __builtin_return_address
__builtin_fbcl __builtin_sac
__builtin_lac __builtin_sacr
__builtin_mac __builtin_sftac
__builtin_modsd __builtin_subab
__builtin_modud __builtin_tblpage
Another approach is to compile the assembly code into a library and link in when building your program.
This is a good option for commonly used functions.
Added after 3 hours 19 minutes:
I see you are starting to use the Microchip 16-bit processors.
This is quite a fast and powerful processor family with lots of varieties in the series.
I have written a small rtos for use with the dsPic30/33 and Pic24 micros.
Full source code and docs are included. Please take a look.
Maybe you could use it in one of your future projects.
It is posted on eda board here.