Subversion Repositories Kolibri OS

Rev

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

Rev 498 Rev 501
Line 52... Line 52...
52
;;
52
;;
53
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
53
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 54... Line 54...
54
 
54
 
Line 55... Line 55...
55
include 'macros.inc'
55
include 'macros.inc'
Line 56... Line 56...
56
 
56
 
57
$Revision: 498 $
57
$Revision: 501 $
58
 
58
 
Line 550... Line 550...
550
   call set_kernel_conf					; configure devices and gui
550
   call set_kernel_conf					; configure devices and gui
551
no_lib_load:
551
no_lib_load:
Line 552... Line 552...
552
 
552
 
Line 553... Line -...
553
; LOAD FONTS I and II
-
 
554
 
-
 
555
;        mov   esi,char
-
 
556
;        xor   ebx,ebx
-
 
557
;        mov   ecx,2560
-
 
558
;        mov   edx,FONT_I
-
 
559
;        call  fs_RamdiskRead
-
 
560
 
-
 
561
;        mov   esi,char2
-
 
562
;        xor   ebx,ebx
-
 
563
;        mov   ecx,2560;26000
-
 
Line 564... Line 553...
564
;        mov   edx,FONT_II
553
; LOAD FONTS I and II
565
;        call  fs_RamdiskRead
554
 
566
 
555
 
567
	pushad
556
; pushad
568
	push	eax
557
; push eax
569
	mov		eax,char
558
; mov  eax,char
570
	call	file_system_lfn
559
; call file_system_lfn
571
	mov		eax,char2
560
; mov  eax,char2
Line -... Line 561...
-
 
561
; call file_system_lfn
-
 
562
; pop eax
Line 572... Line 563...
572
	call	file_system_lfn
563
; popad
573
	pop	eax
564
 
Line 574... Line 565...
574
	popad
565
        stdcall read_file, char, FONT_I, 0, 2560
Line 655... Line 646...
655
; SET UP OS TASK
646
; SET UP OS TASK
Line 656... Line 647...
656
 
647
 
657
        mov  esi,boot_setostask
648
        mov  esi,boot_setostask
Line 658... Line 649...
658
        call boot_log
649
        call boot_log
659
 
650
 
660
        mov eax, fpu_data
651
        xor  eax, eax
661
        mov  dword [SLOT_BASE+APPDATA.fpu_state], eax
652
        mov  dword [SLOT_BASE+APPDATA.fpu_state], fpu_data
Line 662... Line 653...
662
        mov  dword [SLOT_BASE+APPDATA.fpu_handler], 0
653
        mov  dword [SLOT_BASE+APPDATA.fpu_handler], eax
Line 663... Line 654...
663
        mov  dword [SLOT_BASE+APPDATA.sse_handler], 0
654
        mov  dword [SLOT_BASE+APPDATA.sse_handler], eax
664
 
655
 
Line 678... Line 669...
678
        mov esi, fpu_data
669
        mov esi, fpu_data
679
        mov ecx, 512/4
670
        mov ecx, 512/4
680
        cld
671
        cld
681
        rep movsd
672
        rep movsd
Line 682... Line 673...
682
 
673
 
683
        mov dword [SLOT_BASE+256+APPDATA.fpu_handler], 0
674
        mov dword [SLOT_BASE+256+APPDATA.fpu_handler], eax
684
        mov dword [SLOT_BASE+256+APPDATA.sse_handler], 0
-
 
Line 685... Line 675...
685
        mov dword [SLOT_BASE+256+APPDATA.cursor], ebx
675
        mov dword [SLOT_BASE+256+APPDATA.sse_handler], eax
686
 
676
 
687
        mov ebx, SLOT_BASE+256+APP_OBJ_OFFSET
677
        mov ebx, SLOT_BASE+256+APP_OBJ_OFFSET
Line 764... Line 754...
764
           stdcall map_page,tss._io_map_1,\
754
           stdcall map_page,tss._io_map_1,\
765
                   (tss._io_map_1-OS_BASE), PG_MAP
755
                   (tss._io_map_1-OS_BASE), PG_MAP
Line 766... Line 756...
766
 
756
 
