Subversion Repositories Kolibri OS

Rev

Rev 275 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 275 Rev 304
1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2
;                                                   ;
2
;                                                   ;
3
;    MENUBAR for KolibriOS  - Compile with fasm     ;
3
;    MENUBAR for KolibriOS  - Compile with fasm     ;
4
;                                                   ;
4
;                                                   ;
5
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
5
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
6
 
6
 
7
use32
7
use32
8
  org  0x0
8
  org  0x0
9
  db   'MENUET01'   ; 8 byte id
9
  db   'MENUET01'   ; 8 byte id
10
  dd   0x01         ; header version
10
  dd   0x01         ; header version
11
  dd   START        ; program start
11
  dd   START        ; program start
12
  dd   I_END        ; program image size
12
  dd   I_END        ; program image size
13
  dd   0xA000       ; reguired amount of memory - 10 Kb
13
  dd   0xA000       ; reguired amount of memory - 10 Kb
14
  dd   0xA000       ; esp
14
  dd   0xA000       ; esp
15
  dd   0x0,0x0      ; param, icon
15
  dd   0x0,0x0      ; param, icon
16
 
16
 
17
include 'lang.inc'
17
include 'lang.inc'
18
include 'macros.inc'
18
include 'macros.inc'
19
 
19
 
20
width           dd  305
20
width           dd  305
21
buttons         dd    1  ;  0 no frames  ; 1 frames
21
buttons         dd    1  ;  0 no frames  ; 1 frames
22
soften_up       dd    1  ;  0 no         ; 1 yes
22
soften_up       dd    1  ;  0 no         ; 1 yes
23
soften_down     dd    0  ;  0 no         ; 1 yes
23
soften_down     dd    0  ;  0 no         ; 1 yes
24
minimize_left   dd    1
24
minimize_left   dd    1
25
minimize_right  dd    1
25
minimize_right  dd    1
26
icons_position  dd   95
26
icons_position  dd   95
27
menu_enable     dd    1
27
menu_enable     dd    1
28
setup_enable    dd    0
28
setup_enable    dd    0
29
graph_text      dd    1
29
graph_text      dd    1
30
soften_middle   dd    1  ;  0 no         ; 1 yes
30
soften_middle   dd    1  ;  0 no         ; 1 yes
31
icons           dd    1  ;  0 defaults   ; 1 activate
31
icons           dd    1  ;  0 defaults   ; 1 activate
32
 
32
 
33
PANEL_HEIGHT = 18
33
PANEL_HEIGHT = 18
34
 
34
 
35
handle_key:
35
handle_key:
36
 
36
 
37
    mcall 18, 7
37
    mcall 18, 7
38
    mov  [active_process],eax
38
    mov  [active_process],eax
39
 
39
 
40
        mcall 2
40
        mcall 2
41
        cmp     al, 2
41
        cmp     al, 2
42
        jnz     begin_1.ret
42
        jnz     begin_1.ret
43
        mov     ebx, exec_fileinfo
43
        mov     ebx, exec_fileinfo
44
        shr     eax, 8
44
        shr     eax, 8
45
        cmp     al, 88
45
        cmp     al, 88
46
        jz      start_end_application
46
        jz      start_end_application
47
        cmp     al, 91
47
        cmp     al, 91
48
        jz      start_menu_application
48
        jz      start_menu_application
49
        cmp     al, 92
49
        cmp     al, 92
50
        jz      start_menu_application
50
        jz      start_menu_application
51
        cmp     al, 62
51
        cmp     al, 62
52
        jz      kill_active_application
52
        jz      kill_active_application
53
        cmp     al, 71
53
        cmp     al, 71
54
        jz      page_list_next
54
        jz      page_list_next
55
        cmp     al, 72
55
        cmp     al, 72
56
        jz      page_list_prev
56
        jz      page_list_prev
57
; this is hotkey Ctrl+Shift or LShift+RShift
57
; this is hotkey Ctrl+Shift ;or LShift+RShift
58
        mov     ebx, setup_exec
58
        mov     ebx, setup_exec
59
        test    ah, 001100b
59
;        test    ah, 001100b
60
        jnz     change_key_lang
60
;        jz      change_sys_lang
-
 
61
change_key_lang:
61
        mov     dword [ebx+8], syslang
62
        mov     dword [ebx+8], chlang
62
        mcall   70
63
        mcall   70
63
        call    syslang_music
64
        call    chlang_music
64
;       mcall   5, 25
65
;       mcall   5, 25
65
begin_1:
66
begin_1:
66
    mov  ecx,[active_process]
67
    mov  ecx,[active_process]
67
    mcall 18, 3
68
    mcall 18, 3
68
    mcall 5, 25
69
    mcall 5, 25
69
.ret:
70
.ret:
70
        ret
71
        ret
71
 
72
 
72
change_key_lang:
73
;change_sys_lang:
73
        mov     dword [ebx+8], chlang
74
;        mov     dword [ebx+8], syslang
74
        mcall   70
75
;        mcall   70
75
        call    chlang_music
76
;        call    syslang_music
76
;       mcall   5, 25
77
;;       mcall   5, 25
77
        jmp     begin_1
78
;        jmp     begin_1
78
 
79
 
79
  start_end_application:
80
  start_end_application:
80
        mov     dword [ebx+21], end_name
81
        mov     dword [ebx+21], end_name
81
        mcall   70
82
        mcall   70
82
     mcall 5 ,50
83
     mcall 5 ,50
83
     jmp   begin_1.ret
84
     jmp   begin_1.ret
84
 
85
 
85
   kill_active_application:
86
   kill_active_application:
86
     mcall  18, 7
87
     mcall  18, 7
87
     mov    ecx,eax
88
     mov    ecx,eax
88
;     mcall  9, area9
89
;     mcall  9, area9
89
;     mov    eax,area9
90
;     mov    eax,area9
90
;     mov    ecx,[eax+4]
91
;     mov    ecx,[eax+4]
91
     mcall  18, 2
92
     mcall  18, 2
92
     jmp    begin_1.ret
93
     jmp    begin_1.ret
93
 
94
 
94
   start_menu_application:
95
   start_menu_application:
95
        mov     [draw_window_1], 1
96
        mov     [draw_window_1], 1
96
        mov     dword [ebx+21], menu_name
97
        mov     dword [ebx+21], menu_name
97
        mcall   70
98
        mcall   70
98
        call    menu_music
99
        call    menu_music
99
     mcall 5,50
100
     mcall 5,50
100
     jmp   begin_1.ret
101
     jmp   begin_1.ret
101
 
102
 
102
page_list_next:
103
page_list_next:
103
    cmp  [page_list],15
104
    cmp  [page_list],15
104
    je     @f
105
    je     @f
105
    inc  [page_list]
106
    inc  [page_list]
106
    mov  [draw_window_1],1
107
    mov  [draw_window_1],1
107
  @@:
108
  @@:
108
    jmp  begin_1.ret
109
    jmp  begin_1.ret
109
 
110
 
110
page_list_prev:
111
page_list_prev:
111
    cmp  [page_list],0
112
    cmp  [page_list],0
112
    je     @f
113
    je     @f
113
    dec  [page_list]
114
    dec  [page_list]
114
    mov  [draw_window_1],1
115
    mov  [draw_window_1],1
115
  @@:
116
  @@:
116
    jmp  begin_1.ret
117
    jmp  begin_1.ret
117
 
118
 
118
active_process  dd 0
119
active_process  dd 0
119
 
120
 
120
calendar_music:
121
calendar_music:
121
    mcall 55, eax, , , calendarmusic
122
    mcall 55, eax, , , calendarmusic
122
    ret
123
    ret
123
setup_music:
124
setup_music:
124
    mcall 55,eax, , ,setupmusic
125
    mcall 55,eax, , ,setupmusic
125
    ret
126
    ret
126
sysmeter_music:
127
sysmeter_music:
127
    mcall 55,eax, , ,sysmetermusic
128
    mcall 55,eax, , ,sysmetermusic
128
    ret
129
    ret
129
button_music:
130
button_music:
130
    mcall 55,eax, , ,buttonmusic
131
    mcall 55,eax, , ,buttonmusic
131
    ret
132
    ret
132
syslang_music:
133
;syslang_music:
133
    mcall 55, eax, , , syslangmusic
134
;    mcall 55, eax, , , syslangmusic
134
    ret
135
;    ret
135
chlang_music:
136
chlang_music:
136
    mcall 55, eax, , , chlangmusic
137
    mcall 55, eax, , , chlangmusic
137
    ret
138
    ret
138
menu_music:
139
menu_music:
139
    mcall 55,eax, , ,menumusic
140
    mcall 55,eax, , ,menumusic
140
    ret
141
    ret
141
 
142
 
142
chlangmusic:    db 0x82,0x60,0x83,0x65,0x82,0x60,0
143
chlangmusic:    db 0x82,0x60,0x83,0x65,0x82,0x60,0
143
 
144
 
144
syslangmusic:   db 0x82,0x65,0x83,0x70,0x82,0x65,0
145
;syslangmusic:   db 0x82,0x65,0x83,0x70,0x82,0x65,0
145
 
146
 
146
menumusic:      db 0x82,0x50,0x84,0x48,0x82,0x50,0x84,0x53,0x82,0x51,0
147
menumusic:      db 0x82,0x50,0x84,0x48,0x82,0x50,0x84,0x53,0x82,0x51,0
147
 
148
 
148
activatemusic:  db 0x83,0x30,0x85,0x60,0
149
activatemusic:  db 0x83,0x30,0x85,0x60,0
149
 
150
 
150
buttonmusic:    db 0x85,0x25,0x85,0x40,0
151
buttonmusic:    db 0x85,0x25,0x85,0x40,0
151
 
152
 
152
sysmetermusic:  db 0x85,0x35,0x85,0x45,0
153
sysmetermusic:  db 0x85,0x35,0x85,0x45,0
153
 
154
 
154
setupmusic:     db 0x85,0x40,0x85,0x50,0
155
setupmusic:     db 0x85,0x40,0x85,0x50,0
155
 
156
 
156
calendarmusic:  db 0x85,0x37,0x85,0x48,0
157
calendarmusic:  db 0x85,0x37,0x85,0x48,0
157
 
158
 
158
;  .exit: mcall -1
159
;  .exit: mcall -1
159
 
160
 
160
 
161
 
161
START:
162
START:
162
        mcall 66,4,0,2          ; LShift+RShift
163
        mcall 66,4,0,2          ; LShift+RShift
163
        mcall 66, , ,11h        ; Ctrl+Shift
164
        mcall 66, , ,11h        ; Ctrl+Shift
164
        mcall 66,,88,110h       ; Alt+Ctrl+F12
165
        mcall 66,,88,110h       ; Alt+Ctrl+F12
165
        mcall 66,,91,100h       ; Alt+LWin
166
        mcall 66,,91,100h       ; Alt+LWin
166
        mcall 66,,92            ; Alt+RWin
167
        mcall 66,,92            ; Alt+RWin
167
        mcall 66,,62            ; Alt+F4
168
        mcall 66,,62            ; Alt+F4
168
        mcall 66,,71            ; Alt+Home
169
        mcall 66,,71            ; Alt+Home
169
        mcall 66,,72            ; Alt+Up
170
        mcall 66,,72            ; Alt+Up
170
    mcall 18, 8, 1
171
    mcall 18, 8, 1
171
    test eax, eax
172
    test eax, eax
172
    jne  @f
173
    jne  @f
173
    mcall 18, 8, 2
174
    mcall 18, 8, 2
174
  @@:
175
  @@:
175
        mov     eax, 70
176
        mov     eax, 70
176
        mov     ebx, dat_fileinfo
177
        mov     ebx, dat_fileinfo
177
        int     0x40
178
        int     0x40
178
 
179
 
179
    mov  edi,width
180
    mov  edi,width
180
    mov  esi,I_END
181
    mov  esi,I_END
181
    xor  eax,eax
182
    xor  eax,eax
182
  new_number:
183
  new_number:
183
    cmp  [esi],byte ';'
184
    cmp  [esi],byte ';'
184
    je   number_ready
185
    je   number_ready
185
    imul eax,10
186
    imul eax,10
186
    movzx ebx,byte [esi]
187
    movzx ebx,byte [esi]
187
    sub  ebx,'0'
188
    sub  ebx,'0'
188
    add  eax,ebx
189
    add  eax,ebx
189
    inc  esi
190
    inc  esi
190
    jmp  new_number
191
    jmp  new_number
191
  number_ready:
192
  number_ready:
192
    stosd
193
    stosd
193
    xor  eax,eax
194
    xor  eax,eax
194
    inc  esi
195
    inc  esi
195
    cmp  [esi],byte 'x'
196
    cmp  [esi],byte 'x'
196
    jne  new_number
197
    jne  new_number
197
 
198
 
198
        mcall   14
199
        mcall   14
199
        mov     [screen_size],eax
200
        mov     [screen_size],eax
200
 
201
 
201
        mcall   48,5
202
        mcall   48,5
202
        mov     ecx,eax
203
        mov     ecx,eax
203
        lea     edx,[ebx-PANEL_HEIGHT-1]
204
        lea     edx,[ebx-PANEL_HEIGHT-1]
204
        mcall   48,6
205
        mcall   48,6
205
 
206
 
206
    call set_variables
207
    call set_variables
207
 
208
 
208
start_after_minimize:
209
start_after_minimize:
209
 
210
 
210
    call draw_window
211
    call draw_window
211
    call draw_info
212
    call draw_info
212
    call draw_running_applications
213
    call draw_running_applications
213
 
214
 
214
    mov  eax, 23
215
    mov  eax, 23
215
    mov  ebx, 30
216
    mov  ebx, 30
216
    int  0x40
217
    int  0x40
217
 
218
 
218
still:
219
still:
219
;     mcall  13,<390,70>,<3,11>,0xffffff
220
;     mcall  13,<390,70>,<3,11>,0xffffff
220
;     mov    ecx,[button_presssed_alt]
221
;     mov    ecx,[button_presssed_alt]
221
;     mcall  47,0x80100,ecx ,400 shl 16+5,0
222
;     mcall  47,0x80100,ecx ,400 shl 16+5,0
222
 
223
 
223
    call draw_info
224
    call draw_info
224
    call draw_running_applications
225
    call draw_running_applications
225
 
226
 
226
    mov  eax, 23
227
    mov  eax, 23
227
    mov  ebx, 20
228
    mov  ebx, 20
228
    int  0x40
229
    int  0x40
229
 
230
 
230
    cmp  eax,1          ; redraw ?
