Subversion Repositories Kolibri OS

Rev

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

Rev 770 Rev 820
Line 3... Line 3...
3
;; Copyright (C) KolibriOS team 2004-2008. All rights reserved. ;;
3
;; Copyright (C) KolibriOS team 2004-2008. All rights reserved. ;;
4
;; Distributed under terms of the GNU General Public License    ;;
4
;; Distributed under terms of the GNU General Public License    ;;
5
;;                                                              ;;
5
;;                                                              ;;
6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 7... Line 7...
7
 
7
 
Line 8... Line 8...
8
$Revision: 770 $
8
$Revision: 820 $
9
 
9
 
10
 
10
 
Line 804... Line 804...
804
        dec     edx
804
        dec     edx
805
        cmp     eax, edx
805
        cmp     eax, edx
806
        ja      .notread
806
        ja      .notread
807
        sub     eax, [bios_cur_sector]
807
        sub     eax, [bios_cur_sector]
808
        shl     eax, 9
808
        shl     eax, 9
809
        add     eax, (OS_BASE+0x9C000)
809
        add     eax, (OS_BASE+0x9A000)
810
        push    ecx esi edi
810
        push    ecx esi edi
811
        mov     esi, eax
811
        mov     esi, eax
812
        shl     edi, 9
812
        shl     edi, 9
813
;        add     edi, HD_CACHE+0x10000
813
;        add     edi, HD_CACHE+0x10000
814
        push  eax
814
        push  eax
Line 849... Line 849...
849
        pusha
849
        pusha
850
        mov     esi, [cache_chain_pos]
850
        mov     esi, [cache_chain_pos]
851
        shl     esi, 9
851
        shl     esi, 9
852
        call    calculate_cache_2
852
        call    calculate_cache_2
853
        add     esi, eax
853
        add     esi, eax
854
        mov     edi, OS_BASE + 0x9C000
854
        mov     edi, OS_BASE + 0x9A000
855
        movzx   ecx, [cache_chain_size]
855
        movzx   ecx, [cache_chain_size]
856
        push    ecx
856
        push    ecx
857
        shl     ecx, 9-2
857
        shl     ecx, 9-2
858
        rep     movsd
858
        rep     movsd
859
        pop     ecx
859
        pop     ecx
Line 882... Line 882...
882
; Because this code uses fixed addresses,
882
; Because this code uses fixed addresses,
883
; it can not be run simultaniously by many threads.
883
; it can not be run simultaniously by many threads.
884
; In current implementation it is protected by common mutex 'hd1_status'
884
; In current implementation it is protected by common mutex 'hd1_status'
885
        mov     word [BOOT_VAR + 510h], 10h             ; packet length
885
        mov     word [BOOT_VAR + 510h], 10h             ; packet length
886
        mov     word [BOOT_VAR + 512h], cx              ; number of sectors
886
        mov     word [BOOT_VAR + 512h], cx              ; number of sectors
887
        mov     dword [BOOT_VAR + 514h], 9C000000h      ; buffer 9C00:0000
887
        mov     dword [BOOT_VAR + 514h], 9A000000h      ; buffer 9A00:0000
888
        mov     dword [BOOT_VAR + 518h], eax
888
        mov     dword [BOOT_VAR + 518h], eax
889
        and     dword [BOOT_VAR + 51Ch], 0
889
        and     dword [BOOT_VAR + 51Ch], 0
890
        push    ebx ecx esi edi
890
        push    ebx ecx esi edi
891
        mov     ebx, int13_regs_in
891
        mov     ebx, int13_regs_in
892
        mov     edi, ebx
892
        mov     edi, ebx
Line 909... Line 909...
909
        stdcall enable_irq, edx
909
        stdcall enable_irq, edx
910
        popad
910
        popad
911
@@:
911
@@:
912
        mov     word [ebx+v86_regs.esi], 510h
912
        mov     word [ebx+v86_regs.esi], 510h
913
        mov     word [ebx+v86_regs.ss], 9000h
913
        mov     word [ebx+v86_regs.ss], 9000h
914
        mov     word [ebx+v86_regs.esp], 0C000h
914
        mov     word [ebx+v86_regs.esp], 0A000h
915
        mov     word [ebx+v86_regs.eip], 500h
915
        mov     word [ebx+v86_regs.eip], 500h
916
        mov     [ebx+v86_regs.eflags], 20200h
916
        mov     [ebx+v86_regs.eflags], 20200h
917
        mov     esi, [sys_v86_machine]
917
        mov     esi, [sys_v86_machine]
918
        mov     ecx, 0x502
918
        mov     ecx, 0x502
919
        call    v86_start
919
        call    v86_start