Errata: corrections to errors in this book

Please add these corrections first

Unfortunately, this book was printed before the proof reading was complete. There are a number of errors in the book; those I could find are corrected here. I will be grateful to any reader—student or staff—who can point out any other errors, whether factual, spelling, typographical or gramatical. I am interested in feedback about ways I can improve the next edition.^{1}

Major errors and omisions

page 55, 6th bulletted point The dip switches are connected to port C, not to port A. The second sentence should read:

This is the port C data register on the pi^{/}t.

and not

This is the port A data register on the pi^{/}t.

page 110, solution to exercise 2.6 (g)

(g) To solve this, you really need to look at table A.1 on page 116 which shows operator precedence, or in other words, which operator is evaluated first.

1I know many cross references and index items will be wrong, as mentioned on page D, but getting these right in the next edition of this book is trivial.

B  Errata: corrections to errors in this book

From that table, we see that ‘>=’, ‘<=’, ‘<’ and ‘>’ have precedence level 10, ‘&&’ has precedence level 5, ‘!’ has the high priority of 14, ‘| |’ has a priority of 4 and binary ‘−’ has a priority of 12. The expressions are evaluated in order of this priority, those with a higher precedence level first. Let us put parentheses around this expression to see how it is evaluated by the C compiler. 10 >= 0 && 30 <= 30 | | ! ( 50 < 0 ) && 7 − 3 > 5 = ( ( ( 10 >= 0 ) && ( 30 <= 30 ) ) ) | | ( ! ( 50 < 0 ) && ( ( 7 − 3 ) > 5 ) ) = ( 1 && 1 ) | | ( ! 0 && ( 4 > 5 ) ) = 1 | | ( 1 && 0 ) = 1 | | 0 = 1, which has the logical value true.

page 117, solution to exercise 3.1 Replace the whole of the solution part (a) with the following:

(a) If there are three address line inputs to the address decoder, A_{23–21}, then a new range of addresses is selected when A_{21} changes. So the lowest address, A00000_{16} is active when A_{23} = 1, A_{22} = 0 and A_{21} = 1. This three-bit number is 101_{2}. When this three-bit number is incremented, then the duart will cease to be activated. This will happen when A_{23} = 1, A_{22} = 1 and A_{21} = 0. The highest address with A_{23} = 1, A_{22} = 0 and A_{21} = 1 is BFFFFF_{16}. That is the highest address at which the chip select of the duart will be activated.

The second part should be labelled (b), not 2.

Minor corrections

page 1, section 1.1.1, 4th line from bottom Write #include <flight.h> instead of #include <flight.h .

page 3, top line Delete the word ‘the’ in front of the reference to [Sum].

page 34, second line of section 2.8.5 Write C instead of C^{++}.

page 41, Program example 2.18 Write printf ( "the '2' key is ok.\n" );

instead of printf ( "the key '2' key is ok." );

page 44, eleventh line from top The word “to” has been wrongly written as “fo”.

Errata: corrections to errors in this book  C

page 48, eighth line of exercise 2.14 Write “function” instead of “fucntion”.

page 49, first line of exercise 2.15 A space is missing after the function name, SevenSegment(); write “SevenSegment() in” rather than SevenSegment()in”.

page 50, second line of text after the program Write “ … like that shown in figure 2.2 on the facing page” instead of “ … like that shown in figure 2.15 on the preceding page”

page 54, seventh line of section 2.11 Write: “one such guide is [C^{+}] which is … ” instead of “one such guide is [ea] which is … ”. This refers to a document called The Indian Hill Style Guide, which is mentioned in the references section on page 120.

page 59, fourth line of section 3.2.2 Write “address bus” instead of “address lines”.

page 59, bottom line of page Write 2^{15} − 1 = 32767 instead of 2^{15} = 32767.

page 60, eighth line from the top The word “circuit” is repeated. Delete one.

page 71, in ��������� ������� There are many equals signs that should be assignments. Replace all cases of ‘=’ with ‘:=’.

page 86, second line of section D.7.1 Replace the word “microseconds” with “milliseconds”.

page 87, 12th line from the top Write the sentence “The program will terminate when you press a key on the pc rather than requiring you to press the RESET button on the flight-68k.” instead of “The program will terminate when you press a key rather than requiring you to press the reset button on the flight-68k.”

page 87, bottom line before the program example The program example is wrongly said to be on the next page; in fact it is on the same page.

page 88, two lines before the program example Replace the word “od” with the word “on”.

page 88, all of section D.7.4 There are many ‘@’ symbols that have appeared. Delete them.

EE/27/LA/20/95

D  Errata: corrections to errors in this book

page 99, 13th line from the top Write:

     error1.c:  1:  Unknown preprocessing directive.

instead of

     \texttt{error1.c: 1: Unknown preprocessing directive.}

page 102, 5th line of section H1 Write “compile” instead of “assemble”.

page 102, title of section H.2 The title should be: “The general procedure for editing, compiling, downloading and running a program”, not “The general procedure for editing, assembling, downloading and running an assembly language program”. Of course, the name should be changed to this in the table of contents on page vii.

page 121, top line Write “Frequently” instead of “Requently”.

In addition, in my impatience to print this book, I compiled it one time too few. The result of this is that many cross-references are wrong and will be in error by one page. The same is true of the index, and possibly the table of contents and table of program examples.

Section 3.3 about the keypad, pages 68–73, is rather biased towards an assembly language implementation. The description does not match the ReadKey() function (given on page 90) very well.