231
    cmp  eax,1          ; redraw ?
231
    jz   red
232
    jz   red
232
    cmp  eax,3          ; button ?
233
    cmp  eax,3          ; button ?
233
    jz   button
234
    jz   button
234
        call    handle_key
235
        call    handle_key
235
        jmp     still
236
        jmp     still
236
 
237
 
237
  red:                   ; redraw window
238
  red:                   ; redraw window
238
 
239
 
239
        mcall   14
240
        mcall   14
240
        movzx   ecx,ax
241
        movzx   ecx,ax
241
        mov     edx,eax
242
        mov     edx,eax
242
        shr     edx,16
243
        shr     edx,16
243
        cmp     [screen_size.height],ax
244
        cmp     [screen_size.height],ax
244
        jne     @f
245
        jne     @f
245
        rol     eax,16
246
        rol     eax,16
246
        cmp     [screen_size.width],ax
247
        cmp     [screen_size.width],ax
247
        je      .lp1
248
        je      .lp1
248
        rol     eax,16
249
        rol     eax,16
249
    @@: mov     [screen_size],eax
250
    @@: mov     [screen_size],eax
250
        sub     ecx,PANEL_HEIGHT
251
        sub     ecx,PANEL_HEIGHT
251
        mcall   67,0,,,PANEL_HEIGHT
252
        mcall   67,0,,,PANEL_HEIGHT
252
 
253
 
253
  .lp1:
254
  .lp1:
254
    call draw_window
255
    call draw_window
255
    call draw_info
256
    call draw_info
256
    jmp  still
257
    jmp  still
257
 
258
 
258
  button:                ; button
259
  button:                ; button
259
    mov  eax,17
260
    mov  eax,17
260
    int  0x40
261
    int  0x40
261
 
262
 
262
    cmp  ah,50
263
    cmp  ah,50
263
    jb   no_activate
264
    jb   no_activate
264
    cmp  ah,70
265
    cmp  ah,70
265
    jg   no_activate
266
    jg   no_activate
266
 
267
 
267
    movzx ecx,byte ah
268
    movzx ecx,byte ah
268
    sub  ecx,52
269
    sub  ecx,52
269
    shl  ecx,2
270
    shl  ecx,2
270
 
271
 
271
    mov  eax,18
272
    mov  eax,18
272
    mov  ebx,3
273
    mov  ebx,3
273
    mov  ecx,[app_list+ecx]
274
    mov  ecx,[app_list+ecx]
274
    int  0x40
275
    int  0x40
275
;    cmp  [music_type],0
276
;    cmp  [music_type],0
276
;    je   still
277
;    je   still
277
    mcall 55,eax, , ,activatemusic
278
    mcall 55,eax, , ,activatemusic
278
    jmp  still
279
    jmp  still
279
  no_activate:
280
  no_activate:
280
 
281
 
281
 
282
 
282
    cmp  ah,101           ; minimize to left
283
    cmp  ah,101           ; minimize to left
283
    je   left_button
284
    je   left_button
284
 
285
 
285
    cmp  ah,102           ; minimize to right
286
    cmp  ah,102           ; minimize to right
286
    je   right_button
287
    je   right_button
287
 
288
 
288
    cmp  ah,byte 1        ; start/terminate menu
289
    cmp  ah,byte 1        ; start/terminate menu
289
    jnz  noselect
290
    jnz  noselect
290
    call menu_handler
291
    call menu_handler
291
;    cmp  [music_type],0
292
;    cmp  [music_type],0
292
;    je   still
293
;    je   still
293
    call menu_music
294
    call menu_music
294
    jmp  still
295
    jmp  still
295
  noselect:
296
  noselect:
296
 
297
 
297
        mov     ebx, exec_fileinfo
298
        mov     ebx, exec_fileinfo
298
    cmp  ah,byte 2             ; start calendar
299
    cmp  ah,byte 2             ; start calendar
299
    jnz  noid15  ;noclock
300
    jnz  noid15  ;noclock
300
        mov     dword [ebx+21], calendar_name
301
        mov     dword [ebx+21], calendar_name
301
        mov     eax, 70
302
        mov     eax, 70
302
        int     0x40
303
        int     0x40
303
    call calendar_music
304
    call calendar_music
304
    jmp  still
305
    jmp  still
305
 
306
 
306
  noid15:
307
  noid15:
307
    cmp  ah,16
308
    cmp  ah,16
308
    jne  noid16
309
    jne  noid16
309
        mov     ebx, setup_exec
310
        mov     ebx, setup_exec
310
        mov     dword [ebx+8], chlang
311
        mov     dword [ebx+8], chlang
311
        mov     eax, 70
312
        mov     eax, 70
312
        int     0x40
313
        int     0x40
313
    call chlang_music
314
    call chlang_music
314
    mcall 5, 25
315
    mcall 5, 25
315
    jmp  still
316
    jmp  still
316
 
317
 
317
  noid16:
318
  noid16:
318
    cmp  ah,17
319
;    cmp  ah,17
319
    jne  noid17
320
;    jne  noid17
320
        mov     ebx, setup_exec
321
;        mov     ebx, setup_exec
321
        mov     dword [ebx+8], syslang
322
;        mov     dword [ebx+8], syslang
322
        mov     eax, 70
323
;        mov     eax, 70
323
        int     0x40
324
;        int     0x40
324
    call syslang_music
325
;    call syslang_music
325
    mcall 5, 25
326
;    mcall 5, 25
326
    jmp  still
327
;    jmp  still
327
 
328
;
328
  noid17:
329
;  noid17:
329
    cmp  ah,18
330
    cmp  ah,18
330
    jne  noid18
331
    jne  noid18
331
        mov     dword [ebx+21], sysmeter_name
332
        mov     dword [ebx+21], sysmeter_name
332
        mov     eax, 70
333
        mov     eax, 70
333
        int     0x40
334
        int     0x40
334
    call sysmeter_music
335
    call sysmeter_music
335
    jmp  still
336
    jmp  still
336
 
337
 
337
  noid18:
338
  noid18:
338
    cmp  ah,19
339
    cmp  ah,19
339
    jne  noid19
340
    jne  noid19
340
;    inc  [music_type]
341
;    inc  [music_type]
341
;    and  [music_type],1
342
;    and  [music_type],1
342
    mcall 18,8,2
343
    mcall 18,8,2
343
;    mcall 18,8
344
;    mcall 18,8
344
;    mov [sound_flag],al
345
;    mov [sound_flag],al
345
 
346
 
346
;    mcall 15,4,2
347
;    mcall 15,4,2
347
    mcall 15,3
348
    mcall 15,3
348
    jmp  red
349
    jmp  red
349
 
350
 
350
  noid19:
351
  noid19:
351
    cmp  ah,20             ; start system setup
352
    cmp  ah,20             ; start system setup
352
    jnz  noid20
353
    jnz  noid20
353
        mov     ebx, setup_exec
354
        mov     ebx, setup_exec
354
        and     dword [ebx+8], 0
355
        and     dword [ebx+8], 0
355
        mov     eax, 70
356
        mov     eax, 70
356
        int     0x40
357
        int     0x40
357
    call setup_music
358
    call setup_music
358
    jmp still
359
    jmp still
359
 
360
 
360
 noid20:
361
 noid20:
361
    cmp  ah,21
362
    cmp  ah,21
362
    jnz  noid21
363
    jnz  noid21
363
    cmp  [page_list],15
364
    cmp  [page_list],15
364
    je     @f
365
    je     @f
365
    inc  [page_list]
366
    inc  [page_list]
366
    jmp  red
367
    jmp  red
367
  @@:
368
  @@:
368
    jmp still
369
    jmp still
369
 
370
 
370
 noid21:
371
 noid21:
371
    cmp  ah,22
372
    cmp  ah,22
372
    jnz  noid22
373
    jnz  noid22
373
    cmp  [page_list],0
374
    cmp  [page_list],0
374
    je     @f
375
    je     @f
375
    dec  [page_list]
376
    dec  [page_list]
376
    jmp  red
377
    jmp  red
377
  @@:
378
  @@:
378
    jmp  still
379
    jmp  still
379
 
380
 
380
 noid22:
381
 noid22:
381
 
382
 
382
    jmp  still
383
    jmp  still
383
 
384
 
384
 
385
 
385
 
386
 
386
draw_running_applications:
387
draw_running_applications:
387
 
388
 
388
    pusha
389
    pusha
389
 
390
 
390
    cmp  [icons],1
391
    cmp  [icons],1
391
    jne  dr_ret
392
    jne  dr_ret
392
 
393
 
393
    call calculate_applications
394
    call calculate_applications
394
 
395
 
395
    cmp  edi,[running_applications]
396
    cmp  edi,[running_applications]
396
    jne  noret
397
    jne  noret
397
    popa
398
    popa
398
    ret
399
    ret
399
  noret:
400
  noret:
400
 
401
 
401
;    cmp  edi,[running_applications]
402
;    cmp  edi,[running_applications]
402
;    jge  no_application_decrease
403
;    jge  no_application_decrease
403
    call draw_window
404
    call draw_window
404
;  no_application_decrease:
405
;  no_application_decrease:
405
 
406
 
406
    mov  [running_applications],edi
407
    mov  [running_applications],edi
407
 
408
 
408
    mov  edi,0
409
    mov  edi,0
409
    mov  ecx,2
410
    mov  ecx,2
410
    mov  [contrast],0
411
    mov  [contrast],0
411
    mov  eax,[max_applications]
412
    mov  eax,[max_applications]
412
    mul  [page_list]
413
    mul  [page_list]
413
    test eax,eax
414
    test eax,eax
414
    je    @f
415
    je    @f
415
    inc  eax
416
    inc  eax
416
  @@:
417
  @@:
417
    mov  [draw_start_position],eax
418
    mov  [draw_start_position],eax
418
 
419
 
419
 
420
 
420
  newpr:
421
  newpr:
421
 
422
 
422
    mov  eax,9
423
    mov  eax,9
423
    mov  ebx,0x8000
424
    mov  ebx,0x8000
424
    int  0x40
425
    int  0x40
425
 
426
 
426
    push eax
427
    push eax
427
    push ecx
428
    push ecx
428
 
429
 
429
    cmp  eax,ecx
430
    cmp  eax,ecx
430
    jb   norpl2
431
    jb   norpl2
431
 
432
 
432
    cmp  byte [0x8000+10], '@'
433
    cmp  byte [0x8000+10], '@'
433
    je   norpl
434
    je   norpl
434
    cmp  [0x8000+10],dword 'ICON'
435
    cmp  [0x8000+10],dword 'ICON'
435
    jne  .noicon
436
    jne  .noicon
436
    cmp  dword[0x8000+42],51
437
    cmp  dword[0x8000+42],51
437
    jne  .noicon
438
    jne  .noicon
438
    cmp  dword[0x8000+46],51
439
    cmp  dword[0x8000+46],51
439
    je   norpl
440
    je   norpl
440
  .noicon:
441
  .noicon:
441
    cmp  [0x8000+11],dword 'ENU '
442
    cmp  [0x8000+11],dword 'ENU '
442
    je   norpl
443
    je   norpl
443
;    cmp  [0x8000+12],dword 'NEL '
444
;    cmp  [0x8000+12],dword 'NEL '
444
;    je   norpl
445
;    je   norpl
445
    cmp  [0x8000+10],dword '    '
446
    cmp  [0x8000+10],dword '    '
446
    je   norpl
447
    je   norpl
447
    dec  [draw_start_position]
448
    dec  [draw_start_position]
448
    cmp  [draw_start_position],0
449
    cmp  [draw_start_position],0
449
    jg    norpl
450
    jg    norpl
450
    mov  eax,13
451
    mov  eax,13
451
    mov  ebx,edi
452
    mov  ebx,edi
452
    inc  ebx
453
    inc  ebx
453
    shl  ebx,16
454
    shl  ebx,16
454
    imul ebx,6*10
455
    imul ebx,6*10
455
    add  ebx,17 shl 16+54
456
    add  ebx,17 shl 16+54
456
    mov  ecx,3 shl 16+14
457
    mov  ecx,3 shl 16+14
457
    xor  edx,edx
458
    xor  edx,edx
458
    sub  ebx,10 shl 16
459
    sub  ebx,10 shl 16
459
    int  0x40
460
    int  0x40
460
 
461
 
461
    sub  ebx,1 shl 16
462
    sub  ebx,1 shl 16
462
    mov  bx,1
463
    mov  bx,1
463
    mov  ecx,4 shl 16+12
464
    mov  ecx,4 shl 16+12
464
    int  0x40
465
    int  0x40
465
 
466
 
466
    sub  ebx,1 shl 16
467
    sub  ebx,1 shl 16
467
    mov  ecx,5 shl 16+10
468
    mov  ecx,5 shl 16+10
468
    int  0x40
469
    int  0x40
469
 
470
 
470
    add  ebx,56 shl 16
471
    add  ebx,56 shl 16
471
    mov  ecx,4 shl 16+12
472
    mov  ecx,4 shl 16+12
472
    int  0x40
473
    int  0x40
473
 
474
 
474
    add  ebx,1 shl 16
475
    add  ebx,1 shl 16
475
    mov  ecx,5 shl 16+10
476
    mov  ecx,5 shl 16+10
476
    int  0x40
477
    int  0x40
477
 
478
 
478
    inc  [contrast]
479
    inc  [contrast]
479
    and  [contrast],1
480
    and  [contrast],1
480
    cmp  [contrast],1
481
    cmp  [contrast],1
481
    je   contrast1
482
    je   contrast1
482
    mov  edx,0x88ff
483
    mov  edx,0x88ff
483
    jmp  contrast2
484
    jmp  contrast2
484
contrast1:
485
contrast1:
485
    mov  edx,0x55ff
486
    mov  edx,0x55ff
486
contrast2:
487
contrast2:
487
    sub  ebx,55 shl 16
488
    sub  ebx,55 shl 16
488
    mov  bx,54
489
    mov  bx,54
489
    mov  ecx,4 shl 16+12
490
    mov  ecx,4 shl 16+12
490
;    mov  edx,0x66ff
491
;    mov  edx,0x66ff
491
    int  0x40
492
    int  0x40
492
 
493
 
493
    sub  ebx,1 shl 16
494
    sub  ebx,1 shl 16
494
    mov  bx,1
495
    mov  bx,1
495
    mov  ecx,5 shl 16+10
496
    mov  ecx,5 shl 16+10
496
    int  0x40
497
    int  0x40
497
 
498
 
498
    add  ebx,55 shl 16
499
    add  ebx,55 shl 16
