Mon, 12 September 2016, 23:46

A student writes:

> Hi Dr. Patt, I was doing the problem set and noticed that for the LC3-b,
> under LEA it says "The condition codes are set, based on whether
> the value (i.e., address) loaded is negative, zero, or positive.”
> I was wondering in which scenarios we would need to know the condition
> codes of the address loaded?
> -Thanks
> <<name withheld to protect the student who sees some silliness>>

Excellent point!  When I specified the LC-3 and later the LC-3b,
I thought it would be easier to simply set cc each time I write to
a register.  So, I specified LEA to set cc.  But I have long ago
changed my mind and decided it would be foolish to have LEA wipe
out the previous cc settings since I also think it is rare that
I might want to know the cc of the address loaded.  So, the next
version of the LC-3 and LC-3b will not have LEA set cc.

Hope you are enjoying EE460N.

Yale Patt