some assembly language subtleties
Two email messages from two guys working together on the first program.
I do not know whether they read the Clarifications and were concerned,
or whether they did not read the Clarifications. We try very hard to
anticipate questions and remove ambiguities in the *Clarifications.*
It should be your first source of information if you have questions.
Now onto their first message:
Hi Dr. Patt,
Do we need to consider the case where the label begins with an x. For
example, a label of XFFF. Even though that is a valid label, we wouldnt be
able to distinguish the capital X from the hex x
<<names withheld to protect the students trying to get started early>>
Actually XFFF is NOT a valid label, as is spelled out in the clarifications
associated with Programming Assignment 1. It is important to read the clarifications
file. As I said above, we try to anticipate questions you might have, and provide
answers. It is a lot quicker to check there first.
Some of you might ask why XFFF was defined to be off limits. Certainly, the way
we have constructed the Assembly Language, there is no ambiguity if we allow labels
to start with an x. That is true. However, we decided to remove labels starting
with an "x" from the set of available labels, along with R1, ...R7, ADD, AND, etc.,
simply to make the Assembler a little easier for you to write.
And, their second message:
Hi Dr. Patt,
When implementing the LEA instruction. Do we need to account for the use of
a hex or decimal number for an offset instead of a label. The appendix says
that the assembler format is LEA DR, LABEL.
Yes, that is what the appendix says, so by all means follow that definition.
Sure, we could have allowed the form: LEA DR, offset as well as LEA DR, LABEL.
We decided not to in order for you to have one less thing to check.
<<names withheld to protect the two guys pushing onward>>