Subversion Repositories Kolibri OS

Rev

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

Rev 2414 Rev 2430
Line 67... Line 67...
67
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
67
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 68... Line 68...
68
 
68
 
69
include 'macros.inc'
69
include 'macros.inc'
Line 70... Line 70...
70
include 'struct.inc'
70
include 'struct.inc'
Line 71... Line 71...
71
 
71
 
Line 72... Line 72...
72
$Revision: 2414 $
72
$Revision: 2430 $
Line 372... Line 372...
372
        movzx   eax, byte [BOOT_VAR+0x9000]      ; bpp
372
        movzx   eax, byte [BOOT_VAR+0x9000]      ; bpp
373
        mov     [ScreenBPP], al
373
        mov     [ScreenBPP], al
Line 374... Line 374...
374
 
374
 
375
        mov     [_display.bpp], eax
375
        mov     [_display.bpp], eax
376
        mov     [_display.vrefresh], 60
-
 
Line 377... Line 376...
377
        mov     [_display.disable_mouse], __sys_disable_mouse
376
        mov     [_display.vrefresh], 60
378
 
377
 
379
        movzx   eax, word [BOOT_VAR+0x900A]; X max
378
        movzx   eax, word [BOOT_VAR+0x900A]; X max
380
        mov     [_display.width], eax
379
        mov     [_display.width], eax
Line 669... Line 668...
669
; LOAD FONTS I and II
668
; LOAD FONTS I and II
Line 670... Line 669...
670
 
669
 
671
        stdcall read_file, char, FONT_I, 0, 2304
670
        stdcall read_file, char, FONT_I, 0, 2304
Line -... Line 671...
-
 
671
        stdcall read_file, char2, FONT_II, 0, 2560
-
 
672
 
-
 
673
        mov     [MOUSE_PICTURE], dword mousepointer
-
 
674
        mov     [_display.check_mouse], check_mouse_area_for_putpixel
672
        stdcall read_file, char2, FONT_II, 0, 2560
675
        mov     [_display.check_m_pixel], check_mouse_area_for_getpixel
673
 
676
 
Line 674... Line 677...
674
        mov     esi, boot_fonts
677
        mov     esi, boot_fonts
675
        call    boot_log
678
        call    boot_log
Line 1915... Line 1918...
1915
;include 'detect/sear_par.inc'
1918
;include 'detect/sear_par.inc'
1916
;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1919
;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1917
        ret
1920
        ret
Line 1918... Line 1921...
1918
 
1921
 
-
 
1922
sys_end:
-
 
1923
;--------------------------------------
-
 
1924
        cmp     [_display.select_cursor], 0
-
 
1925
        je      @f
-
 
1926
; restore default cursor before killing
-
 
1927
        pusha
-
 
1928
        mov     ecx, [current_slot]
-
 
1929
        mov     eax, [def_cursor]
Line -... Line 1930...
-
 
1930
        mov     [ecx+APPDATA.cursor], eax
-
 
1931
 
-
 
1932
        movzx   eax, word [MOUSE_Y]
-
 
1933
        movzx   ebx, word [MOUSE_X]
-
 
1934
        mov     ecx, [Screen_Max_X]
-
 
1935
        inc     ecx
-
 
1936
        mul     ecx
-
 
1937
        add     eax, [_WinMapAddress]
-
 
1938
        movzx   edx, byte [ebx+eax]
-
 
1939
        shl     edx, 8
-
 
1940
        mov     esi, [edx+SLOT_BASE+APPDATA.cursor]
-
 
1941
        push    esi
-
 
1942
        call    [_display.select_cursor]
-
 
1943
        mov     [current_cursor], esi
-
 
1944
        popa
1919
sys_end:
1945
@@:
1920
 
1946
;--------------------------------------
1921
        mov     ecx, [current_slot]
1947
        mov     ecx, [current_slot]
1922
        mov     eax, [ecx+APPDATA.tls_base]
1948
        mov     eax, [ecx+APPDATA.tls_base]
Line 1994... Line 2020...
1994
        jb      noprocessterminate
2020
        jb      noprocessterminate
1995
        mov     edx, [TASK_COUNT]
2021
        mov     edx, [TASK_COUNT]
1996
        cmp     ecx, edx
2022
        cmp     ecx, edx
1997
        ja      noprocessterminate
2023
        ja      noprocessterminate
1998
        mov     eax, [TASK_COUNT]
2024
        mov     eax, [TASK_COUNT]
-
 
2025
        push    ecx
1999
        shl     ecx, 5
2026
        shl     ecx, 5
2000
        mov     edx, [ecx+CURRENT_TASK+TASKDATA.pid]
