
This page describes an extension of MMIX that has an integrated black and white Video display.
Last update: Nov. 16, 2000: slight performance improvement.
This program works only on Win32 systems. My implementation has been compiled with the cygwin environment.
MMIX-Memory starting from address #5000000000000000 is devoted to Video RAM which gets mapped to a separate window with320*240 Pixels during simulation. Origin is in the upper left corner as usual and the y-axis is oriented downwards. Memory is mapped to the display in big-endian format, i. e. the least significant bit of the byte (or Octa) at address #5000000000000000 appears at coordinate (0,0). Consecutive Octas are mapped to the display line by line.
To draw the pixel at coordinate (x, y), the bit at position x mod 8 of byte y*40 + x div 8 has to be set to one.
The simulation is quite slow, since the complete video-memory is mapped after each write-access to it. However, I'm glad for any suggetions for improvement.
The mmixwin program can either be started from the command-line (which does not work with the bash of cygwin on my computer) with the command line arguments as usual, or it can be started without arguments, e.g. by double-clicking it from a file manager. In the latter case, a file open dialog appears for selection of the mmo-file to simulate and then a dialog comes up for setting some options. However, the options dialog is not yet completely implemented. Especially arguments to the MMIX program itself cannot yet be provided :-(
The downloadable zip-file contains:
| mmix-sim.ch | The change file to mmix-sim.w |
| mmixwin.exe | Executable compiled using cygwin gcc |
| mmixwin.res | Compiled resource file |
| mmixwin.rc | Resource description |
| resource.c | Header for resources |
| win32typ.w | Defines Windows data types for ctangle |
| circle.mms | Demo program that draws the circle |
| circle.mmo | Assembled demo program |
Using cygwin, the following line should be used (or integrated into the makefile...):
gcc -s -mwindows mmixwin.res -mno-cygwin
mmix-arith.c mmix-io.c mmix-sim.c -e _mainCRTStartup -o mmixwin.exe -lmsvcrt
-static
Note that the resource file mmixwin.res has to be linked as well. The resource
file has to be compiled as follows:
windres mmixwin.rc -O coff -o mmixwin.res
For correstions, suggestions or comments please reply to a.boettcher@informatik.fh-muenchen.de