Prev: BBF7 Up: Map Next: BC67
BC5A: Multiply A By DE
This code is not used. Multiplies A by DE.
Input
A Number to multiply by
DE Number to multiply
Output
HL The result
MultiplyAByDE BC5A DEFB $21,$00,$00 HL=0000.
BC5D DEFB $06,$08 B=08 (the number of bits).
BC5F DEFB $29 Double the result.
BC60 DEFB $07 Rotate the next bit of A into the carry flag.
BC61 DEFB $30,$01 Jump to BC64 if the bit is not set.
BC63 DEFB $19 Add DE to the result.
BC64 DEFB $10,$F9 Decrease the bit counter by one and loop back to BC5F until it is zero.
BC66 DEFB $C9 Return.
View the equivalent code in;
Prev: BBF7 Up: Map Next: BC67