Prev: E0E5 Up: Map Next: E0FB
E0EE: HL = DE * A
Used by the routine at TURN_SPRITE.
A shift-and-add multiply, a bit of A at a time from the top; the result keeps its low 16 bits. A goes round eight places back to itself, and B ends at 0. The only caller is the upside-down half of TURN_SPRITE, which never runs, so neither does this. Alien 8's routine of the same name is the same idea.
Input
A One factor
DE The other
Output
HL The product
HL_EQUALS_DE_X_A E0EE LD HL,$0000 HL = 0; eight bits
E0F1 LD B,$08
HL_EQUALS_DE_X_A_0 E0F3 ADD HL,HL Double HL; add DE when the next bit of A, from the top, is set
E0F4 RLCA
E0F5 JR NC,HL_EQUALS_DE_X_A_1
E0F7 ADD HL,DE
HL_EQUALS_DE_X_A_1 E0F8 DJNZ HL_EQUALS_DE_X_A_0
E0FA RET A is back as it was; B is 0
Prev: E0E5 Up: Map Next: E0FB