2027
        mov     edx, [ecx+CURRENT_TASK+TASKDATA.pid]
2001
        add     ecx, CURRENT_TASK+TASKDATA.state
2028
        add     ecx, CURRENT_TASK+TASKDATA.state
2002
        cmp     byte [ecx], 9
2029
        cmp     byte [ecx], 9
2003
        jz      noprocessterminate
2030
        jz      noprocessterminate
-
 
2031
;--------------------------------------
-
 
2032
        cmp     [_display.select_cursor], 0
-
 
2033
        je      @f
-
 
2034
; restore default cursor before killing
-
 
2035
        pusha
-
 
2036
        mov     ecx, [esp+32]
-
 
2037
        shl     ecx, 8
-
 
2038
        mov     eax, [def_cursor]
-
 
2039
        mov     [ecx+SLOT_BASE+APPDATA.cursor], eax
Line -... Line 2040...
-
 
2040
 
-
 
2041
        movzx   eax, word [MOUSE_Y]
-
 
2042
        movzx   ebx, word [MOUSE_X]
-
 
2043
        mov     ecx, [Screen_Max_X]
-
 
2044
        inc     ecx
-
 
2045
        mul     ecx
-
 
2046
        add     eax, [_WinMapAddress]
-
 
2047
        movzx   edx, byte [ebx+eax]
-
 
2048
        shl     edx, 8
-
 
2049
        mov     esi, [edx+SLOT_BASE+APPDATA.cursor]
-
 
2050
        push    esi
-
 
2051
        call    [_display.select_cursor]
-
 
2052
        mov     [current_cursor], esi
-
 
2053
        popa
-
 
2054
@@:
-
 
2055
        add     esp, 4
2004
 
2056
;--------------------------------------
2005
     ;call MEM_Heap_Lock      ;guarantee that process isn't working with heap
2057
     ;call MEM_Heap_Lock      ;guarantee that process isn't working with heap
2006
        mov     [ecx], byte 3; clear possible i40's
2058
        mov     [ecx], byte 3; clear possible i40's
Line 2007... Line 2059...
2007
     ;call MEM_Heap_UnLock
2059
     ;call MEM_Heap_UnLock
Line 3179... Line 3231...
3179
        loop    markz
3231
        loop    markz
3180
@@:
3232
@@:
Line 3181... Line 3233...
3181
 
3233
 
Line 3182... Line -...
3182
  no_mark_system_shutdown:
-
 
3183
 
-
 
3184
        call    [_display.disable_mouse]
3234
  no_mark_system_shutdown:
3185
 
3235
 
Line 3186... Line 3236...
3186
        dec     byte [SYS_SHUTDOWN]
3236
        dec     byte [SYS_SHUTDOWN]
Line 3677... Line 3727...
3677
        jbe     new_port_access_disable
3727
        jbe     new_port_access_disable
3678
no_mask_io:
3728
no_mask_io:
3679
;     popad                         ; end disable io map
3729
;     popad                         ; end disable io map
3680
        xor     eax, eax
3730
        xor     eax, eax
3681
        ret
3731
        ret
3682
 
-
 
3683
 
-
 
-
 
3732
;-----------------------------------------------------------------------------
3684
align 4
3733
align 4
3685
drawbackground:
3734
drawbackground:
3686
        inc     [mouse_pause]
-
 
3687
;        cmp     [SCR_MODE], word 0x12
-
 
3688
;        je      dbrv20
-
 
3689
;     dbrv12:
-
 
3690
;        cmp     [SCR_MODE], word 0100000000000000b
-
 
3691
;        jge     dbrv20
-
 
3692
;        cmp     [SCR_MODE], word 0x13
-
 
3693
;        je      dbrv20
-
 
3694
;        call    vesa12_drawbackground
-
 
3695
;        dec     [mouse_pause]
-
 
3696
;        call    [draw_pointer]
-
 
3697
;        ret
-
 
3698
     dbrv20:
3735
dbrv20:
3699
        cmp     [BgrDrawMode], dword 1
3736
        cmp     [BgrDrawMode], dword 1
3700
        jne     bgrstr
3737
        jne     bgrstr
3701
        call    vesa20_drawbackground_tiled
3738
        call    vesa20_drawbackground_tiled
3702
        dec     [mouse_pause]
-
 
3703
        call    [draw_pointer]
3739
        call    [draw_pointer]
3704
        ret
3740
        ret
-
 
3741
;--------------------------------------
-
 
3742
align 4
3705
     bgrstr:
3743
bgrstr:
3706
        call    vesa20_drawbackground_stretch
3744
        call    vesa20_drawbackground_stretch
3707
        dec     [mouse_pause]
-
 
3708
        call    [draw_pointer]
3745
        call    [draw_pointer]
3709
        ret
3746
        ret
3710
 
-
 
-
 
3747
;-----------------------------------------------------------------------------
3711
align 4
3748
align 4
3712
 
-
 
3713
syscall_putimage:                       ; PutImage
3749
syscall_putimage:                       ; PutImage
3714
sys_putimage:
3750
sys_putimage:
3715
        test    ecx, 0x80008000
3751
        test    ecx, 0x80008000
3716
        jnz     .exit
3752
        jnz     .exit
3717
        test    ecx, 0x0000FFFF
3753
        test    ecx, 0x0000FFFF
3718
        jz      .exit
3754
        jz      .exit
3719
        test    ecx, 0xFFFF0000
3755
        test    ecx, 0xFFFF0000
3720
        jnz     @f
3756
        jnz     @f
-
 
3757
;--------------------------------------
-
 
3758
align 4
3721
  .exit:
3759
.exit:
3722
        ret
3760
        ret
-
 
3761
;--------------------------------------
-
 
3762
align 4
3723
 @@:
3763
@@:
3724
        mov     edi, [current_slot]
3764
        mov     edi, [current_slot]
3725
        add     dx, word[edi+APPDATA.wnd_clientbox.top]
3765
        add     dx, word[edi+APPDATA.wnd_clientbox.top]
3726
        rol     edx, 16
3766
        rol     edx, 16
3727
        add     dx, word[edi+APPDATA.wnd_clientbox.left]
3767
        add     dx, word[edi+APPDATA.wnd_clientbox.left]
3728
        rol     edx, 16
3768
        rol     edx, 16
-
 
3769
;--------------------------------------
-
 
3770
align 4
3729
  .forced:
3771
.forced:
3730
        push    ebp esi 0
3772
        push    ebp esi 0
3731
        mov     ebp, putimage_get24bpp
3773
        mov     ebp, putimage_get24bpp
3732
        mov     esi, putimage_init24bpp
3774
        mov     esi, putimage_init24bpp
-
 
3775
;--------------------------------------
-
 
3776
align 4
3733
sys_putimage_bpp:
3777
sys_putimage_bpp:
3734
;        call    [disable_mouse] ; this will be done in xxx_putimage
-
 
3735
;        mov     eax, vga_putimage
-
 
3736
;        cmp     [SCR_MODE], word 0x12
-
 
3737
;        jz      @f   ;.doit
-
 
3738
;        mov     eax, vesa12_putimage
-
 
3739
;        cmp     [SCR_MODE], word 0100000000000000b
-
 
3740
;        jae     @f
-
 
3741
;        cmp     [SCR_MODE], word 0x13
-
 
3742
;        jnz     .doit
-
 
3743
;@@:
-
 
3744
        mov     eax, vesa20_putimage
3778
        call    vesa20_putimage
3745
.doit:
-
 
3746
        inc     [mouse_pause]
-
 
3747
        call    eax
-
 
3748
        dec     [mouse_pause]
-
 
3749
        pop     ebp esi ebp
3779
        pop     ebp esi ebp
-
 
3780
        ret
3750
        jmp     [draw_pointer]
3781
;        jmp     [draw_pointer]
-
 
3782
;-----------------------------------------------------------------------------
3751
align 4
3783
align 4
3752
sys_putimage_palette:
3784
sys_putimage_palette:
3753
; ebx = pointer to image
3785
; ebx = pointer to image
3754
; ecx = [xsize]*65536 + [ysize]
3786
; ecx = [xsize]*65536 + [ysize]
3755
; edx = [xstart]*65536 + [ystart]
3787
; edx = [xstart]*65536 + [ystart]
Line 3760... Line 3792...
3760
        shl     eax, 8
3792
        shl     eax, 8
3761
        add     dx, word [eax+SLOT_BASE+APPDATA.wnd_clientbox.top]
3793
        add     dx, word [eax+SLOT_BASE+APPDATA.wnd_clientbox.top]
3762
        rol     edx, 16
3794
        rol     edx, 16
3763
        add     dx, word [eax+SLOT_BASE+APPDATA.wnd_clientbox.left]
3795
        add     dx, word [eax+SLOT_BASE+APPDATA.wnd_clientbox.left]
3764
        rol     edx, 16
3796
        rol     edx, 16
-
 
3797
;--------------------------------------
-
 
3798
align 4
3765
.forced:
3799
.forced:
3766
        cmp     esi, 1
3800
        cmp     esi, 1
3767
        jnz     @f
3801
        jnz     @f
3768
        push    edi
3802
        push    edi
3769
        mov     eax, [edi+4]
3803
        mov     eax, [edi+4]
Line 3774... Line 3808...
3774
        mov     edi, esp
3808
        mov     edi, esp
3775
        call    put_mono_image
3809
        call    put_mono_image
3776
        add     esp, 12
3810
        add     esp, 12
3777
        pop     edi
3811
        pop     edi
3778
        ret
3812
        ret
-
 
3813
;--------------------------------------
-
 
3814
align 4
3779
@@:
3815
@@:
3780
        cmp     esi, 2
3816
        cmp     esi, 2
3781
        jnz     @f
3817
        jnz     @f
3782
        push    edi
3818
        push    edi
3783
        push    0ffffff80h
3819
        push    0ffffff80h
3784
        mov     edi, esp
3820
        mov     edi, esp
3785
        call    put_2bit_image
3821
        call    put_2bit_image
3786
        pop     eax
3822
        pop     eax
3787
        pop     edi
3823
        pop     edi
3788
        ret
3824
        ret
-
 
3825
;--------------------------------------
-
 
3826
align 4
3789
@@:
3827
@@:
3790
        cmp     esi, 4
3828
        cmp     esi, 4
3791
        jnz     @f
3829
        jnz     @f
3792
        push    edi
3830
        push    edi
3793
        push    0ffffff80h
3831
        push    0ffffff80h
3794
        mov     edi, esp
3832
        mov     edi, esp
3795
        call    put_4bit_image
3833
        call    put_4bit_image
3796
        pop     eax
3834
        pop     eax
3797
        pop     edi
3835
        pop     edi
3798
        ret
3836
        ret
-
 
3837
;--------------------------------------
-
 
3838
align 4
3799
@@:
3839
@@:
3800
        push    ebp esi ebp
3840
        push    ebp esi ebp
3801
        cmp     esi, 8
3841
        cmp     esi, 8
3802
        jnz     @f
3842
        jnz     @f
3803
        mov     ebp, putimage_get8bpp
3843
        mov     ebp, putimage_get8bpp
3804
        mov     esi, putimage_init8bpp
3844
        mov     esi, putimage_init8bpp
3805
        jmp     sys_putimage_bpp
3845
        jmp     sys_putimage_bpp
-
 
3846
;--------------------------------------
-
 
3847
align 4
3806
@@:
3848
@@:
3807
        cmp     esi, 15
3849
        cmp     esi, 15
3808
        jnz     @f
3850
        jnz     @f
3809
        mov     ebp, putimage_get15bpp
3851
        mov     ebp, putimage_get15bpp
3810
        mov     esi, putimage_init15bpp
3852
        mov     esi, putimage_init15bpp
3811
        jmp     sys_putimage_bpp
3853
        jmp     sys_putimage_bpp
-
 
3854
;--------------------------------------
-
 
3855
align 4
3812
@@:
3856
@@:
3813
        cmp     esi, 16
3857
        cmp     esi, 16
3814
        jnz     @f
3858
        jnz     @f
3815
        mov     ebp, putimage_get16bpp
3859
        mov     ebp, putimage_get16bpp
3816
        mov     esi, putimage_init16bpp
3860
        mov     esi, putimage_init16bpp
3817
        jmp     sys_putimage_bpp
3861
        jmp     sys_putimage_bpp
-
 
3862
;--------------------------------------
-
 
3863
align 4
3818
@@:
3864
@@:
3819
        cmp     esi, 24
3865
        cmp     esi, 24
3820
        jnz     @f
3866
        jnz     @f
3821
        mov     ebp, putimage_get24bpp
3867
        mov     ebp, putimage_get24bpp
3822
        mov     esi, putimage_init24bpp
3868
        mov     esi, putimage_init24bpp
3823
        jmp     sys_putimage_bpp
3869
        jmp     sys_putimage_bpp
-
 
3870
;--------------------------------------
-
 
3871
align 4
3824
@@:
3872
@@:
3825
        cmp     esi, 32
3873
        cmp     esi, 32
3826
        jnz     @f
3874
        jnz     @f
3827
        mov     ebp, putimage_get32bpp
3875
        mov     ebp, putimage_get32bpp
3828
        mov     esi, putimage_init32bpp
3876
        mov     esi, putimage_init32bpp
3829
        jmp     sys_putimage_bpp
3877
        jmp     sys_putimage_bpp
-
 
3878
;--------------------------------------
-
 
3879
align 4
3830
@@:
3880
@@:
3831
        pop     ebp esi ebp
3881
        pop     ebp esi ebp
3832
        ret
3882
        ret
-
 
3883
;-----------------------------------------------------------------------------
3833
 
3884
align 4
3834
put_mono_image:
3885
put_mono_image:
3835
        push    ebp esi ebp
