Subversion Repositories Kolibri OS

Rev

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

Rev 7129 Rev 7132
Line 69... Line 69...
69
format binary as "mnt"
69
format binary as "mnt"
Line 70... Line 70...
70
 
70
 
71
include 'macros.inc'
71
include 'macros.inc'
Line 72... Line 72...
72
include 'struct.inc'
72
include 'struct.inc'
Line 73... Line 73...
73
 
73
 
74
$Revision: 7129 $
74
$Revision: 7132 $
Line 331... Line 331...
331
; SAVE REAL MODE VARIABLES
331
; SAVE REAL MODE VARIABLES
332
;-----------------------------------------------------------------------------
332
;-----------------------------------------------------------------------------
333
; --------------- APM ---------------------
333
; --------------- APM ---------------------
Line 334... Line 334...
334
 
334
 
335
; init selectors
335
; init selectors
336
        mov     ebx, [BOOT_VARS+BOOT_APM_ENTRY]        ; offset of APM entry point
336
        mov     ebx, [BOOT.apm_entry]        ; offset of APM entry point
337
        movzx   eax, word [BOOT_VARS+BOOT_APM_CODE_32] ; real-mode segment base address of
337
        movzx   eax, word [BOOT.apm_code_32] ; real-mode segment base address of
338
                                                                                ; protected-mode 32-bit code segment
338
                                             ; protected-mode 32-bit code segment
339
        movzx   ecx, word [BOOT_VARS+BOOT_APM_CODE_16]; real-mode segment base address of
339
        movzx   ecx, word [BOOT.apm_code_16] ; real-mode segment base address of
340
                                                                                ; protected-mode 16-bit code segment
340
                                             ; protected-mode 16-bit code segment
341
        movzx   edx, word [BOOT_VARS+BOOT_APM_DATA_16]; real-mode segment base address of
341
        movzx   edx, word [BOOT.apm_data_16] ; real-mode segment base address of
Line 342... Line 342...
342
                                                                                ; protected-mode 16-bit data segment
342
                                             ; protected-mode 16-bit data segment
343
 
343
 
344
        shl     eax, 4
344
        shl     eax, 4
Line 357... Line 357...
357
        mov     [dword apm_data_16 + 4], dl
357
        mov     [dword apm_data_16 + 4], dl
Line 358... Line 358...
358
 
358
 
359
        mov     dword[apm_entry], ebx
359
        mov     dword[apm_entry], ebx
Line 360... Line 360...
360
        mov     word [apm_entry + 4], apm_code_32 - gdts
360
        mov     word [apm_entry + 4], apm_code_32 - gdts
361
 
361
 
362
        mov     eax, [BOOT_VARS + BOOT_APM_VERSION] ; version & flags
362
        mov     eax, dword[BOOT.apm_version]   ; version & flags
363
        mov     [apm_vf], eax
363
        mov     [apm_vf], eax
364
; -----------------------------------------
364
; -----------------------------------------
Line 365... Line 365...
365
        mov     al, [BOOT_VARS+BOOT_DMA]            ; DMA access
365
        mov     al, [BOOT.dma]            ; DMA access
366
        mov     [allow_dma_access], al
366
        mov     [allow_dma_access], al
Line 367... Line 367...
367
 
367
 
368
        mov     al, [BOOT_VARS+BOOT_DEBUG_PRINT]    ; If nonzero, duplicates debug output to the screen
368
        mov     al, [BOOT.debug_print]    ; If nonzero, duplicates debug output to the screen
Line 369... Line 369...
369
        mov     [debug_direct_print], al
369
        mov     [debug_direct_print], al
370
 
370
 
371
        mov     al, [BOOT_VARS+BOOT_LAUNCHER_START] ; Start the first app (LAUNCHER) after kernel is loaded?
371
        mov     al, [BOOT.launcher_start] ; Start the first app (LAUNCHER) after kernel is loaded?
