Subversion Repositories Kolibri OS

Rev

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

Rev 712 Rev 725
Line 53... Line 53...
53
;;
53
;;
54
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
54
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 55... Line 55...
55
 
55
 
Line 56... Line 56...
56
include 'macros.inc'
56
include 'macros.inc'
Line 57... Line 57...
57
 
57
 
Line 58... Line 58...
58
$Revision: 712 $
58
$Revision: 725 $
Line 555... Line 555...
555
        call  rerouteirqs
555
        call  rerouteirqs
Line 556... Line 556...
556
 
556
 
557
; Initialize system V86 machine
557
; Initialize system V86 machine
Line -... Line 558...
-
 
558
        call    init_sys_v86
-
 
559
 
-
 
560
; TIMER SET TO 1/100 S
-
 
561
 
-
 
562
        mov   al,0x34              ; set to 100Hz
-
 
563
        out   0x43,al
-
 
564
        mov   al,0x9b              ; lsb    1193180 / 1193
-
 
565
        out   0x40,al
-
 
566
        mov   al,0x2e              ; msb
-
 
567
        out   0x40,al
-
 
568
 
-
 
569
; Enable timer IRQ (IRQ0) and hard drives IRQs (IRQ14, IRQ15)
-
 
570
; they are used: when partitions are scanned, hd_read relies on timer
-
 
571
        mov     al, 0xFE
-
 
572
        out     0x21, al
-
 
573
        mov     al, 0x3F
558
        call    init_sys_v86
574
        out     0xA1, al
559
 
575
 
560
;!!!!!!!!!!!!!!!!!!!!!!!!!!
576
;!!!!!!!!!!!!!!!!!!!!!!!!!!
Line 561... Line 577...
561
include 'detect/disks.inc'
577
include 'detect/disks.inc'
Line 598... Line 614...
598
; mov  eax,char2
614
; mov  eax,char2
599
; call file_system_lfn
615
; call file_system_lfn
600
; pop eax
616
; pop eax
601
; popad
617
; popad
Line 602... Line 618...
602
 
618
 
603
        stdcall read_file, char, FONT_I, 0, 2560
619
        stdcall read_file, char, FONT_I, 0, 2304
Line 604... Line 620...
604
        stdcall read_file, char2, FONT_II, 0, 2560
620
        stdcall read_file, char2, FONT_II, 0, 2560
605
 
621
 
Line 630... Line 646...
630
        mov  [pci_access_enabled],1
646
        mov  [pci_access_enabled],1
Line 631... Line 647...
631
 
647
 
632
        call   detect_devices
648
        call   detect_devices
Line 633... Line -...
633
        stdcall load_driver, szPS2MDriver
-
 
634
 
-
 
635
; TIMER SET TO 1/100 S
-
 
636
 
-
 
637
        mov   esi,boot_timer
-
 
638
        call  boot_log
-
 
639
        mov   al,0x34              ; set to 100Hz
-
 
640
        out   0x43,al
-
 
641
        mov   al,0x9b              ; lsb    1193180 / 1193
-
 
642
        out   0x40,al
-
 
643
        mov   al,0x2e              ; msb
-
 
644
        out   0x40,al
649
        stdcall load_driver, szPS2MDriver
Line 645... Line 650...
645
 
650
 
646
; SET MOUSE
651
; SET MOUSE
647
 
652
 
Line 729... Line 734...
729
 
734
 
Line 730... Line 735...
730
  ; READ TSC / SECOND
735
  ; READ TSC / SECOND
731
 
736
 
-
 
737
        mov   esi,boot_tsc
732
        mov   esi,boot_tsc
738
        call  boot_log
733
        call  boot_log
739
        cli
734
        call  _rdtsc
740
        call  _rdtsc
735
        mov   ecx,eax
741
        mov   ecx,eax
736
        mov   esi,250               ; wait 1/4 a second
742
        mov   esi,250               ; wait 1/4 a second
-
 
743
        call  delay_ms
737
        call  delay_ms
744
        call  _rdtsc
738
        call  _rdtsc
745
        sti
739
        sub   eax,ecx
746
        sub   eax,ecx
740
        shl   eax,2
747
        shl   eax,2
741
        mov   [CPU_FREQ],eax          ; save tsc / sec
748
        mov   [CPU_FREQ],eax          ; save tsc / sec
Line 890... Line 897...
890
        sti
897
        sti
891
        call change_task
898
        call change_task
Line 892... Line 899...
892
 
899
 
Line 893... Line 900...
893
        jmp osloop
900
        jmp osloop
Line 894... Line 901...
894
 
901
 
Line 895... Line 902...
895
        jmp   $                      ; wait here for timer to take control
902
;        jmp   $                      ; wait here for timer to take control
896
 
903