Subversion Repositories Kolibri OS

Rev

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

Rev 4424 Rev 5130
Line 3... Line 3...
3
;; Copyright (C) KolibriOS team 2004-2012. All rights reserved. ;;
3
;; Copyright (C) KolibriOS team 2004-2012. 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: 4424 $
8
$Revision: 5130 $
Line 9... Line 9...
9
 
9
 
Line 68... Line 68...
68
         cmdline_flag  dd ? ; +8 ; cmdline -4
68
         cmdline_flag  dd ? ; +8 ; cmdline -4
69
         cmdline       rd 64    ;256/4
69
         cmdline       rd 64    ;256/4
70
         filename      rd 256   ;1024/4
70
         filename      rd 256   ;1024/4
71
         flags         dd ?
71
         flags         dd ?
Line 72... Line 72...
72
 
72
 
73
         save_cr3      dd ?
73
         save_proc     dd ?
74
         slot          dd ?
74
         slot          dd ?
75
         slot_base     dd ?
75
         slot_base     dd ?
76
         file_base     dd ?
76
         file_base     dd ?
77
         file_size     dd ?
77
         file_size     dd ?
Line 213... Line 213...
213
        test    eax, eax
213
        test    eax, eax
214
        jz      .err_hdr
214
        jz      .err_hdr
Line 215... Line 215...
215
 
215
 
Line 216... Line 216...
216
        call    lock_application_table
216
        call    lock_application_table
217
 
217
 
218
        call    get_new_process_place
218
        call    alloc_thread_slot
219
        test    eax, eax
219
        test    eax, eax
Line 220... Line 220...
220
        mov     esi, -0x20 ; too many processes
220
        mov     esi, -0x20 ; too many processes
Line 246... Line 246...
246
        jz      .copy_process_name_done
246
        jz      .copy_process_name_done
247
        stosb
247
        stosb
248
        loop    .copy_process_name_loop
248
        loop    .copy_process_name_loop
249
.copy_process_name_done:
249
.copy_process_name_done:
Line 250... Line 250...
250
 
250
 
251
        mov     ebx, cr3
251
        mov     ebx, [current_process]
Line 252... Line 252...
252
        mov     [save_cr3], ebx
252
        mov     [save_proc], ebx
253
 
253
 
254
        stdcall create_app_space, [hdr_mem], [file_base], [file_size]
254
        stdcall create_process, [hdr_mem], [file_base], [file_size]
255
        mov     esi, -30; no memory
255
        mov     esi, -30; no memory
Line -... Line 256...
-
 
256
        test    eax, eax
-
 
257
        jz      .failed
-
 
258
 
256
        test    eax, eax
259
        mov     ebx, [hdr_mem]
257
        jz      .failed
260
        mov     [eax+PROC.mem_used], ebx
-
 
261
 
258
 
262
        mov     ebx, [slot_base]
259
        mov     ebx, [slot_base]
263
        mov     [ebx+APPDATA.process], eax
-
 
264
 
Line 260... Line 265...
260
        mov     [ebx+APPDATA.dir_table], eax
265
        lea     edx, [ebx+APPDATA.list]
261
        mov     eax, [hdr_mem]
266
        lea     ecx, [eax+PROC.thr_list]
262
        mov     [ebx+APPDATA.mem_size], eax
267
        list_add_tail edx, ecx
Line 290... Line 295...
290
        lea     eax, [hdr_cmdline]
295
        lea     eax, [hdr_cmdline]
291
        lea     ebx, [cmdline]
296
        lea     ebx, [cmdline]
292
        lea     ecx, [filename]
297
        lea     ecx, [filename]
293
        stdcall set_app_params , [slot], eax, ebx, ecx, [flags]
298
        stdcall set_app_params , [slot], eax, ebx, ecx, [flags]
Line 294... Line 299...
294
 
299
 
295
        mov     eax, [save_cr3]
300
        mov     eax, [save_proc]
Line 296... Line 301...
296
        call    set_cr3
301
        call    set_cr3
297
 
302
 
Line 298... Line 303...
298
        mov     eax, [process_number];set result
303
        mov     eax, [process_number];set result
Line 299... Line 304...
299
        call    unlock_application_table
304
        call    unlock_application_table
300
 
305
 
301
        jmp     .final
306
        jmp     .final
302
 
307
 
303
.failed:
308
.failed:
304
        mov     eax, [save_cr3]
309
        mov     eax, [save_proc]
305
        call    set_cr3
310
        call    set_cr3
