-
Notifications
You must be signed in to change notification settings - Fork 2
/
snake_asm.txt
164 lines (164 loc) · 4.36 KB
/
snake_asm.txt
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
$0600 20 06 06 JSR $0606
$0603 20 38 06 JSR $0638
$0606 20 0d 06 JSR $060d
$0609 20 2a 06 JSR $062a
$060c 60 RTS
$060d a9 02 LDA #$02
$060f 85 02 STA $02
$0611 a9 04 LDA #$04
$0613 85 03 STA $03
$0615 a9 11 LDA #$11
$0617 85 10 STA $10
$0619 a9 10 LDA #$10
$061b 85 12 STA $12
$061d a9 0f LDA #$0f
$061f 85 14 STA $14
$0621 a9 04 LDA #$04
$0623 85 11 STA $11
$0625 85 13 STA $13
$0627 85 15 STA $15
$0629 60 RTS
$062a a5 fe LDA $fe
$062c 85 00 STA $00
$062e a5 fe LDA $fe
$0630 29 03 AND #$03
$0632 18 CLC
$0633 69 02 ADC #$02
$0635 85 01 STA $01
$0637 60 RTS
$0638 20 4d 06 JSR $064d
$063b 20 8d 06 JSR $068d
$063e 20 c3 06 JSR $06c3
$0641 20 19 07 JSR $0719
$0644 20 20 07 JSR $0720
$0647 20 2d 07 JSR $072d
$064a 4c 38 06 JMP $0638
$064d a5 ff LDA $ff
$064f c9 77 CMP #$77
$0651 f0 0d BEQ $0660
$0653 c9 64 CMP #$64
$0655 f0 14 BEQ $066b
$0657 c9 73 CMP #$73
$0659 f0 1b BEQ $0676
$065b c9 61 CMP #$61
$065d f0 22 BEQ $0681
$065f 60 RTS
$0660 a9 04 LDA #$04
$0662 24 02 BIT $02
$0664 d0 26 BNE $068c
$0666 a9 01 LDA #$01
$0668 85 02 STA $02
$066a 60 RTS
$066b a9 08 LDA #$08
$066d 24 02 BIT $02
$066f d0 1b BNE $068c
$0671 a9 02 LDA #$02
$0673 85 02 STA $02
$0675 60 RTS
$0676 a9 01 LDA #$01
$0678 24 02 BIT $02
$067a d0 10 BNE $068c
$067c a9 04 LDA #$04
$067e 85 02 STA $02
$0680 60 RTS
$0681 a9 02 LDA #$02
$0683 24 02 BIT $02
$0685 d0 05 BNE $068c
$0687 a9 08 LDA #$08
$0689 85 02 STA $02
$068b 60 RTS
$068c 60 RTS
$068d 20 94 06 JSR $0694
$0690 20 a8 06 JSR $06a8
$0693 60 RTS
$0694 a5 00 LDA $00
$0696 c5 10 CMP $10
$0698 d0 0d BNE $06a7
$069a a5 01 LDA $01
$069c c5 11 CMP $11
$069e d0 07 BNE $06a7
$06a0 e6 03 INC $03
$06a2 e6 03 INC $03
$06a4 20 2a 06 JSR $062a
$06a7 60 RTS
$06a8 a2 02 LDX #$02
$06aa b5 10 LDA $10,X
$06ac c5 10 CMP $10
$06ae d0 06 BNE $06b6
$06b0 b5 11 LDA $11,X
$06b2 c5 11 CMP $11
$06b4 f0 09 BEQ $06bf
$06b6 e8 INX
$06b7 e8 INX
$06b8 e4 03 CPX $03
$06ba f0 06 BEQ $06c2
$06bc 4c aa 06 JMP $06aa
$06bf 4c 35 07 JMP $0735
$06c2 60 RTS
$06c3 a6 03 LDX $03
$06c5 ca DEX
$06c6 8a TXA
$06c7 b5 10 LDA $10,X
$06c9 95 12 STA $12,X
$06cb ca DEX
$06cc 10 f9 BPL $06c7
$06ce a5 02 LDA $02
$06d0 4a LSR A
$06d1 b0 09 BCS $06dc
$06d3 4a LSR A
$06d4 b0 19 BCS $06ef
$06d6 4a LSR A
$06d7 b0 1f BCS $06f8
$06d9 4a LSR A
$06da b0 2f BCS $070b
$06dc a5 10 LDA $10
$06de 38 SEC
$06df e9 20 SBC #$20
$06e1 85 10 STA $10
$06e3 90 01 BCC $06e6
$06e5 60 RTS
$06e6 c6 11 DEC $11
$06e8 a9 01 LDA #$01
$06ea c5 11 CMP $11
$06ec f0 28 BEQ $0716
$06ee 60 RTS
$06ef e6 10 INC $10
$06f1 a9 1f LDA #$1f
$06f3 24 10 BIT $10
$06f5 f0 1f BEQ $0716
$06f7 60 RTS
$06f8 a5 10 LDA $10
$06fa 18 CLC
$06fb 69 20 ADC #$20
$06fd 85 10 STA $10
$06ff b0 01 BCS $0702
$0701 60 RTS
$0702 e6 11 INC $11
$0704 a9 06 LDA #$06
$0706 c5 11 CMP $11
$0708 f0 0c BEQ $0716
$070a 60 RTS
$070b c6 10 DEC $10
$070d a5 10 LDA $10
$070f 29 1f AND #$1f
$0711 c9 1f CMP #$1f
$0713 f0 01 BEQ $0716
$0715 60 RTS
$0716 4c 35 07 JMP $0735
$0719 a0 00 LDY #$00
$071b a5 fe LDA $fe
$071d 91 00 STA ($00),Y
$071f 60 RTS
$0720 a6 03 LDX $03
$0722 a9 00 LDA #$00
$0724 81 10 STA ($10,X)
$0726 a2 00 LDX #$00
$0728 a9 01 LDA #$01
$072a 81 10 STA ($10,X)
$072c 60 RTS
$072d a2 00 LDX #$00
$072f ea NOP
$0730 ea NOP
$0731 ca DEX
$0732 d0 fb BNE $072f
$0734 60 RTS