![]() |
Routines |
| Prev: 9AA5 | Up: Map | Next: 9ABA |
|
Used by the routines at DrawChicken and FindLastRow.
Multiplies A by DE.
|
||||||||||||||
| MultiplyAByDE | 9AAD | LD HL,$0000 | HL=0000. | |||||||||||
| 9AB0 | LD B,$08 | B=08 (the number of bits in the first number). | ||||||||||||
| MultiplyAByDE_Loop | 9AB2 | ADD HL,HL | Shift the result left. | |||||||||||
| 9AB3 | RLCA | Rotate the next bit of A into the carry flag. | ||||||||||||
| 9AB4 | JR NC,MultiplyAByDE_Next | Jump to MultiplyAByDE_Next if it was not set. | ||||||||||||
| 9AB6 | ADD HL,DE | Add DE to the result. | ||||||||||||
| MultiplyAByDE_Next | 9AB7 | DJNZ MultiplyAByDE_Loop | Decrease the bit counter by one and loop back to MultiplyAByDE_Loop until every bit of the first number has been used. | |||||||||||
| 9AB9 | RET | Return. | ||||||||||||
|
View the equivalent code in;
|
||||||||||||||
| Prev: 9AA5 | Up: Map | Next: 9ABA |