Jmmix
A simulator for the MMIX processor
Install / Use
/learn @dbroeglin/JmmixREADME
Java MMIX Interpreter
Disclaimer
This interpreter was written as an exercise to better understand the MMIX processor and its instruction set. Use at your own peril! ;-)
Currently the simulator is in a kind of "tracing bullet" state where it is able to load and execute very simple programs. I will continue working on it as time allows. The memory sub-system seems complete, the processor is a work in progress.
Although this is not exactly a Java port of Knuth's MMIX simulator, I liberally read his C code and based this work on it. Any good idea in this code is to be attributed to the original implementation, whereas all bugs and mistakes are solely mine.
References
- MMIX documentation: http://mmix.cs.hm.edu/doc/index.html
- MMIX opcodes: http://mmix.cs.hm.edu/doc/opcodes.html
- Knuth's MMIX simulator documentation: http://mmix.cs.hm.edu/doc/mmix-sim.pdf
Running
To run the simulator:
java -jar jmmix.jar <mmo file>
or you can simply execute the unit tests (mmixal needs to be in the PATH for the
tests to run).
Running the simulator with logging:
java -Djava.util.logging.config.file=src/test/resources/logging.properties -jar jmmix.jar <mmo file>
Testing
To run the tests:
mvn test
The tests must be run under a system that has bash, mmixand mmixal in
the PATH.
Useful commands
To inspect the content of MMO files:
hexdump -e '1/1 "%03_ad |"' -e '4/1 " %02X" " | "' -e '4/1 "%_p" "\n"' -v <mmo file>
Reading an MMO as a series of long to cut and past into LoaderTest:
hexdump -e '1/1 "0x"' -e '4/1 "%02X" "l,\n"' -v
Know issues
- rL and the register stack are not implemented yet
- rA is not fully implemented yet
Related Skills
node-connect
352.9kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
111.5kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
352.9kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
352.9kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