3886
        push    ebp esi ebp
3836
        mov     ebp, putimage_get1bpp
3887
        mov     ebp, putimage_get1bpp
3837
        mov     esi, putimage_init1bpp
3888
        mov     esi, putimage_init1bpp
3838
        jmp     sys_putimage_bpp
3889
        jmp     sys_putimage_bpp
-
 
3890
;-----------------------------------------------------------------------------
-
 
3891
align 4
3839
put_2bit_image:
3892
put_2bit_image:
3840
        push    ebp esi ebp
3893
        push    ebp esi ebp
3841
        mov     ebp, putimage_get2bpp
3894
        mov     ebp, putimage_get2bpp
3842
        mov     esi, putimage_init2bpp
3895
        mov     esi, putimage_init2bpp
3843
        jmp     sys_putimage_bpp
3896
        jmp     sys_putimage_bpp
-
 
3897
;-----------------------------------------------------------------------------
-
 
3898
align 4
3844
put_4bit_image:
3899
put_4bit_image:
3845
        push    ebp esi ebp
3900
        push    ebp esi ebp
3846
        mov     ebp, putimage_get4bpp
3901
        mov     ebp, putimage_get4bpp
3847
        mov     esi, putimage_init4bpp
3902
        mov     esi, putimage_init4bpp
3848
        jmp     sys_putimage_bpp
3903
        jmp     sys_putimage_bpp
-
 
3904
;-----------------------------------------------------------------------------
3849
 
3905
align 4
3850
putimage_init24bpp:
3906
putimage_init24bpp:
3851
        lea     eax, [eax*3]
3907
        lea     eax, [eax*3]
3852
putimage_init8bpp:
3908
putimage_init8bpp:
3853
        ret
3909
        ret
3854
 
-
 
-
 
3910
;-----------------------------------------------------------------------------
3855
align 16
3911
align 16
3856
putimage_get24bpp:
3912
putimage_get24bpp:
3857
        movzx   eax, byte [esi+2]
3913
        movzx   eax, byte [esi+2]
3858
        shl     eax, 16
3914
        shl     eax, 16
3859
        mov     ax, [esi]
3915
        mov     ax, [esi]
3860
        add     esi, 3
3916
        add     esi, 3
3861
        ret     4
3917
        ret     4
-
 
3918
;-----------------------------------------------------------------------------
3862
align 16
3919
align 16
3863
putimage_get8bpp:
3920
putimage_get8bpp:
3864
        movzx   eax, byte [esi]
3921
        movzx   eax, byte [esi]
3865
        push    edx
3922
        push    edx
3866
        mov     edx, [esp+8]
3923
        mov     edx, [esp+8]
3867
        mov     eax, [edx+eax*4]
3924
        mov     eax, [edx+eax*4]
3868
        pop     edx
3925
        pop     edx
3869
        inc     esi
3926
        inc     esi
3870
        ret     4
3927
        ret     4
-
 
3928
;-----------------------------------------------------------------------------
3871
 
3929
align 4
3872
putimage_init1bpp:
3930
putimage_init1bpp:
3873
        add     eax, ecx
3931
        add     eax, ecx
3874
        push    ecx
3932
        push    ecx
3875
        add     eax, 7
3933
        add     eax, 7
3876
        add     ecx, 7
3934
        add     ecx, 7
3877
        shr     eax, 3
3935
        shr     eax, 3
3878
        shr     ecx, 3
3936
        shr     ecx, 3
3879
        sub     eax, ecx
3937
        sub     eax, ecx
3880
        pop     ecx
3938
        pop     ecx
3881
        ret
3939
        ret
-
 
3940
;-----------------------------------------------------------------------------
3882
align 16
3941
align 16
3883
putimage_get1bpp:
3942
putimage_get1bpp:
3884
        push    edx
3943
        push    edx
3885
        mov     edx, [esp+8]
3944
        mov     edx, [esp+8]
3886
        mov     al, [edx]
3945
        mov     al, [edx]
Line 3893... Line 3952...
3893
        sbb     eax, eax
3952
        sbb     eax, eax
3894
        and     eax, [edx+8]
3953
        and     eax, [edx+8]
3895
        add     eax, [edx+4]
3954
        add     eax, [edx+4]
3896
        pop     edx
3955
        pop     edx
3897
        ret     4
3956
        ret     4
-
 
3957
;-----------------------------------------------------------------------------
3898
 
3958
align 4
3899
putimage_init2bpp:
3959
putimage_init2bpp:
3900
        add     eax, ecx
3960
        add     eax, ecx
3901
        push    ecx
3961
        push    ecx
3902
        add     ecx, 3
3962
        add     ecx, 3
3903
        add     eax, 3
