Mmixware a RISC Computer for the Third Millennium Reihe: Lecture Notes in Computer Science

Total Page:16

File Type:pdf, Size:1020Kb

Mmixware a RISC Computer for the Third Millennium Reihe: Lecture Notes in Computer Science springer.com Donald E. Knuth MMIXware A RISC Computer for the Third Millennium Reihe: Lecture Notes in Computer Science MMIX is a RISC computer designed by Don Knuth to illustrate machine-level aspects of programming. In the author's book series "The Art of Computer Programming", MMIX replaces the 1960s-style machine MIX. A particular goal in the design of MMIX was to keep its machine language simple, elegant, and easy to learn. At the same time, all of the complexities needed to achieve high performance in practice are taken into account. This book constitutes a collection of programs written in CWEB that make MMIX a virtual reality. Among other utilities, an assembler converting MMIX symbolic files to MMIX objects and two simulators executing the programs in given object files are provided. The latest version of all programs can be downloaded from MMIX's home page. The book provides a complete documentation of the MMIX computer and its assembly language. It also presents mini-indexes, which make the programs much easier to understand. A corrected reprint of the book has been published in 1999, X, 550 p. August 2014, replacing the version of 1999. Gedrucktes Buch Softcover 79,99 € | £69.99 | $99.99 [1]85,59 € (D) | 87,99 € (A) | CHF 94,50 eBook 67,40 € | £55.99 | $79.99 [2]67,40 € (D) | 67,40 € (A) | CHF 75,50 Erhältlich bei Ihrer Bibliothek oder springer.com/shop MyCopy [3] Printed eBook for just € | $ 24.99 springer.com/mycopy Erhältlich bei Ihrem Buchhändler oder – Springer Nature Customer Service Center GmbH, Haberstrasse 7, 69126 Heidelberg, Germany / Call: + 49 (0) 6221-345-4301 / Fax: +49 (0)6221-345-4229 / Email: [email protected] / Web: springer.com [1] € (D) sind gebundene Ladenpreise in Deutschland und enthalten 7% MwSt; € (A) sind gebundene Ladenpreise in Österreich und enthalten 10% MwSt. CHF und die mit [2] gekennzeichneten Preise für elektronische Produkte sind unverbindliche Preisempfehlungen und enthalten die landesübliche MwSt. Programm- und Preisänderungen (auch bei Irrtümern) vorbehalten. Es gelten unsere Allgemeinen Liefer- und Zahlungsbedingungen. Springer-Verlag GmbH, Handelsregistersitz: Berlin-Charlottenburg, HR B 91022. Geschäftsführung: Haank, Mos, Hendriks Part of .
Recommended publications
  • Knuthweb.Pdf
    Literate Programming Donald E. Knuth Computer Science Department, Stanford University, Stanford, CA 94305, USA The author and his associates have been experimenting for the past several years with a program- ming language and documentation system called WEB. This paper presents WEB by example, and discusses why the new system appears to be an improvement over previous ones. I would ordinarily have assigned to student research A. INTRODUCTION assistants; and why? Because it seems to me that at last I’m able to write programs as they should be written. The past ten years have witnessed substantial improve- My programs are not only explained better than ever ments in programming methodology. This advance, before; they also are better programs, because the new carried out under the banner of “structured program- methodology encourages me to do a better job. For ming,” has led to programs that are more reliable and these reasons I am compelled to write this paper, in easier to comprehend; yet the results are not entirely hopes that my experiences will prove to be relevant to satisfactory. My purpose in the present paper is to others. propose another motto that may be appropriate for the I must confess that there may also be a bit of mal- next decade, as we attempt to make further progress ice in my choice of a title. During the 1970s I was in the state of the art. I believe that the time is ripe coerced like everybody else into adopting the ideas of for significantly better documentation of programs, and structured programming, because I couldn’t bear to be that we can best achieve this by considering programs found guilty of writing unstructured programs.
    [Show full text]
  • Typeset MMIX Programs with TEX Udo Wermuth Abstract a TEX Macro
    TUGboat, Volume 35 (2014), No. 3 297 Typeset MMIX programs with TEX Example: In section 9 the lines \See also sec- tion 10." and \This code is used in section 24." are given. Udo Wermuth No such line appears in section 10 as it only ex- tends the replacement code of section 9. (Note that Abstract section 10 has in its headline the number 9.) In section 24 the reference to section 9 stands for all of ATEX macro package is presented as a literate pro- the eight code lines stated in sections 9 and 10. gram. It can be included in programs written in the If a section is not used in any other section then languages MMIX or MMIXAL without affecting the it is a root and during the extraction of the code a assembler. Such an instrumented file can be pro- file is created that has the name of the root. This file cessed by TEX to get nicely formatted output. Only collects all the code in the sequence of the referenced a new first line and a new last line must be entered. sections from the code part. The collection process And for each end-of-line comment a flag is set to for all root sections is called tangle. A second pro- indicate that the comment is written in TEX. cess is called weave. It outputs the documentation and the code parts as a TEX document. How to read the following program Example: The following program has only one The text that starts in the next chapter is a literate root that is defined in section 4 with the headline program [2, 1] written in a style similar to noweb [7].
    [Show full text]
  • Miktex Manual Revision 2.0 (Miktex 2.0) December 2000
    MiKTEX Manual Revision 2.0 (MiKTEX 2.0) December 2000 Christian Schenk <[email protected]> Copyright c 2000 Christian Schenk Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies. Permission is granted to copy and distribute modified versions of this manual under the con- ditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one. Permission is granted to copy and distribute translations of this manual into another lan- guage, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by the Free Software Foundation. Chapter 1: What is MiKTEX? 1 1 What is MiKTEX? 1.1 MiKTEX Features MiKTEX is a TEX distribution for Windows (95/98/NT/2000). Its main features include: • Native Windows implementation with support for long file names. • On-the-fly generation of missing fonts. • TDS (TEX directory structure) compliant. • Open Source. • Advanced TEX compiler features: -TEX can insert source file information (aka source specials) into the DVI file. This feature improves Editor/Previewer interaction. -TEX is able to read compressed (gzipped) input files. - The input encoding can be changed via TCX tables. • Previewer features: - Supports graphics (PostScript, BMP, WMF, TPIC, . .) - Supports colored text (through color specials) - Supports PostScript fonts - Supports TrueType fonts - Understands HyperTEX(html:) specials - Understands source (src:) specials - Customizable magnifying glasses • MiKTEX is network friendly: - integrates into a heterogeneous TEX environment - supports UNC file names - supports multiple TEXMF directory trees - uses a file name database for efficient file access - Setup Wizard can be run unattended The MiKTEX distribution consists of the following components: • TEX: The traditional TEX compiler.
    [Show full text]
  • Programming Technologies for the Development of Web-Based Platform for Digital Psychological Tools
    (IJACSA) International Journal of Advanced Computer Science and Applications, Vol. 9, No. 8, 2018 Programming Technologies for the Development of Web-Based Platform for Digital Psychological Tools Evgeny Nikulchev1, Dmitry Ilin2 Pavel Kolyasnikov3 Ilya Zakharov5, Sergey Malykh6 4 MIREA – Russian Technological Vladimir Belov Psychological Institute of Russian University & Russian Academy Russian Academy Science Academy of Education Science, Moscow, Russia Moscow, Russia Moscow, Russia Abstract—The choice of the tools and programming In addition, large accumulated data sets can become the technologies for information systems creation is relevant. For basis for machine learning mechanisms and other approaches every projected system, it is necessary to define a number of using artificial intelligence. Accumulation of data from criteria for development environment, used libraries and population studies into a single system can allow a technologies. The paper describes the choice of technological breakthrough in the development of systems for automated solutions using the example of the developed web-based platform intellectual analysis of behavior data. of the Russian Academy of Education. This platform is used to provide information support for the activities of psychologists in The issue of selecting methodological tools for online and their research (including population and longitudinal offline research includes several items. researches). There are following system features: large scale and significant amount of developing time that needs implementation First, any selection presupposes the existence of generally and ensuring the guaranteed computing reliability of a wide well-defined criteria, on the basis of which a decision can be range of digital tools used in psychological research; ensuring made to include or not to include techniques in the final functioning in different environments when conducting mass toolkit.
    [Show full text]
  • The LATEX Web Companion
    The LATEX Web Companion Integrating TEX, HTML, and XML Michel Goossens CERN Geneva, Switzerland Sebastian Rahtz Elsevier Science Ltd., Oxford, United Kingdom with Eitan M. Gurari, Ross Moore, and Robert S. Sutor Ä yv ADDISON—WESLEY Boston • San Francisco • New York • Toronto • Montreal London • Munich • Paris • Madrid Capetown • Sydney • Tokyo • Singapore • Mexico City Contents List of Figures xi List of Tables xv Preface xvii 1 The Web, its documents, and D-ItX 1 1.1 The Web, a window an die Internet 3 1.1.1 The Hypertext Transport Protocol 4 1.1.2 Universal Resource Locators and Identifiers 5 1.1.3 The Hypertext Markup Language 6 1.2 BTEX in die Web environment 11 1.2.1 Overview of document formats and strategies 12 1.2.2 Staying with DVI 14 1.2.3 PDF for typographic quality 15 1.2.4 Down-translation to HTML 16 1.2.5 Java and browser plug-ins 20 1.2.6 Other L4TEX-related approaches to the Web 21 1.3 Is there an optimal approach? 23 1.4 Conclusion 24 2 Portable Document Format 25 2.1 What is PDF? 26 2.2 Generating PDF from TEX 27 2.2.1 Creating and manipulating PDF 28 vi Contents 2.2.2 Setting up fonts 29 2.2.3 Adding value to your PDF 33 2.3 Rich PDF with I4TEX: The hyperref package 35 2.3.1 Implicit behavior of hyperref 36 2.3.2 Configuring hyperref 38 2.3.3 Additional user macros for hyperlinks 45 2.3.4 Acrobat-specific commands 47 2.3.5 Special support for other packages 49 2.3.6 Creating PDF and HTML forms 50 2.3.7 Designing PDF documents for the screen 59 2.3.8 Catalog of package options 62 2.4 Generating
    [Show full text]
  • Implementation of a MIX Emulator: a Case Study of the Scala Programming Language Facilities
    ISSN 2255-8691 (online) Applied Computer Systems ISSN 2255-8683 (print) December 2017, vol. 22, pp. 47–53 doi: 10.1515/acss-2017-0017 https://www.degruyter.com/view/j/acss Implementation of a MIX Emulator: A Case Study of the Scala Programming Language Facilities Ruslan Batdalov1, Oksana Ņikiforova2 1, 2 Riga Technical University, Latvia Abstract – Implementation of an emulator of MIX, a mythical synchronous manner, possible errors in a program may remain computer invented by Donald Knuth, is used as a case study of unnoticed. In the authors’ opinion, these checks are useful in the features of the Scala programming language. The developed mastering how to write correct programs because similar emulator provides rich opportunities for program debugging, such as tracking intermediate steps of program execution, an errors often occur in a modern program despite all changes in opportunity to run a program in the binary or the decimal mode hardware and software technologies. Therefore, it would be of MIX, verification of correct synchronisation of input/output helpful if an emulator supported running programs in different operations. Such Scala features as cross-compilation, family modes and allowed checking that the execution result was the polymorphism and support for immutable data structures have same in all cases. proved to be useful for implementation of the emulator. The The programming language chosen by the authors for the authors of the paper also propose some improvements to these features: flexible definition of family-polymorphic types, implementation of an emulator supporting these features is integration of family polymorphism with generics, establishing Scala. This choice is arbitrary to some extent and rather full equivalence between mutating operations on mutable data dictated by the authors’ interest in the features of this types and copy-and-modify operations on immutable data types.
    [Show full text]
  • Computer Modern Faces 2
    Computer Modern Faces 2 COMPUTER MODERN POSTSCRIPT FONTS The Computer Modern typefaces were created in the spirit of the typeface Monotype Modern 8A by Professor Donald E. Knuth of Stanford University. The Computer Modern family includes a large set of scientific and mathematical figures and symbols and is widely used with implementations of the TEX typesetting system. Computer Modern Typefaces, Volume E of Computers and Typesetting (D. E. Knuth, Addison Wesley), is the definitive source for the Computer Modern faces. The TEXbook (D. E. Knuth, Addison Wesley), Appendix F, is also a good reference. This package contains 75 faces from the Computer Modern family in Adobe PostScript Type 1 form. These fonts can be used with all PostScript printers and Adobe Type Manager. FONT SAMPLES, TEXT FACES CM Bold: cmb10 Γ∆ΘΛΞΠΣΥΦΨΩfffiflffifflı`´ˇ˘¯˚¸ßæœøÆŒØ !”#$%&’()*+,-./012345 6789:;¡=¿?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[“]ˆ˙‘abcdefghijkl mnopqrstuvwxyz–—˝˜¨ My beautiful new watch had run eighteen months without losing or gaining, and without breaking any part of its machinery or stopping. I had come to CM Bold Extended: cmbx5, cmbx6, cmbx7, cmbx8, cmbx9, cmbx10, cmbx12 Γ∆ΘΛΞΠΣΥΦΨΩfffiflffifflı`´ˇ˘¯˚¸ßæœøÆŒØ !”#$%&’()*+,-. /0123456789:;¡=¿?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[“ ]ˆ˙‘abcdefghijklmnopqrstuvwxyz–—˝˜¨ cmbx5: believe it infallible in its judgments about the time of day, and to consider its constitution and its anatomy imperishable. But at last, one night, I let it run down. I grieved about it as if it were a cmbx6: recognized messenger and forerunner of calamity. But by and by I cheered up, set the watch by guess, and commanded my bodings and superstitions to depart. Next day I stepped into cmbx7: the chief jeweler’s to set it by the exact time, and the head of the establishment took it out of my hand and proceeded to set it for me.
    [Show full text]
  • LATEX – a Complete Setup for Windows Joachim Schlosser
    LATEX – a complete setup for Windows Joachim Schlosser May 9, 2012 http://www.latexbuch.de/install-latex-windows-7/ To use LATEX is one thing, and very good introductions exist for learning. But what do you need for installing a LATEX system on Windows? What do I do with MiKTEX, why do I need Ghostscript, what’s TeXmaker, and why many people favor Emacs, and above all, how does everything fit together? This tutorial shall save the search an show step by step what you need and how to setup the individual components. I am always happy about suggestions and notes on possible errors. When reporting by mail, please always include the version number: Revision: 1643 Date: 2012-05-09 08:20:17 +0100 (We, 09 May 2012) Many thanks to a number of readers for suggestions and corrections. The correct addresses for this document are: • http://www.latexbuch.de/files/latexsystem-en.pdf for the PDF version and • http://www.latexbuch.de/install-latex-windows-7/ for the HTML-page. The German version is available via http://www.latexbuch.de/latex-windows-7-installieren/ 1 Contents 1 Everyone can set up LATEX 2 3.5 File Types Setup 7 2 What do you need at all? 3 3.6 Remedy if you have Admin Rights 8 3 Installation and Configuration 5 3.7 Install TeX4ht and Im- 3.1 Download and install ageMagick 8 MiKTEX 5 4 And now? Usage 9 3.2 Graphics Preparation and Conversion 5 5 If something fails 10 3.3 Configure Texmaker 6 6 Prospect 10 3.4 Configure Emacs 6 1 Everyone can set up LATEX LATEX is not just a program but a language and a methodology of describing documents and gets used via a LATEX system.
    [Show full text]
  • Installing Miktex on Windows
    Setting Up MiKTeX 2.8 on Windows Lim Lian Tze 1. Downloading and Installing MiKTeX 2.8 1. Download the Basic MiKTeX 2.8 Installer (101:62 MB) from http://miktex.org/2.8/setup. 2. Launch the installer, using the screen captures (Figures 1–6) as a guide for the settings. 3. Exit the installer when the installation progress has completed (Figures 7 and 8). Figure 1: Review and Accept the T&C. Figure 2: Install MiKTeX for all users. Figure 3: Select the installation path. Accept the default Figure 4: Set preferred paper size to A4 and “Ask me location. first” to install packages on-the-fly. 1 Figure 5: Review the installation settings. Click Start Figure 6: Let the installation proceed. This will take a if all looks well. few to 10 minutes. Figure 7: You’ll know the installation has completed when the progress bars are blank, and the Figure 8: You may now exit the installer. Next > button becomes clickable. 2. Configuring the Remote Package Repository MiKTeX can automatically download and install missing LATEX packages from remote package repositories on the Web. You can select a particular repository to download from. 1. Open MiKTeX’s Settings via Windows Start> All Programs > MiKTeX 2.8 > Maintenance (Admin) > Settings (Admin). 2. Click on the Packages tab, as shown in Figure 9. 3. Now click the Change. button under Package repository. 4. Select Packages should be installed from the Internet (Figure 10). 5. Choose a repository (Figure 11), preferably one in Malaysia, Singapore or Indonesia. (From my experience, if no mirror server from these countries is available, the Japanese mirrors offers a good speed, too.) 6.
    [Show full text]
  • Emacs' Web-Mode
    AUser’sManualfor GNU Emacs’ Web-mode Mark Motl & Bart Childs Department of Computer Science TEXas A&M University Revision 2.00, April 17, 1993 This document is a companion to web-mode.el, a collection of GNU Emacs Lisp functions designed to customize GNU Emacs so that it is sensitive to a WEB document. Appendix A contains lists of the interactive functions in two formats. Most of these have convenient key-bindings. It is assumed that the reader is already familiar with the WEB style of literate programming, the general format of a WEB source, and the rules of WEB, FWEB, CWEB,orasimilarone. The intent in the design of web-mode is sensitivity to WEB independent of the high level language. Thus, it works with Knuth’s original WEB with Pascal, CWEB, FWEB, and similar ones. The basic Emacs functionality is maintained along with showing matched delimiters and continuing indentation. The functions that web-mode provides include: the indices of variables and sec- tions provided by WEAVE, outline editing, navigation by chapter and section, preload- ing the search string when using indices, automatic completition in some places, ... Throughout this document, I will use the symbology used by Emacs. For example, the find-file command can be entered two different ways M-x find-file C-x C-f The first way of entering the command is to actually type the command as shown above. Press the META key (on some terminals this may be the ESC key); next press the x key; finally, enter the characters find-file followed by a carriage return.
    [Show full text]
  • Literate Programming, a Practioner's View
    Literate Programming, A Practioner’s View Bart Childs Texas A&M University Department of Computer Science College Station, TX 77843-3112 Phone (409) 845-5470; FAX (409) 847-8578 Internet: [email protected] Abstract I have been using the WEB style of Literate Programming since my first efforts to port TEX to the Data General AOS system. When I looked back at those efforts, the work in porting drivers that were not written in WEB and the writing of drivers in WEB (based upon DVITYPE, of course), the value of this method of programming became evident. I have concentrated my research (and some teaching) efforts upon this style of programming. I will relate my insights and opinions of the following: some quantitative and qualitative measures of the value of WEB programming; a description of some tools that are part of an environment for writing and maintaining literate programs; literate programming environments that are alternatives to the WEB style; an annotated list of some literate programming systems; and I will conclude with my perception of the future of literate programming. Introduction A Definition Donald Knuth created the WEB system of literate I use the following list of requirements to imply a programming when he wrote the TEX typesetting definition of a literate program and the minimum system a second time (see “The WEB system set of tools which are needed to prepare, use, and of structured documentation”, 1983; “Literate study the resulting code. programming”, 1984; TEX: The Program, 1986; • The high-level language code and the system METAFONT WEB and :TheProgram).
    [Show full text]
  • The TEX Tuneup of 2021 Donald Knuth This Is the Promised Sequel to Previous Reports from 2008 [3] and 2014 [4]. Once Again
    TUGboat, Volume 42 (2021), No. 1 7 The TEX tuneup of 2021 found that TEX’s exit-and-edit option — typing ‘E’ in response to an error prompt—was sometimes of- Donald Knuth fered when it shouldn’t have been, at times when an This is the promised sequel to previous reports from input file wasn’t actively being read. 2008 [3] and 2014 [4]. Once again I’m immensely Both of those bugs could crash the system. So grateful to everybody who contributed potential er- those two doors are now closed. rata to the “core” of TEX and METAFONT, and to Another strange interaction had been noticed in the wonderful team of experts — led this time by 2017 by Udo Wermuth, who found that TEX could Karl Berry — who checked their input carefully and mysteriously seem to stop dead in its tracks while filtered it down to a list of issues that definitely de- \tracingparagraphs was active. (The reason was manded attention. According to our longstanding that TEX had found and reported an error, which plan, I received that list on 31 December 2020. went into the transcript file. TEX was silently wait- Karl will write separately about his role as a ing for Udo to respond to that message, not realizing meta-filter. Let me just remark that, when I did that messages are not echoed to the user’s terminal the previous round of maintenance seven years ago, while paragraphs are being traced.) In the future, I had to deal with “more than two dozen potentially TEX will not remain silent; the user will see the error troublesome topics” [4].
    [Show full text]