-
Notifications
You must be signed in to change notification settings - Fork 0
/
assemblyprog.o
1022 lines (1022 loc) · 45.1 KB
/
assemblyprog.o
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
0 => B"000000_0000_00_0000", -- NOPs
1 => B"000000_0000_00_0000", -- NOPs
-- MENU -- 2
2 => B"010111_1001_00_0000", -- "LOAD #$000F, Gr9" ;
3 => "0000000000001111", -- 15
4 => B"010111_1010_00_0000", -- "LOAD #32, Gr10 " ;
5 => "0000000000100000", -- 32
6 => B"010111_1011_00_0000", -- "LOAD #32, Gr11 " ;
7 => "0000000000100000", -- 32
8 => B"010111_1100_00_0000", -- "LOAD #0, Gr12 " ;
9 => "0000000000000000", -- 0
10 => B"010111_1101_00_0000", -- "LOAD #0, Gr13 " ;
11 => "0000000000000000", -- 0
12 => B"010111_1111_00_0000", -- "LOAD #$B00, Gr15 " ;
13 => "0000101100000000",
14 => B"010111_1110_00_0000", -- "LOAD #MENURETURN, Gr14 " ; -- 2
15 => "0000000000010010", -- 18
16 => B"001001_0000_00_0000", -- "BRA #PRINT " ; -- 812
17 => "0000001100101100", -- 812
-- MENURETURN -- 2
-- MENULOOP -- 2
18 => B"011001_0000_00_0000", -- "SPI Gr0" ; ladda SPI-data till gr0
19 => "0000000000000000", -- 0
20 => B"000101_0000_00_0000", -- "AND #$000F, Gr0" ; anda bort andra joysticks
21 => "0000000000001111", -- 15
22 => B"000100_0000_00_0000", -- "CMP #1, Gr0" ;
23 => "0000000000000001", -- 1
24 => B"001011_0000_00_0000", -- "BEQ #UPDIRSPEED" ; -- 40
25 => "0000000000101000", -- 40
26 => B"000100_0000_00_0000", -- "CMP #2, Gr0" ;
27 => "0000000000000010", -- 2
28 => B"001011_0000_00_0000", -- "BEQ #RIGHTDIRSPEED" ; -- 44
29 => "0000000000101100", -- 44
30 => B"000100_0000_00_0000", -- "CMP #3, Gr0" ;
31 => "0000000000000011", -- 3
32 => B"001011_0000_00_0000", -- "BEQ #DOWNDIRSPEED" ; -- 48
33 => "0000000000110000", -- 48
34 => B"000100_0000_00_0000", -- "CMP #4, Gr0" ;
35 => "0000000000000100", -- 4
36 => B"001011_0000_00_0000", -- "BEQ #LEFTDIRSPEED" ; -- 52
37 => "0000000000110100", -- 52
38 => B"001001_0000_00_0000", -- "BRA #MENULOOP" ; var inget hÃÂ¥ll, fortsätt kolla. -- 2
39 => "0000000000010010", -- 18
-- UPDIRSPEED -- 40
40 => B"010111_0000_00_0000", -- "LOAD #$000F, Gr0" ;
41 => "0000000000001111", -- 15
42 => B"001001_0000_00_0000", -- "BRA #STORESPEED" ; -- 56
43 => "0000000000111000", -- 56
-- RIGHTDIRSPEED -- 44
44 => B"010111_0000_00_0000", -- "LOAD #$000A, Gr0" ;
45 => "0000000000001010", -- 10
46 => B"001001_0000_00_0000", -- "BRA #STORESPEED," ; -- 56
47 => "0000000000111000", -- 56
-- DOWNDIRSPEED -- 48
48 => B"010111_0000_00_0000", -- "LOAD #$0006, Gr0" ;
49 => "0000000000000110", -- 6
50 => B"001001_0000_00_0000", -- "BRA #STORESPEED" ; -- 56
51 => "0000000000111000", -- 56
-- LEFTDIRSPEED -- 52
52 => B"010111_0000_00_0000", -- "LOAD #$0004, Gr0" ;
53 => "0000000000000100", -- 4
54 => B"001001_0000_00_0000", -- "BRA #STORESPEED" ; -- 56
55 => "0000000000111000", -- 56
-- STORESPEED -- 56
56 => B"010110_0000_01_0000", -- "STORE $A31, Gr0" ; lägg in vald hastighet pÃÂ¥ rätt minnesplats
57 => "0000101000110001",
-- MENU2 -- 2
58 => B"010111_1001_00_0000", -- "LOAD #$000F, Gr9" ;
59 => "0000000000001111", -- 15
60 => B"010111_1010_00_0000", -- "LOAD #32, Gr10 " ;
61 => "0000000000100000", -- 32
62 => B"010111_1011_00_0000", -- "LOAD #7, Gr11 " ;
63 => "0000000000000111", -- 7
64 => B"010111_1100_00_0000", -- "LOAD #0, Gr12 " ;
65 => "0000000000000000", -- 0
66 => B"010111_1101_00_0000", -- "LOAD #1, Gr13 " ;
67 => "0000000000000001", -- 1
68 => B"010111_1111_00_0000", -- "LOAD #$C5C, Gr15 " ;
69 => "0000110001011100",
70 => B"010111_1110_00_0000", -- "LOAD #MENU2RETURN, Gr14 " ; -- 2
71 => "0000000001001010", -- 74
72 => B"001001_0000_00_0000", -- "BRA #PRINT " ; -- 812
73 => "0000001100101100", -- 812
-- MENU2RETURN -- 2
-- RESETSPI -- 74
74 => B"011001_0000_00_0000", -- "SPI Gr0 " ;
75 => "0000000000000000", -- 0
76 => B"000101_0000_00_0000", -- "AND #$000F, Gr0 " ;
77 => "0000000000001111", -- 15
78 => B"000100_0000_00_0000", -- "CMP #$0000, Gr0" ;
79 => "0000000000000000", -- 0
80 => B"001010_0000_00_0000", -- "BNE #RESETSPI " ; -- 74
81 => "0000000001001010", -- 74
-- MENU2LOOP -- 2
82 => B"011001_0000_00_0000", -- "SPI Gr0" ; ladda SPI-data till gr0
83 => "0000000000000000", -- 0
84 => B"000101_0000_00_0000", -- "AND #$000F, Gr0" ; anda bort andra joysticks
85 => "0000000000001111", -- 15
86 => B"000100_0000_00_0000", -- "CMP #1, Gr0" ;
87 => "0000000000000001", -- 1
88 => B"001011_0000_00_0000", -- "BEQ #UPDIRPLAYERS" ; -- 104
89 => "0000000001101000", -- 104
90 => B"000100_0000_00_0000", -- "CMP #2, Gr0" ;
91 => "0000000000000010", -- 2
92 => B"001011_0000_00_0000", -- "BEQ #RIGHTDIRPLAYERS" ; -- 108
93 => "0000000001101100", -- 108
94 => B"000100_0000_00_0000", -- "CMP #3, Gr0" ;
95 => "0000000000000011", -- 3
96 => B"001011_0000_00_0000", -- "BEQ #DOWNDIRPLAYERS" ; -- 112
97 => "0000000001110000", -- 112
98 => B"000100_0000_00_0000", -- "CMP #4, Gr0" ;
99 => "0000000000000100", -- 4
100 => B"001011_0000_00_0000", -- "BEQ #LEFTDIRPLAYERS" ; -- 116
101 => "0000000001110100", -- 116
102 => B"001001_0000_00_0000", -- "BRA #MENU2LOOP" ; var inget hÃÂ¥ll, fortsätt kolla. -- 2
103 => "0000000001010010", -- 82
-- UPDIRPLAYERS -- 104
104 => B"010111_0000_00_0000", -- "LOAD #$0001, Gr0" ;
105 => "0000000000000001", -- 1
106 => B"001001_0000_00_0000", -- "BRA #STOREPLAYERS" ; -- 120
107 => "0000000001111000", -- 120
-- RIGHTDIRPLAYERS -- 108
108 => B"010111_0000_00_0000", -- "LOAD #$0002, Gr0" ;
109 => "0000000000000010", -- 2
110 => B"001001_0000_00_0000", -- "BRA #STOREPLAYERS," ; -- 120
111 => "0000000001111000", -- 120
-- DOWNDIRPLAYERS -- 112
112 => B"010111_0000_00_0000", -- "LOAD #$0003, Gr0" ;
113 => "0000000000000011", -- 3
114 => B"001001_0000_00_0000", -- "BRA #STOREPLAYERS" ; -- 120
115 => "0000000001111000", -- 120
-- LEFTDIRPLAYERS -- 116
116 => B"010111_0000_00_0000", -- "LOAD #$0004, Gr0" ;
117 => "0000000000000100", -- 4
118 => B"001001_0000_00_0000", -- "BRA #STOREPLAYERS" ; -- 120
119 => "0000000001111000", -- 120
-- STOREPLAYERS -- 120
120 => B"010110_0000_01_0000", -- "STORE $A32, Gr0" ; lägg in vald hastighet pÃÂ¥ rätt minnesplats
121 => "0000101000110010",
122 => B"010111_1110_00_0000", -- "LOAD #MENU3, Gr14 " ; -- 2
123 => "0000000010000000", -- 128
124 => B"010111_1111_00_0000", -- "LOAD #$0000, Gr15 " ;
125 => "0000000000000000", -- 0
126 => B"001001_0000_00_0000", -- "BRA #CLEARSCREEN " ; -- 906
127 => "0000001110001010", -- 906
-- MENU3 -- 2
128 => B"010111_1001_00_0000", -- "LOAD #$000F, Gr9" ;
129 => "0000000000001111", -- 15
130 => B"010111_1010_00_0000", -- "LOAD #32, Gr10 " ;
131 => "0000000000100000", -- 32
132 => B"010111_1011_00_0000", -- "LOAD #20, Gr11 " ;
133 => "0000000000010100", -- 20
134 => B"010111_1100_00_0000", -- "LOAD #0, Gr12 " ;
135 => "0000000000000000", -- 0
136 => B"010111_1101_00_0000", -- "LOAD #11, Gr13 " ;
137 => "0000000000001011", -- 11
138 => B"010111_1111_00_0000", -- "LOAD #$CDC, Gr15 " ;
139 => "0000110011011100",
140 => B"010111_1110_00_0000", -- "LOAD #MENU3RETURN1, Gr14 " ; -- 2
141 => "0000000010010000", -- 144
142 => B"001001_0000_00_0000", -- "BRA #PRINT " ; -- 812
143 => "0000001100101100", -- 812
-- MENU3RETURN1 -- 2
144 => B"010111_1001_00_0000", -- "LOAD #$000F, Gr9" ;
145 => "0000000000001111", -- 15
146 => B"010111_1010_00_0000", -- "LOAD #22, Gr10 " ;
147 => "0000000000010110", -- 22
148 => B"010111_1011_00_0000", -- "LOAD #28, Gr11 " ;
149 => "0000000000011100", -- 28
150 => B"010111_1100_00_0000", -- "LOAD #14, Gr12 " ;
151 => "0000000000001110", -- 14
152 => B"010111_1101_00_0000", -- "LOAD #23, Gr13 " ;
153 => "0000000000010111", -- 23
154 => B"010111_1111_00_0000", -- "LOAD #$D2A, Gr15 " ;
155 => "0000110100101010",
156 => B"010111_1110_00_0000", -- "LOAD #MENU3RETURN2, Gr14 " ; -- 2
157 => "0000000010100000", -- 160
158 => B"001001_0000_00_0000", -- "BRA #PRINT " ; -- 812
159 => "0000001100101100", -- 812
-- MENU3RETURN2 -- 2
160 => B"010111_0000_00_0000", -- "LOAD #0, Gr0" ;
161 => "0000000000000000", -- 0
-- UARTLOOP -- 162
162 => B"010000_0000_00_0000", -- "BOU #UARTREADY " ; kolla om uart har ett word redo att hämtas -- 166
163 => "0000000010100110", -- 166
164 => B"001001_0000_00_0000", -- "BRA #UARTLOOP " ; fortsätt vänta -- 162
165 => "0000000010100010", -- 162
-- UARTREADY -- 166
166 => B"011010_0001_00_0000", -- "UART Gr1" ; ladda Uart-wordet till Gr1
167 => "0000000000000000", -- 0
168 => B"010110_0001_11_0000", -- "STORE $DB0, Gr1, Gr0" ; Lägg till wordet pÃÂ¥ rätt ställe. använder Gr0 som index
169 => "0000110110110000",
170 => B"000001_0000_00_0000", -- "ADD #1, Gr0" ; incrementera countern
171 => "0000000000000001", -- 1
172 => B"000100_0000_00_0000", -- "CMP #64, Gr0" ; kolla om vi är färdiga
173 => "0000000001000000", -- 64
174 => B"001011_0000_00_0000", -- "BEQ #STARTLIGHT" ; isf, hoppa till spelet -- 178
175 => "0000000010110010", -- 178
176 => B"001001_0000_00_0000", -- "BRA #UARTLOOP" ; annars, fortsätt leta words -- 162
177 => "0000000010100010", -- 162
-- STARTLIGHT -- 178
178 => B"010111_0101_00_0000", -- "LOAD #$0003, Gr5" ;
179 => "0000000000000011", -- 3
-- STARTLIGHTLOOP -- 178
180 => B"000001_0101_00_0000", -- "ADD #1, Gr5" ;
181 => "0000000000000001", -- 1
182 => B"010110_0101_01_0000", -- "STORE $F50, Gr5" ;
183 => "0000111101010000",
184 => B"010111_1001_01_0000", -- "LOAD $F50, Gr9" ;
185 => "0000111101010000",
186 => B"010111_1010_00_0000", -- "LOAD #22, Gr10 " ;
187 => "0000000000010110", -- 22
188 => B"010111_1011_00_0000", -- "LOAD #28, Gr11 " ;
189 => "0000000000011100", -- 28
190 => B"010111_1100_00_0000", -- "LOAD #14, Gr12 " ;
191 => "0000000000001110", -- 14
192 => B"010111_1101_00_0000", -- "LOAD #23, Gr13 " ;
193 => "0000000000010111", -- 23
194 => B"010111_1111_00_0000", -- "LOAD #$D2A, Gr15 " ;
195 => "0000110100101010",
196 => B"010111_1110_00_0000", -- "LOAD #STARTLIGHTRETURN, Gr14 " ; -- 178
197 => "0000000011001000", -- 200
198 => B"001001_0000_00_0000", -- "BRA #PRINT " ; -- 812
199 => "0000001100101100", -- 812
-- STARTLIGHTRETURN -- 178
200 => B"010111_0100_00_0000", -- "LOAD #0, Gr4 " ;
201 => "0000000000000000", -- 0
202 => B"010111_0110_00_0000", -- "LOAD #0, Gr6" ;
203 => "0000000000000000", -- 0
-- STARTLIGHTRETURNLOOP -- 178
204 => B"000001_0100_00_0000", -- "ADD #1, Gr4 " ;
205 => "0000000000000001", -- 1
206 => B"000100_0100_00_0000", -- "CMP #$FFFF, Gr4 " ;
207 => "1111111111111111",
208 => B"001010_0000_00_0000", -- "BNE #STARTLIGHTRETURNLOOP " ; -- 178
209 => "0000000011001100", -- 204
210 => B"010111_0100_00_0000", -- "LOAD #0, Gr4 " ;
211 => "0000000000000000", -- 0
212 => B"000001_0110_00_0000", -- "ADD #1, Gr6" ;
213 => "0000000000000001", -- 1
214 => B"000100_0110_00_0000", -- "CMP #$002F, Gr6" ;
215 => "0000000000101111", -- 47
216 => B"001010_0000_00_0000", -- "BNE #STARTLIGHTRETURNLOOP " ; -- 178
217 => "0000000011001100", -- 204
218 => B"010111_0101_01_0000", -- "LOAD $F50, Gr5" ;
219 => "0000111101010000",
220 => B"000100_0101_00_0000", -- "CMP #$0006, Gr5 " ;
221 => "0000000000000110", -- 6
222 => B"001010_0000_00_0000", -- "BNE #STARTLIGHTLOOP " ; -- 178
223 => "0000000010110100", -- 180
-- GAME -- 224
224 => B"010111_1001_00_0000", -- "LOAD #0, Gr9" ; Gr9 = current orm
225 => "0000000000000000", -- 0
-- INITLOOP -- 226
226 => B"010110_1001_01_0000", -- "STORE $A21, Gr9" ;
227 => "0000101000100001",
228 => B"010111_0000_11_1001", -- "LOAD $A54, Gr0, Gr9" ; Ladda konstanten färg
229 => "0000101001010100",
230 => B"010110_0000_11_1001", -- "STORE $A00, Gr0, Gr9" ; Spara färgen för ormX
231 => "0000101000000000",
232 => B"010111_0000_11_1001", -- "LOAD $A58, Gr0, Gr9 " ; Ladda start riktning
233 => "0000101001011000",
234 => B"010110_0000_11_1001", -- "STORE $A04, Gr0, Gr9 " ; Spara ormX riktning
235 => "0000101000000100",
236 => B"010110_0000_11_1001", -- "STORE $A18, Gr0, Gr9 " ; Spara ormX prevRiktning
237 => "0000101000011000",
238 => B"010111_0001_00_0000", -- "LOAD #1, Gr1" ; Ladda in Head Pointer till arrpos 1
239 => "0000000000000001", -- 1
240 => B"010110_0001_11_1001", -- "STORE $A10, Gr1, Gr9" ;
241 => "0000101000010000",
242 => B"010111_0001_00_0000", -- "LOAD #0, Gr1" ; Ladda in Tail Pointer till arrpos 0
243 => "0000000000000000", -- 0
244 => B"010110_0001_11_1001", -- "STORE $A14, Gr1, Gr9" ;
245 => "0000101000010100",
246 => B"010110_0001_11_1001", -- "STORE $A1C, Gr1, Gr9" ; Spara 0 som ormX score
247 => "0000101000011100",
248 => B"010111_0000_11_1001", -- "LOAD $A50, Gr0, Gr9 " ; Ladda Start Pos
249 => "0000101001010000",
250 => B"010111_1000_01_0000", -- "LOAD $A21, Gr8" ; Ladda ormX till gr8
251 => "0000101000100001",
252 => B"010011_1000_00_0000", -- "LSL #6, Gr8 " ; Multiplicera med 64
253 => "0000000000000110", -- 6
254 => B"000001_1000_11_1001", -- "ADD $A10, Gr8, Gr9 " ; Adda med Head pos
255 => "0000101000010000",
256 => B"010110_0000_11_1000", -- "STORE $E00, Gr0, Gr8" ; Store Head Pos
257 => "0000111000000000",
258 => B"010111_0000_11_1001", -- "LOAD $A5C, Gr0, Gr9 " ; Ladda Start Tail pos
259 => "0000101001011100",
260 => B"000010_1000_11_1001", -- "SUB $A10, Gr8, Gr9 " ; Ta bort Head pos
261 => "0000101000010000",
262 => B"000001_1000_11_1001", -- "ADD $A14, Gr8, Gr9 " ; Adda med Tail pos
263 => "0000101000010100",
264 => B"010110_0000_11_1000", -- "STORE $E00, Gr0, Gr8" ; Store Tail Pos
265 => "0000111000000000",
266 => B"000001_1001_00_0000", -- "ADD #1, Gr9" ;
267 => "0000000000000001", -- 1
268 => B"000100_1001_01_0000", -- "CMP $A32, Gr9" ; Loop stuff
269 => "0000101000110010",
270 => B"001010_0000_00_0000", -- "BNE #INITLOOP" ; -- 226
271 => "0000000011100010", -- 226
-- APPLEINIT -- 272
272 => B"010111_0000_01_0000", -- "LOAD $A60, Gr0" ; Ladda in äpple i mitten
273 => "0000101001100000",
274 => B"010110_0000_01_0000", -- "STORE $A20, Gr0" ;
275 => "0000101000100000",
-- PRINTMAP -- 812
276 => B"010111_0000_00_0000", -- "LOAD #0, Gr0" ;
277 => "0000000000000000", -- 0
278 => B"010111_0001_00_0000", -- "LOAD #0, Gr1" ;
279 => "0000000000000000", -- 0
-- PRINTMAPLOOPX -- 812
280 => B"010110_0000_01_0000", -- "STORE $F00, Gr0" ; kopiera X och Y till in-register till TOGMEM -- 734
281 => "0000111100000000",
282 => B"010110_0001_01_0000", -- "STORE $F01, Gr1" ;
283 => "0000111100000001",
284 => B"010111_1100_01_0000", -- "LOAD $F00, Gr12" ;
285 => "0000111100000000",
286 => B"010111_1101_01_0000", -- "LOAD $F01, Gr13" ;
287 => "0000111100000001",
288 => B"010111_1110_00_0000", -- "LOAD #PRINTMAPRETURN, Gr14" ; return-adress -- 812
289 => "0000000100100100", -- 292
290 => B"001001_0000_00_0000", -- "BRA #TOGMEM" ; -- 734
291 => "0000001011011110", -- 734
-- PRINTMAPRETURN -- 812
292 => B"010111_1110_00_0000", -- "LOAD #PRINTMAPRETURN2, Gr14" ; -- 812
293 => "0000000100101000", -- 296
294 => B"001001_0000_00_0000", -- "BRA #GETOBSTACLEBYGMEM" ; -- 762
295 => "0000001011111010", -- 762
-- PRINTMAPRETURN2 -- 812
296 => B"011000_1011_00_0000", -- "GSTORE Gr11" ; F är tile-värdet för hinder
297 => "0000000000000000", -- 0
298 => B"000001_0000_00_0000", -- "ADD #1, Gr0" ; öka X
299 => "0000000000000001", -- 1
300 => B"000100_0000_00_0000", -- "CMP #32, Gr0" ;
301 => "0000000000100000", -- 32
302 => B"001010_0000_00_0000", -- "BNE #PRINTMAPLOOPX" ; om vi inte är färdiga med raden -- 812
303 => "0000000100011000", -- 280
-- PRINTMAPLOOPY -- 812
304 => B"010111_0000_00_0000", -- "LOAD #0, Gr0" ;
305 => "0000000000000000", -- 0
306 => B"000001_0001_00_0000", -- "ADD #1, Gr1" ;
307 => "0000000000000001", -- 1
308 => B"000100_0001_00_0000", -- "CMP #32, Gr1" ;
309 => "0000000000100000", -- 32
310 => B"001010_0000_00_0000", -- "BNE #PRINTMAPLOOPX" ; om vi inte är färdiga, fortsätt loopa -- 812
311 => "0000000100011000", -- 280
-- GAMELOOP -- 224
-- SETDIRS -- 312
312 => B"010111_1001_00_0000", -- "LOAD #0, Gr9 " ;
313 => "0000000000000000", -- 0
-- SETDIRSLOOP -- 312
314 => B"010110_1001_01_0000", -- "STORE $A21, Gr9 " ;
315 => "0000101000100001",
316 => B"010111_1000_01_0000", -- "LOAD $A21, Gr8 " ;
317 => "0000101000100001",
318 => B"010011_1000_00_0000", -- "LSL #2, Gr8 " ;
319 => "0000000000000010", -- 2
320 => B"010110_1000_01_0000", -- "STORE $F00, Gr8 " ;
321 => "0000111100000000",
322 => B"011001_0101_00_0000", -- "SPI Gr5 " ;
323 => "0000000000000000", -- 0
324 => B"010010_0101_01_0000", -- "LSR $F00, Gr5 " ;
325 => "0000111100000000",
326 => B"000101_0101_00_0000", -- "AND #$000F, Gr5 " ;
327 => "0000000000001111", -- 15
328 => B"000100_0101_00_0000", -- "CMP #0, Gr5 " ;
329 => "0000000000000000", -- 0
330 => B"001011_0000_00_0000", -- "BEQ #SETDIRNEXT " ; -- 346
331 => "0000000101011010", -- 346
332 => B"010110_0101_01_0000", -- "STORE $F00, Gr5 " ;
333 => "0000111100000000",
334 => B"010111_0100_01_0000", -- "LOAD $F00, Gr4 " ;
335 => "0000111100000000",
336 => B"000001_0100_11_1001", -- "ADD $A04, Gr4, Gr9 " ;
337 => "0000101000000100",
338 => B"000101_0100_00_0000", -- "AND #1, Gr4 " ;
339 => "0000000000000001", -- 1
340 => B"000100_0100_00_0000", -- "CMP #0, Gr4 " ;
341 => "0000000000000000", -- 0
342 => B"001011_0000_00_0000", -- "BEQ #SETDIRNEXT " ; -- 346
343 => "0000000101011010", -- 346
344 => B"010110_0101_11_1001", -- "STORE $A04, Gr5, Gr9" ;
345 => "0000101000000100",
-- SETDIRNEXT -- 346
346 => B"000001_1001_00_0000", -- "ADD #1, Gr9 " ;
347 => "0000000000000001", -- 1
348 => B"000100_1001_01_0000", -- "CMP $A32, Gr9 " ;
349 => "0000101000110010",
350 => B"001010_0000_00_0000", -- "BNE #SETDIRSLOOP " ; -- 312
351 => "0000000100111010", -- 314
-- MOVESNAKES -- 352
352 => B"010111_1001_00_0000", -- "LOAD #0, Gr9" ;
353 => "0000000000000000", -- 0
-- MOVESNAKESLOOP -- 352
354 => B"010110_1001_01_0000", -- "STORE $A21, Gr9" ; Snake i
355 => "0000101000100001",
356 => B"010111_1000_01_0000", -- "LOAD $A21, Gr8 " ;
357 => "0000101000100001",
358 => B"010011_1000_00_0000", -- "LSL #6, Gr8 " ;
359 => "0000000000000110", -- 6
360 => B"000001_1000_11_1001", -- "ADD $A10, Gr8, Gr9 " ;
361 => "0000101000010000",
362 => B"010111_1111_11_1000", -- "LOAD $E00, Gr15, Gr8 " ;
363 => "0000111000000000",
364 => B"000010_1000_11_1001", -- "SUB $A10, Gr8, Gr9 " ;
365 => "0000101000010000",
366 => B"010111_1110_00_0000", -- "LOAD #MOVESNAKEDIRRETURN1, Gr14" ; -- 370
367 => "0000000101110010", -- 370
368 => B"001001_0000_00_0000", -- "BRA #FROMGMEM " ; -- 748
369 => "0000001011101100", -- 748
-- MOVESNAKEDIRRETURN1 -- 370
370 => B"010111_0101_11_1001", -- "LOAD $A04, Gr5, Gr9" ; Ladda riktning
371 => "0000101000000100",
372 => B"000100_0101_00_0000", -- "CMP #1, Gr5" ;
373 => "0000000000000001", -- 1
374 => B"001011_0000_00_0000", -- "BEQ #MOVESNAKEUP" ; -- 404
375 => "0000000110000100", -- 388
376 => B"000100_0101_00_0000", -- "CMP #2, Gr5" ;
377 => "0000000000000010", -- 2
378 => B"001011_0000_00_0000", -- "BEQ #MOVESNAKERIGHT" ; -- 404
379 => "0000000110001000", -- 392
380 => B"000100_0101_00_0000", -- "CMP #3, Gr5" ;
381 => "0000000000000011", -- 3
382 => B"001011_0000_00_0000", -- "BEQ #MOVESNAKEDOWN" ; -- 396
383 => "0000000110001100", -- 396
384 => B"000100_0101_00_0000", -- "CMP #4, Gr5" ;
385 => "0000000000000100", -- 4
386 => B"001011_0000_00_0000", -- "BEQ #MOVESNAKELEFT" ; -- 404
387 => "0000000110010000", -- 400
-- MOVESNAKEUP -- 404
388 => B"000010_1101_00_0000", -- "SUB #1, Gr13 " ;
389 => "0000000000000001", -- 1
390 => B"001001_0000_00_0000", -- "BRA #MOVESNAKE " ; -- 404
391 => "0000000110010100", -- 404
-- MOVESNAKERIGHT -- 404
392 => B"000001_1100_00_0000", -- "ADD #1, Gr12 " ;
393 => "0000000000000001", -- 1
394 => B"001001_0000_00_0000", -- "BRA #MOVESNAKE " ; -- 404
395 => "0000000110010100", -- 404
-- MOVESNAKEDOWN -- 396
396 => B"000001_1101_00_0000", -- "ADD #1, Gr13 " ;
397 => "0000000000000001", -- 1
398 => B"001001_0000_00_0000", -- "BRA #MOVESNAKE " ; -- 404
399 => "0000000110010100", -- 404
-- MOVESNAKELEFT -- 404
400 => B"000010_1100_00_0000", -- "SUB #1, Gr12 " ;
401 => "0000000000000001", -- 1
402 => B"001001_0000_00_0000", -- "BRA #MOVESNAKE " ; -- 404
403 => "0000000110010100", -- 404
-- MOVESNAKE -- 404
404 => B"000101_1100_00_0000", -- "AND #$001F, Gr12 " ;
405 => "0000000000011111", -- 31
406 => B"000101_1101_00_0000", -- "AND #$001F, Gr13 " ;
407 => "0000000000011111", -- 31
408 => B"010111_1110_00_0000", -- "LOAD #MOVESNAKERETURN1, Gr14 " ; -- 412
409 => "0000000110011100", -- 412
410 => B"001001_0000_00_0000", -- "BRA #TOGMEM " ; -- 734
411 => "0000001011011110", -- 734
-- MOVESNAKERETURN1 -- 412
412 => B"010111_0111_11_1001", -- "LOAD $A10, Gr7, Gr9 " ;
413 => "0000101000010000",
414 => B"000001_0111_00_0000", -- "ADD #1, Gr7 " ;
415 => "0000000000000001", -- 1
416 => B"000101_0111_00_0000", -- "AND #$003F, Gr7 " ;
417 => "0000000000111111", -- 63
418 => B"010110_0111_11_1001", -- "STORE $A10, Gr7, Gr9 " ;
419 => "0000101000010000",
420 => B"000001_1000_11_1001", -- "ADD $A10, Gr8, Gr9 " ;
421 => "0000101000010000",
422 => B"010110_1111_11_1000", -- "STORE $E00, Gr15, Gr8 " ;
423 => "0000111000000000",
424 => B"000010_1000_11_1001", -- "SUB $A10, Gr8, Gr9 " ;
425 => "0000101000010000",
426 => B"000001_1000_11_1001", -- "ADD $A14, Gr8, Gr9 " ;
427 => "0000101000010100",
428 => B"010111_1111_11_1000", -- "LOAD $E00, Gr15, Gr8 " ;
429 => "0000111000000000",
430 => B"010111_0001_00_0000", -- "LOAD #0, Gr1" ;
431 => "0000000000000000", -- 0
432 => B"011000_0001_00_0000", -- "GSTORE Gr1 " ;
433 => "0000000000000000", -- 0
434 => B"010111_0111_11_1001", -- "LOAD $A14, Gr7, Gr9 " ;
435 => "0000101000010100",
436 => B"000001_0111_00_0000", -- "ADD #1, Gr7 " ;
437 => "0000000000000001", -- 1
438 => B"000101_0111_00_0000", -- "AND #$003F, Gr7 " ;
439 => "0000000000111111", -- 63
440 => B"010110_0111_11_1001", -- "STORE $A14, Gr7, Gr9 " ;
441 => "0000101000010100",
442 => B"000001_1001_00_0000", -- "ADD #1, Gr9 " ;
443 => "0000000000000001", -- 1
444 => B"000100_1001_01_0000", -- "CMP $A32, Gr9 " ;
445 => "0000101000110010",
446 => B"001010_0000_00_0000", -- "BNE #MOVESNAKESLOOP " ; -- 352
447 => "0000000101100010", -- 354
-- CHECKSNAKES -- 448
448 => B"010111_1001_00_0000", -- "LOAD #0, Gr9 " ;
449 => "0000000000000000", -- 0
-- CHECKSNAKESLOOP1 -- 450
450 => B"010110_1001_01_0000", -- "STORE $A21, Gr9 " ;
451 => "0000101000100001",
452 => B"010111_1000_01_0000", -- "LOAD $A21, Gr8 " ;
453 => "0000101000100001",
454 => B"010011_1000_00_0000", -- "LSL #6, Gr8 " ;
455 => "0000000000000110", -- 6
456 => B"000001_1000_11_1001", -- "ADD $A10, Gr8, Gr9 " ;
457 => "0000101000010000",
458 => B"010111_0111_11_1000", -- "LOAD $E00, Gr7, Gr8 " ;
459 => "0000111000000000",
460 => B"010111_0110_00_0000", -- "LOAD #0, Gr6 " ; Gr9 = Yttre OrmX, Gr8 = arbete för yttre OrmX, Gr7 = Yttre orm huvud pos
461 => "0000000000000000", -- 0
-- CHECKSNAKESLOOP2 -- 462
462 => B"010110_0110_01_0000", -- "STORE $F00, Gr6 " ;
463 => "0000111100000000",
464 => B"010111_0101_01_0000", -- "LOAD $F00, Gr5 " ;
465 => "0000111100000000",
466 => B"010011_0101_00_0000", -- "LSL #6, Gr5 " ;
467 => "0000000000000110", -- 6
468 => B"010111_0100_11_0110", -- "LOAD $A14, Gr4, Gr6 " ;
469 => "0000101000010100",
-- CHECKSNAKESSEGMENTS -- 470
470 => B"010110_0100_01_0000", -- "STORE $F01, Gr4 " ;
471 => "0000111100000001",
472 => B"000001_0101_01_0000", -- "ADD $F01, Gr5" ;
473 => "0000111100000001",
474 => B"010111_0011_11_0101", -- "LOAD $E00, Gr3, Gr5" ;
475 => "0000111000000000",
476 => B"000010_0101_01_0000", -- "SUB $F01, Gr5 " ;
477 => "0000111100000001",
478 => B"010110_0011_01_0000", -- "STORE $F02, Gr3 " ;
479 => "0000111100000010",
480 => B"000100_0111_01_0000", -- "CMP $F02, Gr7 " ;
481 => "0000111100000010",
482 => B"001011_0000_00_0000", -- "BEQ #INFINITE " ; Gr3 = Seg pos -- 692
483 => "0000001010110100", -- 692
484 => B"000001_0100_00_0000", -- "ADD #1, Gr4 " ;
485 => "0000000000000001", -- 1
486 => B"000101_0100_00_0000", -- "AND #$003F, Gr4 " ;
487 => "0000000000111111", -- 63
488 => B"000100_0100_11_0110", -- "CMP $A10, Gr4, Gr6 " ;
489 => "0000101000010000",
490 => B"001010_0000_00_0000", -- "BNE #CHECKSNAKESSEGMENTS " ; -- 470
491 => "0000000111010110", -- 470
492 => B"000001_0110_00_0000", -- "ADD #1, Gr6 " ;
493 => "0000000000000001", -- 1
494 => B"000100_0110_01_0000", -- "CMP $A32, Gr6 " ;
495 => "0000101000110010",
496 => B"001010_0000_00_0000", -- "BNE #CHECKSNAKESLOOP2 " ; -- 462
497 => "0000000111001110", -- 462
498 => B"000001_1001_00_0000", -- "ADD #1, Gr9 " ;
499 => "0000000000000001", -- 1
500 => B"000100_1001_01_0000", -- "CMP $A32, Gr9 " ;
501 => "0000101000110010",
502 => B"001010_0000_00_0000", -- "BNE #CHECKSNAKESLOOP1 " ; -- 450
503 => "0000000111000010", -- 450
-- CHECKWALLS -- 504
504 => B"010111_1001_00_0000", -- "LOAD #0, Gr9 " ;
505 => "0000000000000000", -- 0
-- CHECKWALLSLOOP -- 506
506 => B"010110_1001_01_0000", -- "STORE $A21, Gr9 " ;
507 => "0000101000100001",
508 => B"010111_1000_01_0000", -- "LOAD $A21, Gr8 " ;
509 => "0000101000100001",
510 => B"010011_1000_00_0000", -- "LSL #6, Gr8 " ;
511 => "0000000000000110", -- 6
512 => B"000001_1000_11_1001", -- "ADD $A10, Gr8, Gr9 " ;
513 => "0000101000010000",
514 => B"010111_1111_11_1000", -- "LOAD $E00, Gr15, Gr8 " ;
515 => "0000111000000000",
516 => B"010111_1110_00_0000", -- "LOAD #CHECKWALLSRETURN, Gr14 " ; -- 504
517 => "0000001000001000", -- 520
518 => B"001001_0000_00_0000", -- "BRA #GETOBSTACLEBYGMEM " ; -- 762
519 => "0000001011111010", -- 762
-- CHECKWALLSRETURN -- 504
520 => B"000100_1011_00_0000", -- "CMP #$FFFF, Gr11 " ;
521 => "1111111111111111",
522 => B"001011_0000_00_0000", -- "BEQ #INFINITE " ; -- 692
523 => "0000001010110100", -- 692
524 => B"000001_1001_00_0000", -- "ADD #1, Gr9 " ;
525 => "0000000000000001", -- 1
526 => B"000100_1001_01_0000", -- "CMP $A32, Gr9 " ;
527 => "0000101000110010",
528 => B"001010_0000_00_0000", -- "BNE #CHECKWALLSLOOP " ; -- 506
529 => "0000000111111010", -- 506
-- CHECKAPPLE -- 530
530 => B"010111_1001_00_0000", -- "LOAD #0, Gr9 " ;
531 => "0000000000000000", -- 0
532 => B"010111_0101_01_0000", -- "LOAD $A20, Gr5 " ;
533 => "0000101000100000",
-- CHECKAPPLELOOP -- 530
534 => B"010110_1001_01_0000", -- "STORE $A21, Gr9 " ;
535 => "0000101000100001",
536 => B"010111_1000_01_0000", -- "LOAD $A21, Gr8 " ;
537 => "0000101000100001",
538 => B"010011_1000_00_0000", -- "LSL #6, Gr8 " ;
539 => "0000000000000110", -- 6
540 => B"000001_1000_11_1001", -- "ADD $A10, Gr8, Gr9 " ;
541 => "0000101000010000",
542 => B"000100_0101_11_1000", -- "CMP $E00, Gr5, Gr8 " ;
543 => "0000111000000000",
544 => B"001011_0000_00_0000", -- "BEQ #TAKEAPPLE" ; -- 554
545 => "0000001000101010", -- 554
546 => B"000001_1001_00_0000", -- "ADD #1, Gr9 " ;
547 => "0000000000000001", -- 1
548 => B"000100_1001_01_0000", -- "CMP $A32, Gr9 " ;
549 => "0000101000110010",
550 => B"001010_0000_00_0000", -- "BNE #CHECKAPPLELOOP " ; -- 530
551 => "0000001000010110", -- 534
552 => B"001001_0000_00_0000", -- "BRA #PRINTAPPLE " ; -- 812
553 => "0000001001110110", -- 630
-- TAKEAPPLE -- 554
554 => B"010111_0100_11_1001", -- "LOAD $A1C, Gr4, Gr9 " ;
555 => "0000101000011100",
556 => B"000001_0100_00_0000", -- "ADD #1, Gr4 " ;
557 => "0000000000000001", -- 1
558 => B"010110_0100_11_1001", -- "STORE $A1C, Gr4, Gr9 " ;
559 => "0000101000011100",
560 => B"010111_0011_11_1001", -- "LOAD $A14, Gr3, Gr9 " ;
561 => "0000101000010100",
562 => B"000010_0011_00_0000", -- "SUB #1, Gr3" ;
563 => "0000000000000001", -- 1
564 => B"000101_0011_00_0000", -- "AND #$003F, Gr3 " ;
565 => "0000000000111111", -- 63
566 => B"010110_0011_11_1001", -- "STORE $A14, Gr3, Gr9 " ;
567 => "0000101000010100",
-- NEWAPPLE -- 568
568 => B"010111_1001_00_0000", -- "LOAD #0, Gr9" ;
569 => "0000000000000000", -- 0
570 => B"011011_1100_00_0000", -- "RAND #31, Gr12 " ;
571 => "0000000000011111", -- 31
572 => B"000101_1100_00_0000", -- "AND #31, Gr12 " ;
573 => "0000000000011111", -- 31
574 => B"011011_1101_00_0000", -- "RAND #31, Gr13 " ;
575 => "0000000000011111", -- 31
576 => B"000101_1101_00_0000", -- "AND #31, Gr13 " ;
577 => "0000000000011111", -- 31
578 => B"010111_1110_00_0000", -- "LOAD #NEWAPPLELOOP, Gr14 " ; -- 568
579 => "0000001001000110", -- 582
580 => B"001001_0000_00_0000", -- "BRA #TOGMEM " ; -- 734
581 => "0000001011011110", -- 734
-- NEWAPPLELOOP -- 568
582 => B"010110_1001_01_0000", -- "STORE $A21, Gr9 " ;
583 => "0000101000100001",
584 => B"010111_1000_01_0000", -- "LOAD $A21, Gr8 " ;
585 => "0000101000100001",
586 => B"010011_1000_00_0000", -- "LSL #6, Gr8 " ;
587 => "0000000000000110", -- 6
588 => B"010111_0111_11_1001", -- "LOAD $A14, Gr7, Gr9 " ;
589 => "0000101000010100",
590 => B"000010_0111_00_0000", -- "SUB #1, Gr7" ;
591 => "0000000000000001", -- 1
-- NEWAPPLESEGMENT -- 592
592 => B"000001_0111_00_0000", -- "ADD #1, Gr7 " ;
593 => "0000000000000001", -- 1
594 => B"000101_0111_00_0000", -- "AND #$003F, Gr7 " ;
595 => "0000000000111111", -- 63
596 => B"010110_0111_01_0000", -- "STORE $F00, Gr7 " ;
597 => "0000111100000000",
598 => B"000001_1000_01_0000", -- "ADD $F00, Gr8" ;
599 => "0000111100000000",
600 => B"010111_0000_11_1000", -- "LOAD $E00, Gr0, Gr8" ;
601 => "0000111000000000",
602 => B"000010_1000_01_0000", -- "SUB $F00, Gr8 " ;
603 => "0000111100000000",
604 => B"010110_0000_01_0000", -- "STORE $F00, Gr0" ;
605 => "0000111100000000",
606 => B"000100_1111_01_0000", -- "CMP $F00, Gr15 " ;
607 => "0000111100000000",
608 => B"001011_0000_00_0000", -- "BEQ #NEWAPPLE" ; -- 568
609 => "0000001000111000", -- 568
610 => B"000100_0111_11_1001", -- "CMP $A10, Gr7, Gr9 " ;
611 => "0000101000010000",
612 => B"001010_0000_00_0000", -- "BNE #NEWAPPLESEGMENT " ; -- 592
613 => "0000001001010000", -- 592
614 => B"000001_1001_00_0000", -- "ADD #1, Gr9" ;
615 => "0000000000000001", -- 1
616 => B"000100_1001_01_0000", -- "CMP $A32, Gr9" ;
617 => "0000101000110010",
618 => B"001010_0000_00_0000", -- "BNE #NEWAPPLELOOP " ; -- 568
619 => "0000001001000110", -- 582
620 => B"010111_1110_00_0000", -- "LOAD #NEWAPPLERETURN, Gr14 " ; -- 568
621 => "0000001001110000", -- 624
622 => B"001001_0000_00_0000", -- "BRA #GETOBSTACLEBYGMEM " ; -- 762
623 => "0000001011111010", -- 762
-- NEWAPPLERETURN -- 568
624 => B"000100_1011_00_0000", -- "CMP #$FFFF, Gr11 " ;
625 => "1111111111111111",
626 => B"001011_0000_00_0000", -- "BEQ #NEWAPPLE " ; -- 568
627 => "0000001000111000", -- 568
628 => B"010110_1111_01_0000", -- "STORE $A20, Gr15 " ;
629 => "0000101000100000",
-- PRINTAPPLE -- 812
630 => B"010111_1111_01_0000", -- "LOAD $A20, Gr15 " ;
631 => "0000101000100000",
632 => B"010111_1110_00_0000", -- "LOAD #$E000, Gr14 " ;
633 => "1110000000000000",
634 => B"011000_1110_00_0000", -- "GSTORE Gr14 " ;
635 => "0000000000000000", -- 0
-- PRINTSNAKES -- 812
636 => B"010111_1001_00_0000", -- "LOAD #0, Gr9" ;
637 => "0000000000000000", -- 0
-- PRINTSNAKESLOOP -- 812
638 => B"010110_1001_01_0000", -- "STORE $A21, Gr9" ; SNAKE i
639 => "0000101000100001",
640 => B"010111_0101_11_1001", -- "LOAD $A00, Gr5, Gr9 " ; Ladda ormfärg till Gr5
641 => "0000101000000000",
642 => B"010111_1000_01_0000", -- "LOAD $A21, Gr8 " ; Förbered arr index
643 => "0000101000100001",
644 => B"010011_1000_00_0000", -- "LSL #6, Gr8" ; Arr start index förberett
645 => "0000000000000110", -- 6
646 => B"010111_0111_11_1001", -- "LOAD $A14, Gr7, Gr9 " ; Adda Tail Pointer
647 => "0000101000010100",
648 => B"000010_0111_00_0000", -- "SUB #1, Gr7 " ; tail pointer - 1;
649 => "0000000000000001", -- 1
-- PRINTSNAKESEGMENT -- 812
650 => B"000001_0111_00_0000", -- "ADD #1, Gr7" ; Adda 1 till pointern
651 => "0000000000000001", -- 1
652 => B"000101_0111_00_0000", -- "AND #$003F, Gr7 " ; Modulo 64;
653 => "0000000000111111", -- 63
654 => B"010110_0111_01_0000", -- "STORE $F00, Gr7" ;
655 => "0000111100000000",
656 => B"000001_1000_01_0000", -- "ADD $F00, Gr8" ;
657 => "0000111100000000",
658 => B"010111_1111_11_1000", -- "LOAD $E00, Gr15, Gr8 " ; Ladda Gr15 med rätt pos
659 => "0000111000000000",
660 => B"011000_0101_00_0000", -- "GSTORE Gr5 " ; Skriv till GMEM
661 => "0000000000000000", -- 0
662 => B"000010_1000_01_0000", -- "SUB $F00, Gr8" ;
663 => "0000111100000000",
664 => B"000100_0111_11_1001", -- "CMP $A10, Gr7, Gr9 " ; CMP pointer med head
665 => "0000101000010000",
666 => B"001010_0000_00_0000", -- "BNE #PRINTSNAKESEGMENT " ; -- 812
667 => "0000001010001010", -- 650
668 => B"000001_1001_00_0000", -- "ADD #1, Gr9 " ;
669 => "0000000000000001", -- 1
670 => B"000100_1001_01_0000", -- "CMP $A32, Gr9 " ;
671 => "0000101000110010",
672 => B"001010_0000_00_0000", -- "BNE #PRINTSNAKESLOOP " ; -- 812
673 => "0000001001111110", -- 638
674 => B"010111_0000_00_0000", -- "LOAD #0, Gr0" ; usec counter
675 => "0000000000000000", -- 0
676 => B"010111_0001_00_0000", -- "LOAD #0, Gr1" ; msec counter
677 => "0000000000000000", -- 0
-- GAMEWAITLOOPU -- 224
678 => B"000001_0000_00_0000", -- "ADD #1, Gr0" ;
679 => "0000000000000001", -- 1
680 => B"000100_0000_00_0000", -- "CMP #$FFFF, Gr0" ;
681 => "1111111111111111",
682 => B"001010_0000_00_0000", -- "BNE #GAMEWAITLOOPU" ; om vi inte har loopat en ms än -- 224
683 => "0000001010100110", -- 678
684 => B"000001_0001_00_0000", -- "ADD #1, Gr1" ;
685 => "0000000000000001", -- 1
686 => B"000100_0001_01_0000", -- "CMP $A31, Gr1" ; se om vi har väntat antal ms som stÃÂ¥r i spelhastighet
687 => "0000101000110001",
688 => B"001010_0000_00_0000", -- "BNE #GAMEWAITLOOPU" ; om vi inte gjort det, forstätt loopa -- 224
689 => "0000001010100110", -- 678
690 => B"001001_0000_00_0000", -- "BRA #GAMELOOP" ; -- 224
691 => "0000000100111000", -- 312
-- INFINITE -- 692
692 => B"010111_1110_00_0000", -- "LOAD #INFINITE2, Gr14 " ; -- 692
693 => "0000001010111010", -- 698
694 => B"010111_1111_00_0000", -- "LOAD #$0000, Gr15 " ;
695 => "0000000000000000", -- 0
696 => B"001001_0000_00_0000", -- "BRA #CLEARSCREEN " ; -- 906
697 => "0000001110001010", -- 906
-- INFINITE2 -- 692
698 => B"010111_1001_00_0000", -- "LOAD #$000F, Gr9" ;
699 => "0000000000001111", -- 15
700 => B"010111_1010_00_0000", -- "LOAD #28, Gr10 " ;
701 => "0000000000011100", -- 28
702 => B"010111_1011_00_0000", -- "LOAD #23, Gr11 " ;
703 => "0000000000010111", -- 23
704 => B"010111_1100_00_0000", -- "LOAD #4, Gr12 " ;
705 => "0000000000000100", -- 4
706 => B"010111_1101_00_0000", -- "LOAD #10, Gr13 " ;
707 => "0000000000001010", -- 10
708 => B"010111_1111_00_0000", -- "LOAD #$D34, Gr15 " ;
709 => "0000110100110100",
710 => B"010111_1110_00_0000", -- "LOAD #INFINITE3, Gr14 " ; -- 692
711 => "0000001011001010", -- 714
712 => B"001001_0000_00_0000", -- "BRA #PRINT " ; -- 812
713 => "0000001100101100", -- 812
-- INFINITE3 -- 692
714 => B"010111_0000_00_0000", -- "LOAD #0, Gr0 " ;
715 => "0000000000000000", -- 0
716 => B"000001_0000_01_0000", -- "ADD $A1C, Gr0 " ;
717 => "0000101000011100",
718 => B"000001_0000_01_0000", -- "ADD $A1D, Gr0 " ;
719 => "0000101000011101",
720 => B"000001_0000_01_0000", -- "ADD $A1E, Gr0 " ;
721 => "0000101000011110",
722 => B"000001_0000_01_0000", -- "ADD $A1F, Gr0 " ;
723 => "0000101000011111",
-- INFINITE4 -- 692
724 => B"011001_0001_00_0000", -- "SPI Gr1" ;
725 => "0000000000000000", -- 0
726 => B"000101_0001_00_0000", -- "AND #$0008, Gr1" ;
727 => "0000000000001000", -- 8
728 => B"000100_0001_00_0000", -- "CMP #$0008, Gr1" ;
729 => "0000000000001000", -- 8
730 => B"001011_0000_00_0000", -- "BEQ #MENU" ; gaaaah oääääääändlig -- 2
731 => "0000000000000010", -- 2
732 => B"001001_0000_00_0000", -- "BRA #INFINITE4 " ; -- 692
733 => "0000001011010100", -- 724
-- TOGMEM -- 734
734 => B"010110_1100_01_0000", -- "STORE $F00, Gr12" ; spara undan X, och Y
735 => "0000111100000000",
736 => B"010110_1101_01_0000", -- "STORE $F01, Gr13" ;
737 => "0000111100000001",
738 => B"010111_1111_01_0000", -- "LOAD $F01, Gr15" ; ladda in Y till Gr15.
739 => "0000111100000001",
740 => B"010011_1111_00_0000", -- "LSL #5, Gr15" ; shifta ut Y-bitarna till sin rätta plats
741 => "0000000000000101", -- 5
742 => B"000110_1111_01_0000", -- "OR $F00, Gr15" ; ORa in X-delen
743 => "0000111100000000",
744 => B"010110_1110_01_0000", -- "STORE $F10, Gr14 " ; lägg returnadressen pÃÂ¥ ett ställe i minnet
745 => "0000111100010000",
746 => B"001001_0000_01_0000", -- "BRA $F10" ; returnera
747 => "0000111100010000",
-- FROMGMEM -- 748
748 => B"010110_1111_01_0000", -- "STORE $F00, Gr15" ; spara undan in-värdet
749 => "0000111100000000",
750 => B"010111_1100_01_0000", -- "LOAD $F00, Gr12" ; ladda till X
751 => "0000111100000000",
752 => B"000101_1100_00_0000", -- "AND #$001F, Gr12" ; ANDa bort y-delen frÃÂ¥n x
753 => "0000000000011111", -- 31
754 => B"010111_1101_01_0000", -- "LOAD $F00, Gr13" ;
755 => "0000111100000000",
756 => B"010010_1101_00_0000", -- "LSR #5, Gr13" ; Shifta bort y-delen till LSBs
757 => "0000000000000101", -- 5
758 => B"010110_1110_01_0000", -- "STORE $F10, Gr14 " ; lägg returnadressen pÃÂ¥ ett ställe i minnet
759 => "0000111100010000",
760 => B"001001_0000_01_0000", -- "BRA $F10" ;
761 => "0000111100010000",
-- GETOBSTACLEBYGMEM -- 762
762 => B"010110_1111_01_0000", -- "STORE $F00, Gr15" ; spara GMEM-posen pÃÂ¥ F00
763 => "0000111100000000",
764 => B"010110_1111_01_0000", -- "STORE $F01, Gr15" ; spara GMEM-posen pÃÂ¥ F01
765 => "0000111100000001",
766 => B"010111_1100_01_0000", -- "LOAD $F00, Gr12" ; ladda ovanstÃÂ¥ende
767 => "0000111100000000",
768 => B"000101_1100_00_0000", -- "AND #$001F, Gr12" ; ta bort Y-bitarna
769 => "0000000000011111", -- 31
770 => B"010010_1111_00_0000", -- "LSR #5, Gr15" ; shifta bort Y-bitarna till LSBs
771 => "0000000000000101", -- 5
772 => B"010011_1111_00_0000", -- "LSL #5, Gr15" ;
773 => "0000000000000101", -- 5
774 => B"010110_1111_01_0000", -- "STORE $F00, Gr15" ; addera de bÃÂ¥da och sätt resultat i Gr12
775 => "0000111100000000",
776 => B"000001_1100_01_0000", -- "ADD $F00, Gr12" ;
777 => "0000111100000000",
778 => B"010110_1100_01_0000", -- "STORE $F00, Gr12" ; kopiera datat till Gr15
779 => "0000111100000000",
780 => B"010111_1111_01_0000", -- "LOAD $F00, Gr15" ;
781 => "0000111100000000",
782 => B"010010_1111_00_0000", -- "LSR #4, Gr15" ;
783 => "0000000000000100", -- 4
784 => B"000101_1100_00_0000", -- "AND #$000F, Gr12" ;
785 => "0000000000001111", -- 15
786 => B"010110_1010_01_0000", -- "STORE $F02, Gr10" ;
787 => "0000111100000010",
788 => B"010111_1010_11_1111", -- "LOAD $DB0, Gr10, Gr15" ; ladda rätt word i kartan till Gr10
789 => "0000110110110000",
790 => B"010110_1100_01_0000", -- "STORE $F00, Gr12" ;
791 => "0000111100000000",
792 => B"010011_1010_01_0000", -- "LSL $F00, Gr10" ; Shifta wordet till vänster Gr12 antal gÃÂ¥nger
793 => "0000111100000000",
794 => B"000101_1010_00_0000", -- "AND #$8000, Gr10" ; anda bort all annan data
795 => "1000000000000000",
796 => B"010111_1011_00_0000", -- "LOAD #$0000, Gr11" ; ladda ett standardvärde till Gr11
797 => "0000000000000000", -- 0
798 => B"000100_1010_00_0000", -- "CMP #$8000, Gr10" ; kolla om det är en etta vi shiftat in
799 => "1000000000000000",
800 => B"001010_0000_00_0000", -- "BNE #WASNOTOBSTACLE" ; om sÃÂ¥ inte var fallet -- 804
801 => "0000001100100100", -- 804
802 => B"010111_1011_00_0000", -- "LOAD #$FFFF, Gr11" ; annars (var hinder där)
803 => "1111111111111111",
-- WASNOTOBSTACLE -- 804
804 => B"010110_1110_01_0000", -- "STORE $F10, Gr14 " ; lägg returnadressen pÃÂ¥ ett ställe i minnet
805 => "0000111100010000",
806 => B"010111_1010_01_0000", -- "LOAD $F02, Gr10" ;
807 => "0000111100000010",
808 => B"010111_1111_01_0000", -- "LOAD $F01, Gr15" ;
809 => "0000111100000001",
810 => B"001001_0000_01_0000", -- "BRA $F10" ; return
811 => "0000111100010000",
-- PRINT -- 812
812 => B"010110_1010_01_0000", -- "STORE $F23, Gr10 " ;
813 => "0000111100100011",
814 => B"010110_1011_01_0000", -- "STORE $F24, Gr11 " ;
815 => "0000111100100100",
816 => B"010110_1100_01_0000", -- "STORE $F25, Gr12 " ;
817 => "0000111100100101",
818 => B"010110_1101_01_0000", -- "STORE $F26, Gr13 " ;
819 => "0000111100100110",
820 => B"010110_1110_01_0000", -- "STORE $F21, Gr14 " ;
821 => "0000111100100001",
822 => B"010110_1111_01_0000", -- "STORE $F22, Gr15 " ;
823 => "0000111100100010",
824 => B"010011_1001_00_0000", -- "LSL #12, Gr9" ;
825 => "0000000000001100", -- 12
826 => B"010110_1001_01_0000", -- "STORE $F27, Gr9" ;
827 => "0000111100100111",
828 => B"010111_1000_01_0000", -- "LOAD $F23, Gr8 " ;
829 => "0000111100100011",
830 => B"000010_1000_01_0000", -- "SUB $F25, Gr8 " ;
831 => "0000111100100101",
832 => B"010010_1000_00_0000", -- "LSR #2, Gr8 " ;
833 => "0000000000000010", -- 2
834 => B"010110_1000_01_0000", -- "STORE $F28, Gr8 " ;
835 => "0000111100101000",
836 => B"010111_0111_00_0000", -- "LOAD #0, Gr7" ;
837 => "0000000000000000", -- 0
-- PRINTLOOPX -- 812
838 => B"010111_1110_00_0000", -- "LOAD #PRINTLOOPXRETURN, Gr14" ; -- 812
839 => "0000001101001010", -- 842
840 => B"001001_0000_00_0000", -- "BRA #TOGMEM" ; -- 734
841 => "0000001011011110", -- 734
-- PRINTLOOPXRETURN -- 812
842 => B"010110_0111_01_0000", -- "STORE $F20, Gr7 " ;
843 => "0000111100100000",
844 => B"010111_0010_01_0000", -- "LOAD $F20, Gr2" ;
845 => "0000111100100000",
846 => B"010110_1100_01_0000", -- "STORE $F20, Gr12" ; Lägg till x // 4 till Gr3, för att fÃÂ¥ rätt word-offset i x-led
847 => "0000111100100000",
848 => B"010111_0011_01_0000", -- "LOAD $F20, Gr3" ;
849 => "0000111100100000",
850 => B"000010_0011_01_0000", -- "SUB $F25, Gr3" ;
851 => "0000111100100101",
852 => B"010010_0011_00_0000", -- "LSR #2, Gr3" ;
853 => "0000000000000010", -- 2
854 => B"010110_0011_01_0000", -- "STORE $F20, Gr3" ;
855 => "0000111100100000",
856 => B"000001_0010_01_0000", -- "ADD $F20, Gr2" ;
857 => "0000111100100000",
858 => B"010110_1100_01_0000", -- "STORE $F20, Gr12" ; Spara (x mod 4) - 1 till Gr3, vilket är tile-index i wordet
859 => "0000111100100000",
860 => B"010111_0011_01_0000", -- "LOAD $F20, Gr3" ;
861 => "0000111100100000",
862 => B"000010_0011_01_0000", -- "SUB $F25, Gr3 " ;
863 => "0000111100100101",
864 => B"000101_0011_00_0000", -- "AND #$0003, Gr3" ; MOD #4
865 => "0000000000000011", -- 3
866 => B"010110_0010_01_0000", -- "STORE $F20, Gr2" ;
867 => "0000111100100000",
868 => B"010111_0101_01_0000", -- "LOAD $F22, Gr5" ;
869 => "0000111100100010",
870 => B"000001_0101_01_0000", -- "ADD $F20, Gr5" ;
871 => "0000111100100000",
872 => B"010110_0101_01_0000", -- "STORE $F20, Gr5" ;
873 => "0000111100100000",
874 => B"010111_0100_10_0000", -- "LOAD ($F20), Gr4" ; Ladda in rätt word frÃÂ¥n bilden till register 4
875 => "0000111100100000",
876 => B"010011_0011_00_0000", -- "LSL #2, Gr3" ;
877 => "0000000000000010", -- 2
878 => B"010110_0011_01_0000", -- "STORE $F20, Gr3" ; Shifta wordet sÃÂ¥ att vÃÂ¥r tile hamnar längs till vänster (MSBs, vilket är vad GMEMet tar frÃÂ¥n bussen)
879 => "0000111100100000",
880 => B"010011_0100_01_0000", -- "LSL $F20, Gr4" ;
881 => "0000111100100000",
882 => B"000101_0100_00_0000", -- "AND #$F000, Gr4" ; ANDa bort de bitar som lÃÂ¥g efter vÃÂ¥r tile i wordet
883 => "1111000000000000",
884 => B"000101_0100_01_0000", -- "AND $F27, Gr4 " ;
885 => "0000111100100111",
886 => B"011000_0100_00_0000", -- "GSTORE Gr4" ;
887 => "0000000000000000", -- 0
888 => B"000001_1100_00_0000", -- "ADD #1, Gr12" ;
889 => "0000000000000001", -- 1
890 => B"000100_1100_01_0000", -- "CMP $F23, Gr12" ;
891 => "0000111100100011",
892 => B"001010_0000_00_0000", -- "BNE #PRINTLOOPX" ; om vi inte loopat fördigt pÃÂ¥ x, gör det igen -- 812
893 => "0000001101000110", -- 838
894 => B"000001_1101_00_0000", -- "ADD #1, Gr13" ;
895 => "0000000000000001", -- 1
896 => B"000001_0111_01_0000", -- "ADD $F28, Gr7 " ;
897 => "0000111100101000",
898 => B"000100_1101_01_0000", -- "CMP $F24, Gr13" ;
899 => "0000111100100100",
900 => B"010111_1100_01_0000", -- "LOAD $F25, Gr12" ; nollställ X, pÃÂ¥ nästa rad
901 => "0000111100100101",
902 => B"001010_0000_00_0000", -- "BNE #PRINTLOOPX" ; om vi inte loopat färdigt pÃÂ¥ Y, fortsätt loopa -- 812
903 => "0000001101000110", -- 838
904 => B"001001_0000_01_0000", -- "BRA $F21" ;
905 => "0000111100100001",
-- CLEARSCREEN -- 906
906 => B"010110_1110_01_0000", -- "STORE $F30, Gr14" ;
907 => "0000111100110000",
908 => B"010011_1111_00_0000", -- "LSL #12, Gr15 " ;
909 => "0000000000001100", -- 12
910 => B"010110_1111_01_0000", -- "STORE $F31, Gr15" ;
911 => "0000111100110001",
912 => B"010111_1011_01_0000", -- "LOAD $F31, Gr11 " ;
913 => "0000111100110001",
914 => B"010111_1100_00_0000", -- "LOAD #0, Gr12 " ;
915 => "0000000000000000", -- 0
916 => B"010111_1101_00_0000", -- "LOAD #0, Gr13 " ;
917 => "0000000000000000", -- 0
-- CLEARSCREENLOOPY -- 906
918 => B"010111_1100_00_0000", -- "LOAD #0, Gr12 " ;
919 => "0000000000000000", -- 0
-- CLEARSCREENLOOPX -- 906