867,18 → 867,18 |
; LOAD FIRST APPLICATION |
cli |
|
cmp byte [BOOT_VAR+0x9030],1 |
jne no_load_vrr_m |
; cmp byte [BOOT_VAR+0x9030],1 |
; jne no_load_vrr_m |
|
mov ebp, vrr_m |
call fs_execute_from_sysdir |
; mov ebp, vrr_m |
; call fs_execute_from_sysdir |
; |
;; cmp eax,2 ; if vrr_m app found (PID=2) |
; sub eax,2 |
; jz first_app_found |
; |
;no_load_vrr_m: |
|
; cmp eax,2 ; if vrr_m app found (PID=2) |
sub eax,2 |
jz first_app_found |
|
no_load_vrr_m: |
|
mov ebp, firstapp |
call fs_execute_from_sysdir |
|
1935,7 → 1935,7 |
iglobal |
align 4 |
sys_system_table: |
dd exit_for_anyone ; 1 = obsolete |
dd sysfn_deactivate ; 1 = deactivate window |
dd sysfn_terminate ; 2 = terminate thread |
dd sysfn_activate ; 3 = activate window |
dd sysfn_getidletime ; 4 = get idle time |
1960,7 → 1960,7 |
dd sysfn_min_rest_window ; 22 = minimize and restore any window |
sysfn_num = ($ - sys_system_table)/4 |
endg |
|
;------------------------------------------------------------------------------ |
sys_system: |
dec ebx |
cmp ebx, sysfn_num |
1968,8 → 1968,7 |
jmp dword [sys_system_table + ebx*4] |
@@: |
ret |
|
|
;------------------------------------------------------------------------------ |
sysfn_shutdown: ; 18.9 = system shutdown |
cmp ecx,1 |
jl exit_for_anyone |
1986,7 → 1985,7 |
uglobal |
shutdown_processes: dd 0x0 |
endg |
|
;------------------------------------------------------------------------------ |
sysfn_terminate: ; 18.2 = TERMINATE |
cmp ecx,2 |
jb noprocessterminate |
2010,7 → 2009,7 |
noatsc: |
noprocessterminate: |
ret |
|
;------------------------------------------------------------------------------ |
sysfn_terminate2: |
;lock application_table_status mutex |
.table_status: |
2037,7 → 2036,34 |
mov [application_table_status],0 |
or dword [esp+32],-1 |
ret |
;------------------------------------------------------------------------------ |
sysfn_deactivate: ; 18.1 = DEACTIVATE WINDOW |
cmp ecx,2 |
jb .nowindowdeactivate |
cmp ecx,[TASK_COUNT] |
ja .nowindowdeactivate |
|
movzx esi, word [WIN_STACK + ecx*2] |
cmp esi, 1 |
je .nowindowdeactivate ; already deactive |
|
mov edi, ecx |
shl edi, 5 |
add edi, window_data |
movzx esi, word [WIN_STACK + ecx * 2] |
lea esi, [WIN_POS + esi * 2] |
call window._.window_deactivate |
|
xor eax, eax |
mov byte[MOUSE_BACKGROUND], al |
mov byte[DONT_DRAW_MOUSE], al |
mov byte[MOUSE_DOWN], 0 |
|
call syscall_display_settings._.calculate_whole_screen |
call syscall_display_settings._.redraw_whole_screen |
.nowindowdeactivate: |
ret |
;------------------------------------------------------------------------------ |
sysfn_activate: ; 18.3 = ACTIVATE WINDOW |
cmp ecx,2 |
jb .nowindowactivate |
2058,21 → 2084,22 |
call waredraw |
.nowindowactivate: |
ret |
|
;------------------------------------------------------------------------------ |
sysfn_getidletime: ; 18.4 = GET IDLETIME |
mov eax,[idleusesec] |
mov [esp+32], eax |
ret |
|
;------------------------------------------------------------------------------ |
sysfn_getcpuclock: ; 18.5 = GET TSC/SEC |
mov eax,[CPU_FREQ] |
mov [esp+32], eax |
ret |
|
;------------------------------------------------------------------------------ |
; SAVE ramdisk to /hd/1/menuet.img |
;!!!!!!!!!!!!!!!!!!!!!!!! |
include 'blkdev/rdsave.inc' |
;!!!!!!!!!!!!!!!!!!!!!!!! |
;------------------------------------------------------------------------------ |
align 4 |
sysfn_getactive: ; 18.7 = get active window |
mov eax, [TASK_COUNT] |
2079,7 → 2106,7 |
movzx eax, word [WIN_POS + eax*2] |
mov [esp+32],eax |
ret |
|
;------------------------------------------------------------------------------ |
sysfn_sound_flag: ; 18.8 = get/set sound_flag |
; cmp ecx,1 |
dec ecx |
2094,10 → 2121,11 |
xor byte [sound_flag], 1 |
nosoundflag: |
ret |
|
;------------------------------------------------------------------------------ |
sysfn_minimize: ; 18.10 = minimize window |
mov [window_minimize],1 |
ret |
;------------------------------------------------------------------------------ |
align 4 |
sysfn_getdiskinfo: ; 18.11 = get disk info table |
; cmp ecx,1 |
2122,11 → 2150,11 |
cld |
rep movsd |
ret |
|
;------------------------------------------------------------------------------ |
sysfn_lastkey: ; 18.12 = return 0 (backward compatibility) |
and dword [esp+32], 0 |
ret |
|
;------------------------------------------------------------------------------ |
sysfn_getversion: ; 18.13 = get kernel ID and version |
mov edi,ecx |
mov esi,version_inf |
2133,7 → 2161,7 |
mov ecx,version_end-version_inf |
rep movsb |
ret |
|
;------------------------------------------------------------------------------ |
sysfn_waitretrace: ; 18.14 = sys wait retrace |
;wait retrace functions |
sys_wait_retrace: |
2144,7 → 2172,7 |
jz WaitRetrace_loop |
and [esp+32],dword 0 |
ret |
|
;------------------------------------------------------------------------------ |
align 4 |
sysfn_centermouse: ; 18.15 = mouse centered |
; removed here by <Lrz> |
2163,8 → 2191,8 |
xor eax,eax |
and [esp+32],eax |
; pop eax |
|
ret |
;------------------------------------------------------------------------------ |
align 4 |
sysfn_mouse_acceleration: ; 18.19 = set/get mouse features |
test ecx,ecx ; get mouse speed factor |
2211,7 → 2239,7 |
mov [mouse_active],1 |
.end: |
ret |
|
;------------------------------------------------------------------------------ |
sysfn_getfreemem: |
mov eax, [pg_data.pages_free] |
shl eax, 2 |