Subversion Repositories Kolibri OS

Rev

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

Rev 2268 Rev 2434
Line 65... Line 65...
65
;; on all copies.
65
;; on all copies.
66
;;
66
;;
67
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
67
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 68... Line 68...
68
 
68
 
-
 
69
include 'macros.inc'
Line 69... Line 70...
69
include 'macros.inc'
70
include 'struct.inc'
Line 70... Line 71...
70
 
71
 
Line 71... Line 72...
71
$Revision: 2268 $
72
$Revision: 2434 $
Line 169... Line 170...
169
        cli                             ; disable all irqs
170
        cli                             ; disable all irqs
170
        cld
171
        cld
171
        mov     al,255                  ; mask all irqs
172
        mov     al, 255                 ; mask all irqs
172
        out     0xa1,al
173
        out     0xa1, al
173
        out     0x21,al
174
        out     0x21, al
-
 
175
   l.5:
174
   l.5: in      al, 0x64                ; Enable A20
176
        in      al, 0x64                ; Enable A20
175
        test    al, 2
177
        test    al, 2
176
        jnz     l.5
178
        jnz     l.5
177
        mov     al, 0xD1
179
        mov     al, 0xD1
178
        out     0x64, al
180
        out     0x64, al
-
 
181
   l.6:
179
   l.6: in      al, 0x64
182
        in      al, 0x64
180
        test    al, 2
183
        test    al, 2
181
        jnz     l.6
184
        jnz     l.6
182
        mov     al, 0xDF
185
        mov     al, 0xDF
183
        out     0x60, al
186
        out     0x60, al
-
 
187
   l.7:
184
   l.7: in      al, 0x64
188
        in      al, 0x64
185
        test    al, 2
189
        test    al, 2
186
        jnz     l.7
190
        jnz     l.7
187
        mov     al, 0xFF
191
        mov     al, 0xFF
188
        out     0x64, al
192
        out     0x64, al
Line 368... Line 372...
368
        movzx eax, byte [BOOT_VAR+0x9000]        ; bpp
372
        movzx   eax, byte [BOOT_VAR+0x9000]      ; bpp
369
        mov [ScreenBPP],al
373
        mov     [ScreenBPP], al
Line 370... Line 374...
370
 
374
 
371
        mov [_display.bpp], eax
375
        mov     [_display.bpp], eax
372
        mov [_display.vrefresh], 60
-
 
Line 373... Line 376...
373
        mov [_display.disable_mouse],  __sys_disable_mouse
376
        mov     [_display.vrefresh], 60
374
 
377
 
375
        movzx eax,word [BOOT_VAR+0x900A]  ; X max
378
        movzx   eax, word [BOOT_VAR+0x900A]; X max
376
        mov [_display.width], eax
379
        mov     [_display.width], eax
Line 382... Line 385...
382
        dec   eax
385
        dec     eax
383
        mov   [Screen_Max_Y],eax
386
        mov     [Screen_Max_Y], eax
384
        mov   [screen_workarea.bottom],eax
387
        mov     [screen_workarea.bottom], eax
385
        movzx eax,word [BOOT_VAR+0x9008]  ; screen mode
388
        movzx   eax, word [BOOT_VAR+0x9008]; screen mode
386
        mov   [SCR_MODE],eax
389
        mov     [SCR_MODE], eax
387
        mov   eax,[BOOT_VAR+0x9014]       ; Vesa 1.2 bnk sw add
390
;        mov     eax, [BOOT_VAR+0x9014]    ; Vesa 1.2 bnk sw add
388
        mov   [BANK_SWITCH],eax
391
;        mov     [BANK_SWITCH], eax
389
        mov   [BytesPerScanLine],word 640*4         ; Bytes PerScanLine
392
        mov     [BytesPerScanLine], word 640*4      ; Bytes PerScanLine
390
        cmp   [SCR_MODE],word 0x13          ; 320x200
393
        cmp     [SCR_MODE], word 0x13       ; 320x200
391
        je    @f
394
        je      @f
392
        cmp   [SCR_MODE],word 0x12          ; VGA 640x480
395
        cmp     [SCR_MODE], word 0x12       ; VGA 640x480
393
        je    @f
396
        je      @f
Line 411... Line 414...
411
        mov     eax,[BOOT_VAR+0x9018]
414
        mov     eax, [BOOT_VAR+0x9018]
412
        mov     [LFBAddress],eax
415
        mov     [LFBAddress], eax
Line 413... Line 416...
413
 
416
 
414
        cmp     [SCR_MODE],word 0100000000000000b
417
        cmp     [SCR_MODE], word 0100000000000000b
415
        jge     setvesa20
418
        jge     setvesa20
416
        cmp     [SCR_MODE],word 0x13
419
        cmp     [SCR_MODE], word 0x13  ; EGA 320*200 256 colors
417
        je      v20ga32
-
 
418
        mov     [PUTPIXEL],dword Vesa12_putpixel24  ; Vesa 1.2
-
 
419
        mov     [GETPIXEL],dword Vesa12_getpixel24
-
 
420
        cmp     [ScreenBPP],byte 24
-
 
421
        jz      ga24
-
 
422
        mov     [PUTPIXEL],dword Vesa12_putpixel32
-
 
423
        mov     [GETPIXEL],dword Vesa12_getpixel32
-
 
424
      ga24:
420
        je      v20ga32
-
 
421
        jmp     v20ga24
-
 
422
;        mov     [PUTPIXEL], dword Vesa12_putpixel24 ; Vesa 1.2
-
 
423
;        mov     [GETPIXEL], dword Vesa12_getpixel24
-
 
424
;        cmp     [ScreenBPP], byte 24
-
 
425
;        jz      ga24
-
 
426
;        mov     [PUTPIXEL], dword Vesa12_putpixel32
-
 
427
;        mov     [GETPIXEL], dword Vesa12_getpixel32
-
 
428
;      ga24:
425
        jmp     v20ga24
429
;        jmp     v20ga24
426
      setvesa20:
430
setvesa20:
427
        mov     [PUTPIXEL],dword Vesa20_putpixel24  ; Vesa 2.0
431
        mov     [PUTPIXEL], dword Vesa20_putpixel24 ; Vesa 2.0
428
        mov     [GETPIXEL],dword Vesa20_getpixel24
432
        mov     [GETPIXEL], dword Vesa20_getpixel24
429
        cmp     [ScreenBPP],byte 24
433
        cmp     [ScreenBPP], byte 24
430
        jz      v20ga24
434
        jz      v20ga24
431
      v20ga32:
435
v20ga32:
432
        mov     [PUTPIXEL],dword Vesa20_putpixel32
436
        mov     [PUTPIXEL], dword Vesa20_putpixel32
-
 
437
        mov     [GETPIXEL], dword Vesa20_getpixel32
433
        mov     [GETPIXEL],dword Vesa20_getpixel32
438
        jmp     no_mode_0x12
434
      v20ga24:
439
v20ga24:
435
        cmp     [SCR_MODE],word 0x12                ; 16 C VGA 640x480
440
        cmp     [SCR_MODE], word 0x12               ; 16 C VGA 640x480
436
        jne     no_mode_0x12
441
        jne     no_mode_0x12
437
        mov     [PUTPIXEL],dword VGA_putpixel
442
        mov     [PUTPIXEL], dword VGA_putpixel
Line 560... Line 565...
560
                                 (unpack.lc+unpack.lp)))*4
565
                (unpack.lc+unpack.lp)))*4
Line 561... Line 566...
561
 
566
 
Line 562... Line 567...
562
           mov [unpack.p], eax
567
        mov     [unpack.p], eax
563
 
568
 
564
           call init_events
569
        call    init_events
565
           mov eax, srv.fd-SRV_FD_OFFSET
570
        mov     eax, srv.fd-SRV.fd
Line 566... Line 571...
566
           mov [srv.fd], eax
571
        mov     [srv.fd], eax
567
           mov [srv.bk], eax
572
        mov     [srv.bk], eax
Line 663... Line 668...
663
; LOAD FONTS I and II
668
; LOAD FONTS I and II
Line 664... Line 669...
664
 
669
 
665
        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
666
        stdcall read_file, char2, FONT_II, 0, 2560
675
        mov     [_display.check_m_pixel], check_mouse_area_for_getpixel
667
 
676
 
Line 668... Line 677...
668
        mov   esi,boot_fonts
677
        mov     esi, boot_fonts
669
        call  boot_log
678
        call    boot_log
Line 859... Line 868...
859
  cmp ax,'r1'           ; if not rused ram disk - load network configuration from files {SPraid.simba}
868
        cmp     ax, 'r1'; if not rused ram disk - load network configuration from files {SPraid.simba}
860
  je  no_st_network
869
        je      no_st_network
861
        call set_network_conf
870
        call    set_network_conf
862
  no_st_network:
871
  no_st_network:
Line 863... Line -...
863
 
-
 
864
        xchg bx, bx
-
 
865
        stdcall load_driver, ahci_driver
-
 
866
 
872
 
867
; LOAD FIRST APPLICATION
873
; LOAD FIRST APPLICATION
Line 868... Line 874...
868
        cli
874
        cli
869
 
875
 
Line 983... Line 989...
983
 
989
 
984
; A 'All set - press ESC to start' messages if need
990
; A 'All set - press ESC to start' messages if need
985
if preboot_blogesc
991
if preboot_blogesc
986
        mov     esi, boot_tasking
992
        mov     esi, boot_tasking
-
 
993
        call    boot_log
987
        call    boot_log
994
.bll1:
988
.bll1:  in      al, 0x60        ; wait for ESC key press
995
        in      al, 0x60        ; wait for ESC key press
989
        cmp     al, 129
996
        cmp     al, 129
990
        jne     .bll1
997
        jne     .bll1
Line 991... Line 998...
991
end if
998
end if
Line 1003... Line 1010...
1003
        ; Fly :)
1010
        ; Fly :)
Line 1004... Line 1011...
1004
 
1011
 
1005
include 'unpacker.inc'
1012
include 'unpacker.inc'
Line 1006... Line -...
1006
include 'fdo.inc'
-
 
1007
 
-
 
1008
ahci_driver db 'AHCI',0
1013
include 'fdo.inc'
1009
 
1014
 
1010
align 4
1015
align 4
Line 1011... Line 1016...
1011
boot_log:
1016
boot_log:
Line 1913... Line 1918...
1913
;include 'detect/sear_par.inc'
1918
;include 'detect/sear_par.inc'
1914
;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1919
;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1915
    ret
1920
        ret
Line 1916... Line 1921...
1916
 
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
1917
sys_end:
1945
@@:
1918
 
1946
;--------------------------------------
1919
     mov ecx, [current_slot]
1947
        mov     ecx, [current_slot]
1920
     mov eax, [ecx+APPDATA.tls_base]
1948
        mov     eax, [ecx+APPDATA.tls_base]
Line 1981... Line 2009...
1981
     mov  [shutdown_processes],eax
2009
        mov     [shutdown_processes], eax
1982
     and  dword [esp+32], 0
2010
        and     dword [esp+32], 0
1983
 exit_for_anyone:
2011
 exit_for_anyone:
1984
     ret
2012
        ret
1985
  uglobal
2013
  uglobal
1986
   shutdown_processes: dd 0x0
2014
   shutdown_processes:
-
 
2015
                       dd 0x0
1987
  endg
2016
  endg
1988
;------------------------------------------------------------------------------
2017
;------------------------------------------------------------------------------
1989
sysfn_terminate:        ; 18.2 = TERMINATE
2018
sysfn_terminate:        ; 18.2 = TERMINATE
1990
     cmp  ecx,2
2019
        cmp     ecx, 2
1991
     jb   noprocessterminate
2020
        jb      noprocessterminate
1992
     mov  edx,[TASK_COUNT]
2021
        mov     edx, [TASK_COUNT]
1993
     cmp  ecx,edx
2022
        cmp     ecx, edx
1994
     ja   noprocessterminate
2023
        ja      noprocessterminate
1995
     mov  eax,[TASK_COUNT]
2024
        mov     eax, [TASK_COUNT]
-
 
2025
        push    ecx
1996
     shl  ecx,5
2026
        shl     ecx, 5
1997
     mov  edx,[ecx+CURRENT_TASK+TASKDATA.pid]
2027
        mov     edx, [ecx+CURRENT_TASK+TASKDATA.pid]
1998
     add  ecx,CURRENT_TASK+TASKDATA.state
2028
        add     ecx, CURRENT_TASK+TASKDATA.state
1999
     cmp  byte [ecx], 9
2029
        cmp     byte [ecx], 9
2000
     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
2001
 
2056
;--------------------------------------
2002
     ;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
2003
     mov  [ecx],byte 3       ; clear possible i40's
2058
        mov     [ecx], byte 3; clear possible i40's
Line 2004... Line 2059...
2004
     ;call MEM_Heap_UnLock
2059
     ;call MEM_Heap_UnLock
Line 2782... Line 2837...
2782
 
2837
 
2783
align 4
2838
align 4
2784
sys_clock:
2839
sys_clock:
2785
        cli
2840
        cli
-
 
2841
  ; Mikhail Lisovin  xx Jan 2005
2786
  ; Mikhail Lisovin  xx Jan 2005
2842
  @@:
2787
  @@:   mov   al, 10
2843
        mov     al, 10
2788
        out   0x70, al
2844
        out     0x70, al
2789
        in    al, 0x71
2845
        in      al, 0x71
2790
        test  al, al
2846
        test    al, al
2791
        jns   @f
2847
        jns     @f
Line 2819... Line 2875...
2819
align 4
2875
align 4
Line 2820... Line 2876...
2820
 
2876
 
Line 2821... Line 2877...
2821
sys_date:
2877
sys_date:
-
 
2878
 
2822
 
2879
        cli
2823
        cli
2880
  @@:
2824
  @@:   mov   al, 10
2881
        mov     al, 10
2825
        out   0x70, al
2882
        out     0x70, al
2826
        in    al, 0x71
2883
        in      al, 0x71
2827
        test  al, al
2884
        test    al, al
Line 3072... Line 3129...
3072
 
3129
 
3073
nocpustart:
3130
nocpustart:
3074
    cmp   [mouse_active], 1
3131
        cmp     [mouse_active], 1
3075
    jne   mouse_not_active
3132
        jne     mouse_not_active
-
 
3133
        mov     [mouse_active], 0
3076
    mov   [mouse_active], 0
3134
 
-
 
3135
        xor     edi, edi
-
 
3136
        mov     ebx, CURRENT_TASK
3077
    xor   edi, edi
3137
 
-
 
3138
        mov     ecx, [TASK_COUNT]
-
 
3139
        movzx   eax, word [WIN_POS + ecx*2]     ; active window
-
 
3140
        shl     eax, 8
-
 
3141
        push    eax
-
 
3142
 
-
 
3143
        movzx   eax, word [MOUSE_X]
-
 
3144
        movzx   edx, word [MOUSE_Y]
-
 
3145
 
3078
    mov   ecx,  [TASK_COUNT]
3146
align 4
3079
set_mouse_event:
3147
.set_mouse_event:
-
 
3148
        add     edi, 256
-
 
3149
        add     ebx, 32
-
 
3150
        test    [ebx+TASKDATA.event_mask], 0x80000000
-
 
3151
        jz      .pos_filter
-
 
3152
 
-
 
3153
        cmp     edi, [esp]                      ; skip if filtration active
-
 
3154
        jne     .skip
-
 
3155
 
-
 
3156
.pos_filter:
-
 
3157
        test    [ebx+TASKDATA.event_mask], 0x40000000
-
 
3158
        jz      .set
-
 
3159
 
-
 
3160
        mov     esi, [ebx-twdw+WDATA.box.left]
-
 
3161
        cmp     eax, esi
-
 
3162
        jb      .skip
-
 
3163
        add     esi, [ebx-twdw+WDATA.box.width]
-
 
3164
        cmp     eax, esi
-
 
3165
        ja      .skip
-
 
3166
 
-
 
3167
        mov     esi, [ebx-twdw+WDATA.box.top]
-
 
3168
        cmp     edx, esi
-
 
3169
        jb      .skip
-
 
3170
        add     esi, [ebx-twdw+WDATA.box.height]
-
 
3171
        cmp     edx, esi
-
 
3172
        ja      .skip
3080
    add   edi, 256
3173
.set:
-
 
3174
        or      [edi+SLOT_BASE+APPDATA.event_mask], 100000b
3081
    or    [edi+SLOT_BASE+APPDATA.event_mask], dword 100000b
3175
.skip:
-
 
3176
        loop    .set_mouse_event
-
 
3177
 
Line 3082... Line 3178...
3082
    loop  set_mouse_event
3178
        pop     eax
3083
 
3179
 
3084
mouse_not_active:
3180
mouse_not_active:
3085
    cmp   byte[BACKGROUND_CHANGED], 0
3181
        cmp     byte[BACKGROUND_CHANGED], 0
Line 3135... Line 3231...
3135
    loop  markz
3231
        loop    markz
3136
@@:
3232
@@:
Line 3137... Line 3233...
3137
 
3233
 
Line 3138... Line -...
3138
  no_mark_system_shutdown:
-
 
3139
 
-
 
3140
    call [_display.disable_mouse]
3234
  no_mark_system_shutdown:
3141
 
3235
 
Line 3142... Line 3236...
3142
    dec  byte [SYS_SHUTDOWN]
3236
        dec     byte [SYS_SHUTDOWN]
Line 3332... Line 3426...
3332
        in    al,0x61
3426
        in      al, 0x61
3333
        and   al,0x10
3427
        and     al, 0x10
3334
        mov   ah,al
3428
        mov     ah, al
3335
        cld
3429
        cld
Line -... Line 3430...
-
 
3430
 
3336
 
3431
 cnt1:
3337
 cnt1:  in    al,0x61
3432
        in      al, 0x61
3338
        and   al,0x10
3433
        and     al, 0x10
3339
        cmp   al,ah
3434
        cmp     al, ah
Line 3340... Line 3435...
3340
        jz    cnt1
3435
        jz      cnt1
Line 3345... Line 3440...
3345
        pop   ecx
3440
        pop     ecx
3346
        pop   eax
3441
        pop     eax
Line 3347... Line 3442...
3347
 
3442
 
Line 3348... Line 3443...
3348
        ret
3443
        ret
