Wednesday, August 10, 2011

Finished source code for Chapter 11

It took me a few hours to write and test all the code in Chapter 11.  There were some pieces of code which I thought I had tested, but obviously had not.  Now my src/ch11 directory has 14 different source files.

I had been too rash and had not really noticed that the instructions for floating point comparisons require using different conditional jumps than the integer comparisons.  I also read somewhere that test was a good instruction for comparing.  Test reports that it performs an "and" instruction.  If the "and" of two operands yields a 0, then the zero flag is set.  Using the zero flag in the most obvious test, je, ends up jumping when the two operands have nothing in common rather than when they are equal.  So as a programmer, I want to use je to test for equal objects and I need "cmp" rather than "test".  Maybe someday I will find a use for test, but I have spent too much time working with numbers to appreciate that anding has anything to so with testing...

Now there is fairly complete set of errata for Chapter 11, in addition to the source code.

You can access the source code, PDF slides and errata at http://seyfarth.tv/asm and you can reach the CreateSpace page for the book at  https://www.createspace.com/3651611.


No comments: