In MIX STA stores the contents of the A register in a given memory location.
I can't see how the behaviour around the sign is covered in TAOCP. How does MIX behave in the following example:
Location 2000 contains: + 5 4 6 2 1
The A register contains: - 7 8 1 3 2
What does STA 2000 (0:1) do?
Is this thought of as taking the values 3 2 from the A register and putting them in the field 0:1 of memory location 2000? If so, is there an implicit conversion of any non-sign value to a +? Or does the 0 in the field specification mean "take the sign of the A register, and any remaining bytes and put those values into the location"?
Interpretation 1: 2000 -> + 2 4 6 2 1
Interpretation 2: 2000 -> - 2 4 6 2 1
Or is there a third option?
So, yes in the definition of
STA
, theF
field is funky.Reading Section 1.3.1, Storing Operations (p 130 of my Volume 1, Third Edition) I find:
It gives various examples, where:
which is your Interpretation 2.
It seems that the
F
field refers to the field in the destination word, and:if
F
is(0:0)
:if
F
is(0:n)
(n
in1..5
):n
right-hand bytes of the source are stored in bytes(1:n)
of the destination,F
is(m:n)
(m
in1..5
,n
inm..5
):n-m+1
right-hand bytes of the source are stored in bytes(m:n)
of the destination,[It's a long time since I last even considered
MIX
... I confess I had remembered it as too quirky to be useful. I cannot say that I have changed my mind !]