Routines |
Prev: 25764 | Up: Map | Next: 25853 |
Used by the routine at 25856.
|
||||
25770 | LD HL,40448 | HL=40448. | ||
25773 | LD BC,2560 | BC=2560. | ||
25776 | LD A,50 | A=50. | ||
25778 | CPIR | CPIR. | ||
25780 | LD A,B | Return if BC is zero. | ||
25781 | OR C | |||
25782 | RET Z | |||
25783 | PUSH HL | Stash HL and BC on the stack. | ||
25784 | PUSH BC | |||
25785 | XOR A | A=0. | ||
25786 | NOP | No operation. | ||
25787 | NOP | |||
25788 | LD B,4 | B=4. | ||
25790 | LD E,A | E=A. | ||
25791 | DEC L | Decrease L by one. | ||
25792 | CALL GetRandomNumber | Call GetRandomNumber. | ||
25795 | AND %00000111 | Keep only bits 0-2. | ||
25797 | CP E | Jump to 25844 if A is lower than E. | ||
25798 | JR C,25844 | |||
25800 | CALL 28808 | Call 28808. | ||
25803 | AND %00000111 | Keep only bits 0-2. | ||
25805 | ADD A,A | A+=A. | ||
25806 | LD E,A | E=A. | ||
25807 | ADD A,A | A+=A. | ||
25808 | ADD A,E | A+=E. | ||
25809 | ADD A,108 | A+=108. | ||
25811 | LD E,A | E=A. | ||
25812 | LD D,180 | D=180. | ||
25814 | LD A,(DE) | A=*DE. | ||
25815 | LD (HL),A | Write A to *HL. | ||
25816 | INC E | Increment E by one. | ||
25817 | INC L | Increment L by one. | ||
25818 | DJNZ 25814 | Decrease counter by one and loop back to 25814 until counter is zero. | ||
25820 | LD A,(DE) | Jump to 25849 if *DE is zero. | ||
25821 | AND A | |||
25822 | JR Z,25849 | |||
25824 | DEC L | Decrease L by three. | ||
25825 | DEC L | |||
25826 | DEC L | |||
25827 | INC H | Increment H by one. | ||
25828 | LD B,2 | B=2. | ||
25830 | LD A,(HL) | A=*HL. | ||
25831 | AND A | Set flags. | ||
25832 | LD A,(DE) | A=*DE. | ||
25833 | JR Z,25837 | Jump to 25837 if *HL is zero. | ||
25835 | INC A | Increment A by two. | ||
25836 | INC A | |||
25837 | LD (HL),A | Write A to *HL. | ||
25838 | INC L | Increment L by one. | ||
25839 | INC E | Increment E by one. | ||
25840 | DJNZ 25830 | Decrease counter by one and loop back to 25830 until counter is zero. | ||
25842 | JR 25849 | Jump to 25849. | ||
25844 | LD (HL),1 | Write 1 to *HL. | ||
25846 | INC L | Increment L by one. | ||
25847 | DJNZ 25844 | Decrease counter by one and loop back to 25844 until counter is zero. | ||
25849 | POP BC | Restore BC and HL from the stack. | ||
25850 | POP HL | |||
25851 | JR 25776 | Jump to 25776. |
Prev: 25764 | Up: Map | Next: 25853 |