Subversion Repositories Kolibri OS

Rev

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

Rev 520 Rev 521
Line 1... Line 1...
1
$Revision: 520 $
1
$Revision: 521 $
2
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
3
;;                                                              ;;
3
;;                                                              ;;
4
;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;;
4
;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;;
5
;; Distributed under terms of the GNU General Public License    ;;
5
;; Distributed under terms of the GNU General Public License    ;;
6
;;                                                              ;;
6
;;                                                              ;;
Line 42... Line 42...
42
   xor eax, eax
42
   xor eax, eax
43
   cld
43
   cld
44
   rep stosd
44
   rep stosd
45
}
45
}
Line -... Line 46...
-
 
46
 
-
 
47
fs_execute_from_sysdir:
-
 
48
        xor     ebx, ebx
-
 
49
        xor     edx, edx
Line 46... Line 50...
46
 
50
        mov     esi, sysdir_path
47
 
51
 
Line 48... Line 52...
48
align 4
52
align 4
Line 78... Line 82...
78
 
82
 
Line 79... Line 83...
79
           mov [flags], edx
83
           mov [flags], edx
Line 80... Line 84...
80
 
84
 
81
; [ebp]  pointer to filename
85
; [ebp]  pointer to filename
-
 
86
 
-
 
87
           lea edi, [filename]
-
 
88
           lea ecx, [edi+1024]
-
 
89
           mov al, '/'
-
 
90
           stosb
-
 
91
@@:
-
 
92
           cmp edi, ecx
-
 
93
           jae .bigfilename
-
 
94
           lodsb
-
 
95
           stosb
82
 
96
           test al, al
-
 
97
           jnz @b
83
           lea eax, [filename]
98
           mov esi, [ebp]
-
 
99
           test esi, esi
-
 
100
           jz .namecopied
-
 
101
           mov byte [edi-1], '/'
-
 
102
@@:
-
 
103
           cmp edi, ecx
-
 
104
           jae .bigfilename
-
 
105
           lodsb
-
 
106
           stosb
-
 
107
           test al, al
-
 
108
           jnz @b
-
 
109
           jmp .namecopied
-
 
110
.bigfilename:
-
 
111
           popad
Line 84... Line 112...
84
           mov dword [eax+1020],0              ;force terminate
112
           mov eax, -ERROR_FILE_NOT_FOUND
85
                                               ;string
113
           ret
86
           stdcall strncpy, eax, [ebp], 1023
114
.namecopied:
Line 686... Line 714...
686
             tmp_r_cnt  dd ?
714
             tmp_r_cnt  dd ?
687
           endl
715
           endl
Line 688... Line 716...
688
 
716
 
689
           mov [slot], eax
717
           mov [slot], eax
690
           mov [buff], ebx
718
           mov [buff], ebx
691
           mov [r_count], ecx
719
           and [r_count], 0
692
           mov [tmp_r_cnt], ecx
720
           mov [tmp_r_cnt], ecx
Line 693... Line 721...
693
           mov [offset], edx
721
           mov [offset], edx
694
 
722
 
Line 722... Line 750...
722
           and esi, 0xfff
750
           and esi, 0xfff
723
           add esi, [proc_mem_map]
751
           add esi, [proc_mem_map]
724
           mov edi, [buff]
752
           mov edi, [buff]
725
           mov edx, ecx
753
           mov edx, ecx
726
           rep movsb
754
           rep movsb
-
 
755
           add [r_count], edx
Line 727... Line 756...
727
 
756
 
728
           add [offset], edx
757
           add [offset], edx
729
           sub [tmp_r_cnt], edx
758
           sub [tmp_r_cnt], edx
Line 752... Line 781...
752
             tmp_w_cnt  dd ?
781
             tmp_w_cnt  dd ?
753
           endl
782
           endl
Line 754... Line 783...
754
 
783
 
755
           mov [slot], eax
784
           mov [slot], eax
756
           mov [buff], ebx
785
           mov [buff], ebx
757
           mov [w_count], ecx
786
           and [w_count], 0
758
           mov [tmp_w_cnt], ecx
787
           mov [tmp_w_cnt], ecx
Line 759... Line 788...
759
           mov [offset], edx
788
           mov [offset], edx
760
 
789
 
Line 789... Line 818...
789
           add edi, [proc_mem_map]
818
           add edi, [proc_mem_map]
790
           mov esi, [buff]
819
           mov esi, [buff]
791
           mov edx, ecx
820
           mov edx, ecx
792
           rep movsb
821
           rep movsb
Line -... Line 822...
-
 
822
 
793
 
823
           add [w_count], edx
794
           add [offset], edx
824
           add [offset], edx
795
           sub [tmp_w_cnt], edx
825
           sub [tmp_w_cnt], edx
Line 796... Line 826...
796
           jnz .read_mem
826
           jnz .read_mem
Line 962... Line 992...
962
           mov ecx, [def_cursor]
992
           mov ecx, [def_cursor]
963
           mov [SLOT_BASE+APPDATA.cursor+ebx],ecx
993
           mov [SLOT_BASE+APPDATA.cursor+ebx],ecx
964
           mov eax, [pl0_stack]
994
           mov eax, [pl0_stack]
965
           mov [SLOT_BASE+APPDATA.pl0_stack+ebx],eax
995
           mov [SLOT_BASE+APPDATA.pl0_stack+ebx],eax
Line -... Line 996...
-
 
996
 
-
 
997
           push ebx
-
 
998
           stdcall kernel_alloc, 0x1000
-
 
999
           pop ebx
-
 
1000
           mov esi,[current_slot]
-
 
1001
           mov esi,[esi+APPDATA.cur_dir]
-
 
1002
           mov ecx,0x1000/4
-
 
1003
           mov edi,eax
-
 
1004
           mov [ebx+SLOT_BASE+APPDATA.cur_dir],eax
-
 
1005
           rep movsd
966
 
1006
 
967
           shr ebx,3
1007
           shr ebx,3
968
           mov eax, new_app_base
1008
           mov eax, new_app_base
Line 969... Line 1009...
969
           mov dword [CURRENT_TASK+ebx+0x10],eax
1009
           mov dword [CURRENT_TASK+ebx+0x10],eax