In this section, we shall give several more examples of
MMIX programs, and at the same time introduce some important properties of permutations. These investigations will also bring out some interesting aspects of computer programming in general.
MMIX program. To implement this algorithm for
MMIX, the “tagging” can be done by using the sign bit of a
BYTE. Suppose our input is an ASCII text file, with characters in the range 0 to #
7F, where each character is either (a) ’
(’, representing the left parenthesis beginning a cycle; (b)
’)’, representing the right parenthesis ending a cycle; (c) an ignorable formatting character in the range 0 to #
20; or (d) anything else, representing ...