summaryrefslogtreecommitdiffhomepage
path: root/doc/mdk_gstart.texi
diff options
context:
space:
mode:
Diffstat (limited to 'doc/mdk_gstart.texi')
-rw-r--r--doc/mdk_gstart.texi53
1 files changed, 35 insertions, 18 deletions
diff --git a/doc/mdk_gstart.texi b/doc/mdk_gstart.texi
index c9b936b..f04e5c1 100644
--- a/doc/mdk_gstart.texi
+++ b/doc/mdk_gstart.texi
@@ -1,10 +1,10 @@
@c -*-texinfo-*-
@c This is part of the GNU MDK Reference Manual.
-@c Copyright (C) 2000, 2001
+@c Copyright (C) 2000, 2001, 2002
@c Free Software Foundation, Inc.
@c See the file mdk.texi for copying conditions.
-@c $Id: mdk_gstart.texi,v 1.12 2002/03/19 22:38:13 jao Exp $
+@c $Id: mdk_gstart.texi,v 1.13 2002/04/08 00:26:38 jao Exp $
@node Getting started, mixvm.el, MIX and MIXAL tutorial, Top
@chapter Getting started
@@ -72,8 +72,11 @@ column in its line, for the first whitespace in the line maks the
beginning of the second field),
@item
an operation mnemonic, which can represent either a MIX instruction
-(@code{OUT} and @code{HLT} in lines 6 and 7 above), or an assembly
-pseudoinstruction.
+(@code{OUT} and @code{HLT} in lines 7 and 8 above), or an assembly
+pseudoinstruction (e.g., the @code{ORIG} pseudoinstruction in line
+6@footnote{If an @code{ORIG} directive is not used, the program will
+be loaded by the virtual machine at address 0. @code{ORIG} allows
+allocating the executable code where you see fit.}.
@item
an optional operand for the (pseudo)instruction, and
@item
@@ -88,10 +91,12 @@ the operand always starts at a fixed column number, and the use of
quotation is therefore unnecessary. As @code{mixasm} releases this
requirement, marking the beginning and end of the @code{ALF} operand
disambiguates the parser's recognition of this operand when it includes
-blanks}.
+blanks. Note that double-quotes (") are not part of the MIX character
+set, and, therefore, no escape characters are needed within
+@code{ALF}'s operands.}.
The workings of this sample program should be straightforward if you are
-familiar with MIXAL. See TAOCP vol. 1 for a thorought definition or
+familiar with MIXAL. See TAOCP vol. 1 for a thorough definition or
@ref{MIX and MIXAL tutorial}, for a tutorial.
@node Compiling, Running the program, Writing a source file, Getting started
@@ -120,7 +125,7 @@ If the source file contains no errors, this will produce a binary file
called @file{hello.mix} which can be loaded and run by the MIX virtual
machine. The @code{-g} flag tells the assembler to include debug
information in the executable file (for a complete description of all
-the compilation options, see @ref{mixasm}.) Now, your are ready to run
+the compilation options, see @ref{mixasm}). Now, your are ready to run
your first MIX program, as described in the following section.
@@ -154,12 +159,12 @@ Using the MIX simulators, you can run your MIXAL programs, after
compiling them with @code{mixasm} into binary @file{.mix}
files. @code{mixvm} can be used either in @dfn{interactive} or
@dfn{non-interactive} mode. In the second case, @code{mixvm} will load
-your program into memory, execute it (producing any output due to MIXAL
-@code{OUT} instructions present in the program), and exit when it
-encounters a @code{HLT} instruction. In interactive mode, you will enter
-a shell prompt which allows you issuing commands to the running virtual
-machine. This commands will permit you loading, running and debugging
-programs, as well as inspecting the MIX computer state (register
+your program into memory, execute it (producing any output due to
+MIXAL @code{OUT} instructions present in the program), and exit when
+it encounters a @code{HLT} instruction. In interactive mode, you will
+enter a shell prompt which allows you issuing commands to the running
+virtual machine. This commands will permit you to load, run and debug
+programs, as well as to inspect the MIX computer state (register
contents, memory cells contents and so on).
@menu
@@ -184,7 +189,6 @@ mixvm -r hello @key{RET}
@example
MIXAL HELLO WORLD
-** Execution time: 11
@end example
@noindent Since our hello world program uses MIX's device number 19 as
@@ -196,10 +200,24 @@ and written its output there@footnote{The device files are stored, by
default, in a directory called @file{.mdk}, which is created in your
home directory the first time @code{mixvm} is run. You can change this
default directory using the command @code{devdir} when running
-@code{mixvm} in interactive mode (@pxref{Configuration commands})}. Note
-also that the virtual machine reports the execution time of the program,
+@code{mixvm} in interactive mode (@pxref{Configuration commands})}.
+
+The virtual machine can also report the execution time of the program,
according to the (virtual) time spent in each of the binary instructions
-(@pxref{Execution times}).
+(@pxref{Execution times}). Printing of execution time statistics is
+activated with the @code{-t} flag; running
+
+@example
+mixvm -t -r hello @key{RET}
+@end example
+
+@noindent
+produces the following output:
+
+@example
+MIXAL HELLO WORLD
+** Execution time: 11
+@end example
Sometimes, you will prefer to store the results of your program in MIX
registers rather than writing them to a device. In such cases,
@@ -216,7 +234,6 @@ mixvm -d -r hello
@example
MIXAL HELLO WORLD
-** Execution time: 11
rA: + 00 00 00 00 00 (0000000000)
rX: + 00 00 00 00 00 (0000000000)
rJ: + 00 00 (0000)