-
Notifications
You must be signed in to change notification settings - Fork 0
/
writing.asm
308 lines (193 loc) · 5.41 KB
/
writing.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
!cpu 6502
!to "writing.prg",cbm
*=$0801
!byte $1E, $08, $0A, $00, $9E, $20, $28,$32, $30, $38, $30, $29, $3a, $8f, $20, $28, $43, $29, $20, $32, $30, $32, $31, $20, $4D, $54, $53, $56, $00, $00, $00
*=$820
begin
increment=$41
increment2=$42
increment3=$43
ZeroPageLow = $FB
ZeroPageHigh = $FC
lda #0
sta $d020
sta $d021
jsr erasescreen
jsr erase2000
ldx #$30
stx ZeroPageHigh
loaddccimage
loop
jsr getalphabet
jsr colorchanging
jsr increzeropageh
jsr erase2000
jmp loop
rts
calculatelenght
ldx #0
calculatelenghtlp
lda $2000,x
inx
cmp #255
beq calculated
jmp calculatelenghtlp
rts
calculated
stx increment2
ldx #0
jmp aftercalc
rts
getalphabet
ldy #0
getalphabetlp
;jsr calculatelenght
aftercalc
jsr $ffcf
cmp #32
beq changespace
changedspace
sta $2000,y
cmp #13
beq setalphabet
iny
cpy #255
bne getalphabetlp
rts
setalphabet
jsr erasescreen
ldy #0
doagain
jsr erasescreenlp
lda $d012
beq done
ldx #0
iny
;jsr calculatelenght
setalphabetlp
lda $2000,y
changedenter
;cmp #13
;beq changeenter
cmp #255
beq dontprintthis
sbc #63
sta $0400,x
cmp #32
beq doagain
iny
inx
sta $0400,x
jmp setalphabetlp
done
dontprintthis
rts
changespace
lda #96
jmp changedspace
rts
changeenter
lda #96
jmp changedenter
rts
increzeropageh
increzeropagehlp
inc ZeroPageHigh
lda ZeroPageHigh
cmp #$39
beq zerozeropagehi
rts
zerozeropagehi
lda #$30
sta ZeroPageHigh
rts
erase2000
ldx #0
ldy #0
erase2000lp
iny
lda #255
sta $2000,x
lda (ZeroPageLow),y
adc #64
sta $2000,x
inx
cpx #255
bne erase2000lp
rts
wipe2000
ldx #0
wipe2000lp
lda #255
sta $2000,x
inx
cpx #255
bne erase2000lp
rts
erasescreen
ldx #0
erasescreenlp
lda #32
sta $0400,x
sta $0500,x
sta $0600,x
sta $0700,x
inx
cpx #0
bne erasescreenlp
rts
colorchanging
ldx #0
colorchanginglp
lda $2000,x
cmp #67
beq compare2
rts
compare2
inx
lda $2000,x
cmp #79
beq compare3
rts
compare3
inx
lda $2000,x
cmp #76
beq changetxtcolor
rts
changetxtcolor
ldx #0
changetxtcolorlp
inc $d800,x
inx
cpx #255
bne changetxtcolorlp
rts
*=$3000
alpha
!scr "outside off minus besides upon above underneath among against to before after towards by over in through anti behind concerning "
!scr "aboard following near than from below beneath but past regarding of on beyond per opposite excepting via round without like "
!scr "onto inside until as for toward across save since along between up unlike into during except about versus plus around with "
!scr "amid beside excluding considering within under despite down at faithful unbiased hallowed moan tire gabby bubble dark serve "
!scr "cows hollow upset stingy bustling shelter rate observation shy moldy spiteful second question auspicious wilderness morning "
!scr "giraffe cruel puzzling difficult sweater therapeutic caring foregoing bag gainful witty same funny murky elfin board boiling "
!scr "belligerent house faulty wandering mundane search follow tender intend support thin unruly hilarious owe breezy card crate "
!scr "defective decisive crack applaud unused determined lowly appliance greasy deadpan heat damage stream cry clover employ "
!scr "thankful camp shake coil offend festive lumpy discover vessel overrated library smile obeisant practice half testy silly "
!scr "amusement legal country start wave achiever lucky slim awful cough natural pie wise overjoyed accurate industry crowded "
!scr "pollution abundant baby fold neighborly switch spiffy machine planes devilish naughty possess advice sigh peck stupendous "
!scr "what am I about to tell you might be a little shocking but there is no need to be shocked at all "
!scr "you look around the streets what you expect? there is so many things all around and they are all yours to watch and learn about "
!scr"boiling subsequent woebegone somber pastoral dark common unsuitable abaft placid icy earsplitting juvenile odd blue silly superb "
!scr"changeable fearful beneficial literate illustrious legal ordinary outstanding ultra excited merciful bustling elite kindly five "
!scr"obsequious verdant hysterical marvelous green black-and-white hungry hard-to-find aloof nutty daily fixed relieved screeching "
!scr"functional puzzled grateful real foregoing small astonishing medical elastic super sore adventurous near bashful unknown maniacal "
!scr"cuddly adjoining aware abandoned dusty left unable flat dramatic possible husky same flowery blue-eyed obscene direful simplistic "
!scr"crabby berserk juicy slippery ossified handy gleaming colossal taboo precious broad friendly frightening unused spiffy joyous "
!scr"quizzical ragged complete splendid organic fluttering impartial one hideous stormy irate excellent amused fretful torpid "
!scr"nutritious absent oval strong uneven ceaseless jagged futuristic mountainous painful coherent like mere sticky scarce longing "
!scr"pathetic bored complex tense magenta mighty bent wealthy overrated helpless phobic uppity incompetent narrow energetic stiff "
!scr"swanky cheerful weak muddled different magnificent giddy frightened open illegal adhesive bite-sized lacking scared unbiased "
!scr"puzzling robust soft angry fluffy spectacular troubled wooden gusty harmonious adamant amusing fat well-to-do spiteful wacky "
!scr"capable habitual clammy majestic brave striped profuse shaky poor boorish enchanted thirsty cowardly ready industrious unarmed"
!scr" grotesque"