3963
        add     eax, 3
3904
        shr     ecx, 2
3964
        shr     ecx, 2
3905
        shr     eax, 2
3965
        shr     eax, 2
3906
        sub     eax, ecx
3966
        sub     eax, ecx
3907
        pop     ecx
3967
        pop     ecx
3908
        ret
3968
        ret
-
 
3969
;-----------------------------------------------------------------------------
3909
align 16
3970
align 16
3910
putimage_get2bpp:
3971
putimage_get2bpp:
3911
        push    edx
3972
        push    edx
3912
        mov     edx, [esp+8]
3973
        mov     edx, [esp+8]
3913
        mov     al, [edx]
3974
        mov     al, [edx]
Line 3925... Line 3986...
3925
        mov     edx, [edx+4]
3986
        mov     edx, [edx+4]
3926
        movzx   eax, al
3987
        movzx   eax, al
3927
        mov     eax, [edx+eax*4]
3988
        mov     eax, [edx+eax*4]
3928
        pop     edx
3989
        pop     edx
3929
        ret     4
3990
        ret     4
-
 
3991
;-----------------------------------------------------------------------------
3930
 
3992
align 4
3931
putimage_init4bpp:
3993
putimage_init4bpp:
3932
        add     eax, ecx
3994
        add     eax, ecx
3933
        push    ecx
3995
        push    ecx
3934
        add     ecx, 1
3996
        add     ecx, 1
3935
        add     eax, 1
3997
        add     eax, 1
3936
        shr     ecx, 1
3998
        shr     ecx, 1
3937
        shr     eax, 1
3999
        shr     eax, 1
3938
        sub     eax, ecx
4000
        sub     eax, ecx
3939
        pop     ecx
4001
        pop     ecx
3940
        ret
4002
        ret
-
 
4003
;-----------------------------------------------------------------------------
3941
align 16
4004
align 16
3942
putimage_get4bpp:
4005
putimage_get4bpp:
3943
        push    edx
4006
        push    edx
3944
        mov     edx, [esp+8]
4007
        mov     edx, [esp+8]
3945
        add     byte [edx], 80h
4008
        add     byte [edx], 80h
Line 3957... Line 4020...
3957
        shr     eax, 4
4020
        shr     eax, 4
3958
        mov     edx, [edx+4]
4021
        mov     edx, [edx+4]
3959
        mov     eax, [edx+eax*4]
4022
        mov     eax, [edx+eax*4]
3960
        pop     edx
4023
        pop     edx
3961
        ret     4
4024
        ret     4
-
 
4025
;-----------------------------------------------------------------------------
3962
 
4026
align 4
3963
putimage_init32bpp:
4027
putimage_init32bpp:
3964
        shl     eax, 2
4028
        shl     eax, 2
3965
        ret
4029
        ret
-
 
4030
;-----------------------------------------------------------------------------
3966
align 16
4031
align 16
3967
putimage_get32bpp:
4032
putimage_get32bpp:
3968
        lodsd
4033
        lodsd
3969
        ret     4
4034
        ret     4
-
 
4035
;-----------------------------------------------------------------------------
3970
 
4036
align 4
3971
putimage_init15bpp:
4037
putimage_init15bpp:
3972
putimage_init16bpp:
4038
putimage_init16bpp:
3973
        add     eax, eax
4039
        add     eax, eax
3974
        ret
4040
        ret
-
 
4041
;-----------------------------------------------------------------------------
3975
align 16
4042
align 16
3976
putimage_get15bpp:
4043
putimage_get15bpp:
3977
; 0RRRRRGGGGGBBBBB -> 00000000RRRRR000GGGGG000BBBBB000
4044
; 0RRRRRGGGGGBBBBB -> 00000000RRRRR000GGGGG000BBBBB000
3978
        push    ecx edx
4045
        push    ecx edx
3979
        movzx   eax, word [esi]
4046
        movzx   eax, word [esi]
Line 3988... Line 4055...
3988
        shl     edx, 9
4055
        shl     edx, 9
3989
        or      eax, ecx
4056
        or      eax, ecx
3990
        or      eax, edx
4057
        or      eax, edx
3991
        pop     edx ecx
4058
        pop     edx ecx
3992
        ret     4
4059
        ret     4
3993
 
-
 
-
 
4060
;-----------------------------------------------------------------------------
3994
align 16
4061
align 16
3995
putimage_get16bpp:
4062
putimage_get16bpp:
3996
; RRRRRGGGGGGBBBBB -> 00000000RRRRR000GGGGGG00BBBBB000
4063
; RRRRRGGGGGGBBBBB -> 00000000RRRRR000GGGGGG00BBBBB000
3997
        push    ecx edx
