D9B0: Reverse direction of a horizontally moving sprite
D9B0 |
PUSH HL |
D9B1 |
LD A,($D72F) |
D9B4 |
LD B,A |
D9B5 |
PUSH HL |
D9B6 |
EXX |
D9B7 |
POP HL |
D9B8 |
LD C,A |
D9B9 |
LD B,$00 |
D9BB |
ADD HL,BC |
D9BC |
DEC HL |
D9BD |
PUSH HL |
D9BE |
EXX |
D9BF |
POP HL |
D9C0 |
LD A,($D813) |
D9C3 |
LD C,A |
D9C4 |
PUSH BC |
D9C5 |
LD A,(DE) |
D9C6 |
LD (HL),A |
D9C7 |
DEC HL |
D9C8 |
INC DE |
D9C9 |
DJNZ $D9C5 |
D9CB |
EXX |
D9CC |
ADD HL,BC |
D9CD |
PUSH HL |
D9CE |
EXX |
D9CF |
POP HL |
D9D0 |
POP BC |
D9D1 |
DEC C |
D9D2 |
JR NZ,$D9C4 |
D9D4 |
POP HL |
D9D5 |
LD A,($D814) |
D9D8 |
LD C,A |
D9D9 |
LD E,$08 |
D9DB |
LD B,E |
D9DC |
LD A,(HL) |
D9DD |
RRA |
D9DE |
RL D |
D9E0 |
DJNZ $D9DD |
D9E2 |
LD (HL),D |
D9E3 |
INC HL |
D9E4 |
DEC C |
D9E5 |
JR NZ,$D9DB |
D9E7 |
RET |