Subversion Repositories Kolibri OS

Rev

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

Rev 14 Rev 21
Line 34... Line 34...
34
        sub   eax, ebx
34
        sub   eax, ebx
35
        add   eax, [edi+0x14] ; counter sum
35
        add   eax, [edi+0x14] ; counter sum
36
        mov   [edi+0x14], eax
36
        mov   [edi+0x14], eax
Line 37... Line 37...
37
 
37
 
-
 
38
        mov   ebx,[0x3000]
Line 38... Line 39...
38
        mov   ebx,[0x3000]
39
        mov   [prev_slot], ebx
39
 
40
 
Line -... Line 41...
-
 
41
        cmp   [0xffff], byte 1
40
        cmp   [0xffff], byte 1
42
        je    .do_not_change_task
41
        je    .do_not_change_task
43
 
-
 
44
 
-
 
45
      .waiting_for_termination:
-
 
46
      .waiting_for_reuse:
-
 
47
      .waiting_for_event:
-
 
48
        cmp   ebx, [0x3004]
-
 
49
        jb    @f
-
 
50
        mov   edi, 0x3000
42
 
51
        xor   ebx, ebx
43
      .waiting_for_termination:
52
      @@:
Line 44... Line 53...
44
      .waiting_for_reuse:
53
 
45
        add   edi,0x20
54
        add   edi,0x20
Line 51... Line 60...
51
        cmp   al, 4
60
        cmp   al, 4
52
        je    .waiting_for_termination
61
        je    .waiting_for_termination
53
        cmp   al, 9
62
        cmp   al, 9
54
        je    .waiting_for_reuse
63
        je    .waiting_for_reuse
Line 55... Line -...
55
 
-
 
56
        cmp   ebx,[0x3004]
-
 
57
        jbe   @f
-
 
58
        mov   ebx,1
-
 
59
        mov   edi,0x3020
-
 
60
       @@:
-
 
61
 
64
 
62
        mov   [0x3000],ebx
65
        mov   [0x3000],ebx
Line -... Line 66...
-
 
66
        mov   [0x3010],edi
-
 
67
 
-
 
68
        cmp   al, 5
-
 
69
        jne   .noevents
-
 
70
        call  get_event_for_app
-
 
71
        test  eax, eax
-
 
72
        jz    .waiting_for_event
-
 
73
        mov   [event_sched], eax
-
 
74
        mov   [edi+0xA], byte 0
-
 
75
        cmp   ebx, [prev_slot]
-
 
76
        sete  [0xffff]
-
 
77
      .noevents:
63
        mov   [0x3010],edi
78
 
Line 64... Line 79...
64
 
79
 
65
     .do_not_change_task:
80
     .do_not_change_task:
Line 90... Line 105...
90
        popad
105
        popad
91
        iret
106
        iret
Line 92... Line 107...
92
 
107
 
-
 
108
 
93
 
109
uglobal
94
uglobal
110
   align 4
95
   far_jump:
111
   far_jump:
96
    .offs dd ?
112
    .offs dd ?
97
    .sel  dw ?
113
    .sel  dw ?
98
   context_counter     dd ? ;noname & halyavin
114
   context_counter     dd ? ;noname & halyavin
-
 
115
   next_usage_update   dd ?
-
 
116
   timer_ticks         dd ?
99
   next_usage_update   dd ?
117
   prev_slot dd ?
Line 100... Line 118...
100
   timer_ticks         dd ?
118
   event_sched dd ?
101
endg
119
endg