Mon, 27th Nov, 2017, 22:00 [patt@ece.utexas.edu: A problem to avoid if you are using the Windows Simulator on Lab 4



My students,

There is a potential problem with the Windows LC-3 Simulator.  The problem
does not exist on the Linux LC-3 Simulator.  So, if you are using the Linux
Simulator, you can ignore this message.

For some reason, on the Windows Simulator, the TRAP x25 service routine is
not located in the memory reserved for the operating system (locations x0000
to x2FFF), where it should be.  Instead, it somehow was put in user space,
in locations xFD70 to xFDA6.  This means that your user stack, initialized
(i.e., empty) with SP=xFE00, only has 90 locations before you start destroying
the code for the TRAP x25 service routine.

What to do:

First, we will not have any tree with depth greater than ten.  "Depth" is the
number of elements from the root of a tree to the furthest leaf.  A "leaf" is
a node with no children.  If you use your stack wisely, you should not run
into any problems.

However, every student has the right to design his/her own algorithm, and
it could happen (even though it shouldn't) that you end up with more than
80 words on the user stack.  If that happens, you would be overwriting
instructions in the TRAP x25 service routine with each "push," and the service
routine will not work.

If you discover strange behavior, please put a breakpoint at the location
of the TRAP x25 instruction.  Now, when you run your program, the computer
will stop just before the TRAP x25 instruction, and you can check your
solution before TRAP x25 is executed.  If the program works, our grading
will ignore the fact that you have destroyed all or part of the TRAP x25
service routine.  After all, it is not your fault that someone stuck that
service routine "in the middle of the road" where it does not belong and
could cause harm.

Sorry to waste your time with this, but I do not want you to feel frustration
if you happen to need a stack with more than 80 words, which inadvertently
caused bad things to happen beyond your control.

Good luck with Lab 4.  See you on Wednesday.



Yale Patt