Skip to main content

MMIX-SIM

  • Chapter
Book cover MMIXware

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 1750))

  • 1024 Accesses

Abstract

This program simulates a simplified version of the MMIX computer. Its main goal is to help people create and test MMIX programs for The Art of Computer Programming and related publications. It provides only a rudimentary terminal-oriented interface, but it has enough infrastructure to support a cool graphical user interface — which could be added by a motivated reader. (Hint, hint.)

MMIX is simplified in the following ways:

  • There is no pipeline, and there are no caches. Thus, commands like SYNC and SYNCD and PREGO do nothing.

  • Simulation applies only to user programs, not to an operating system kernel. Thus, all addresses must be nonnegative; “privileged” commands such as PUT rK,z or RESUME 1 or LDVTS x,y,z are not allowed; instructions should be executed only from addresses in segment 0 (addresses less than #2000000000000000). Certain special registers remain constant: rF = 0, rK = #ffffffffffffffff, rQ = 0; rT = #8000000500000000, rTT= #8000000600000000, rV=#369c200400000000.

  • No trap interrupts are implemented, except for a few special cases of TRAP that provide rudimentary input-output.

  • All instructions take a fixed amount of time, given by the rough estimates stated in the MMIX documentation. For example, MUL takes 10ν, LDB takes μ + ν; all times are expressed in terms of μ and ν, “mems” and “oops.” The simulated clock increases by 232 for each μ and 1 for each ν. But the interval counter rI decreases by 1 for each ν; and the usage count field of rU may increase by 1 (modulo 247) for each instruction.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 1999 Author and Springer-Verlag Berlin Heidelberg

About this chapter

Cite this chapter

Knuth, D.E. (1999). MMIX-SIM. In: MMIXware. Lecture Notes in Computer Science, vol 1750. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-46611-8_8

Download citation

  • DOI: https://doi.org/10.1007/3-540-46611-8_8

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-66938-8

  • Online ISBN: 978-3-540-46611-6

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics