Subversion Repositories Kolibri OS

Rev

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

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