> I would be interested in looking at the data sheet for this chip.  I
> didn't see which chip it was.  The thing that has me curious is the
> negative shift counts.  Can a right shift of a negative count (of
> some type (rotate?)) substitute for a left shift when the shift is
> greater than 16?

This chip (m16c/m32c) does not have separate left/right shift opcodes.
All shifts take signed counts; positive shifts one way, negative
shifts the other way.  Shifts are defined for counts in the range
-16..16.  Outside that range, they're undefined.  Experimentation has
shown that above that, counts wrap (i.e. counts are 0, 1, ..., 15, 16,
1, 2, ...).

Reply via email to