taocp

This site has no text of the book. Keep your own copy of TAOCP next to it. See what is checked.

Learn · Volume 1

Section 1.4.1. Subroutines

7 exercises: 7 with a written solution, 0 stated in Lean, 0 proved in Lean.

1. Read first

The companion chapter builds on these. Read the ones you do not know yet.

2. Read the section

Read Section 1.4.1 in your copy of the book. Then read the companion chapter Subroutines (a draft): it explains each item in the words of the handbook, with examples and proofs. The items of the section and their status.

3. Work the exercises

Section 1.4.1

The exercises of Section 1.4.1 train the use of subroutines on MIX: the calling sequence, the entry and exit conditions, linkage by the J-register, and routines with more than one entrance. Exercises 1 to 3 state the characteristics of the maximum-finding routine of the text. Exercises 2 and 4 add entrances. Exercise 5 shows linkage on a machine without a J-register. Exercise 6 writes the MOVE instruction as a subroutine. Exercise 7 is a discussion of self-modifying code.

All programs in these solutions were written for this handbook and checked on a MIX simulator against the stated conditions. See also the C1 chapter on Section 1.4.1.

A good order is 3, 1, 2, 4, 5, 7, 6.

From the Solutions volume of the handbook. The source.

The list starts with the lowest rating. Try each exercise on paper first. Its page has the hints one at a time, the solution behind a click, and the Lean status.

ExerciseRatingKindSolutionLean
1.4.1-110K3writtennot stated yet
1.4.1-210K6writtennot stated yet
1.4.1-3M15K3writtennot stated yet
1.4.1-720informalwrittennot stated yet
1.4.1-421K6writtennot stated yet
1.4.1-521K6writtennot stated yet
1.4.1-626K6writtennot stated yet

Something is wrong? Report it.