499
    int  0x40
500
    int  0x40
500
 
501
 
501
    mov  eax,4
502
    mov  eax,4
502
    mov  ebx,edi
503
    mov  ebx,edi
503
    inc  ebx
504
    inc  ebx
504
    shl  ebx,16
505
    shl  ebx,16
505
    imul ebx,6*10  ;13
506
    imul ebx,6*10  ;13
506
    add  ebx,20*65536+7
507
    add  ebx,20*65536+7
507
    mov  ecx,0xffffff  ;[wcolor]
508
    mov  ecx,0xffffff  ;[wcolor]
508
;    add  ecx,0x303030
509
;    add  ecx,0x303030
509
    mov  edx,0x8000+10
510
    mov  edx,0x8000+10
510
    mov  esi,11
511
    mov  esi,11
511
    sub  ebx,10 shl 16
512
    sub  ebx,10 shl 16
512
    int  0x40
513
    int  0x40
513
 
514
 
514
  norpl2:
515
  norpl2:
515
 
516
 
516
    inc  edi
517
    inc  edi
517
 
518
 
518
  norpl:
519
  norpl:
519
 
520
 
520
    pop  ecx
521
    pop  ecx
521
    pop  eax
522
    pop  eax
522
 
523
 
523
    inc  ecx
524
    inc  ecx
524
 
525
 
525
    cmp  edi,[max_applications]
526
    cmp  edi,[max_applications]
526
    jb   newpr
527
    jb   newpr
527
 
528
 
528
  nompr:
529
  nompr:
529
 
530
 
530
  dr_ret:
531
  dr_ret:
531
 
532
 
532
    popa
533
    popa
533
 
534
 
534
    ret
535
    ret
535
 
536
 
536
 
537
 
537
calculate_applications:
538
calculate_applications:
538
 
539
 
539
    mov  eax,[max_applications]
540
    mov  eax,[max_applications]
540
    mul  [page_list]
541
    mul  [page_list]
541
    test eax,eax
542
    test eax,eax
542
    je    @f
543
    je    @f
543
    inc  eax
544
    inc  eax
544
  @@:
545
  @@:
545
    mov  [draw_start_position],eax
546
    mov  [draw_start_position],eax
546
 
547
 
547
    mov  edi,app_list
548
    mov  edi,app_list
548
    mov  ecx,20
549
    mov  ecx,20
549
    mov  eax,0xff
550
    mov  eax,0xff
550
    cld
551
    cld
551
    rep  stosd
552
    rep  stosd
552
 
553
 
553
    mov  edi,0
554
    mov  edi,0
554
    mov  ecx,2
555
    mov  ecx,2
555
 
556
 
556
  cnewpr:
557
  cnewpr:
557
 
558
 
558
    mov  eax,9
559
    mov  eax,9
559
    mov  ebx,0x8000
560
    mov  ebx,0x8000
560
    int  0x40
561
    int  0x40
561
 
562
 
562
    cmp  byte [0x8000+10], '@'
563
    cmp  byte [0x8000+10], '@'
563
    je   cnorpl
564
    je   cnorpl
564
    cmp  [0x8000+10],dword 'ICON'
565
    cmp  [0x8000+10],dword 'ICON'
565
    jne  .noicon
566
    jne  .noicon
566
    cmp  dword[0x8000+42],51
567
    cmp  dword[0x8000+42],51
567
    jne  .noicon
568
    jne  .noicon
568
    cmp  dword[0x8000+46],51
569
    cmp  dword[0x8000+46],51
569
    je   cnorpl
570
    je   cnorpl
570
  .noicon:
571
  .noicon:
571
    cmp  [0x8000+11],dword 'CON '
572
    cmp  [0x8000+11],dword 'CON '
572
    je   cnorpl
573
    je   cnorpl
573
    cmp  [0x8000+11],dword 'ENU '
574
    cmp  [0x8000+11],dword 'ENU '
574
    je   cnorpl
575
    je   cnorpl
575
;    cmp  [0x8000+12],dword 'NEL '
576
;    cmp  [0x8000+12],dword 'NEL '
576
;    je   cnorpl
577
;    je   cnorpl
577
    cmp  [0x8000+10],dword '    '
578
    cmp  [0x8000+10],dword '    '
578
    je   cnorpl
579
    je   cnorpl
579
    dec  [draw_start_position]
580
    dec  [draw_start_position]
580
    cmp  [draw_start_position],0
581
    cmp  [draw_start_position],0
581
    jg     cnorpl
582
    jg     cnorpl
582
 
583
 
583
    mov  [app_list+edi*4],ecx
584
    mov  [app_list+edi*4],ecx
584
 
585
 
585
    inc  edi
586
    inc  edi
586
 
587
 
587
  cnorpl:
588
  cnorpl:
588
    inc  ecx
589
    inc  ecx
589
 
590
 
590
    cmp  eax,ecx
591
    cmp  eax,ecx
591
    jge  cnewpr
592
    jge  cnewpr
592
 
593
 
593
    ret
594
    ret
594
 
595
 
595
 
596
 
596
draw_application_buttons:
597
draw_application_buttons:
597
 
598
 
598
    pusha
599
    pusha
599
 
600
 
600
    cmp [icons],1
601
    cmp [icons],1
601
    jne da_ret
602
    jne da_ret
602
 
603
 
603
    mov  eax,14
604
    mov  eax,14
604
    int  0x40
605
    int  0x40
605
 
606
 
606
    shr  eax,16
607
    shr  eax,16
607
 
608
 
608
    cmp  eax,639
609
    cmp  eax,639
609
    jne  now1
610
    jne  now1
610
    mov  [max_applications],7   ;6
611
    mov  [max_applications],7   ;6
611
  now1:
612
  now1:
612
    cmp  eax,799
613
    cmp  eax,799
613
    jne  now2
614
    jne  now2
614
    mov  [max_applications],9 ;10    ;8
615
    mov  [max_applications],9 ;10    ;8
615
  now2:
616
  now2:
616
    cmp  eax,1023
617
    cmp  eax,1023
617
    jne  now3
618
    jne  now3
618
    mov  [max_applications],12 ;13   ;8
619
    mov  [max_applications],12 ;13   ;8
619
  now3:
620
  now3:
620
    cmp  eax,1279
621
    cmp  eax,1279
621
    jne  now4
622
    jne  now4
622
    mov  [max_applications],17 ;18    ;8
623
    mov  [max_applications],17 ;18    ;8
623
  now4:
624
  now4:
624
    mov  edi,1
625
    mov  edi,1
625
 
626
 
626
  nb:
627
  nb:
627
 
628
 
628
    mov  eax,8
629
    mov  eax,8
629
    mov  ebx,edi
630
    mov  ebx,edi
630
    shl  ebx,16
631
    shl  ebx,16
631
    imul ebx,6*10            ;13
632
    imul ebx,6*10            ;13
632
    add  ebx,15*65536+10*6-1  ;13
633
    add  ebx,15*65536+10*6-1  ;13
633
    mov  ecx,1*65536+17
634
    mov  ecx,1*65536+17
634
    mov  edx,edi
635
    mov  edx,edi
635
    add  edx,51
636
    add  edx,51
636
    cmp  [buttons],1
637
    cmp  [buttons],1
637
    je   bufr
638
    je   bufr
638
    or   edx,0x60000000
639
    or   edx,0x60000000
639
  bufr:
640
  bufr:
640
    mov  esi,[wcolor]
641
    mov  esi,[wcolor]
641
    sub  ebx,11 shl 16
642
    sub  ebx,11 shl 16
642
    int  0x40
643
    int  0x40
643
 
644
 
644
    inc  edi
645
    inc  edi
645
    cmp  edi,[max_applications]
646
    cmp  edi,[max_applications]
646
    jbe  nb
647
    jbe  nb
647
 
648
 
648
  da_ret:
649
  da_ret:
649
 
650
 
650
    popa
651
    popa
651
 
652
 
652
    ret
653
    ret
653
 
654
 
654
 
655
 
655
menu_handler:
656
menu_handler:
656
        mov     eax, 70
657
        mov     eax, 70
657
        mov     ebx, exec_fileinfo
658
        mov     ebx, exec_fileinfo
658
        mov     dword [ebx+21], menu_name
659
        mov     dword [ebx+21], menu_name
659
        int     0x40
660
        int     0x40
660
        ret
661
        ret
661
 
662
 
662
draw_small_right:
663
draw_small_right:
663
 
664
 
664
    pusha
665
    pusha
665
 
666
 
666
    mov  eax,12
667
    mov  eax,12
667
    mov  ebx,1
668
    mov  ebx,1
668
    int  0x40
669
    int  0x40
669
 
670
 
670
    mov  eax,0
671
    mov  eax,0
671
    mov  edx,[wcolor]
672
    mov  edx,[wcolor]
672
    mov  esi,edx
673
    mov  esi,edx
673
    mov  edi,edx
674
    mov  edi,edx
674
    or   edx, 0x01000000
675
    or   edx, 0x01000000
675
    int  0x40
676
    int  0x40
676
 
677
 
677
    mov  eax,8
678
    mov  eax,8
678
    mov  ebx,0*65536+9
679
    mov  ebx,0*65536+9
679
    mov  ecx,0*65536
680
    mov  ecx,0*65536
680
    mov  cx,[b_size_y]
681
    mov  cx,[b_size_y]
681
    mov  edx,1
682
    mov  edx,1
682
    mov  esi,[wcolor]
683
    mov  esi,[wcolor]
683
    int  0x40
684
    int  0x40
684
 
685
 
685
    mov  eax,4
686
    mov  eax,4
686
    mov  ebx,2*65536+16
687
    mov  ebx,2*65536+16
687
    cmp  [graph_text],1
688
    cmp  [graph_text],1
688
    jne  nos3
689
    jne  nos3
689
    mov  ebx,2*65536+7
690
    mov  ebx,2*65536+7
690
  nos3:
691
  nos3:
691
    mov  ecx,[wcolor]
692
    mov  ecx,[wcolor]
692
    add  ecx,0x303030
693
    add  ecx,0x303030
693
    mov  edx,hidetext
694
    mov  edx,hidetext
694
    mov  esi,1
695
    mov  esi,1
695
    int  0x40
696
    int  0x40
696
 
697
 
697
    mov  eax,12
698
    mov  eax,12
698
    mov  ebx,2
699
    mov  ebx,2
699
    int  0x40
700
    int  0x40
700
 
701
 
701
    popa
702
    popa
702
 
703
 
703
    ret
704
    ret
704
 
705
 
705
 
706
 
706
 
707
 
707
draw_small_left:
708
draw_small_left:
708
 
709
 
709
    pusha
710
    pusha
710
 
711
 
711
    mov  eax,12
712
    mov  eax,12
712
    mov  ebx,1
713
    mov  ebx,1
713
    int  0x40
714
    int  0x40
714
 
715
 
715
    mov  eax,0
716
    mov  eax,0
716
    mov  edx,[wcolor]
717
    mov  edx,[wcolor]
717
    mov  esi,edx
718
    mov  esi,edx
718
    mov  edi,edx
719
    mov  edi,edx
719
    or   edx, 0x01000000
720
    or   edx, 0x01000000
720
    int  0x40
721
    int  0x40
721
 
722
 
722
    cmp  [graph_text],1
723
    cmp  [graph_text],1
723
    je   nos4
724
    je   nos4
724
 
725
 
725
    mov  eax,8
726
    mov  eax,8
726
    mov  ebx,0*65536+9
727
    mov  ebx,0*65536+9
727
    mov  ecx,0*65536+18-6
728
    mov  ecx,0*65536+18-6
728
    mov  edx,2
729
    mov  edx,2
729
    mov  esi,[wcolor]
730
    mov  esi,[wcolor]
730
    int  0x40
731
    int  0x40
731
 
732
 
732
    mov  eax,4
733
    mov  eax,4
733
    mov  ebx,2*65536+4
734
    mov  ebx,2*65536+4
734
    mov  ecx,[wcolor]
735
    mov  ecx,[wcolor]
735
    add  ecx,0x303030
736
    add  ecx,0x303030
736
    mov  edx,hidetext+2
737
    mov  edx,hidetext+2
737
    mov  esi,1
738
    mov  esi,1
738
    int  0x40
739
    int  0x40
739
 
740
 
740
  nos4:
741
  nos4:
741
 
742
 
742
    mov  eax,8
743
    mov  eax,8
743
    mov  ebx,0*65536+9
744
    mov  ebx,0*65536+9
744
    mov  ecx,13*65536+25
745
    mov  ecx,13*65536+25
745
    cmp  [graph_text],1
746
    cmp  [graph_text],1
746
    jne  nos6
747
    jne  nos6
747
    mov  ecx,0*65536
748
    mov  ecx,0*65536
748
    mov  cx,word [b_size_y]
749
    mov  cx,word [b_size_y]
749
  nos6:
750
  nos6:
750
    mov  edx,1
751
    mov  edx,1
751
    mov  esi,[wcolor]
752
    mov  esi,[wcolor]
752
    int  0x40
753
    int  0x40
753
 
754
 
754
    mov  eax,4
755
    mov  eax,4
755
    mov  ebx,3*65536+22
756
    mov  ebx,3*65536+22
756
    cmp  [graph_text],1
757
    cmp  [graph_text],1
757
    jne  nos7
758
    jne  nos7
758
    mov  ebx,3*65536+7
759
    mov  ebx,3*65536+7
759
  nos7:
760
  nos7:
760
    mov  ecx,[wcolor]
761
    mov  ecx,[wcolor]
761
    add  ecx,0x303030
762
    add  ecx,0x303030
762
    mov  edx,hidetext+1
763
    mov  edx,hidetext+1
763
    mov  esi,1
764
    mov  esi,1
764
    int  0x40
765
    int  0x40
765
 
766
 
766
    mov  eax,12
767
    mov  eax,12
767
    mov  ebx,2
768
    mov  ebx,2
768
    int  0x40
769
    int  0x40
769
 
770
 
770
    popa
771
    popa
771
    ret
772
    ret
772
 
773
 
773
 
774
 
774
;-------------------------------------------------
775
;-------------------------------------------------
775
 
776
 
776
right_button:
777
right_button:
777
 
778
 
778
    call button_music
779
    call button_music
779
 
780
 
780
    mov  [small_draw],dword draw_small_right
781
    mov  [small_draw],dword draw_small_right
781
 
782
 
782
    mcall 14
783
    mcall 14
783
    shr eax, 16
784
    shr eax, 16
784
    mov ebx, eax
785
    mov ebx, eax
