forked from nmlgc/ReC98
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathth05_maine.asm
19153 lines (18088 loc) · 285 KB
/
th05_maine.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
;
; +-------------------------------------------------------------------------+
; | This file has been generated by The Interactive Disassembler (IDA) |
; | Copyright (c) 2009 by Hex-Rays, <[email protected]> |
; +-------------------------------------------------------------------------+
;
; Input MD5 : 57F21130457B229B7ED74E30D2B6E6E5
; File Name : th05/MAINE.EXE
; Format : MS-DOS executable (EXE)
; Base Address: 0h Range: 0h-1C6F0h Loaded length: 128A6h
; Entry Point : 0:0
; OS type : MS DOS
; Application type: Executable 16bit
.286 ; Force the .model directive to create 16-bit default segments...
.model large
__LARGE__ equ 1
.386 ; ... then switch to what we actually need.
; And yes, we can't move this to an include file for some reason.
include ReC98.inc
include th05/th05.asm
extern _execl:proc
extern _tolower:proc
; ===========================================================================
; Segment type: Pure code
_TEXT segment word public 'CODE' use16
assume cs:_TEXT
assume es:nothing, ds:_DATA, fs:nothing, gs:nothing
include libs/master.lib/bfnt_entry_pat.asm
include libs/master.lib/bfnt_header_read.asm
include libs/master.lib/bfnt_header_analysis.asm
include libs/master.lib/atrtcmod.asm
include libs/master.lib/bcloser.asm
include libs/master.lib/bfill.asm
include libs/master.lib/bfnt_palette_set.asm
include libs/master.lib/bgetc.asm
include libs/master.lib/palette_black_in.asm
include libs/master.lib/palette_black_out.asm
include libs/master.lib/bopenr.asm
include libs/master.lib/bread.asm
include libs/master.lib/bseek.asm
include libs/master.lib/bseek_.asm
include libs/master.lib/dos_axdx.asm
include libs/master.lib/dos_filesize.asm
include libs/master.lib/dos_keyclear.asm
include libs/master.lib/dos_read.asm
include libs/master.lib/dos_seek.asm
include libs/master.lib/dos_setvect.asm
include libs/master.lib/egc.asm
include libs/master.lib/file_append.asm
include libs/master.lib/file_close.asm
include libs/master.lib/file_create.asm
include libs/master.lib/file_exist.asm
include libs/master.lib/file_read.asm
include libs/master.lib/file_ropen.asm
include libs/master.lib/file_seek.asm
include libs/master.lib/file_size.asm
include libs/master.lib/file_write.asm
include libs/master.lib/dos_close.asm
include libs/master.lib/dos_ropen.asm
include libs/master.lib/grcg_boxfill.asm
include libs/master.lib/grcg_byteboxfill_x.asm
include libs/master.lib/grcg_circlefill.asm
include libs/master.lib/grc_setclip.asm
include libs/master.lib/grcg_hline.asm
include libs/master.lib/grcg_pset.asm
include libs/master.lib/grcg_setcolor.asm
include libs/master.lib/grcg_vline.asm
include libs/master.lib/gdc_outpw.asm
include libs/master.lib/get_machine_98.asm
include libs/master.lib/get_machine_at.asm
include libs/master.lib/get_machine_dosbox.asm
include libs/master.lib/check_machine_fmr.asm
include libs/master.lib/get_machine.asm
include libs/master.lib/gaiji_putca.asm
include libs/master.lib/gaiji_putsa.asm
include libs/master.lib/graph_400line.asm
include libs/master.lib/graph_clear.asm
include libs/master.lib/graph_copy_page.asm
include libs/master.lib/graph_extmode.asm
include libs/master.lib/graph_hide.asm
include libs/master.lib/graph_pi_free.asm
include libs/master.lib/graph_pi_load_pack.asm
include libs/master.lib/graph_scrollup.asm
include libs/master.lib/graph_show.asm
include libs/master.lib/iatan2.asm
include libs/master.lib/isqrt.asm
include libs/master.lib/js_end.asm
include libs/master.lib/palette_show.asm
include libs/master.lib/pfclose.asm
include libs/master.lib/pfgetc.asm
include libs/master.lib/pfread.asm
include libs/master.lib/pfrewind.asm
include libs/master.lib/pfseek.asm
include libs/master.lib/random.asm
include libs/master.lib/rottbl.asm
include libs/master.lib/smem_release.asm
include libs/master.lib/smem_wget.asm
include libs/master.lib/soundio.asm
include libs/master.lib/text_clear.asm
include libs/master.lib/text_putsa.asm
include libs/master.lib/vsync.asm
include libs/master.lib/vsync_wait.asm
include libs/master.lib/palette_white_in.asm
include libs/master.lib/palette_white_out.asm
include libs/master.lib/hmem_lallocate.asm
include libs/master.lib/mem_assign_dos.asm
include libs/master.lib/mem_assign.asm
include libs/master.lib/memheap.asm
include libs/master.lib/mem_unassign.asm
include libs/master.lib/super_free.asm
include libs/master.lib/super_entry_pat.asm
include libs/master.lib/super_entry_at.asm
include libs/master.lib/super_entry_bfnt.asm
include libs/master.lib/super_cancel_pat.asm
include libs/master.lib/super_put_rect.asm
include libs/master.lib/super_put.asm
include libs/master.lib/super_convert_tiny.asm
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_2DB6 proc far
arg_0 = word ptr 6
arg_2 = word ptr 8
arg_4 = word ptr 0Ah
push bp
mov bp, sp
push ds
push si
push di
mov es, graph_VramSeg
mov cx, [bp+arg_4]
mov di, [bp+arg_2]
mov bx, [bp+arg_0]
shl bx, 1
mov bp, [bx+21DCh]
mov ds, word ptr [bx+1DDCh]
mov ax, di
shl ax, 2
add di, ax
shl di, 4
mov ax, cx
and cx, 7
shr ax, 3
add di, ax
xor si, si
lodsw
cmp al, 80h
jnz short loc_2E3F
GRCG_NOINT_SETMODE_VIA_MOV al, GC_RMW
push ax
mov dx, bp
mov al, 50h ; 'P'
mul dl
mov bp, ax
shr dl, 1
pop ax
nop
loc_2E02:
GRCG_SETCOLOR_DIRECT ah
mov ch, dl
loc_2E1C:
lodsw
mov bl, ah
xor ah, ah
ror ax, cl
mov es:[di], ax
xor bh, bh
ror bx, cl
mov es:[di+50h], bx
add di, 0A0h
dec ch
jnz short loc_2E1C
sub di, bp
lodsw
cmp al, GC_TDW
jz short loc_2E02
out 7Ch, al
loc_2E3F:
pop di
pop si
pop ds
pop bp
retf 6
sub_2DB6 endp
include libs/master.lib/js_start.asm
include libs/master.lib/js_sense.asm
include libs/master.lib/bgm_bell_org.asm
include libs/master.lib/bgm_mget.asm
include libs/master.lib/bgm_read_sdata.asm
include libs/master.lib/bgm_timer.asm
include libs/master.lib/bgm_pinit.asm
include libs/master.lib/bgm_timerhook.asm
include libs/master.lib/bgm_play.asm
include libs/master.lib/bgm_sound.asm
include libs/master.lib/bgm_effect_sound.asm
include libs/master.lib/bgm_stop_play.asm
include libs/master.lib/bgm_set_tempo.asm
include libs/master.lib/bgm_init_finish.asm
include libs/master.lib/bgm_stop_sound.asm
include libs/master.lib/graph_pack_put_8_noclip.asm
include libs/master.lib/graph_gaiji_puts.asm
include libs/master.lib/graph_gaiji_putc.asm
include libs/master.lib/pfint21.asm
db 0
include th03/formats/pfopen.asm
include libs/master.lib/pf_str_ieq.asm
_TEXT ends
; ===========================================================================
; Segment type: Pure code
maine_01_TEXT segment byte public 'CODE' use16
assume cs:maine_01_TEXT
;org 5
assume es:nothing, ss:nothing, ds:_DATA, fs:nothing, gs:nothing
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_A545 proc near
var_A = byte ptr -0Ah
var_4 = word ptr -4
enter 0Ah, 0
push si
push ds
push offset aMiko_cfg ; "MIKO.CFG"
call file_ropen
push ss
lea ax, [bp+var_A]
push ax
push 0Ah
call file_read
call file_close
mov si, [bp+var_4]
mov word ptr _ksoconfig+2, si
mov word ptr _ksoconfig, 0
mov ax, si
pop si
leave
retn
sub_A545 endp
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
; int __stdcall sub_A576(char *arg0)
sub_A576 proc near
_arg0 = dword ptr 4
push bp
mov bp, sp
call _cdg_freeall
call graph_hide
call text_clear
call sub_EC36
pushd 0
pushd [bp+_arg0] ; arg0
pushd [bp+_arg0] ; path
call _execl
add sp, 0Ch
pop bp
retn 4
sub_A576 endp
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_A5A4 proc near
push bp
mov bp, sp
les bx, _ksoconfig
cmp byte ptr es:[bx+1Ah], 0FEh
jnz short loc_A5BD
les bx, off_10190
mov byte ptr es:[bx+3], 30h ; '0'
jmp short loc_A5DC
; ---------------------------------------------------------------------------
loc_A5BD:
les bx, _ksoconfig
cmp byte ptr es:[bx+1Ah], 0FDh
jnz short loc_A5D3
les bx, off_10190
mov byte ptr es:[bx+3], 32h ; '2'
jmp short loc_A5DC
; ---------------------------------------------------------------------------
loc_A5D3:
les bx, off_10190
mov byte ptr es:[bx+3], 31h ; '1'
loc_A5DC:
les bx, _ksoconfig
mov al, es:[bx+14h]
add al, 30h ; '0'
les bx, off_10190
mov es:[bx+4], al
push word ptr off_10190+2
push bx
call sub_A695
call sub_AFD6
pop bp
retn
sub_A5A4 endp
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
; int __cdecl main(int argc, const char **argv, const char **envp)
public _main
_main proc far
_argc = word ptr 6
_argv = dword ptr 8
_envp = dword ptr 0Ch
push bp
mov bp, sp
call sub_A545
or ax, ax
jz loc_A693
mov word_107CA, 5208h
push ds
push offset aKaikidan1_dat
call sub_F0B4
les bx, _ksoconfig
mov al, es:[bx+12h]
mov ah, 0
push ax
mov al, es:[bx+15h]
mov ah, 0
push ax
call snd_determine_modes
call snd_load pascal, ds, offset aMiko, SND_LOAD_SE
call graph_show
les bx, _ksoconfig
mov eax, es:[bx+28h]
mov random_seed, eax
push 64h ; 'd'
call frame_delay
les bx, _ksoconfig
cmp byte ptr es:[bx+1Ah], 0FEh
jb short loc_A665
call sub_A5A4
call sub_E41D
jmp short loc_A679
; ---------------------------------------------------------------------------
loc_A665:
les bx, _ksoconfig
cmp byte ptr es:[bx+1Ah], 0FDh
jnz short loc_A67E
call sub_A5A4
call sub_B3CB
call sub_D1B1
loc_A679:
call sub_C1DD
jmp short loc_A684
; ---------------------------------------------------------------------------
loc_A67E:
call sub_C1DD
call sub_D1B1
loc_A684:
kajacall KAJA_SONG_FADE, 4
push ds
push offset arg0 ; "op"
call sub_A576
loc_A693:
pop bp
retf
_main endp
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_A695 proc near
var_2 = word ptr -2
arg_0 = dword ptr 4
enter 2, 0
pushd [bp+arg_0]
call file_ropen
or ax, ax
jnz short loc_A6AD
mov ax, 1
leave
retn 4
; ---------------------------------------------------------------------------
loc_A6AD:
call file_size
mov [bp+var_2], ax
mov word_14F88, 2E88h
push ds
push word_14F88
push ax
call file_read
call file_close
xor ax, ax
leave
retn 4
sub_A695 endp
EGC_START_COPY_DEF 1, near
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_A705 proc near
arg_0 = word ptr 4
arg_2 = word ptr 6
arg_4 = word ptr 8
arg_6 = word ptr 0Ah
push bp
mov bp, sp
push si
push di
mov si, [bp+arg_6]
mov di, [bp+arg_4]
graph_accesspage 1
push si
push di
push 0
push [bp+arg_2]
push [bp+arg_0]
call sub_EE68
push si
push di
push 14000C8h
call sub_F3FC
pop di
pop si
pop bp
retn 8
sub_A705 endp
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_A738 proc near
var_2 = byte ptr -2
var_1 = byte ptr -1
arg_0 = dword ptr 4
enter 2, 0
mov bx, word_14F88
mov cl, [bx]
inc word_14F88
mov bx, word_14F88
mov al, [bx]
mov [bp+var_1], al
inc word_14F88
mov bx, word_14F88
mov al, [bx]
mov [bp+var_2], al
inc word_14F88
mov al, cl
mov ah, 0
mov bx, ax
test byte ptr [bx+1A39h], 2
jnz short loc_A77F
les bx, [bp+arg_0]
mov ax, word_1500C
mov es:[bx], ax
sub word_14F88, 3
leave
retn 4
; ---------------------------------------------------------------------------
loc_A77F:
mov al, [bp+var_1]
mov ah, 0
mov bx, ax
test byte ptr [bx+1A39h], 2
jnz short loc_A7A3
mov al, cl
mov ah, 0
add ax, 0FFD0h
les bx, [bp+arg_0]
mov es:[bx], ax
sub word_14F88, 2
leave
retn 4
; ---------------------------------------------------------------------------
loc_A7A3:
mov al, [bp+var_2]
mov ah, 0
mov bx, ax
test byte ptr [bx+1A39h], 2
jnz short loc_A7D3
mov al, cl
mov ah, 0
add ax, 0FFD0h
imul ax, 0Ah
mov dl, [bp+var_1]
mov dh, 0
add ax, dx
add ax, 0FFD0h
les bx, [bp+arg_0]
mov es:[bx], ax
dec word_14F88
leave
retn 4
; ---------------------------------------------------------------------------
loc_A7D3:
mov al, cl
mov ah, 0
add ax, 0FFD0h
imul ax, 64h
mov dl, [bp+var_1]
mov dh, 0
add dx, 0FFD0h
imul dx, 0Ah
add ax, dx
mov dl, [bp+var_2]
mov dh, 0
add ax, dx
add ax, 0FFD0h
les bx, [bp+arg_0]
mov es:[bx], ax
leave
retn 4
sub_A738 endp
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_A7FE proc near
arg_0 = dword ptr 4
push bp
mov bp, sp
mov bx, word_14F88
cmp byte ptr [bx], 2Ch ; ','
loc_A808:
jnz short loc_A819
inc word_14F88
pushd [bp+arg_0]
call sub_A738
pop bp
retn 4
; ---------------------------------------------------------------------------
loc_A819:
les bx, [bp+arg_0]
mov ax, word_1500C
mov es:[bx], ax
pop bp
retn 4
sub_A7FE endp
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_A826 proc near
push bp
mov bp, sp
add word_15004, 10h
cmp word_15004, 230h
jl short loc_A864
add word_15006, 10h
mov word_15004, 90h ; '・
cmp word_15006, 180h
jl short loc_A864
call sub_A8EC
cmp byte_14F8E, 0
jnz short loc_A858
push 0
call sub_A92B
loc_A858:
mov word_15004, 50h ; 'P'
mov word_15006, 140h
loc_A864:
pop bp
retn
sub_A826 endp
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_A866 proc near
var_2 = word ptr -2
arg_0 = word ptr 4
enter 2, 0
push si
push di
mov cx, 140h
jmp short loc_A8E0
; ---------------------------------------------------------------------------
loc_A871:
egc_selectpat
egc_setrop EGC_COMPAREREAD or EGC_WS_PATREG or EGC_RL_MEMREAD
outw2 EGC_BITLENGTHREG, 0Fh
mov bx, [bp+arg_0]
shl bx, 3
mov ax, cx
and ax, 3
add ax, ax
add bx, ax
outw2 EGC_MASKREG, [bx+732h]
mov ax, cx
shl ax, 6
mov dx, cx
shl dx, 4
add ax, dx
add ax, 0Ah
mov si, ax
xor di, di
jmp short loc_A8D9
; ---------------------------------------------------------------------------
loc_A8B2:
graph_accesspage 1
les bx, _VRAM_PLANE_B
add bx, si
mov ax, es:[bx]
mov [bp+var_2], ax
mov al, 0
out dx, al
mov bx, word ptr _VRAM_PLANE_B
add bx, si
mov ax, [bp+var_2]
mov es:[bx], ax
add di, 10h
add si, 2
loc_A8D9:
cmp di, 1E0h
jl short loc_A8B2
inc cx
loc_A8E0:
cmp cx, 180h
jl short loc_A871
pop di
pop si
leave
retn 2
sub_A866 endp
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_A8EC proc near
push bp
mov bp, sp
push si
graph_accesspage 0
call egc_start_copy_1
cmp byte_14F8E, 0
jnz short loc_A917
xor si, si
jmp short loc_A912
; ---------------------------------------------------------------------------
loc_A904:
push si
call sub_A866
push word_15008
call frame_delay
inc si
loc_A912:
cmp si, 4
jl short loc_A904
loc_A917:
push 4
call sub_A866
call egc_off
push 1
call frame_delay
pop si
pop bp
retn
sub_A8EC endp
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_A92B proc near
var_2 = word ptr -2
arg_0 = word ptr 4
enter 2, 0
push si
push di
mov si, [bp+arg_0]
xor di, di
mov [bp+var_2], 0
loc_A93B:
call _input_reset_sense_held
cmp _input, INPUT_NONE
jz short loc_A950
push 1
call frame_delay
jmp short loc_A93B
; ---------------------------------------------------------------------------
loc_A950:
or si, si
jnz short loc_A95C
mov si, 3E7h
mov [bp+var_2], 1
loc_A95C:
graph_accesspage 0
loc_A962:
call _input_reset_sense_held
push 240h
push word_15006
push 100010h
call sub_ECDE
or si, si
jle short loc_A9BD
test _input.hi, high INPUT_OK
jnz short loc_A9BD
test _input.lo, low INPUT_SHOT
jnz short loc_A9BD
test _input.hi, high INPUT_CANCEL
jnz short loc_A9BD
push 240h
push word_15006
mov ax, di
shr ax, 3
and ax, 3
add ax, 1Ch
push ax
push 0Fh
call graph_gaiji_putc
inc di
cmp [bp+var_2], 0
jnz short loc_A9B4
dec si
loc_A9B4:
push 1
call frame_delay
jmp short loc_A962
; ---------------------------------------------------------------------------
loc_A9BD:
pop di
pop si
leave
retn 2
sub_A92B endp
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_A9C3 proc near
var_16 = byte ptr -16h
var_6 = word ptr -6
var_4 = word ptr -4
var_2 = word ptr -2
arg_0 = byte ptr 4
enter 16h, 0
push si
mov al, [bp+arg_0]
mov ah, 0
push ax ; ch
call _tolower
pop cx
mov [bp+arg_0], al
mov ah, 0
mov [bp+var_6], ax
mov cx, 10h ; switch 16 cases
mov bx, offset word_AF96
loc_A9E2:
mov ax, cs:[bx]
cmp ax, [bp+var_6]
jz short loc_A9F2
add bx, 2
loop loc_A9E2
jmp loc_AF8F ; default
; ---------------------------------------------------------------------------
loc_A9F2:
jmp word ptr cs:[bx+20h] ; switch jump
loc_A9F6:
add word_15006, 10h ; jumptable 0000A9F2 case 110
mov word_15004, 50h ; 'P'
cmp word_15006, 180h
jl loc_AF8F ; default
loc_AA0B:
mov bx, word_14F88 ; jumptable 0000A9F2 case 115
mov al, [bx]
mov [bp+arg_0], al
call sub_A8EC
cmp [bp+arg_0], 2Dh ; '-'
jz short loc_AA3A
mov word_1500C, 0
push ss
lea ax, [bp+var_2]
push ax
call sub_A738
cmp byte_14F8E, 0
jnz short loc_AA3E
push [bp+var_2]
call sub_A92B
jmp short loc_AA3E
; ---------------------------------------------------------------------------
loc_AA3A:
inc word_14F88
loc_AA3E:
mov word_15004, 50h ; 'P'
mov word_15006, 140h
graph_accesspage 1
push 500140h
push 1E00040h
call sub_ECDE
mov dx, 0A6h
mov al, 0
loc_AA66:
out dx, al
jmp loc_AF8F ; default
; ---------------------------------------------------------------------------
loc_AA6A:
mov bx, word_14F88 ; jumptable 0000A9F2 case 99
mov al, [bx]
mov ah, 0
push ax ; ch
call _tolower
pop cx
mov [bp+arg_0], al
cmp [bp+arg_0], 3Dh ; '='
jz loc_AF34
mov word_1500C, 0Fh
push ss
lea ax, [bp+var_2]
push ax
call sub_A738
mov al, byte ptr [bp+var_2]
mov byte_1500A, al
jmp loc_AF8F ; default
; ---------------------------------------------------------------------------
loc_AA9B:
mov word_1500C, 2 ; jumptable 0000A9F2 case 98
push ss
lea ax, [bp+var_2]
push ax
call sub_A738
mov ax, [bp+var_2]
mov word_107BC, ax
jmp loc_AF8F ; default
; ---------------------------------------------------------------------------
loc_AAB2:
mov bx, word_14F88 ; jumptable 0000A9F2 case 119
mov al, [bx]
mov ah, 0
push ax ; ch
call _tolower
pop cx
mov [bp+arg_0], al
cmp [bp+arg_0], 6Fh ; 'o'
jz short loc_AAD0
cmp [bp+arg_0], 69h ; 'i'
jnz short loc_AAFE
loc_AAD0:
inc word_14F88
mov word_1500C, 1
push ss
lea ax, [bp+var_2]
push ax
call sub_A738
cmp [bp+arg_0], 69h ; 'i'
jnz short loc_AAF3
push [bp+var_2]
call palette_white_in
jmp loc_AF8F ; default
; ---------------------------------------------------------------------------
loc_AAF3:
push [bp+var_2]
call palette_white_out
jmp loc_AF8F ; default
; ---------------------------------------------------------------------------
loc_AAFE:
call sub_A8EC
mov word_1500C, 40h
cmp [bp+arg_0], 6Dh ; 'm'
jz short loc_AB33
cmp [bp+arg_0], 6Bh ; 'k'
jnz short loc_AB17
inc word_14F88
loc_AB17:
push ss
lea ax, [bp+var_2]
push ax
call sub_A738
cmp byte_14F8E, 0
jnz loc_AF8F ; default
push [bp+var_2]
call frame_delay
jmp loc_AF8F ; default
; ---------------------------------------------------------------------------
loc_AB33:
inc word_14F88
mov bx, word_14F88
mov al, [bx]
mov [bp+arg_0], al
cmp [bp+arg_0], 6Bh ; 'k'
jnz short loc_AB4A
inc word_14F88
loc_AB4A:
push ss
lea ax, [bp+var_2]
push ax
call sub_A738
push ss
lea ax, [bp+var_4]
push ax
call sub_A7FE
cmp byte_14F8E, 0
jnz loc_AF8F ; default
push [bp+var_2]
push [bp+var_4]
call sub_F25F
jmp loc_AF8F ; default
; ---------------------------------------------------------------------------