I have the impression that an assembler non-interrupt subroutine called from 'C' need save no registers. Is that correct? Erik
It depends on your skill. If you don't alter registers in your subroutine, why to save them? I'll say even more, I never save registers even for interrupts, neither for C functions, but it is only possible if you have reached a certain level of qualification. Have fun. M.
If you do not use the registers you do not need to save them, that is evident even to the rankest amateur. I would have no reason to ask this question if I did not use the registers in routines. I have, however, noted that C functions do not seem to save the regs and thus ask the question. REPHRASE: The 'c' functions do not - as far as I have seen - save registers. Are there any cases - outside interrupts - where not saving (these specific) the registers will topple the code generated by the 'C' compiler. Erik
Excuse me, your rephrase seems even less clear than the original question. You say: "Are there any cases ... where not saving will topple the code." Should that be understood as "Can an example be constucted..."? If so, the answer is evidently YES. Everything is possible in an assembler routine. If you speak of some practical cases - all depends on your style and skill. M.