forked from KolibriOS/kolibrios
sys function 49
git-svn-id: svn://kolibrios.org@1330 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
e9e908d84d
commit
90bb6a20e2
@ -152,7 +152,7 @@ iglobal
|
|||||||
dd 0 ; 46-ReservePortArea and FreePortArea
|
dd 0 ; 46-ReservePortArea and FreePortArea
|
||||||
dd display_number ; 47-WriteNum
|
dd display_number ; 47-WriteNum
|
||||||
dd 0 ; 48-SetRedrawType and SetButtonType
|
dd 0 ; 48-SetRedrawType and SetButtonType
|
||||||
dd sys_apm ; 49-Advanced Power Management (APM)
|
dd 0 ; 49-Advanced Power Management (APM)
|
||||||
dd random_shaped_window ; 50-Window shape & scale
|
dd random_shaped_window ; 50-Window shape & scale
|
||||||
dd syscall_threads ; 51-Threads
|
dd syscall_threads ; 51-Threads
|
||||||
dd stack_driver_stat ; 52-Stack driver status
|
dd stack_driver_stat ; 52-Stack driver status
|
||||||
@ -231,7 +231,7 @@ iglobal
|
|||||||
dd syscall_reserveportarea ; 46-ReservePortArea and FreePortArea
|
dd syscall_reserveportarea ; 46-ReservePortArea and FreePortArea
|
||||||
dd cross_order ; 47-WriteNum
|
dd cross_order ; 47-WriteNum
|
||||||
dd display_settings ; 48-SetRedrawType and SetButtonType
|
dd display_settings ; 48-SetRedrawType and SetButtonType
|
||||||
dd cross_order ; 49-Advanced Power Management (APM)
|
dd sys_apm ; 49-Advanced Power Management (APM)
|
||||||
dd cross_order ; 50-Window shape & scale
|
dd cross_order ; 50-Window shape & scale
|
||||||
dd cross_order ; 51-Threads
|
dd cross_order ; 51-Threads
|
||||||
dd cross_order ; 52-Stack driver status
|
dd cross_order ; 52-Stack driver status
|
||||||
|
@ -5478,57 +5478,61 @@ set_screen:
|
|||||||
hlt ; Houston, we've had a problem
|
hlt ; Houston, we've had a problem
|
||||||
|
|
||||||
; --------------- APM ---------------------
|
; --------------- APM ---------------------
|
||||||
apm_entry dp 0
|
uglobal
|
||||||
apm_vf dd 0
|
apm_entry dp 0
|
||||||
|
apm_vf dd 0
|
||||||
|
endg
|
||||||
|
|
||||||
align 4
|
align 4
|
||||||
sys_apm:
|
sys_apm:
|
||||||
cmp word [apm_vf], 0 ; Check APM BIOS enable
|
xor eax,eax
|
||||||
jne @f
|
cmp word [apm_vf], ax ; Check APM BIOS enable
|
||||||
or [esp + 48], byte 1 ; error
|
jne @f
|
||||||
mov [esp + 36], dword 8 ; 32-bit protected-mode interface not supported
|
inc eax
|
||||||
ret
|
or dword [esp + 44], eax ; error
|
||||||
|
add eax,7
|
||||||
|
mov dword [esp + 32], eax ; 32-bit protected-mode interface not supported
|
||||||
|
ret
|
||||||
|
|
||||||
@@:
|
@@:
|
||||||
xchg eax, ecx
|
; xchg eax, ecx
|
||||||
xchg ebx, ecx
|
; xchg ebx, ecx
|
||||||
|
|
||||||
cmp al, 3
|
cmp dx, 3
|
||||||
ja @f
|
ja @f
|
||||||
and [esp + 48], byte 0xfe ; emulate func 0..3 as func 0
|
and [esp + 44], byte 0xfe ; emulate func 0..3 as func 0
|
||||||
mov eax, [apm_vf]
|
mov eax,[apm_vf]
|
||||||
mov [esp + 36], eax
|
mov [esp + 32], eax
|
||||||
shr eax, 16
|
shr eax, 16
|
||||||
mov [esp + 32], eax
|
mov [esp + 28], eax
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@@:
|
@@:
|
||||||
|
|
||||||
mov esi, [master_tab+(OS_BASE shr 20)]
|
mov esi,[master_tab+(OS_BASE shr 20)]
|
||||||
xchg [master_tab], esi
|
xchg [master_tab], esi
|
||||||
push esi
|
push esi
|
||||||
mov edi, cr3
|
mov edi, cr3
|
||||||
mov cr3, edi ;flush TLB
|
mov cr3, edi ;flush TLB
|
||||||
|
|
||||||
call pword [apm_entry] ; call APM BIOS
|
call pword [apm_entry] ;call APM BIOS
|
||||||
|
|
||||||
xchg eax, [esp]
|
xchg eax, [esp]
|
||||||
mov [master_tab], eax
|
mov [master_tab], eax
|
||||||
mov eax, cr3
|
mov eax, cr3
|
||||||
mov cr3, eax
|
mov cr3, eax
|
||||||
pop eax
|
pop eax
|
||||||
|
|
||||||
mov [esp + 8 ], edi
|
mov [esp + 4 ], edi
|
||||||
mov [esp + 12], esi
|
mov [esp + 8], esi
|
||||||
mov [esp + 24], ebx
|
mov [esp + 20], ebx
|
||||||
mov [esp + 28], edx
|
mov [esp + 24], edx
|
||||||
mov [esp + 32], ecx
|
mov [esp + 28], ecx
|
||||||
mov [esp + 36], eax
|
mov [esp + 32], eax
|
||||||
setc al
|
setc al
|
||||||
and [esp + 48], byte 0xfe
|
and [esp + 44], byte 0xfe
|
||||||
or [esp + 48], al
|
or [esp + 44], al
|
||||||
|
ret
|
||||||
|
|
||||||
ret
|
|
||||||
; -----------------------------------------
|
; -----------------------------------------
|
||||||
|
|
||||||
align 4
|
align 4
|
||||||
|
Loading…
Reference in New Issue
Block a user