Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!ut-emx!austex!roadhog From: roadhog@austex (Lindsay Haisley) Newsgroups: comp.os.cpm Subject: Re: BIOS Problems with Zilog Registers Message-ID: <4sLJ21w163w@austex> Date: 6 May 91 20:37:26 GMT References: <9115@mcshh.hanse.de> Organization: The Texas Feedlot Lines: 32 tilmann@mcshh.hanse.de (Tilmann Reh) writes: > Wouldn't it be better to fight the reason for the problem instead of the > results? As I pointed out some time ago, *NO* program is allowed to trust in > the values of *ANY* register after a BDOS or BIOS call (quoting the CP/M-3 > programmers manual). So why does noone search for the error-causing passage > in UCRLZH and corrects it? (Then it would run on *every* machine, of course!) CP/M was written for the Intel 8080, and all DRI versions (including, I believe CPM3) are 8080 compatible, meaning that they >>don't<< use the special Z80 registers. The CP/M BDOS, therefore, will preserve the Z80 registers since it knows nothing about them and makes no use of them. It was generally accepted industry practice on Z80 based machines to extend this principle to individual machine BIOS code as well, and with only a few exceptions, all Z80 based computers which use the special Z80 registers save and restore them. Since this rather sound principle was never, to my knowledge, incorporated into any sort of industry-wide agreement, these few exceptions did slip through to cause trouble. Since there are a substantial number of programs outstanding which operate on the assumption that the Z80 special registers are preserved across system calls, Jay Sage's suggestion makes more sense than trying to fix >>every<< program which makes this assumption. A BIOS fix for every computer which fails to preserve the Z80 registers can be easily standardized. A fix for every program which assumes that they are preserved cannot. "Everything works if you let it!" --- Travis J. Redfish ++++++++++++++++++++++++++++++ uucp: austex!roadhog@emx.utexas.edu BBS: 512-259-1261 (Znode 77 - aka - Kaypro Club of Austin)