Subversion Repositories Kolibri OS

Rev

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

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