3349
 
3444
 
3350
 
3445
align 4
-
 
3446
set_app_param:
-
 
3447
        mov     edi, [TASK_BASE]
-
 
3448
        mov     eax, ebx
3351
set_app_param:
3449
        btr     eax, 3                           ; move MOUSE_FILTRATION
3352
        mov     edi, [TASK_BASE]
3450
        mov     ebx, [current_slot]              ; bit into event_filter
3353
        mov     eax, [edi + TASKDATA.event_mask]
3451
        setc    byte [ebx+APPDATA.event_filter]
3354
        mov     [edi + TASKDATA.event_mask], ebx
3452
        xchg    eax, [edi + TASKDATA.event_mask] ; set new event mask
Line 3355... Line 3453...
3355
        mov     [esp+32], eax
3453
        mov     [esp+32], eax                    ; return old mask value
Line 3629... Line 3727...
3629
     jbe   new_port_access_disable
3727
        jbe     new_port_access_disable
3630
no_mask_io:
3728
no_mask_io:
3631
;     popad                         ; end disable io map
3729
;     popad                         ; end disable io map
3632
     xor   eax, eax
3730
        xor     eax, eax
3633
     ret
3731
        ret
3634
 
-
 
3635
 
-
 
-
 
3732
;-----------------------------------------------------------------------------
3636
align 4
3733
align 4
3637
drawbackground:
3734
drawbackground:
3638
       inc   [mouse_pause]
-
 
3639
       cmp   [SCR_MODE],word 0x12
-
 
3640
       je   dbrv20
-
 
3641
     dbrv12:
-
 
3642
       cmp  [SCR_MODE],word 0100000000000000b
-
 
3643
       jge  dbrv20
-
 
3644
       cmp  [SCR_MODE],word 0x13
-
 
3645
       je   dbrv20
-
 
3646
       call  vesa12_drawbackground
-
 
3647
       dec   [mouse_pause]
-
 
3648
       call   [draw_pointer]
-
 
3649
       ret
-
 
3650
     dbrv20:
3735
dbrv20:
3651
       cmp   [BgrDrawMode],dword 1
3736
        cmp     [BgrDrawMode], dword 1
3652
       jne   bgrstr
3737
        jne     bgrstr
3653
       call  vesa20_drawbackground_tiled
3738
        call    vesa20_drawbackground_tiled
3654
       dec   [mouse_pause]
-
 
3655
       call   [draw_pointer]
3739
        call    [draw_pointer]
3656
       ret
3740
        ret
-
 
3741
;--------------------------------------
-
 
3742
align 4
3657
     bgrstr:
3743
bgrstr:
3658
       call  vesa20_drawbackground_stretch
3744
        call    vesa20_drawbackground_stretch
3659
       dec   [mouse_pause]
-
 
3660
       call   [draw_pointer]
3745
        call    [draw_pointer]
3661
       ret
3746
        ret
3662
 
-
 
-
 
3747
;-----------------------------------------------------------------------------
3663
align 4
3748
align 4
3664
 
-
 
3665
syscall_putimage:                       ; PutImage
3749
syscall_putimage:                       ; PutImage
3666
sys_putimage:
3750
sys_putimage:
3667
     test  ecx,0x80008000
3751
        test    ecx, 0x80008000
3668
     jnz   .exit
3752
        jnz     .exit
3669
     test  ecx,0x0000FFFF
3753
        test    ecx, 0x0000FFFF
3670
     jz    .exit
3754
        jz      .exit
3671
     test  ecx,0xFFFF0000
3755
        test    ecx, 0xFFFF0000
3672
     jnz   @f
3756
        jnz     @f
-
 
3757
;--------------------------------------
-
 
3758
align 4
3673
  .exit:
3759
.exit:
3674
     ret
3760
        ret
-
 
3761
;--------------------------------------
-
 
3762
align 4
3675
 @@:
3763
@@:
3676
        mov     edi,[current_slot]
3764
        mov     edi, [current_slot]
3677
        add     dx,word[edi+APPDATA.wnd_clientbox.top]
3765
        add     dx, word[edi+APPDATA.wnd_clientbox.top]
3678
        rol     edx,16
3766
        rol     edx, 16
3679
        add     dx,word[edi+APPDATA.wnd_clientbox.left]
3767
        add     dx, word[edi+APPDATA.wnd_clientbox.left]
3680
        rol     edx,16
3768
        rol     edx, 16
-
 
3769
;--------------------------------------
-
 
3770
align 4
3681
  .forced:
3771
.forced:
3682
        push    ebp esi 0
3772
        push    ebp esi 0
3683
        mov     ebp, putimage_get24bpp
3773
        mov     ebp, putimage_get24bpp
3684
        mov     esi, putimage_init24bpp
3774
        mov     esi, putimage_init24bpp
-
 
3775
;--------------------------------------
-
 
3776
align 4
3685
sys_putimage_bpp:
3777
sys_putimage_bpp:
3686
;        call    [disable_mouse] ; this will be done in xxx_putimage
-
 
3687
;        mov     eax, vga_putimage
-
 
3688
        cmp     [SCR_MODE], word 0x12
-
 
3689
        jz      @f   ;.doit
-
 
3690
        mov     eax, vesa12_putimage
-
 
3691
        cmp     [SCR_MODE], word 0100000000000000b
-
 
3692
        jae     @f
-
 
3693
        cmp     [SCR_MODE], word 0x13
-
 
3694
        jnz     .doit
-
 
3695
@@:
-
 
3696
        mov     eax, vesa20_putimage
3778
        call    vesa20_putimage
3697
.doit:
-
 
3698
        inc     [mouse_pause]
-
 
3699
        call    eax
-
 
3700
        dec     [mouse_pause]
-
 
3701
        pop     ebp esi ebp
3779
        pop     ebp esi ebp
-
 
3780
        ret
3702
        jmp     [draw_pointer]
3781
;        jmp     [draw_pointer]
-
 
3782
;-----------------------------------------------------------------------------
3703
align 4
3783
align 4
3704
sys_putimage_palette:
3784
sys_putimage_palette:
3705
; ebx = pointer to image
3785
; ebx = pointer to image
3706
; ecx = [xsize]*65536 + [ysize]
3786
; ecx = [xsize]*65536 + [ysize]
3707
; edx = [xstart]*65536 + [ystart]
3787
; edx = [xstart]*65536 + [ystart]
Line 3712... Line 3792...
3712
        shl     eax, 8
