Subversion Repositories Kolibri OS

Rev

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

Rev 1220 Rev 1232
Line 54... Line 54...
54
;;
54
;;
55
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
55
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 56... Line 56...
56
 
56
 
Line 57... Line 57...
57
include 'macros.inc'
57
include 'macros.inc'
Line 58... Line 58...
58
 
58
 
Line 59... Line 59...
59
$Revision: 1220 $
59
$Revision: 1232 $
Line 1150... Line 1150...
1150
     ;!! IP 04.02.2005:
1150
     ;!! IP 04.02.2005:
1151
        mov   byte [DONT_SWITCH], 0 ; change task if possible
1151
        mov   byte [DONT_SWITCH], 0 ; change task if possible
Line 1152... Line 1152...
1152
 
1152
 
Line 1153... Line -...
1153
        ret
-
 
1154
 
-
 
1155
;* mouse centered - start code- Mario79
-
 
1156
mouse_centered:
-
 
1157
        push  eax
-
 
1158
        mov   eax,[Screen_Max_X]
-
 
1159
        shr   eax,1
-
 
1160
        mov   [MOUSE_X],ax
-
 
1161
        mov   eax,[Screen_Max_Y]
-
 
1162
        shr   eax,1
-
 
1163
        mov   [MOUSE_Y],ax
-
 
1164
        pop   eax
-
 
1165
        ret
-
 
1166
;* mouse centered - end code- Mario79
1153
        ret
Line 1167... Line 1154...
1167
 
1154
 
Line 1168... Line 1155...
1168
align 4
1155
align 4
Line 2065... Line 2052...
2065
 
2052
 
2066
;  SAVE ramdisk to /hd/1/menuet.img
2053
;  SAVE ramdisk to /hd/1/menuet.img
2067
;!!!!!!!!!!!!!!!!!!!!!!!!
2054
;!!!!!!!!!!!!!!!!!!!!!!!!
2068
   include 'blkdev/rdsave.inc'
2055
   include 'blkdev/rdsave.inc'
2069
;!!!!!!!!!!!!!!!!!!!!!!!!
2056
;!!!!!!!!!!!!!!!!!!!!!!!!
2070
 
2057
align 4
2071
sysfn_getactive:        ; 18.7 = get active window
2058
sysfn_getactive:        ; 18.7 = get active window
2072
     mov  eax, [TASK_COUNT]
2059
     mov  eax, [TASK_COUNT]
2073
   movzx  eax, word [WIN_POS + eax*2]
2060
   movzx  eax, word [WIN_POS + eax*2]
2074
     mov  [esp+32],eax
2061
     mov  [esp+32],eax
Line 2075... Line 2062...
2075
     ret
2062
     ret
2076
 
2063
 
-
 
2064
sysfn_sound_flag:       ; 18.8 = get/set sound_flag
2077
sysfn_sound_flag:       ; 18.8 = get/set sound_flag
2065
;     cmp  ecx,1
2078
     cmp  ecx,1
2066
     dec  ecx
2079
     jne  nogetsoundflag
2067
     jnz  nogetsoundflag
2080
     movzx  eax,byte [sound_flag] ; get sound_flag
2068
     movzx  eax,byte [sound_flag] ; get sound_flag
2081
     mov  [esp+32],eax
2069
     mov  [esp+32],eax
2082
     ret
2070
     ret
-
 
2071
 nogetsoundflag:
2083
 nogetsoundflag:
2072
;     cmp  ecx,2
2084
     cmp  ecx,2
2073
     dec  ecx
2085
     jnz  nosoundflag
2074
     jnz  nosoundflag
2086
     xor  byte [sound_flag], 1
2075
     xor  byte [sound_flag], 1
Line 2087... Line 2076...
2087
 nosoundflag:
2076
 nosoundflag:
2088
     ret
2077
     ret
2089
 
2078
 
