Prev: 953F Up: Map Next: 95C6
9562: Routine at 9562
Used by the routines at CopyBufferToScreen and 953F.
9562 PUSH HL Stash HL on the stack.
9563 LD D,(HL) D=*HL.
9564 INC HL Increment HL by one.
9565 LD E,(HL) E=*HL.
9566 EX DE,HL Exchange the DE and HL registers.
9567 BIT 2,(HL) Test bit 2 of *HL.
9569 JR Z,$95A5 Jump to 95A5 if HL is zero.
956B RES 2,(HL) Reset bit 2 of *HL.
956D INC HL Increment HL by two.
956E INC HL
956F LD E,(HL) E=*HL.
9570 INC HL Increment HL by one.
9571 LD D,(HL) D=*HL.
9572 INC HL Increment HL by one.
9573 LD A,(HL) A=*HL.
9574 LD ($99A9),A Write A to *99A9.
9577 INC HL Increment HL by one.
9578 PUSH HL Stash HL on the stack.
9579 LD HL,$99BC HL=99BC.
957C EX DE,HL Exchange the DE and HL registers.
957D LD BC,$0008 BC=0008.
9580 LDIR LDIR.
9582 POP IX Restore IX from the stack.
9584 LD A,(IX+$00) A=*IX+00.
9587 CP $00 Compare A with 00.
9589 JR Z,$95A7 Jump to 95A7 if A is zero.
958B LD H,A H=A.
958C LD L,(IX+$01) L=*IX+01.
958F INC HL Increment HL by two.
9590 INC HL
9591 LD E,(HL) E=*HL.
9592 INC HL Increment HL by one.
9593 LD D,(HL) D=*HL.
9594 INC HL Increment HL by two.
9595 INC HL
9596 PUSH HL Stash HL on the stack.
9597 LD B,$08 B=08.
9599 LD HL,$99BC HL=99BC.
959C LD A,(DE) A=*DE.
959D OR (HL) Set the bits from *HL.
959E LD (HL),A Write A to *HL.
959F INC HL Increment HL by one.
95A0 INC DE Increment DE by one.
95A1 DJNZ $959C Decrease counter by one and loop back to 959C until counter is zero.
95A3 JR $9582 Jump to 9582.
95A5 POP HL Restore HL from the stack.
95A6 RET Return.
95A7 LD DE,$99BC DE=99BC.
95AA POP HL Restore HL from the stack.
95AB SRL H Shift H right.
95AD RR L Rotate L right.
95AF LD A,H A=H.
95B0 AND %11011011 Keep only bits 0-1, 3-4, 6-7.
95B2 OR %01000000 Set bit 6.
95B4 LD H,A H=A.
95B5 LD A,($99A9) A=*99A9.
95B8 LD (HL),A Write A to *HL.
95B9 SLA H Shift H left three positions (with carry).
95BB SLA H
95BD SLA H
95BF RES 7,H Reset bit 7 of H.
95C1 EX DE,HL Exchange the DE and HL registers.
95C2 CALL CopyUDGToScreen Call CopyUDGToScreen.
95C5 RET Return.
Prev: 953F Up: Map Next: 95C6