785
    mov ecx, -1
786
    mov ecx, -1
786
    mov edx, 9
787
    mov edx, 9
787
    sub ebx, edx
788
    sub ebx, edx
788
    mov esi, -1
789
    mov esi, -1
789
    mcall 67
790
    mcall 67
790
 
791
 
791
    call draw_small_right
792
    call draw_small_right
792
 
793
 
793
    jmp  small_wait
794
    jmp  small_wait
794
 
795
 
795
;-------------------------------------------------
796
;-------------------------------------------------
796
 
797
 
797
left_button:
798
left_button:
798
 
799
 
799
    call  button_music
800
    call  button_music
800
 
801
 
801
    mov  [small_draw],dword draw_small_left
802
    mov  [small_draw],dword draw_small_left
802
 
803
 
803
    mov   ebx, 0
804
    mov   ebx, 0
804
    mov   edx, 9
805
    mov   edx, 9
805
    mov   ecx, -1
806
    mov   ecx, -1
806
    mov   esi, -1
807
    mov   esi, -1
807
    mcall 67
808
    mcall 67
808
 
809
 
809
    call draw_small_left
810
    call draw_small_left
810
 
811
 
811
;-------------------------------------------------
812
;-------------------------------------------------
812
 
813
 
813
  small_wait:
814
  small_wait:
814
 
815
 
815
    mov  eax, 10
816
    mov  eax, 10
816
    int  0x40
817
    int  0x40
817
 
818
 
818
    cmp  eax,1
819
    cmp  eax,1
819
    jne  no_win
820
    jne  no_win
820
    call [small_draw]
821
    call [small_draw]
821
    jmp  small_wait
822
    jmp  small_wait
822
  no_win:
823
  no_win:
823
    cmp  eax,2
824
    cmp  eax,2
824
    jne  no_key
825
    jne  no_key
825
    call handle_key
826
    call handle_key
826
    jmp  small_wait
827
    jmp  small_wait
827
no_key:
828
no_key:
828
 
829
 
829
    mov  eax,17
830
    mov  eax,17
830
    int  0x40
831
    int  0x40
831
 
832
 
832
    cmp  ah,1
833
    cmp  ah,1
833
    jne  no_full
834
    jne  no_full
834
 
835
 
835
    mov   eax, 14                   ; get screen max x & max y
836
    mov   eax, 14                   ; get screen max x & max y
836
    int   0x40
837
    int   0x40
837
    mov   edx, eax
838
    mov   edx, eax
838
    shr   edx, 16
839
    shr   edx, 16
839
    xor   ebx, ebx
840
    xor   ebx, ebx
840
    mov   ecx, -1
841
    mov   ecx, -1
841
    mov   esi, -1
842
    mov   esi, -1
842
    mcall 67 ; x0 y0 xs ys
843
    mcall 67 ; x0 y0 xs ys
843
 
844
 
844
    call  button_music
845
    call  button_music
845
 
846
 
846
    jmp   still
847
    jmp   still
847
 
848
 
848
 
849
 
849
  no_full:
850
  no_full:
850
 
851
 
851
    call menu_handler
852
    call menu_handler
852
 
853
 
853
    jmp  small_wait
854
    jmp  small_wait
854
 
855
 
855
 
856
 
856
 
857
 
857
set_variables:
858
set_variables:
858
 
859
 
859
     pusha
860
     pusha
860
 
861
 
861
     mov  [b_size_y],dword 38
862
     mov  [b_size_y],dword 38
862
     cmp  [graph_text],1
863
     cmp  [graph_text],1
863
     jne  noy2
864
     jne  noy2
864
     mov  [b_size_y],dword 18
865
     mov  [b_size_y],dword 18
865
   noy2:
866
   noy2:
866
 
867
 
867
     mov  [button_frames],0x0
868
     mov  [button_frames],0x0
868
     cmp  [buttons],0
869
     cmp  [buttons],0
869
     jne  no_frames
870
     jne  no_frames
870
     mov  [button_frames],0x40000000
871
     mov  [button_frames],0x40000000
871
   no_frames:
872
   no_frames:
872
 
873
 
873
 
874
 
874
     mov  eax,48           ; 3d button look
875
     mov  eax,48           ; 3d button look
875
     mov  ebx,1
876
     mov  ebx,1
876
     mov  ecx,1
877
     mov  ecx,1
877
     int  0x40
878
     int  0x40
878
 
879
 
879
     mov  eax,0x40404040   ; dividers for processes
880
     mov  eax,0x40404040   ; dividers for processes
880
     mov  edi,pros
881
     mov  edi,pros
881
     mov  ecx,10
882
     mov  ecx,10
882
     cld
883
     cld
883
     rep  stosd
884
     rep  stosd
884
 
885
 
885
     popa
886
     popa
886
     ret
887
     ret
887
 
888
 
888
 
889
 
889
 
890
 
890
; eax = number (1 or 2)
891
; eax = number (1 or 2)
891
; ebx = language id
892
; ebx = language id
892
draw_flag:
893
draw_flag:
893
    pusha
894
    pusha
894
 
895
 
895
;    cmp  [graph_text],0
896
;    cmp  [graph_text],0
896
;    je   mini_flag
897
;    je   mini_flag
897
 
898
 
898
; eax = 2 BIG
899
; eax = 2 BIG
899
; eax = 1 small
900
; eax = 1 small
900
 
901
 
901
    mov  edx,ebx
902
    mov  edx,ebx
902
 
903
 
903
    mov  ebx,[maxx]
904
    mov  ebx,[maxx]
904
    and  eax,1
905
    and  eax,1
905
    imul eax,17  ;17
906
    imul eax,17  ;17
906
    sub  ebx,eax
907
    sub  ebx,eax
907
    sub  ebx,76 ;79 ;28
908
    sub  ebx,76 ;79 ;28
908
 
909
 
909
    pushad
910
    pushad
910
;    dec  ebx
911
;    dec  ebx
911
    sub  ebx,2
912
    sub  ebx,2
912
    shl  ebx, 16
913
    shl  ebx, 16
913
    add  ebx, 15 ;25
914
    add  ebx, 15 ;25
914
    mov  ecx, 4*65536+13
915
    mov  ecx, 4*65536+13
915
    mov  edx,0
916
    mov  edx,0
916
    mov  eax,13
917
    mov  eax,13
917
    int  0x40
918
    int  0x40
918
    add  ebx,1 shl 16
919
    add  ebx,1 shl 16
919
    sub  ebx,2
920
    sub  ebx,2
920
    mov  ecx, 5 shl 16+11
921
    mov  ecx, 5 shl 16+11
921
    cmp  [type_lang],1
922
    cmp  [type_lang],1
922
    je  label_1
923
    je  label_1
923
    mov  edx,0xff ;[wcolor]
924
    mov  edx,0xff ;[wcolor]
924
    jmp  label_2
925
    jmp  label_2
925
label_1:
926
label_1:
926
    mov  edx,0x7700
927
    mov  edx,0x7700
927
label_2:
928
label_2:
928
    mov  eax, 13
929
    mov  eax, 13
929
    int  0x40
930
    int  0x40
930
    popad
931
    popad
931
 
932
 
932
    shl  ebx,16
933
    shl  ebx,16
933
    add  ebx,7  ;24
934
    add  ebx,7  ;24
934
 
935
 
935
    mov  ecx,[bte] ; color
936
    mov  ecx,[bte] ; color
936
 
937
 
937
    dec  edx
938
    dec  edx
938
    shl  edx,1
939
    shl  edx,1
939
    add  edx,flag_text
940
    add  edx,flag_text
940
    mov  esi,2
941
    mov  esi,2
941
    mov  eax,4
942
    mov  eax,4
942
    int  0x40
943
    int  0x40
943
 
944
 
944
    mov  ebx,[maxx]
945
    mov  ebx,[maxx]
945
    sub  ebx,48
946
    sub  ebx,48
946
    shl  ebx,16
947
    shl  ebx,16
947
    mov  bx,34
948
    mov  bx,34
948
    mov  ecx,3 shl 16+14
949
    mov  ecx,3 shl 16+14
949
    xor  edx,edx
950
    xor  edx,edx
950
    mov  eax,13
951
    mov  eax,13
951
    int  0x40
952
    int  0x40
952
    add  ebx,1 shl 16
953
    add  ebx,1 shl 16
953
    sub  ebx,2
954
    sub  ebx,2
954
    mov  ecx,4 shl 16+12
955
    mov  ecx,4 shl 16+12
955
    mov  edx,0x66cc
956
    mov  edx,0x66cc
956
    int  0x40
957
    int  0x40
957
 
958
 
958
    popa
959
    popa
959
    ret
960
    ret
960
 
961
 
961
;mini_flag:
962
;mini_flag:
962
;    popa
963
;    popa
963
;    ret
964
;    ret
964
 
965
 
965
 
966
 
966
 
967
 
967
 
968
 
968
; ***************************************************
969
; ***************************************************
969
; ********* WINDOW DEFINITIONS AND DRAW *************
970
; ********* WINDOW DEFINITIONS AND DRAW *************
970
; ***************************************************
971
; ***************************************************
971
 
972
 
972
 
973
 
973
draw_window:
974
draw_window:
974
 
975
 
975
    pusha
976
    pusha
976
 
977
 
977
    mov  [running_applications],-1
978
    mov  [running_applications],-1
978
    mov  [checks],-1
979
    mov  [checks],-1
979
 
980
 
980
    mov  eax, 12                   ; tell os about redraw
981
    mov  eax, 12                   ; tell os about redraw
981
    mov  ebx, 1
982
    mov  ebx, 1
982
    int  0x40
983
    int  0x40
983
 
984
 
984
    mov  eax, 48
985
    mov  eax, 48
985
    mov  ebx, 3
986
    mov  ebx, 3
986
    mov  ecx, system_colours
987
    mov  ecx, system_colours
987
    mov  edx, 10*4
988
    mov  edx, 10*4
988
    int  0x40
989
    int  0x40
989
 
990
 
990
    mov  eax, [system_colours+4*6]
991
    mov  eax, [system_colours+4*6]
991
    mov  [wcolor], eax
992
    mov  [wcolor], eax
992
 
993
 
993
    mov  eax,14                    ; get screen max x & max y
994
    mov  eax,14                    ; get screen max x & max y
994
    int  0x40
995
    int  0x40
995
 
996
 
996
    cmp  [width],0
997
    cmp  [width],0
997
    je   no_def_width
998
    je   no_def_width
998
    and  eax,0xffff
999
    and  eax,0xffff
999
    mov  ebx,[width]
1000
    mov  ebx,[width]
1000
    shl  ebx,16
1001
    shl  ebx,16
1001
    add  eax,ebx
1002
    add  eax,ebx
1002
  no_def_width:
1003
  no_def_width:
1003
 
1004
 
1004
    mov  ebx,eax
1005
    mov  ebx,eax
1005
    mov  [screenxy],ebx
1006
    mov  [screenxy],ebx
1006
    shr  ebx,16
1007
    shr  ebx,16
1007
    sub  ax,38
1008
    sub  ax,38
1008
    shl  eax,16
1009
    shl  eax,16
1009
    mov  ecx,eax
1010
    mov  ecx,eax
1010
    add  ecx,0*65536+38
1011
    add  ecx,0*65536+38
1011
    cmp  [graph_text],1
1012
    cmp  [graph_text],1
1012
    jne  no_text_1
1013
    jne  no_text_1
1013
    mov  cx,PANEL_HEIGHT
1014
    mov  cx,PANEL_HEIGHT
1014
    add  ecx,20*65536
1015
    add  ecx,20*65536
1015
  no_text_1:
1016
  no_text_1:
1016
    mov  eax, 0                     ; DEFINE AND DRAW WINDOW
1017
    mov  eax, 0                     ; DEFINE AND DRAW WINDOW
1017
    mov  edx, [wcolor]
1018
    mov  edx, [wcolor]
1018
    or   edx, 0x01000000 ; do not draw the window
1019
    or   edx, 0x01000000 ; do not draw the window
1019
    mov  esi, [wcolor]
1020
    mov  esi, [wcolor]
1020
    or   esi, 0x01000000 ; unmovable window
1021
    or   esi, 0x01000000 ; unmovable window
1021
    mov  edi, [wcolor]
1022
    mov  edi, [wcolor]
1022
    int  0x40
1023
    int  0x40
1023
 
1024
 
1024
    movzx ebx,word [screenxy+2]
1025
    movzx ebx,word [screenxy+2]
1025
    mov  ecx,0*65536+0
1026
    mov  ecx,0*65536+0
1026
    mov  edx,[wcolor]
1027
    mov  edx,[wcolor]
1027
    add  edx,0x161616
1028
    add  edx,0x161616
1028
  newline:
1029
  newline:
1029
    sub  edx,0x040404
1030
    sub  edx,0x040404
1030
    mov  eax,38
1031
    mov  eax,38
1031
    cmp  [soften_up],1
1032
    cmp  [soften_up],1
1032
    jne  no_su
1033
    jne  no_su
1033
    and  edx,0x00FFFFFF
1034
    and  edx,0x00FFFFFF
1034
    int  0x40
1035
    int  0x40
1035
  no_su:
1036
  no_su:
1036
 
1037
 
1037
    pusha
1038
    pusha
1038
    cmp  [soften_down],1
1039
    cmp  [soften_down],1
1039
    jne  no_sd
1040
    jne  no_sd
1040
    sub  edx,0x141414
1041
    sub  edx,0x141414
1041
    mov  edi,[b_size_y]
1042
    mov  edi,[b_size_y]
1042
    shl  edi,16
1043
    shl  edi,16
1043
    add  edi,[b_size_y]
1044
    add  edi,[b_size_y]
1044
    add  ecx,edi
1045
    add  ecx,edi
1045
    sub  ecx,3*65536+3
1046
    sub  ecx,3*65536+3
1046
    and  edx,0x00FFFFFF
1047
    and  edx,0x00FFFFFF
1047
    int  0x40
1048
    int  0x40
1048
  no_sd:
1049
  no_sd:
1049
    popa
1050
    popa
1050
 
1051
 
1051
    add  ecx,1*65536+1
1052
    add  ecx,1*65536+1
1052
    cmp  cx,5
1053
    cmp  cx,5
1053
    jb   newline
1054
    jb   newline
1054
 
1055
 
1055
    cmp   [soften_middle],1
1056
    cmp   [soften_middle],1
1056
    jne   no_sm
1057
    jne   no_sm
1057
 
1058
 
1058
    movzx ebx,word [screenxy+2]
1059
    movzx ebx,word [screenxy+2]
