Menu

[r976]: / mmpcsystem.asm  Maximize  Restore  History

Download this file

774 lines (773 with data), 14.1 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
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
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
%ifndef system
%define system
SECTION .text ; procedure generated by code generator IA32CG
le68cc0fc56a6:
; runerror
enter spaceforrunerror-4*1,1
;363
push DWORD [ ebp+ 8]
call le68cc0fcc4b8
add esp, 4
;364
le68cc109da11f:
spaceforrunerror equ 4
runerrorexit:
leave
ret 0
SECTION .text ; procedure generated by code generator IA32CG
le68cc0fcc4b8:
; halt
enter spaceforhalt-4*1,1
;357
push DWORD [ ebp+ 8]
EXTERN _pascalexit
call _pascalexit; imported
add esp, 4
;358
le68cc1099e11b:
spaceforhalt equ 4
haltexit:
leave
ret 0
SECTION .text ; procedure generated by code generator IA32CG
le68cc108fe115:
; printspaces
enter spaceforprintspaces-4*1,1
;347
mov eax,DWORD [ ebp+ 12]
mov DWORD [ ebp+ -12],eax
mov DWORD [ ebp+ -8], 1
le68cc13a22123:
mov eax,DWORD [ ebp+ -8]
cmp eax,DWORD [ ebp+ -12]
jg near le68cc13a22124
push DWORD 1
push DWORD 1
push DWORD 32
push DWORD [ ebp+ 8]
EXTERN _printchar
call _printchar; imported
add esp, 16
inc DWORD [ ebp+ -8]
jmp le68cc13a22123
le68cc13a22124:
;348
le68cc108fe117:
spaceforprintspaces equ 12
printspacesexit:
leave
ret 0
SECTION .text ; procedure generated by code generator IA32CG
le68cc0f9c248:
; length
enter spaceforlength-4*1,1
;339
mov eax,DWORD [ ebp+ 8]
push DWORD [ eax]
pop dword [ ebp+ -8]
;340
le68cc108c2113:
mov eax,DWORD [ ebp+ -8]
spaceforlength equ 8
lengthexit:
leave
ret 0
SECTION .text ; procedure generated by code generator IA32CG
le68cc0fbe892:
; randomize
enter spaceforrandomize-4*1,1
;331
EXTERN _time
call _time; imported
add esp, 0
mov DWORD [ ebp+ -8],eax
push DWORD [ ebp+ -8]
EXTERN _srand
call _srand; imported
add esp, 4
;332
le68cc1089010f:
spaceforrandomize equ 8
randomizeexit:
leave
ret 0
EXTERN _srand
EXTERN _srand
EXTERN _time
EXTERN _time
SECTION .text ; procedure generated by code generator IA32CG
le68cc0fc1a9d:
; ripow
enter spaceforripow-4*1,1
;325
cmp DWORD [ ebp+ 12], 0
jz near le68cc1427e128
cmp DWORD [ ebp+ 12], 0
jg near le68cc1446812a
push DWORD 0
mov eax,DWORD [ ebp+ 12]
sub dword[esp] ,eax
push DWORD [ ebp+ 8]
call le68cc0fc1a9d
add esp, 8
fstp dword [ ebp+ -16]
db 0ebh,4
dd 1.0
fld dword [$-4]
fld dword [ ebp+ -16]
fdivp st1
fstp dword [ ebp+ -8]
jmp le68cc1446812b
le68cc1446812a:
push DWORD [ ebp+ 12]
mov DWORD eax, 1
sub dword[esp] ,eax
push DWORD [ ebp+ 8]
call le68cc0fc1a9d
add esp, 8
fstp dword [ ebp+ -12]
fld dword [ ebp+ -12]
fld dword [ ebp+ 8]
fmulp st1
fstp dword [ ebp+ -8]
le68cc1446812b:
jmp le68cc1427e129
le68cc1427e128:
db 0ebh,4
dd 1.0
fld dword [$-4]
fstp dword [ ebp+ -8]
le68cc1427e129:
;326
le68cc107b4103:
fld dword [ ebp+ -8]
spaceforripow equ 16
ripowexit:
leave
ret 0
SECTION .text ; procedure generated by code generator IA32CG
le68cc0fc1aa0:
; iipow
enter spaceforiipow-4*1,1
;319
cmp DWORD [ ebp+ 12], 0
jz near le68cc1575012c
cmp DWORD [ ebp+ 12], 0
jg near le68cc157f012e
push DWORD 0
mov eax,DWORD [ ebp+ 12]
sub dword[esp] ,eax
push DWORD [ ebp+ 8]
call le68cc0fc1aa0
add esp, 8
mov DWORD [ ebp+ -16],eax
mov DWORD eax, 1
mov ebx,DWORD [ ebp+ -16]
push edx
xchg eax,eax
cdq
div ebx
pop edx
xchg eax,eax
mov DWORD [ ebp+ -8],eax
jmp le68cc157f012f
le68cc157f012e:
push DWORD [ ebp+ 12]
mov DWORD eax, 1
sub dword[esp] ,eax
push DWORD [ ebp+ 8]
call le68cc0fc1aa0
add esp, 8
mov DWORD [ ebp+ -12],eax
mov eax,DWORD [ ebp+ -12]
imul eax, [ ebp+ 8]
mov DWORD [ ebp+ -8],eax
le68cc157f012f:
jmp le68cc1575012d
le68cc1575012c:
mov DWORD [ ebp+ -8], 1
le68cc1575012d:
;320
le68cc10746ff:
mov eax,DWORD [ ebp+ -8]
spaceforiipow equ 16
iipowexit:
leave
ret 0
SECTION .text ; procedure generated by code generator IA32CG
le68cc0fc56a3:
; rpow
enter spaceforrpow-4*1,1
;313
fld dword [ ebp+ 8]
fldln2
fxch
fyl2x
fld dword [ ebp+ 12]
fmulp st1
sub esp,4
fstp dword [esp]
call le68cc0f8aa29
add esp, 4
fstp dword [ ebp+ -12]
fld dword [ ebp+ -12]
fstp dword [ ebp+ -8]
;314
le68cc10746fb:
fld dword [ ebp+ -8]
spaceforrpow equ 12
rpowexit:
leave
ret 0
SECTION .text ; procedure generated by code generator IA32CG
le68cc0f8aa29:
; exp
enter spaceforexp-4*1,1
;308
fld dword [ ebp+ 8]
db 0ebh,4
dd 88.02969193111305
fld dword [$-4]
fxch
fcompp
fstsw ax
sahf
setnc al
mov byte bh,al
mov byte bl,bh
and bl,bl
jnz near le68cc16466130
fld dword [ ebp+ 8]
db 0ebh,4
dd -88.722839111673
fld dword [$-4]
fxch
fcompp
fstsw ax
sahf
setc al
mov byte bh,al
mov byte bl,bh
and bl,bl
jnz near le68cc16808132
;292
fld dword [ ebp+ 8]
db 0ebh,4
dd 1.4426950408889634
fld dword [$-4]
fmulp st1
fstp dword [ ebp+ -16]
;293
fld dword [ ebp+ -16]
db 0ebh,4
dd 0.5
fld dword [$-4]
faddp st1
sub esp,4
fstp dword [esp]
EXTERN _trunc
call _trunc; imported
add esp, 4
mov DWORD [ ebp+ -28],eax
fild DWORD [ ebp+ -28]
fstp dword [ ebp+ -20]
;294
push DWORD [ ebp+ -20]
EXTERN _trunc
call _trunc; imported
add esp, 4
mov DWORD [ ebp+ -32],eax
mov eax,DWORD [ ebp+ -32]
mov DWORD [ ebp+ -12],eax
;295
fld dword [ ebp+ 8]
fld dword [ ebp+ -20]
db 0ebh,4
dd 0.693359375
fld dword [$-4]
fmulp st1
fsubp st1
fstp dword [ ebp+ 8]
;296
fld dword [ ebp+ 8]
fld dword [ ebp+ -20]
db 0ebh,4
dd 2.1219444005469057E-4
fld dword [$-4]
fmulp st1
faddp st1
fstp dword [ ebp+ 8]
;301
fld dword [ ebp+ 8]
fld dword [ ebp+ 8]
fmulp st1
fstp dword [ ebp+ -24]
;302
push DWORD 2
lea eax,[ le68cc10336f6]
push eax
push ebp
mov DWORD eax, -24
add dword[esp] ,eax
call le68cc10110eb
add esp, 12
fstp dword [ ebp+ -36]
fld dword [ ebp+ 8]
fld dword [ ebp+ -36]
fmulp st1
fstp dword [ ebp+ -16]
;303
push DWORD 3
lea eax,[ le68cc103a4f7]
push eax
push ebp
mov DWORD eax, -24
add dword[esp] ,eax
call le68cc10110eb
add esp, 12
fstp dword [ ebp+ -40]
fld dword [ ebp+ -16]
fld dword [ ebp+ -40]
fld dword [ ebp+ -16]
fsubp st1
fdivp st1
fstp dword [ ebp+ 8]
;304
push DWORD 1
push DWORD [ ebp+ 8]
call le68cc0ff58e3
add esp, 8
fstp dword [ ebp+ -44]
fld dword [ ebp+ -44]
fstp dword [ ebp+ 8]
;305
fld dword [ ebp+ 8]
db 0ebh,4
dd 1.0
fld dword [$-4]
faddp st1
fstp dword [ ebp+ 8]
;306
push DWORD [ ebp+ -12]
push DWORD [ ebp+ 8]
call le68cc0ff58e3
add esp, 8
fstp dword [ ebp+ -48]
fld dword [ ebp+ -48]
fstp dword [ ebp+ 8]
;307
fld dword [ ebp+ 8]
fstp dword [ ebp+ -8]
;308
jmp le68cc16808133
le68cc16808132:
;283
push DWORD 205
call le68cc0fc56a6
add esp, 4
;284
le68cc16808133:
jmp le68cc16466131
le68cc16466130:
push DWORD 205
call le68cc0fc56a6
add esp, 4
le68cc16466131:
;309
le68cc1028cf5:
fld dword [ ebp+ -8]
spaceforexp equ 48
expexit:
leave
ret 0
SECTION .text ; procedure generated by code generator IA32CG
le68cc1021eef:
; p1evl
enter spaceforp1evl-4*1,1
;232
mov eax,DWORD [ ebp+ 8]
fld dword [ eax]
mov eax,DWORD [ ebp+ 12]
fld dword [ eax]
faddp st1
fstp dword [ ebp+ -12]
;234
mov eax,DWORD [ ebp+ 16]
sub DWORD eax,1
mov DWORD [ ebp+ -20],eax
mov DWORD [ ebp+ -16], 1
le68cc17c6c136:
mov eax,DWORD [ ebp+ -16]
cmp eax,DWORD [ ebp+ -20]
jg near le68cc17c6c137
fld dword [ ebp+ -12]
mov eax,DWORD [ ebp+ 8]
fld dword [ eax]
fmulp st1
mov eax,DWORD [ ebp+ 12]
mov ebx,DWORD [ ebp+ -16]
fld dword [ eax+ebx* 4]
faddp st1
fstp dword [ ebp+ -12]
inc DWORD [ ebp+ -16]
jmp le68cc17c6c136
le68cc17c6c137:
;235
fld dword [ ebp+ -12]
fstp dword [ ebp+ -8]
;236
le68cc1025af1:
fld dword [ ebp+ -8]
spaceforp1evl equ 20
p1evlexit:
leave
ret 0
SECTION .text ; procedure generated by code generator IA32CG
le68cc10110eb:
; polevl
enter spaceforpolevl-4*1,1
;216
mov eax,DWORD [ ebp+ 12]
fld dword [ eax]
fstp dword [ ebp+ -12]
;217
mov eax,DWORD [ ebp+ 16]
mov DWORD [ ebp+ -20],eax
mov DWORD [ ebp+ -16], 1
le68cc17fdc138:
mov eax,DWORD [ ebp+ -16]
cmp eax,DWORD [ ebp+ -20]
jg near le68cc17fdc139
fld dword [ ebp+ -12]
mov eax,DWORD [ ebp+ 8]
fld dword [ eax]
fmulp st1
mov eax,DWORD [ ebp+ 12]
mov ebx,DWORD [ ebp+ -16]
fld dword [ eax+ebx* 4]
faddp st1
fstp dword [ ebp+ -12]
inc DWORD [ ebp+ -16]
jmp le68cc17fdc138
le68cc17fdc139:
;218
fld dword [ ebp+ -12]
fstp dword [ ebp+ -8]
;219
le68cc10142ed:
fld dword [ ebp+ -8]
spaceforpolevl equ 20
polevlexit:
leave
ret 0
SECTION .text ; procedure generated by code generator IA32CG
le68cc0ff58e3:
; ldexp
enter spaceforldexp-4*1,1
;157
db 0ebh,4
dd 1.0
fld dword [$-4]
fstp dword [ ebp+ -12]
;169
cmp DWORD [ ebp+ 12], 0
jg near le68cc1812613a
le68cc0ffc6e8:
cmp [ ebp+ 12], DWORD 0
setl bl
cmp BYTE bl, 1
jnz near le68cc0ffc6e9
;167
fld dword [ ebp+ -12]
db 0ebh,4
dd 2.0
fld dword [$-4]
fdivp st1
fstp dword [ ebp+ -12]
;168
inc DWORD [ ebp+ 12]
;168
;169
jmp le68cc0ffc6e8
le68cc0ffc6e9:
jmp le68cc1812613b
le68cc1812613a:
le68cc0ff8ae6:
cmp [ ebp+ 12], DWORD 0
setg bl
cmp BYTE bl, 1
jnz near le68cc0ff8ae7
;161
fld dword [ ebp+ -12]
db 0ebh,4
dd 2.0
fld dword [$-4]
fmulp st1
fstp dword [ ebp+ -12]
;162
sub DWORD [ ebp+ 12],1
;163
jmp le68cc0ff8ae6
le68cc0ff8ae7:
le68cc1812613b:
;170
fld dword [ ebp+ 8]
fld dword [ ebp+ -12]
fmulp st1
fstp dword [ ebp+ -8]
;171
le68cc0ff8ae5:
fld dword [ ebp+ -8]
spaceforldexp equ 12
ldexpexit:
leave
ret 0
SECTION .text ; procedure generated by code generator IA32CG
le68cc0fbac8f:
; random
enter spaceforrandom-4*1,1
;151
EXTERN _rand
call _rand; imported
add esp, 0
mov DWORD [ ebp+ -12],eax
mov eax,DWORD [ ebp+ -12]
mov DWORD [ ebp+ -8],eax
;151
le68cc0ff58e1:
mov eax,DWORD [ ebp+ -8]
spaceforrandom equ 12
randomexit:
leave
ret 0
SECTION .text ; procedure generated by code generator IA32CG
le68cc0f98641:
; int
enter spaceforint-4*1,1
;148
push DWORD [ ebp+ 8]
EXTERN _trunc
call _trunc; imported
add esp, 4
mov DWORD [ ebp+ -12],eax
fild DWORD [ ebp+ -12]
fstp dword [ ebp+ -8]
;148
le68cc0ff1cdd:
fld dword [ ebp+ -8]
spaceforint equ 12
intexit:
leave
ret 0
SECTION .text ; procedure generated by code generator IA32CG
le68cc0fc88b1:
; sqr
enter spaceforsqr-4*1,1
;145
fld dword [ ebp+ 8]
fld dword [ ebp+ 8]
fmulp st1
fstp dword [ ebp+ -8]
;146
le68cc0ff1cd9:
fld dword [ ebp+ -8]
spaceforsqr equ 8
sqrexit:
leave
ret 0
SECTION .text ; procedure generated by code generator IA32CG
le68cc0f7609:
; absr
enter spaceforabsr-4*1,1
;140
fld dword [ ebp+ 8]
db 0ebh,4
dd 0.0
fld dword [$-4]
fxch
fcompp
fstsw ax
sahf
setc al
mov byte bh,al
mov byte bl,bh
and bl,bl
jnz near le68cc185e013e
fld dword [ ebp+ 8]
fstp dword [ ebp+ -8]
jmp le68cc185e013f
le68cc185e013e:
db 0ebh,4
dd 0.0
fld dword [$-4]
fld dword [ ebp+ 8]
fsubp st1
fstp dword [ ebp+ -8]
le68cc185e013f:
;141
le68cc0feaed5:
fld dword [ ebp+ -8]
spaceforabsr equ 8
absrexit:
leave
ret 0
SECTION .text ; procedure generated by code generator IA32CG
le68cc0f72e6:
; absi
enter spaceforabsi-4*1,1
;135
cmp DWORD [ ebp+ 8], 0
jl near le68cc188d8140
mov eax,DWORD [ ebp+ 8]
mov DWORD [ ebp+ -8],eax
jmp le68cc188d8141
le68cc188d8140:
mov eax,DWORD [ ebp+ 8]
neg DWORD eax
mov DWORD [ ebp+ -8],eax
le68cc188d8141:
;136
le68cc0fe40d1:
mov eax,DWORD [ ebp+ -8]
spaceforabsi equ 8
absiexit:
leave
ret 0
SECTION .text ; procedure generated by code generator IA32CG
le68cc0f91837:
; freemem
enter spaceforfreemem-4*1,1
;126
mov eax,DWORD [ ebp+ 8]
push DWORD [ eax]
EXTERN _free
call _free; imported
add esp, 4
;127
le68cc0fe40cd:
spaceforfreemem equ 4
freememexit:
leave
ret 0
SECTION .text ; procedure generated by code generator IA32CG
le68cc0f9543a:
; getmem
enter spaceforgetmem-4*1,1
;122
push DWORD [ ebp+ 12]
EXTERN _malloc
call _malloc; imported
add esp, 4
mov DWORD [ ebp+ -8],eax
mov eax,DWORD [ ebp+ 8]
mov ebx,DWORD [ ebp+ -8]
mov DWORD [ eax],ebx
;123
le68cc0fda0c9:
spaceforgetmem equ 8
getmemexit:
leave
ret 0
SECTION .text ; procedure generated by code generator IA32CG
le68cc0f91834:
; fillchar
enter spaceforfillchar-4*1,1
;113
mov eax,DWORD [ ebp+ 8]
mov DWORD [ ebp+ -8],eax
;118
mov eax,DWORD [ ebp+ 12]
mov DWORD [ ebp+ -16],eax
mov DWORD [ ebp+ -12], 1
le68cc18c16144:
mov eax,DWORD [ ebp+ -12]
cmp eax,DWORD [ ebp+ -16]
jg near le68cc18c16145
;116
mov eax,DWORD [ ebp+ -8]
mov bl,BYTE [ ebp+ 16]
mov byte [ eax],bl
;117
inc DWORD [ ebp+ -8]
;118
inc DWORD [ ebp+ -12]
jmp le68cc18c16144
le68cc18c16145:
;119
le68cc0fcf6c5:
spaceforfillchar equ 16
fillcharexit:
leave
ret 0
EXTERN _free
EXTERN _free
EXTERN _malloc
EXTERN _malloc
EXTERN _trunc
EXTERN _stringappend
EXTERN _stringassign
EXTERN _rewrite
EXTERN _reset
EXTERN _rand
EXTERN _endoffile
EXTERN _endofline
EXTERN _readline
EXTERN _readbool
EXTERN _readint
EXTERN _readreal
EXTERN _readchar
EXTERN _readstring
EXTERN _println
EXTERN _printbool
EXTERN _printint
EXTERN _printreal
EXTERN _printchar
EXTERN _printstring
EXTERN _secs
EXTERN _pascalexit
EXTERN _ioresult
EXTERN _gettime
EXTERN _filepos
EXTERN _filesize
EXTERN _eoln
EXTERN _erase
EXTERN _eof
EXTERN _assign
EXTERN _append
SECTION .text ; procedure generated by code generator IA32CG
le68cc12b54120:
; unit$system
unit$system:
enter 0,0
cmp byte[unit$systemready],1
jnz unit$systeminit
jmp unit$systemexit
unit$systeminit:mov byte[unit$systemready],1
;366
le68cc0fcc4b9:
spaceforunit$system equ 4
unit$systemexit:
leave
ret 0
SECTION .bss
resb spaceforunit$system
le68cc0f3fa3:
SECTION .data
unit$systemready dd 0
le68cc103a4f7:
dd 3.0022794727988763E-6
dd 0.0025245365355322288
dd 0.22726604419835267
dd 2.0
dd 0.0
dd 0.0
dd 0.0
le68cc10336f6:
dd 1.2618309283445855E-4
dd 0.030299688765843012
dd 1.0
dd 0.0
dd 0.0
dd 0.0
dd 0.0
%endif
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.