-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathprolog.asm
9948 lines (9877 loc) · 566 KB
/
prolog.asm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
; z80dasm 1.1.3
; command line: z80dasm -a -t -l -g 24576 -b blocks.txt prolog.bin
; ROM routines
ROM_LD_EDGE_1: equ 005e7h
ROM_LD_EDGE_2: equ 005e3h
ROM_OUT_CURS_WITHOUT_CHECK: equ 018e8h
ROM_INPUT_AD: equ 015e6h
ROM_PRINT_A_2: equ 015f2h
; system variables
SYSVAR_ERR_SP: equ 05c3dh ; Address of item on machine stack to use as error return
SYSVAR_CHANS: equ 05c4fh ; Address of channel data
SYSVAR_CURCHL: equ 05c51h ; Address of information used for input and output
SYSVAR_SCR_CT: equ 05c8ch ; Scroll counter
SYSVAR_ATTR_T: equ 05c8fh ; Temporary current colours
SYSVAR_ATTR_P: equ 05c8dh ; Permanent current colours
SYSVAR_COORDS: equ 05c7dh ; Coordinates of last point plotted
SYSVAR_MODE: equ 05c41h ; Specifies K, L, C, E or G cursor
SYSVAR_S_POSNL2: equ 05c8bh ; Like S-POSN for lower part of screen
SYSVAR_DF_SZ: equ 05c6bh ; The number of lines in the lower part of the screen
SYSVAR_BORDCR: equ 05c48h ; Border colour
SYSVAR_SEED: equ 05c76h ; The seed for RND
SYSVAR_FRAMES: equ 05c78h ; Frame counter
SYSVAR_P_FLAG: equ 05c91h ; More flags
org 06000h
l6000h:
inc bc ;6000 03 . (flow from: )
adc a,c ;6001 89 . (flow from: 6000)
ld (hl),l ;6002 75 u (flow from: 6001)
l6003h:
ld sp,0ffffh ;6003 31 ff ff 1 . . (flow from: 6002)
nop ;6006 00 . (flow from: 6003)
ld hl,l6286h ;6007 21 86 62 ! . b (flow from: 6006)
push hl ;600a e5 . (flow from: 6007)
ld (09803h),sp ;600b ed 73 03 98 . s . . (flow from: 600a)
ld (SYSVAR_ERR_SP),sp ;600f ed 73 3d 5c . s = \ (flow from: 600b)
ld hl,0ffffh ;6013 21 ff ff ! . . (flow from: 600f)
ld (0985bh),hl ;6016 22 5b 98 " [ . (flow from: 6013)
call sub_9629h ;6019 cd 29 96 . ) . (flow from: 6016)
ld hl,(09805h) ;601c 2a 05 98 * . . (flow from: 9748)
inc hl ;601f 23 # (flow from: 601c)
ld (hl),0ffh ;6020 36 ff 6 . (flow from: 601f)
inc hl ;6022 23 # (flow from: 6020)
ld (hl),0ffh ;6023 36 ff 6 . (flow from: 6022)
l6025h:
ld hl,l8834h ;6025 21 34 88 ! 4 . (flow from: 6023)
ld (09841h),hl ;6028 22 41 98 " A . (flow from: 6025)
ld hl,l884ch ;602b 21 4c 88 ! L . (flow from: 6028)
ld (09845h),hl ;602e 22 45 98 " E . (flow from: 602b)
ld hl,l849dh ;6031 21 9d 84 ! . . (flow from: 602e)
ld (09849h),hl ;6034 22 49 98 " I . (flow from: 6031)
ld hl,(09837h) ;6037 2a 37 98 * 7 . (flow from: 6034)
ld (0984bh),hl ;603a 22 4b 98 " K . (flow from: 6037)
call sub_6312h ;603d cd 12 63 . . c (flow from: 603a)
ld hl,(0983dh) ;6040 2a 3d 98 * = . (flow from: 639b)
ld ix,(0983dh) ;6043 dd 2a 3d 98 . * = . (flow from: 6040)
ld (0983fh),hl ;6047 22 3f 98 " ? . (flow from: 6043)
ld (09843h),hl ;604a 22 43 98 " C . (flow from: 6047)
ld (09847h),hl ;604d 22 47 98 " G . (flow from: 604a)
ld (ix+002h),l ;6050 dd 75 02 . u . (flow from: 604d)
ld (ix+003h),h ;6053 dd 74 03 . t . (flow from: 6050)
ld (ix+006h),l ;6056 dd 75 06 . u . (flow from: 6053)
ld (ix+007h),h ;6059 dd 74 07 . t . (flow from: 6056)
l605ch:
ld ix,(09843h) ;605c dd 2a 43 98 . * C . (flow from: 6059 6167 624c)
ld e,(ix+00ah) ;6060 dd 5e 0a . ^ . (flow from: 605c)
ld d,(ix+00bh) ;6063 dd 56 0b . V . (flow from: 6060)
ld (09853h),de ;6066 ed 53 53 98 . S S . (flow from: 6063)
call sub_7310h ;606a cd 10 73 . . s (flow from: 6066)
ld hl,(09845h) ;606d 2a 45 98 * E . (flow from: 734b)
ld a,(hl) ;6070 7e ~ (flow from: 606d)
cp 003h ;6071 fe 03 . . (flow from: 6070)
jp nz,l6290h ;6073 c2 90 62 . . b (flow from: 6071)
call sub_9623h ;6076 cd 23 96 . # . (flow from: 6073)
call sub_6575h ;6079 cd 75 65 . u e (flow from: 9628)
cp 003h ;607c fe 03 . . (flow from: 658a)
jr z,l6097h ;607e 28 17 ( . (flow from: 607c)
cp 008h ;6080 fe 08 . . (flow from: 607e)
jp nz,l6290h ;6082 c2 90 62 . . b (flow from: 6080)
call sub_9623h ;6085 cd 23 96 . # . (flow from: 6082)
ld a,(hl) ;6088 7e ~ (flow from: 9628)
cp 004h ;6089 fe 04 . . (flow from: 6088)
jp nz,l6290h ;608b c2 90 62 . . b (flow from: 6089)
ld bc,l849dh ;608e 01 9d 84 . . . (flow from: 608b)
ld (0984fh),bc ;6091 ed 43 4f 98 . C O . (flow from: 608e)
jr l60b3h ;6095 18 1c . . (flow from: 6091)
l6097h:
call sub_9623h ;6097 cd 23 96 . # . (flow from: 607e)
inc hl ;609a 23 # (flow from: 9628)
inc hl ;609b 23 # (flow from: 609a)
inc hl ;609c 23 # (flow from: 609b)
ld (0984fh),hl ;609d 22 4f 98 " O . (flow from: 609c)
dec hl ;60a0 2b + (flow from: 609d)
dec hl ;60a1 2b + (flow from: 60a0)
dec hl ;60a2 2b + (flow from: 60a1)
call sub_6575h ;60a3 cd 75 65 . u e (flow from: 60a2)
cp 008h ;60a6 fe 08 . . (flow from: 658a)
jp nz,l6290h ;60a8 c2 90 62 . . b (flow from: 60a6)
call sub_9623h ;60ab cd 23 96 . # . (flow from: 60a8)
ld a,(hl) ;60ae 7e ~ (flow from: 9628)
cp 004h ;60af fe 04 . . (flow from: 60ae)
jr nz,l60dbh ;60b1 20 28 ( (flow from: 60af)
l60b3h:
push de ;60b3 d5 . (flow from: 6095 60b1)
ld de,l60bch ;60b4 11 bc 60 . . ` (flow from: 60b3)
push de ;60b7 d5 . (flow from: 60b4)
call sub_9623h ;60b8 cd 23 96 . # . (flow from: 60b7)
jp (hl) ;60bb e9 . (flow from: 9628)
l60bch:
pop de ;60bc d1 . (flow from: 663d 6679 768a 7823 7e37)
jp nz,l624fh ;60bd c2 4f 62 . O b (flow from: 60bc)
ld hl,(09845h) ;60c0 2a 45 98 * E . (flow from: 60bd)
call sub_9623h ;60c3 cd 23 96 . # . (flow from: 60c0)
inc hl ;60c6 23 # (flow from: 9628)
inc hl ;60c7 23 # (flow from: 60c6)
inc hl ;60c8 23 # (flow from: 60c7)
call sub_6575h ;60c9 cd 75 65 . u e (flow from: 60c8)
ld (09845h),hl ;60cc 22 45 98 " E . (flow from: 658a)
cp 010h ;60cf fe 10 . . (flow from: 60cc)
ld bc,(09843h) ;60d1 ed 4b 43 98 . K C . (flow from: 60cf)
ld ix,(09843h) ;60d5 dd 2a 43 98 . * C . (flow from: 60d1)
jr l6144h ;60d9 18 69 . i (flow from: 60d5)
l60dbh:
cp 003h ;60db fe 03 . . (flow from: 60b1)
jp nz,l62a4h ;60dd c2 a4 62 . . b (flow from: 60db)
ld (09841h),hl ;60e0 22 41 98 " A . (flow from: 60dd)
l60e3h:
call sub_6312h ;60e3 cd 12 63 . . c (flow from: 60e0 6256)
jp nz,l624fh ;60e6 c2 4f 62 . O b (flow from: 639b 63a3)
ld ix,(09843h) ;60e9 dd 2a 43 98 . * C . (flow from: 60e6)
ld e,(ix+00ah) ;60ed dd 5e 0a . ^ . (flow from: 60e9)
ld d,(ix+00bh) ;60f0 dd 56 0b . V . (flow from: 60ed)
ld (09853h),de ;60f3 ed 53 53 98 . S S . (flow from: 60f0)
ld hl,(09845h) ;60f7 2a 45 98 * E . (flow from: 60f3)
call sub_9623h ;60fa cd 23 96 . # . (flow from: 60f7)
call sub_6575h ;60fd cd 75 65 . u e (flow from: 9628)
call sub_9623h ;6100 cd 23 96 . # . (flow from: 658a)
inc hl ;6103 23 # (flow from: 9628)
inc hl ;6104 23 # (flow from: 6103)
inc hl ;6105 23 # (flow from: 6104)
l6106h:
ex de,hl ;6106 eb . (flow from: 6105)
ld hl,(09851h) ;6107 2a 51 98 * Q . (flow from: 6106)
ld b,000h ;610a 06 00 . . (flow from: 6107)
call sub_63edh ;610c cd ed 63 . . c (flow from: 610a)
jp nz,l624fh ;610f c2 4f 62 . O b (flow from: 6481 64ae 6504)
ld hl,(0984dh) ;6112 2a 4d 98 * M . (flow from: 610f)
ld de,(09855h) ;6115 ed 5b 55 98 . [ U . (flow from: 6112)
call sub_6575h ;6119 cd 75 65 . u e (flow from: 6115)
cp 010h ;611c fe 10 . . (flow from: 658a)
jr nz,l616ah ;611e 20 4a J (flow from: 611c)
ld ix,(0983dh) ;6120 dd 2a 3d 98 . * = .
l6124h:
ld l,(ix+004h) ;6124 dd 6e 04 . n . (flow from: 6144)
ld h,(ix+005h) ;6127 dd 66 05 . f . (flow from: 6124)
call sub_9623h ;612a cd 23 96 . # . (flow from: 6127)
inc hl ;612d 23 # (flow from: 9628)
inc hl ;612e 23 # (flow from: 612d)
inc hl ;612f 23 # (flow from: 612e)
ld c,(ix+002h) ;6130 dd 4e 02 . N . (flow from: 612f)
ld b,(ix+003h) ;6133 dd 46 03 . F . (flow from: 6130)
push bc ;6136 c5 . (flow from: 6133)
pop ix ;6137 dd e1 . . (flow from: 6136)
ld e,(ix+00ah) ;6139 dd 5e 0a . ^ . (flow from: 6137)
ld d,(ix+00bh) ;613c dd 56 0b . V . (flow from: 6139)
call sub_6575h ;613f cd 75 65 . u e (flow from: 613c)
cp 010h ;6142 fe 10 . . (flow from: 658a)
l6144h:
jr z,l6124h ;6144 28 de ( . (flow from: 60d9 6142)
cp 003h ;6146 fe 03 . . (flow from: 6144)
jp nz,l6290h ;6148 c2 90 62 . . b (flow from: 6146)
ld d,b ;614b 50 P (flow from: 6148)
ld e,c ;614c 59 Y (flow from: 614b)
ld (09843h),de ;614d ed 53 43 98 . S C . (flow from: 614c)
ld (09845h),hl ;6151 22 45 98 " E . (flow from: 614d)
ld hl,(09847h) ;6154 2a 47 98 * G . (flow from: 6151)
call sub_65f1h ;6157 cd f1 65 . . e (flow from: 6154)
jr nc,l615dh ;615a 30 01 0 . (flow from: 65f6)
ex de,hl ;615c eb . (flow from: 615a)
l615dh:
ld (0983dh),hl ;615d 22 3d 98 " = . (flow from: 615a 615c)
ld de,0000ch ;6160 11 0c 00 . . . (flow from: 615d)
add hl,de ;6163 19 . (flow from: 6160)
ld (0984bh),hl ;6164 22 4b 98 " K . (flow from: 6163)
jp l605ch ;6167 c3 5c 60 . \ ` (flow from: 6164)
l616ah:
cp 003h ;616a fe 03 . . (flow from: 611e)
jp nz,l6290h ;616c c2 90 62 . . b (flow from: 616a)
ld de,(09845h) ;616f ed 5b 45 98 . [ E . (flow from: 616c)
ld (09845h),hl ;6173 22 45 98 " E . (flow from: 616f)
ex de,hl ;6176 eb . (flow from: 6173)
call sub_9623h ;6177 cd 23 96 . # . (flow from: 6176)
inc hl ;617a 23 # (flow from: 9628)
inc hl ;617b 23 # (flow from: 617a)
inc hl ;617c 23 # (flow from: 617b)
ld de,(09853h) ;617d ed 5b 53 98 . [ S . (flow from: 617c)
call sub_6575h ;6181 cd 75 65 . u e (flow from: 617d)
cp 010h ;6184 fe 10 . . (flow from: 658a)
jp nz,l6246h ;6186 c2 46 62 . F b (flow from: 6184)
ld hl,(09857h) ;6189 2a 57 98 * W . (flow from: 6186)
ld de,(09843h) ;618c ed 5b 43 98 . [ C . (flow from: 6189)
or a ;6190 b7 . (flow from: 618c)
sbc hl,de ;6191 ed 52 . R (flow from: 6190)
jp nz,l6246h ;6193 c2 46 62 . F b (flow from: 6191)
ld hl,(09847h) ;6196 2a 47 98 * G . (flow from: 6193)
or a ;6199 b7 . (flow from: 6196)
sbc hl,de ;619a ed 52 . R (flow from: 6199)
jp nc,l6246h ;619c d2 46 62 . F b (flow from: 619a)
ld hl,(09853h) ;619f 2a 53 98 * S . (flow from: 619c)
ld de,(09855h) ;61a2 ed 5b 55 98 . [ U . (flow from: 619f)
or a ;61a6 b7 . (flow from: 61a2)
sbc hl,de ;61a7 ed 52 . R (flow from: 61a6)
ex de,hl ;61a9 eb . (flow from: 61a7)
ld bc,(09845h) ;61aa ed 4b 45 98 . K E . (flow from: 61a9)
dec hl ;61ae 2b + (flow from: 61aa)
or a ;61af b7 . (flow from: 61ae)
sbc hl,bc ;61b0 ed 42 . B (flow from: 61af)
jr nc,l61c2h ;61b2 30 0e 0 . (flow from: 61b0)
ld hl,(0983dh) ;61b4 2a 3d 98 * = .
or a ;61b7 b7 .
sbc hl,bc ;61b8 ed 42 . B
jr c,l61c2h ;61ba 38 06 8 .
ld h,b ;61bc 60 `
ld l,c ;61bd 69 i
add hl,de ;61be 19 .
ld (09845h),hl ;61bf 22 45 98 " E .
l61c2h:
ld bc,(09855h) ;61c2 ed 4b 55 98 . K U . (flow from: 61b2)
ld hl,(0983dh) ;61c6 2a 3d 98 * = . (flow from: 61c2)
or a ;61c9 b7 . (flow from: 61c6)
sbc hl,bc ;61ca ed 42 . B (flow from: 61c9)
jr z,l621ch ;61cc 28 4e ( N (flow from: 61ca)
ld b,l ;61ce 45 E (flow from: 61cc)
ld (09859h),de ;61cf ed 53 59 98 . S Y . (flow from: 61ce)
ld hl,(09855h) ;61d3 2a 55 98 * U . (flow from: 61cf)
l61d6h:
ld a,(hl) ;61d6 7e ~ (flow from: 61d3 621a)
cp 001h ;61d7 fe 01 . . (flow from: 61d6)
jr nz,l6215h ;61d9 20 3a : (flow from: 61d7)
push hl ;61db e5 .
call sub_9623h ;61dc cd 23 96 . # .
ex de,hl ;61df eb .
ld hl,(09853h) ;61e0 2a 53 98 * S .
dec hl ;61e3 2b +
or a ;61e4 b7 .
sbc hl,de ;61e5 ed 52 . R
jr nc,l6214h ;61e7 30 2b 0 +
ld hl,(09843h) ;61e9 2a 43 98 * C .
or a ;61ec b7 .
sbc hl,de ;61ed ed 52 . R
jr c,l6214h ;61ef 38 23 8 #
ld a,(de) ;61f1 1a .
cp 000h ;61f2 fe 00 . .
jr nz,l620ah ;61f4 20 14 .
pop hl ;61f6 e1 .
push hl ;61f7 e5 .
ld (hl),000h ;61f8 36 00 6 .
push de ;61fa d5 .
ld de,(09859h) ;61fb ed 5b 59 98 . [ Y .
add hl,de ;61ff 19 .
pop de ;6200 d1 .
ex de,hl ;6201 eb .
ld (hl),001h ;6202 36 01 6 .
inc hl ;6204 23 #
ld (hl),e ;6205 73 s
inc hl ;6206 23 #
ld (hl),d ;6207 72 r
jr l6214h ;6208 18 0a . .
l620ah:
pop hl ;620a e1 .
push hl ;620b e5 .
ex de,hl ;620c eb .
push bc ;620d c5 .
ld bc,00003h ;620e 01 03 00 . . .
ldir ;6211 ed b0 . .
pop bc ;6213 c1 .
l6214h:
pop hl ;6214 e1 .
l6215h:
inc hl ;6215 23 # (flow from: 61d9)
inc hl ;6216 23 # (flow from: 6215)
inc hl ;6217 23 # (flow from: 6216)
dec b ;6218 05 . (flow from: 6217)
dec b ;6219 05 . (flow from: 6218)
djnz l61d6h ;621a 10 ba . . (flow from: 6219)
l621ch:
ld de,(0983dh) ;621c ed 5b 3d 98 . [ = . (flow from: 621a)
ld hl,(09843h) ;6220 2a 43 98 * C . (flow from: 621c)
ld bc,0000ch ;6223 01 0c 00 . . . (flow from: 6220)
ldir ;6226 ed b0 . . (flow from: 6223 6226)
ld de,(09855h) ;6228 ed 5b 55 98 . [ U . (flow from: 6226)
ld hl,(0984bh) ;622c 2a 4b 98 * K . (flow from: 6228)
or a ;622f b7 . (flow from: 622c)
sbc hl,de ;6230 ed 52 . R (flow from: 622f)
ld b,h ;6232 44 D (flow from: 6230)
ld c,l ;6233 4d M (flow from: 6232)
ex de,hl ;6234 eb . (flow from: 6233)
ld de,(09853h) ;6235 ed 5b 53 98 . [ S . (flow from: 6234)
ldir ;6239 ed b0 . . (flow from: 6235 6239)
ld (0984bh),de ;623b ed 53 4b 98 . S K . (flow from: 6239)
ld hl,0fff4h ;623f 21 f4 ff ! . . (flow from: 623b)
add hl,de ;6242 19 . (flow from: 623f)
ld (0983dh),hl ;6243 22 3d 98 " = . (flow from: 6242)
l6246h:
ld hl,(0983dh) ;6246 2a 3d 98 * = . (flow from: 6186 619c 6243)
ld (09843h),hl ;6249 22 43 98 " C . (flow from: 6246)
jp l605ch ;624c c3 5c 60 . \ ` (flow from: 6249)
l624fh:
ld ix,(09847h) ;624f dd 2a 47 98 . * G . (flow from: 60bd 610f)
call sub_63a4h ;6253 cd a4 63 . . c (flow from: 624f)
jp l60e3h ;6256 c3 e3 60 . . ` (flow from: 63ec)
sub_6259h:
call sub_7296h ;6259 cd 96 72 . . r
out (0f9h),a ;625c d3 f9 . .
di ;625e f3 .
call p,0ede5h ;625f f4 e5 ed . . .
and b ;6262 a0 .
pop bc ;6263 c1 .
jp po,0f2efh ;6264 e2 ef f2 . . .
call p,0c300h ;6267 f4 00 c3 . . .
inc bc ;626a 03 .
ld h,b ;626b 60 `
l626ch:
ld hl,nospace_string_start ;626c 21 e9 62 ! . b
jr l6274h ;626f 18 03 . .
l6271h:
ld hl,dictfull_string_start;6271 21 f8 62 ! . b
l6274h:
call sub_72a1h ;6274 cd a1 72 . . r
call sub_739bh ;6277 cd 9b 73 . . s
ld sp,(09803h) ;627a ed 7b 03 98 . { . .
jp l6025h ;627e c3 25 60 . % `
l6281h:
ld hl,0000bh ;6281 21 0b 00 ! . .
jr l62a7h ;6284 18 21 . !
l6286h:
ld h,000h ;6286 26 00 & .
ld l,(iy+000h) ;6288 fd 6e 00 . n .
inc l ;628b 2c ,
inc l ;628c 2c ,
inc l ;628d 2c ,
jr l62a7h ;628e 18 17 . .
l6290h:
ld hl,00003h ;6290 21 03 00 ! . .
jr l62a7h ;6293 18 12 . .
l6295h:
ld hl,00005h ;6295 21 05 00 ! . .
jr l62a7h ;6298 18 0d . .
l629ah:
ld hl,00001h ;629a 21 01 00 ! . .
jr l62a7h ;629d 18 08 . .
l629fh:
ld hl,00000h ;629f 21 00 00 ! . .
jr l62a7h ;62a2 18 03 . .
l62a4h:
ld hl,00002h ;62a4 21 02 00 ! . .
l62a7h:
ld sp,(09803h) ;62a7 ed 7b 03 98 . { . .
push hl ;62ab e5 .
call sub_739bh ;62ac cd 9b 73 . . s
ld hl,(09b1ah) ;62af 2a 1a 9b * . .
ld a,(hl) ;62b2 7e ~
cp 003h ;62b3 fe 03 . .
jr z,l62c7h ;62b5 28 10 ( .
ld hl,dictfull_string_end ;62b7 21 09 63 ! . c
call sub_72a1h ;62ba cd a1 72 . . r
pop hl ;62bd e1 .
call sub_6b26h ;62be cd 26 6b . & k
call sub_72f8h ;62c1 cd f8 72 . . r
jp l6025h ;62c4 c3 25 60 . % `
l62c7h:
ld hl,l8aefh ;62c7 21 ef 8a ! . .
ld (09841h),hl ;62ca 22 41 98 " A .
call sub_6312h ;62cd cd 12 63 . . c
ld hl,(09855h) ;62d0 2a 55 98 * U .
pop de ;62d3 d1 .
ld (hl),004h ;62d4 36 04 6 .
inc hl ;62d6 23 #
ld (hl),e ;62d7 73 s
inc hl ;62d8 23 #
ld (hl),d ;62d9 72 r
ld hl,(09845h) ;62da 2a 45 98 * E .
ld a,(hl) ;62dd 7e ~
cp 003h ;62de fe 03 . .
jp nz,l6106h ;62e0 c2 06 61 . . a
call sub_9623h ;62e3 cd 23 96 . # .
jp l6106h ;62e6 c3 06 61 . . a
; BLOCK 'nospace_string' (start 0x62e9 end 0x62f7)
nospace_string_start:
defb 04eh ;62e9 4e N
defb 06fh ;62ea 6f o
defb 020h ;62eb 20
defb 053h ;62ec 53 S
defb 070h ;62ed 70 p
defb 061h ;62ee 61 a
defb 063h ;62ef 63 c
defb 065h ;62f0 65 e
defb 020h ;62f1 20
defb 06ch ;62f2 6c l
defb 065h ;62f3 65 e
defb 066h ;62f4 66 f
defb 074h ;62f5 74 t
defb 00dh ;62f6 0d .
nospace_string_end:
nop ;62f7 00 .
; BLOCK 'dictfull_string' (start 0x62f8 end 0x6309)
dictfull_string_start:
defb 044h ;62f8 44 D
defb 069h ;62f9 69 i
defb 063h ;62fa 63 c
defb 074h ;62fb 74 t
defb 069h ;62fc 69 i
defb 06fh ;62fd 6f o
defb 06eh ;62fe 6e n
defb 061h ;62ff 61 a
defb 072h ;6300 72 r
defb 079h ;6301 79 y
defb 020h ;6302 20
defb 066h ;6303 66 f
defb 075h ;6304 75 u
defb 06ch ;6305 6c l
defb 06ch ;6306 6c l
defb 00dh ;6307 0d .
defb 000h ;6308 00 .
dictfull_string_end:
ld b,l ;6309 45 E
ld (hl),d ;630a 72 r
ld (hl),d ;630b 72 r
ld l,a ;630c 6f o
ld (hl),d ;630d 72 r
ld a,(02020h) ;630e 3a 20 20 :
nop ;6311 00 .
sub_6312h:
ld hl,(0983dh) ;6312 2a 3d 98 * = . (flow from: 603d 60e3)
ld (09857h),hl ;6315 22 57 98 " W . (flow from: 6312)
ld hl,(09841h) ;6318 2a 41 98 * A . (flow from: 6315)
ld a,(hl) ;631b 7e ~ (flow from: 6318)
cp 003h ;631c fe 03 . . (flow from: 631b)
ret nz ;631e c0 . (flow from: 631c)
call sub_9623h ;631f cd 23 96 . # . (flow from: 631e)
ld a,(hl) ;6322 7e ~ (flow from: 9628)
cp 003h ;6323 fe 03 . . (flow from: 6322)
ret nz ;6325 c0 . (flow from: 6323)
push hl ;6326 e5 . (flow from: 6325)
call sub_9623h ;6327 cd 23 96 . # . (flow from: 6326)
push hl ;632a e5 . (flow from: 9628)
ld a,(hl) ;632b 7e ~ (flow from: 632a)
cp 004h ;632c fe 04 . . (flow from: 632b)
call nz,sub_6259h ;632e c4 59 62 . Y b (flow from: 632c)
call sub_9623h ;6331 cd 23 96 . # . (flow from: 632e)
push hl ;6334 e5 . (flow from: 9628)
push hl ;6335 e5 . (flow from: 6334)
add hl,hl ;6336 29 ) (flow from: 6335)
pop de ;6337 d1 . (flow from: 6336)
add hl,de ;6338 19 . (flow from: 6337)
ld de,00012h ;6339 11 12 00 . . . (flow from: 6338)
add hl,de ;633c 19 . (flow from: 6339)
ld de,(0984bh) ;633d ed 5b 4b 98 . [ K . (flow from: 633c)
add hl,de ;6341 19 . (flow from: 633d)
ld de,(0983bh) ;6342 ed 5b 3b 98 . [ ; . (flow from: 6341)
call sub_65f1h ;6346 cd f1 65 . . e (flow from: 6342)
jr c,l6358h ;6349 38 0d 8 . (flow from: 65f6)
call sub_6713h ;634b cd 13 67 . . g
ld de,(0983bh) ;634e ed 5b 3b 98 . [ ; .
or a ;6352 b7 .
sbc hl,de ;6353 ed 52 . R
jp nc,l626ch ;6355 d2 6c 62 . l b
l6358h:
pop bc ;6358 c1 . (flow from: 6349)
ld b,c ;6359 41 A (flow from: 6358)
inc b ;635a 04 . (flow from: 6359)
dec b ;635b 05 . (flow from: 635a)
ld hl,(0984bh) ;635c 2a 4b 98 * K . (flow from: 635b)
ld (09855h),hl ;635f 22 55 98 " U . (flow from: 635c)
jr z,l636bh ;6362 28 07 ( . (flow from: 635f)
l6364h:
ld (hl),000h ;6364 36 00 6 . (flow from: 6362 6369)
inc hl ;6366 23 # (flow from: 6364)
inc hl ;6367 23 # (flow from: 6366)
inc hl ;6368 23 # (flow from: 6367)
djnz l6364h ;6369 10 f9 . . (flow from: 6368)
l636bh:
ld (0983dh),hl ;636b 22 3d 98 " = . (flow from: 6362 6369)
pop hl ;636e e1 . (flow from: 636b)
inc hl ;636f 23 # (flow from: 636e)
inc hl ;6370 23 # (flow from: 636f)
inc hl ;6371 23 # (flow from: 6370)
call sub_9623h ;6372 cd 23 96 . # . (flow from: 6371)
ld (09851h),hl ;6375 22 51 98 " Q . (flow from: 9628)
inc hl ;6378 23 # (flow from: 6375)
inc hl ;6379 23 # (flow from: 6378)
inc hl ;637a 23 # (flow from: 6379)
ld (0984dh),hl ;637b 22 4d 98 " M . (flow from: 637a)
pop hl ;637e e1 . (flow from: 637b)
inc hl ;637f 23 # (flow from: 637e)
inc hl ;6380 23 # (flow from: 637f)
inc hl ;6381 23 # (flow from: 6380)
ld (09841h),hl ;6382 22 41 98 " A . (flow from: 6381)
ld hl,09841h ;6385 21 41 98 ! A . (flow from: 6382)
ld de,(0983dh) ;6388 ed 5b 3d 98 . [ = . (flow from: 6385)
ld bc,0000ch ;638c 01 0c 00 . . . (flow from: 6388)
ldir ;638f ed b0 . . (flow from: 638c 638f)
ld (0984bh),de ;6391 ed 53 4b 98 . S K . (flow from: 638f)
ld hl,(09841h) ;6395 2a 41 98 * A . (flow from: 6391)
ld a,(hl) ;6398 7e ~ (flow from: 6395)
cp 010h ;6399 fe 10 . . (flow from: 6398)
ret z ;639b c8 . (flow from: 6399)
ld hl,(0983dh) ;639c 2a 3d 98 * = . (flow from: 639b)
ld (09847h),hl ;639f 22 47 98 " G . (flow from: 639c)
cp a ;63a2 bf . (flow from: 639f)
ret ;63a3 c9 . (flow from: 63a2)
sub_63a4h:
ld e,(ix+008h) ;63a4 dd 5e 08 . ^ . (flow from: 6253)
ld d,(ix+009h) ;63a7 dd 56 09 . V . (flow from: 63a4)
ld hl,(09849h) ;63aa 2a 49 98 * I . (flow from: 63a7)
l63adh:
push hl ;63ad e5 . (flow from: 63aa 63d5)
or a ;63ae b7 . (flow from: 63ad)
sbc hl,de ;63af ed 52 . R (flow from: 63ae)
pop hl ;63b1 e1 . (flow from: 63af)
jr z,l63d7h ;63b2 28 23 ( # (flow from: 63b1)
ld a,(hl) ;63b4 7e ~ (flow from: 63b2)
push hl ;63b5 e5 . (flow from: 63b4)
push af ;63b6 f5 . (flow from: 63b5)
call sub_9623h ;63b7 cd 23 96 . # . (flow from: 63b6)
pop af ;63ba f1 . (flow from: 9628)
cp 010h ;63bb fe 10 . . (flow from: 63ba)
jr z,l63c8h ;63bd 28 09 ( . (flow from: 63bb)
cp 005h ;63bf fe 05 . . (flow from: 63bd)
jr nz,l63c6h ;63c1 20 03 . (flow from: 63bf)
inc hl ;63c3 23 #
inc hl ;63c4 23 #
inc hl ;63c5 23 #
l63c6h:
ld (hl),000h ;63c6 36 00 6 . (flow from: 63c1)
l63c8h:
pop hl ;63c8 e1 . (flow from: 63c6)
inc hl ;63c9 23 # (flow from: 63c8)
inc hl ;63ca 23 # (flow from: 63c9)
inc hl ;63cb 23 # (flow from: 63ca)
ld a,(hl) ;63cc 7e ~ (flow from: 63cb)
cp 003h ;63cd fe 03 . . (flow from: 63cc)
call nz,sub_6259h ;63cf c4 59 62 . Y b (flow from: 63cd)
call sub_9623h ;63d2 cd 23 96 . # . (flow from: 63cf)
jr l63adh ;63d5 18 d6 . . (flow from: 9628)
l63d7h:
push ix ;63d7 dd e5 . . (flow from: 63b2)
pop hl ;63d9 e1 . (flow from: 63d7)
ld de,09841h ;63da 11 41 98 . A . (flow from: 63d9)
ld bc,0000ch ;63dd 01 0c 00 . . . (flow from: 63da)
ldir ;63e0 ed b0 . . (flow from: 63dd 63e0)
ld hl,(0984bh) ;63e2 2a 4b 98 * K . (flow from: 63e0)
ld bc,0fff4h ;63e5 01 f4 ff . . . (flow from: 63e2)
add hl,bc ;63e8 09 . (flow from: 63e5)
ld (0983dh),hl ;63e9 22 3d 98 " = . (flow from: 63e8)
ret ;63ec c9 . (flow from: 63e9)
sub_63edh:
ld a,(hl) ;63ed 7e ~ (flow from: 610c 64a8 64b5)
cp 00ch ;63ee fe 0c . . (flow from: 63ed)
jr nz,l63ffh ;63f0 20 0d . (flow from: 63ee)
set 0,b ;63f2 cb c0 . . (flow from: 63f0)
call sub_9623h ;63f4 cd 23 96 . # . (flow from: 63f2)
push de ;63f7 d5 . (flow from: 9628)
ld de,(09855h) ;63f8 ed 5b 55 98 . [ U . (flow from: 63f7)
add hl,de ;63fc 19 . (flow from: 63f8)
pop de ;63fd d1 . (flow from: 63fc)
l63feh:
ld a,(hl) ;63fe 7e ~ (flow from: 63fd)
l63ffh:
cp 001h ;63ff fe 01 . . (flow from: 63f0 63fe)
jr nz,l640ah ;6401 20 07 . (flow from: 63ff)
set 0,b ;6403 cb c0 . .
call sub_9623h ;6405 cd 23 96 . # .
jr l63feh ;6408 18 f4 . .
l640ah:
cp 005h ;640a fe 05 . . (flow from: 6401)
jr nz,l6418h ;640c 20 0a . (flow from: 640a)
set 0,b ;640e cb c0 . .
call sub_9623h ;6410 cd 23 96 . # .
inc hl ;6413 23 #
inc hl ;6414 23 #
inc hl ;6415 23 #
jr l63feh ;6416 18 e6 . .
l6418h:
ld a,(de) ;6418 1a . (flow from: 640c)
cp 00ch ;6419 fe 0c . . (flow from: 6418)
jr nz,l642ch ;641b 20 0f . (flow from: 6419)
set 1,b ;641d cb c8 . . (flow from: 641b)
ex de,hl ;641f eb . (flow from: 641d)
call sub_9623h ;6420 cd 23 96 . # . (flow from: 641f)
push de ;6423 d5 . (flow from: 9628)
ld de,(09853h) ;6424 ed 5b 53 98 . [ S . (flow from: 6423)
add hl,de ;6428 19 . (flow from: 6424)
pop de ;6429 d1 . (flow from: 6428)
ex de,hl ;642a eb . (flow from: 6429)
l642bh:
ld a,(de) ;642b 1a . (flow from: 642a)
l642ch:
cp 001h ;642c fe 01 . . (flow from: 641b 642b)
jr nz,l6437h ;642e 20 07 . (flow from: 642c)
set 1,b ;6430 cb c8 . .
call sub_65ebh ;6432 cd eb 65 . . e
jr l642bh ;6435 18 f4 . .
l6437h:
cp 005h ;6437 fe 05 . . (flow from: 642e)
jr nz,l6445h ;6439 20 0a . (flow from: 6437)
set 1,b ;643b cb c8 . .
call sub_65ebh ;643d cd eb 65 . . e
inc de ;6440 13 .
inc de ;6441 13 .
inc de ;6442 13 .
jr l642bh ;6443 18 e6 . .
l6445h:
cp 000h ;6445 fe 00 . . (flow from: 6439)
jr nz,l6467h ;6447 20 1e . (flow from: 6445)
cp (hl) ;6449 be . (flow from: 6447)
jr nz,l6450h ;644a 20 04 . (flow from: 6449)
call sub_65f1h ;644c cd f1 65 . . e (flow from: 644a)
ret z ;644f c8 . (flow from: 65f6)
l6450h:
bit 0,b ;6450 cb 40 . @ (flow from: 644f)
ld bc,(09855h) ;6452 ed 4b 55 98 . K U . (flow from: 6450)
jr z,l64b8h ;6456 28 60 ( ` (flow from: 6452)
push de ;6458 d5 . (flow from: 6456)
push hl ;6459 e5 . (flow from: 6458)
call sub_6530h ;645a cd 30 65 . 0 e (flow from: 6459)
pop hl ;645d e1 . (flow from: 656c)
pop de ;645e d1 . (flow from: 645d)
ld a,(de) ;645f 1a . (flow from: 645e)
cp 000h ;6460 fe 00 . . (flow from: 645f)
jr nz,l64bdh ;6462 20 59 Y (flow from: 6460)
ex de,hl ;6464 eb . (flow from: 6462)
jr l64bdh ;6465 18 56 . V (flow from: 6464)
l6467h:
ld a,(hl) ;6467 7e ~ (flow from: 6447)
cp 000h ;6468 fe 00 . . (flow from: 6467)
jr nz,l647ch ;646a 20 10 . (flow from: 6468)
ex de,hl ;646c eb . (flow from: 646a)
bit 1,b ;646d cb 48 . H (flow from: 646c)
ld bc,(09853h) ;646f ed 4b 53 98 . K S . (flow from: 646d)
jr z,l64b8h ;6473 28 43 ( C (flow from: 646f)
push de ;6475 d5 . (flow from: 6473)
call sub_6530h ;6476 cd 30 65 . 0 e (flow from: 6475)
pop de ;6479 d1 . (flow from: 6574)
jr l64bdh ;647a 18 41 . A (flow from: 6479)
l647ch:
ld a,(de) ;647c 1a . (flow from: 646a)
cp (hl) ;647d be . (flow from: 647c)
ret nz ;647e c0 . (flow from: 647d)
cp 010h ;647f fe 10 . . (flow from: 647e)
ret z ;6481 c8 . (flow from: 647f)
cp 00ah ;6482 fe 0a . . (flow from: 6481)
jr nz,l6497h ;6484 20 11 . (flow from: 6482)
call sub_9623h ;6486 cd 23 96 . # .
ex de,hl ;6489 eb .
call sub_9623h ;648a cd 23 96 . # .
ld b,006h ;648d 06 06 . .
l648fh:
ld a,(de) ;648f 1a .
cp (hl) ;6490 be .
ret nz ;6491 c0 .
inc hl ;6492 23 #
inc de ;6493 13 .
djnz l648fh ;6494 10 f9 . .
ret ;6496 c9 .
l6497h:
cp 003h ;6497 fe 03 . . (flow from: 6484)
call sub_9623h ;6499 cd 23 96 . # . (flow from: 6497)
call sub_65ebh ;649c cd eb 65 . . e (flow from: 9628)
jr z,l64a5h ;649f 28 04 ( . (flow from: 65f0)
or a ;64a1 b7 . (flow from: 649f)
sbc hl,de ;64a2 ed 52 . R (flow from: 64a1)
ret ;64a4 c9 . (flow from: 64a2)
l64a5h:
push de ;64a5 d5 . (flow from: 649f)
push hl ;64a6 e5 . (flow from: 64a5)
push bc ;64a7 c5 . (flow from: 64a6)
call sub_63edh ;64a8 cd ed 63 . . c (flow from: 64a7)
pop bc ;64ab c1 . (flow from: 647e 64a4 6504)
pop hl ;64ac e1 . (flow from: 64ab)
pop de ;64ad d1 . (flow from: 64ac)
ret nz ;64ae c0 . (flow from: 64ad)
inc de ;64af 13 . (flow from: 64ae)
inc de ;64b0 13 . (flow from: 64af)
inc de ;64b1 13 . (flow from: 64b0)
inc hl ;64b2 23 # (flow from: 64b1)
inc hl ;64b3 23 # (flow from: 64b2)
inc hl ;64b4 23 # (flow from: 64b3)
jp sub_63edh ;64b5 c3 ed 63 . . c (flow from: 64b4)
l64b8h:
push de ;64b8 d5 . (flow from: 6473)
call sub_6505h ;64b9 cd 05 65 . . e (flow from: 64b8)
pop de ;64bc d1 . (flow from: 6574)
l64bdh:
push de ;64bd d5 . (flow from: 6465 647a 64bc 6670)
push ix ;64be dd e5 . . (flow from: 64bd)
ld ix,(09847h) ;64c0 dd 2a 47 98 . * G . (flow from: 64be)
ld l,(ix+00ah) ;64c4 dd 6e 0a . n . (flow from: 64c0)
ld h,(ix+00bh) ;64c7 dd 66 0b . f . (flow from: 64c4)
pop ix ;64ca dd e1 . . (flow from: 64c7)
or a ;64cc b7 . (flow from: 64ca)
sbc hl,de ;64cd ed 52 . R (flow from: 64cc)
jr c,l64d5h ;64cf 38 04 8 . (flow from: 64cd)
ld a,00ch ;64d1 3e 0c > . (flow from: 64cf)
jr l64eah ;64d3 18 15 . . (flow from: 64d1)
l64d5h:
ld hl,(0983bh) ;64d5 2a 3b 98 * ; . (flow from: 64cf)
scf ;64d8 37 7 (flow from: 64d5)
sbc hl,de ;64d9 ed 52 . R (flow from: 64d8)
jr c,l64dfh ;64db 38 02 8 . (flow from: 64d9)
jr l6502h ;64dd 18 23 . # (flow from: 64db)
l64dfh:
bit 0,e ;64df cb 43 . C
ld a,001h ;64e1 3e 01 > .
jr z,l64eah ;64e3 28 05 ( .
ld a,005h ;64e5 3e 05 > .
dec de ;64e7 1b .
dec de ;64e8 1b .
dec de ;64e9 1b .
l64eah:
call sub_6593h ;64ea cd 93 65 . . e (flow from: 64d3)
push hl ;64ed e5 . (flow from: 65ea)
ld (hl),a ;64ee 77 w (flow from: 64ed)
inc hl ;64ef 23 # (flow from: 64ee)
ld (hl),e ;64f0 73 s (flow from: 64ef)
inc hl ;64f1 23 # (flow from: 64f0)
ld (hl),d ;64f2 72 r (flow from: 64f1)
inc hl ;64f3 23 # (flow from: 64f2)
ld de,(09849h) ;64f4 ed 5b 49 98 . [ I . (flow from: 64f3)
ld (hl),003h ;64f8 36 03 6 . (flow from: 64f4)
inc hl ;64fa 23 # (flow from: 64f8)
ld (hl),e ;64fb 73 s (flow from: 64fa)
inc hl ;64fc 23 # (flow from: 64fb)
ld (hl),d ;64fd 72 r (flow from: 64fc)
pop hl ;64fe e1 . (flow from: 64fd)
ld (09849h),hl ;64ff 22 49 98 " I . (flow from: 64fe)
l6502h:
pop de ;6502 d1 . (flow from: 64dd 64ff)
cp a ;6503 bf . (flow from: 6502)
ret ;6504 c9 . (flow from: 6503)
sub_6505h:
ld a,(hl) ;6505 7e ~ (flow from: 64b9 651b 6526)
cp 003h ;6506 fe 03 . . (flow from: 6505)
jr nz,l6528h ;6508 20 1e . (flow from: 6506)
push hl ;650a e5 . (flow from: 6508)
call sub_6593h ;650b cd 93 65 . . e (flow from: 650a)
ex de,hl ;650e eb . (flow from: 65ea)
ld (hl),003h ;650f 36 03 6 . (flow from: 650e)
inc hl ;6511 23 # (flow from: 650f)
ld (hl),e ;6512 73 s (flow from: 6511)
inc hl ;6513 23 # (flow from: 6512)
ld (hl),d ;6514 72 r (flow from: 6513)
pop hl ;6515 e1 . (flow from: 6514)
call sub_9623h ;6516 cd 23 96 . # . (flow from: 6515)
push de ;6519 d5 . (flow from: 9628)
push hl ;651a e5 . (flow from: 6519)
call sub_6505h ;651b cd 05 65 . . e (flow from: 651a)
pop hl ;651e e1 . (flow from: 6574)
pop de ;651f d1 . (flow from: 651e)
inc hl ;6520 23 # (flow from: 651f)
inc hl ;6521 23 # (flow from: 6520)
inc hl ;6522 23 # (flow from: 6521)
inc de ;6523 13 . (flow from: 6522)
inc de ;6524 13 . (flow from: 6523)
inc de ;6525 13 . (flow from: 6524)
jr sub_6505h ;6526 18 dd . . (flow from: 6525)
l6528h:
cp 00ch ;6528 fe 0c . . (flow from: 6508 6531)
jr nz,l6533h ;652a 20 07 . (flow from: 6528)
call sub_9623h ;652c cd 23 96 . # . (flow from: 652a)
add hl,bc ;652f 09 . (flow from: 9628)
sub_6530h:
ld a,(hl) ;6530 7e ~ (flow from: 645a 6476 652f)
jr l6528h ;6531 18 f5 . . (flow from: 6530)
l6533h:
cp 001h ;6533 fe 01 . . (flow from: 652a)
jr nz,l653ch ;6535 20 05 . (flow from: 6533)
call sub_9623h ;6537 cd 23 96 . # .
jr sub_6530h ;653a 18 f4 . .
l653ch:
cp 005h ;653c fe 05 . . (flow from: 6535)
jr nz,l6548h ;653e 20 08 . (flow from: 653c)
call sub_9623h ;6540 cd 23 96 . # .
inc hl ;6543 23 #
inc hl ;6544 23 #
inc hl ;6545 23 #
jr sub_6530h ;6546 18 e8 . .
l6548h:
cp 000h ;6548 fe 00 . . (flow from: 653e)
jr nz,l656dh ;654a 20 21 ! (flow from: 6548)
ld (de),a ;654c 12 . (flow from: 654a)
call sub_65f1h ;654d cd f1 65 . . e (flow from: 654c)
jr nc,l6553h ;6550 30 01 0 . (flow from: 65f6)
ex de,hl ;6552 eb .
l6553h:
call sub_68d5h ;6553 cd d5 68 . . h (flow from: 6550)
ld a,001h ;6556 3e 01 > . (flow from: 68e8)
jr nc,l655dh ;6558 30 03 0 . (flow from: 6556)
ex de,hl ;655a eb . (flow from: 6558)
jr l6566h ;655b 18 09 . . (flow from: 655a)
l655dh:
bit 0,l ;655d cb 45 . E
jr z,l6566h ;655f 28 05 ( .
dec hl ;6561 2b +
dec hl ;6562 2b +
dec hl ;6563 2b +
ld a,005h ;6564 3e 05 > .
l6566h:
ex de,hl ;6566 eb . (flow from: 655b)
ld (hl),a ;6567 77 w (flow from: 6566)
inc hl ;6568 23 # (flow from: 6567)
ld (hl),e ;6569 73 s (flow from: 6568)
inc hl ;656a 23 # (flow from: 6569)
ld (hl),d ;656b 72 r (flow from: 656a)
ret ;656c c9 . (flow from: 656b)
l656dh:
push bc ;656d c5 . (flow from: 654a)
ld bc,00003h ;656e 01 03 00 . . . (flow from: 656d)
ldir ;6571 ed b0 . . (flow from: 656e 6571)
pop bc ;6573 c1 . (flow from: 6571)
ret ;6574 c9 . (flow from: 6573)
sub_6575h:
ld a,(hl) ;6575 7e ~ (flow from: 6079 60a3 60c9 60fd 6119 613f 6181 6622 668b 6a0e 6a25 6a3b 7d43 7dee 7e3f)
cp 00ch ;6576 fe 0c . . (flow from: 6575)
jr nz,l657fh ;6578 20 05 . (flow from: 6576)
call sub_9623h ;657a cd 23 96 . # . (flow from: 6578)
add hl,de ;657d 19 . (flow from: 9628)
l657eh:
ld a,(hl) ;657e 7e ~ (flow from: 657d 6586 6591)
l657fh:
cp 001h ;657f fe 01 . . (flow from: 6578 657e)
jr nz,l6588h ;6581 20 05 . (flow from: 657f)
call sub_9623h ;6583 cd 23 96 . # . (flow from: 6581)
jr l657eh ;6586 18 f6 . . (flow from: 9628)
l6588h:
cp 005h ;6588 fe 05 . . (flow from: 6581)
ret nz ;658a c0 . (flow from: 6588)
call sub_9623h ;658b cd 23 96 . # . (flow from: 658a)
inc hl ;658e 23 # (flow from: 9628)
inc hl ;658f 23 # (flow from: 658e)
inc hl ;6590 23 # (flow from: 658f)
jr l657eh ;6591 18 eb . . (flow from: 6590)
sub_6593h:
push de ;6593 d5 . (flow from: 64ea 650b 6caa 777a 778f 7a20 7dd4 7e49)
push af ;6594 f5 . (flow from: 6593)
ld de,(0985bh) ;6595 ed 5b 5b 98 . [ [ . (flow from: 6594)
ld hl,0ffffh ;6599 21 ff ff ! . . (flow from: 6595)
or a ;659c b7 . (flow from: 6599)
sbc hl,de ;659d ed 52 . R (flow from: 659c)
jr nz,l65bdh ;659f 20 1c . (flow from: 659d)
ld hl,(0985dh) ;65a1 2a 5d 98 * ] . (flow from: 659f)
ld de,(0983bh) ;65a4 ed 5b 3b 98 . [ ; . (flow from: 65a1)
or a ;65a8 b7 . (flow from: 65a4)
sbc hl,de ;65a9 ed 52 . R (flow from: 65a8)
ex de,hl ;65ab eb . (flow from: 65a9)
jr c,l65cbh ;65ac 38 1d 8 . (flow from: 65ab)
call sub_6713h ;65ae cd 13 67 . . g (flow from: 65ac)
ld de,(0985bh) ;65b1 ed 5b 5b 98 . [ [ . (flow from: 688b)
ld hl,0ffffh ;65b5 21 ff ff ! . . (flow from: 65b1)
or a ;65b8 b7 . (flow from: 65b5)
sbc hl,de ;65b9 ed 52 . R (flow from: 65b8)
jr z,l65c8h ;65bb 28 0b ( . (flow from: 65b9)
l65bdh:
ex de,hl ;65bd eb . (flow from: 659f 65bb)
push hl ;65be e5 . (flow from: 65bd)
call sub_9623h ;65bf cd 23 96 . # . (flow from: 65be)
ld (0985bh),hl ;65c2 22 5b 98 " [ . (flow from: 9628)
pop hl ;65c5 e1 . (flow from: 65c2)
jr l65deh ;65c6 18 16 . . (flow from: 65c5)
l65c8h:
ld hl,(0983bh) ;65c8 2a 3b 98 * ; .
l65cbh:
ld de,0fffah ;65cb 11 fa ff . . . (flow from: 65ac)
add hl,de ;65ce 19 . (flow from: 65cb)
ld de,(0984bh) ;65cf ed 5b 4b 98 . [ K . (flow from: 65ce)
push hl ;65d3 e5 . (flow from: 65cf)
or a ;65d4 b7 . (flow from: 65d3)
sbc hl,de ;65d5 ed 52 . R (flow from: 65d4)
pop hl ;65d7 e1 . (flow from: 65d5)
jp c,l626ch ;65d8 da 6c 62 . l b (flow from: 65d7)
ld (0983bh),hl ;65db 22 3b 98 " ; . (flow from: 65d8)
l65deh:
ld (hl),010h ;65de 36 10 6 . (flow from: 65c6 65db)
inc hl ;65e0 23 # (flow from: 65de)
inc hl ;65e1 23 # (flow from: 65e0)
inc hl ;65e2 23 # (flow from: 65e1)
ld (hl),010h ;65e3 36 10 6 . (flow from: 65e2)
dec hl ;65e5 2b + (flow from: 65e3)
dec hl ;65e6 2b + (flow from: 65e5)
dec hl ;65e7 2b + (flow from: 65e6)
pop af ;65e8 f1 . (flow from: 65e7)
pop de ;65e9 d1 . (flow from: 65e8)
ret ;65ea c9 . (flow from: 65e9)
sub_65ebh:
ex de,hl ;65eb eb . (flow from: 649c)
call sub_9623h ;65ec cd 23 96 . # . (flow from: 65eb)
ex de,hl ;65ef eb . (flow from: 9628)
ret ;65f0 c9 . (flow from: 65ef)
sub_65f1h:
push hl ;65f1 e5 . (flow from: 6157 6346 644c 654d 679a 67dc 6b2f 7687 7e7d)
or a ;65f2 b7 . (flow from: 65f1)
sbc hl,de ;65f3 ed 52 . R (flow from: 65f2)
pop hl ;65f5 e1 . (flow from: 65f3)
ret ;65f6 c9 . (flow from: 65f5)
l65f7h:
ld de,00006h ;65f7 11 06 00 . . . (flow from: 69a2 6c4f 6f70 75e5 76c4 7736 948a 9546)
ld b,008h ;65fa 06 08 . . (flow from: 65f7)
ld hl,09807h ;65fc 21 07 98 ! . . (flow from: 65fa)
l65ffh:
ld (hl),0ffh ;65ff 36 ff 6 . (flow from: 65fc 6602)
add hl,de ;6601 19 . (flow from: 65ff)
djnz l65ffh ;6602 10 fb . . (flow from: 6601)
push ix ;6604 dd e5 . . (flow from: 6602)
ld ix,(09843h) ;6606 dd 2a 43 98 . * C . (flow from: 6604)
exx ;660a d9 . (flow from: 6606)
ld e,(ix+00ah) ;660b dd 5e 0a . ^ . (flow from: 660a)
ld d,(ix+00bh) ;660e dd 56 0b . V . (flow from: 660b)
ld (09853h),de ;6611 ed 53 53 98 . S S . (flow from: 660e)
ld ix,09807h ;6615 dd 21 07 98 . ! . . (flow from: 6611)
ld (09861h),ix ;6619 dd 22 61 98 . " a . (flow from: 6615)
pop ix ;661d dd e1 . . (flow from: 6619)
l661fh:
ld hl,(0984fh) ;661f 2a 4f 98 * O . (flow from: 661d 66cb)
call sub_6575h ;6622 cd 75 65 . u e (flow from: 661f)
cp 010h ;6625 fe 10 . . (flow from: 658a)
jr nz,l667ah ;6627 20 51 Q (flow from: 6625)
ld a,(ix+000h) ;6629 dd 7e 00 . ~ . (flow from: 6627)
cp 0ffh ;662c fe ff . . (flow from: 6629)
jp z,l6701h ;662e ca 01 67 . . g (flow from: 662c)
ld e,a ;6631 5f _ (flow from: 662e)
ld d,000h ;6632 16 00 . . (flow from: 6631)
ld hl,l663dh ;6634 21 3d 66 ! = f (flow from: 6632)
push hl ;6637 e5 . (flow from: 6634)
push ix ;6638 dd e5 . . (flow from: 6637)
pop hl ;663a e1 . (flow from: 6638)
add hl,de ;663b 19 . (flow from: 663a)
jp (hl) ;663c e9 . (flow from: 663b)
l663dh:
ret nz ;663d c0 . (flow from: 69fe 6c79 6c94 6ceb 6fa7 75f3 7609 76dd 77b3 9407 957d)
ld de,00006h ;663e 11 06 00 . . . (flow from: 663d)
exx ;6641 d9 . (flow from: 663e)
ld b,008h ;6642 06 08 . . (flow from: 6641)
ld ix,09807h ;6644 dd 21 07 98 . ! . . (flow from: 6642)
l6648h:
ld a,(ix+000h) ;6648 dd 7e 00 . ~ . (flow from: 6644 6677)
cp 0ffh ;664b fe ff . . (flow from: 6648)
jr z,l6673h ;664d 28 24 ( $ (flow from: 664b)
ld e,(ix+001h) ;664f dd 5e 01 . ^ . (flow from: 664d)
ld d,(ix+002h) ;6652 dd 56 02 . V . (flow from: 664f)
ld l,(ix+003h) ;6655 dd 6e 03 . n . (flow from: 6652)
ld h,(ix+004h) ;6658 dd 66 04 . f . (flow from: 6655)
cp 000h ;665b fe 00 . . (flow from: 6658)
jr z,l6673h ;665d 28 14 ( . (flow from: 665b)
ld a,(hl) ;665f 7e ~ (flow from: 665d)
cp 000h ;6660 fe 00 . . (flow from: 665f)
jp nz,l6290h ;6662 c2 90 62 . . b (flow from: 6660)
ld a,(ix+000h) ;6665 dd 7e 00 . ~ . (flow from: 6662)
ld (hl),a ;6668 77 w (flow from: 6665)
inc hl ;6669 23 # (flow from: 6668)
ld (hl),e ;666a 73 s (flow from: 6669)
inc hl ;666b 23 # (flow from: 666a)
ld (hl),d ;666c 72 r (flow from: 666b)
dec hl ;666d 2b + (flow from: 666c)
dec hl ;666e 2b + (flow from: 666d)
ex de,hl ;666f eb . (flow from: 666e)
call l64bdh ;6670 cd bd 64 . . d (flow from: 666f)
l6673h:
exx ;6673 d9 . (flow from: 6504 664d)
add ix,de ;6674 dd 19 . . (flow from: 6673)
exx ;6676 d9 . (flow from: 6674)
djnz l6648h ;6677 10 cf . . (flow from: 6676)
ret ;6679 c9 . (flow from: 6677)
l667ah:
cp 003h ;667a fe 03 . . (flow from: 6627)
jp nz,l6290h ;667c c2 90 62 . . b (flow from: 667a)
call sub_9623h ;667f cd 23 96 . # . (flow from: 667c)
inc hl ;6682 23 # (flow from: 9628)
inc hl ;6683 23 # (flow from: 6682)
inc hl ;6684 23 # (flow from: 6683)
ld (0984fh),hl ;6685 22 4f 98 " O . (flow from: 6684)
dec hl ;6688 2b + (flow from: 6685)
dec hl ;6689 2b + (flow from: 6688)
dec hl ;668a 2b + (flow from: 6689)
call sub_6575h ;668b cd 75 65 . u e (flow from: 668a)
ld b,a ;668e 47 G (flow from: 658a)
cp 000h ;668f fe 00 . . (flow from: 668e)
jr nz,l66ceh ;6691 20 3b ; (flow from: 668f)
ld a,(ix+004h) ;6693 dd 7e 04 . ~ . (flow from: 6691)
cp 0ffh ;6696 fe ff . . (flow from: 6693)
jp z,l6290h ;6698 ca 90 62 . . b (flow from: 6696)
push ix ;669b dd e5 . . (flow from: 6698)
ld ix,(09861h) ;669d dd 2a 61 98 . * a . (flow from: 669b)
ld (ix+000h),000h ;66a1 dd 36 00 00 . 6 . . (flow from: 669d)