sona
Member
I am having problems understanding the Fx BIN and BCD intruction. I am writting the program and testing in on the Mits simulator program.
Am I understanding the following lines correctly.
[x0]------------------------[ bin KIX1 D0]
X1 = 1
X2 = 2
X3 = 4
X4 = 8
When x0,x1,x4. are closed k1x1 value (9) D0 value(9)
When x0,x1,x2. are closed k1x1 value (3) D0 value(3)
All works well if the value is 9 or less.
when x0,x2,x4. are closed k1x1 value(10) D0 value (16)
when x0,x3,x4. are closed k1x1 value(12) D0 value (18)
The value in D0 is alway + 6 higher.
Why is this happening , where has the extra 6 come from ?
A similar thing happens with the following line.
[x0]-----------------[bcd k1x1 D1O]
All works well up to a max of 9 .
Go above this and the simulator comes up with ( operation error )
Why does it do this ?
Sorry for the long post.
SonA
Am I understanding the following lines correctly.
[x0]------------------------[ bin KIX1 D0]
X1 = 1
X2 = 2
X3 = 4
X4 = 8
When x0,x1,x4. are closed k1x1 value (9) D0 value(9)
When x0,x1,x2. are closed k1x1 value (3) D0 value(3)
All works well if the value is 9 or less.
when x0,x2,x4. are closed k1x1 value(10) D0 value (16)
when x0,x3,x4. are closed k1x1 value(12) D0 value (18)
The value in D0 is alway + 6 higher.
Why is this happening , where has the extra 6 come from ?
A similar thing happens with the following line.
[x0]-----------------[bcd k1x1 D1O]
All works well up to a max of 9 .
Go above this and the simulator comes up with ( operation error )
Why does it do this ?
Sorry for the long post.
SonA