-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbars.a
More file actions
189 lines (182 loc) · 3.01 KB
/
bars.a
File metadata and controls
189 lines (182 loc) · 3.01 KB
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
!to "bars.bin", plain
* = $1000
!zone sending {
sending:
!word $0007
!word $C00D ;; Method
!word $EFF0 ;; name = nil
!word .code
!word .literals
!word $0010 ;; stack size
!word $0004 ;; 4 temps
!word $EFF0 ;; class = nil
!word $EFF0 ;; text = nil
.code !word $8013
!word $C00B
!hex 4270 ;; t0 := $8000
!hex 5D40305184 ;; mark args for SEND
;; #(nil src dest destbank) MARK
!hex 72 ;; save in t2
!hex 5D41305184
!hex 73 ;; save in t3
!hex 3295 ;; putstr: string_a
!hex 3395 ;; putstr: string_b
!hex F60E00 ;; loop
!align 1,0
.literals
!word $0006
!word $C00A
!word string_a ;; 40
!word string_b
!word $8000
!word $0050
!word $0008 ;; 44
!word putstr
}
!zone putstr {
;; 20 21 22 23
;; args #(nil src dest destbank)
;; blit i(src sbank dest dbank count -- )
putstr: !word $0007
!word $C00D ;; Method
!word $EFF0 ;; name
!word .code
!word $EFF0 ;; literals = nil
!word $0010 ;; stack size
!word $0000 ;; temps
!word $EFF0 ;; class = nil
!word $EFF0 ;; text = nil
.code: !word $800D
!word $C00B ;; ByteArray
!hex 21D104 ;; count
!hex 2322 ;; dbank dest
!hex 5021 ;; push 0 bank, src
!hex 54D20A ;; skip header (add 4 to src)
!hex D530 ;; blit
!hex F1 ;; return self
!align 1,0
}
string_a:
!word $8004
!word $C010 ;; String
!raw "****"
string_b:
!word $8004
!word $C010 ;; String
!raw "===="
!zone blips {
blips:
!word $0007
!word $C00D
!word .name
!word .code
!word .literals
!word $0010
!word $0000
!word Prototype
!word $EFF0
.code
!word $8007
!word $C00B
!hex 4140D232 ;; keystone
!hex 4394 ;; idle
!hex 4240D232 ;; keystone
!hex 4394 ;; idle
!hex F60000 ;; repeat forever
!align 1,0
.literals
!word $0005
!word $C00A
!word AY8910_0
!word NOTE0
!word NOTE1
!word TICK
!word ticker
.name
!word $8005
!word $8010
!raw "blips"
!align 1,0
}
AY8910_0 = $0850
NOTE0:
!word $8010
!word $C00B
!hex 00 0C 01 0C 00 08
!hex 00 38
!hex 13 13 13
!hex 00 23
!hex 01
!hex FF FF
!align 1,0
NOTE1:
!word $8010
!word $C00B
!hex 00 0A 01 0A 00 06
!hex 00 38
!hex 13 13 13
!hex 00 23
!hex 01
!hex FF FF
!align 1,0
TICK:
!word $0003
!word $C00A
!word Prototype
!word ticker
!word $00A0
!zone prototype {
Prototype:
!word $0005
!word $C000
!word .name
!word Prototype ;; parentClass
!word .methods
!word $0100 ;; size ??
!word $EFF0 ;; variables
.name
!word $8009
!word $C010
!raw "Prototype"
!align 1,0
.methods
!word $0003
!word $C00A
!word Prototype ;; not a method but...can use this as args
!word blips
!word ticker
}
* = $1110
!zone tickerz {
ticker:
!word $0007
!word $C00D
!word .name
!word .code
!word .literals
!word $0010
!word $0000
!word Prototype
!word $EFF0
.name
!word $8006
!word $C010
!raw "ticker"
!align 1,0
.literals
!word $0004
!word $C00A
!word $FFFF
!word $0000
!word $0000
!word $0000
.code
!word $8030
!word $C00B
!hex 22 ;; get arg[2]
!hex 40D20A ;; decrement
!hex F4 ;; dup
!hex 50D201 ;; is it zero?
!hex F80100 ;; if false: loop
!hex F1 ;; if true: return
}