11/34 failing trap test

Don North ak6dn at mindspring.com
Sat Sep 23 13:20:31 CDT 2006


Patrick Finnegan wrote:
> On Saturday 23 September 2006 05:03, Julian Wolfe wrote:
>> On Sep 22, 2006, at 12:16 PM, Don North wrote:
>>> Julian Wolfe wrote:
>> Examining the SP gives me a value of 470(8) on the display. Now, from
>> what I understand, I should be looking for this address in the
>> listing, correct?
>
> No, SP (which I take it has the value of 470(8)) is the stack pointer, so you 
> should look at the contents of address 470(8) to find out the value of PC 
> when the machine trapped.  The notation (SP) means the contents of the 
> address indicated by SP.
That's correct ... you need to look at the memory location pointed to by the
SP (written as (SP) or @SP to show indirection, as one would write 
assembly code).
>
> Now, most machines I've used decrement SP *after* storing the value -- which 
> would mean that the PC should actually be stored at 472(8).  Is the PDP-11 
> different, or should Julian actually be looking at 472(8) instead of 470(8)?
In the PDP-11 the stack pointer addresses the last word pushed, so in 
the case
of a trap, @SP or (SP) will point directly to the word containing the 
pushed PC.
So look in memory location 470(8) to see where the code was interrupted. 
470(8)
is a reasonable SP for most diagnostics (typically the SP would be setup 
to 500
or 1000(8) on startup and build down from there).





More information about the cctech mailing list