Prev: B0DC Up: Map Next: B203
B140: Print the room name and status area
Used by the routine at AE77.
B140 LD A,(HL)
B141 LD ($A45D),A
B144 PUSH HL
B145 LD HL,$5A00
B148 LD DE,$5A01
B14B LD BC,$00FF
B14E LD (HL),A
B14F LDIR
B151 POP DE
B152 INC DE
B153 LD A,(DE)
B154 LD HL,$5A20
B157 LD B,$20
B159 LD (HL),A
B15A INC L
B15B DJNZ $B159
B15D INC DE
B15E LD A,(DE)
B15F LD HL,$5020
B162 AND A
B163 CALL NZ,$B755
B166 INC DE
B167 CALL $B74A
B16A LD A,$40
B16C SUB L
B16D CALL NZ,$B755
B170 LD DE,$A87C
B173 LD HL,$50E0
B176 CALL $B74A
B179 PUSH DE
B17A INC L
B17B LD A,($A45E)
B17E CALL $B6F5
B181 POP DE
B182 LD L,$F6
B184 CALL $B74A
B187 CALL $B774
B18A LD HL,$50A0
B18D LD BC,$20FF
B190 LD DE,$A8AF
B193 PUSH BC
B194 CALL $B763
B197 POP BC
B198 DJNZ $B190
B19A LD HL,$B7B8
B19D PUSH HL
B19E PUSH HL
B19F CALL $B7A3
B1A2 POP HL
B1A3 POP HL
This entry point is used by the routine at B2D2.
B1A4 LD A,($A42C)
B1A7 LD C,A
B1A8 LD HL,$5A80
B1AB AND A
B1AC JR Z,$B1B6
B1AE LD B,A
B1AF LD A,($A45D)
B1B2 LD (HL),A
B1B3 INC L
B1B4 DJNZ $B1B2
B1B6 LD A,$20
B1B8 SUB C
B1B9 RET Z
B1BA LD B,A
B1BB LD E,L
B1BC LD A,$1E
B1BE LD (HL),A
B1BF INC L
B1C0 DJNZ $B1BE
B1C2 LD A,C
B1C3 ADD A,A
B1C4 ADD A,A
B1C5 ADD A,A
B1C6 LD HL,$A45B
B1C9 BIT 4,(HL)
B1CB RET NZ
B1CC LD ($A42D),A
B1CF BIT 2,(HL)
B1D1 RET Z
B1D2 LD L,E
B1D3 LD H,$50
B1D5 LD A,($A42B)
B1D8 RRCA
B1D9 RRCA
B1DA RRCA
B1DB AND $1F
B1DD LD B,A
B1DE LD A,$1F
B1E0 SUB B
B1E1 LD C,$FF
B1E3 JR Z,$B1ED
B1E5 EX AF,AF'
B1E6 CALL $B760
B1E9 EX AF,AF'
B1EA DEC A
B1EB JR NZ,$B1E5
B1ED LD A,($A42B)
B1F0 AND $07
B1F2 JR Z,$B1F9
B1F4 LD B,A
B1F5 SLA C
B1F7 DJNZ $B1F5
B1F9 CALL $B760
B1FC LD A,$A0
B1FE SUB L
B1FF RET Z
B200 JP $B755
Prev: B0DC Up: Map Next: B203