Line 383... Line 388...
383
.fail:
388
.fail:
384
        xor     eax, eax
389
        xor     eax, eax
385
        ret
390
        ret
Line 386... Line 391...
386
 
391
 
387
align 4
392
align 4
388
proc get_new_process_place
393
alloc_thread_slot:
389
;input:
394
;input:
390
;  none
395
;  none
391
;result:
396
;result:
392
;  eax=[new_process_place]<>0 - ok
397
;  eax=[new_thread_slot]<>0 - ok
393
;      0 - failed.
398
;      0 - failed.
394
;This function find least empty slot.
399
;This function find least empty slot.
395
;It doesn't increase [TASK_COUNT]!
-
 
-
 
400
;It doesn't increase [TASK_COUNT]!
-
 
401
 
396
        mov     eax, CURRENT_TASK
402
 
397
        mov     ebx, [TASK_COUNT]
403
        mov     edx, thr_slot_map
398
        inc     ebx
404
        pushfd
399
        shl     ebx, 5
-
 
400
        add     ebx, eax    ;ebx - address of process information for (last+1) slot
405
        cli
401
.newprocessplace:
-
 
402
;eax = address of process information for current slot
406
.l1:
403
        cmp     eax, ebx
-
 
404
        jz      .endnewprocessplace ;empty slot after high boundary
407
        bsf     eax, [edx]
405
        add     eax, 0x20
-
 
406
        cmp     word [eax+0xa], 9;check process state, 9 means that process slot is empty
-
 
407
        jnz     .newprocessplace
-
 
408
.endnewprocessplace:
408
        jnz     .found
409
        mov     ebx, eax
409
        add     edx, 4
410
        sub     eax, CURRENT_TASK
-
 
411
        shr     eax, 5      ;calculate slot index
410
        cmp     edx, thr_slot_map+32
412
        cmp     eax, 256
-
 
413
        jge     .failed     ;it should be <256
-
 
-
 
411
        jb      .l1
414
        mov     word [ebx+0xa], 9;set process state to 9 (for slot after hight boundary)
412
 
415
        ret
-
 
416
.failed:
413
        popfd
417
        xor     eax, eax
414
        xor     eax, eax
418
        ret
415
        ret
-
 
416
.found:
-
 
417
        btr     [edx], eax
-
 
418
        sub     edx, thr_slot_map
-
 
419
        lea     eax, [eax+edx*8]
-
 
420
        popfd
-
 
421
        ret
Line 419... Line 422...
419
endp
422
 
420
 
423
 
421
align 4
424
align 4
422
proc create_app_space stdcall, app_size:dword,img_base:dword,img_size:dword
425
proc create_process stdcall, app_size:dword,img_base:dword,img_size:dword
423
       locals
426
       locals
424
         app_pages   dd ?
427
         app_pages   dd ?
425
         img_pages   dd ?
428
         img_pages   dd ?
426
         dir_addr    dd ?
429
         process     dd ?
Line -... Line 430...
-
 
430
         app_tabs    dd ?
-
 
431
       endl
-
 
432
 
-
 
433
        push    ebx
427
         app_tabs    dd ?
434
        push    esi
428
       endl
435
        push    edi
Line 429... Line 436...
429
 
436
 
430
        mov     ecx, pg_data.mutex
437
        mov     ecx, pg_data.mutex
Line 431... Line 438...
431
        call    mutex_lock
438
        call    mutex_lock
432
 
439
 
433
        xor     eax, eax
440
        xor     eax, eax
434
        mov     [dir_addr], eax
441
        mov     [process], eax
Line 452... Line 459...
452
 
459
 
453
        mov     [img_size], ecx
460
        mov     [img_size], ecx
454
        shr     ecx, 12
461
        shr     ecx, 12
Line 455... Line -...
455
        mov     [img_pages], ecx
-
 
456
 
-
 
457
if GREEDY_KERNEL
-
 
458
        lea     eax, [ecx+ebx+2];only image size
462
        mov     [img_pages], ecx
459
else
463
 
460
        lea     eax, [eax+ebx+2];all requested memory
464
        lea     eax, [eax+ebx+2];all requested memory
461
end if
465
 
Line 462... Line 466...
462
        cmp     eax, [pg_data.pages_free]
466
        cmp     eax, [pg_data.pages_free]
463
        ja      .fail
467
        ja      .fail
464
 
468
 
465
        call    alloc_page
469
        stdcall kernel_alloc, 0x2000
-
 
470
        test    eax, eax
