OpenCores
URL https://opencores.org/ocsvn/eco32/eco32/trunk

Subversion Repositories eco32

[/] [eco32/] [trunk/] [lcc/] [x86/] [win32/] [tst/] [wf1.sbk] - Blame information for rev 58

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 4 hellwig
.486
2
.model flat
3
extrn __fltused:near
4
extrn __ftol:near
5
public _main
6
_TEXT segment
7
_main:
8
push ebx
9
push esi
10
push edi
11
push ebp
12
mov ebp,esp
13
sub esp,24
14
mov dword ptr (-24)[ebp],0
15
mov dword ptr (_next),0
16
jmp L3
17
L2:
18
lea edi,(-24)[ebp]
19
push edi
20
lea edi,(-20)[ebp]
21
push edi
22
call _lookup
23
add esp,8
24
inc dword ptr [eax]
25
L3:
26
lea edi,(-20)[ebp]
27
push edi
28
call _getword
29
add esp,4
30
cmp eax,0
31
jne L2
32
mov edi,dword ptr (-24)[ebp]
33
push edi
34
call _tprint
35
add esp,4
36
mov eax,0
37
L1:
38
mov esp,ebp
39
pop ebp
40
pop edi
41
pop esi
42
pop ebx
43
ret
44
public _err
45
_err:
46
push ebx
47
push esi
48
push edi
49
push ebp
50
mov ebp,esp
51
mov edi,dword ptr (20)[ebp]
52
push edi
53
lea edi,(L6)
54
push edi
55
call _printf
56
add esp,8
57
push 1
58
call _exit
59
add esp,4
60
mov eax,0
61
L5:
62
mov esp,ebp
63
pop ebp
64
pop edi
65
pop esi
66
pop ebx
67
ret
68
public _getword
69
_getword:
70
push ebx
71
push esi
72
push edi
73
push ebp
74
mov ebp,esp
75
sub esp,8
76
L8:
77
L9:
78
call _getchar
79
add esp,0
80
mov dword ptr (-4)[ebp],eax
81
cmp eax,-1
82
je L11
83
mov edi,dword ptr (-4)[ebp]
84
push edi
85
call _isletter
86
add esp,4
87
cmp eax,0
88
je L8
89
L11:
90
mov edi,dword ptr (20)[ebp]
91
mov dword ptr (-8)[ebp],edi
92
jmp L15
93
L12:
94
mov edi,dword ptr (-8)[ebp]
95
lea esi,(1)[edi]
96
mov dword ptr (-8)[ebp],esi
97
mov esi,dword ptr (-4)[ebp]
98
mov ebx,esi
99
mov byte ptr [edi],bl
100
L13:
101
call _getchar
102
add esp,0
103
mov dword ptr (-4)[ebp],eax
104
L15:
105
mov edi,dword ptr (-4)[ebp]
106
push edi
107
call _isletter
108
add esp,4
109
mov dword ptr (-4)[ebp],eax
110
cmp eax,0
111
jne L12
112
mov edi,dword ptr (-8)[ebp]
113
mov byte ptr [edi],0
114
mov edi,dword ptr (-8)[ebp]
115
mov esi,dword ptr (20)[ebp]
116
cmp edi,esi
117
jbe L16
118
mov eax,1
119
jmp L7
120
L16:
121
mov eax,0
122
L7:
123
mov esp,ebp
124
pop ebp
125
pop edi
126
pop esi
127
pop ebx
128
ret
129
public _isletter
130
_isletter:
131
push ebx
132
push esi
133
push edi
134
push ebp
135
mov ebp,esp
136
mov edi,dword ptr (20)[ebp]
137
cmp edi,65
138
jl L19
139
cmp edi,90
140
jg L19
141
add dword ptr (20)[ebp],32
142
L19:
143
mov edi,dword ptr (20)[ebp]
144
cmp edi,97
145
jl L21
146
cmp edi,122
147
jg L21
148
mov eax,dword ptr (20)[ebp]
149
jmp L18
150
L21:
151
mov eax,0
152
L18:
153
mov esp,ebp
154
pop ebp
155
pop edi
156
pop esi
157
pop ebx
158
ret
159
public _lookup
160
_lookup:
161
push ebx
162
push esi
163
push edi
164
push ebp
165
mov ebp,esp
166
sub esp,4
167
mov edi,dword ptr (24)[ebp]
168
mov edi,dword ptr [edi]
169
cmp edi,0
170
je L24
171
mov edi,dword ptr (24)[ebp]
172
mov edi,dword ptr [edi]
173
mov edi,dword ptr (12)[edi]
174
push edi
175
mov edi,dword ptr (20)[ebp]
176
push edi
177
call _strcmp
178
add esp,8
179
mov dword ptr (-4)[ebp],eax
180
cmp dword ptr (-4)[ebp],0
181
jge L26
182
mov edi,dword ptr (24)[ebp]
183
mov edi,dword ptr [edi]
184
lea edi,(4)[edi]
185
push edi
186
mov edi,dword ptr (20)[ebp]
187
push edi
188
call _lookup
189
add esp,8
190
mov edi,eax
191
jmp L23
192
L26:
193
cmp dword ptr (-4)[ebp],0
194
jle L28
195
mov edi,dword ptr (24)[ebp]
196
mov edi,dword ptr [edi]
197
lea edi,(8)[edi]
198
push edi
199
mov edi,dword ptr (20)[ebp]
200
push edi
201
call _lookup
202
add esp,8
203
mov edi,eax
204
jmp L23
205
L28:
206
mov edi,dword ptr (24)[ebp]
207
mov eax,dword ptr [edi]
208
jmp L23
209
L24:
210
cmp dword ptr (_next),2000
211
jl L30
212
lea edi,(L32)
213
push edi
214
call _err
215
add esp,4
216
L30:
217
mov edi,dword ptr (_next)
218
sal edi,4
219
mov dword ptr (_words)[edi],0
220
mov edi,dword ptr (_next)
221
sal edi,4
222
mov dword ptr (_words+8)[edi],0
223
mov dword ptr (_words+4)[edi],0
224
mov edi,dword ptr (20)[ebp]
225
push edi
226
call _strlen
227
add esp,4
228
lea edi,(1)[eax]
229
push edi
230
call _malloc
231
add esp,4
232
mov esi,dword ptr (_next)
233
sal esi,4
234
mov dword ptr (_words+12)[esi],eax
235
mov edi,dword ptr (_next)
236
sal edi,4
237
mov edi,dword ptr (_words+12)[edi]
238
cmp edi,0
239
jne L36
240
lea edi,(L39)
241
push edi
242
call _err
243
add esp,4
244
L36:
245
mov edi,dword ptr (20)[ebp]
246
push edi
247
mov edi,dword ptr (_next)
248
sal edi,4
249
mov edi,dword ptr (_words+12)[edi]
250
push edi
251
call _strcpy
252
add esp,8
253
mov edi,dword ptr (_next)
254
lea esi,(1)[edi]
255
mov dword ptr (_next),esi
256
sal edi,4
257
lea edi,(_words)[edi]
258
mov esi,dword ptr (24)[ebp]
259
mov dword ptr [esi],edi
260
mov eax,edi
261
L23:
262
mov esp,ebp
263
pop ebp
264
pop edi
265
pop esi
266
pop ebx
267
ret
268
public _tprint
269
_tprint:
270
push ebx
271
push esi
272
push edi
273
push ebp
274
mov ebp,esp
275
mov edi,dword ptr (20)[ebp]
276
cmp edi,0
277
je L42
278
mov edi,dword ptr (20)[ebp]
279
mov edi,dword ptr (4)[edi]
280
push edi
281
call _tprint
282
add esp,4
283
mov edi,dword ptr (20)[ebp]
284
mov esi,dword ptr (12)[edi]
285
push esi
286
mov edi,dword ptr [edi]
287
push edi
288
lea edi,(L44)
289
push edi
290
call _printf
291
add esp,12
292
mov edi,dword ptr (20)[ebp]
293
mov edi,dword ptr (8)[edi]
294
push edi
295
call _tprint
296
add esp,4
297
L42:
298
mov eax,0
299
L41:
300
mov esp,ebp
301
pop ebp
302
pop edi
303
pop esi
304
pop ebx
305
ret
306
public _strcmp
307
_strcmp:
308
push ebx
309
push esi
310
push edi
311
push ebp
312
mov ebp,esp
313
jmp L47
314
L46:
315
mov edi,dword ptr (20)[ebp]
316
lea esi,(1)[edi]
317
mov dword ptr (20)[ebp],esi
318
movsx edi,byte ptr [edi]
319
cmp edi,0
320
jne L49
321
mov eax,0
322
jmp L45
323
L49:
324
inc dword ptr (24)[ebp]
325
L47:
326
mov edi,dword ptr (20)[ebp]
327
movsx edi,byte ptr [edi]
328
mov esi,dword ptr (24)[ebp]
329
movsx esi,byte ptr [esi]
330
cmp edi,esi
331
je L46
332
mov edi,dword ptr (20)[ebp]
333
movsx edi,byte ptr [edi]
334
cmp edi,0
335
jne L51
336
mov eax,-1
337
jmp L45
338
L51:
339
mov edi,dword ptr (24)[ebp]
340
movsx edi,byte ptr [edi]
341
cmp edi,0
342
jne L53
343
mov eax,1
344
jmp L45
345
L53:
346
mov edi,dword ptr (20)[ebp]
347
movsx edi,byte ptr [edi]
348
mov esi,dword ptr (24)[ebp]
349
movsx esi,byte ptr [esi]
350
mov eax,edi
351
sub eax,esi
352
L45:
353
mov esp,ebp
354
pop ebp
355
pop edi
356
pop esi
357
pop ebx
358
ret
359
_TEXT ends
360
extrn _strcpy:near
361
_TEXT segment
362
_TEXT ends
363
extrn _strlen:near
364
_TEXT segment
365
_TEXT ends
366
extrn _malloc:near
367
_TEXT segment
368
_TEXT ends
369
extrn _getchar:near
370
_TEXT segment
371
_TEXT ends
372
extrn _exit:near
373
_TEXT segment
374
_TEXT ends
375
extrn _printf:near
376
_TEXT segment
377
_TEXT ends
378
_DATA segment
379
public _next
380
align 4
381
_next label byte
382
db 4 dup (0)
383
public _words
384
align 4
385
_words label byte
386
db 32000 dup (0)
387
_DATA ends
388
_TEXT segment
389
align 1
390
L44 label byte
391
db 37
392
db 100
393
db 9
394
db 37
395
db 115
396
db 10
397
db 0
398
align 1
399
L39 label byte
400
db 111
401
db 117
402
db 116
403
db 32
404
db 111
405
db 102
406
db 32
407
db 119
408
db 111
409
db 114
410
db 100
411
db 32
412
db 115
413
db 116
414
db 111
415
db 114
416
db 97
417
db 103
418
db 101
419
db 0
420
align 1
421
L32 label byte
422
db 111
423
db 117
424
db 116
425
db 32
426
db 111
427
db 102
428
db 32
429
db 110
430
db 111
431
db 100
432
db 101
433
db 32
434
db 115
435
db 116
436
db 111
437
db 114
438
db 97
439
db 103
440
db 101
441
db 0
442
align 1
443
L6 label byte
444
db 63
445
db 32
446
db 37
447
db 115
448
db 10
449
db 0
450
_TEXT ends
451
end

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.