Date: Saturday, December 31, 1994 From: INTERNET: kirkland@cs.utah.edu (Dan Kirkland) Re: Re: hardware bug with A=A+CON fs,expr ? |> The Jazz v2.7 documentation states that there |> is a hardware bug with the A=A+CON fs,expr instruction |> when fs specifies a single nibble (WP,P,S,XS). This |> is the first I've heard of this bug. What is the bug? |> I assume it affects C=C+CON fs,expr as well. Actually it should be 'r=r+CON fs,expr' and 'r=r-CON fs,expr' where r is register A ,B ,C ,or D. SASM does not allow fields WP, P, S, and XS. The bug affects all single nibble fields WP (with P=0), P, S, and XS. WP works normal when P does not equal zero. With multi-nibble fields, 'r=r+CON fs,expr' will add expr to the fs field of register r. There is no carry generated from the most significant nibble. So, if A.A equals FFFFF, then A=A+CON A,5 will give 00004 in A.A (A.A rolls over to 0, then 1, 2, 3, 4). With single nibble fields, 'r=r+CON fs,expr' affects the WHOLE register! With nibble fs being the least significant nibble and fs+15 (fs = nibble 0) or fs-1 being the most significant nibble. AND, there IS a carry generated from the most significant nibble which wraps around and affects the least significant nibble. So, if A.W equals FFFFFFFFFFFFFFFF, then A=A+CON P,5 will give 0000000000000005 in A.W (A.W rolls over to 1, then 2, 3, 4, 5). If A.W equals FFFFFFFFFFFFFFFF, then A=A+CON XS,5 will give 0000000000000500 in A.W. So basicly, single nibble fields will increase (or decrease) the whole register and at rollover it will rollover to 1 instead of to 0. 'r=r-CON fs,expr' will go from 0...00 to F...FE instead of to F...FF. For timing, the single nibble fields are just more than the W field. So with the W field timing at 21 cycles, the single nibble fields are about 22 cycles. DanK