アセンブリー言語でシミューレーターを作る

現在ヌース教授の「コンピュータープログラミングの技術」の部分を読んでいます。MMIXと言うコンピューターアーキテキチャーを提供してその機会に動くプログラムを作るためのアセンブリー言語も教えます。MMIX用のプログラムを別なシステムで試すためにMMIXのハードウェアーをソフトで実現する事が必要です。このプログラムがシミューレーターです。  In this text, the simulator is written in the same MMIX assembly language in order to illustrate the behavior of such features as: the hardware register stack, interrupt handling, use of long subroutines, and how interpreters function.
Aspects of program execution covered are:
1. memory address translation (simulated to actual)
2. simulation of global and local hardware registers in memory
3. Instruction fetch and decoding.
4. Register stack push/pop
Items 2 and 4 are redundant, but the register ring used for local registers seems to deserve separate mention.