Do the Even questions from section 7.1.10 (yes, even #6).

(It wouldn't hurt if you studied the answers to the odd questions as well.)

In addition, do these problems:

  1. Explain the terrible inefficiency in the approach described in #14.

  2. SHRD and SHLD would be nice if they were paired with another shift on the 'source'. For instance, to quickly divide an unsigned 32-bit value stored in DX:AX by 8, one could:

        SHRD ax, dx, 3
        SHR  dx, 3
    

    Thus the 3 lower bits of DX move into the upper part of AX (as one would expect from a DX:AX value) and the second instruction removes those 3 bits from DX.

    Using this idea, write code to perform 'quick' multiplication of a 64-bit value stored in EDX:EAX by 13.


This assignment is Level 2.5.