40658: Routine at 9ED2
40658 |
LD A,(43588) |
40661 |
LD D,A |
40662 |
LD HL,43277 |
40665 |
LD A,D |
40666 |
ADD A,L |
40667 |
LD L,A |
40668 |
LD A,(HL) |
40669 |
AND A |
40670 |
RET Z |
40671 |
LD A,(43603) |
40674 |
AND A |
40675 |
RET Z |
40676 |
LD A,(43606) |
40679 |
AND A |
40680 |
RET NZ |
40681 |
LD A,(43593) |
40684 |
AND A |
40685 |
RET NZ |
40686 |
LD HL,43377 |
40689 |
LD A,D |
40690 |
ADD A,L |
40691 |
LD L,A |
40692 |
LD B,(HL) |
40693 |
LD A,(43602) |
40696 |
CP B |
40697 |
RET NZ |
40698 |
LD A,(43607) |
40701 |
LD HL,43543 |
40704 |
CP (HL) |
40705 |
JR Z,40729 |
40707 |
LD A,D |
40708 |
SLA A |
40710 |
EXX |
40711 |
LD HL,43402 |
40714 |
LD B,0 |
40716 |
LD C,A |
40717 |
ADD HL,BC |
40718 |
LD A,(HL) |
40719 |
LD (41071),A |
40722 |
INC HL |
40723 |
LD A,(HL) |
40724 |
LD (41072),A |
40727 |
JR 40752 |
40729 |
LD A,D |
40730 |
SLA A |
40732 |
EXX |
40733 |
LD HL,43452 |
40736 |
LD B,0 |
40738 |
LD C,A |
40739 |
ADD HL,BC |
40740 |
LD A,(HL) |
40741 |
LD (41071),A |
40744 |
INC HL |
40745 |
LD A,(HL) |
40746 |
LD (41072),A |
40749 |
JP 40879 |
40752 |
LD A,(43538) |
40755 |
LD C,A |
40756 |
LD B,0 |
40758 |
LD HL,(41071) |
40761 |
ADD HL,BC |
40762 |
LD A,(HL) |
40763 |
EXX |
40764 |
CP 128 |
40766 |
RET Z |
40767 |
ADD A,128 |
40769 |
LD E,A |
40770 |
LD A,(43607) |
40773 |
AND A |
40774 |
JR NZ,40785 |
40776 |
LD A,(41073) |
40779 |
LD HL,41074 |
40782 |
SUB (HL) |
40783 |
JR 40792 |
40785 |
LD A,(41074) |
40788 |
LD HL,41073 |
40791 |
SUB (HL) |
40792 |
ADD A,128 |
40794 |
LD C,A |
40795 |
LD HL,46206 |
40798 |
LD A,D |
40799 |
ADD A,L |
40800 |
LD L,A |
40801 |
LD A,(HL) |
40802 |
AND A |
40803 |
JR NZ,40835 |
40805 |
LD A,C |
40806 |
CP E |
40807 |
JR C,40812 |
40809 |
JR Z,40863 |
40811 |
RET |
40812 |
LD HL,43327 |
40815 |
LD A,D |
40816 |
ADD A,L |
40817 |
LD L,A |
40818 |
LD A,(HL) |
40819 |
ADD A,C |
40820 |
CP E |
40821 |
JR NC,40863 |
40823 |
LD A,D |
40824 |
LD HL,43352 |
40827 |
ADD A,L |
40828 |
LD L,A |
40829 |
LD A,(HL) |
40830 |
ADD A,C |
40831 |
CP E |
40832 |
JR NC,40871 |
40834 |
RET |
40835 |
LD A,C |
40836 |
CP E |
40837 |
JR Z,40863 |
40839 |
RET C |
40840 |
LD A,D |
40841 |
LD HL,43327 |
40844 |
ADD A,L |
40845 |
LD L,A |
40846 |
LD A,C |
40847 |
SUB (HL) |
40848 |
CP E |
40849 |
JR C,40863 |
40851 |
LD A,D |
40852 |
LD HL,43352 |
40855 |
ADD A,L |
40856 |
LD L,A |
40857 |
LD A,C |
40858 |
SUB (HL) |
40859 |
CP E |
40860 |
JR C,40871 |
40862 |
RET |
40863 |
LD A,2 |
40865 |
LD (43592),A |
40868 |
JP 40988 |
40871 |
LD A,1 |
40873 |
LD (43592),A |
40876 |
JP 40988 |
40879 |
LD HL,(41071) |
40882 |
LD A,(43538) |
40885 |
LD C,A |
40886 |
LD B,0 |
40888 |
ADD HL,BC |
40889 |
LD A,(HL) |
40890 |
EXX |
40891 |
CP 128 |
40893 |
RET Z |
40894 |
ADD A,128 |
40896 |
LD E,A |
40897 |
LD A,(43607) |
40900 |
AND A |
40901 |
JR Z,40912 |
40903 |
LD A,(41073) |
40906 |
LD HL,41074 |
40909 |
SUB (HL) |
40910 |
JR 40919 |
40912 |
LD A,(41074) |
40915 |
LD HL,41073 |
40918 |
SUB (HL) |
40919 |
ADD A,128 |
40921 |
LD C,A |
40922 |
LD HL,46206 |
40925 |
LD A,D |
40926 |
ADD A,L |
40927 |
LD L,A |
40928 |
LD A,(HL) |
40929 |
AND A |
40930 |
JR NZ,40960 |
40932 |
LD A,C |
40933 |
CP E |
40934 |
JR Z,40863 |
40936 |
RET C |
40937 |
LD A,D |
40938 |
LD HL,43327 |
40941 |
ADD A,L |
40942 |
LD L,A |
40943 |
LD A,C |
40944 |
SUB (HL) |
40945 |
CP E |
40946 |
JR C,40863 |
40948 |
LD A,D |
40949 |
LD HL,43352 |
40952 |
ADD A,L |
40953 |
LD L,A |
40954 |
LD A,C |
40955 |
SUB (HL) |
40956 |
CP E |
40957 |
JR C,40871 |
40959 |
RET |
40960 |
LD A,C |
40961 |
CP E |
40962 |
JR Z,40863 |
40964 |
RET NC |
40965 |
LD A,D |
40966 |
LD HL,43327 |
40969 |
ADD A,L |
40970 |
LD L,A |
40971 |
LD A,(HL) |
40972 |
ADD A,C |
40973 |
CP E |
40974 |
JR NC,40863 |
40976 |
LD A,D |
40977 |
LD HL,43352 |
40980 |
ADD A,L |
40981 |
LD L,A |
40982 |
LD A,(HL) |
40983 |
ADD A,C |
40984 |
CP E |
40985 |
JR NC,40871 |
40987 |
RET |
40988 |
LD A,D |
40989 |
LD (43583),A |
40992 |
LD HL,41075 |
40995 |
LD C,A |
40996 |
LD B,0 |
40998 |
ADD HL,BC |
40999 |
LD A,(HL) |
41000 |
LD (45392),A |
41003 |
LD A,(43607) |
41006 |
LD HL,43543 |
41009 |
CP (HL) |
41010 |
JR Z,41058 |
41012 |
LD A,D |
41013 |
LD HL,46206 |
41016 |
ADD A,L |
41017 |
LD L,A |
41018 |
LD A,(HL) |
41019 |
AND A |
41020 |
JR NZ,41052 |
41022 |
LD A,D |
41023 |
CP 24 |
41025 |
JR Z,41035 |
41027 |
CP 7 |
41029 |
JR Z,41035 |
41031 |
CP 12 |
41033 |
JR NZ,41046 |
41035 |
LD A,27 |
41037 |
LD (43523),A |
41040 |
LD A,4 |
41042 |
LD (45392),A |
41045 |
RET |
41046 |
LD A,22 |
41048 |
LD (43523),A |
41051 |
RET |
41052 |
LD A,26 |
41054 |
LD (43523),A |
41057 |
RET |
41058 |
LD A,D |
41059 |
LD HL,46206 |
41062 |
ADD A,L |
41063 |
LD L,A |
41064 |
LD A,(HL) |
41065 |
AND A |
41066 |
JR Z,41052 |
41068 |
JP 41046 |
41071 |
NOP |
41072 |
NOP |
41073 |
NOP |
41074 |
NOP |
41075 |
NOP |
41076 |
NOP |
41077 |
NOP |
41078 |
NOP |
41079 |
NOP |
41080 |
NOP |
41081 |
INC BC |
41082 |
LD B,0 |
41084 |
NOP |
41085 |
LD (BC),A |
41086 |
LD (BC),A |
41087 |
LD B,3 |
41089 |
LD (BC),A |
41090 |
LD (BC),A |
41091 |
LD (BC),A |
41092 |
LD B,0 |
41094 |
NOP |
41095 |
NOP |
41096 |
NOP |
41097 |
NOP |
41098 |
NOP |
41099 |
NOP |
41100 |
LD B,0 |
41102 |
NOP |
41103 |
NOP |
41104 |
LD A,(42484) |
41107 |
AND A |
41108 |
JR Z,41114 |
41110 |
LD (42486),A |
41113 |
RET |
41114 |
LD A,(42506) |
41117 |
LD (42476),A |
41120 |
LD A,(42564) |
41123 |
LD (42477),A |
41126 |
LD A,(42542) |
41129 |
AND A |
41130 |
JR Z,41150 |
41132 |
LD A,(42485) |
41135 |
CP 14 |
41137 |
JR Z,41144 |
41139 |
LD HL,42518 |
41142 |
DEC (HL) |
41143 |
RET NZ |
41144 |
LD A,1 |
41146 |
LD (42486),A |
41149 |
RET |
41150 |
LD A,(42520) |
41153 |
AND A |
41154 |
JP NZ,42323 |
41157 |
LD A,(42561) |
41160 |
AND A |
41161 |
JP NZ,41397 |
41164 |
LD A,(42543) |
41167 |
LD HL,43277 |
41170 |
ADD A,L |
41171 |
LD L,A |
41172 |
LD A,(HL) |
41173 |
AND A |
41174 |
JP Z,41397 |
41177 |
LD A,(42485) |
41180 |
CP 19 |
41182 |
JR Z,41188 |
41184 |
CP 20 |
41186 |
JR NZ,41212 |
41188 |
LD A,(42543) |
41191 |
LD HL,43302 |
41194 |
ADD A,L |
41195 |
LD L,A |
41196 |
LD A,(HL) |
41197 |
LD HL,42485 |
41200 |
CP (HL) |
41201 |
JR Z,41278 |
41203 |
LD A,1 |
41205 |
LD (42486),A |
41208 |
LD (42481),A |
41211 |
RET |
41212 |
LD A,(42485) |
41215 |
CP 18 |
41217 |
JP Z,41397 |
41220 |
CP 1 |
41222 |
JR Z,41285 |
41224 |
CP 3 |
41226 |
JR Z,41285 |
41228 |
CP 2 |
41230 |
JR Z,41285 |
41232 |
LD A,(42490) |
41235 |
AND A |
41236 |
JR NZ,41203 |
41238 |
LD A,(42503) |
41241 |
AND A |
41242 |
JR NZ,41203 |
41244 |
LD A,(42543) |
41247 |
CP 10 |
41249 |
JR Z,41255 |
41251 |
CP 16 |
41253 |
JR NZ,41278 |
41255 |
LD A,(42485) |
41258 |
CP 10 |
41260 |
JR Z,41278 |
41262 |
CP 16 |
41264 |
JR Z,41278 |
41266 |
CP 4 |
41268 |
JR Z,41278 |
41270 |
CP 7 |
41272 |
JR Z,41278 |
41274 |
CP 11 |
41276 |
JR NZ,41203 |
41278 |
LD A,(42481) |
41281 |
LD (42486),A |
41284 |
RET |
41285 |
CALL 42371 |
41288 |
AND A |
41289 |
JP Z,41397 |
41292 |
LD A,(42523) |
41295 |
AND A |
41296 |
JR Z,41325 |
41298 |
JP P,41313 |
41301 |
CALL Random_Number |
41304 |
LD HL,42507 |
41307 |
AND (HL) |
41308 |
JR Z,41325 |
41310 |
LD (42523),A |
41313 |
LD HL,42523 |
41316 |
DEC (HL) |
41317 |
JP NZ,41397 |
41320 |
LD A,128 |
41322 |
LD (42523),A |
41325 |
CALL Random_Number |
41328 |
LD HL,42566 |
41331 |
AND (HL) |
41332 |
JP M,41703 |
41335 |
LD B,A |
41336 |
AND 112 |
41338 |
JR NZ,41381 |
41340 |
LD A,B |
41341 |
AND 15 |
41343 |
JR NZ,41365 |
41345 |
CALL Random_Number |
41348 |
AND A |
41349 |
JP M,41356 |
41352 |
LD A,11 |
41354 |
JR NZ,41358 |
41356 |
LD A,9 |
41358 |
LD (42481),A |
41361 |
LD (42486),A |
41364 |
RET |
41365 |
LD A,(42543) |
41368 |
LD HL,46013 |
41371 |
ADD A,L |
41372 |
LD L,A |
41373 |
LD A,(HL) |
41374 |
AND A |
41375 |
JR Z,41381 |
41377 |
LD (42520),A |
41380 |
RET |
41381 |
LD A,(42543) |
41384 |
LD HL,43302 |
41387 |
ADD A,L |
41388 |
LD L,A |
41389 |
LD A,(HL) |
41390 |
LD (42486),A |
41393 |
LD (42481),A |
41396 |
RET |
41397 |
LD A,(42503) |
41400 |
AND A |
41401 |
JR NZ,41514 |
41403 |
LD A,(42490) |
41406 |
AND A |
41407 |
JR Z,41499 |
41409 |
LD A,(42485) |
41412 |
CP 4 |
41414 |
JR Z,41514 |
41416 |
CP 18 |
41418 |
JR NZ,41460 |
41420 |
LD A,(42510) |
41423 |
AND A |
41424 |
JR Z,41514 |
41426 |
LD A,1 |
41428 |
LD (42481),A |
41431 |
LD (42486),A |
41434 |
LD (42485),A |
41437 |
LD (42493),A |
41440 |
LD A,(42504) |
41443 |
XOR 1 |
41445 |
LD (42504),A |
41448 |
LD A,0 |
41450 |
LD (42490),A |
41453 |
LD (42510),A |
41456 |
LD (42492),A |
41459 |
RET |
41460 |
LD A,(42524) |
41463 |
AND A |
41464 |
JP P,41479 |
41467 |
CALL Random_Number |
41470 |
LD HL,42511 |
41473 |
AND (HL) |
41474 |
LD (42524),A |
41477 |
JR 41514 |
41479 |
LD HL,42524 |
41482 |
DEC (HL) |
41483 |
JR NZ,41514 |
41485 |
LD A,1 |
41487 |
LD (42481),A |
41490 |
LD (42486),A |
41493 |
LD A,128 |
41495 |
LD (42524),A |
41498 |
RET |
41499 |
LD A,(42485) |
41502 |
CP 1 |
41504 |
JR Z,41521 |
41506 |
CP 3 |
41508 |
JR Z,41521 |
41510 |
CP 2 |
41512 |
JR Z,41521 |
41514 |
LD A,(42481) |
41517 |
LD (42486),A |
41520 |
RET |
41521 |
LD A,(42504) |
41524 |
LD HL,42562 |
41527 |
CP (HL) |
41528 |
JR Z,41632 |
41530 |
AND A |
41531 |
JP NZ,41543 |
41534 |
LD A,(42477) |
41537 |
LD HL,42476 |
41540 |
SUB (HL) |
41541 |
JR 41550 |
41543 |
LD A,(42476) |
41546 |
LD HL,42477 |
41549 |
SUB (HL) |
41550 |
LD (42478),A |
41553 |
CP 213 |
41555 |
JR NC,41671 |
41557 |
CP 21 |
41559 |
JR C,41671 |
41561 |
CP 128 |
41563 |
JR NC,41618 |
41565 |
LD HL,42512 |
41568 |
DEC (HL) |
41569 |
JR NZ,41514 |
41571 |
LD A,(42485) |
41574 |
CP 2 |
41576 |
JR NZ,41599 |
41578 |
CALL Random_Number |
41581 |
LD HL,42522 |
41584 |
AND (HL) |
41585 |
JR Z,41599 |
41587 |
LD (42512),A |
41590 |
LD A,1 |
41592 |
LD (42486),A |
41595 |
LD (42481),A |
41598 |
RET |
41599 |
CALL Random_Number |
41602 |
LD HL,42521 |
41605 |
AND (HL) |
41606 |
LD (42512),A |
41609 |
LD A,2 |
41611 |
LD (42486),A |
41614 |
LD (42481),A |
41617 |
RET |
41618 |
LD A,18 |
41620 |
LD (42481),A |
41623 |
LD (42486),A |
41626 |
LD A,1 |
41628 |
LD (42510),A |
41631 |
RET |
41632 |
LD A,(42504) |
41635 |
AND A |
41636 |
JR Z,41647 |
41638 |
LD A,(42477) |
41641 |
LD HL,42476 |
41644 |
SUB (HL) |
41645 |
JR 41654 |
41647 |
LD A,(42476) |
41650 |
LD HL,42477 |
41653 |
SUB (HL) |
41654 |
LD (42478),A |
41657 |
CP 223 |
41659 |
JR NC,41671 |
41661 |
CP 31 |
41663 |
JR C,41671 |
41665 |
CP 128 |
41667 |
JR NC,41565 |
41669 |
JR 41618 |
41671 |
LD A,(42513) |
41674 |
AND A |
41675 |
JP P,41691 |
41678 |
CALL Random_Number |
41681 |
LD HL,42519 |
41684 |
AND (HL) |
41685 |
LD (42513),A |
41688 |
JP 41823 |
41691 |
LD HL,42513 |
41694 |
DEC (HL) |
41695 |
JP NZ,41823 |
41698 |
LD A,128 |
41700 |
LD (42513),A |
41703 |
LD A,(42504) |
41706 |
LD HL,42562 |
41709 |
CP (HL) |
41710 |
JP Z,41903 |
41713 |
LD A,(42543) |
41716 |
CP 19 |
41718 |
JR Z,41747 |
41720 |
CP 20 |
41722 |
JR NZ,41765 |
41724 |
CALL Random_Number |
41727 |
AND 3 |
41729 |
LD HL,43268 |
41732 |
ADD A,L |
41733 |
LD L,A |
41734 |
LD A,(HL) |
41735 |
CP 7 |
41737 |
JP Z,41889 |
41740 |
LD (42481),A |
41743 |
LD (42486),A |
41746 |
RET |
41747 |
CALL Random_Number |
41750 |
AND 3 |
41752 |
LD HL,43264 |
41755 |
ADD A,L |
41756 |
LD L,A |
41757 |
LD A,(HL) |
41758 |
LD (42481),A |
41761 |
LD (42486),A |
41764 |
RET |
41765 |
LD A,(42478) |
41768 |
ADD A,51 |
41770 |
LD (42515),A |
41773 |
CALL Random_Number |
41776 |
LD HL,42514 |
41779 |
AND (HL) |
41780 |
LD HL,42515 |
41783 |
ADD A,(HL) |
41784 |
LD HL,45824 |
41787 |
ADD A,L |
41788 |
LD L,A |
41789 |
LD A,(HL) |
41790 |
CP 14 |
41792 |
JR Z,41859 |
41794 |
CALL 42108 |
41797 |
CP 10 |
41799 |
JR Z,41872 |
41801 |
CP 7 |
41803 |
JP Z,41889 |
41806 |
CP 15 |
41808 |
JP Z,41946 |
41811 |
CP 16 |
41813 |
JP Z,41946 |
41816 |
LD (42481),A |
41819 |
LD (42486),A |
41822 |
RET |
41823 |
LD A,(42561) |
41826 |
AND A |
41827 |
JP NZ,41514 |
41830 |
LD A,(42548) |
41833 |
AND A |
41834 |
JP NZ,41514 |
41837 |
LD A,(42543) |
41840 |
LD HL,43277 |
41843 |
ADD A,L |
41844 |
LD L,A |
41845 |
LD A,(HL) |
41846 |
AND A |
41847 |
JP Z,41514 |
41850 |
LD A,1 |
41852 |
LD (42486),A |
41855 |
LD (42481),A |
41858 |
RET |
41859 |
LD B,A |
41860 |
LD A,(42516) |
41863 |
CP 7 |
41865 |
LD A,B |
41866 |
JR C,41816 |
41868 |
LD A,2 |
41870 |
JR NZ,41816 |
41872 |
LD A,(42516) |
41875 |
CP 2 |
41877 |
JR NC,41880 |
41879 |
RET |
41880 |
LD A,10 |
41882 |
LD (42481),A |
41885 |
LD (42486),A |
41888 |
RET |
41889 |
LD A,5 |
41891 |
LD (42520),A |
41894 |
LD A,4 |
41896 |
LD (42486),A |
41899 |
LD (42481),A |
41902 |
RET |
41903 |
LD A,(42478) |
41906 |
ADD A,41 |
41908 |
LD (42515),A |
41911 |
CALL Random_Number |
41914 |
LD HL,42514 |
41917 |
AND (HL) |
41918 |
LD HL,42515 |
41921 |
ADD A,(HL) |
41922 |
LD HL,45906 |
41925 |
ADD A,L |
41926 |
LD L,A |
41927 |
LD A,(HL) |
41928 |
CALL 42108 |
41931 |
CP 15 |
41933 |
JR Z,41946 |
41935 |
CP 16 |
41937 |
JR Z,41946 |
41939 |
LD (42481),A |
41942 |
LD (42486),A |
41945 |
RET |
41946 |
LD B,A |
41947 |
CALL Random_Number |
41950 |
LD HL,42517 |
41953 |
AND (HL) |
41954 |
JP M,41618 |
41957 |
CP 64 |
41959 |
JR NC,41975 |
41961 |
CP 32 |
41963 |
JR C,41967 |
41965 |
LD B,8 |
41967 |
LD A,B |
41968 |
LD (42486),A |
41971 |
LD (42481),A |
41974 |
RET |
41975 |
LD A,3 |
41977 |
LD (42486),A |
41980 |
LD (42481),A |