-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathSETBRS.TXT
229 lines (201 loc) · 3.73 KB
/
SETBRS.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
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
NAM SET BRUSH
* CHANGED BBYE
*
* Set brush routine
* Worked almost the first time!
* Rah Rah Rah!
*
THEOV FDB 0
SETBRS CLRA
LDB #2
JSR [PCOPY]
LDX OH1
STX THEOV
LDX #0
STX OH1
LDX #80+16
STX <BH1
LDX #240+16
STX <BH2
LDA #48-14
STA <BV1
LDA #160-14
STA <BV2
LDB #15
JSR [FILLED]
CLRB
JSR [BOX]
JSR BUMP
LDB #15
JSR [BOX]
JSR BUMP
CLRB
JSR [BOX]
JSR BUMP
JSR [BOX]
LDU #$8000+34*160+48+8
LDX #BRSHS
LDA #4
PSHS A
A@ PSHS U
LDA #4
PSHS A
B@ LEAU 160*10,U
LDA #8
PSHS A
C@ LDD ,X++
COMA
COMB
STD ,U
LDD ,X++
COMA
COMB
STD 2,U
LEAU 160,U
DEC ,S
BNE C@
LEAS 1,S
LEAU 160*10,U
DEC ,S
BNE B@
LEAS 1,S
PULS U
LEAU 20,U
DEC ,S
BNE A@
LEAS 1,S
LDA BNUM
CLRB BLACK
JSR BOXIN
BSR MNUCLK
BRA BRS99
MNUCLK LDX USESYM
LDU USESY2
PSHS X,U
LDX USEOUT
LDU USEOU2
PSHS X,U
LDX ARROW
STX USESYM
LDX ARR2
STX USESY2
LDX AROUT
STX USEOUT
LDX AROU2
STX USEOU2
JSR [MENARW]
PULS X,U
STU USEOU2
STX USEOUT
PULS X,U
STU USESY2
STX USESYM
RTS
BRS99 LDX <AX
CMPX #80+16
LBLO BBYE
CMPX #255
LBHI BBYE
LDA <AY
CMPA #48-14
LBLO BBYE
CMPA #160-14
LBHI BBYE
CLRA
LDB <AX+1
SUBB #80+16
A@ CMPB #40
BLO B@
ADDA #4
SUBB #40
BRA A@
B@ LDB <AY
SUBB #48-14
A@ CMPB #28
BLO B@
SUBB #28
INCA
BRA A@
B@
* A=BRUSH #
CMPA BNUM
BEQ BSAME
PSHS A
LDA BNUM
LDB #15
JSR BOXIN
PULS A
STA BNUM
CLRB
JSR BOXIN
BSAME LDX #60000
A@ LEAX ,X
LEAX ,X
DEX
BNE A@
BBYE LDA #2
JSR [VIEW]
LDA #2
CLRB
JSR [PCOPY]
CLRA
JSR [VIEW]
**:
JSR SBRS2
LDX THEOV
STX OH1
JMP [MENU]
* THIS ROUTINE BOXES IN BRUSH
* A WITH THE COLOR IN B
BOXIN LDX #80+16
STX <BH1
A@ CMPA #4
BLO B@
LDX <BH1
LEAX 40,X
STX <BH1
SUBA #4
BRA A@
B@ LDX <BH1
LEAX 40,X
STX <BH2
PSHS B
LDB #28
MUL
ADDB #48-14
STB <BV1
ADDB #28
STB <BV2
LDA <BV1
ADDA #4 2
STA <BV1
LDA <BV2
SUBA #4
STA <BV2
LDX <BH1
LEAX 6,X 2
STX <BH1
LDX <BH2
LEAX -6,X 2
STX <BH2
PULS B
JSR [BOX]
JSR BUMP
JMP [BOX]
BUMP INC <BV2
DEC <BV1
LDX <BH1
DEX
STX <BH1
LDX <BH2
INX
STX <BH2
RTS
* It's now only one and a half
* weeks into this project, and
* I admit I find myself going
* ga-ga. Must finish soon.
*<little note from Greg>
*The project is near completion,
*and I've GONE ga-ga.
END