3792
        shl     eax, 8
3713
        add     dx, word [eax+SLOT_BASE+APPDATA.wnd_clientbox.top]
3793
        add     dx, word [eax+SLOT_BASE+APPDATA.wnd_clientbox.top]
3714
        rol     edx, 16
3794
        rol     edx, 16
3715
        add     dx, word [eax+SLOT_BASE+APPDATA.wnd_clientbox.left]
3795
        add     dx, word [eax+SLOT_BASE+APPDATA.wnd_clientbox.left]
3716
        rol     edx, 16
3796
        rol     edx, 16
-
 
3797
;--------------------------------------
-
 
3798
align 4
3717
.forced:
3799
.forced:
3718
        cmp     esi, 1
3800
        cmp     esi, 1
3719
        jnz     @f
3801
        jnz     @f
3720
        push    edi
3802
        push    edi
3721
        mov     eax, [edi+4]
3803
        mov     eax, [edi+4]
Line 3726... Line 3808...
3726
        mov     edi, esp
3808
        mov     edi, esp
3727
        call    put_mono_image
3809
        call    put_mono_image
3728
        add     esp, 12
3810
        add     esp, 12
3729
        pop     edi
3811
        pop     edi
3730
        ret
3812
        ret
-
 
3813
;--------------------------------------
-
 
3814
align 4
3731
@@:
3815
@@:
3732
        cmp     esi, 2
3816
        cmp     esi, 2
3733
        jnz     @f
3817
        jnz     @f
3734
        push    edi
3818
        push    edi
3735
        push    0ffffff80h
3819
        push    0ffffff80h
3736
        mov     edi, esp
3820
        mov     edi, esp
3737
        call    put_2bit_image
3821
        call    put_2bit_image
3738
        pop     eax
3822
        pop     eax
3739
        pop     edi
3823
        pop     edi
3740
        ret
3824
        ret
-
 
3825
;--------------------------------------
-
 
3826
align 4
3741
@@:
3827
@@:
3742
        cmp     esi, 4
3828
        cmp     esi, 4
3743
        jnz     @f
3829
        jnz     @f
3744
        push    edi
3830
        push    edi
3745
        push    0ffffff80h
3831
        push    0ffffff80h
3746
        mov     edi, esp
3832
        mov     edi, esp
3747
        call    put_4bit_image
3833
        call    put_4bit_image
3748
        pop     eax
3834
        pop     eax
3749
        pop     edi
3835
        pop     edi
3750
        ret
3836
        ret
-
 
3837
;--------------------------------------
-
 
3838
align 4
3751
@@:
3839
@@:
3752
        push    ebp esi ebp
3840
        push    ebp esi ebp
3753
        cmp     esi, 8
3841
        cmp     esi, 8
3754
        jnz     @f
3842
        jnz     @f
3755
        mov     ebp, putimage_get8bpp
3843
        mov     ebp, putimage_get8bpp
3756
        mov     esi, putimage_init8bpp
3844
        mov     esi, putimage_init8bpp
3757
        jmp     sys_putimage_bpp
3845
        jmp     sys_putimage_bpp
-
 
3846
;--------------------------------------
-
 
3847
align 4
3758
@@:
3848
@@:
3759
        cmp     esi, 15
3849
        cmp     esi, 15
3760
        jnz     @f
3850
        jnz     @f
3761
        mov     ebp, putimage_get15bpp
3851
        mov     ebp, putimage_get15bpp
3762
        mov     esi, putimage_init15bpp
3852
        mov     esi, putimage_init15bpp
3763
        jmp     sys_putimage_bpp
3853
        jmp     sys_putimage_bpp
-
 
3854
;--------------------------------------
-
 
3855
align 4
3764
@@:
3856
@@:
3765
        cmp     esi, 16
3857
        cmp     esi, 16
3766
        jnz     @f
3858
        jnz     @f
3767
        mov     ebp, putimage_get16bpp
3859
        mov     ebp, putimage_get16bpp
3768
        mov     esi, putimage_init16bpp
3860
        mov     esi, putimage_init16bpp
3769
        jmp     sys_putimage_bpp
3861
        jmp     sys_putimage_bpp
-
 
3862
;--------------------------------------
-
 
3863
align 4
3770
@@:
3864
@@:
3771
        cmp     esi, 24
3865
        cmp     esi, 24
3772
        jnz     @f
3866
        jnz     @f
3773
        mov     ebp, putimage_get24bpp
3867
        mov     ebp, putimage_get24bpp
3774
        mov     esi, putimage_init24bpp
3868
        mov     esi, putimage_init24bpp
3775
        jmp     sys_putimage_bpp
3869
        jmp     sys_putimage_bpp
-
 
3870
;--------------------------------------
-
 
3871
align 4
3776
@@:
3872
@@:
3777
        cmp     esi, 32
3873
        cmp     esi, 32
3778
        jnz     @f
3874
        jnz     @f
3779
        mov     ebp, putimage_get32bpp
3875
        mov     ebp, putimage_get32bpp
3780
        mov     esi, putimage_init32bpp
3876
        mov     esi, putimage_init32bpp
3781
        jmp     sys_putimage_bpp
3877
        jmp     sys_putimage_bpp
-
 
3878
;--------------------------------------
-
 
3879
align 4
3782
@@:
3880
@@:
3783
        pop     ebp esi ebp
3881
        pop     ebp esi ebp
3784
        ret
3882
        ret
-
 
3883
;-----------------------------------------------------------------------------
3785
 
3884
align 4
3786
put_mono_image:
3885
put_mono_image:
3787
        push    ebp esi ebp
3886
        push    ebp esi ebp
3788
        mov     ebp, putimage_get1bpp
3887
        mov     ebp, putimage_get1bpp
3789
        mov     esi, putimage_init1bpp
3888
        mov     esi, putimage_init1bpp
3790
        jmp     sys_putimage_bpp
3889
        jmp     sys_putimage_bpp
-
 
3890
;-----------------------------------------------------------------------------
-
 
