Subversion Repositories Kolibri OS

Rev

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

Rev 3539 Rev 3545
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
 
Line 74... Line 74...
74
$Revision: 3539 $
74
$Revision: 3545 $
75
 
75
 
76
 
76
 
77
USE_COM_IRQ     equ 1      ; make irq 3 and irq 4 available for PCI devices
77
USE_COM_IRQ     equ 1      ; make irq 3 and irq 4 available for PCI devices
Line 78... Line 78...
78
 
78
 
79
; Enabling the next line will enable serial output console
79
; Enabling the next line will enable serial output console
Line 636... Line 636...
636
        mov     dword [CURRENT_TASK], 2
636
        mov     dword [CURRENT_TASK], 2
637
        mov     dword [TASK_COUNT], 2
637
        mov     dword [TASK_COUNT], 2
638
        mov     dword [current_slot], SLOT_BASE + 256*2
638
        mov     dword [current_slot], SLOT_BASE + 256*2
639
        mov     dword [TASK_BASE], CURRENT_TASK + 32*2
639
        mov     dword [TASK_BASE], CURRENT_TASK + 32*2
Line 640... Line -...
640
 
-
 
641
        stdcall kernel_alloc, 0x10000/8
-
 
642
        mov     edi, eax
-
 
643
        mov     [network_free_ports], eax
-
 
644
        or      eax, -1
-
 
645
        mov     ecx, 0x10000/32
-
 
Line 646... Line 640...
646
        rep stosd
640
 
647
 
641
 
648
; REDIRECT ALL IRQ'S TO INT'S 0x20-0x2f
642
; REDIRECT ALL IRQ'S TO INT'S 0x20-0x2f
649
        mov     esi, boot_initirq
643
        mov     esi, boot_initirq
Line 881... Line 875...
881
        stdcall map_page, tss._io_map_0, \
875
        stdcall map_page, tss._io_map_0, \
882
                [SLOT_BASE+256+APPDATA.io_map], PG_MAP
876
                [SLOT_BASE+256+APPDATA.io_map], PG_MAP
883
        stdcall map_page, tss._io_map_1, \
877
        stdcall map_page, tss._io_map_1, \
884
                [SLOT_BASE+256+APPDATA.io_map+4], PG_MAP
878
                [SLOT_BASE+256+APPDATA.io_map+4], PG_MAP
Line 885... Line -...
885
 
-
 
886
        mov     ax, [OS_BASE+0x10000+bx_from_load]
-
 
887
        cmp     ax, 'r1'; if not rused ram disk - load network configuration from files {SPraid.simba}
-
 
888
        je      no_st_network
-
 
889
        call    set_network_conf
-
 
890
  no_st_network:
-
 
891
 
879
 
892
; LOAD FIRST APPLICATION
880
; LOAD FIRST APPLICATION
Line 893... Line 881...
893
        cli
881
        cli
894
 
882
 
Line 2027... Line 2015...
2027
        mov     ecx, [current_slot]
2015
        mov     ecx, [current_slot]
2028
        call    restore_default_cursor_before_killing
2016
        call    restore_default_cursor_before_killing
2029
        popa
2017
        popa
2030
@@:
2018
@@:
2031
;--------------------------------------
2019
;--------------------------------------
-
 
2020
; kill all sockets this process owns
-
 
2021
        pusha
-
 
2022
        mov     edx, [TASK_BASE]
-
 
2023
        mov     edx, [edx+TASKDATA.pid]
-
 
2024
        call    SOCKET_process_end
-
 
2025
        popa
-
 
2026
;--------------------------------------
2032
        mov     ecx, [current_slot]
2027
        mov     ecx, [current_slot]
2033
        mov     eax, [ecx+APPDATA.tls_base]
2028
        mov     eax, [ecx+APPDATA.tls_base]
2034
        test    eax, eax
2029
        test    eax, eax
2035
        jz      @F
2030
        jz      @F
Line 2153... Line 2148...
2153
        call    request_terminate
2148
        call    request_terminate
2154
        pop     edx ecx
2149
        pop     edx ecx
2155
        test    eax, eax
2150
        test    eax, eax
2156
        jz      noprocessterminate
2151
        jz      noprocessterminate
2157
;--------------------------------------
2152
;--------------------------------------
-
 
2153
; terminate all network sockets it used
-
 
2154
        pusha
-
 
2155
        mov     eax, edx
-
 
2156
        call    SOCKET_process_end
-
 
2157
        popa
-
 
2158
;--------------------------------------
2158
        cmp     [_display.select_cursor], 0
2159
        cmp     [_display.select_cursor], 0
2159
        je      .restore_end
2160
        je      .restore_end
2160
; restore default cursor before killing
2161
; restore default cursor before killing
2161
        pusha
2162
        pusha
2162
        mov     ecx, [esp+32]
2163
        mov     ecx, [esp+32]
Line 5364... Line 5365...
5364
        mov     [esp+32], eax
5365
        mov     [esp+32], eax
5365
        ret
5366
        ret
Line 5366... Line 5367...
5366
 
5367
 
Line 5367... Line -...
5367
align 4
-
 
5368
 
-
 
5369
stack_driver_stat:
-
 
5370
 
-
 
5371
        call    app_stack_handler       ; Stack status
-
 
5372
 
-
 
5373
;     mov   [check_idle_semaphore],5    ; enable these for zero delay
-
 
5374
;     call  change_task                 ; between sent packet
-
 
5375
 
-
 
5376
        mov     [esp+32], eax
-
 
5377
        ret
-
 
5378
 
-
 
5379
align 4
-
 
5380
 
-
 
5381
socket:                                 ; Socket interface
-
 
5382
        call    app_socket_handler
-
 
5383
 
-
 
5384
;     mov   [check_idle_semaphore],5    ; enable these for zero delay
-
 
5385
;     call  change_task                 ; between sent packet
-
 
5386
 
-
 
5387
        mov     [esp+36], eax
-
 
5388
        mov     [esp+24], ebx
-
 
5389
        ret
5368
align 4
5390
 
5369
 
5391
paleholder:
5370
paleholder:
5392
        ret
5371
        ret
5393
;------------------------------------------------------------------------------
5372
;------------------------------------------------------------------------------