1059
    mov   ecx,5*65536+5
1060
    mov   ecx,5*65536+5
1060
    mov   esi,stripe
1061
    mov   esi,stripe
1061
    mov   edx,[wcolor]
1062
    mov   edx,[wcolor]
1062
  newline3:
1063
  newline3:
1063
    add  edx,[esi]
1064
    add  edx,[esi]
1064
    add  esi,4
1065
    add  esi,4
1065
 
1066
 
1066
    mov  eax,38
1067
    mov  eax,38
1067
    and  edx,0x00FFFFFF
1068
    and  edx,0x00FFFFFF
1068
    int  0x40
1069
    int  0x40
1069
    add  ecx,1*65536+1
1070
    add  ecx,1*65536+1
1070
    cmp  cx,15
1071
    cmp  cx,15
1071
    jb   newline3
1072
    jb   newline3
1072
 
1073
 
1073
  no_sm:
1074
  no_sm:
1074
 
1075
 
1075
    cmp  [minimize_left],1
1076
    cmp  [minimize_left],1
1076
    jne  no_mleft
1077
    jne  no_mleft
1077
    mov  eax,8                               ; ABS LEFT
1078
    mov  eax,8                               ; ABS LEFT
1078
    mov  ebx,0 *65536+9
1079
    mov  ebx,0 *65536+9
1079
    mov  ecx,1 *65536
1080
    mov  ecx,1 *65536
1080
    add  ecx,[b_size_y]
1081
    add  ecx,[b_size_y]
1081
    dec  ecx
1082
    dec  ecx
1082
    mov  edx,101
1083
    mov  edx,101
1083
    add  edx,[button_frames]
1084
    add  edx,[button_frames]
1084
    mov  esi,[wcolor]
1085
    mov  esi,[wcolor]
1085
    int  0x40
1086
    int  0x40
1086
    mov  eax,4                               ; HIDE TEXT
1087
    mov  eax,4                               ; HIDE TEXT
1087
    mov  ebx,2*65536+17
1088
    mov  ebx,2*65536+17
1088
    cmp  [graph_text],1
1089
    cmp  [graph_text],1
1089
    jne  no_y1
1090
    jne  no_y1
1090
    mov  bx,7
1091
    mov  bx,7
1091
  no_y1:
1092
  no_y1:
1092
    mov  ecx,[wcolor]
1093
    mov  ecx,[wcolor]
1093
    add  ecx,0x303030
1094
    add  ecx,0x303030
1094
    mov  edx,hidetext
1095
    mov  edx,hidetext
1095
    mov  esi,1
1096
    mov  esi,1
1096
    int  0x40
1097
    int  0x40
1097
  no_mleft:
1098
  no_mleft:
1098
 
1099
 
1099
    movzx eax,word [screenxy+2]
1100
    movzx eax,word [screenxy+2]
1100
    mov  [maxx],eax
1101
    mov  [maxx],eax
1101
 
1102
 
1102
    cmp  [minimize_right],1
1103
    cmp  [minimize_right],1
1103
    jne  no_mright
1104
    jne  no_mright
1104
    mov  eax,[maxx]
1105
    mov  eax,[maxx]
1105
    sub  eax,77
1106
    sub  eax,77
1106
    shl  eax,16
1107
    shl  eax,16
1107
    mov  ebx,eax
1108
    mov  ebx,eax
1108
    add  ebx,67
1109
    add  ebx,67
1109
    mov  eax,8                               ; ABS RIGHT
1110
    mov  eax,8                               ; ABS RIGHT
1110
    mov  ecx,1 *65536
1111
    mov  ecx,1 *65536
1111
    add  ecx,[b_size_y]
1112
    add  ecx,[b_size_y]
1112
    dec  ecx
1113
    dec  ecx
1113
    add  ebx,68*65536
1114
    add  ebx,68*65536
1114
    mov  bx,9
1115
    mov  bx,9
1115
    mov  edx,102
1116
    mov  edx,102
1116
    add  edx,[button_frames]
1117
    add  edx,[button_frames]
1117
    mov  esi,[wcolor]
1118
    mov  esi,[wcolor]
1118
    int  0x40
1119
    int  0x40
1119
    mov  edx,hidetext+1
1120
    mov  edx,hidetext+1
1120
    mov  eax,4
1121
    mov  eax,4
1121
    mov  ebx,[maxx]
1122
    mov  ebx,[maxx]
1122
    sub  ebx,6
1123
    sub  ebx,6
1123
    shl  ebx,16
1124
    shl  ebx,16
1124
    mov  bx,17
1125
    mov  bx,17
1125
    cmp  [graph_text],1
1126
    cmp  [graph_text],1
1126
    jne  no_y2
1127
    jne  no_y2
1127
    mov  bx,7
1128
    mov  bx,7
1128
  no_y2:
1129
  no_y2:
1129
    mov  ecx,[wcolor]
1130
    mov  ecx,[wcolor]
1130
    add  ecx,0x303030
1131
    add  ecx,0x303030
1131
    mov  esi,1
1132
    mov  esi,1
1132
    int  0x40
1133
    int  0x40
1133
  no_mright:
1134
  no_mright:
1134
 
1135
 
1135
    call draw_menuet_icon
1136
    call draw_menuet_icon
1136
 
1137
 
1137
    call draw_program_icons
1138
    call draw_program_icons
1138
 
1139
 
1139
    mov  [ptime],0
1140
    mov  [ptime],0
1140
    call draw_info
1141
    call draw_info
1141
 
1142
 
1142
    call draw_application_buttons
1143
    call draw_application_buttons
1143
 
1144
 
1144
;     mov    ecx,[button_presssed_alt]
1145
;     mov    ecx,[button_presssed_alt]
1145
;     mcall  47,0x80100,ecx ,400 shl 16+5,0
1146
;     mcall  47,0x80100,ecx ,400 shl 16+5,0
1146
 
1147
 
1147
    mov  eax,12
1148
    mov  eax,12
1148
    mov  ebx,2
1149
    mov  ebx,2
1149
    int  0x40
1150
    int  0x40
1150
 
1151
 
1151
    popa
1152
    popa
1152
    ret
1153
    ret
1153
 
1154
 
1154
 
1155
 
1155
 
1156
 
1156
draw_menuet_icon:
1157
draw_menuet_icon:
1157
 
1158
 
1158
    pusha
1159
    pusha
1159
 
1160
 
1160
    cmp  [menu_enable],1
1161
    cmp  [menu_enable],1
1161
    jne  no_menu
1162
    jne  no_menu
1162
 
1163
 
1163
 
1164
 
1164
    mov  eax, 8                               ; M BUTTON
1165
    mov  eax, 8                               ; M BUTTON
1165
    mov  ebx, 10*65536 + 47
1166
    mov  ebx, 10*65536 + 47
1166
    cmp  [minimize_left], 0
1167
    cmp  [minimize_left], 0
1167
    jne  @f
1168
    jne  @f
1168
    sub  ebx, 10*65536
1169
    sub  ebx, 10*65536
1169
  @@:
1170
  @@:
1170
    mov  ecx, 1*65536
1171
    mov  ecx, 1*65536
1171
    add  ecx, [b_size_y]
1172
    add  ecx, [b_size_y]
1172
    dec  ecx
1173
    dec  ecx
1173
    mov  edx, 0x20000001
1174
    mov  edx, 0x20000001
1174
    add  edx, [button_frames]
1175
    add  edx, [button_frames]
1175
    mov  esi, [wcolor]
1176
    mov  esi, [wcolor]
1176
    int  0x40
1177
    int  0x40
1177
 
1178
 
1178
    cmp  [graph_text], 1
1179
    cmp  [graph_text], 1
1179
    jne  no_mtext
1180
    jne  no_mtext
1180
 
1181
 
1181
    push ebx
1182
    push ebx
1182
    mov  eax,13
1183
    mov  eax,13
1183
    mov  ebx,12 shl 16+44  ;51
1184
    mov  ebx,12 shl 16+44  ;51
1184
    mov  ecx,1 shl 16+17
1185
    mov  ecx,1 shl 16+17
1185
    xor  edx,edx
1186
    xor  edx,edx
1186
    int  0x40
1187
    int  0x40
1187
;    mov  ebx,63 shl 16+1
1188
;    mov  ebx,63 shl 16+1
1188
    mov  ebx,56 shl 16+1
1189
    mov  ebx,56 shl 16+1
1189
    mov  ecx,2 shl 16+15
1190
    mov  ecx,2 shl 16+15
1190
    int  0x40
1191
    int  0x40
1191
    mov  ebx,57 shl 16+1
1192
    mov  ebx,57 shl 16+1
1192
    mov  ecx,4 shl 16+11
1193
    mov  ecx,4 shl 16+11
1193
    int  0x40
1194
    int  0x40
1194
    mov  ebx,58 shl 16+1
1195
    mov  ebx,58 shl 16+1
1195
    mov  ecx,6  shl 16+7
1196
    mov  ecx,6  shl 16+7
1196
    int  0x40
1197
    int  0x40
1197
;    mov  ebx,66  shl 16+1
1198
;    mov  ebx,66  shl 16+1
1198
;    mov  ecx,9 shl 16+1
1199
;    mov  ecx,9 shl 16+1
1199
;    int  0x40
1200
;    int  0x40
1200
    mov  ebx,13 shl 16+43 ;50
1201
    mov  ebx,13 shl 16+43 ;50
1201
    mov  ecx,2 shl 16+15
1202
    mov  ecx,2 shl 16+15
1202
    mov  edx,0x7700
1203
    mov  edx,0x7700
1203
    int  0x40
1204
    int  0x40
1204
;    mov  ebx,62 shl 16+1
1205
;    mov  ebx,62 shl 16+1
1205
;    mov  ecx,3 shl 16+14
1206
;    mov  ecx,3 shl 16+14
1206
;    int  0x40
1207
;    int  0x40
1207
    mov  ebx,56 shl 16+1
1208
    mov  ebx,56 shl 16+1
1208
    mov  ecx,4 shl 16+11
1209
    mov  ecx,4 shl 16+11
1209
    int  0x40
1210
    int  0x40
1210
    mov  ebx,57 shl 16+1
1211
    mov  ebx,57 shl 16+1
1211
    mov  ecx,6 shl 16+7
1212
    mov  ecx,6 shl 16+7
1212
    int  0x40
1213
    int  0x40
1213
    pop  ebx
1214
    pop  ebx
1214
 
1215
 
1215
    mov  eax, 4
1216
    mov  eax, 4
1216
    mov  bx,  7
1217
    mov  bx,  7
1217
    add  ebx, 8*65536
1218
    add  ebx, 8*65536
1218
    mov  ecx, 0x10ffffff
1219
    mov  ecx, 0x10ffffff
1219
    mov  edx, m_text
1220
    mov  edx, m_text
1220
    mov  esi, 4
1221
    mov  esi, 4
1221
    int  0x40
1222
    int  0x40
1222
 
1223
 
1223
    popa
1224
    popa
1224
    ret
1225
    ret
1225
 
1226
 
1226
  no_mtext:
1227
  no_mtext:
1227
 
1228
 
1228
 
1229
 
1229
 
1230
 
1230
    mov  eax,[wcolor]
1231
    mov  eax,[wcolor]
1231
    mov  [m_icon+4],eax
1232
    mov  [m_icon+4],eax
1232
 
1233
 
1233
; load & display menuet.bmp
1234
; load & display menuet.bmp
1234
        mov     eax, 70
1235
        mov     eax, 70
1235
        mov     ebx, m_bmp_fileinfo
1236
        mov     ebx, m_bmp_fileinfo
1236
        int     0x40
1237
        int     0x40
1237
 
1238
 
1238
    mov  eax,40
1239
    mov  eax,40
1239
    mov  ebx,0
1240
    mov  ebx,0
1240
    mov  edi,image+53
1241
    mov  edi,image+53
1241
 
1242
 
1242
   new_m_pix:
1243
   new_m_pix:
1243
 
1244
 
1244
;    movzx ecx,byte [edi]
1245
;    movzx ecx,byte [edi]
1245
;    shr  ecx,5
1246
;    shr  ecx,5
1246
 
1247
 
1247
    cmp    byte [edi], 10
1248
    cmp    byte [edi], 10
1248
    jb     nopix
1249
    jb     nopix
1249
    cmp    byte [edi+1], 10
1250
    cmp    byte [edi+1], 10
1250
    jb     nopix
1251
    jb     nopix
1251
    cmp    byte [edi+2], 10
1252
    cmp    byte [edi+2], 10
1252
    jb     nopix
1253
    jb     nopix
1253
 
1254
 
1254
    pusha
1255
    pusha
1255
    cmp  [minimize_left],0
1256
    cmp  [minimize_left],0
1256
    jne  no_m_s2
1257
    jne  no_m_s2
1257
    sub  ebx,10
1258
    sub  ebx,10
1258
  no_m_s2:
1259
  no_m_s2:
1259
;    mov  edx,[ecx*4+m_icon]
1260
;    mov  edx,[ecx*4+m_icon]
1260
    mov  edx,[edi+1]
1261
    mov  edx,[edi+1]
1261
 
1262
 
1262
    mov  ecx,eax
1263
    mov  ecx,eax
1263
    mov  eax,1
1264
    mov  eax,1
1264
    add  ebx,12
1265
    add  ebx,12
1265
    int  0x40
1266
    int  0x40
1266
    popa
1267
    popa
1267
 
1268
 
1268
   nopix:
1269
   nopix:
1269
 
1270
 
1270
    add  edi,3
1271
    add  edi,3
1271
    add  ebx,1
1272
    add  ebx,1
1272
    cmp  ebx,40
1273
    cmp  ebx,40
1273
    jnz  new_m_pix
1274
    jnz  new_m_pix
1274
 
1275
 
1275
    mov  ebx,0
1276
    mov  ebx,0
1276
    dec  eax
1277
    dec  eax
1277
    jnz  new_m_pix
1278
    jnz  new_m_pix
1278
 
1279
 
1279
  no_menu:
1280
  no_menu:
1280
 
1281
 
1281
    popa
1282
    popa
1282
    ret
1283
    ret
1283
 
1284
 
1284
 
1285
 
1285
draw_program_icons:
1286
draw_program_icons:
1286
 
1287
 
1287
    pusha
1288
    pusha
1288
 
1289
 
1289
    cmp  [icons],0
1290
    cmp  [icons],0
1290
    jne  dp_ret
1291
    jne  dp_ret
1291
 
1292
 
1292
    mov  edi,1
1293
    mov  edi,1
