FPC follow the AVR GCC ABI:
https://gcc.gnu.org/wiki/avr-gcc#Register_Layout
While you are on that page, also read the calling convention section, for when you want to access parameters, or call functions from assembly.
The compiler will restore the registers provided you announce them to the compiler:
https://www.freepascal.org/docs-html/prog/progse12.html#x148-1490003.4
That basically means that the compiler will do a save and restore for you when needed.
Right now I can not find the other option: FPC documents which registers are free to use and do not need save.restore, e.g. for 32 bit intel processors eax,edx and ecx,
The compiler will restore the registers provided you announce them to the compiler:
https://www.freepascal.org/docs-html/prog/progse12.html#x148-1490003.4
That basically means that the compiler will do a save and restore for you when needed.
This is only the case for asm-blocks. For assembly functions that clause is parsed, but ignored, because FPC adheres to the corresponding ABI.What does ist mean "adheres to the corresponding ABI"? Will the registers be taken care of, or not?
This is only the case for asm-blocks. For assembly functions that clause is parsed, but ignored, because FPC adheres to the corresponding ABI.What does ist mean "adheres to the corresponding ABI"? Will the registers be taken care of, or not?
Are there other differences between using an asm-block or a asm-function e.g. in regard to variables and function parameters?
Is that correct?