diff options
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/mdk_mixvm.texi | 26 | 
1 files changed, 23 insertions, 3 deletions
diff --git a/doc/mdk_mixvm.texi b/doc/mdk_mixvm.texi index a60325e..890bb95 100644 --- a/doc/mdk_mixvm.texi +++ b/doc/mdk_mixvm.texi @@ -4,7 +4,7 @@  @c   Free Software Foundation, Inc.  @c See the file mdk.texi for copying conditions. -@c $Id: mdk_mixvm.texi,v 1.13 2004/06/07 00:00:12 jao Exp $ +@c $Id: mdk_mixvm.texi,v 1.14 2004/06/09 12:56:14 jao Exp $  @node mixvm, gmixvm, mixasm, Top  @comment  node-name,  next,  previous,  up @@ -760,7 +760,7 @@ The MIX computer comes equipped with a set of block devices for  input-output operations (@pxref{Input-output operators}). @code{mixvm}  implements these block devices as disk files, with the exception of  block device no. 19 (typewriter terminal) which is redirected to -standard output. When you request an output operation on any other +standard input/output. When you request an output operation on any other  (output) device, a file named according to the following table will be  created, and the specified MIX words will be  written to the file in binary form (for binary devices) or in ASCII (for @@ -779,7 +779,7 @@ directory @file{~/.mdk}; this location can be changed using the  @item Card reader @tab 16 @tab @file{cardrd.dev} @tab char in  @item Card writer @tab 17 @tab @file{cardwr.dev} @tab char out  @item Line printer @tab 18 @tab @file{printer.dev} @tab char out -@item Terminal @tab 19 @tab @code{stdout} @tab char out +@item Terminal @tab 19 @tab @code{stdout} @tab char in/out  @item Paper tape @tab 20 @tab @file{paper.dev} @tab char out  @end multitable @@ -792,3 +792,23 @@ manipulate char device files with any ASCII editor. In addition, the  reader is not case-sensitive, i.e., it automatically converts lowercase  letters to their uppercase counterparts (since the MIX character set  does not include the former). + +The typewriter (device no. 19) lets you use the standard input and +output in your MIXAL programs. For instance, here is a simple 'echo' +program: + +@example +* simple echo program +TERM    EQU     19          the typewriter device +BUF     EQU     500         input buffer +        ORIG    1000 +START   IN      BUF(TERM)   read a block (70 chars) +        OUT     BUF(TERM)   write the read chars +        HLT +        END     START +@end example + +@noindent Input lines longer than 70 characters (14 words) are trimmed. +On the other hand, if you type less than a block of characters, +whitespace (MIX character zero) is used as padding. +  | 