1293
    push edi
1294
    push edi
1294
 
1295
 
1295
  new_icon_file:
1296
  new_icon_file:
1296
 
1297
 
1297
    pusha
1298
    pusha
1298
    mov  edx,[esp+32]
1299
    mov  edx,[esp+32]
1299
    add  edx,10
1300
    add  edx,10
1300
    push edx
1301
    push edx
1301
    mov  esi,[wcolor]
1302
    mov  esi,[wcolor]
1302
    mov  ecx,1*65536
1303
    mov  ecx,1*65536
1303
    add  ecx,[b_size_y]
1304
    add  ecx,[b_size_y]
1304
    dec  ecx
1305
    dec  ecx
1305
    mov  eax,edi
1306
    mov  eax,edi
1306
    dec  eax
1307
    dec  eax
1307
    imul eax,40
1308
    imul eax,40
1308
    mov  ebx,eax
1309
    mov  ebx,eax
1309
    add  ebx,[icons_position]
1310
    add  ebx,[icons_position]
1310
    shl  ebx,16
1311
    shl  ebx,16
1311
    mov  bx,39
1312
    mov  bx,39
1312
    pop  edx
1313
    pop  edx
1313
    add  edx,[button_frames]
1314
    add  edx,[button_frames]
1314
    or   edx, 0x20000000
1315
    or   edx, 0x20000000
1315
    mov  eax,8
1316
    mov  eax,8
1316
    int  0x40
1317
    int  0x40
1317
    popa
1318
    popa
1318
 
1319
 
1319
    mov  ecx,[esp]
1320
    mov  ecx,[esp]
1320
    add  ecx,48
1321
    add  ecx,48
1321
    mov  [iconf+6],cl
1322
    mov  [iconf+6],cl
1322
 
1323
 
1323
        mov     eax, 70
1324
        mov     eax, 70
1324
        mov     ebx, iconf_fileinfo
1325
        mov     ebx, iconf_fileinfo
1325
        int     0x40
1326
        int     0x40
1326
 
1327
 
1327
    mov  eax,0
1328
    mov  eax,0
1328
    mov  ebx,32
1329
    mov  ebx,32
1329
    mov  edi,image+51+32*33*3
1330
    mov  edi,image+51+32*33*3
1330
 
1331
 
1331
   np2:                             ; new pixel of file
1332
   np2:                             ; new pixel of file
1332
 
1333
 
1333
    mov  edx,[edi]
1334
    mov  edx,[edi]
1334
    and  edx,0xffffff
1335
    and  edx,0xffffff
1335
 
1336
 
1336
    cmp  eax,3                      ; Y draw limits
1337
    cmp  eax,3                      ; Y draw limits
1337
    jb   nopix2
1338
    jb   nopix2
1338
    cmp  eax,36
1339
    cmp  eax,36
1339
    jg   nopix2
1340
    jg   nopix2
1340
    cmp  ebx,38                     ; X draw limits
1341
    cmp  ebx,38                     ; X draw limits
1341
    jg   nopix2
1342
    jg   nopix2
1342
    cmp  ebx,2
1343
    cmp  ebx,2
1343
    jb   nopix2
1344
    jb   nopix2
1344
 
1345
 
1345
    cmp  edx,0
1346
    cmp  edx,0
1346
    jz   nopix2
1347
    jz   nopix2
1347
 
1348
 
1348
    cmp  [graph_text],1
1349
    cmp  [graph_text],1
1349
    jne  no_icon_text
1350
    jne  no_icon_text
1350
 
1351
 
1351
    pusha
1352
    pusha
1352
 
1353
 
1353
    mov  ebx,[esp+32]
1354
    mov  ebx,[esp+32]
1354
    dec  ebx
1355
    dec  ebx
1355
    imul ebx,40
1356
    imul ebx,40
1356
    add  ebx,8
1357
    add  ebx,8
1357
    add  ebx,[icons_position]
1358
    add  ebx,[icons_position]
1358
    shl  ebx,16
1359
    shl  ebx,16
1359
    mov  bx,7
1360
    mov  bx,7
1360
 
1361
 
1361
    mov  eax,4
1362
    mov  eax,4
1362
    mov  ecx,0xffffff
1363
    mov  ecx,0xffffff
1363
    mov  edx,[esp+32]
1364
    mov  edx,[esp+32]
1364
    dec  edx
1365
    dec  edx
1365
    imul edx,4
1366
    imul edx,4
1366
    add  edx,mi_text
1367
    add  edx,mi_text
1367
    mov  esi,4
1368
    mov  esi,4
1368
    int  0x40
1369
    int  0x40
1369
 
1370
 
1370
    popa
1371
    popa
1371
 
1372
 
1372
    jmp  nopix2
1373
    jmp  nopix2
1373
 
1374
 
1374
  no_icon_text:
1375
  no_icon_text:
1375
 
1376
 
1376
    mov  esi,[esp]
1377
    mov  esi,[esp]
1377
    pusha
1378
    pusha
1378
    push edx
1379
    push edx
1379
    mov  ecx,eax
1380
    mov  ecx,eax
1380
    add  ecx,2
1381
    add  ecx,2
1381
    mov  eax,esi
1382
    mov  eax,esi
1382
    dec  eax
1383
    dec  eax
1383
    imul eax,40
1384
    imul eax,40
1384
    add  ebx,eax
1385
    add  ebx,eax
1385
    add  ebx,3
1386
    add  ebx,3
1386
    add  ebx,[icons_position]
1387
    add  ebx,[icons_position]
1387
    pop  edx
1388
    pop  edx
1388
    mov  eax,1
1389
    mov  eax,1
1389
    int  0x40
1390
    int  0x40
1390
    popa
1391
    popa
1391
 
1392
 
1392
  nopix2:
1393
  nopix2:
1393
 
1394
 
1394
    sub  edi,3
1395
    sub  edi,3
1395
    dec  ebx
1396
    dec  ebx
1396
    jnz  np2
1397
    jnz  np2
1397
 
1398
 
1398
    mov  ebx,32
1399
    mov  ebx,32
1399
    add  eax,1
1400
    add  eax,1
1400
    cmp  eax,32
1401
    cmp  eax,32
1401
    jnz  np2
1402
    jnz  np2
1402
 
1403
 
1403
    add  dword [esp],1
1404
    add  dword [esp],1
1404
    mov  edi,[esp]
1405
    mov  edi,[esp]
1405
    cmp  dword [esp],4
1406
    cmp  dword [esp],4
1406
    jbe  new_icon_file
1407
    jbe  new_icon_file
1407
    add  esp,4
1408
    add  esp,4
1408
 
1409
 
1409
    mov  eax,4
1410
    mov  eax,4
1410
    mov  ebx,40
1411
    mov  ebx,40
1411
    imul ebx,3
1412
    imul ebx,3
1412
    add  ebx,[icons_position]
1413
    add  ebx,[icons_position]
1413
    add  ebx,10
1414
    add  ebx,10
1414
    shl  ebx,16
1415
    shl  ebx,16
1415
    mov  bx,23
1416
    mov  bx,23
1416
    mov  ecx,[wcolor]
1417
    mov  ecx,[wcolor]
1417
    mov  edx,gpl
1418
    mov  edx,gpl
1418
    mov  esi,3
1419
    mov  esi,3
1419
    int  0x40
1420
    int  0x40
1420
 
1421
 
1421
  dp_ret:
1422
  dp_ret:
1422
 
1423
 
1423
    popa
1424
    popa
1424
    ret
1425
    ret
1425
 
1426
 
1426
 
1427
 
1427
 
1428
 
1428
draw_info:    ; draw cpu usage, time, date
1429
draw_info:    ; draw cpu usage, time, date
1429
 
1430
 
1430
    pusha
1431
    pusha
1431
 
1432
 
1432
    cmp  [setup_enable],1
1433
    cmp  [setup_enable],1
1433
    jne  no_setup
1434
    jne  no_setup
1434
 
1435
 
1435
    cmp  [minimize_right],0
1436
    cmp  [minimize_right],0
1436
    jne  no_m_r
1437
    jne  no_m_r
1437
    add  [maxx],10
1438
    add  [maxx],10
1438
 
1439
 
1439
   no_m_r:
1440
   no_m_r:
1440
 
1441
 
1441
    mov  eax,3
1442
    mov  eax,3
1442
    int  0x40
1443
    int  0x40
1443
    cmp  eax,[ptime]
1444
    cmp  eax,[ptime]
1444
    jz   _ret
1445
    jz   _ret
1445
    mov  [ptime],eax
1446
    mov  [ptime],eax
1446
 
1447
 
1447
    call draw_cpu_usage
1448
    call draw_cpu_usage
1448
 
1449
 
1449
    mov  eax,[maxx]   ; blink sec
1450
    mov  eax,[maxx]   ; blink sec
1450
    sub  eax,33
1451
    sub  eax,33
1451
    shl  eax,16
1452
    shl  eax,16
1452
    mov  ebx,eax
1453
    mov  ebx,eax
1453
    add  ebx,9
1454
    add  ebx,9
1454
    mov  eax,3
1455
    mov  eax,3
1455
    int  0x40
1456
    int  0x40
1456
    cmp  [graph_text],1
1457
    cmp  [graph_text],1
1457
    jne  no_y4
1458
    jne  no_y4
1458
    sub  bx,2
1459
    sub  bx,2
1459
  no_y4:
1460
  no_y4:
1460
    mov  ecx,eax
1461
    mov  ecx,eax
1461
    shr  ecx,16
1462
    shr  ecx,16
1462
    and  ecx,1
1463
    and  ecx,1
1463
    mov  edx,[bte]
1464
    mov  edx,[bte]
1464
    sub  edx,[wcolor]
1465
    sub  edx,[wcolor]
1465
    imul ecx,edx
1466
    imul ecx,edx
1466
    add  ecx,[wcolor]
1467
    add  ecx,[wcolor]
1467
    mov  edx,sec
1468
    mov  edx,sec
1468
    mov  eax,4
1469
    mov  eax,4
1469
    mov  esi,1
1470
    mov  esi,1
1470
    int  0x40
1471
    int  0x40
1471
 
1472
 
1472
 
1473
 
1473
    mov  eax,26          ; check for change in time or country
1474
;    mov  eax,26          ; check for change in time or country
1474
    mov  ebx,5
1475
;    mov  ebx,5
1475
    int  0x40
1476
;    int  0x40
1476
    mov  edx,eax
1477
;    mov  edx,eax
1477
    mov  eax,26
1478
    mov  eax,26
1478
    mov  ebx,2
1479
    mov  ebx,2
1479
    mov  ecx,9
1480
    mov  ecx,9
1480
    int  0x40
1481
    int  0x40
1481
    add  edx,eax
1482
;    add  edx,eax
-
 
1483
    mov  edx,eax
1482
    mov  eax,3
1484
    mov  eax,3
1483
    int  0x40
1485
    int  0x40
1484
    and  eax,0xffff
1486
    and  eax,0xffff
1485
    add  edx,eax
1487
    add  edx,eax
1486
    cmp  edx,[checks]
1488
    cmp  edx,[checks]
1487
    je   _ret
1489
    je   _ret
1488
    mov  [checks],edx
1490
    mov  [checks],edx
1489
 
1491
 
1490
    mov  ebx,[maxx]
1492
    mov  ebx,[maxx]
1491
    sub  ebx,48 ;;94 ;;74
1493
    sub  ebx,48 ;;94 ;;74
1492
    shl  ebx,16
1494
    shl  ebx,16
1493
    add  ebx,33 ;;84 ;;64
1495
    add  ebx,33 ;;84 ;;64
1494
 
1496
 
1495
    mov  eax,8               ; time/date button
1497
    mov  eax,8               ; time/date button
1496
    mov  ecx,3 *65536
1498
    mov  ecx,3 *65536
1497
    add  ecx,[b_size_y]
1499
    add  ecx,[b_size_y]
1498
;    dec  ecx
1500
;    dec  ecx
1499
    sub  cx,5
1501
    sub  cx,5
1500
    mov  edx,2+0x20000000
1502
    mov  edx,2+0x20000000
1501
    mov  esi,[wcolor]
1503
    mov  esi,[wcolor]
1502
    int  0x40
1504
    int  0x40
1503
    pusha
1505
    pusha
1504
    mov  eax,13
1506
    mov  eax,13
1505
    add  ebx,10*65536-16
1507
    add  ebx,10*65536-16
1506
    add  ecx,5*65536-8
1508
    add  ecx,5*65536-8
1507
    mov  edx,[wcolor]
1509
    mov  edx,[wcolor]
1508
    int  0x40
1510
    int  0x40
1509
    popa
1511
    popa
1510
    and  edx,0xffff
1512
    and  edx,0xffff
1511
    add  edx,[button_frames]
1513
    add  edx,[button_frames]
1512
    int  0x40
1514
    int  0x40
1513
 
1515
 
1514
    mov  eax,8
1516
    mov  eax,8
1515
    mov  ebx,[maxx]
1517
    mov  ebx,[maxx]
1516
    sub  ebx,77 ;80
1518
    sub  ebx,77 ;80
1517
    shl  ebx,16
1519
    shl  ebx,16
1518
    add  ebx,12
1520
    add  ebx,12
1519
    mov  ecx,5 shl 16+10
1521
    mov  ecx,5 shl 16+10
1520
    mov  edx,16+0x20000000  ;button 16
1522
    mov  edx,16+0x20000000  ;button 16
1521
    mov  esi,[wcolor]
1523
    mov  esi,[wcolor]
1522
    int  0x40
1524
    int  0x40
1523
    sub  ebx,17 shl 16
1525
    sub  ebx,17 shl 16
1524
    inc  edx                ;button 17
1526
    inc  edx                ;button 17
1525
    int  0x40
1527
;    int  0x40
1526
    add  ebx,33 shl 16
1528
    add  ebx,33 shl 16
1527
    mov  bx,8
1529
    mov  bx,8
1528
    inc  edx                ;button 18
1530
    inc  edx                ;button 18
1529
    int  0x40
1531
    int  0x40
1530
    sub  ebx,47 shl 16
1532
    sub  ebx,30 shl 16
1531
    mov  bx,10
1533
    mov  bx,10
1532
    inc  edx                ;button 19
1534
    inc  edx                ;button 19
1533
    int  0x40
1535
    int  0x40
1534
    sub  ebx,14 shl 16
1536
    sub  ebx,14 shl 16
1535
    inc  edx                ;button 20
1537
    inc  edx                ;button 20
1536
    int  0x40
1538
    int  0x40
1537
    sub  ebx,12 shl 16
