Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!sun-barr!ames!bionet!hayes.ims.alaska.edu!floyd From: floyd@ims.alaska.edu (Floyd Davidson) Newsgroups: comp.os.cpm Subject: Re: System use of Z80 registers Message-ID: <1990Dec4.131328.15594@ims.alaska.edu> Date: 4 Dec 90 13:13:28 GMT References: <9011261759.AA10916@newton> <6209@balu.UUCP> Organization: University of Alaska, Institute of Marine Science Lines: 32 In article <6209@balu.UUCP> tilmann@cosmo.UUCP (Tilmann Reh) writes: >Bridger Mitchell writes: >> SYSTEM CODE (BIOS, BDOS, INTERRUPT-SERVICE ROUTINES, AND BACKGROUND >> UTILITIES) SHOULD *ALWAYS PRESERVE* THE NON-8080 REGISTERS. >> **** >> >> This rule ensures that an application that uses Z80 opcodes can run on >> any z80 system without having to save and restore any of those >> registers before every BIOS and BDOS call. > >That's a guideline I don't agree with. >Why should the system care about which registers the application program uses? >The responsibility for register contents is *only* at the application [...] > >When will programmers (system *and* application) finally understand that >everything should be programmed as portable and universal as possible ? > You're last statement does not follow from the first. For maximum portability both should assume the other did it wrong. Both applications programmer and system programmer should protect the registers. I think the performance cost is small if a little thought is given to register use. Floyd -- Floyd L. Davidson floyd@hayes.ims.alaska.edu Salcha, AK 99714 paycheck connection to Alascom, Inc. When I speak for them, one of us will be *out* of business in a hurry.