Sat, 7 Feb 2009, 00:46





A student writes:

	
	
	Hi Dr. Patt:

	It's something that I can't recall from 306 (It's long time ago.), 
	but are labels case sensitive? I can't find anything under either 
	Ch.7 (Assembly Process) nor Appx. A (ISA).



Have you looked at the Programming 1 lab handout?  Close to the end, 
it says: the whole lab process is case insensitive.  

Did you read that sentence?  That sentence should answer your question.

	
	
	Thanks,

	<<name withheld to protect the student who has not read the assignment>>




On sober reflection, that sentence goes further than I think is reasonable.

The statement says you can generate opcodes and addressing modes as either 
lower case or capital:  add R1,R2,R3 or ADD r1,r2,r3, for example.  
Pseudo-ops can be .ORIG or .orig, for example.  And, all that is fine.

But labels really should not provide this level of flexibility.  The programmer
should be required to be consistent with respect to the upper/lower case of a 
label.  For example loop and LOOP are different labels.  So, while it is okay 
to Have have 

		BR LooP
		...			(case 1)

	LooP    ADD, R1,R2,R3


it is not okay to have

		BR LOOP
		...			(case 2)

	loop    ADD, R1,R2,R3

Our script for grading will NOT have test cases where labels and their use 
are of the form shown in case 2.  So you are free to not test loop against 
LOOP, for example.  Any label and its use may be tested by matching character
by character.  A and a are not the same thing as far as labels are concerned.

OK?

Good luck getting the program done in time.

Yale Patt