Prev: 9478 Up: Map Next: 953F
94CC: Routine at 94CC
Used by the routine at 9447.
94CC INC DE Increment DE by one.
94CD LD A,(DE) A=*DE.
94CE AND %00000111 Keep only bits 0-2.
94D0 LD ($99A9),A Write A to *99A9.
94D3 LD L,(IX+$01) L=*IX+01.
94D6 LD H,(IX+$00) H=*IX+00.
94D9 PUSH IX Stash IX on the stack.
94DB PUSH HL Stash HL on the stack.
94DC SET 2,(HL) Set bit 2 of *HL.
94DE INC HL Increment HL by one.
94DF LD A,(HL) A=*HL.
94E0 AND %00000111 Keep only bits 0-2.
94E2 LD HL,$99A9 HL=99A9.
94E5 CP (HL) Compare A with *HL.
94E6 POP HL Restore HL from the stack.
94E7 JR NC,$9526 Jump to 9526 if A is higher.
94E9 DEC DE Decrease DE by one.
94EA LD (IX+$01),E Write E to *IX+01.
94ED LD (IX+$00),D Write D to *IX+00.
94F0 PUSH DE Stash DE on the stack.
94F1 POP IX Restore IX from the stack.
94F3 LD (IX+$06),L Write L to *IX+06.
94F6 LD (IX+$05),H Write H to *IX+05.
94F9 LD A,(IX+$01) A=*IX+01.
94FC AND %11111000 Keep only bits 3-7.
94FE SET 2,A Set bit 2 of A.
9500 OR (HL) Set the bits from *HL.
9501 LD (IX+$00),A Write A to *IX+00.
9504 LD BC,$0004 BC=0004.
9507 ADD HL,BC HL+=BC.
9508 LD A,(HL) A=*HL.
9509 AND %11111000 Keep only bits 3-7.
950B OR (IX+$04) Set the bits of A with *IX+04.
950E LD (IX+$04),A Write A to *IX+04.
9511 POP BC Restore BC and BC from the stack.
9512 POP BC
9513 LD HL,($99A7) HL=*99A7.
9516 LD (HL),C Write C to *HL.
9517 INC HL Increment HL by one.
9518 LD (HL),B Write B to *HL.
9519 INC HL Increment HL by one.
951A LD ($99A7),HL Write HL to *99A7.
951D LD IX,$0040 IX=0040.
9521 ADD IX,BC IX+=BC.
9523 JP $9465 Jump to 9465.
9526 LD A,(DE) A=*DE.
9527 AND %11111000 Keep only bits 3-7.
9529 OR (HL) Set the bits from *HL.
952A LD (HL),A Write A to *HL.
952B LD BC,$0005 HL+=0005.
952E ADD HL,BC
952F LD A,(HL) A=*HL.
9530 CP $00 Compare A with 00.
9532 POP IX Restore IX from the stack.
9534 JR Z,$953B Jump to 953B if A is zero.
9536 PUSH HL IX=HL (using the stack).
9537 POP IX
9539 JR $94D3 Jump to 94D3.
953B DEC DE Decrease DE by one.
953C POP BC Restore BC from the stack.
953D JR $951D Jump to 951D.
Prev: 9478 Up: Map Next: 953F