Universal Machine (ICFP programming contest 2006)
The Universal Machine was a virtual machine which participants in the ICFP programming contest of 2006 (Cult of the Bound Variable) needed to implement as the first step in a complicated series of programming achievements, each of which unlocked clues about how to proceed from there. This implementation was needed to run programs provided to the participants in .um and .umz files (the latter being self-extracting archives which expanded upon execution in the virtual machine). A detailed spec was given. The machine supposedly duplicated an ancient computing device that operated with sandstone tablets thousands of years ago in ancient Pittsburgh. The contest was hosted by Carnegie Mellon Unversity in Pittsburgh, but participants could be anywhere in the world, submitting their results electronically. The contest is long-finished now, but the materials are still available for anybody who wants to try to solve it.
The Universal Machine is a Turing-complete device that stores 32-bit values on a series of platters, some of which are designated as registers, some as program memory, and some as data storage. Input and output to the outside world is done a single 8-bit character at a time.
Because it is a 32-bit machine, the files for it consist of sequences of 32-bit (4-byte) values, stored in big-endian fashion. The machine specs designate which bits of a value correspond to program instructions and which are data values or register references that the instruction operates on, for values that are part of a program.
At some point upon correctly implementing the virtual machine and executing the provided program file on it, you'll be asked for a decryption key; during the contest separate keys were assigned to each team, but for the public use of the files now you are supposed to use
If everything goes well, you'll end up in a Unix-ish command line shell with access to a filesystem that includes a program in a variety of BASIC that uses only Roman numerals, which needs to be debugged (among other issues, you need to make sure it never produces a value of zero, since there is no Roman numeral for it and thus the program crashes with an error). Solving this will point you to the next task.