![]() |
Routines |
| Prev: 39589 | Up: Map | Next: 39610 |
|
Used by the routines at DrawChicken and FindLastRow.
Multiplies A by DE.
|
||||||||||||||
| MultiplyAByDE | 39597 | LD HL,0 | HL=0000. | |||||||||||
| 39600 | LD B,8 | B=8 (the number of bits in the first number). | ||||||||||||
| MultiplyAByDE_Loop | 39602 | ADD HL,HL | Shift the result left. | |||||||||||
| 39603 | RLCA | Rotate the next bit of A into the carry flag. | ||||||||||||
| 39604 | JR NC,MultiplyAByDE_Next | Jump to MultiplyAByDE_Next if it was not set. | ||||||||||||
| 39606 | ADD HL,DE | Add DE to the result. | ||||||||||||
| MultiplyAByDE_Next | 39607 | 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. | |||||||||||
| 39609 | RET | Return. | ||||||||||||
|
View the equivalent code in;
|
||||||||||||||
| Prev: 39589 | Up: Map | Next: 39610 |