2090
sysfn_minimize:         ; 18.10 = minimize window
2079
sysfn_minimize:         ; 18.10 = minimize window
2091
     mov   [window_minimize],1
2080
     mov   [window_minimize],1
2092
     ret
2081
     ret
-
 
2082
align 4
2093
 
2083
sysfn_getdiskinfo:      ; 18.11 = get disk info table
2094
sysfn_getdiskinfo:      ; 18.11 = get disk info table
2084
;     cmp  ecx,1
2095
     cmp  ecx,1
2085
     dec  ecx
2096
     jnz  full_table
2086
     jnz  full_table
2097
  small_table:
2087
  small_table:
Line 2103... Line 2093...
2103
   for_all_tables:
2093
   for_all_tables:
2104
     mov edi,edx
2094
     mov edi,edx
2105
     mov esi,DRIVE_DATA
2095
     mov esi,DRIVE_DATA
2106
     ret
2096
     ret
2107
  full_table:
2097
  full_table:
2108
     cmp  ecx,2
2098
;     cmp  ecx,2
-
 
2099
     dec  ecx
2109
     jnz  exit_for_anyone
2100
     jnz  exit_for_anyone
2110
     call for_all_tables
2101
     call for_all_tables
2111
     mov ecx,16384
2102
     mov ecx,16384
2112
     cld
2103
     cld
2113
     rep movsd
2104
     rep movsd
Line 2133... Line 2124...
2133
     test al,1000b
2124
     test al,1000b
2134
     jz WaitRetrace_loop
2125
     jz WaitRetrace_loop
2135
     and [esp+32],dword 0
2126
     and [esp+32],dword 0
2136
     ret
2127
     ret
Line -... Line 2128...
-
 
2128
 
2137
 
2129
align 4
-
 
2130
sysfn_centermouse:      ; 18.15 = mouse centered
2138
sysfn_centermouse:      ; 18.15 = mouse centered
2131
; removed here by 
-
 
2132
;     call  mouse_centered
-
 
2133
;* mouse centered - start code- Mario79
-
 
2134
;mouse_centered:
-
 
2135
;        push  eax
2139
     call  mouse_centered
2136
        mov   eax,[Screen_Max_X]
-
 
2137
        shr   eax,1
-
 
2138
        mov   [MOUSE_X],ax
-
 
2139
        mov   eax,[Screen_Max_Y]
-
 
2140
        shr   eax,1
2140
     and [esp+32],dword 0
2141
        mov   [MOUSE_Y],ax
-
 
2142
;        ret
-
 
2143
;* mouse centered - end code- Mario79
-
 
2144
	xor   eax,eax
-
 
2145
        and   [esp+32],eax
Line -... Line 2146...
-
 
2146
;        pop   eax
-
 
2147
 
2141
     ret
2148
     ret
2142
 
2149
align 4
2143
sysfn_mouse_acceleration: ; 18.19 = set/get mouse features
2150
sysfn_mouse_acceleration: ; 18.19 = set/get mouse features
2144
     cmp  ecx,0  ; get mouse speed factor
2151
     test ecx,ecx  ; get mouse speed factor
2145
     jnz  .set_mouse_acceleration
2152
     jnz  .set_mouse_acceleration
2146
     xor  eax,eax
2153
     xor  eax,eax
2147
     mov  ax,[mouse_speed_factor]
2154
     mov  ax,[mouse_speed_factor]
2148
     mov  [esp+32],eax
2155
     mov  [esp+32],eax
2149
     ret
2156
     ret
-
 
2157
 .set_mouse_acceleration:
2150
 .set_mouse_acceleration:
2158
;     cmp  ecx,1  ; set mouse speed factor
2151
     cmp  ecx,1  ; set mouse speed factor
2159
     dec  ecx
2152
     jnz  .get_mouse_delay
2160
     jnz  .get_mouse_delay
2153
     mov  [mouse_speed_factor],dx
