Skip to content

theartofcomputerprogramming/mmixsamples

Repository files navigation

mmixsamples

Sample code in MMIX assembly language for the MMIX computer designed by Donald Knuth for The Art of Computer Programming books

Code

loadstore.mms: examples of load and store instructions - to aid section Loading and storing in 1.3.1', Description of MMIX, from Chapter 1, Basic Concepts, of Fascicle 1, MMIX, by Donald Knuth

arithmetic.mms: examples of arithmetic operators - to aid section Arithmetic operators in 1.3.1', Description of MMIX, from Chapter 1, Basic Concepts, of Fascicle 1, MMIX, by Donald Knuth

conditional.mms: examples of conditional instructions - to aid section Conditional instructions in 1.3.1', Description of MMIX, from Chapter 1, Basic Concepts, of Fascicle 1, MMIX, by Donald Knuth

bitbyte.mms: examples of bitwise and bytewise operations - to aid sections Bitwise operations and Bytewise operations in 1.3.1', Description of MMIX, from Chapter 1, Basic Concepts, of Fascicle 1, MMIX, by Donald Knuth

subroutine.mms: examples of subroutine calls - to aid section Subroutine calls in 1.3.1', Description of MMIX, from Chapter 1, Basic Concepts, of Fascicle 1, MMIX, by Donald Knuth

program_m_maximum.mms: annotated Program M in 1.3.1' Description of MMIX, from Chapter 1, Basic Concepts, of Fascicle 1, MMIX, by Donald Knuth

exercise_2.1.7.mms: exercise 2.1.7 in The MMIX Supplement

exercise_2.1.8.mms: exercise 2.1.8 in The MMIX Supplement

exercise_2.1.9.mms: exercise 2.1.9 in The MMIX Supplement

program_t_topological_sort.mms: annotated Program T (Topological sort) in 2.2.3 Linked Allocation, The MMIX Supplement, to accompany Chapter 2, Information Structures of TAOCP Volume 1, Fundamental Algorithms, by Donald Knuth

program_a_addition_of_polynomials.mms: annotated Program A (Addition of polynomials) in 2.2.4 Circular Lists, The MMIX Supplement, to accompany Chapter 2, Information Structures of TAOCP Volume 1, Fundamental Algorithms, by Donald Knuth

program_c_comparison_counting.mms: annotated Program C (Comparison counting) in 5.2 Internal sorting, The MMIX Supplement, to accompany Chapter 5, Sorting of TAOCP Volume 3, Sorting and Searching, by Donald Knuth

program_s_straight_insertion_sort.mms: annotated Program S (Straight insertion sort) in 5.2.1 Sorting by Insertion, The MMIX Supplement, to accompany Chapter 5, Sorting of TAOCP Volume 3, Sorting and Searching, by Donald Knuth

program_d_shellsort.mms: annotated Program D (Shellsort) in 5.2.1 Sorting by Insertion, The MMIX Supplement, to accompany Chapter 5, Sorting of TAOCP Volume 3, Sorting and Searching, by Donald Knuth

program_l_list_insertion.mms: annotated Program L (List insertion) in 5.2.1 Sorting by Insertion, The MMIX Supplement, to accompany Chapter 5, Sorting of TAOCP Volume 3, Sorting and Searching, by Donald Knuth

program_m_multiple_list_insertion.mms: annotated Program M (Multiple list insertion) in 5.2.1 Sorting by Insertion, The MMIX Supplement, to accompany Chapter 5, Sorting of TAOCP Volume 3, Sorting and Searching, by Donald Knuth

program_b_bubble_sort.mms: annotated Program B (Bubble sort) in 5.2.2 Sorting by Exchanging, The MMIX Supplement, to accompany Chapter 5, Sorting of TAOCP Volume 3, Sorting and Searching, by Donald Knuth

exercise_5.2.2.12.mms: annotated solution to exercise 5.2.2.12 implementing Algorithm M (Merge exchange) in 5.2.2 Sorting by Exchanging, The MMIX Supplement, to accompany Chapter 5, Sorting of TAOCP Volume 3, Sorting and Searching, by Donald Knuth

program_s_straight_selection_sort.mms: annotated Program S (Straight selection sort) in 5.2.3 Sorting by Selection, The MMIX Supplement, to accompany Chapter 5, Sorting of TAOCP Volume 3, Sorting and Searching, by Donald Knuth

exercise_5.2.2.12.mms: annotated solution to exercise 5.2.2.12 implementing Algorithm M (Merge exchange) in 5.2.2 Sorting by Exchanging, The MMIX Supplement, to accompany Chapter 5, Sorting of TAOCP Volume 3, Sorting and Searching, by Donald Knuth

program_s_straight_selection_sort.mms: annotated Program S (Straight selection sort) in 5.2.3 Sorting by Selection, The MMIX Supplement, to accompany Chapter 5, Sorting of TAOCP Volume 3, Sorting and Searching, by Donald Knuth

inout.mms: annotated program for decoding problem in 1.4.2' Coroutines, from Chapter 1, Basic Concepts, of Fascicle 1, MMIX, by Donald Knuth