372
        mov     [launcher_start], al
372
        mov     [launcher_start], al
373
 
373
 
374
        mov     esi, BOOT_VARS+BOOT_BIOS_HD
374
        mov     esi, BOOT.bios_hd
Line 692... Line 692...
692
        call    boot_log
692
        call    boot_log
693
; Initialize system timer (IRQ0)
693
; Initialize system timer (IRQ0)
694
        call    PIT_init
694
        call    PIT_init
Line 695... Line 695...
695
 
695
 
696
; Register ramdisk file system
696
; Register ramdisk file system
697
        cmp     byte [BOOT_DEV+OS_BASE+0x10000], 1
697
        cmp     byte [BOOT.dev+0x10000], 1
Line 698... Line 698...
698
        je      @f
698
        je      @f
699
 
699
 
700
        call    register_ramdisk
700
        call    register_ramdisk
Line 783... Line 783...
783
; initialisation IDE ATA code
783
; initialisation IDE ATA code
784
;-----------------------------------------------------------------------------
784
;-----------------------------------------------------------------------------
785
include 'detect/init_ata.inc'
785
include 'detect/init_ata.inc'
786
;-----------------------------------------------------------------------------
786
;-----------------------------------------------------------------------------
787
if 0
787
if 0
788
        mov     ax, [OS_BASE+BOOT_BX_FROM_LOAD]
788
        mov     ax, [BOOT.bx_from_load]
789
        cmp     ax, 'r1'; if using not ram disk, then load librares and parameters {SPraid.simba}
789
        cmp     ax, 'r1'; if using not ram disk, then load librares and parameters {SPraid.simba}
790
        je      no_lib_load
790
        je      no_lib_load
Line 791... Line 791...
791
 
791
 
792
        mov     esi, boot_loadlibs
792
        mov     esi, boot_loadlibs
Line 1292... Line 1292...
1292
.fl60:
1292
.fl60:
1293
        in      al, 0x60
1293
        in      al, 0x60
1294
        loop    .fl60
1294
        loop    .fl60
1295
        push    eax
1295
        push    eax
Line 1296... Line 1296...
1296
 
1296
 
1297
        mov     ax, [BOOT_VARS+BOOT_Y_RES]
1297
        mov     ax, [BOOT.y_res]
1298
        shr     ax, 1
1298
        shr     ax, 1
1299
        shl     eax, 16
1299
        shl     eax, 16
1300
        mov     ax, [BOOT_VARS+BOOT_X_RES]
1300
        mov     ax, [BOOT.x_res]
1301
        shr     ax, 1
1301
        shr     ax, 1
1302
        mov     [MOUSE_X], eax
1302
        mov     [MOUSE_X], eax
Line 1303... Line 1303...
1303
        call    wakeup_osloop
1303
        call    wakeup_osloop
Line 2115... Line 2115...
2115
sysfn_shutdown:          ; 18.9 = system shutdown
2115
sysfn_shutdown:          ; 18.9 = system shutdown
2116
        cmp     ecx, SYSTEM_SHUTDOWN
2116
        cmp     ecx, SYSTEM_SHUTDOWN
2117
        jl      exit_for_anyone
2117
        jl      exit_for_anyone
2118
        cmp     ecx, SYSTEM_RESTART
2118
        cmp     ecx, SYSTEM_RESTART
2119
        jg      exit_for_anyone
2119
        jg      exit_for_anyone
2120
        mov     [BOOT_VARS+BOOT_SHUTDOWN_TYPE], cl
2120
        mov     [BOOT.shutdown_type], cl
Line 2121... Line 2121...
2121
 
2121
 
2122
        mov     eax, [TASK_COUNT]
2122
        mov     eax, [TASK_COUNT]
2123
        mov     [SYS_SHUTDOWN], al
2123
        mov     [SYS_SHUTDOWN], al
2124
        mov     [shutdown_processes], eax
2124
        mov     [shutdown_processes], eax