Rev 77 | Rev 82 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 77 | Rev 78 | ||
---|---|---|---|
Line 4886... | Line 4886... | ||
4886 | apm_vf dd 0 |
4886 | apm_vf dd 0 |
4887 | align 4 |
4887 | align 4 |
4888 | sys_apm: |
4888 | sys_apm: |
4889 | cmp word [apm_vf], 0 ; Check APM BIOS enable |
4889 | cmp word [apm_vf], 0 ; Check APM BIOS enable |
4890 | jne @f |
4890 | jne @f |
4891 | or [esp + 40], byte 1 ; error |
4891 | or [esp + 56], byte 1 ; error |
4892 | mov [esp + 36], dword 8 ; 32-bit protected-mode interface not supported |
4892 | mov [esp + 36], dword 8 ; 32-bit protected-mode interface not supported |
4893 | ret |
4893 | ret |
Line 4894... | Line 4894... | ||
4894 | 4894 | ||
4895 | @@: xchg eax, ecx |
4895 | @@: xchg eax, ecx |
Line 4896... | Line 4896... | ||
4896 | xchg ebx, ecx |
4896 | xchg ebx, ecx |
4897 | 4897 | ||
4898 | cmp al, 3 |
4898 | cmp al, 3 |
4899 | ja @f |
4899 | ja @f |
4900 | and [esp + 40], byte 0xfe ; emulate func 0..3 as func 0 |
4900 | and [esp + 56], byte 0xfe ; emulate func 0..3 as func 0 |
4901 | mov eax, [apm_vf] |
4901 | mov eax, [apm_vf] |
4902 | mov [esp + 36], eax |
4902 | mov [esp + 36], eax |
4903 | shr eax, 16 |
4903 | shr eax, 16 |
Line 4910... | Line 4910... | ||
4910 | mov [esp + 24], ebx |
4910 | mov [esp + 24], ebx |
4911 | mov [esp + 28], edx |
4911 | mov [esp + 28], edx |
4912 | mov [esp + 32], ecx |
4912 | mov [esp + 32], ecx |
4913 | mov [esp + 36], eax |
4913 | mov [esp + 36], eax |
4914 | setc al |
4914 | setc al |
4915 | and [esp + 40], byte 0xfe |
4915 | and [esp + 56], byte 0xfe |
4916 | or [esp + 40], al |
4916 | or [esp + 56], al |
4917 | ret |
4917 | ret |
4918 | ; ----------------------------------------- |
4918 | ; ----------------------------------------- |
Line 4919... | Line 4919... | ||
4919 | 4919 |