<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Mon, 06 May 1991 20:37:26 GMT
From   : mintaka!think.com!sdd.hp.com!cs.utexas.edu!ut-emx!austex!roadhog@bloom-beacon.mit.edu (Lindsay Haisley)
Subject: Re: BIOS Problems with Zilog Registers

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)

<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>