-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathkernal.asm
4010 lines (4010 loc) · 87.9 KB
/
kernal.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
5685 20 0f bc jsr $bc0f
5688 a5 61 lda $61
568a c9 88 cmp #$88
568c 90 03 bcc $5691
568e 20 d4 ba jsr $bad4
5691 20 cc bc jsr $bccc
5694 a5 07 lda $07
5696 18 clc
5697 69 81 adc #$81
5699 f0 f3 beq $568e
569b 38 sec
569c e9 01 sbc #$01
569e 48 pha
569f a2 05 ldx #$05
56a1 b5 69 lda $69,x
56a3 b4 61 ldy $61,x
56a5 95 61 sta $61,x
56a7 94 69 sty $69,x
56a9 ca dex
56aa 10 f5 bpl $56a1
56ac a5 56 lda $56
56ae 85 70 sta $70
56b0 20 53 b8 jsr $b853
56b3 20 b4 bf jsr $bfb4
56b6 a9 c4 lda #$c4
56b8 a0 bf ldy #$bf
56ba 20 59 e0 jsr $e059
56bd a9 00 lda #$00
56bf 85 6f sta $6f
56c1 68 pla
56c2 20 b9 ba jsr $bab9
56c5 60 rts
56c6 85 71 sta $71
56c8 84 72 sty $72
56ca 20 ca bb jsr $bbca
56cd a9 57 lda #$57
56cf 20 28 ba jsr $ba28
56d2 20 5d e0 jsr $e05d
56d5 a9 57 lda #$57
56d7 a0 00 ldy #$00
56d9 4c 28 ba jmp $ba28
56dc 85 71 sta $71
56de 84 72 sty $72
56e0 20 c7 bb jsr $bbc7
56e3 b1 71 lda ($71),y
56e5 85 67 sta $67
56e7 a4 71 ldy $71
56e9 c8 iny
56ea 98 tya
56eb d0 02 bne $56ef
56ed e6 72 inc $72
56ef 85 71 sta $71
56f1 a4 72 ldy $72
56f3 20 28 ba jsr $ba28
56f6 a5 71 lda $71
56f8 a4 72 ldy $72
56fa 18 clc
56fb 69 05 adc #$05
56fd 90 01 bcc $5700
56ff c8 iny
5700 85 71 sta $71
5702 84 72 sty $72
5704 20 67 b8 jsr $b867
5707 a9 5c lda #$5c
5709 a0 00 ldy #$00
570b c6 67 dec $67
570d d0 e4 bne $56f3
570f 60 rts
5710 98 tya
5711 35 44 and $44,x
5713 7a ???
5714 00 brk
5715 68 pla
5716 28 plp
5717 b1 46 lda ($46),y
5719 00 brk
571a 20 2b bc jsr $bc2b
571d 30 37 bmi $5756
571f d0 20 bne $5741
5721 20 f3 ff jsr $fff3
5724 86 22 stx $22
5726 84 23 sty $23
5728 a0 04 ldy #$04
572a b1 22 lda ($22),y
572c 85 62 sta $62
572e c8 iny
572f b1 22 lda ($22),y
5731 85 64 sta $64
5733 a0 08 ldy #$08
5735 b1 22 lda ($22),y
5737 85 63 sta $63
5739 c8 iny
573a b1 22 lda ($22),y
573c 85 65 sta $65
573e 4c e3 e0 jmp $e0e3
5741 a9 8b lda #$8b
5743 a0 00 ldy #$00
5745 20 a2 bb jsr $bba2
5748 a9 8d lda #$8d
574a a0 e0 ldy #$e0
574c 20 28 ba jsr $ba28
574f a9 92 lda #$92
5751 a0 e0 ldy #$e0
5753 20 67 b8 jsr $b867
5756 a6 65 ldx $65
5758 a5 62 lda $62
575a 85 65 sta $65
575c 86 62 stx $62
575e a6 63 ldx $63
5760 a5 64 lda $64
5762 85 63 sta $63
5764 86 64 stx $64
5766 a9 00 lda #$00
5768 85 66 sta $66
576a a5 61 lda $61
576c 85 70 sta $70
576e a9 80 lda #$80
5770 85 61 sta $61
5772 20 d7 b8 jsr $b8d7
5775 a2 8b ldx #$8b
5777 a0 00 ldy #$00
5779 4c d4 bb jmp $bbd4
577c aa tax
577d d0 02 bne $5781
577f a2 1e ldx #$1e
5781 4c 37 a4 jmp $a437
5784 48 pha
5785 ad 94 02 lda $0294
5788 f0 01 beq $578b
578a aa tax
578b 68 pla
578c 4c ba ff jmp $ffba
578f 20 d2 ff jsr $ffd2
5792 b0 e8 bcs $577c
5794 60 rts
5795 20 cf ff jsr $ffcf
5798 4c 75 f7 jmp $f775
579b 20 ad e4 jsr $e4ad
579e b0 dc bcs $577c
57a0 60 rts
57a1 20 c6 ff jsr $ffc6
57a4 b0 d6 bcs $577c
57a6 60 rts
57a7 20 e4 ff jsr $ffe4
57aa b0 d0 bcs $577c
57ac 60 rts
57ad 4c be f2 jmp $f2be
57b0 20 f7 b7 jsr $b7f7
57b3 a9 e1 lda #$e1
57b5 48 pha
57b6 a9 46 lda #$46
57b8 48 pha
57b9 ad 0f 03 lda $030f
57bc 48 pha
57bd ad 0c 03 lda $030c
57c0 ae 0d 03 ldx $030d
57c3 ac 0e 03 ldy $030e
57c6 28 plp
57c7 6c 14 00 jmp ($0014)
57ca 08 php
57cb 8d 0c 03 sta $030c
57ce 8e 0d 03 stx $030d
57d1 8c 0e 03 sty $030e
57d4 68 pla
57d5 8d 0f 03 sta $030f
57d8 60 rts
57d9 20 d4 e1 jsr $e1d4
57dc a6 2d ldx $2d
57de a4 2e ldy $2e
57e0 a9 2b lda #$2b
57e2 20 d8 ff jsr $ffd8
57e5 b0 95 bcs $577c
57e7 60 rts
57e8 a9 01 lda #$01
57ea 2c a9 00 bit $00a9
57ed 85 0a sta $0a
57ef 20 d4 e1 jsr $e1d4
57f2 a5 0a lda $0a
57f4 a6 2b ldx $2b
57f6 a4 2c ldy $2c
57f8 20 d5 ff jsr $ffd5
57fb b0 57 bcs $5854
57fd a5 0a lda $0a
57ff f0 17 beq $5818
5801 a2 1c ldx #$1c
5803 20 b7 ff jsr $ffb7
5806 29 10 and #$10
5808 d0 17 bne $5821
580a a5 7a lda $7a
580c c9 02 cmp #$02
580e f0 07 beq $5817
5810 a9 64 lda #$64
5812 a0 a3 ldy #$a3
5814 4c 1e ab jmp $ab1e
5817 60 rts
5818 20 b7 ff jsr $ffb7
581b 29 bf and #$bf
581d f0 05 beq $5824
581f a2 1d ldx #$1d
5821 4c 37 a4 jmp $a437
5824 a5 7b lda $7b
5826 c9 02 cmp #$02
5828 d0 0e bne $5838
582a 4c 8e f5 jmp $f58e
582d 2e a9 76 rol $76a9
5830 a0 a3 ldy #$a3
5832 20 1e ab jsr $ab1e
5835 4c 2a a5 jmp $a52a
5838 20 8e a6 jsr $a68e
583b 20 33 a5 jsr $a533
583e 4c 77 a6 jmp $a677
5841 20 19 e2 jsr $e219
5844 20 c0 ff jsr $ffc0
5847 b0 0b bcs $5854
5849 60 rts
584a 20 19 e2 jsr $e219
584d a5 49 lda $49
584f 20 c3 ff jsr $ffc3
5852 90 c3 bcc $5817
5854 4c f9 e0 jmp $e0f9
5857 a9 00 lda #$00
5859 20 bd ff jsr $ffbd
585c a2 08 ldx #$08
585e a0 01 ldy #$01
5860 20 01 e1 jsr $e101
5863 20 06 e2 jsr $e206
5866 20 57 e2 jsr $e257
5869 20 4a f1 jsr $f14a
586c 20 00 e2 jsr $e200
586f a0 00 ldy #$00
5871 86 49 stx $49
5873 20 ba ff jsr $ffba
5876 20 4a f1 jsr $f14a
5879 20 00 e2 jsr $e200
587c 8a txa
587d a8 tay
587e a6 49 ldx $49
5880 4c ba ff jmp $ffba
5883 20 0e e2 jsr $e20e
5886 4c 9e b7 jmp $b79e
5889 20 79 00 jsr $0079
588c d0 02 bne $5890
588e 68 pla
588f 68 pla
5890 60 rts
5891 20 fd ae jsr $aefd
5894 20 79 00 jsr $0079
5897 d0 f7 bne $5890
5899 4c 08 af jmp $af08
589c a9 00 lda #$00
589e 20 bd ff jsr $ffbd
58a1 20 11 e2 jsr $e211
58a4 20 9e b7 jsr $b79e
58a7 86 49 stx $49
58a9 8a txa
58aa a2 08 ldx #$08
58ac a0 0f ldy #$0f
58ae 20 01 e1 jsr $e101
58b1 20 06 e2 jsr $e206
58b4 20 00 e2 jsr $e200
58b7 86 4a stx $4a
58b9 a0 00 ldy #$00
58bb a5 49 lda $49
58bd e0 03 cpx #$03
58bf d0 01 bne $58c2
58c1 88 dey
58c2 20 ba ff jsr $ffba
58c5 20 06 e2 jsr $e206
58c8 20 00 e2 jsr $e200
58cb 8a txa
58cc a8 tay
58cd a6 4a ldx $4a
58cf a5 49 lda $49
58d1 20 ba ff jsr $ffba
58d4 20 06 e2 jsr $e206
58d7 20 0e e2 jsr $e20e
58da 20 9e ad jsr $ad9e
58dd 20 a3 b6 jsr $b6a3
58e0 a6 22 ldx $22
58e2 a4 23 ldy $23
58e4 4c bd ff jmp $ffbd
58e7 a9 e0 lda #$e0
58e9 a0 e2 ldy #$e2
58eb 20 67 b8 jsr $b867
58ee 20 0c bc jsr $bc0c
58f1 a9 e5 lda #$e5
58f3 a0 e2 ldy #$e2
58f5 a6 6e ldx $6e
58f7 20 07 bb jsr $bb07
58fa 20 0c bc jsr $bc0c
58fd 20 cc bc jsr $bccc
5900 a9 00 lda #$00
5902 85 6f sta $6f
5904 20 53 b8 jsr $b853
5907 a9 ea lda #$ea
5909 a0 e2 ldy #$e2
590b 20 50 b8 jsr $b850
590e a5 66 lda $66
5910 48 pha
5911 10 0d bpl $5920
5913 20 49 b8 jsr $b849
5916 a5 66 lda $66
5918 30 09 bmi $5923
591a a5 12 lda $12
591c 49 ff eor #$ff
591e 85 12 sta $12
5920 20 b4 bf jsr $bfb4
5923 a9 ea lda #$ea
5925 a0 e2 ldy #$e2
5927 20 67 b8 jsr $b867
592a 68 pla
592b 10 03 bpl $5930
592d 20 b4 bf jsr $bfb4
5930 a9 ef lda #$ef
5932 a0 e2 ldy #$e2
5934 4c 43 e0 jmp $e043
5937 20 ca bb jsr $bbca
593a a9 00 lda #$00
593c 85 12 sta $12
593e 20 6b e2 jsr $e26b
5941 a2 4e ldx #$4e
5943 a0 00 ldy #$00
5945 20 f6 e0 jsr $e0f6
5948 a9 57 lda #$57
594a a0 00 ldy #$00
594c 20 a2 bb jsr $bba2
594f a9 00 lda #$00
5951 85 66 sta $66
5953 a5 12 lda $12
5955 20 dc e2 jsr $e2dc
5958 a9 4e lda #$4e
595a a0 00 ldy #$00
595c 4c 0f bb jmp $bb0f
595f 48 pha
5960 4c 9d e2 jmp $e29d
5963 81 49 sta ($49,x)
5965 0f ???
5966 da ???
5967 a2 83 ldx #$83
5969 49 0f eor #$0f
596b da ???
596c a2 7f ldx #$7f
596e 00 brk
596f 00 brk
5970 00 brk
5971 00 brk
5972 05 84 ora $84
5974 e6 1a inc $1a
5976 2d 1b 86 and $861b
5979 28 plp
597a 07 ???
597b fb ???
597c f8 sed
597d 87 ???
597e 99 68 89 sta $8968,y
5981 01 87 ora ($87,x)
5983 23 ???
5984 35 df and $df,x
5986 e1 86 sbc ($86,x)
5988 a5 5d lda $5d
598a e7 ???
598b 28 plp
598c 83 ???
598d 49 0f eor #$0f
598f da ???
5990 a2 a5 ldx #$a5
5992 66 48 ror $48
5994 10 03 bpl $5999
5996 20 b4 bf jsr $bfb4
5999 a5 61 lda $61
599b 48 pha
599c c9 81 cmp #$81
599e 90 07 bcc $59a7
59a0 a9 bc lda #$bc
59a2 a0 b9 ldy #$b9
59a4 20 0f bb jsr $bb0f
59a7 a9 3e lda #$3e
59a9 a0 e3 ldy #$e3
59ab 20 43 e0 jsr $e043
59ae 68 pla
59af c9 81 cmp #$81
59b1 90 07 bcc $59ba
59b3 a9 e0 lda #$e0
59b5 a0 e2 ldy #$e2
59b7 20 50 b8 jsr $b850
59ba 68 pla
59bb 10 03 bpl $59c0
59bd 4c b4 bf jmp $bfb4
59c0 60 rts
59c1 0b ???
59c2 76 b3 ror $b3,x
59c4 83 ???
59c5 bd d3 79 lda $79d3,x
59c8 1e f4 a6 asl $a6f4,x
59cb f5 7b sbc $7b,x
59cd 83 ???
59ce fc ???
59cf b0 10 bcs $59e1
59d1 7c ???
59d2 0c ???
59d3 1f ???
59d4 67 ???
59d5 ca dex
59d6 7c ???
59d7 de 53 cb dec $cb53,x
59da c1 7d cmp ($7d,x)
59dc 14 ???
59dd 64 ???
59de 70 4c bvs $5a2c
59e0 7d b7 ea adc $eab7,x
59e3 51 7a eor ($7a),y
59e5 7d 63 30 adc $3063,x
59e8 88 dey
59e9 7e 7e 92 ror $927e,x
59ec 44 ???
59ed 99 3a 7e sta $7e3a,y
59f0 4c cc 91 jmp $91cc
59f3 c7 ???
59f4 7f ???
59f5 aa tax
59f6 aa tax
59f7 aa tax
59f8 13 ???
59f9 81 00 sta ($00,x)
59fb 00 brk
59fc 00 brk
59fd 00 brk
59fe 20 cc ff jsr $ffcc
5a01 a9 00 lda #$00
5a03 85 13 sta $13
5a05 20 7a a6 jsr $a67a
5a08 58 cli
5a09 a2 80 ldx #$80
5a0b 6c 00 03 jmp ($0300)
5a0e 8a txa
5a0f 30 03 bmi $5a14
5a11 4c 9c f7 jmp $f79c
5a14 4c 74 a4 jmp $a474
5a17 20 53 e4 jsr $e453
5a1a 20 bf e3 jsr $e3bf
5a1d 20 22 e4 jsr $e422
5a20 a2 fb ldx #$fb
5a22 9a txs
5a23 d0 e4 bne $5a09
5a25 e6 7a inc $7a
5a27 d0 02 bne $5a2b
5a29 e6 7b inc $7b
5a2b ad 60 ea lda $ea60
5a2e c9 3a cmp #$3a
5a30 b0 0a bcs $5a3c
5a32 c9 20 cmp #$20
5a34 f0 ef beq $5a25
5a36 38 sec
5a37 e9 30 sbc #$30
5a39 38 sec
5a3a e9 d0 sbc #$d0
5a3c 60 rts
5a3d 80 ???
5a3e 4f ???
5a3f c7 ???
5a40 52 ???
5a41 58 cli
5a42 a9 4c lda #$4c
5a44 85 54 sta $54
5a46 8d 10 03 sta $0310
5a49 a9 48 lda #$48
5a4b a0 b2 ldy #$b2
5a4d 8d 11 03 sta $0311
5a50 8c 12 03 sty $0312
5a53 a9 91 lda #$91
5a55 a0 b3 ldy #$b3
5a57 85 05 sta $05
5a59 84 06 sty $06
5a5b a9 aa lda #$aa
5a5d a0 b1 ldy #$b1
5a5f 85 03 sta $03
5a61 84 04 sty $04
5a63 a2 1c ldx #$1c
5a65 bd a2 e3 lda $e3a2,x
5a68 95 73 sta $73,x
5a6a ca dex
5a6b 10 f8 bpl $5a65
5a6d a9 03 lda #$03
5a6f 85 53 sta $53
5a71 a9 00 lda #$00
5a73 85 68 sta $68
5a75 85 13 sta $13
5a77 85 18 sta $18
5a79 a2 01 ldx #$01
5a7b 8e fd 01 stx $01fd
5a7e 8e fc 01 stx $01fc
5a81 a2 19 ldx #$19
5a83 86 16 stx $16
5a85 38 sec
5a86 20 9c ff jsr $ff9c
5a89 86 2b stx $2b
5a8b 84 2c sty $2c
5a8d 38 sec
5a8e 20 99 ff jsr $ff99
5a91 86 37 stx $37
5a93 84 38 sty $38
5a95 86 33 stx $33
5a97 84 34 sty $34
5a99 a0 00 ldy #$00
5a9b 98 tya
5a9c 91 2b sta ($2b),y
5a9e e6 2b inc $2b
5aa0 d0 02 bne $5aa4
5aa2 e6 2c inc $2c
5aa4 60 rts
5aa5 a5 2b lda $2b
5aa7 a4 2c ldy $2c
5aa9 20 08 a4 jsr $a408
5aac a9 73 lda #$73
5aae a0 e4 ldy #$e4
5ab0 20 1e ab jsr $ab1e
5ab3 a5 37 lda $37
5ab5 38 sec
5ab6 e5 2b sbc $2b
5ab8 aa tax
5ab9 a5 38 lda $38
5abb e5 2c sbc $2c
5abd 20 cd bd jsr $bdcd
5ac0 a9 60 lda #$60
5ac2 a0 e4 ldy #$e4
5ac4 20 1e ab jsr $ab1e
5ac7 4c 44 a6 jmp $a644
5aca 8b ???
5acb e3 ???
5acc 83 ???
5acd a4 7c ldy $7c
5acf a5 1a lda $1a
5ad1 a7 ???
5ad2 e4 a7 cpx $a7
5ad4 86 ae stx $ae
5ad6 a2 0b ldx #$0b
5ad8 bd 47 e4 lda $e447,x
5adb 9d 00 03 sta $0300,x
5ade ca dex
5adf 10 f7 bpl $5ad8
5ae1 30 57 bmi $5b3a
5ae3 20 42 41 jsr $4142
5ae6 53 ???
5ae7 49 43 eor #$43
5ae9 20 42 59 jsr $5942
5aec 54 ???
5aed 45 53 eor $53
5aef 20 46 52 jsr $5246
5af2 45 45 eor $45
5af4 0d 00 93 ora $9300
5af7 0d 20 20 ora $2020
5afa 20 20 2a jsr $2a20
5afd 2a rol a
5afe 2a rol a
5aff 2a rol a
5b00 20 43 4f jsr $4f43
5b03 4d 4d 4f eor $4f4d
5b06 44 ???
5b07 4f ???
5b08 52 ???
5b09 45 20 eor $20
5b0b 36 34 rol $34,x
5b0d 20 42 41 jsr $4142
5b10 53 ???
5b11 49 43 eor #$43
5b13 20 56 32 jsr $3256
5b16 20 2a 2a jsr $2a2a
5b19 2a rol a
5b1a 2a rol a
5b1b 0d 0d 20 ora $200d
5b1e 44 ???
5b1f 4f ???
5b20 4c 50 48 jmp $4850
5b23 49 4e eor #$4e
5b25 44 ???
5b26 4f ???
5b27 53 ???
5b28 20 32 2e jsr $2e32
5b2b 30 20 bmi $5b4d
5b2d 20 00 81 jsr $8100
5b30 48 pha
5b31 20 c9 ff jsr $ffc9
5b34 aa tax
5b35 68 pla
5b36 90 01 bcc $5b39
5b38 8a txa
5b39 60 rts
5b3a a9 87 lda #$87
5b3c a2 f3 ldx #$f3
5b3e 8d 97 02 sta $0297
5b41 8e 98 02 stx $0298
5b44 60 rts
5b45 78 sei
5b46 d8 cld
5b47 9a txs
5b48 e8 inx
5b49 8a txa
5b4a 85 01 sta $01
5b4c 9d 00 01 sta $0100,x
5b4f e8 inx
5b50 d0 fa bne $5b4c
5b52 e6 f1 inc $f1
5b54 d0 f6 bne $5b4c
5b56 a9 37 lda #$37
5b58 85 01 sta $01
5b5a 4c ef fc jmp $fcef
5b5d ad 86 02 lda $0286
5b60 91 f3 sta ($f3),y
5b62 60 rts
5b63 69 02 adc #$02
5b65 a4 91 ldy $91
5b67 c8 iny
5b68 d0 04 bne $5b6e
5b6a c5 a1 cmp $a1
5b6c d0 f7 bne $5b65
5b6e 60 rts
5b6f 8d 01 dd sta $dd01
5b72 ad 0d dd lda $dd0d
5b75 ad 00 dd lda $dd00
5b78 29 fb and #$fb
5b7a 8d 00 dd sta $dd00
5b7d 09 04 ora #$04
5b7f 8d 00 dd sta $dd00
5b82 60 rts
5b83 a2 00 ldx #$00
5b85 a0 dc ldy #$dc
5b87 60 rts
5b88 a2 28 ldx #$28
5b8a a0 19 ldy #$19
5b8c 60 rts
5b8d b0 07 bcs $5b96
5b8f 86 d6 stx $d6
5b91 84 d3 sty $d3
5b93 20 6c e5 jsr $e56c
5b96 a6 d6 ldx $d6
5b98 a4 d3 ldy $d3
5b9a 60 rts
5b9b 20 a0 e5 jsr $e5a0
5b9e a9 00 lda #$00
5ba0 8d 91 02 sta $0291
5ba3 85 cf sta $cf
5ba5 a9 48 lda #$48
5ba7 8d 8f 02 sta $028f
5baa a9 eb lda #$eb
5bac 8d 90 02 sta $0290
5baf a9 04 lda #$04
5bb1 8d 8b 02 sta $028b
5bb4 8d 88 02 sta $0288
5bb7 a9 0e lda #$0e
5bb9 8d 86 02 sta $0286
5bbc a9 0a lda #$0a
5bbe 8d 89 02 sta $0289
5bc1 a9 0c lda #$0c
5bc3 85 cd sta $cd
5bc5 85 cc sta $cc
5bc7 ad 88 02 lda $0288
5bca 09 80 ora #$80
5bcc a8 tay
5bcd a9 00 lda #$00
5bcf aa tax
5bd0 94 d9 sty $d9,x
5bd2 18 clc
5bd3 69 28 adc #$28
5bd5 90 01 bcc $5bd8
5bd7 c8 iny
5bd8 e8 inx
5bd9 e0 1a cpx #$1a
5bdb d0 f3 bne $5bd0
5bdd a9 ff lda #$ff
5bdf 95 d9 sta $d9,x
5be1 a2 18 ldx #$18
5be3 20 ff e9 jsr $e9ff
5be6 ca dex
5be7 10 fa bpl $5be3
5be9 a0 00 ldy #$00
5beb 84 d3 sty $d3
5bed 84 d6 sty $d6
5bef a6 d6 ldx $d6
5bf1 a5 d3 lda $d3
5bf3 b4 d9 ldy $d9,x
5bf5 30 08 bmi $5bff
5bf7 18 clc
5bf8 69 28 adc #$28
5bfa 85 d3 sta $d3
5bfc ca dex
5bfd 10 f4 bpl $5bf3
5bff 20 f0 e9 jsr $e9f0
5c02 a9 27 lda #$27
5c04 e8 inx
5c05 b4 d9 ldy $d9,x
5c07 30 06 bmi $5c0f
5c09 18 clc
5c0a 69 28 adc #$28
5c0c e8 inx
5c0d 10 f6 bpl $5c05
5c0f 85 d5 sta $d5
5c11 4c 24 ea jmp $ea24
5c14 4c a9 fb jmp $fba9
5c17 4c 01 e1 jmp $e101
5c1a 4c 94 f8 jmp $f894
5c1d 20 a0 e5 jsr $e5a0
5c20 4c 66 e5 jmp $e566
5c23 a9 03 lda #$03
5c25 85 9a sta $9a
5c27 a9 00 lda #$00
5c29 85 99 sta $99
5c2b a2 2f ldx #$2f
5c2d bd b8 ec lda $ecb8,x
5c30 9d ff cf sta $cfff,x
5c33 ca dex
5c34 d0 f7 bne $5c2d
5c36 60 rts
5c37 ac 77 02 ldy $0277
5c3a a2 00 ldx #$00
5c3c bd 78 02 lda $0278,x
5c3f 9d 77 02 sta $0277,x
5c42 e8 inx
5c43 e4 c6 cpx $c6
5c45 d0 f5 bne $5c3c
5c47 c6 c6 dec $c6
5c49 98 tya
5c4a 58 cli
5c4b 18 clc
5c4c 60 rts
5c4d 20 16 e7 jsr $e716
5c50 a5 c6 lda $c6
5c52 85 cc sta $cc
5c54 8d 92 02 sta $0292
5c57 f0 f7 beq $5c50
5c59 78 sei
5c5a a5 cf lda $cf
5c5c f0 0c beq $5c6a
5c5e a5 ce lda $ce
5c60 ae 87 02 ldx $0287
5c63 a0 00 ldy #$00
5c65 84 cf sty $cf
5c67 20 13 ea jsr $ea13
5c6a 20 33 f5 jsr $f533
5c6d c9 83 cmp #$83
5c6f d0 10 bne $5c81
5c71 a2 09 ldx #$09
5c73 78 sei
5c74 86 c6 stx $c6
5c76 bd e6 ec lda $ece6,x
5c79 9d 76 02 sta $0276,x
5c7c ca dex
5c7d d0 f7 bne $5c76
5c7f f0 cf beq $5c50
5c81 c9 0d cmp #$0d
5c83 d0 c8 bne $5c4d
5c85 a4 d5 ldy $d5
5c87 84 d0 sty $d0
5c89 b1 d1 lda ($d1),y
5c8b c9 20 cmp #$20
5c8d d0 03 bne $5c92
5c8f 88 dey
5c90 d0 f7 bne $5c89
5c92 c8 iny
5c93 84 c8 sty $c8
5c95 a0 00 ldy #$00
5c97 8c 92 02 sty $0292
5c9a 84 d3 sty $d3
5c9c 84 d4 sty $d4
5c9e a5 c9 lda $c9
5ca0 30 1b bmi $5cbd
5ca2 a6 d6 ldx $d6
5ca4 20 9c fd jsr $fd9c
5ca7 e4 c9 cpx $c9
5ca9 d0 12 bne $5cbd
5cab a5 ca lda $ca
5cad 85 d3 sta $d3
5caf c5 c8 cmp $c8
5cb1 90 0a bcc $5cbd
5cb3 b0 2b bcs $5ce0
5cb5 98 tya
5cb6 48 pha
5cb7 8a txa
5cb8 48 pha
5cb9 a5 d0 lda $d0
5cbb f0 93 beq $5c50
5cbd a4 d3 ldy $d3
5cbf b1 d1 lda ($d1),y
5cc1 85 d7 sta $d7
5cc3 29 3f and #$3f
5cc5 06 d7 asl $d7
5cc7 24 d7 bit $d7
5cc9 10 02 bpl $5ccd
5ccb 09 80 ora #$80
5ccd 90 04 bcc $5cd3
5ccf a6 d4 ldx $d4
5cd1 d0 04 bne $5cd7
5cd3 70 02 bvs $5cd7
5cd5 09 40 ora #$40
5cd7 e6 d3 inc $d3
5cd9 20 84 e6 jsr $e684
5cdc c4 c8 cpy $c8
5cde d0 17 bne $5cf7
5ce0 a9 00 lda #$00
5ce2 85 d0 sta $d0
5ce4 a9 0d lda #$0d
5ce6 a6 99 ldx $99
5ce8 e0 03 cpx #$03
5cea f0 06 beq $5cf2
5cec a6 9a ldx $9a
5cee e0 03 cpx #$03
5cf0 f0 03 beq $5cf5
5cf2 20 16 e7 jsr $e716
5cf5 a9 0d lda #$0d
5cf7 85 d7 sta $d7
5cf9 68 pla
5cfa aa tax
5cfb 68 pla
5cfc a8 tay
5cfd a5 d7 lda $d7
5cff c9 de cmp #$de
5d01 d0 02 bne $5d05
5d03 a9 ff lda #$ff
5d05 18 clc
5d06 60 rts
5d07 c9 22 cmp #$22
5d09 d0 08 bne $5d13
5d0b a5 d4 lda $d4
5d0d 49 01 eor #$01
5d0f 85 d4 sta $d4
5d11 a9 22 lda #$22
5d13 60 rts
5d14 09 40 ora #$40
5d16 a6 c7 ldx $c7
5d18 f0 02 beq $5d1c
5d1a 09 80 ora #$80
5d1c a6 d8 ldx $d8
5d1e f0 02 beq $5d22
5d20 46 d4 lsr $d4
5d22 ae 86 02 ldx $0286
5d25 20 13 ea jsr $ea13
5d28 20 b6 e6 jsr $e6b6
5d2b a5 d8 lda $d8
5d2d f0 02 beq $5d31
5d2f c6 d8 dec $d8
5d31 68 pla
5d32 a8 tay
5d33 68 pla
5d34 aa tax
5d35 68 pla
5d36 18 clc
5d37 58 cli
5d38 60 rts
5d39 20 b3 e8 jsr $e8b3
5d3c e6 d3 inc $d3
5d3e a5 d5 lda $d5
5d40 c5 d3 cmp $d3
5d42 b0 3f bcs $5d83
5d44 c9 4f cmp #$4f
5d46 f0 32 beq $5d7a
5d48 ad 92 02 lda $0292
5d4b f0 03 beq $5d50
5d4d 4c 67 e9 jmp $e967
5d50 a6 d6 ldx $d6
5d52 e0 19 cpx #$19
5d54 90 07 bcc $5d5d
5d56 20 ea e8 jsr $e8ea
5d59 c6 d6 dec $d6
5d5b a6 d6 ldx $d6
5d5d 16 d9 asl $d9,x
5d5f 56 d9 lsr $d9,x
5d61 e8 inx
5d62 b5 d9 lda $d9,x
5d64 09 80 ora #$80
5d66 95 d9 sta $d9,x
5d68 ca dex
5d69 a5 d5 lda $d5
5d6b 18 clc
5d6c 69 28 adc #$28
5d6e 85 d5 sta $d5
5d70 b5 d9 lda $d9,x
5d72 30 03 bmi $5d77
5d74 ca dex
5d75 d0 f9 bne $5d70
5d77 4c f0 e9 jmp $e9f0
5d7a c6 d6 dec $d6
5d7c 20 7c e8 jsr $e87c
5d7f a9 00 lda #$00
5d81 85 d3 sta $d3
5d83 60 rts
5d84 a6 d6 ldx $d6
5d86 d0 06 bne $5d8e
5d88 86 d3 stx $d3
5d8a 68 pla
5d8b 68 pla
5d8c d0 9d bne $5d2b
5d8e ca dex
5d8f 86 d6 stx $d6
5d91 20 6c e5 jsr $e56c
5d94 a4 d5 ldy $d5
5d96 84 d3 sty $d3
5d98 60 rts
5d99 48 pha
5d9a 85 d7 sta $d7
5d9c 8a txa
5d9d 48 pha
5d9e 98 tya
5d9f 48 pha
5da0 a9 00 lda #$00
5da2 85 d0 sta $d0
5da4 a4 d3 ldy $d3
5da6 a5 d7 lda $d7
5da8 10 03 bpl $5dad
5daa 4c d4 e7 jmp $e7d4
5dad c9 0d cmp #$0d
5daf d0 03 bne $5db4
5db1 4c 91 e8 jmp $e891
5db4 c9 20 cmp #$20
5db6 90 10 bcc $5dc8
5db8 c9 60 cmp #$60
5dba 90 04 bcc $5dc0
5dbc 29 df and #$df
5dbe d0 02 bne $5dc2
5dc0 29 3f and #$3f
5dc2 20 84 e6 jsr $e684
5dc5 4c 93 e6 jmp $e693
5dc8 a6 d8 ldx $d8
5dca f0 03 beq $5dcf
5dcc 4c 97 e6 jmp $e697
5dcf c9 14 cmp #$14
5dd1 d0 2e bne $5e01
5dd3 98 tya
5dd4 d0 06 bne $5ddc
5dd6 20 01 e7 jsr $e701
5dd9 4c 73 e7 jmp $e773
5ddc 20 a1 e8 jsr $e8a1
5ddf 88 dey
5de0 84 d3 sty $d3
5de2 20 24 ea jsr $ea24
5de5 c8 iny
5de6 b1 d1 lda ($d1),y
5de8 88 dey
5de9 91 d1 sta ($d1),y
5deb c8 iny
5dec b1 f3 lda ($f3),y
5dee 88 dey
5def 91 f3 sta ($f3),y
5df1 c8 iny
5df2 c4 d5 cpy $d5
5df4 d0 ef bne $5de5
5df6 a9 20 lda #$20
5df8 91 d1 sta ($d1),y
5dfa ad 86 02 lda $0286
5dfd 91 f3 sta ($f3),y
5dff 10 4d bpl $5e4e
5e01 a6 d4 ldx $d4
5e03 f0 03 beq $5e08
5e05 4c 97 e6 jmp $e697
5e08 c9 12 cmp #$12
5e0a d0 02 bne $5e0e
5e0c 85 c7 sta $c7
5e0e c9 13 cmp #$13
5e10 d0 03 bne $5e15
5e12 20 66 e5 jsr $e566
5e15 c9 1d cmp #$1d
5e17 d0 17 bne $5e30
5e19 c8 iny
5e1a 20 b3 e8 jsr $e8b3
5e1d 84 d3 sty $d3
5e1f 88 dey
5e20 c4 d5 cpy $d5
5e22 90 09 bcc $5e2d
5e24 c6 d6 dec $d6
5e26 20 7c e8 jsr $e87c
5e29 a0 00 ldy #$00
5e2b 84 d3 sty $d3
5e2d 4c ae e6 jmp $e6ae
5e30 c9 11 cmp #$11
5e32 d0 1d bne $5e51
5e34 18 clc
5e35 98 tya
5e36 69 28 adc #$28
5e38 a8 tay
5e39 e6 d6 inc $d6
5e3b c5 d5 cmp $d5
5e3d 90 ec bcc $5e2b
5e3f f0 ea beq $5e2b
5e41 c6 d6 dec $d6
5e43 e9 28 sbc #$28
5e45 90 04 bcc $5e4b
5e47 85 d3 sta $d3
5e49 d0 f8 bne $5e43
5e4b 20 7c e8 jsr $e87c
5e4e 4c ae e6 jmp $e6ae
5e51 20 cb e8 jsr $e8cb
5e54 4c 6b fa jmp $fa6b
5e57 29 7f and #$7f
5e59 c9 7f cmp #$7f
5e5b d0 02 bne $5e5f
5e5d a9 5e lda #$5e
5e5f c9 20 cmp #$20
5e61 90 03 bcc $5e66
5e63 4c 91 e6 jmp $e691
5e66 c9 0d cmp #$0d
5e68 d0 03 bne $5e6d
5e6a 4c 91 e8 jmp $e891