466
        test    eax, eax
471
        jz      .fail
-
 
472
        mov     [process], eax
-
 
473
 
-
 
474
        lea     edi, [eax+PROC.heap_lock]
-
 
475
        mov     ecx, (4096-PROC.heap_lock)/4
-
 
476
 
Line 467... Line -...
467
        jz      .fail
-
 
468
        mov     [dir_addr], eax
-
 
469
        stdcall map_page, [tmp_task_pdir], eax, dword PG_SW
477
        list_init eax
470
 
478
        add     eax, PROC.thr_list
471
        mov     edi, [tmp_task_pdir]
479
        list_init eax
Line -... Line 480...
-
 
480
 
-
 
481
        xor     eax, eax
-
 
482
        cld
-
 
483
        rep stosd
-
 
484
 
-
 
485
        mov     eax, edi
-
 
486
        call    get_pg_addr
-
 
487
        mov     [edi-4096+PROC.pdt_0_phys], eax
472
        mov     ecx, (OS_BASE shr 20)/4
488
 
473
        xor     eax, eax
489
        mov     ecx, (OS_BASE shr 20)/4
474
        cld
490
        xor     eax, eax
Line 475... Line 491...
475
        rep stosd
491
        rep stosd
476
 
492
 
477
        mov     ecx, (OS_BASE shr 20)/4
493
        mov     ecx, (OS_BASE shr 20)/4
Line 478... Line 494...
478
        mov     esi, sys_pgdir+(OS_BASE shr 20)
494
        mov     esi, sys_proc+PROC.pdt_0+(OS_BASE shr 20)
479
        rep movsd
495
        rep movsd
Line 480... Line 496...
480
 
496
 
481
        mov     eax, [dir_addr]
497
        mov     eax, [edi-8192+PROC.pdt_0_phys]
482
        or      eax, PG_SW
498
        or      eax, PG_SW
483
        mov     [edi-4096+(page_tabs shr 20)], eax
499
        mov     [edi-4096+(page_tabs shr 20)], eax
484
 
500
 
485
        and     eax, -4096
501
        lea     eax, [edi-8192]
Line 486... Line 502...
486
        call    set_cr3
502
        call    set_cr3
487
 
503
 
488
        mov     edx, [app_tabs]
504
        mov     edx, [app_tabs]
489
        mov     edi, new_app_base
505
        xor     edi, edi
Line 490... Line -...
490
@@:
-
 
491
        call    alloc_page
-
 
492
        test    eax, eax
506
@@:
Line 493... Line 507...
493
        jz      .fail
507
        call    alloc_page
494
 
508
        test    eax, eax
495
        stdcall map_page_table, edi, eax
509
        jz      .fail
496
        add     edi, 0x00400000
510
 
Line 497... Line 511...
497
        dec     edx
511
        stdcall map_page_table, edi, eax
498
        jnz     @B
512
        add     edi, 0x00400000
499
 
513
        dec     edx
500
        mov     edi, new_app_base
514
        jnz     @B
501
        shr     edi, 10
-
 
502
        add     edi, page_tabs
515
 
503
 
-
 
504
        mov     ecx, [app_tabs]
516
        mov     edi, page_tabs
505
        shl     ecx, 10
517
 
506
        xor     eax, eax
518
        mov     ecx, [app_tabs]
507
        rep stosd
519
        shl     ecx, 10
508
 
520
        xor     eax, eax
509
        mov     ecx, [img_pages]
521
        rep stosd
510
        mov     ebx, PG_UW
522
 
Line 527... Line 539...
527
 
539
 
528
        mov     ecx, [app_pages]
540
        mov     ecx, [app_pages]
529
        test    ecx, ecx
541
        test    ecx, ecx
Line 530... Line -...
530
        jz      .done
-
 
531
 
-
 
532
if GREEDY_KERNEL
-
 
533
        mov     eax, 0x02
-
 
534
        rep stosd
-
 
535
else
542
        jz      .done
536
 
543
 
537
.alloc:
544
.alloc:
538
        call    alloc_page
545
        call    alloc_page
Line 539... Line 546...
539
        test    eax, eax
546
        test    eax, eax
540
        jz      .fail
547
        jz      .fail
541
 
548
 
542
        stdcall map_page, edx, eax, dword PG_UW
549
        stdcall map_page, edx, eax, dword PG_UW
543
        add     edx, 0x1000
-
 
Line 544... Line 550...
544
        dec     [app_pages]
550
        add     edx, 0x1000