1539
    sub  ebx,12 shl 16
1538
    mov  bx,8
1540
    mov  bx,8
1539
    mov  ecx,6 shl 16+10
1541
    mov  ecx,6 shl 16+10
1540
    inc  edx        ;button 21
1542
    inc  edx        ;button 21
1541
    int  0x40
1543
    int  0x40
1542
    sub  ebx,18 shl 16
1544
    sub  ebx,18 shl 16
1543
    inc  edx        ;button 22
1545
    inc  edx        ;button 22
1544
    int  0x40
1546
    int  0x40
1545
 
1547
 
1546
    ; flags
1548
    ; flags
1547
 
1549
 
1548
    mov  eax,26
1550
;    mov  eax,26
1549
    mov  ebx,5
1551
;    mov  ebx,5
1550
    int  0x40
1552
;    int  0x40
1551
    mov  ebx,eax
1553
;    mov  ebx,eax
1552
 
1554
;
1553
    mov  eax,1
1555
;    mov  eax,1
1554
    mov  [type_lang],al
1556
;    mov  [type_lang],al
1555
    call draw_flag
1557
;    call draw_flag
1556
 
1558
 
1557
    mov  eax,26
1559
    mov  eax,26
1558
    mov  ebx,2
1560
    mov  ebx,2
1559
    mov  ecx,9
1561
    mov  ecx,9
1560
    int  0x40
1562
    int  0x40
1561
    mov  ebx,eax
1563
    mov  ebx,eax
1562
 
1564
 
1563
    mov  eax,2
1565
    mov  eax,2
1564
    mov  [type_lang],al
1566
    mov  [type_lang],al
1565
    call draw_flag
1567
    call draw_flag
1566
 
1568
 
1567
    mcall 18,8,1
1569
    mcall 18,8,1
1568
    mov  [sound_flag],al
1570
    mov  [sound_flag],al
1569
 
1571
 
1570
    mov  ebx,[maxx]
1572
    mov  ebx,[maxx]
1571
    sub  ebx,109 ;112 ;28
1573
    sub  ebx,92 ;109 ;112 ;28
1572
    shl  ebx,16
1574
    shl  ebx,16
1573
    mov  bx,12
1575
    mov  bx,12
1574
    mov  ecx, 4*65536+13
1576
    mov  ecx, 4*65536+13
1575
    mov  edx,0
1577
    mov  edx,0
1576
    mov  eax,13
1578
    mov  eax,13
1577
    int  0x40
1579
    int  0x40
1578
    add  ebx,1 shl 16
1580
    add  ebx,1 shl 16
1579
    sub  bx,2
1581
    sub  bx,2
1580
    mov  ecx,5 shl 16+11
1582
    mov  ecx,5 shl 16+11
1581
    mov  edx,0xcc
1583
    mov  edx,0xcc
1582
    int  0x40
1584
    int  0x40
1583
    add  ebx,1 shl 16
1585
    add  ebx,1 shl 16
1584
    mov  bx,5
1586
    mov  bx,5
1585
    mov  ecx,8 shl 16+5
1587
    mov  ecx,8 shl 16+5
1586
    mov  edx,0xdddd00
1588
    mov  edx,0xdddd00
1587
    int  0x40
1589
    int  0x40
1588
    add  ebx,5 shl 16
1590
    add  ebx,5 shl 16
1589
    mov  bx,1
1591
    mov  bx,1
1590
    mov  ecx,7 shl 16+7
1592
    mov  ecx,7 shl 16+7
1591
    int  0x40
1593
    int  0x40
1592
    add  ebx,1 shl 16
1594
    add  ebx,1 shl 16
1593
    mov  ecx,6 shl 16+9
1595
    mov  ecx,6 shl 16+9
1594
    int  0x40
1596
    int  0x40
1595
    add  ebx,1 shl 16
1597
    add  ebx,1 shl 16
1596
    mov  ecx,5 shl 16+11
1598
    mov  ecx,5 shl 16+11
1597
    int  0x40
1599
    int  0x40
1598
 
1600
 
1599
;    cmp  [music_type],0
1601
;    cmp  [music_type],0
1600
;    jne   dalshe
1602
;    jne   dalshe
1601
    cmp  [sound_flag],0
1603
    cmp  [sound_flag],0
1602
    je   dalshe
1604
    je   dalshe
1603
 
1605
 
1604
    sub  ebx,8 shl 16
1606
    sub  ebx,8 shl 16
1605
    ror  ebx,16
1607
    ror  ebx,16
1606
    mov  cx,bx
1608
    mov  cx,bx
1607
    rol  ebx,16
1609
    rol  ebx,16
1608
    mov  bx,cx
1610
    mov  bx,cx
1609
    add  bx,8
1611
    add  bx,8
1610
    mov  ecx,5 shl 16+15
1612
    mov  ecx,5 shl 16+15
1611
    mov  edx,0xff0000
1613
    mov  edx,0xff0000
1612
    mov  eax,38
1614
    mov  eax,38
1613
    int  0x40
1615
    int  0x40
1614
    add  ebx,1 shl 16
1616
    add  ebx,1 shl 16
1615
    inc  bx
1617
    inc  bx
1616
    int  0x40
1618
    int  0x40
1617
    rol  ecx,16
1619
    rol  ecx,16
1618
    int  0x40
1620
    int  0x40
1619
    sub  ebx,1 shl 16
1621
    sub  ebx,1 shl 16
1620
    dec  bx
1622
    dec  bx
1621
    int  0x40
1623
    int  0x40
1622
 
1624
 
1623
dalshe:
1625
dalshe:
1624
 
1626
 
1625
    mov  ebx,[maxx]
1627
    mov  ebx,[maxx]
1626
    sub  ebx,123
1628
    sub  ebx,106;123
1627
    shl  ebx,16
1629
    shl  ebx,16
1628
    mov  bx,12
1630
    mov  bx,12
1629
    mov  ecx, 4*65536+13
1631
    mov  ecx, 4*65536+13
1630
    mov  edx,0
1632
    mov  edx,0
1631
    mov  eax,13
1633
    mov  eax,13
1632
    int  0x40
1634
    int  0x40
1633
    add  ebx,1 shl 16
1635
    add  ebx,1 shl 16
1634
    sub  bx,2
1636
    sub  bx,2
1635
    mov  ecx,5 shl 16+11
1637
    mov  ecx,5 shl 16+11
1636
    mov  edx,0xffcc00
1638
    mov  edx,0xffcc00
1637
    int  0x40
1639
    int  0x40
1638
    mov  eax,4
1640
    mov  eax,4
1639
    mov  ebx,[maxx]
1641
    mov  ebx,[maxx]
1640
    sub  ebx,121
1642
    sub  ebx,104;121
1641
    shl  ebx,16
1643
    shl  ebx,16
1642
    mov  bx,7
1644
    mov  bx,7
1643
    mov  ecx,0x10000000
1645
    mov  ecx,0x10000000
1644
    mov  edx,file_sys
1646
    mov  edx,file_sys
1645
    mov  esi,1
1647
    mov  esi,1
1646
    int  0x40
1648
    int  0x40
1647
    add  ebx,1 shl 16
1649
    add  ebx,1 shl 16
1648
    int  0x40
1650
    int  0x40
1649
 
1651
 
1650
    mov  edx,0
1652
    mov  edx,0
1651
    mov  eax,13
1653
    mov  eax,13
1652
    mov  ebx,[maxx]
1654
    mov  ebx,[maxx]
1653
    sub  ebx,134
1655
    sub  ebx,117;134
1654
    shl  ebx,16
1656
    shl  ebx,16
1655
    mov  bx,9
1657
    mov  bx,9
1656
    mov  ecx,6 shl 16+11
1658
    mov  ecx,6 shl 16+11
1657
    int  0x40
1659
    int  0x40
1658
    sub  ebx,18 shl 16
1660
    sub  ebx,18 shl 16
1659
    int  0x40
1661
    int  0x40
1660
    add  ebx,19 shl 16
1662
    add  ebx,19 shl 16
1661
    sub  bx,2
1663
    sub  bx,2
1662
    mov  ecx,7 shl 16+9
1664
    mov  ecx,7 shl 16+9
1663
    mov  edx,0xffffff
1665
    mov  edx,0xffffff
1664
    int  0x40
1666
    int  0x40
1665
    sub  ebx,18 shl 16
1667
    sub  ebx,18 shl 16
1666
    int  0x40
1668
    int  0x40
1667
 
1669
 
1668
    mov  eax,4
1670
    mov  eax,4
1669
    mov  edx,page_a1
1671
    mov  edx,page_a1
1670
    mov  ebx,[maxx]
1672
    mov  ebx,[maxx]
1671
    sub  ebx,150
1673
    sub  ebx,133;150
1672
    shl  ebx,16
1674
    shl  ebx,16
1673
    mov  bx,8
1675
    mov  bx,8
1674
    mov  esi,4
1676
    mov  esi,4
1675
    int  0x40
1677
    int  0x40
1676
    add  ebx,1 shl 16
1678
    add  ebx,1 shl 16
1677
    int  0x40
1679
    int  0x40
1678
 
1680
 
1679
    mov  eax,47
1681
    mov  eax,47
1680
    mov  ebx,0x10100
1682
    mov  ebx,0x10100
1681
    mov  ecx,[page_list]
1683
    mov  ecx,[page_list]
1682
    mov  edx,[maxx]
1684
    mov  edx,[maxx]
1683
    sub  edx,141
1685
    sub  edx,124;141
1684
    shl  edx,16
1686
    shl  edx,16
1685
    mov  dx,7
1687
    mov  dx,7
1686
    mov  esi,0xffffff
1688
    mov  esi,0xffffff
1687
    int  0x40
1689
    int  0x40
1688
 
1690
 
1689
;    sub  ebx,14 shl 16
1691
;    sub  ebx,14 shl 16
1690
;    mov  bx,7
1692
;    mov  bx,7
1691
;    mov  edx,turn_text
1693
;    mov  edx,turn_text
1692
;    mov  esi,1
1694
;    mov  esi,1
1693
 
1695
 
1694
;    mov  ecx,0x60a060 ;[wcolor]
1696
;    mov  ecx,0x60a060 ;[wcolor]
1695
;    add  ecx,0x303030
1697
;    add  ecx,0x303030
1696
;    mov  eax,4
1698
;    mov  eax,4
1697
;    int  0x40
1699
;    int  0x40
1698
;    add  ebx,1 shl 16
1700
;    add  ebx,1 shl 16
1699
;    int  0x40
1701
;    int  0x40
1700
;    add  ebx,1 shl 16
1702
;    add  ebx,1 shl 16
1701
;    int  0x40
1703
;    int  0x40
1702
;    add  ebx,1 shl 16
1704
;    add  ebx,1 shl 16
1703
;    int  0x40
1705
;    int  0x40
1704
 
1706
 
1705
;    add  ebx,1 shl 16
1707
;    add  ebx,1 shl 16
1706
;    mov  ecx,0x60a060 ;[wcolor]
1708
;    mov  ecx,0x60a060 ;[wcolor]
1707
;    int  0x40
1709
;    int  0x40
1708
;    add  ebx,1 shl 16
1710
;    add  ebx,1 shl 16
1709
;    int  0x40
1711
;    int  0x40
1710
;    add  ebx,1 shl 16
1712
;    add  ebx,1 shl 16
1711
;    sub  ecx,0x303030
1713
;    sub  ecx,0x303030
1712
;    int  0x40
1714
;    int  0x40
1713
 
1715
 
1714
;    sub  ebx,6 shl 16
1716
;    sub  ebx,6 shl 16
1715
;    mov  bx,1
1717
;    mov  bx,1
1716
;    mov  ecx,2 shl 16+15
1718
;    mov  ecx,2 shl 16+15
1717
;    mov  edx,0x60a060  ;[wcolor]
1719
;    mov  edx,0x60a060  ;[wcolor]
1718
;    add  edx,0x303030
1720
;    add  edx,0x303030
1719
;    mov  eax,13
1721
;    mov  eax,13
1720
;    int  0x40
1722
;    int  0x40
1721
;    add  ebx,1 shl 16
1723
;    add  ebx,1 shl 16
1722
;    mov  bx,1
1724
;    mov  bx,1
1723
;    mov  edx,0x60a060  ;[wcolor]
1725
;    mov  edx,0x60a060  ;[wcolor]
1724
;    int  0x40
1726
;    int  0x40
1725
;    add  ebx,1 shl 16
1727
;    add  ebx,1 shl 16
1726
;    mov  bx,1
1728
;    mov  bx,1
1727
;    sub  edx,0x303030
1729
;    sub  edx,0x303030
1728
;    int  0x40
1730
;    int  0x40
1729
;    add  ebx,1 shl 16
1731
;    add  ebx,1 shl 16
1730
;    mov  edx,[wcolor]
1732
;    mov  edx,[wcolor]
1731
;    int  0x40
1733
;    int  0x40
1732
 
1734
 
1733
    mov  eax,3                  ; get time
1735
    mov  eax,3                  ; get time
1734
    int  0x40
1736
    int  0x40
1735
 
1737
 
1736
    movzx ebx,al
1738
    movzx ebx,al
1737
    shr   eax,8
1739
    shr   eax,8
1738
    movzx ecx,al
1740
    movzx ecx,al
1739
    shr   eax,8
1741
    shr   eax,8
1740
    movzx edx,al
1742
    movzx edx,al
1741
 
1743
 
1742
    ; ebx ecx edx h m s
1744
    ; ebx ecx edx h m s
1743
 
1745
 
1744
    push ebx
1746
    push ebx
1745
    push ecx
1747
    push ecx
1746
 
1748
 
1747
    mov  eax,[maxx]
1749
    mov  eax,[maxx]
1748
    sub  eax,32
1750
    sub  eax,32
1749
    shl  eax,16
1751
    shl  eax,16
1750
    mov  ebx,eax
1752
    mov  ebx,eax
1751
    add  ebx,9
1753
    add  ebx,9
1752
 
1754
 
1753
    mov  ecx,[bte]
1755
    mov  ecx,[bte]
1754
 
1756
 
1755
    cmp  [graph_text],1
1757
    cmp  [graph_text],1
1756
    jne  no_y3
1758
    jne  no_y3
1757
    sub  bx,2
1759
    sub  bx,2
1758
    mov  ecx,0xffffff
1760
    mov  ecx,0xffffff
1759
  no_y3:
1761
  no_y3:
1760
 
1762
 
1761
 
1763
 
1762
    mov  edx,[esp]             ; __:_X
