[Simh] pdp11 ash and ashc -32 handling
Walter F.J. Mueller
W.F.J.Mueller at gsi.de
Tue Oct 17 13:28:35 EDT 2006
Hello,
in pdp11_cpu.c I realized special case handling for the ASH and
ASHC instructions for a shift count of -32. In this case
ASH: dst = -sign;
V = C = 0;
ASHC: dst = -sign;
C = (src >> 31) & 1;
This means in particular for ASH, that such a right shift starting with
a negative number will clear C, where one rightfully would expect C=1.
This part of the code is not processor specific. It has been reported,
that the J11 has quite erratic and unexpected behaviour for larger values
of the shift count, but I assumed, that this was J11 specific.
I assume, that the -32 handling was done based on tests with real hardware,
and I wonder on what type of PDP11 these tests were done. The comments
indicate, that these changes were suggested by John Dungas. I'd appreciate
if he or someone else could shed some light on this.
With best regards,
Walter
More information about the Simh
mailing list