Subversion Repositories Kolibri OS

Rev

Rev 5093 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5093 Rev 7647
Line 41... Line 41...
41
        mcall   49,0x0000,0x0001,0x530d
41
        mcall   49,0x0000,0x0001,0x530d
42
        mcall   49,0x0000,0x0000,0x5307
42
        mcall   49,0x0000,0x0000,0x5307
43
        mcall   49,0x0000,0x0001,0x5308
43
        mcall   49,0x0000,0x0001,0x5308
44
  @@:
44
  @@:
45
        mcall   12,1
45
        mcall   12,1
46
        mcall   0,100*65536+235,100*65536+90,0x34ffffff,0x000000,title
46
        mcall   0,100*65536+320,120*65536+120,0x34ffffff,0x000000,title
47
        mcall   49,0x0000,,0x5300
47
        mcall   49,0x0000,,0x5300
48
        jnc     @f
48
        jnc     @f
49
        mcall   4,10*65536+3,0x80000000,text.4
49
        mcall   4,10*65536+12,0x90CE362B,ver.4
50
        bts     [flags], 1
50
        bts     [flags], 1
51
        jmp     .end
51
        jmp     .end
52
    @@:
52
    @@:
53
        cmp     al, 0
53
        cmp     al, 0
54
        jne     @f
54
        jne     @f
55
        mov     edx, text.1
55
        mov     edx, ver.1
56
        jmp     .0
56
        jmp     .0
57
    @@:
57
    @@:
58
        cmp     al, 1
58
        cmp     al, 1
59
        jne     @f
59
        jne     @f
60
        mov     edx, text.2
60
        mov     edx, ver.2
61
        jmp     .0
61
        jmp     .0
62
    @@:
62
    @@:
63
        mov     edx, text.3
63
        mov     edx, ver.3
64
    .0:
64
    .0:
65
        push    edx
65
        push    edx
66
        mcall   4,169*65536+3,0x80dddddd,text.0
66
        mcall   4,237*65536+3,0x80AAAaaa,ver.0
67
        pop     edx
67
        pop     edx
68
        add     ebx, 47*65536
68
        add     ebx, 47*65536
69
        mcall
69
        mcall
70
        mcall   49,0x0001,,0x530a
70
        mcall   49,0x0001,,0x530a
71
        jc      .error
71
        jc      .error
Line 117... Line 117...
117
        jmp     .2
117
        jmp     .2
118
    @@:
118
    @@:
119
        mov     edx, text.04
119
        mov     edx, text.04
120
   .2:
120
   .2:
121
        push    edx
121
        push    edx
122
        mcall   4,10*65536+20,0x80000000,text.10
122
        mcall   4,10*65536+22,0x80000000,text.10
123
        pop     edx
123
        pop     edx
124
        mcall   ,100*65536+20,
124
        mcall   ,100*65536+22,
Line 125... Line 125...
125
 
125
 
126
                                ;battery life, percentage and minutes/seconds
126
                                ;battery life, percentage and minutes/seconds
127
        mcall   ,10*65536+30,,text.20
127
        mcall   ,10*65536+34,,text.20
128
        pop     cx
128
        pop     cx
129
        cmp     cl, 0xff
129
        cmp     cl, 0xff
130
        jne     @f
130
        jne     @f
131
        mcall   ,100*65536+30,0x80000000,text.04
131
        mcall   ,100*65536+34,0x80000000,text.04
132
        pop     eax
132
        pop     eax
133
        jmp     .end
133
        jmp     .end
134
    @@:
134
    @@:
135
        shl     ecx, 24
135
        shl     ecx, 24
136
        shr     ecx, 24
136
        shr     ecx, 24
137
        mcall   47,0x80030000,,100*65536+30,0x347636
137
        mcall   47,0x80030000,,100*65536+34,0x347636
138
    .3:
138
    .3:
139
        mcall   4,115*65536+30,0x80000000,text.15
139
        mcall   4,115*65536+34,0x80000000,text.15
140
        mov     dx, [esp]
140
        mov     dx, [esp]
141
        shl     edx, 17
141
        shl     edx, 17
142
        shr     edx, 17
142
        shr     edx, 17
