Prev: B6BC Up: Map Next: B80F
B7A9: Routine at B7A9
Used by the routine at Handler_Madrid.
B7A9 LD IX,$7258 IX=7258.
B7AD CALL $97D7 Call 97D7.
B7B0 LD A,H A=H.
B7B1 OR L Set the bits from L.
B7B2 LD HL,$7200 HL=7200.
B7B5 RES 7,(HL) Reset bit 7 of *HL.
B7B7 CP $08 Compare A with 08.
B7B9 JR NC,$B7C2 Jump to B7C2 if A is higher.
B7BB SET 7,(HL) Set bit 7 of *HL.
B7BD LD HL,$EFFF HL=EFFF.
B7C0 SET 2,(HL) Set bit 2 of *HL.
B7C2 CALL $9619 Call 9619.
B7C5 LD A,($99A5) A=*99A5.
B7C8 AND %11111110 Keep only bits 1-7.
B7CA CP $BF Compare A with BF.
B7CC JR NC,$B7C2 Jump to B7C2 if A is higher.
B7CE LD L,A L=A.
B7CF LD H,$00 H=00.
B7D1 LD E,L E=L.
B7D2 LD D,$00 D=00.
B7D4 ADD HL,HL HL+=HL.
B7D5 ADD HL,DE HL+=DE.
B7D6 PUSH DE Stash DE on the stack.
B7D7 LD DE,$6242 DE=6242.
B7DA ADD HL,DE HL+=DE.
B7DB PUSH HL Stash HL on the stack.
B7DC LD A,(HL) A=*HL.
B7DD INC HL Increment HL by one.
B7DE LD H,(HL) H=*HL.
B7DF LD DE,$B4C2 DE=B4C2.
B7E2 LD L,A L=A.
B7E3 SBC HL,DE HL-=DE (with carry).
B7E5 LD A,L A=L.
B7E6 CP $20 Compare A with 20.
B7E8 JR C,$B7ED Jump to B7ED if A is lower.
B7EA POP HL Restore HL and HL from the stack.
B7EB POP HL
B7EC RET Return.
B7ED LD HL,$7200 HL=7200.
B7F0 OR %00010000 Set bit 4.
B7F2 BIT 7,(HL) Test bit 7 of *HL.
B7F4 JR NZ,$B7F8 Jump to B7F8 if A is not zero.
B7F6 XOR %00010000 Flip bit 4.
B7F8 LD E,A E=A.
B7F9 LD D,$00 D=00.
B7FB LD HL,$B4C2 HL=B4C2.
B7FE ADD HL,DE HL+=DE.
B7FF POP IX Restore IX from the stack.
B801 LD (IX+$00),L Write L to *IX+00.
B804 LD (IX+$01),H Write H to *IX+01.
B807 POP HL Restore HL from the stack.
B808 LD DE,$78C0 HL+=78C0.
B80B ADD HL,DE
B80C JP $9914 Jump to 9914.
Prev: B6BC Up: Map Next: B80F