Saturday, July 30, 2011

Chapter 7 slides now on www.seyfarth.tv/asm

I have completed the PDF slides for Chapter 7 which is about bit instructions.  It covers negation, and, or, exclusive-or, shifting, rotating and testing individual bits.  In all cases examples are given to try to point out a possible use for the instructions.

One use for these instructions is in extracting and filling bit fields in a register or in memory.  Extraction is documented fairly well with 2 techniques illustrated with examples.  Perhaps a little later I will add some illustrations of insertion of bit-fields.

A second use for these instructions is the  maintenance of a set implemented as an array of bits.  Some sample code is given in Chapter 7 giving the fundamental techniques for managing a bit set, but there is not a complete program given for managing a set.  This would make a good exercise for this chapter, except that arrays are not fully introduced yet.  They are used with an index register in Chapter 7 with little fanfare.

No comments: