|
From: alvin (<alv...@ho...> - 2007-10-04 22:15:50
|
As Stef says some libraries do use the alternate set -- an effort has been made to identify subroutines that use IX/IY/EXX in documented functions in the wiki. As for core library code (as in stuff that you don't have to link to explicitly in the compile) I don't think any non-8080 registers are used with the exception of long arithmetic operations. If there is any question you can always have a quick peak at the z80 source :)
The approach taken with the im2 library is to supply two wrappers for C functions that offer the option of saving 8080 registers only ('LIGHT') or all z80 registers (the other one), with the suggestion that the latter be used. It also supplies a generic isr routine that can have a list of C functions to run on interrupt on a specific vector; the generic isr saves all the z80 registers only once, then runs all C functions and restores all z80 registers so that the overhead is paid only once no matter how long the list is.
Anyway I say unless time is ultra precious you just go ahead and save all registers used in the isr.
|