Routines |
Prev: A873 | Up: Map | Next: A8AE |
Used by the routines at Animation_OpponentThrowing, B29C, B342, B3B6, InitialiseOpponent and Animation_ThrowingDart.
|
||||
A875 | PUSH HL | Stash HL and BC on the stack. | ||
A876 | PUSH BC | |||
A877 | LD C,E | C=E. | ||
A878 | LD B,$08 | B=08. | ||
A87A | LD DE,($A871) | DE=*A871. | ||
A87E | LD HL,($A873) | HL=*A873. | ||
A881 | LD A,E | A=E. | ||
A882 | AND %01001000 | Keep only bits 3, 6. | ||
A884 | ADD A,$38 | A+=38. | ||
A886 | RLA | RLA. | ||
A887 | RLA | |||
A888 | RL H | Rotate H left. | ||
A88A | RL L | Rotate L left. | ||
A88C | RL D | Rotate D left. | ||
A88E | RL E | Rotate E left. | ||
A890 | DJNZ $A881 | Decrease counter by one and loop back to A881 until counter is zero. | ||
A892 | LD ($A871),DE | Write DE to *A871. | ||
A896 | LD ($A873),HL | Write HL to *A873. | ||
A899 | LD A,E | A=E. | ||
A89A | LD E,C | E=C. | ||
A89B | LD D,$00 | D=00. | ||
A89D | LD HL,$0000 | HL=0000. | ||
A8A0 | LD B,$08 | B=08. | ||
A8A2 | ADD HL,HL | HL+=HL. | ||
A8A3 | RLC A | Rotate A left (with carry). | ||
A8A5 | JR NC,$A8A8 | Jump to A8A8 if the result is greater than or equal to 08. | ||
A8A7 | ADD HL,DE | HL+=DE. | ||
A8A8 | DJNZ $A8A2 | Decrease counter by one and loop back to A8A2 until counter is zero. | ||
A8AA | LD A,H | A=H. | ||
A8AB | POP BC | Restore BC and HL from the stack. | ||
A8AC | POP HL | |||
A8AD | RET | Return. |
Prev: A873 | Up: Map | Next: A8AE |