Routines |
Prev: 48456 | Up: Map | Next: 48729 |
Used by the routine at StartGame.
|
||||
48521 | LD IX,50006 | IX=50006. | ||
48525 | LD HL,(49783) | HL=*49783. | ||
48528 | BIT 4,(IX+16) | Test bit 4 of *IX+16. | ||
48532 | LD DE,33 | DE=0033. | ||
48535 | JR Z,48540 | Jump to 48540 if bit 4 of *IX+16 is not set. | ||
48537 | LD DE,45 | DE=0045. | ||
48540 | ADD HL,DE | HL+=DE. | ||
48541 | BIT 5,(HL) | Return if bit 5 of *HL is not set. | ||
48543 | RET Z | |||
48544 | LD A,(HL) | A=*HL. | ||
48545 | LD HL,50013 | HL=50013. | ||
48548 | LD DE,50006 | DE=50006. | ||
48551 | LD BC,7 | BC=0007. | ||
48554 | LDIR | LDIR. | ||
48556 | LD HL,50055 | HL=50055. | ||
48559 | DEC (HL) | Decrease *HL by one. | ||
48560 | RET NZ | Return if *HL is not zero. | ||
48561 | LD (HL),6 | Write 6 to *HL. | ||
48563 | BIT 0,A | Jump to 48572 if bit 0 of A is set. | ||
48565 | JR NZ,48572 | |||
48567 | BIT 3,(IX+23) | Return if bit 3 of *IX+23 is not set. | ||
48571 | RET Z | |||
48572 | SET 3,(IX+23) | Set bit 3 of *IX+23. | ||
48576 | BIT 5,(IX+19) | Jump to 48589 if bit 5 of *IX+19 is not set. | ||
48580 | JR Z,48589 | |||
48582 | RES 5,(IX+19) | Reset bit 5 of *IX+19. | ||
48586 | JP 47270 | Jump to 47270. | ||
48589 | LD A,(IX+40) | A=*IX+40. | ||
48592 | AND %00011111 | Keep only bits 0-4. | ||
48594 | BIT 4,(IX+40) | Jump to 48606 if bit 4 of *IX+40 is not set. | ||
48598 | JR Z,48606 | |||
48600 | CP 22 | Jump to 48718 if A is lower than 22. | ||
48602 | JR C,48718 | |||
48604 | JR 48610 | Jump to 48610. | ||
48606 | CP 10 | Jump to 48718 if A is higher than 10. | ||
48608 | JR NC,48718 | |||
48610 | BIT 5,(IX+47) | Jump to 48718 if bit 5 of *IX+47 is set. | ||
48614 | JR NZ,48718 | |||
48616 | LD A,(IX+40) | A=*IX+40. | ||
48619 | LD L,A | L=A. | ||
48620 | AND %00011111 | Keep only bits 0-4. | ||
48622 | LD C,A | C=A. | ||
48623 | LD H,(IX+41) | H=*IX+41. | ||
48626 | ADD HL,HL | HL+=HL. | ||
48627 | ADD HL,HL | HL+=HL. | ||
48628 | ADD HL,HL | HL+=HL. | ||
48629 | LD A,H | A=H. | ||
48630 | AND %00011111 | Keep only bits 0-4. | ||
48632 | NEG | NEG. | ||
48634 | ADD A,21 | A+=21. | ||
48636 | LD B,A | B=A. | ||
48637 | LD A,(IX+16) | A=*IX+16. | ||
48640 | AND %00011111 | Keep only bits 0-4. | ||
48642 | CP C | Compare A with C. | ||
48643 | LD C,0 | C=0. | ||
48645 | JR C,48649 | Jump to 48649 if A is lower than C. | ||
48647 | LD C,16 | C=16. | ||
48649 | LD A,(IX+7) | A=*IX+7. | ||
48652 | CP B | Compare A with B. | ||
48653 | LD B,8 | B=8. | ||
48655 | JR NC,48659 | Jump to 48659 if A is higher than B. | ||
48657 | LD B,24 | B=24. | ||
48659 | BIT 5,(IX+23) | Jump to 48668 if bit 5 of *IX+23 is not set. | ||
48663 | JR Z,48668 | |||
48665 | LD A,C | A=C. | ||
48666 | LD C,B | C=B. | ||
48667 | LD B,A | B=A. | ||
48668 | BIT 4,(IX+23) | Jump to 48693 if bit 4 of *IX+23 is set. | ||
48672 | JR NZ,48693 | |||
48674 | LD A,(IX+19) | A=*IX+19. | ||
48677 | CP C | Jump to 48693 if A is equal to C. | ||
48678 | JR Z,48693 | |||
48680 | LD (IX+19),B | Write B to *IX+19. | ||
48683 | CALL 48757 | Call 48757. | ||
48686 | SET 4,(IX+23) | Set bit 4 of *IX+23. | ||
48690 | LD (IX+19),C | Write C to *IX+19. | ||
48693 | CALL 48757 | Call 48757. | ||
48696 | RES 4,(IX+23) | Reset bit 4 of *IX+23. | ||
48700 | LD (IX+19),B | Write B to *IX+19. | ||
48703 | CALL 48757 | Call 48757. | ||
48706 | LD A,C | A=C. | ||
48707 | XOR %00010000 | Reset bit 4. | ||
48709 | LD (IX+19),A | Write A to *IX+19. | ||
48712 | CALL 48757 | Call 48757. | ||
48715 | JP 47270 | Jump to 47270. | ||
48718 | BIT 1,(IX+23) | Return if bit 1 of *IX+23 is set. | ||
48722 | RET NZ | |||
48723 | LD BC,(47383) | BC=*47383. | ||
48727 | JR 48637 | Jump to 48637. |
Prev: 48456 | Up: Map | Next: 48729 |