3891
align 4
3791
put_2bit_image:
3892
put_2bit_image:
3792
        push    ebp esi ebp
3893
        push    ebp esi ebp
3793
        mov     ebp, putimage_get2bpp
3894
        mov     ebp, putimage_get2bpp
3794
        mov     esi, putimage_init2bpp
3895
        mov     esi, putimage_init2bpp
3795
        jmp     sys_putimage_bpp
3896
        jmp     sys_putimage_bpp
-
 
3897
;-----------------------------------------------------------------------------
-
 
3898
align 4
3796
put_4bit_image:
3899
put_4bit_image:
3797
        push    ebp esi ebp
3900
        push    ebp esi ebp
3798
        mov     ebp, putimage_get4bpp
3901
        mov     ebp, putimage_get4bpp
3799
        mov     esi, putimage_init4bpp
3902
        mov     esi, putimage_init4bpp
3800
        jmp     sys_putimage_bpp
3903
        jmp     sys_putimage_bpp
-
 
3904
;-----------------------------------------------------------------------------
3801
 
3905
align 4
3802
putimage_init24bpp:
3906
putimage_init24bpp:
3803
        lea     eax, [eax*3]
3907
        lea     eax, [eax*3]
3804
putimage_init8bpp:
3908
putimage_init8bpp:
3805
        ret
3909
        ret
3806
 
-
 
-
 
3910
;-----------------------------------------------------------------------------
3807
align 16
3911
align 16
3808
putimage_get24bpp:
3912
putimage_get24bpp:
3809
        movzx   eax, byte [esi+2]
3913
        movzx   eax, byte [esi+2]
3810
        shl     eax, 16
3914
        shl     eax, 16
3811
        mov     ax, [esi]
3915
        mov     ax, [esi]
3812
        add     esi, 3
3916
        add     esi, 3
3813
        ret     4
3917
        ret     4
-
 
3918
;-----------------------------------------------------------------------------
3814
align 16
3919
align 16
3815
putimage_get8bpp:
3920
putimage_get8bpp:
3816
        movzx   eax, byte [esi]
3921
        movzx   eax, byte [esi]
3817
        push    edx
3922
        push    edx
3818
        mov     edx, [esp+8]
3923
        mov     edx, [esp+8]
3819
        mov     eax, [edx+eax*4]
3924
        mov     eax, [edx+eax*4]
3820
        pop     edx
3925
        pop     edx
3821
        inc     esi
3926
        inc     esi
3822
        ret     4
3927
        ret     4
-
 
3928
;-----------------------------------------------------------------------------
3823
 
3929
align 4
3824
putimage_init1bpp:
3930
putimage_init1bpp:
3825
        add     eax, ecx
3931
        add     eax, ecx
3826
        push    ecx
3932
        push    ecx
3827
        add     eax, 7
3933
        add     eax, 7
3828
        add     ecx, 7
3934
        add     ecx, 7
3829
        shr     eax, 3
3935
        shr     eax, 3
3830
        shr     ecx, 3
3936
        shr     ecx, 3
3831
        sub     eax, ecx
3937
        sub     eax, ecx
3832
        pop     ecx
3938
        pop     ecx
3833
        ret
3939
        ret
-
 
3940
;-----------------------------------------------------------------------------
3834
align 16
3941
align 16
3835
putimage_get1bpp:
3942
putimage_get1bpp:
3836
        push    edx
3943
        push    edx
3837
        mov     edx, [esp+8]
3944
        mov     edx, [esp+8]
3838
        mov     al, [edx]
3945
        mov     al, [edx]
Line 3845... Line 3952...
3845
        sbb     eax, eax
3952
        sbb     eax, eax
3846
        and     eax, [edx+8]
3953
        and     eax, [edx+8]
3847
        add     eax, [edx+4]
3954
        add     eax, [edx+4]
3848
        pop     edx
3955
        pop     edx
3849
        ret     4
3956
        ret     4
-
 
3957
;-----------------------------------------------------------------------------
3850
 
3958
align 4
3851
putimage_init2bpp:
3959
putimage_init2bpp:
3852
        add     eax, ecx
3960
        add     eax, ecx
3853
        push    ecx
3961
        push    ecx
3854
        add     ecx, 3
3962
        add     ecx, 3
3855
        add     eax, 3
3963
        add     eax, 3
3856
        shr     ecx, 2
3964
        shr     ecx, 2
3857
        shr     eax, 2
3965
        shr     eax, 2
3858
        sub     eax, ecx
3966
        sub     eax, ecx
3859
        pop     ecx
3967
        pop     ecx
3860
        ret
3968
        ret
-
 
3969
;-----------------------------------------------------------------------------
3861
align 16
3970
align 16
3862
putimage_get2bpp:
3971
putimage_get2bpp:
3863
        push    edx
3972
        push    edx
3864
        mov     edx, [esp+8]
3973
        mov     edx, [esp+8]
3865
        mov     al, [edx]
3974
        mov     al, [edx]
Line 3877... Line 3986...
3877
        mov     edx, [edx+4]
3986
        mov     edx, [edx+4]
3878
        movzx   eax, al
3987
        movzx   eax, al
3879
        mov     eax, [edx+eax*4]
3988
        mov     eax, [edx+eax*4]
3880
        pop     edx
3989
        pop     edx
3881
        ret     4
3990
        ret     4
-
 
3991
;-----------------------------------------------------------------------------
3882
 
3992
align 4
3883
putimage_init4bpp:
3993
putimage_init4bpp:
3884
        add     eax, ecx
3994
        add     eax, ecx
3885
        push    ecx
3995
        push    ecx
3886
        add     ecx, 1
3996
        add     ecx, 1
3887
        add     eax, 1
3997
        add     eax, 1
3888
        shr     ecx, 1
3998
        shr     ecx, 1
3889
        shr     eax, 1
3999
        shr     eax, 1
3890
        sub     eax, ecx
4000
        sub     eax, ecx
3891
        pop     ecx
4001
        pop     ecx
3892
        ret
4002
        ret
-
 
4003
;-----------------------------------------------------------------------------
3893
align 16
4004
align 16
3894
putimage_get4bpp:
4005
putimage_get4bpp:
3895
        push    edx
4006
        push    edx