2161
     mov  [mouse_speed_factor],dx
2154
     ret
2162
     ret
-
 
2163
 .get_mouse_delay:
2155
 .get_mouse_delay:
2164
;     cmp  ecx,2  ; get mouse delay
2156
     cmp  ecx,2  ; get mouse delay
2165
     dec  ecx
2157
     jnz  .set_mouse_delay
2166
     jnz  .set_mouse_delay
2158
     mov  eax,[mouse_delay]
2167
     mov  eax,[mouse_delay]
2159
     mov  [esp+32],eax
2168
     mov  [esp+32],eax
2160
     ret
2169
     ret
-
 
2170
 .set_mouse_delay:
2161
 .set_mouse_delay:
2171
;     cmp  ecx,3  ; set mouse delay
2162
     cmp  ecx,3  ; set mouse delay
2172
     dec  ecx
2163
     jnz  .set_pointer_position
2173
     jnz  .set_pointer_position
2164
     mov  [mouse_delay],edx
2174
     mov  [mouse_delay],edx
2165
     ret
2175
     ret
-
 
2176
 .set_pointer_position:
2166
 .set_pointer_position:
2177
;     cmp  ecx,4  ; set mouse pointer position
2167
     cmp  ecx,4  ; set mouse pointer position
2178
     dec   ecx
2168
     jnz  .set_mouse_button
2179
     jnz  .set_mouse_button
2169
     mov   [MOUSE_Y],dx    ;y
2180
     mov   [MOUSE_Y],dx    ;y
2170
     ror   edx,16
2181
     ror   edx,16
2171
     mov   [MOUSE_X],dx    ;x
2182
     mov   [MOUSE_X],dx    ;x
2172
     rol   edx,16
2183
     rol   edx,16
2173
     ret
2184
     ret
-
 
2185
 .set_mouse_button:
2174
 .set_mouse_button:
2186
;     cmp   ecx,5  ; set mouse button features
2175
     cmp   ecx,5  ; set mouse button features
2187
     dec   ecx
2176
     jnz  .end
2188
     jnz  .end
2177
     mov   [BTN_DOWN],dl
2189
     mov   [BTN_DOWN],dl
2178
     mov   [mouse_active],1
2190
     mov   [mouse_active],1
Line 2278... Line 2290...
2278
 
2290
 
Line 2279... Line 2291...
2279
sys_background:
2291
sys_background:
2280
 
2292
 
-
 
2293
    cmp   ebx,1                            ; BACKGROUND SIZE
2281
    cmp   ebx,1                            ; BACKGROUND SIZE
2294
    jnz   nosb1
2282
    jnz   nosb1
2295
    test  ecx,ecx
-
 
2296
;    cmp   ecx,0
2283
    cmp   ecx,0
2297
    jz    sbgrr
2284
    je    sbgrr
2298
    test  edx,edx
2285
    cmp   edx,0
2299
;    cmp   edx,0
2286
    je    sbgrr
2300
    jz    sbgrr
2287
@@:
2301
@@:
2288
;;Maxis use atomic bts for mutexes  4.4.2009
2302
;;Maxis use atomic bts for mutexes  4.4.2009
2289
        bts     dword [bgrlock], 0
2303
        bts     dword [bgrlock], 0
Line 3960... Line 3974...
3960
;     add   edi,eax
3974
;     add   edi,eax
Line 3961... Line 3975...
3961
 
3975
 
3962
;     mov   ebx,1
3976
;     mov   ebx,1
Line -... Line 3977...
-
 
3977
;     shl   ebx,cl
3963
;     shl   ebx,cl
3978
 
3964
 
3979
     test  ebp,ebp
Line 3965... Line 3980...
3965
     cmp   ebp,0                ; enable access - ebp = 0
3980
;     cmp   ebp,0                ; enable access - ebp = 0
3966
     jne   siar1
3981
     jnz   siar1
3967
 
3982