summaryrefslogtreecommitdiffhomepage
path: root/doc
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2003-06-02 23:19:52 +0000
committerJose Antonio Ortega Ruiz <jao@gnu.org>2003-06-02 23:19:52 +0000
commitae131b89292bec9eaa75a29d0aaf8d29e9ecd46b (patch)
tree8b9c39ed311544bf359079d87b9185ec72858ecd /doc
parent79fcb9931b0984d79f423aa1002a9dee96221ae9 (diff)
downloadmdk-ae131b89292bec9eaa75a29d0aaf8d29e9ecd46b.tar.gz
mdk-ae131b89292bec9eaa75a29d0aaf8d29e9ecd46b.tar.bz2
(Address transfer operators): mixed bug in
DECX's MOD value.
Diffstat (limited to 'doc')
-rw-r--r--doc/mdk_tut.texi78
1 files changed, 39 insertions, 39 deletions
diff --git a/doc/mdk_tut.texi b/doc/mdk_tut.texi
index c2b3ab1..42111fc 100644
--- a/doc/mdk_tut.texi
+++ b/doc/mdk_tut.texi
@@ -1,10 +1,10 @@
@c -*-texinfo-*-
@c This is part of the GNU MDK Reference Manual.
-@c Copyright (C) 2000, 2001, 2002
+@c Copyright (C) 2000, 2001, 2002, 2003
@c Free Software Foundation, Inc.
@c See the file mdk.texi for copying conditions.
-@c $Id: mdk_tut.texi,v 1.7 2002/04/08 00:26:37 jao Exp $
+@c $Id: mdk_tut.texi,v 1.8 2003/06/02 23:19:52 jao Exp $
@node MIX and MIXAL tutorial, Getting started, Installing MDK, Top
@comment node-name, next, previous, up
@@ -23,7 +23,7 @@ on these topics, which will teach you the basics of the MIX architecture
and how to program a MIX computer using MIXAL.
@menu
-* The MIX computer:: Architecture and instruction set
+* The MIX computer:: Architecture and instruction set
of the MIX computer.
* MIXAL:: The MIX assembly language.
@end menu
@@ -36,8 +36,8 @@ In this section, you will find a description of the MIX computer,
its components and instruction set.
@menu
-* MIX architecture::
-* MIX instruction set::
+* MIX architecture::
+* MIX instruction set::
@end menu
@node MIX architecture, MIX instruction set, The MIX computer, The MIX computer
@@ -75,7 +75,7 @@ significant one. The sign is denoted by index 0. Graphically,
-----------------------------------------------
| 0 | 1 | 2 | 3 | 4 | 5 |
-----------------------------------------------
-| +/- | byte | byte | byte | byte | byte |
+| +/- | byte | byte | byte | byte | byte |
-----------------------------------------------
@end example
@noindent
@@ -142,7 +142,7 @@ Input-output block devices. Each device is labelled as @code{un}, where
@code{n} runs from 0 to 20. In Knuth's definition, @code{u0} through
@code{u7} are magnetic tape units, @code{u8} through @code{15} are disks
and drums, @code{u16} is a card reader, @code{u17} is a card writer,
-@code{u18} is
+@code{u18} is
a line printer and, @code{u19} is a typewriter terminal, and @code{u20},
a paper tape. Our implementation maps these devices to disk files,
except for @code{u19}, which represents the standard output.
@@ -165,7 +165,7 @@ following table:
@item 16 @tab O @tab 17 @tab P @tab 18 @tab Q @tab 19 @tab R
@item 20 @tab s @tab 21 @tab p @tab 22 @tab S @tab 23 @tab T
@item 24 @tab U @tab 25 @tab V @tab 26 @tab W @tab 27 @tab X
-@item 28 @tab Y @tab 29 @tab Z @tab 30 @tab 0 @tab 31 @tab 1
+@item 28 @tab Y @tab 29 @tab Z @tab 30 @tab 0 @tab 31 @tab 1
@item 32 @tab 2 @tab 33 @tab 3 @tab 34 @tab 4 @tab 35 @tab 5
@item 36 @tab 6 @tab 37 @tab 7 @tab 38 @tab 8 @tab 39 @tab 9
@item 40 @tab . @tab 41 @tab , @tab 42 @tab ( @tab 43 @tab )
@@ -204,18 +204,18 @@ remaininig subsections are devoted to describing the actual instructions
available to the MIX programmer.
@menu
-* Instruction structure::
-* Loading operators::
-* Storing operators::
-* Arithmetic operators::
-* Address transfer operators::
-* Comparison operators::
-* Jump operators::
-* Input-output operators::
-* Conversion operators::
-* Shift operators::
-* Miscellaneous operators::
-* Execution times::
+* Instruction structure::
+* Loading operators::
+* Storing operators::
+* Arithmetic operators::
+* Address transfer operators::
+* Comparison operators::
+* Jump operators::
+* Input-output operators::
+* Conversion operators::
+* Shift operators::
+* Miscellaneous operators::
+* Execution times::
@end menu
@node Instruction structure, Loading operators, MIX instruction set, MIX instruction set
@@ -251,12 +251,12 @@ or, graphically,
------------------------------------------------
| 0 | 1 | 2 | 3 | 4 | 5 |
------------------------------------------------
-| ADDRESS | INDEX | MOD | OPCODE |
+| ADDRESS | INDEX | MOD | OPCODE |
------------------------------------------------
@end example
For a given instruction, @samp{M} stands for
-the memory address obtained after indexing the ADDRESS subfield
+the memory address obtained after indexing the ADDRESS subfield
(using its INDEX byte), and @samp{V} is the contents of the
subfield indicated by MOD of the memory cell with address @samp{M}. For
instance, suppose that we have the following contents of MIX registers
@@ -286,10 +286,10 @@ V = [M](MOD) = (- 10 11 00 11 22)(1:3) = + 00 00 10 11 00
Note that, when computing @samp{V} using a word and an fspec, we apply
a left padding to the bytes selected by @samp{MOD} to obtain a
-complete word as the result.
+complete word as the result.
In the following subsections, we will
-assing to each MIX instruction a mnemonic, or symbolic name. For
+assign to each MIX instruction a mnemonic, or symbolic name. For
instance, the mnemonic of @samp{OPCODE} 10 is @samp{LD2}. Thus we can
rewrite the above instruction as
@@ -446,7 +446,7 @@ rX register and memory contents.
@ftable @code
@item ADD
-Add and set OV if overflow. OPCODE = 1, MOD = fspec.
+Add and set OV if overflow. OPCODE = 1, MOD = fspec.
@w{@code{rA <- rA +V}}.
@item SUB
Sub and set OV if overflow. OPCODE = 2, MOD = fspec.
@@ -506,7 +506,7 @@ Increase [rIi] by @samp{M}. OPCODE = 48 + i, MOD = 0. @code{rIi <- rIi + M}.
@item DECA
Decrease [rA] by @samp{M}. OPCODE = 48, MOD = 1. @code{rA <- rA - M}.
@item DECX
-Decrease [rX] by @samp{M}. OPCODE = 55, MOD = 0. @code{rX <- rX - M}.
+Decrease [rX] by @samp{M}. OPCODE = 55, MOD = 1. @code{rX <- rX - M}.
@item DECi
Decrease [rIi] by @samp{M}. OPCODE = 48 + i, MaOD = 0. @code{rIi <- rIi - M}.
@end ftable
@@ -628,7 +628,7 @@ using the following instructions:
@itemx JANZ
@itemx JANP
Jump if the content of rA is, respectively, negative, zero, positive,
-non-negative, non-zero or non-positive.
+non-negative, non-zero or non-positive.
OPCODE = 40, MOD = 0, 1, 2, 3, 4, 5.
@item JXN
@itemx JXZ
@@ -637,7 +637,7 @@ OPCODE = 40, MOD = 0, 1, 2, 3, 4, 5.
@itemx JXNZ
@itemx JXNP
Jump if the content of rX is, respectively, negative, zero, positive,
-non-negative, non-zero or non-positive.
+non-negative, non-zero or non-positive.
OPCODE = 47, MOD = 0, 1, 2, 3, 4, 5.
@item JiN
@itemx JiZ
@@ -646,7 +646,7 @@ OPCODE = 47, MOD = 0, 1, 2, 3, 4, 5.
@itemx JiNZ
@itemx JiNP
Jump if the content of rIi is, respectively, negative, zero, positive,
-non-negative, non-zero or non-positive.
+non-negative, non-zero or non-positive.
OPCODE = 40 + i, MOD = 0, 1, 2, 3, 4, 5.
@end ftable
@@ -817,13 +817,13 @@ arbitrary units) of the MIX instructions are given.
@item @code{DIV} @tab 12 @tab @code{NUM} @tab 10 @tab @code{CHAR}
@tab 10 @tab @code{HLT} @tab 10
@item @code{SLx} @tab 2 @tab @code{SRx} @tab 2 @tab @code{LDx}
-@tab 2 @tab @code{STx} @tab 2
+@tab 2 @tab @code{STx} @tab 2
@item @code{JBUS} @tab 1 @tab @code{IOC} @tab 1 @tab @code{IN}
@tab 1@tab @code{OUT} @tab 1
@item @code{JRED} @tab 1 @tab @code{Jx} @tab 1 @tab @code{INCx}
-@tab 1 @tab @code{DECx} @tab 1
+@tab 1 @tab @code{DECx} @tab 1
@item @code{ENTx} @tab 1 @tab @code{ENNx} @tab 1 @tab @code{CMPx}
-@tab 1 @tab @code{MOVE} @tab 1+2F
+@tab 1 @tab @code{MOVE} @tab 1+2F
@end multitable
In the above table, 'F' stands for the number of blocks to be moved
@@ -911,7 +911,7 @@ assembly pseudoinstruction (e.g. @code{ORG}, @code{EQU}),
is an expression evaluating to the address subfield of the instruction,
@item INDEX
is an expression evaluating to the index subfield of the instruction, which
-defaults to 0 (i.e., no use of indexing) and can only be used when
+defaults to 0 (i.e., no use of indexing) and can only be used when
@code{ADDRESS} is present,
@item MOD
is an expression evaluating to the mod subfield of the instruction. Its
@@ -993,7 +993,7 @@ The assembler will generate two binary instructions (@code{NOP} (@w{+ 00
addresses 2000 and 2001. Execution of the program will begin at address
2000. Every MIXAL program should also include a @code{HLT} instruction,
which will mark the end of program execution (but not of program
-compilation).
+compilation).
The @code{EQU} directive allows the definition of symbolic names for
specific values. For instance, we could rewrite the above program as
@@ -1030,7 +1030,7 @@ the assembler encounters the following code snippet
@end example
@noindent
it will assign to the memory cell number 1150 the contents @w{- 00 06 61
-11 49} (which corresponds to the decimal value -1823473).
+11 49} (which corresponds to the decimal value -1823473).
Finally, the @code{ALF} directive let's you specify the memory contents
as a set of five (quoted) characters, which are translated by the
@@ -1109,7 +1109,7 @@ to the same, multiplied by 64 to the fifth power) divided by
18-8*3 = 30
14/3 = 4
1+3:11 = 4:11 = 43
-1//64 = (01 00 00 00 00)/(00 00 00 01 00) = (01 00 00 00 00)
+1//64 = (01 00 00 00 00 00)/(00 00 00 01 00) = (01 00 00 00 00)
@end example
@noindent
Note that all MIXAL expressions evaluate to a MIX word (by definition).
@@ -1120,7 +1120,7 @@ an unary operator) in the @code{ADDRESS} part of a MIXAL instruction,
e.g.
@example
-* OK: stand alone future reference
+* OK: stand alone future reference
STA -S1(1:5)
* ERROR: future reference in expression
LDX 2-S1
@@ -1250,7 +1250,7 @@ thank Philip E. King for pointing these two special cases of local
symbol usage to him.},
@example
- ORIG 1999
+ ORIG 1999
ST NOP
3H CON 10
ENT1 *
@@ -1292,7 +1292,7 @@ equivalent to the following:
L EQU 5
LDA a
@dots{}
-a CON 20-L
+a CON 20-L
END start
@end example