Subversion Repositories Kolibri OS

Rev

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

Rev 477 Rev 479
Line 52... Line 52...
52
;;
52
;;
53
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
53
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 54... Line 54...
54
 
54
 
Line 55... Line 55...
55
include 'macros.inc'
55
include 'macros.inc'
Line 56... Line 56...
56
 
56
 
57
$Revision: 477 $
57
$Revision: 479 $
58
 
58
 
Line 581... Line 581...
581
        call   build_scheduler ; sys32.inc
581
        call   build_scheduler ; sys32.inc
Line 582... Line 582...
582
 
582
 
583
        mov    esi,boot_devices
583
        mov    esi,boot_devices
584
        call   boot_log
584
        call   boot_log
-
 
585
        call   detect_devices
Line 585... Line 586...
585
        call   detect_devices
586
        stdcall load_driver, szPS2MDriver
Line 586... Line 587...
586
 
587
 
587
; TIMER SET TO 1/100 S
588
; TIMER SET TO 1/100 S
Line 1765... Line 1766...
1765
     ret
1766
     ret
1766
   ngsyse12:
1767
   ngsyse12:
1767
     mov  [esp+36],dword 1
1768
     mov  [esp+36],dword 1
1768
     ret
1769
     ret
Line -... Line 1770...
-
 
1770
 
-
 
1771
get_timer_ticks:
-
 
1772
    mov eax,[timer_ticks]
-
 
1773
    ret
1769
 
1774
 
1770
iglobal
1775
iglobal
1771
align 4
1776
align 4
1772
mousefn dd msscreen, mswin, msbutton, msset
1777
mousefn dd msscreen, mswin, msbutton, msset
1773
        dd app_load_cursor
1778
        dd app_load_cursor
1774
        dd app_set_cursor
1779
        dd app_set_cursor
-
 
1780
        dd app_delete_cursor
1775
        dd app_delete_cursor
1781
        dd msz
Line 1776... Line 1782...
1776
endg
1782
endg
Line 1777... Line 1783...
1777
 
1783
 
Line 1782... Line 1788...
1782
; eax=2 buttons pressed
1788
; eax=2 buttons pressed
1783
; eax=3 set mouse pos   ; reserved
1789
; eax=3 set mouse pos   ; reserved
1784
; eax=4 load cursor
1790
; eax=4 load cursor
1785
; eax=5 set cursor
1791
; eax=5 set cursor
1786
; eax=6 delete cursor   ; reserved
1792
; eax=6 delete cursor   ; reserved
-
 
1793
; eax=7 get mouse_z
Line 1787... Line 1794...
1787
 
1794
 
1788
           cmp eax, 6
1795
           cmp eax, 7
1789
           ja msset
1796
           ja msset
1790
           jmp [mousefn+eax*4]
1797
           jmp [mousefn+eax*4]
1791
msscreen:
1798
msscreen:
1792
           mov  eax,[MOUSE_X]
1799
           mov  eax,[MOUSE_X]
Line 1814... Line 1821...
1814
           ret
1821
           ret
1815
msbutton:
1822
msbutton:
1816
           movzx eax,byte [BTN_DOWN]
1823
           movzx eax,byte [BTN_DOWN]
1817
           mov  [esp+36],eax
1824
           mov  [esp+36],eax
1818
           ret
1825
           ret
-
 
1826
msz:
-
 
1827
           mov   edi, [TASK_COUNT]
-
 
1828
           movzx edi, word [WIN_POS + edi*2]
-
 
1829
           cmp   edi, [CURRENT_TASK]
-
 
1830
           jne   @f
-
 
1831
           mov   ax,[MOUSE_SCROLL_H]
-
 
1832
           shl   eax,16
-
 
1833
           mov   ax,[MOUSE_SCROLL_V]
-
 
1834
           mov   [esp+36],eax
-
 
1835
           mov   [MOUSE_SCROLL_H],word 0
-
 
1836
           mov   [MOUSE_SCROLL_V],word 0
-
 
1837
           ret
-
 
1838
       @@:
-
 
1839
           mov  [esp+36],dword 0
-
 
1840
           ret
