Sat, 10 September 2016, 05:56

A student writes:

> Dr. Patt.
> I have a question related to Part 2 of the Lab 1. In the second part
> it asks for a procedure and not a program but there is something
> that is confusing me. This is line from the description
> R1 contains the address of the memory location containing the low 8
> bits of data to be loaded into R0.  Execution should start at
> location x4000.
> In this it asks that the execution should start from 0x4000. Does
> that mean > that the procedure should start from 0x4000 and I need
> to include a .ORIG 0x4000 in my code. Does procedure can also have
> a .ORIG line. It might be a
> stupid question but if you may clarify it to me.
> <<name withheld to protect the student who incorrectly thinks he
> asked a stupid question>>

Actually, not a stupid question at all.  Particularly when you realize
that assembly languages are defined by humans, and every human has
his/her own ideas about how things should be done.  So, you are
correct in asking me what I have in mind since you can not read my

Normally, my specification for the LC-3b asssembly language argues
for ONE .orig pseudo-op in the entire program.  But after you
graduate, then get your PhD, and start teaching, you may want to
allow several .orig pseudo-ops.

In this assignment, my intent was to have you use a .orig x4000 for
the procedure, since indeed you are assembling that procedure
separately, and you need to tell the assembler in which locations
to put the ISA instructions.

Good luck completing the program by Sunday night.