545
        jnz     .alloc
-
 
546
end if
-
 
547
 
551
        dec     [app_pages]
548
.done:
552
        jnz     .alloc
549
        stdcall map_page, [tmp_task_pdir], dword 0, dword PG_UNMAP
553
 
-
 
554
.done:
-
 
555
        mov     ecx, pg_data.mutex
-
 
556
        call    mutex_unlock
-
 
557
        mov     eax, [process]
550
 
558
 
551
        mov     ecx, pg_data.mutex
559
        pop     edi
552
        call    mutex_unlock
560
        pop     esi
553
        mov     eax, [dir_addr]
561
        pop     ebx
554
        ret
562
        ret
555
.fail:
563
.fail:
556
        mov     ecx, pg_data.mutex
564
        mov     ecx, pg_data.mutex
557
        call    mutex_unlock
565
        call    mutex_unlock
558
        cmp     [dir_addr], 0
566
        cmp     [process], 0
-
 
567
        je      @f
-
 
568
;;        stdcall destroy_app_space, [dir_addr], 0
-
 
569
@@:
559
        je      @f
570
        xor     eax, eax
560
        stdcall destroy_app_space, [dir_addr], 0
571
        pop     edi
Line 561... Line 572...
561
@@:
572
        pop     esi
562
        xor     eax, eax
573
        pop     ebx
-
 
574
        ret
563
        ret
575
endp
564
endp
576
 
-
 
577
align 4
565
 
578
set_cr3:
-
 
579
        pushfd
566
align 4
580
        cli
-
 
581
        mov     ebx, [current_slot]
567
set_cr3:
582
        mov     [current_process], eax
Line 568... Line 583...
568
 
583
        mov     [ebx+APPDATA.process], eax
569
        mov     ebx, [current_slot]
584
        mov     eax, [eax+PROC.pdt_0_phys]
Line 580... Line 595...
580
        mov     ecx, 1024
595
        mov     ecx, 1024
581
.free:
596
.free:
582
        mov     eax, [esi]
597
        mov     eax, [esi]
583
        test    eax, 1
598
        test    eax, 1
584
        jz      .next
599
        jz      .next
-
 
600
        test    eax, 2
-
 
601
        jz      .next
585
        test    eax, 1 shl 9
602
        test    eax, 1 shl 9
586
        jnz     .next                     ;skip shared pages
603
        jnz     .next                     ;skip shared pages
587
        call    free_page
604
        call    free_page
588
.next:
605
.next:
589
        add     esi, 4
606
        add     esi, 4
Line 592... Line 609...
592
        pop     esi
609
        pop     esi
593
        ret
610
        ret
594
endp
611
endp
Line 595... Line 612...
595
 
612
 
596
align 4
613
align 4
Line 597... Line -...
597
proc destroy_app_space stdcall, pg_dir:dword, dlls_list:dword
-
 
598
 
-
 
599
        xor     edx, edx
-
 
600
        push    edx
614
destroy_process: ;fastcall ecx= ptr to process
601
        mov     eax, 0x1
-
 
602
        mov     ebx, [pg_dir]
-
 
603
.loop:
615
 
604
;eax = current slot of process
-
 
605
        mov     ecx, eax
-
 
606
        shl     ecx, 5
-
 
607
        cmp     byte [CURRENT_TASK+ecx+0xa], 9;if process running?
-
 
608
        jz      @f           ;skip empty slots
-
 
609
        shl     ecx, 3
-
 
610
        add     ecx, SLOT_BASE
-
 
611
        cmp     [ecx+APPDATA.dir_table], ebx;compare page directory addresses
-
 
612
        jnz     @f
-
 
613
        mov     [ebp-4], ecx
-
 
614
        inc     edx             ;thread found
-
 
615
@@:
-
 
616
        inc     eax
616
        lea     eax, [ecx+PROC.thr_list]
Line 617... Line -...
617
        cmp     eax, [TASK_COUNT]   ;exit loop if we look through all processes
-
 
618
        jle     .loop
-
 
619
 
617
        cmp     eax, [eax+LHEAD.next]
620
;edx = number of threads
618
        jne     .exit
621
;our process is zombi so it isn't counted
619
 
622
        pop     ecx
-
 
623
        cmp     edx, 1
-
 
624
        jg      .ret
-
 
Line 625... Line 620...
625
;if there isn't threads then clear memory.
620
align 4
626
        mov     esi, [dlls_list]