4064
        push    ecx edx
3998
        movzx   eax, word [esi]
4065
        movzx   eax, word [esi]
Line 4007... Line 4074...
4007
        shl     edx, 8
4074
        shl     edx, 8
4008
        or      eax, ecx
4075
        or      eax, ecx
4009
        or      eax, edx
4076
        or      eax, edx
4010
        pop     edx ecx
4077
        pop     edx ecx
4011
        ret     4
4078
        ret     4
-
 
4079
;-----------------------------------------------------------------------------
4012
 
4080
;align 4
4013
; eax x beginning
4081
; eax x beginning
4014
; ebx y beginning
4082
; ebx y beginning
4015
; ecx x end
4083
; ecx x end
4016
        ; edx y end
4084
        ; edx y end
4017
; edi color
4085
; edi color
4018
 
-
 
4019
__sys_drawbar:
4086
;__sys_drawbar:
4020
        mov     esi, [current_slot]
4087
;        mov     esi, [current_slot]
4021
        add     eax, [esi+APPDATA.wnd_clientbox.left]
4088
;        add     eax, [esi+APPDATA.wnd_clientbox.left]
4022
        add     ecx, [esi+APPDATA.wnd_clientbox.left]
4089
;        add     ecx, [esi+APPDATA.wnd_clientbox.left]
4023
        add     ebx, [esi+APPDATA.wnd_clientbox.top]
4090
;        add     ebx, [esi+APPDATA.wnd_clientbox.top]
4024
        add     edx, [esi+APPDATA.wnd_clientbox.top]
4091
;        add     edx, [esi+APPDATA.wnd_clientbox.top]
4025
  .forced:
-
 
4026
        inc     [mouse_pause]
-
 
4027
;        call    [disable_mouse]
-
 
4028
;        cmp     [SCR_MODE], word 0x12
4092
;--------------------------------------
4029
;        je      dbv20
4093
;align 4
4030
;   sdbv20:
4094
;.forced:
4031
;        cmp     [SCR_MODE], word 0100000000000000b
-
 
4032
;        jge     dbv20
-
 
4033
;        cmp     [SCR_MODE], word 0x13
-
 
4034
;        je      dbv20
-
 
4035
;        call    vesa12_drawbar
4095
;        call    vesa20_drawbar
4036
;        dec     [mouse_pause]
-
 
4037
;        call    [draw_pointer]
4096
;        call    [draw_pointer]
4038
;        ret
4097
;        ret
4039
;  dbv20:
-
 
4040
        call    vesa20_drawbar
-
 
4041
        dec     [mouse_pause]
-
 
4042
        call    [draw_pointer]
4098
;-----------------------------------------------------------------------------
4043
        ret
4099
align 4
4044
 
-
 
4045
 
-
 
4046
 
-
 
4047
kb_read:
4100
kb_read:
Line 4048... Line 4101...
4048
 
4101
 
Line 4049... Line 4102...
4049
        push    ecx edx
4102
        push    ecx edx
Line 4067... Line 4120...
4067
      kr_exit:
4120
      kr_exit:
Line 4068... Line 4121...
4068
 
4121
 
Line 4069... Line 4122...
4069
        pop     edx ecx
4122
        pop     edx ecx
4070
 
-
 
-
 
4123
 
4071
        ret
4124
        ret
4072
 
4125
;-----------------------------------------------------------------------------
Line 4073... Line 4126...
4073
 
4126
align 4
Line 4074... Line 4127...
4074
kb_write:
4127
kb_write:
Line 4121... Line 4174...
4121
      kw_exit:
4174
      kw_exit:
Line 4122... Line 4175...
4122
 
4175
 
Line 4123... Line 4176...
4123
        pop     edx ecx
4176
        pop     edx ecx
4124
 
-
 
-
 
4177
 
4125
        ret
4178
        ret
4126
 
4179
;-----------------------------------------------------------------------------
Line 4127... Line 4180...
4127
 
4180
align 4
4128
kb_cmd:
4181
kb_cmd:
4129
 
4182
 
Line 4153... Line 4206...
4153
 
4206
 
4154
 
4207
 
Line 4155... Line 4208...
4155
setmouse:  ; set mousepicture -pointer
4208
setmouse:  ; set mousepicture -pointer
Line 4156... Line 4209...
4156
           ; ps2 mouse enable
4209
           ; ps2 mouse enable
Line 4157... Line 4210...
4157
 
4210
 
Line 4458... Line 4511...
4458
        add     ebx, [edx-twdw+WDATA.box.top]
4511
        add     ebx, [edx-twdw+WDATA.box.top]
4459
        mov     edi, [current_slot]
4512
        mov     edi, [current_slot]
