Subversion Repositories Kolibri OS

Rev

Rev 576 | Rev 701 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 576 Rev 577
Line 17... Line 17...
17
public _draw_bar@20
17
public _draw_bar@20
18
public _write_text@20
18
public _write_text@20
19
public _debug_out@4
19
public _debug_out@4
20
public _debug_out_hex@4
20
public _debug_out_hex@4
21
public _create_thread@12
21
public _create_thread@12
22
public _init_ipc@0
-
 
23
public _recieve_ipc@0
-
 
24
public _send_ipc@8 
-
 
25
 
-
 
Line 26... Line 22...
26
 
22
 
Line 27... Line 23...
27
public _memset
23
public _memset
28
 
24
 
Line 395... Line 391...
395
toend:
391
toend:
396
        mov     eax,[esp + 4]
392
        mov     eax,[esp + 4]
Line 397... Line 393...
397
 
393
 
Line 398... Line -...
398
        ret
-
 
399
 
-
 
400
public _allmul
-
 
401
 
-
 
402
_allmul:
-
 
403
        mov eax, [esp+8]
-
 
404
        mov ecx, [esp+16]
-
 
405
        or ecx,eax
-
 
406
        mov ecx, [esp+12]
-
 
407
        jnz .hard
-
 
408
        mov eax, [esp+4]
-
 
409
        mul ecx
-
 
410
        ret 16
-
 
411
.hard:
-
 
412
        push ebx
-
 
413
        mul ecx
-
 
414
        mov ebx,eax
-
 
415
        mov eax, [esp+8]
-
 
416
        mul dword [esp+20]
-
 
417
        add ebx,eax
-
 
418
        mov eax,[esp+8]
-
 
419
        mul ecx
-
 
420
        add edx,ebx
-
 
421
        pop ebx
-
 
422
        ret 16
-
 
423
 
-
 
424
align 4
-
 
425
_allshr:
-
 
426
        cmp cl,64
-
 
427
        jae .sign
-
 
428
 
-
 
429
        cmp cl, 32
-
 
430
        jae .MORE32
-
 
431
        shrd eax,edx,cl
-
 
432
        sar edx,cl
-
 
433
        ret
-
 
434
.MORE32:
-
 
435
        mov     eax,edx
-
 
436
        sar     edx,31
-
 
437
        and     cl,31
-
 
438
        sar     eax,cl
-
 
439
        ret
-
 
440
.sign:
-
 
441
        sar     edx,31
-
 
442
        mov     eax,edx
-
 
443
        ret
-
 
444
 
-
 
445
public __ftol2_sse
-
 
446
 
-
 
447
align 4
-
 
448
__ftol2_sse:
-
 
449
           push ebp
-
 
450
           mov ebp, esp
-
 
451
           sub esp, 20
-
 
452
           and esp, 0xFFFFFFF0
-
 
453
           fld st0
-
 
454
           fst dword [esp+18]
-
 
455
           fistp qword [esp+10]
-
 
456
           fild qword [esp+10]
-
 
457
           mov edx, [esp+18]
-
 
458
           mov eax, [esp+10]
-
 
459
           test eax, eax
-
 
460
           jz .QnaNZ
-
 
461
 
-
 
462
.not_QnaNZ:
-
 
463
           fsubp st1, st0
-
 
464
           test edx, edx
-
 
465
           jns .pos
-
 
466
           fstp dword [esp]
-
 
467
           mov ecx, [esp]
-
 
468
           xor ecx, 0x80000000
-
 
469
           add ecx, 0x7FFFFFFF
-
 
470
           adc eax, 0
-
 
471
           mov edx, [esp+14]
-
 
472
           adc edx, 0
-
 
473
           jmp .exit
-
 
474
.pos:
-
 
475
           fstp dword [esp]
-
 
476
           mov ecx, [esp]
-
 
477
           add ecx, 0x7FFFFFFF
-
 
478
           sbb eax, 0
-
 
479
           jmp .exit
-
 
480
.QnaNZ:
-
 
481
           mov edx, [esp+14]
-
 
482
           test edx, 0x7FFFFFFF
-
 
483
           jne .not_QnaNZ
-
 
484
           fstp dword [esp+18]
-
 
485
           fstp dword [esp+18]
-
 
486
.exit:
-
 
Line 487... Line 394...
487
           leave
394
        ret
488
           ret
395
 
Line 489... Line 396...
489
 
396
 
Line 495... Line 402...
495
 
402
 
496
align 4
403
align 4
Line 497... Line -...
497
fileio FILEIO
-
 
498
 
-
 
499
 
-
 
500
align 4
-
 
501
_init_ipc@0:
-
 
502
           push ebx 
-
 
503
           mov eax, 60
-
 
504
           mov ebx, 1
-
 
505
           mov ecx, ipc_buff
-
 
506
           mov edx, (5*4+1024)
-
 
Line 507... Line -...
507
           int 0x40
-
 
508
           pop ebx
-
 
509
           ret  
-
 
510
 
-
 
511
align 4
-
 
512
_recieve_ipc@0:
-
 
513
           mov [ipc_buff.size], 8   
-
 
514
           mov eax, ipc_buff.sender
-
 
515
           ret
-
 
Line 516... Line -...
516
align 4
-
 
517
proc _send_ipc@8 stdcall, dst:dword, code:dword
-
 
518
           push ebx
-
 
519
           push esi
-
 
520
           
-
 
521
           mov eax, 60
-
 
522
           mov ebx, 2
-
 
523
           mov ecx, [dst]
-
 
524
           lea edx, [code]
-
 
525
           mov esi, 4
-
 
526
           int 0x40
-
 
527
           pop esi
-
 
528
           pop ebx
-
 
529
           ret
-
 
530
endp
-
 
531
 
-
 
532
;align 4
-
 
533
;ipc_ctrl:
-
 
534
;  .pid        dd ?
-
 
535
;  .size       dd 4
-
 
536
;  .msg        dd ?
-
 
537
        
-
 
538
align 4
-
 
539
ipc_buff:
-
 
540
  .lock       dd 0
-
 
541
  .size       dd 8
404
fileio FILEIO