3896
        mov     edx, [esp+8]
4007
        mov     edx, [esp+8]
3897
        add     byte [edx], 80h
4008
        add     byte [edx], 80h
Line 3909... Line 4020...
3909
        shr     eax, 4
4020
        shr     eax, 4
3910
        mov     edx, [edx+4]
4021
        mov     edx, [edx+4]
3911
        mov     eax, [edx+eax*4]
4022
        mov     eax, [edx+eax*4]
3912
        pop     edx
4023
        pop     edx
3913
        ret     4
4024
        ret     4
-
 
4025
;-----------------------------------------------------------------------------
3914
 
4026
align 4
3915
putimage_init32bpp:
4027
putimage_init32bpp:
3916
        shl     eax, 2
4028
        shl     eax, 2
3917
        ret
4029
        ret
-
 
4030
;-----------------------------------------------------------------------------
3918
align 16
4031
align 16
3919
putimage_get32bpp:
4032
putimage_get32bpp:
3920
        lodsd
4033
        lodsd
3921
        ret     4
4034
        ret     4
-
 
4035
;-----------------------------------------------------------------------------
3922
 
4036
align 4
3923
putimage_init15bpp:
4037
putimage_init15bpp:
3924
putimage_init16bpp:
4038
putimage_init16bpp:
3925
        add     eax, eax
4039
        add     eax, eax
3926
        ret
4040
        ret
-
 
4041
;-----------------------------------------------------------------------------
3927
align 16
4042
align 16
3928
putimage_get15bpp:
4043
putimage_get15bpp:
3929
; 0RRRRRGGGGGBBBBB -> 00000000RRRRR000GGGGG000BBBBB000
4044
; 0RRRRRGGGGGBBBBB -> 00000000RRRRR000GGGGG000BBBBB000
3930
        push    ecx edx
4045
        push    ecx edx
3931
        movzx   eax, word [esi]
4046
        movzx   eax, word [esi]
Line 3940... Line 4055...
3940
        shl     edx, 9
4055
        shl     edx, 9
3941
        or      eax, ecx
4056
        or      eax, ecx
3942
        or      eax, edx
4057
        or      eax, edx
3943
        pop     edx ecx
4058
        pop     edx ecx
3944
        ret     4
4059
        ret     4
3945
 
-
 
-
 
4060
;-----------------------------------------------------------------------------
3946
align 16
4061
align 16
3947
putimage_get16bpp:
4062
putimage_get16bpp:
3948
; RRRRRGGGGGGBBBBB -> 00000000RRRRR000GGGGGG00BBBBB000
4063
; RRRRRGGGGGGBBBBB -> 00000000RRRRR000GGGGGG00BBBBB000
3949
        push    ecx edx
4064
        push    ecx edx
3950
        movzx   eax, word [esi]
4065
        movzx   eax, word [esi]
Line 3959... Line 4074...
3959
        shl     edx, 8
4074
        shl     edx, 8
3960
        or      eax, ecx
4075
        or      eax, ecx
3961
        or      eax, edx
4076
        or      eax, edx
3962
        pop     edx ecx
4077
        pop     edx ecx
3963
        ret     4
4078
        ret     4
-
 
4079
;-----------------------------------------------------------------------------
3964
 
4080
;align 4
3965
; eax x beginning
4081
; eax x beginning
3966
; ebx y beginning
4082
; ebx y beginning
3967
; ecx x end
4083
; ecx x end
3968
        ; edx y end
4084
        ; edx y end
3969
; edi color
4085
; edi color
3970
 
-
 
3971
__sys_drawbar:
4086
;__sys_drawbar:
3972
        mov     esi,[current_slot]
4087
;        mov     esi, [current_slot]
3973
        add     eax,[esi+APPDATA.wnd_clientbox.left]
4088
;        add     eax, [esi+APPDATA.wnd_clientbox.left]
3974
        add     ecx,[esi+APPDATA.wnd_clientbox.left]
4089
;        add     ecx, [esi+APPDATA.wnd_clientbox.left]
3975
        add     ebx,[esi+APPDATA.wnd_clientbox.top]
4090
;        add     ebx, [esi+APPDATA.wnd_clientbox.top]
3976
        add     edx,[esi+APPDATA.wnd_clientbox.top]
4091
;        add     edx, [esi+APPDATA.wnd_clientbox.top]
3977
  .forced:
-
 
3978
    inc   [mouse_pause]
-
 
3979
;        call    [disable_mouse]
4092
;--------------------------------------
3980
    cmp   [SCR_MODE],word 0x12
-
 
3981
    je   dbv20
4093
;align 4
3982
   sdbv20:
4094
;.forced:
3983
    cmp  [SCR_MODE],word 0100000000000000b
-
 
3984
    jge  dbv20
-
 
3985
    cmp  [SCR_MODE],word 0x13
-
 
3986
    je   dbv20
-
 
3987
    call vesa12_drawbar
4095
;        call    vesa20_drawbar
3988
    dec   [mouse_pause]
-
 
3989
    call   [draw_pointer]
4096
;        call    [draw_pointer]
3990
    ret
4097
;        ret
3991
  dbv20:
-
 
3992
    call vesa20_drawbar
-
 
3993
    dec   [mouse_pause]
-
 
3994
    call   [draw_pointer]
4098
;-----------------------------------------------------------------------------
3995
    ret
4099
align 4
3996
 
-
 
3997
 
-
 
3998
 
-
 
3999
kb_read:
4100
kb_read:
Line 4000... Line 4101...
4000
 
4101
 
Line 4001... Line 4102...
4001
        push    ecx edx
4102
        push    ecx edx
Line 4019... Line 4120...
4019
      kr_exit:
4120
      kr_exit:
Line 4020... Line 4121...
4020
 
4121
 
Line 4021... Line 4122...
4021
        pop     edx ecx
4122
        pop     edx ecx
4022
 
-
 
-
 
4123
 
4023
        ret
4124
        ret
4024
 
4125
;-----------------------------------------------------------------------------
Line 4025... Line 4126...
4025
 
4126
align 4
Line 4026... Line 4127...
4026
kb_write:
4127
kb_write:
Line 4073... Line 4174...
4073
      kw_exit:
4174
      kw_exit:
Line 4074... Line 4175...
4074
 
4175
 
Line 4075... Line 4176...
4075
        pop     edx ecx
4176
        pop     edx ecx
4076
 
-
 
-
 
4177
 
4077
        ret
4178
        ret
4078
 
4179
;-----------------------------------------------------------------------------
Line 4079... Line 4180...
4079
 
4180
align 4
4080
kb_cmd:
4181
kb_cmd:
4081
 
4182
 
Line 4105... Line 4206...
4105
 
4206
 
4106
 
4207
 
Line 4107... Line 4208...
4107
setmouse:  ; set mousepicture -pointer
4208
setmouse:  ; set mousepicture -pointer
Line 4108... Line 4209...
4108
           ; ps2 mouse enable
4209
           ; ps2 mouse enable
Line 4109... Line 4210...
4109
 
4210
 
Line 4181... Line 4282...
4181
        loop    @b
4282
        loop    @b
4182
        popad
4283
        popad
4183
        ret
4284
        ret
Line 4184... Line 4285...
4184
 
4285
 
-
 
4286
uglobal
4185
uglobal
4287
  msg_board_data:
4186
  msg_board_data: times 4096 db 0
4288
                  times 4096 db 0
4187
  msg_board_count dd 0x0
4289
  msg_board_count dd 0x0
Line 4188... Line 4290...
4188
endg
4290
endg
Line 4409... Line 4511...
4409
        add     ebx, [edx-twdw+WDATA.box.top]
4511
        add     ebx, [edx-twdw+WDATA.box.top]
4410
        mov     edi, [current_slot]
4512
        mov     edi, [current_slot]
4411
        add     eax, [edi+APPDATA.wnd_clientbox.left]
4513
        add     eax, [edi+APPDATA.wnd_clientbox.left]
4412
        add     ebx, [edi+APPDATA.wnd_clientbox.top]
4514
        add     ebx, [edi+APPDATA.wnd_clientbox.top]
4413
        xor     edi, edi ; no force
4515
        xor     edi, edi ; no force
4414
;       mov     edi, 1
-
 
4415
        call    [_display.disable_mouse]
4516
        and     ecx, 0xFBFFFFFF  ;negate 0x04000000 save to mouseunder area
4416
        jmp     [putpixel]
4517
        jmp     [putpixel]
Line 4417... Line 4518...
4417
 
4518
 
Line 4418... Line 4519...
4418
align 4
4519
align 4
Line 4550... Line 4651...
4550
     xor   edx, edx
4651
        xor     edx, edx
4551
     mov   eax, ebx
4652
        mov     eax, ebx
4552
     div   ecx
4653
        div     ecx
4553
     mov   ebx, edx
4654
        mov     ebx, edx
4554
     xchg  eax, ebx
4655
        xchg    eax, ebx
-
 
4656
        and     ecx, 0xFBFFFFFF  ;negate 0x04000000 use mouseunder area
4555
     call  dword [GETPIXEL] ; eax - x, ebx - y
4657
        call    dword [GETPIXEL]; eax - x, ebx - y
4556
     mov   [esp + 32], ecx
4658
        mov     [esp + 32], ecx
4557
     ret
4659
        ret
Line 4558... Line 4660...
4558
 
4660
 
Line 4562... Line 4664...
4562
;eax = 36
4664
;eax = 36
4563
;ebx = pointer to bufer for img BBGGRRBBGGRR...
4665
;ebx = pointer to bufer for img BBGGRRBBGGRR...
4564
;ecx = [size x]*65536 + [size y]
4666
;ecx = [size x]*65536 + [size y]
4565
;edx = [start x]*65536 + [start y]
4667
;edx = [start x]*65536 + [start y]
4566
     pushad
4668
        pushad
4567
         inc   [mouse_pause]
-
 
4568
; Check of use of the hardware cursor.
-
 
4569
      cmp  [_display.disable_mouse],__sys_disable_mouse
-
 
4570
          jne  @f
-
 
4571
; Since the test for the coordinates of the mouse should not be used,
-
 
4572
; then use the call [disable_mouse] is not possible!
-
 
4573
      cmp  dword [MOUSE_VISIBLE],dword 0
-
 
4574
      jne  @f
-
 
4575
      pushf
-
 
4576
      cli
-
 
4577
      call draw_mouse_under
-
 
4578
      popf
-
 
4579
      mov  [MOUSE_VISIBLE],dword 1
-
 
4580
@@:
-
 
4581
     mov   edi,ebx
4669
        mov     edi, ebx
4582
     mov   eax,edx
4670
        mov     eax, edx
4583
     shr   eax,16
4671
        shr     eax, 16
4584
     mov   ebx,edx
4672
        mov     ebx, edx
4585
     and   ebx,0xffff
4673
        and     ebx, 0xffff
Line 4612... Line 4700...
4612
     push  ecx edx
4700
        push    ecx edx
4613
.start_x:
4701
.start_x:
4614
     push  eax ebx ecx
4702
        push    eax ebx ecx
4615
     add   eax,ecx
4703
        add     eax, ecx
Line -... Line 4704...
-
 
4704
 
4616
 
4705
        and     ecx, 0xFBFFFFFF  ;negate 0x04000000 use mouseunder area
Line 4617... Line 4706...
4617
     call  dword [GETPIXEL] ; eax - x, ebx - y
4706
        call    dword [GETPIXEL]; eax - x, ebx - y
4618
 
4707
 
4619
     mov   [ebp],cx
4708
        mov     [ebp], cx
Line 4626... Line 4715...
4626
     jnz   .start_x
4715
        jnz     .start_x
4627
         pop   edx ecx
4716
        pop     edx ecx
4628
         dec   ebx
4717
        dec     ebx
4629
     dec   edx
4718
        dec     edx
4630
     jnz   .start_y
4719
        jnz     .start_y
4631
     dec        [mouse_pause]
-
 
4632
; Check of use of the hardware cursor.
-
 
4633
      cmp  [_display.disable_mouse],__sys_disable_mouse
-
 
4634
          jne  @f
-
 
4635
         call  [draw_pointer]
-
 
4636
@@:
-
 
4637
     popad
4720
        popad
4638
     ret
4721
        ret
Line 4639... Line 4722...
4639
 
4722