621
.internal:
Line 627... Line 622...
627
        call    destroy_all_hdlls;ecx=APPDATA
622
        push    ecx
628
 
623
 
-
 
624
        mov     esi, [ecx+PROC.dlls_list_ptr]
629
        mov     ecx, pg_data.mutex
625
        call    destroy_all_hdlls
630
        call    mutex_lock
626
 
631
 
627
;        mov     ecx, pg_data.mutex
632
        mov     eax, [pg_dir]
628
;        call    mutex_lock
633
        and     eax, not 0xFFF
629
 
634
        stdcall map_page, [tmp_task_pdir], eax, PG_SW
630
        mov     esi, [esp]
635
        mov     esi, [tmp_task_pdir]
631
        add     esi, PROC.pdt_0
636
        mov     edi, (OS_BASE shr 20)/4
632
        mov     edi, (0x80000000 shr 20)/4
Line 646... Line 642...
646
.next:
642
.next:
647
        add     esi, 4
643
        add     esi, 4
648
        dec     edi
644
        dec     edi
649
        jnz     .destroy
645
        jnz     .destroy
Line 650... Line -...
650
 
-
 
651
        mov     eax, [pg_dir]
646
 
652
        call    free_page
-
 
653
.exit:
647
        call    kernel_free     ;ecx still in stack
654
        stdcall map_page, [tmp_task_ptab], 0, PG_UNMAP
-
 
655
        stdcall map_page, [tmp_task_pdir], 0, PG_UNMAP
648
        stdcall map_page, [tmp_task_ptab], 0, PG_UNMAP
656
        mov     ecx, pg_data.mutex
649
 ;       mov     ecx, pg_data.mutex
-
 
650
 ;       call    mutex_unlock
657
        call    mutex_unlock
651
 
658
.ret:
652
.exit:
659
        ret
-
 
Line 660... Line 653...
660
endp
653
        ret
661
 
654
 
662
align 4
655
align 4
663
get_pid:
656
get_pid:
Line 706... Line 699...
706
;  esi - start of buffer
699
;  esi - start of buffer
707
;  edx - size of buffer
700
;  edx - size of buffer
708
;result:
701
;result:
709
;  eax = 1 region lays in app memory
702
;  eax = 1 region lays in app memory
710
;  eax = 0 region don't lays in app memory
703
;  eax = 0 region don't lays in app memory
-
 
704
 
-
 
705
        mov     eax, 1
-
 
706
        ret
-
 
707
if 0
711
        mov     eax, [CURRENT_TASK]
708
        mov     eax, [CURRENT_TASK]
712
;     jmp  check_process_region
709
;     jmp  check_process_region
713
;-----------------------------------------------------------------------------
710
;-----------------------------------------------------------------------------
714
;check_process_region:
711
;check_process_region:
715
;input:
712
;input:
Line 730... Line 727...
730
        test    eax, eax
727
        test    eax, eax
731
        jz      .failed
728
        jz      .failed
Line 732... Line 729...
732
 
729
 
733
        mov     eax, 1
730
        mov     eax, 1
734
        ret
-
 
735
 
-
 
736
 
-
 
737
;    call MEM_Get_Linear_Address
-
 
738
;    push ebx
-
 
739
;    push ecx
-
 
740
;    push edx
-
 
741
;    mov  edx,ebx
-
 
742
;    and  edx,not (4096-1)
-
 
743
;    sub  ebx,edx
-
 
744
;    add  ecx,ebx
-
 
745
;    mov  ebx,edx
-
 
746
;    add  ecx,(4096-1)
-
 
747
;    and  ecx,not (4096-1)
-
 
748
;.loop:
-
 
749
;;eax - linear address of page directory
-
 
750
;;ebx - current page
-
 
751
;;ecx - current size
-
 
752
;    mov  edx,ebx
-
 
753
;    shr  edx,22
-
 
754
;    mov  edx,[eax+4*edx]
-
 
755
;    and  edx,not (4096-1)
-
 
756
;    test edx,edx
-
 
757
;    jz   .failed1
-
 
758
;    push eax
-
 
759
;    mov  eax,edx
-
 
760
;    call MEM_Get_Linear_Address
-
 
761
;    mov  edx,ebx
-
 
762
;    shr  edx,12
-
 
763
;    and  edx,(1024-1)
-
 
764
;    mov  eax,[eax+4*edx]
-
 
765
;    and  eax,not (4096-1)
-
 
766
;    test eax,eax
-
 
767
;    pop  eax
-
 
768
;    jz   .failed1
-
 
