![]() |
Routines |
| Prev: 6F10 | Up: Map | Next: 6F3C |
|
Used by the routine at HandlerAccelerate.
Multiplies A by DE, by adding DE to the result for each bit of A which is set.
|
||||||||||||||
| MultiplyAByDE | 6F2F | LD HL,$0000 | HL=0000. | |||||||||||
| 6F32 | LD B,$08 | Set the bit counter to 08. | ||||||||||||
| MultiplyAByDE_Loop | 6F34 | ADD HL,HL | Shift the result left. | |||||||||||
| 6F35 | RLCA | Rotate the next bit of A into the carry flag. | ||||||||||||
| 6F36 | JR NC,MultiplyAByDE_Next | Jump to MultiplyAByDE_Next if the bit is not set. | ||||||||||||
| 6F38 | ADD HL,DE | Add DE to the result. | ||||||||||||
| MultiplyAByDE_Next | 6F39 | DJNZ MultiplyAByDE_Loop | Decrease the bit counter by one and loop back to MultiplyAByDE_Loop until all 08 bits have been used. | |||||||||||
| 6F3B | RET | Return. | ||||||||||||
|
View the equivalent code in;
|
||||||||||||||
| Prev: 6F10 | Up: Map | Next: 6F3C |