On Mon, 1 Jul 2024 at 08:56, Alan Cox <alan@llwyncelyn.cymru> wrote: > On Mon, 24 Jun 2024 11:25:54 +0200 > Philipp Klaus Krause <p...@spth.de> wrote: > > > Dear users of the z80 and related ports, > > > > we currently do have the --reserve-regs-iy option to make sdcc generate > > code that does not use the register pair iy. But we do not by default > > ship with a standard library compiled with --reserve-regs-iy. > > > > How useful would it be for users of z80-related ports if SDCC would ship > > such a library for some ports? > > Would such a library be useful to you? If yes, for which port? > > I have no use for it. The platform I need to reserve registers on for NMI > is the Sinclair ZX81 and it needs IX reserved and to an extent IY > although that one can be dealt with unlike IX >
Yeah, +1 it needs IY preserved on the ZX platform(s). It's a confusing mess in Z88DK's use of this because Z88DK started with a > hack that avoids using IY and turns IX into IY in the assembler so > reserves IY but actually really reserves IX because it modifies all your > assembler for you. > > I would guess the Z88DK register mangling mayhem for the ZX81 is the > only general use case. There are a few CP/M BIOSes with bugs that corrupt > IX or IY on some calls but those are handled by just pushing registers > around CP/M BDOS calls and taking the precautionary position that enough > CP/M BIOS writers are idiots to justify it. > .. and that also still surprises me, alas :-) (It may be time for CP/M 3.1, which doesn't lie about Z80 only support :-) -adrian
_______________________________________________ Sdcc-user mailing list Sdcc-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sdcc-user