BDOS register clobbering

53 views
Skip to first unread message

Robb Bates

unread,
Nov 9, 2025, 11:59:58 AMNov 9
to RC2014-Z80
Is it safe to say that nowhere does any BDOS calls ever affect IX and IY?  I'm assuming so because IX and IY are Z80 only and any CP/M variant is designed to run on 8080 as well.

Volker Pohlers

unread,
Nov 9, 2025, 12:46:31 PMNov 9
to rc201...@googlegroups.com
There are various BDOS replacements such as ZSDOS, CP/A, etc., which are optimized for the Z80 and utilize all registers, including IX.


Mit freundlichen Grüßen
hc-ddr.hucki.net
- Z9001, LC-80, Z1013, TINY u.a. -


Robb Bates <robb...@gmail.com> schrieb am So. 9. Nov. 2025 um 18:00:
Is it safe to say that nowhere does any BDOS calls ever affect IX and IY?  I'm assuming so because IX and IY are Z80 only and any CP/M variant is designed to run on 8080 as well.

--
You received this message because you are subscribed to the Google Groups "RC2014-Z80" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rc2014-z80+...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/rc2014-z80/016dc175-025e-4e5d-8c86-c54b284c0202n%40googlegroups.com.

Robb Bates

unread,
Nov 9, 2025, 12:56:30 PMNov 9
to RC2014-Z80
Ah.  So preserve IX and IY.  Got it.

Robb Bates

unread,
Nov 9, 2025, 12:59:26 PMNov 9
to RC2014-Z80
Oh wait... is that what the Z in Z-systems is for?  ZPM3 and such?

Derp!

Alan Cox

unread,
Nov 9, 2025, 1:03:44 PMNov 9
to rc201...@googlegroups.com
On Sun, 9 Nov 2025 at 17:00, Robb Bates <robb...@gmail.com> wrote:
Is it safe to say that nowhere does any BDOS calls ever affect IX and IY?  I'm assuming so because IX and IY are Z80 only and any CP/M variant is designed to run on 8080 as well.


 Theory yes, practice no. A BIOS or BDOS using IX or IY will or should save those registers. There were one or two that didn't always so everyone ended up at least saving IX to deal with them. Most software saves IX and IY because it's better not to assume the code you depend upon is perfect.

Alan

Reply all
Reply to author
Forward
0 new messages