is the flag F0 (part of the 8051 PSW) in use by SDCC or is it free for usage by the coder as intended by the architecture?
The F0 flag can be used by SDCC and furthermore PSW will be saved/restored often thus overwriting whatever you put in F0 in between.
But F0 is intended by the architecture to be used by any user and the compiler is just another user in this regard.
Is this really overwritten or is it just preserved? E.q. just pushed on the stack and restored or is it manipulated and used for calculations? If just preserved and restored as pushed, it is fine for my purpose.
you can search through SDCC's sources (SDCC being free as in freedom),
> grep F0 sdcc/src/mcs51/*.c
and you'll find some places where F0 is used in the file gen.c...
How about using a bit variable do instead of F0?
Normally no problem with the latter - in my case it is a bit more problematic.
I want to hack CMON51 to bypass the singlestep code if the user wants do so that a user program can use Timer 1.
Basically I want to add to the CMON51 Timer 1 ISR something like this:
...CMON51 single step ISR here
I could poke around with the DPTR somewhere into the user code instead but IMHo that would be quite slow, esp if the user wanst his Timer 1 ISR to be rather fast, even if run from CMON51.
I'm still thinking of this issue...