Is it a good or safe idea to use the alternate register set during interrupts when using the new CLIB library?
If i'm not mistaken z88dk isn't using the alternate registers but I read somewhere that it can happen that the CLIB is using one or more alternate registers, is it somewhere known if the new CLIB is really using alternate registers and if so in which functions?
I really want to use a quicker storage of the register set during C calls from an interrupt source
Alternate register set?
Re: Alternate register set?
At least in some of the SP1 C stubs for Classic I used BC' in some places, so I guess you should save it if you are using it in your interrupt routine. But anyway, this "save whatever you modify" is standard recomendation when writing ISRs...
Re: Alternate register set?
Sometimes we find target systems using the special registers in the interrupts, so the collisions with the libraries (mostly graphics and FP maths) are SORT OF managed by providing alternate libraries or workarounds (even z80asm can directly help a little bit!).
By the way, if you have the possibility to limit the complexity, why not doing so?
A faster interrupt routine might, in example, schedule part of its activity at a lower rate by keeping a local counter.
By the way, if you have the possibility to limit the complexity, why not doing so?
A faster interrupt routine might, in example, schedule part of its activity at a lower rate by keeping a local counter.
Re: Alternate register set?
I'm not using any graphical or floating point libraries, also am I building al of my peripheral/target libraries myself. My only concerns are going out to the standard integer like math/compare stuff that is default inside the compiler.
Re: Alternate register set?
If you've followed our discussion about z88dk on the CPC (which is happening right now in the CPC thread), then you'll see that z88dk is using a lot of workarounds because the CPC firmware is using a lot of alternative registers. This basically made every single z88dk application or game run on it slower by 20%-50% compared to the programs that are avoiding the CPC firmware altogether.
By using the alternate register set yourself, the complexities have not really gone away, but they have shifted to everyone else building programs on top of it. It's probably not a big deal if you're not expecting anyone else building programs for it.
By using the alternate register set yourself, the complexities have not really gone away, but they have shifted to everyone else building programs on top of it. It's probably not a big deal if you're not expecting anyone else building programs for it.
Re: Alternate register set?
As a general rule if it involves 32bit or longer values then the alternate register set is likely to be used.
Re: Alternate register set?
Thanks for the reply, I guess for now I just dischard the idea of using the alternate registers as temporary storage.