4460
        add     eax, [edi+APPDATA.wnd_clientbox.left]
4513
        add     eax, [edi+APPDATA.wnd_clientbox.left]
4461
        add     ebx, [edi+APPDATA.wnd_clientbox.top]
4514
        add     ebx, [edi+APPDATA.wnd_clientbox.top]
4462
        xor     edi, edi ; no force
4515
        xor     edi, edi ; no force
4463
;       mov     edi, 1
-
 
4464
        call    [_display.disable_mouse]
4516
        and     ecx, 0xFBFFFFFF  ;negate 0x04000000 save to mouseunder area
4465
        jmp     [putpixel]
4517
        jmp     [putpixel]
Line 4466... Line 4518...
4466
 
4518
 
Line 4467... Line 4519...
4467
align 4
4519
align 4
Line 4599... Line 4651...
4599
        xor     edx, edx
4651
        xor     edx, edx
4600
        mov     eax, ebx
4652
        mov     eax, ebx
4601
        div     ecx
4653
        div     ecx
4602
        mov     ebx, edx
4654
        mov     ebx, edx
4603
        xchg    eax, ebx
4655
        xchg    eax, ebx
-
 
4656
        and     ecx, 0xFBFFFFFF  ;negate 0x04000000 use mouseunder area
4604
        call    dword [GETPIXEL]; eax - x, ebx - y
4657
        call    dword [GETPIXEL]; eax - x, ebx - y
4605
        mov     [esp + 32], ecx
4658
        mov     [esp + 32], ecx
4606
        ret
4659
        ret
Line 4607... Line 4660...
4607
 
4660
 
Line 4611... Line 4664...
4611
;eax = 36
4664
;eax = 36
4612
;ebx = pointer to bufer for img BBGGRRBBGGRR...
4665
;ebx = pointer to bufer for img BBGGRRBBGGRR...
4613
;ecx = [size x]*65536 + [size y]
4666
;ecx = [size x]*65536 + [size y]
4614
;edx = [start x]*65536 + [start y]
4667
;edx = [start x]*65536 + [start y]
4615
        pushad
4668
        pushad
4616
        inc     [mouse_pause]
-
 
4617
; Check of use of the hardware cursor.
-
 
4618
        cmp     [_display.disable_mouse], __sys_disable_mouse
-
 
4619
        jne     @f
-
 
4620
; Since the test for the coordinates of the mouse should not be used,
-
 
4621
; then use the call [disable_mouse] is not possible!
-
 
4622
        cmp     dword [MOUSE_VISIBLE], dword 0
-
 
4623
        jne     @f
-
 
4624
        pushf
-
 
4625
        cli
-
 
4626
        call    draw_mouse_under
-
 
4627
        popf
-
 
4628
        mov     [MOUSE_VISIBLE], dword 1
-
 
4629
@@:
-
 
4630
        mov     edi, ebx
4669
        mov     edi, ebx
4631
        mov     eax, edx
4670
        mov     eax, edx
4632
        shr     eax, 16
4671
        shr     eax, 16
4633
        mov     ebx, edx
4672
        mov     ebx, edx
4634
        and     ebx, 0xffff
4673
        and     ebx, 0xffff
Line 4661... Line 4700...
4661
        push    ecx edx
4700
        push    ecx edx
4662
.start_x:
4701
.start_x:
4663
        push    eax ebx ecx
4702
        push    eax ebx ecx
4664
        add     eax, ecx
4703
        add     eax, ecx
Line -... Line 4704...
-
 
4704
 
4665
 
4705
        and     ecx, 0xFBFFFFFF  ;negate 0x04000000 use mouseunder area
Line 4666... Line 4706...
4666
        call    dword [GETPIXEL]; eax - x, ebx - y
4706
        call    dword [GETPIXEL]; eax - x, ebx - y
4667
 
4707
 
4668
        mov     [ebp], cx
4708
        mov     [ebp], cx
Line 4675... Line 4715...
4675
        jnz     .start_x
4715
        jnz     .start_x
4676
        pop     edx ecx
4716
        pop     edx ecx
4677
        dec     ebx
4717
        dec     ebx
4678
        dec     edx
4718
        dec     edx
4679
        jnz     .start_y
4719
        jnz     .start_y
4680
        dec     [mouse_pause]
-
 
4681
; Check of use of the hardware cursor.
-
 
4682
        cmp     [_display.disable_mouse], __sys_disable_mouse
-
 
4683
        jne     @f
-
 
4684
        call    [draw_pointer]
-
 
4685
@@:
-
 
4686
        popad
4720
        popad
4687
        ret
4721
        ret
Line 4688... Line 4722...
4688
 
4722