this function (here reorganized to avoid the register allocation
problem) was the problem:  if *buf were a d10 already, i don't
think you'd have seen this problem.

int32
Map_WriteB (uint32 ba, int32 bc, uint8 *buf)
{
        uint32 lim;
        a10 pa10;
        d10 mask, shift;

        lim = ba + bc;
        for ( ; ba < lim; ba++) {                                       /* by 
bytes */
                pa10 = Map_Addr10 (ba, 1);                      /* map addr */
                if ((pa10 < 0) || MEM_ADDR_NXM (pa10)) {        /* inv map or 
NXM? */
                        ubcs[1] |= UBCS_TMO;                    /* UBA times 
out */
                        return lim - ba;                                /* 
return bc */
                }
                mask = 0377;
                shift = ubashf[ba & 3];
                M[pa10] = M[pa10] & ~(mask << shift);
                M[pa10] |= (d10)*buf++ << shift;
        }
        return 0;
}

- erik

Reply via email to