Wed, 21st Oct 2015, 01:18 labels in LC-3 Assembly Language

A student writes:

> Are there any rules on what is okay for a label in LC-3 Assembly Language?
> <<name withheld to protect the student who wants to have "good" labels>>

First, have you looked at Kathy Buckheit's tutorial on the LC-3 Simulator?
It is something that will answer a lot of your questions; I very highly
recommend reading it.  It is accessible from the course webpage under
Documentation.  Kathy TAed this course the first time I taught it at UT
and offered a lot of useful tips to freshmen, ... before she changed her
mind and left UT to get a PhD in Physics.

In spite of all that, in the case of labels, I would like you to modify what
she writes slightly to the following:

1. A label can be from 1 to 10 characters.  The first character must be
either an underscore or a letter of the English alphabet.  The remaining
characters can be letters from the alphabet, decimal digits, or underscores.
No colon at the end.

2. Capital letters and their lower case variants are *different* characters.
That is, do not say LD R1, somedata and label the location containing the data
as SoMeDaTa.  The assembler will not make the connection.

4. Reserved words are not allowed.  That means ADD, LD, LDR, TRAP, HALT, R5,
etc. are all off limits. well as anything else that the assembler might
have trouble interpreting uniquely, like xF0AB or B1011, for example.

My intent is to try to keep the labels simple so you can spend your time
solving the problems.

Good luck in the world of Assembly Language.

Yale Patt