769
;    add  ebx,4096
-
 
770
;    sub  ecx,4096
-
 
771
;    jg   .loop
-
 
772
;    pop  edx
-
 
773
;    pop  ecx
-
 
774
;    pop  ebx
731
        ret
775
.ok:
732
.ok:
776
        mov     eax, 1
733
        mov     eax, 1
777
        ret
-
 
778
;
-
 
779
;.failed1:
-
 
780
;    pop  edx
-
 
781
;    pop  ecx
-
 
782
;    pop  ebx
734
        ret
783
.failed:
735
.failed:
784
        xor     eax, eax
736
        xor     eax, eax
-
 
737
        ret
Line 785... Line 738...
785
        ret
738
end if
786
 
739
 
787
align 4
740
align 4
788
proc read_process_memory
741
proc read_process_memory
Line 952... Line 905...
952
        mov     [app_esp], edx
905
        mov     [app_esp], edx
953
        mov     [app_path], eax
906
        mov     [app_path], eax
Line 954... Line 907...
954
 
907
 
Line 955... Line 908...
955
        call    lock_application_table
908
        call    lock_application_table
956
 
909
 
957
        call    get_new_process_place
910
        call    alloc_thread_slot
Line 958... Line 911...
958
        test    eax, eax
911
        test    eax, eax
Line 974... Line 927...
974
        mov     esi, ebx
927
        mov     esi, ebx
975
        mov     edi, edx
928
        mov     edi, edx
976
        mov     ecx, 11
929
        mov     ecx, 11
977
        rep movsb             ;copy process name
930
        rep movsb             ;copy process name
Line 978... Line 931...
978
 
931
 
979
        mov     eax, [ebx+APPDATA.heap_base]
932
        mov     eax, [ebx+APPDATA.process]
Line 980... Line -...
980
        mov     [edx+APPDATA.heap_base], eax
-
 
981
 
-
 
982
        mov     ecx, [ebx+APPDATA.heap_top]
-
 
983
        mov     [edx+APPDATA.heap_top], ecx
933
        mov     [edx+APPDATA.process], eax
984
 
-
 
985
        mov     eax, [ebx+APPDATA.mem_size]
-
 
986
        mov     [edx+APPDATA.mem_size], eax
934
 
987
 
935
        lea     ebx, [edx+APPDATA.list]
988
        mov     ecx, [ebx+APPDATA.dir_table]
-
 
989
        mov     [edx+APPDATA.dir_table], ecx;copy page directory
-
 
990
 
-
 
Line 991... Line 936...
991
        mov     eax, [ebx+APPDATA.dlls_list_ptr]
936
        lea     ecx, [eax+PROC.thr_list]
992
        mov     [edx+APPDATA.dlls_list_ptr], eax
937
        list_add_tail ebx, ecx               ;add thread to process child's list
993
 
938
 
Line 1116... Line 1061...
1116
 
1061
 
1117
        mov     eax, edx
1062
        mov     eax, edx
1118
        add     eax, 256
1063
        add     eax, 256
Line 1119... Line 1064...
1119
        jc      @f
1064
        jc      @f
1120
 
1065
 
Line 1121... Line 1066...
1121
        cmp     eax, [SLOT_BASE+APPDATA.mem_size+ebx*8]
1066
;        cmp     eax, [SLOT_BASE+APPDATA.mem_size+ebx*8]
Line 1122... Line 1067...
1122
        ja      @f
1067
;        ja      @f
1123
 
1068
 
Line 1156... Line 1101...
1156
        test    edx, edx
1101
        test    edx, edx
1157
        jz      @F     ;application don't need path of file
1102
        jz      @F     ;application don't need path of file
1158
        mov     eax, edx
1103
        mov     eax, edx
1159
        add     eax, 1024
1104
        add     eax, 1024
1160
        jc      @f
1105
        jc      @f
1161
        cmp     eax, [SLOT_BASE+APPDATA.mem_size+ebx*8]
1106
;        cmp     eax, [SLOT_BASE+APPDATA.mem_size+ebx*8]
1162
        ja      @f
1107
;        ja      @f
1163
        stdcall strncpy, edx, [app_path], 1024
1108
        stdcall strncpy, edx, [app_path], 1024
1164
@@:
1109
@@:
1165
        mov     ebx, [slot]
1110
        mov     ebx, [slot]
1166
        mov     eax, ebx
1111
        mov     eax, ebx
1167
        shl     ebx, 5
1112
        shl     ebx, 5