emrath (12/31/82)
#N:uiucdcs:8200009:000:910 uiucdcs!emrath Dec 31 06:41:00 1982 I'm trying to bring up some pdp-11 code under unix in compatibility mode. Debugging can be difficult because of the following problem. If you do an "rts pc" when the sp points at an odd value, the stack is not popped into the pc (which would normally be very helpful!), but the pc is corrupted so that it is difficult to tell what happened. It appears that what happens is: if (pc & 0340) pc |= 0177400; else pc &= 0377; This is based on the following observed (octal) values: pc before trap pc after trap 052 177452 132 177532 206 177606 177422 000022 where the pc before the trap points at an "rts pc" instruction and 35 is on top of the stack. I also tried about a dozen other values, all of which behave in the same way. (It took a few to figure out the pattern) Does anybody know what's going on here? Is it the vax? Can anybody tell me where to look in the code for unix?