1764
    mov  edx,[esp]             ; __:_X
1763
    and  edx,15
1765
    and  edx,15
1764
    mov  eax,4
1766
    mov  eax,4
1765
    add  ebx,10*65536
1767
    add  ebx,10*65536
1766
    add  edx,text
1768
    add  edx,text
1767
    mov  esi,1
1769
    mov  esi,1
1768
    int  0x40
1770
    int  0x40
1769
 
1771
 
1770
    pop  edx                    ; __:X_
1772
    pop  edx                    ; __:X_
1771
    shr  edx,4
1773
    shr  edx,4
1772
    and  edx,15
1774
    and  edx,15
1773
    mov  eax,4
1775
    mov  eax,4
1774
    sub  ebx,6*65536
1776
    sub  ebx,6*65536
1775
    add  edx,text
1777
    add  edx,text
1776
    mov  esi,1
1778
    mov  esi,1
1777
    int  0x40
1779
    int  0x40
1778
 
1780
 
1779
    mov  edx,[esp]             ; _X:__
1781
    mov  edx,[esp]             ; _X:__
1780
    and  edx,15
1782
    and  edx,15
1781
    mov  eax,4
1783
    mov  eax,4
1782
    sub  ebx,11*65536
1784
    sub  ebx,11*65536
1783
    add  edx,text
1785
    add  edx,text
1784
    mov  esi,1
1786
    mov  esi,1
1785
    int  0x40
1787
    int  0x40
1786
 
1788
 
1787
    pop  edx                    ; X_:__
1789
    pop  edx                    ; X_:__
1788
    shr  edx,4
1790
    shr  edx,4
1789
    and  edx,15
1791
    and  edx,15
1790
    mov  eax,4
1792
    mov  eax,4
1791
    sub  ebx,6*65536
1793
    sub  ebx,6*65536
1792
    add  edx,text
1794
    add  edx,text
1793
    mov  esi,1
1795
    mov  esi,1
1794
    int  0x40
1796
    int  0x40
1795
 
1797
 
1796
    call draw_cpu_usage
1798
    call draw_cpu_usage
1797
 
1799
 
1798
  _ret:
1800
  _ret:
1799
 
1801
 
1800
    cmp  [minimize_right],0
1802
    cmp  [minimize_right],0
1801
    jne  no_m_r2
1803
    jne  no_m_r2
1802
    sub  [maxx],10
1804
    sub  [maxx],10
1803
   no_m_r2:
1805
   no_m_r2:
1804
 
1806
 
1805
   no_setup:
1807
   no_setup:
1806
 
1808
 
1807
    popa
1809
    popa
1808
    ret
1810
    ret
1809
 
1811
 
1810
 
1812
 
1811
 
1813
 
1812
draw_cpu_usage:
1814
draw_cpu_usage:
1813
 
1815
 
1814
    pusha
1816
    pusha
1815
 
1817
 
1816
    mov  [ysi],30
1818
    mov  [ysi],30
1817
    cmp  [graph_text],1
1819
    cmp  [graph_text],1
1818
    jne  @f
1820
    jne  @f
1819
    mov  [ysi],10
1821
    mov  [ysi],10
1820
  @@:
1822
  @@:
1821
 
1823
 
1822
 
1824
 
1823
    mov  eax,18    ; TSC / SEC
1825
    mov  eax,18    ; TSC / SEC
1824
    mov  ebx,5
1826
    mov  ebx,5
1825
    int  0x40
1827
    int  0x40
1826
    shr  eax,20
1828
    shr  eax,20
1827
    push eax
1829
    push eax
1828
    mov  eax,18    ; IDLE / SEC
1830
    mov  eax,18    ; IDLE / SEC
1829
    mov  ebx,4
1831
    mov  ebx,4
1830
    int  0x40
1832
    int  0x40
1831
    shr  eax,20
1833
    shr  eax,20
1832
    xor  edx,edx
1834
    xor  edx,edx
1833
    imul eax,[ysi]
1835
    imul eax,[ysi]
1834
 
1836
 
1835
    cdq
1837
    cdq
1836
    pop  ebx
1838
    pop  ebx
1837
    inc  ebx
1839
    inc  ebx
1838
    div  ebx
1840
    div  ebx
1839
    push eax
1841
    push eax
1840
 
1842
 
1841
    mov  eax,13
1843
    mov  eax,13
1842
    mov  ebx,[maxx]
1844
    mov  ebx,[maxx]
1843
    sub  ebx,60 ;;65
1845
    sub  ebx,60 ;;65
1844
    shl  ebx,16
1846
    shl  ebx,16
1845
    mov  bx,8
1847
    mov  bx,8
1846
    push ebx
1848
    push ebx
1847
    mov  eax,13
1849
    mov  eax,13
1848
    mov  ecx,5*65536
1850
    mov  ecx,5*65536
1849
    add  cx,word [ysi]
1851
    add  cx,word [ysi]
1850
    inc  cx
1852
    inc  cx
1851
 
1853
 
1852
    push ebx
1854
    push ebx
1853
    inc  ecx
1855
    inc  ecx
1854
    sub  ebx,1 shl 16
1856
    sub  ebx,1 shl 16
1855
    add  ebx,2
1857
    add  ebx,2
1856
    xor  edx,edx
1858
    xor  edx,edx
1857
    int  0x40
1859
    int  0x40
1858
    dec  ecx
1860
    dec  ecx
1859
    pop  ebx
1861
    pop  ebx
1860
 
1862
 
1861
    mov  edx,0xff0000  ;[wcolor]
1863
    mov  edx,0xff0000  ;[wcolor]
1862
;    sub  edx,0x303030
1864
;    sub  edx,0x303030
1863
    int  0x40
1865
    int  0x40
1864
    pop  ebx
1866
    pop  ebx
1865
    pop  eax
1867
    pop  eax
1866
 
1868
 
1867
;    push ebx
1869
;    push ebx
1868
    inc  eax
1870
    inc  eax
1869
    mov  ecx,5*65536
1871
    mov  ecx,5*65536
1870
    mov  cx,ax
1872
    mov  cx,ax
1871
;    pop  ebx
1873
;    pop  ebx
1872
    push ecx
1874
    push ecx
1873
    push ebx
1875
    push ebx
1874
    sub  ecx,1 shl 16
1876
    sub  ecx,1 shl 16
1875
    add  ecx,1
1877
    add  ecx,1
1876
    sub  ebx,1 shl 16
1878
    sub  ebx,1 shl 16
1877
    add  ebx,2
1879
    add  ebx,2
1878
    mov  eax,13
1880
    mov  eax,13
1879
    xor  edx,edx
1881
    xor  edx,edx
1880
    int  0x40
1882
    int  0x40
1881
    pop  ebx
1883
    pop  ebx
1882
    pop  ecx
1884
    pop  ecx
1883
    mov  edx,0x44aa44  ;[wcolor]
1885
    mov  edx,0x44aa44  ;[wcolor]
1884
;    add  edx,0x00101010
1886
;    add  edx,0x00101010
1885
    int  0x40
1887
    int  0x40
1886
 
1888
 
1887
    popa
1889
    popa
1888
 
1890
 
1889
    ret
1891
    ret
1890
 
1892
 
1891
; DATA
1893
; DATA
1892
 
1894
 
1893
stripe:
1895
stripe:
1894
    dd  -0x010101
1896
    dd  -0x010101
1895
    dd  -0x010101
1897
    dd  -0x010101
1896
    dd  -0x020202
1898
    dd  -0x020202
1897
    dd  -0x010101
1899
    dd  -0x010101
1898
    dd  -0x000000
1900
    dd  -0x000000
1899
 
1901
 
1900
    dd   0x000000
1902
    dd   0x000000
1901
    dd   0x010101
1903
    dd   0x010101
1902
    dd   0x020202
1904
    dd   0x020202
1903
    dd   0x010101
1905
    dd   0x010101
1904
    dd   0x010101
1906
    dd   0x010101
1905
 
1907
 
1906
m_icon:
1908
m_icon:
1907
    dd  0x0
1909
    dd  0x0
1908
    dd  0x808080
1910
    dd  0x808080
1909
    dd  0x000000
1911
    dd  0x000000
1910
    dd  0x000000
1912
    dd  0x000000
1911
    dd  0xffffff
1913
    dd  0xffffff
1912
 
1914
 
1913
 
1915
 
1914
lsz m_text,\
1916
lsz m_text,\
1915
  ru, "Œ…ž",\
1917
  ru, "Œ…ž",\
1916
  en, "MENU",\
1918
  en, "MENU",\
1917
  et, "MENÜÜ"
1919
  et, "MENÜÜ"
1918
 
1920
 
1919
mi_text   db   'WAVETETRBGRDGPL '
1921
mi_text   db   'WAVETETRBGRDGPL '
1920
 
1922
 
1921
flag_text db 'EnFiGeRuFrEt'
1923
flag_text db 'EnFiGeRuFrEt'
1922
 
1924
 
1923
type_lang db 0
1925
type_lang db 0
1924
;music_type db 1
1926
;music_type db 1
1925
sound_flag db 0
1927
sound_flag db 0
1926
button_frames  dd  0x0
1928
button_frames  dd  0x0
1927
 
1929
 
1928
checks    dd -1
1930
checks    dd -1
1929
hidetext  db 0x11,0x10,0x1e
1931
hidetext  db 0x11,0x10,0x1e
1930
 
1932
 
1931
turn_text db  '><'
1933
turn_text db  '><'
1932
gpl       db  'GPL'
1934
gpl       db  'GPL'
1933
 
1935
 
1934
chlang db 'LANG',0
1936
chlang db 'LANG',0
1935
syslang db 'SLAN',0
1937
;syslang db 'SLAN',0
1936
 
1938
 
1937
contrast  db 0
1939
contrast  db 0
1938
 
1940
 
1939
running_applications  dd  0x100
1941
running_applications  dd  0x100
1940
max_applications      dd  11
1942
max_applications      dd  11
1941
 
1943
 
1942
page_list  dd 0
1944
page_list  dd 0
1943
draw_start_position dd 0
1945
draw_start_position dd 0
1944
draw_window_1 db 0
1946
draw_window_1 db 0
1945
 
1947
 
1946
b_size_y:  dd  0x0
1948
b_size_y:  dd  0x0
1947
ysi  dd  0
1949
ysi  dd  0
1948
small_draw dd 0x0
1950
small_draw dd 0x0
1949
 
1951
 
1950
ptime   dd 0x0
1952
ptime   dd 0x0
1951
maxx    dd 0x0
1953
maxx    dd 0x0
1952
text    db '0123456789'
1954
text    db '0123456789'
1953
page_a1 db '<  >'
1955
page_a1 db '<  >'
1954
bte     dd 0xccddee
1956
bte     dd 0xccddee
1955
 
1957
 
1956
wcolor  dd 0x506070
1958
wcolor  dd 0x506070
1957
 
1959
 
1958
sec     db ': '
1960
sec     db ': '
1959
pros    db '                                                  '
1961
pros    db '                                                  '
1960
        db '                                                  '
1962
        db '                                                  '
1961
 
1963
 
1962
screenxy    dd  0x0
1964
screenxy    dd  0x0
1963
stcount     dd  0x0
1965
stcount     dd  0x0
1964
 
1966
 
1965
setup_exec:
1967
setup_exec:
1966
        dd      7
1968
        dd      7
1967
        dd      0
1969
        dd      0
1968
.cmdline dd     ?
1970
.cmdline dd     ?
1969
        dd      0
1971
        dd      0
1970
        dd      0
1972
        dd      0
1971
        db      '/RD/1/'
1973
        db      '/RD/1/'
1972
file_sys db     'SETUP',0
1974
file_sys db     'SETUP',0
1973
 
1975
 
1974
exec_fileinfo:
1976
exec_fileinfo:
1975
        dd      7
1977
        dd      7
1976
        dd      0
1978
        dd      0
1977
        dd      0
1979
        dd      0
1978
        dd      0
1980
        dd      0
1979
        dd      0
1981
        dd      0
1980
        db      0
1982
        db      0
1981
.name   dd      ?
1983
.name   dd      ?
1982
 
1984
 
1983
end_name        db      '/RD/1/END',0
1985
end_name        db      '/RD/1/END',0
1984
menu_name       db      '/RD/1/MENU',0
1986
menu_name       db      '/RD/1/MENU',0
1985
calendar_name   db      '/RD/1/CALENDAR',0
1987
calendar_name   db      '/RD/1/CALENDAR',0
1986
sysmeter_name   db      '/RD/1/GMON',0
1988
sysmeter_name   db      '/RD/1/GMON',0
1987
 
1989
 
1988
dat_fileinfo:
1990
dat_fileinfo:
1989
        dd      0
1991
        dd      0
1990
        dd      0
1992
        dd      0
1991
        dd      0
1993
        dd      0
1992
        dd      1024
1994
        dd      1024
1993
        dd      I_END
1995
        dd      I_END
1994
        db      '/RD/1/PANEL.DAT',0
1996
        db      '/RD/1/PANEL.DAT',0
1995
 
1997
 
1996
m_bmp_fileinfo:
1998
m_bmp_fileinfo:
1997
        dd      0
1999
        dd      0
1998
        dd      0
2000
        dd      0
1999
        dd      0
2001
        dd      0
2000
        dd      8192
2002
        dd      8192
2001
        dd      image
2003
        dd      image
2002
        db      '/RD/1/MENUET.BMP',0
2004
        db      '/RD/1/MENUET.BMP',0
2003
 
2005
 
2004
iconf_fileinfo:
2006
iconf_fileinfo:
2005
        dd      0
2007
        dd      0
2006
        dd      0
2008
        dd      0
2007
        dd      0
2009
        dd      0
2008
        dd      8192
2010
        dd      8192
2009
        dd      image
2011
        dd      image
2010
        db      '/RD/1/'
2012
        db      '/RD/1/'
2011
iconf   db      'MBAR_IX.BMP',0
2013
iconf   db      'MBAR_IX.BMP',0
2012
 
2014
 
2013
I_END:
2015
I_END:
2014
 
2016
 
2015
screen_size:
2017
screen_size:
2016
  .height dw ?
2018
  .height dw ?
2017
  .width  dw ?
2019
  .width  dw ?
2018
 
2020
 
2019
area9 rb 100
2021
area9 rb 100
2020
system_colours rd 10
2022
system_colours rd 10
2021
app_list rd 50
2023
app_list rd 50
2022
tictable:
2024
tictable:
2023
  rd 256
2025
  rd 256
2024
image:
2026
image:
2025
gpl>
2027
gpl>