767
; LOAD FIRST APPLICATION
757
; LOAD FIRST APPLICATION
-
 
758
        cli
-
 
759
 
768
        cli
760
if 0
769
        cmp   byte [BOOT_VAR+0x9030],1
761
        cmp   byte [BOOT_VAR+0x9030],1
Line 770... Line -...
770
        jne   no_load_vrr_m
-
 
771
 
-
 
772
;        mov ebp, vrr_m
-
 
773
;        xor ebx, ebx
-
 
774
;        xor edx, edx
-
 
775
;        call fs_execute
-
 
776
;        cmp   eax,2                  ; if vrr_m app found (PID=2)
-
 
777
;        je    first_app_found
-
 
778
 
762
        jne   no_load_vrr_m
779
 
763
 
780
        stdcall kernel_alloc, 0x100
764
        stdcall kernel_alloc, 0x100
781
        push eax    
765
        push eax
782
        mov ebx,eax
766
        mov ebx,eax
Line 788... Line 772...
788
        call fs_execute
772
        call fs_execute
789
        pop ebx
773
        pop ebx
790
        push eax
774
        push eax
791
        stdcall kernel_free, ebx
775
        stdcall kernel_free, ebx
792
        pop eax
776
        pop eax
-
 
777
 
793
        cmp   eax,2                  ; if vrr_m app found (PID=2)
778
        cmp   eax,2                  ; if vrr_m app found (PID=2)
794
        je    first_app_found
779
        je    first_app_found
Line 795... Line 780...
795
 
780
 
796
no_load_vrr_m:
-
 
797
;        mov ebp, firstapp
-
 
798
;        xor ebx, ebx
-
 
799
;        xor edx, edx
-
 
800
;        call fs_execute
-
 
801
;        cmp   eax,2                  ; continue if a process has been loaded
-
 
802
;        je    first_app_found
-
 
803
;        mov   eax, 0xDEADBEEF        ; otherwise halt
-
 
Line 804... Line 781...
804
;        hlt
781
no_load_vrr_m:
805
 
782
 
806
        stdcall kernel_alloc, 0x100
783
        stdcall kernel_alloc, 0x100
807
        push eax    
784
        push eax
Line 818... Line 795...
818
        cmp   eax,2                  ; continue if a process has been loaded
795
        cmp   eax,2                  ; continue if a process has been loaded
819
        je    first_app_found
796
        je    first_app_found
820
        mov   eax, 0xDEADBEEF        ; otherwise halt
797
        mov   eax, 0xDEADBEEF        ; otherwise halt
821
        hlt
798
        hlt
Line -... Line 799...
-
 
799
 
-
 
800
first_app_found:
-
 
801
 
-
 
802
else
-
 
803
        sub esp, 0x100
-
 
804
 
-
 
805
        cmp   byte [BOOT_VAR+0x9030],1
-
 
806
        jne   no_load_vrr_m
-
 
807
 
-
 
808
        mov ebp, esp
-
 
809
        stdcall full_file_name,vrr_m,ebp
-
 
810
 
-
 
811
        xor ebx, ebx
-
 
812
        xor edx, edx
-
 
813
        call fs_execute
-
 
814
 
-
 
815
        cmp   eax,2                  ; if vrr_m app found (PID=2)
-
 
816
        je    first_app_found
-
 
817
 
-
 
818
no_load_vrr_m:
-
 
819
 
-
 
820
        mov ebp, esp
-
 
821
        stdcall full_file_name,firstapp,ebp
-
 
822
 
-
 
823
        xor ebx, ebx
-
 
824
        xor edx, edx
-
 
825
        call fs_execute
-
 
826
 
-
 
827
        cmp   eax,2                  ; continue if a process has been loaded
-
 
828
        je    first_app_found
-
 
829
 
-
 
830
        mov   eax, 0xDEADBEEF        ; otherwise halt
Line 822... Line 831...
822
 
831
        hlt
-
 
832
 
-
 
833
first_app_found:
-
 
834
 
-
 
835
        add esp, 0x100
823
 
836
 
Line 824... Line 837...
824
first_app_found:
837
end if
825
        cli
838
        cli