Prev: 9D06 Up: Map Next: 9DF1
9D08: Check for left or right input and move the player accordingly
Used by the routine at 9858.
9D08 LD IX,$72D8
9D0C LD HL,($72D8)
9D0F LD A,($72DB)
9D12 AND A
9D13 JR NZ,$9D16
9D15 DEC L
9D16 EX DE,HL
9D17 LD HL,$61A8
9D1A LD A,D
9D1B AND $F8
9D1D LD B,$00
9D1F SLA A
9D21 RL B
9D23 SLA A
9D25 RL B
9D27 LD C,A
9D28 ADD HL,BC
9D29 LD B,$00
9D2B LD C,E
9D2C SRL C
9D2E SRL C
9D30 SRL C
9D32 ADD HL,BC
9D33 LD BC,$0020
9D36 LD A,($7333)
9D39 IN A,($FE)
9D3B AND $1F
9D3D LD D,A
9D3E LD A,($7332)
9D41 OR D
9D42 CP $1F
9D44 JR Z,$9D6F
9D46 LD A,($72D8)
9D49 DEC A
9D4A JR Z,$9DAB
9D4C LD A,(HL)
9D4D CP $05
9D4F JR NC,$9DAB
9D51 AND A
9D52 SBC HL,BC
9D54 LD A,(HL)
9D55 CP $05
9D57 JR NC,$9DAB
9D59 DEC (IX+$00)
9D5C LD (IX+$03),$04
9D60 LD A,($72D8)
9D63 AND $03
9D65 JR NZ,$9D6D
9D67 LD HL,$2805
9D6A CALL $9CA4
9D6D JR $9DAF
9D6F LD A,($7335)
9D72 IN A,($FE)
9D74 AND $1F
9D76 LD D,A
9D77 LD A,($7334)
9D7A OR D
9D7B CP $1F
9D7D JR Z,$9DAB
9D7F LD A,($72D8)
9D82 CP $EE
9D84 JR NC,$9DAB
9D86 INC HL
9D87 INC HL
9D88 LD A,(HL)
9D89 CP $05
9D8B JR NC,$9DAB
9D8D AND A
9D8E SBC HL,BC
9D90 LD A,(HL)
9D91 CP $05
9D93 JR NC,$9DAB
9D95 INC (IX+$00)
9D98 LD (IX+$03),$00
9D9C LD A,($72D8)
9D9F AND $03
9DA1 JR NZ,$9DA9
9DA3 LD HL,$2806
9DA6 CALL $9CA4
9DA9 JR $9DAF
9DAB LD (IX+$02),$03
9DAF LD HL,($72D8)
9DB2 LD A,($72DA)
9DB5 INC A
9DB6 AND $03
9DB8 LD ($72DA),A
9DBB ADD A,(IX+$03)
9DBE CALL $9A4C
9DC1 LD A,($7355)
9DC4 AND A
9DC5 RET Z
9DC6 LD A,($7350)
9DC9 XOR $FF
9DCB RET Z
9DCC XOR $FF
9DCE SUB $09
9DD0 LD B,A
9DD1 LD A,($72D8)
9DD4 CP B
9DD5 JR C,$9DDB
9DD7 SUB $13
9DD9 CP B
9DDA RET C
9DDB LD (IX+$4D),$01
9DDF LD D,$FF
9DE1 LD A,($72DB)
9DE4 AND A
9DE5 JR NZ,$9DE9
9DE7 LD D,$01
9DE9 LD (IX+$4E),D
9DEC LD (IX+$4F),$04
9DF0 RET
Prev: 9D06 Up: Map Next: 9DF1