1819
msset:
1841
msset:
1820
           ret
1842
           ret
Line 1821... Line 1843...
1821
 
1843
 
1822
app_load_cursor:
1844
app_load_cursor:
Line 1937... Line 1959...
1937
 
1959
 
1938
 
1960
 
1939
detect_devices:
1961
detect_devices:
1940
;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1962
;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1941
include 'detect/commouse.inc'
1963
include 'detect/commouse.inc'
1942
include 'detect/ps2mouse.inc'
1964
;include 'detect/ps2mouse.inc'
1943
;include 'detect/dev_fd.inc'
1965
;include 'detect/dev_fd.inc'
1944
;include 'detect/dev_hdcd.inc'
1966
;include 'detect/dev_hdcd.inc'
1945
;include 'detect/sear_par.inc'
1967
;include 'detect/sear_par.inc'
Line 2346... Line 2368...
2346
    jbe   nosb2
2368
    jbe   nosb2
2347
    mov   edx,[ebx]
2369
    mov   edx,[ebx]
2348
    and   edx,0xFF000000 ;255*256*256*256
2370
    and   edx,0xFF000000 ;255*256*256*256
2349
    and   ecx,0x00FFFFFF ;255*256*256+255*256+255
2371
    and   ecx,0x00FFFFFF ;255*256*256+255*256+255
2350
    add   edx,ecx
2372
    add   edx,ecx
2351
 
-
 
2352
;    mov   [ebx+IMG_BACKGROUND],edx
2373
    ;mov   [ebx+IMG_BACKGROUND],edx
2353
    push  eax
2374
    push  eax
2354
    mov   eax,[img_background]
2375
    mov   eax,[img_background]
2355
    mov   [ebx+eax],edx
2376
    mov   [ebx+eax],edx
2356
    pop   eax
2377
    pop   eax
Line 2393... Line 2414...
2393
    mov   ecx, edx
2414
    mov   ecx, edx
2394
    call  memmove
2415
    call  memmove
2395
  .fin:
2416
  .fin:
2396
    ret
2417
    ret
2397
  nosb5:
2418
  nosb5:
-
 
2419
 
2398
    ret
2420
    ret
Line -... Line 2421...
-
 
2421
 
2399
 
2422
 
Line 2400... Line 2423...
2400
align 4
2423
align 4
Line 2401... Line 2424...
2401
 
2424
 
Line 3296... Line 3319...
3296
ret
3319
ret
Line 3297... Line 3320...
3297
 
3320
 
3298
wrmsr_instr:
3321
wrmsr_instr:
3299
;now counter in ecx
3322
;now counter in ecx
3300
;(edx:eax) esi:edi => edx:esi
-
 
3301
	; Fast Call MSR can't be destroy
-
 
3302
	; Íî MSR_AMD_EFER ìîæíî èçìåíÿòü, ò.ê. â ýòîì ðåãèñòðå ëèø
-
 
3303
	; âêëþ÷àþòñÿ/âûêëþ÷àþòñÿ ðàñøèðåííûå âîçìîæíîñòè
-
 
3304
	cmp	ecx, MSR_SYSENTER_CS
-
 
3305
	je	@f
-
 
3306
	cmp	ecx, MSR_SYSENTER_ESP
-
 
3307
	je	@f
-
 
3308
	cmp	ecx, MSR_SYSENTER_EIP
-
 
3309
	je	@f
-
 
3310
	cmp	ecx, MSR_AMD_STAR
-
 
3311
	je	@f
-
 
3312
 
3323
;(edx:eax) esi:edi => edx:esi
3313
	mov	eax, esi
3324
mov eax,esi
3314
	wrmsr
3325
wrmsr
-
 
3326
mov [esp+36],eax
3315
@@:
3327
mov [esp+24],edx ;ret in ebx?
Line 3316... Line -...
3316
ret
-
 
3317
 
3328
ret
3318
 
3329
 
3319
cache_disable:
3330
cache_disable:
3320
       mov eax,cr0
3331
       mov eax,cr0
3321
       or  eax,01100000000000000000000000000000b
3332
       or  eax,01100000000000000000000000000000b