143
        mov     ecx, edx
143
        mov     ecx, edx
144
        mcall   47,0x80030000,,140*65536+30
144
        mcall   47,0x80030000,,140*65536+34
145
        pop     cx
145
        pop     cx
146
        mov     edx, text.21
146
        mov     edx, text.21
147
        bt      cx, 15
147
        bt      cx, 15
148
        jc      @f
148
        jc      @f
149
        mov     edx, text.22
149
        mov     edx, text.22
150
    @@:
150
    @@:
151
        mcall   4,160*65536+30,0x80000000
151
        mcall   4,160*65536+34,0x80000000
152
        pop     si
152
        pop     si
153
  .error:
153
  .error:
154
  .end:
154
  .end:
155
        ;buttons
155
        ;buttons
156
        mcall   8,148*65536+16,45*65536+15,3,0x00677ab0
156
        mcall   8,195*65536+21,56*65536+20,3,0x00BBD5E6
157
        mcall   ,166*65536+16,,4,
157
        mcall   ,219*65536+21,,4,
158
        mcall   ,184*65536+16,,5,
158
        mcall   ,243*65536+21,,5,
159
        mcall   ,202*65536+16,,6,
159
        mcall   ,267*65536+21,,6,
160
        bt      [flags], 1
160
        bt      [flags], 1
161
        jc      @f
161
        jc      @f
162
        mcall   ,65*65536+45,,2,
162
        mcall   ,86*65536+56,,2,
163
  @@:
163
  @@:
164
        mcall   4,10*65536+50,0x80564242,text.30
164
        mcall   4,10*65536+60,0x90564242,text.30
Line 165... Line 165...
165
        mcall   12,2
165
        mcall   12,2
166
 
166
 
167
still:
167
still:
Line 295... Line 295...
295
        dec     ecx
295
        dec     ecx
296
        mcall   46,1
296
        mcall   46,1
297
        ret
297
        ret
Line 298... Line 298...
298
 
298
 
299
 
299
 
300
; ДАННЫЕ ПРОГРАММЫ
300
; DATA SECTION
Line -... Line 301...
-
 
301
title db 'Advanced Power Management',0
-
 
302
flags dw 0
-
 
303
 
-
 
304
ver:
-
 
305
.0: db 'APM v.1.',0
-
 
306
.1: db '0',0
-
 
307
.2: db '1',0
301
title db '',0
308
.3: db '2',0
302
flags dw 0
-
 
303
 
-
 
304
text:
-
 
305
.0:
-
 
306
    db 'APM v.1.',0
-
 
307
.1:
-
 
308
    db '0',0
-
 
309
.2:
-
 
310
    db '1',0
-
 
311
.3:
-
 
312
    db '2',0
-
 
313
.4:
-
 
314
    db 'APM not supported',0
309
.4: db 'APM is not supported',0
315
 
-
 
316
.00:
310
 
317
     db 'power status:',0
-
 
318
.01:
311
text:
319
     db 'off-line',0
-
 
320
.02:
312
.00: db 'power status:',0
321
     db 'on-line',0
-
 
322
.03:
313
.01: db 'off-line',0
323
     db 'on backup power',0
314
.02: db 'on-line',0
324
.04:
-
 
325
     db 'unknown',0
315
.03: db 'on backup power',0
326
 
-
 
327
.10:
316
.04: db 'unknown',0
328
     db 'battery flag:',0
-
 
329
.11:
317
 
330
     db 'high',0
-
 
331
.12:
318
.10: db 'battery flag:',0
332
     db 'low',0
-
 
333
.13:
319
.11: db 'high',0
334
     db 'critical',0
-
 
335
.14:
320
.12: db 'low',0
336
     db 'charging',0
321
.13: db 'critical',0
337
.15:
-
 
338
     db ' % ,',0
322
.14: db 'charging',0
339
 
-
 
340
.20:
323
.15: db ' % ,',0
341
     db 'battery life:',0
-
 
342
.21:
324
 
Line 343... Line -...
343
     db 'min',0
-
 
344
.22:
325
.20: db 'battery life:',0
Line 345... Line 326...
345
     db 'sec',0
326
.21: db 'min',0