Prev: 6CF6 Up: Map Next: 6DB4
6D09: Routine at 6D09
Used by the routines at ENTRY and 604D.
6D09 LD A,($5B22)
6D0C OR A
6D0D JP NZ,$6D72
6D10 LD HL,($5B20)
6D13 PUSH HL
6D14 LD A,($5B0B)
6D17 CP $01
6D19 JR Z,$6D38
6D1B LD A,($5B06)
6D1E CP $02
6D20 JR NC,$6D38
6D22 LD BC,$EFFE
6D25 IN A,(C)
6D27 LD B,A
6D28 RRCA
6D29 XOR B
6D2A AND $08
6D2C JR Z,$6D40
6D2E BIT 3,B
6D30 JR NZ,$6D3F
6D32 DEC H
6D33 JR NZ,$6D40
6D35 INC H
6D36 JR $6D40
6D38 LD A,($5B2C)
6D3B BIT 0,A
6D3D JR Z,$6D40
6D3F INC H
6D40 LD A,($5B26)
6D43 SRL A
6D45 SRL A
6D47 ADD A,$08
6D49 LD L,A
6D4A CALL $60F6
6D4D LD ($5B20),HL
6D50 EX (SP),HL
6D51 PUSH DE
6D52 POP HL
6D53 LD A,(HL)
6D54 PUSH HL
6D55 CALL $6DB4
6D58 POP HL
6D59 INC HL
6D5A LD A,(HL)
6D5B PUSH HL
6D5C CALL $6DB4
6D5F POP HL
6D60 LD A,$66
6D62 LD C,$28
6D64 POP HL
6D65 PUSH HL
6D66 CALL $6114
6D69 POP HL
6D6A INC L
6D6B LD A,$67
6D6D LD C,$28
6D6F CALL $6114
6D72 LD A,($5B01)
6D75 OR A
6D76 RET Z
6D77 LD HL,$5B04
6D7A INC (HL)
6D7B LD A,$0A
6D7D CP (HL)
6D7E JR NZ,$6D85
6D80 XOR A
6D81 LD ($5B01),A
6D84 RET
6D85 LD A,(HL)
6D86 LD HL,($5B20)
6D89 ADD A,L
6D8A LD L,A
6D8B LD ($5B02),HL
6D8E LD C,$5D
6D90 PUSH HL
6D91 DEC L
6D92 CALL $6E98
6D95 JR NZ,$6D9C
6D97 LD ($5B01),A
6D9A POP HL
6D9B RET
6D9C POP HL
6D9D DEC L
6D9E CALL $60F6
6DA1 LD A,(DE)
6DA2 CP $2F
6DA4 JR Z,$6DA9
6DA6 LD A,$2D
6DA8 LD (DE),A
6DA9 INC L
6DAA LD C,$5D
6DAC CALL $6E98
6DAF RET NZ
6DB0 LD ($5B01),A
6DB3 RET
Prev: 6CF6 Up: Map Next: 6DB4