what values are permissible in instructions

Note! We have asked you to disregard this message!

A student writes:

	In the case of the shift operations, if we encounter negative number for 
	the "amount 4" operand do we treat that as an invalid constant error?

	<<name withheld to protect ...>>

First the short answer: Yes.

Now the longer answer, which is what my TAs have been saying all week, when asked:

If the ISA specifies the datatype used for the number (2'complement or unsigned),
then the Assembler expects the Assembly Language programmer to use only the 
appropriate range of values that is associated with that datatype.  Anything else
can be treated by the Assembler as an error.

For example, the 5-bit immediate value in ADD, AND, and XOR instruction is treated 
as two's complement, and thus the appropriate range is #-16 to #15. However, the 4-bit 
field in the shift instruction is treated as an unsigned number, and thus only values 
#0 to #15 are allowed.  One can argue that AND and XOR should allow hex strings, that
is a range of x00 to x1F, but for simplicity, we shall not allow it.

Because the ISA does not specify the datatype of the .FILL operand, we allow both 
the 2's complement and unsigned ranges. Thus the range for .FILL operands is #-32768 
to #65535, or if you prefer: x0000 to xFFFF.

Good luck finishing the first program in time.

Yale Patt