pgubook-readers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pgubook-readers] A few 'bugs'?


From: Ruben
Subject: [Pgubook-readers] A few 'bugs'?
Date: Wed, 15 Mar 2006 02:57:10 +0100

Hi. First off, I would like to thank Jonathan Bartlett for making this really good book. I have just finished chapter 9 and (having had no prior programming experience at all) I feel like I gained a lot of understanding of computer programming design in a short time.

In case there will one day be another revision of the text I thought I'd point out a few minor details that I noticed that may be errors or anomalies that may warrant a little comment.


chapter 6:

In both the read-record.s and write-record.s functions the register %ebx gets pushl'ed onto the stack and popl'ed off the stack for no apparent reason as far as I could see.

In write-records.s the ".section .text" assembler directive is missing. As it is now, all the instructions are inside .data.

In count-chars.s the standard "movl %ebp, %esp" (of the C calling convention) is missing from count_loop_end:.

chapter 8:

The modification of add-year.s should contain the line "jge continue_processing" instead of "jl continue_processing". This is a somewhat critical bug, as it obviously prevents the program from running as expected.

chapter 9:

The text describes (aptly!) the following sequence of data from the bottom of the stack upwards:

zero -> program name -> environment variables -> command-line arguments -> # of arguments (= position of %esp)

The diagram however gives the following sequence from the bottom of the stack upwards:

zero -> environment variables -> command-line arguments -> program name -> # of arguments (= position of %esp)

Either one of these places puts the program name in the wrong place or there is something left unexplained here.


I apologize if any of these 'bugs' have already been reported or if I simply misread things. If I stumble on anymore anomalies during further reading I'd be happy to report those too if appreciated (apart from harmless typos ;). Thanks again for an enjoyable read.

Ruben

reply via email to

[Prev in Thread] Current Thread [Next in Thread]