Embedded Systems November 2000 Vol13_12

Issue link:

Contents of this Issue


Page 9 of 189

Parity Bit quencywith whk h this occurs in software would be abhoJTent, simply unaccept- able, in any otl1er field of enginee1ing. This leads to the third leg of Ganssle's "twisted triad." Where time to market and product complexity are the 6rst two leg , quality is tl1e th ird. If the past lO years have seen software components and reuse technology beefing up the first two legs into columns of reinforced concrete, the third leg, quality, is a rotting, buckling two-by-four. Its time to erect some scaf- folding and drive up the cement trucks and beef up this leg number three! Brad Peeters Tnt-: TA E N GI N EER I NG ; JIF INTS OFF: LEAVE OFF JR Z,RUTT10 Return to user with interrupts enabled POP EI RET Return to user with interrupts disabled RUTT10: POP AF RET John Hartman Support for open-source Saving the state n the article " ew Twists on the Z80" (September 2000, p. 50), J ean Labrosse states that tllere is no "easy" way to save the state of the in terrupt flag. I don't know if you would call it easy or not., but my 1978 Z80 databook states that when you load the I register in to tl1e accwnulator, the interrupt state is transferred to the parity flag. I presume that the children of the Z80 have imple- mented this admittedly bizarre effect. I have used the fo llowing f1 to save interrupt state: I ·agment ;SAVE ACC AND CONDITION CODES DI PUSH AF ;GET P FLAG = IFF2 (SIDE EFFECT) LD A,I ;NO INTERRUPTS ALLOWED DI ;SAVE INT REG LD (REG_l) ,A LD A,O ;JIF PARITY ODD (FLAG=O) JP PO,BREAK10 ;ELSE SET A = FLAG = 1 (ENABLED) INC A ;SAVE INTERRUPT FLAG BREAK10:LD

Articles in this issue

Archives of this issue

view archives of EETimes - Embedded Systems November 2000 Vol13_12