Subversion Repositories Kolibri OS

Rev

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

Rev 75 Rev 76
Line 281... Line 281...
281
        mov   ecx,0x10000 / 4
281
        mov   ecx,0x10000 / 4
282
        cld
282
        cld
283
        rep   stosd
283
        rep   stosd
Line 284... Line 284...
284
 
284
 
-
 
285
; SAVE REAL MODE VARIABLES
-
 
286
; --------------- APM ---------------------
-
 
287
    mov    eax, [0x2f0000 + 0x9040]    ; entry point
-
 
288
    mov    dword[apm_entry], eax
-
 
289
    mov    word [apm_entry + 4], apm_code_32 - gdts
-
 
290
 
-
 
291
    mov    eax, [0x2f0000 + 0x9044]    ; version & flags
-
 
292
    mov    [apm_vf], eax
285
; SAVE REAL MODE VARIABLES
293
; -----------------------------------------
286
;        movzx eax,byte [0x2f0000+0x9010]  ; mouse port
294
;        movzx eax,byte [0x2f0000+0x9010]  ; mouse port
287
;        mov   [0xF604],byte 1  ;al
295
;        mov   [0xF604],byte 1  ;al
288
        mov   al,[0x2f0000+0x9000]        ; bpp
296
        mov   al,[0x2f0000+0x9000]        ; bpp
289
        mov   [0xFBF1],al
297
        mov   [0xFBF1],al
Line 4788... Line 4796...
4788
 
4796
 
4789
     call  r_f_port_area
4797
     call  r_f_port_area
4790
     mov   [esp+36],eax
4798
     mov   [esp+36],eax
Line 4791... Line -...
4791
     ret
-
 
4792
 
-
 
4793
;align 4
-
 
4794
 
-
 
4795
syscall_appints:                        ; AppInts
-
 
4796
;    mov   [esp+36],dword -1
-
 
4797
     ret
4799
     ret
Line 4798... Line 4800...
4798
 
4800
 
Line 4799... Line 4801...
4799
align 4
4801
align 4
Line 4877... Line 4879...
4877
;     add   ecx,[edi]
4879
;     add   ecx,[edi]
4878
;     call  file_delete
4880
;     call  file_delete
4879
;     ret
4881
;     ret
4880
;
4882
;
Line -... Line 4883...
-
 
4883
 
-
 
4884
; --------------- APM ---------------------
-
 
4885
apm_entry    dp    0
-
 
4886
apm_vf        dd    0
-
 
4887
align 4
-
 
4888
sys_apm:
-
 
4889
    cmp    word [apm_vf], 0    ; Check APM BIOS enable
-
 
4890
    jne    @f
-
 
4891
    or    [esp + 40], byte 1    ; error
-
 
4892
    mov    [esp + 36], dword 8    ; 32-bit protected-mode interface not supported
-
 
4893
    ret
-
 
4894
    
-
 
4895
@@:    xchg    eax, ecx
-
 
4896
    xchg    ebx, ecx
-
 
4897
    
-
 
4898
    cmp    al, 3
-
 
4899
    ja    @f
-
 
4900
    and    [esp + 40], byte 0xfe    ; emulate func 0..3 as func 0
-
 
4901
    mov    eax, [apm_vf]
-
 
4902
    mov    [esp + 36], eax
-
 
4903
    shr    eax, 16
-
 
4904
    mov    [esp + 32], eax
-
 
4905
    ret
-
 
4906
    
-
 
4907
@@:    call    pword [apm_entry]    ; call APM BIOS
-
 
4908
    mov    [esp + 8 ], edi
-
 
4909
    mov    [esp + 12], esi
-
 
4910
    mov    [esp + 24], ebx
-
 
4911
    mov    [esp + 28], edx
-
 
4912
    mov    [esp + 32], ecx
-
 
4913
    mov    [esp + 36], eax
-
 
4914
    setc    al
-
 
4915
    and    [esp + 40], byte 0xfe
-
 
4916
    or    [esp + 40], al
-
 
4917
    ret
-
 
4918
; -----------------------------------------
4881
 
4919
 
Line 4882... Line 4920...
4882
align 4
4920
align 4
Line 4883... Line 4921...
4883
 
4921