Subversion Repositories Kolibri OS

Rev

Rev 4909 | Rev 4911 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4909 Rev 4910
Line 713... Line 713...
713
        pop     edx
713
        pop     edx
714
        pop     esi
714
        pop     esi
715
        add     edx, ecx
715
        add     edx, ecx
716
        ret
716
        ret
Line 717... Line -...
717
 
-
 
718
 
717
 
719
;-----------------------------------------------------------------------------
718
;-----------------------------------------------------------------------------
720
;                  Display FPU register (ST0 - ST7) content
719
;                  Display FPU register (ST0 - ST7) content
721
;
720
;
Line 722... Line 721...
722
; in: ebp->index, ebx = coord
721
; in: ebp->index, ebx = coord
Line 723... Line 722...
723
 
722
 
724
draw_fpu_register_2:
723
draw_fpu_register_2:
725
 
724
 
726
.str_buf  equ esp
725
.str_buf  equ esp
-
 
726
.bcd_man  equ .str_buf+32
Line 727... Line 727...
727
.bcd_man  equ esp+32
727
.bcd_exp  equ .bcd_man+12
Line 728... Line 728...
728
.bcd_exp  equ esp+32+12
728
.exp      equ .bcd_exp+12
729
.exp_v    equ esp+32+12+12
729
.tmp      equ .exp+4
730
 
730
 
731
        sub     esp, 32+12+12+4
731
        sub     esp, 32+12+12+4+4
Line 775... Line 775...
775
        mov     dword [.str_buf], ' 0.0'
775
        mov     dword [.str_buf], ' 0.0'
776
        jmp     .display
776
        jmp     .display
Line 777... Line 777...
777
 
777
 
778
.decode:
778
.decode:
779
        fld     tword [_st0+edx]
-
 
780
        fldlg2
-
 
781
        fld     tword [_st0+edx]
-
 
782
        bt      dword [_st0+edx+8], 15  ;check sign flag
-
 
783
        jnc @f
779
        fld     tword [_st0+edx]
-
 
780
        fabs
784
        fabs
781
        fld     st0
-
 
782
        fldlg2
785
@@:
783
        fld     st1
786
        fyl2x
784
        fyl2x
787
        frndint
785
        frndint
788
        fist    dword [.exp_v]
786
        fist    dword [.exp]
789
        fld     st0
787
        fld     st0
790
        fbstp   tword [.bcd_exp]
-
 
791
        push    8
-
 
792
        fisub   dword [esp]
-
 
-
 
788
        fbstp   tword [.bcd_exp]
793
        pop     eax
789
 
794
        fldl2t
790
        fldl2t
795
        fmulp
791
        fmulp
796
        fld     st0
792
        fld     st0
797
        frndint
793
        frndint
Line 802... Line 798...
802
        fld1
798
        fld1
803
        faddp
799
        faddp
804
        fscale
800
        fscale
805
        fstp    st1
801
        fstp    st1
806
        fdivp
802
        fdivp
-
 
803
 
-
 
804
        fist    dword [.tmp]
-
 
805
        cmp     dword [.tmp], 10
-
 
806
        jae     .fixup
-
 
807
 
-
 
808
        fstp    st1
-
 
809
        jmp     .done
-
 
810
 
-
 
811
.fixup:
-
 
812
        fstp st0
-
 
813
 
-
 
814
        inc     dword [.exp]
-
 
815
        fild    dword [.exp]
-
 
816
        fld     st0
-
 
817
        fbstp tword [.bcd_exp]
-
 
818
 
-
 
819
        fldl2t
-
 
820
        fmulp
-
 
821
        fld st0
-
 
822
        frndint
-
 
823
        fxch
-
 
824
        fsub st,st1
-
 
825
 
-
 
826
        f2xm1
-
 
827
        fld1
-
 
828
        faddp
-
 
829
        fscale
-
 
830
        fstp st1
-
 
831
        fdivp
-
 
832
.done:
-
 
833
        fimul dword [n_digits]
807
        fbstp   tword [.bcd_man]
834
        fbstp   tword [.bcd_man]
Line 808... Line 835...
808
 
835
 
809
        lea     esi, [.bcd_man-1]
836
        lea     esi, [.bcd_man-1]
Line 859... Line 886...
859
        stosb
886
        stosb
Line 860... Line 887...
860
 
887
 
861
.skip_lb:
888
.skip_lb:
Line 862... Line 889...
862
        loop    .mantis_2_str
889
        loop    .mantis_2_str
863
 
890
 
864
        mov     eax, [.exp_v]
891
        mov     eax, [.exp]
Line 865... Line 892...
865
        test    eax, eax
892
        test    eax, eax
866
        jz      .display
893
        jz      .display
Line 954... Line 981...
954
        mov     edx, .str_buf
981
        mov     edx, .str_buf
955
        add     ebx, 0x180000
982
        add     ebx, 0x180000
956
        int     0x40
983
        int     0x40
Line 957... Line 984...
957
 
984
 
958
        sub     ebx, 0x180000
985
        sub     ebx, 0x180000
Line 959... Line 986...
959
        add     esp, 32+12+12+4
986
        add     esp, 32+12+12+4+4
Line 960... Line 987...
960
 
987