summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--doc/mdk_tut.texi40
1 files changed, 28 insertions, 12 deletions
diff --git a/doc/mdk_tut.texi b/doc/mdk_tut.texi
index 42111fc..a33444a 100644
--- a/doc/mdk_tut.texi
+++ b/doc/mdk_tut.texi
@@ -4,7 +4,7 @@
@c Free Software Foundation, Inc.
@c See the file mdk.texi for copying conditions.
-@c $Id: mdk_tut.texi,v 1.8 2003/06/02 23:19:52 jao Exp $
+@c $Id: mdk_tut.texi,v 1.9 2003/06/05 22:23:10 jao Exp $
@node MIX and MIXAL tutorial, Getting started, Installing MDK, Top
@comment node-name, next, previous, up
@@ -721,7 +721,21 @@ Digits are represented in MIX by the range of values 30-39 (digits
@noindent
the represented number is 0012315904, and @samp{NUM} will store this
value in @samp{rA} (i.e., we end up with @samp{[rA]} = @w{+ 0 46 62 52
-0} = 12315904. @samp{CHAR} performs the inverse operation.
+0} = 12315904).
+
+If any byte in @samp{rA} or @samp{rB} does not belong to the range
+30-39, it is taken by @samp{NUM} as the representation of the digit
+obtained by taking its value modulo 10. E.g. 30, 40, 50, 60 all represent
+the digit 0; 2, 12, 22,... the digit 2, and so on. For instance, the
+number 0012315904 mentioned above could also be represented as
+
+@example
+[rA] = + 10 40 31 52 23
+[rX] = + 11 35 49 20 54
+@end example
+
+@samp{CHAR} performs the inverse operation, using only the values 30
+to 39 for representing digits 0-9.
@node Shift operators, Miscellaneous operators, Conversion operators, MIX instruction set
@comment node-name, next, previous, up
@@ -750,19 +764,21 @@ the instructions on the left column:
@multitable {SLA 00} {[rA] = - 00 00 00 00 00}
@item SLA 2 @tab [rA] = - 03 04 05 00 00
+@item SLA 6 @tab [rA] = - 00 00 00 00 00
@item SRA 1 @tab [rA] = - 00 01 02 03 04
-@item SLC 3 @tab [rA] = - 04 05 01 02 03
-@item SRC 24 @tab [rA] = - 05 01 02 03 04
@end multitable
@noindent
-Note that the sign is unaffected by shift operations. On the other hand,
-@samp{SLAX} and @samp{SRAX} treat @samp{rA} and @samp{rX} as a single
-10-bytes register (ignoring again the signs), so that, if we begin with
-@samp{[rA]} = @w{+ 01 02 03 04 05} and @samp{[rX]} = @w{- 06 07 08 09
-10}, executing @samp{SLAX 3} would yield:
-
-@example
-[rA] = + 04 05 06 07 08 [rX] = - 09 10 00 00 00
+Note that the sign is unaffected by shift operations. On the other
+hand, @samp{SLC}, @samp{SRC}, @samp{SLAX} and @samp{SRAX} treat
+@samp{rA} and @samp{rX} as a single 10-bytes register (ignoring again
+the signs). For instance, if we begin with @samp{[rA]} = @w{+ 01 02 03
+04 05} and @samp{[rX]} = @w{- 06 07 08 09 10}, we would have:
+
+@multitable {SLC 00} {[rA] = - 00 00 00 00 00} {[rA] = - 00 00 00 00 00}
+@item SLC 3 @tab [rA] = + 04 05 06 07 08 @tab [rX] = - 09 10 01 02 03
+@item SLAX 3 @tab [rA] = + 04 05 06 07 08 @tab [rX] = - 09 10 00 00 00
+@item SRC 4 @tab [rA] = + 07 08 09 10 01 @tab [rX] = - 02 03 04 05 06
+@item SRAX 4 @tab [rA] = + 00 00 00 00 01 @tab [rX] = - 02 03 04 05 06
@end example
@node Miscellaneous operators, Execution times, Shift operators, MIX instruction set