Sat, 22 Oct 2011, 00:49
A student is getting ahead of himself a little and asks about all the trap vectors that we have not specified. We will talk about all this in another week, so feel free to just put this email aside until we discuss it in class. Meanwhile, since a student writes, this professor feels compelled to respond. > Hello Professor, > I was wondering if the the other Trap instructions (the ones that > aren't listed in the book) have any use to us or are they just there > to allow the LC-3 to run smoothly. Also if they do have any significance > to us where would I be able to find out what each instruction does? I don't > recall you going over this in lecture and if you did I am sorry for asking > an already answered question. > Thank You, > <<name withheld to protect the student who is thinking ahead>> Yes, there are 256 possible trapvectors, and each can (if the operating system provides the corresponding trap routine) allow the user program to ask the operating system for help with 256 different things. We have specified just a few of them: x25, x23, x21, etc. The rest have not been specified, so yes, you do not have to worry about any that we have not specified. However, it could be the case sometime in the future that Microsoft decides to make Windows available to run on the LC-3. If so, they will have 256 trapvectors available. In fact, they will not even have to accept our definitions of TRAP x25, x23, etc. They can change the code if they wish that gets executed in response to you putting TRAP x23 in your program. Of course, if they do change these, they better document it and let future users know so they interface with those routines correctly. We will talk about this next week. Does this answer your question? Yale Patt