Rev 820 | Rev 1709 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 820 | Rev 1448 | ||
---|---|---|---|
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: 820 $ |
8 | $Revision: 1448 $ |
9 | 9 | ||
10 | 10 | ||
Line 880... | Line 880... | ||
880 | 880 | ||
881 | int13_call: |
881 | int13_call: |
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 [OS_BASE + 510h], 10h ; packet length |
886 | mov word [BOOT_VAR + 512h], cx ; number of sectors |
886 | mov word [OS_BASE + 512h], cx ; number of sectors |
887 | mov dword [BOOT_VAR + 514h], 9A000000h ; buffer 9A00:0000 |
887 | mov dword [OS_BASE + 514h], 9A000000h ; buffer 9A00:0000 |
888 | mov dword [BOOT_VAR + 518h], eax |
888 | mov dword [OS_BASE + 518h], eax |
889 | and dword [BOOT_VAR + 51Ch], 0 |
889 | and dword [OS_BASE + 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 |
893 | mov ecx, v86_regs.size/4 |
893 | mov ecx, v86_regs.size/4 |
Line 917... | Line 917... | ||
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 |
920 | and [bios_hdpos], 0 |
920 | and [bios_hdpos], 0 |
921 | pop edi esi ecx ebx |
921 | pop edi esi ecx ebx |
922 | movzx edx, byte [BOOT_VAR + 512h] |
922 | movzx edx, byte [OS_BASE + 512h] |
923 | test byte [int13_regs_out+v86_regs.eflags], 1 |
923 | test byte [int13_regs_out+v86_regs.eflags], 1 |
924 | jnz @f |
924 | jnz @f |
925 | mov edx, ecx |
925 | mov edx, ecx |
926 | @@: |
926 | @@: |
927 | ret |
927 | ret |