On Mar 30 2006, 19:09, Jay West wrote:
I enter and run the Line Time Clock Interrupt test
from that webpage,
and
the system halts at location 4. How on earth? Does the
11/45 have
some
interrupts to specific locations for things like power
fail or
something?
Should a unexpected trap to location 4 mean something
special to me?
You mean the PC contains 4 when it halts? The LTC interrupt test you
ran sets each of the vectors in low memory to contain two words: when
the processor uses the vector, the first word is loaded into the PC.
The LTC test fills each vector with a pointer to the second word of
the vector, and put a halt instruction in the second word, so the
reason your PC contains 4 when it halts is that it tried to use the
vector at zero. The PC gets loaded with 000002 from location zero, and
the processor executes the HALT instruction at 000002. By the time you
see it, the PC has been autoincrememnted and contains 000004.
I also wanted to run the trap catcher program from
that website to
help test
software traps & interrupts. However, I don't
understand part of what
they
say to do. I can certainly enter the program, but then
they say to
deposit
777 into loc 1000. That would overwrite the first word
of the
program. Not
sure what they want done there or I'd run that to
see what it comes
up with.
Standard stuff. You're supposed to enter _and_execute_ the little
program that fills memory with zeros -- that fills the vectors like the
LTC test. After it's run, the vectors are set up, and *then* you
replace the first instruction, at 001000, with 000777, which is a
branch-to-self instruction. When you run *that* the processor will run
in a tight loop until an interrupt or trap makes it jump through one of
the vectors. If you use the first, shorter program, all the vectors
contain 000000, and 000000 contains a halt instruction, so the
branch-to-self halts at 000000 (so the PC will contain 000002) when it
gets any interrupt or trap.
If you use the second test instead of the first, each vector contains a
pointer to its own second word, so it halts with the PC pointing to
4+the vector it used.
--
Pete Peter Turnbull
Network Manager
University of York