Section 9.9: Integer Multiplication (Frame 9)                     [prev][home][     ]

There are some tricky things about the assembler version of this program. One is that the multiplier is repeatedly shifted until nothing (all 0s) is left. This might not be good during debugging so a copy is made in CTEMP to preserve its original value.

Another subtle feature is that the multiplier's MSB must be in bit 15, but the multiplier is only an 8-bit number. Thus, 8 left shifts are done before the main loop starts in order to bring its MSB into position so we can examine it via the N bit.