Subversion Repositories Kolibri OS

Rev

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

Rev 9530 Rev 9876
1
use32
1
use32
2
    org     0x0
2
    org     0x0
3
;-------------------------------------------------------------------------------
3
;-------------------------------------------------------------------------------
4
    db        "MENUET01"
4
    db        "MENUET01"
5
    dd        1, main, __dataend, __memend, __stackend, 0, sys_path
5
    dd        1, main, __dataend, __memend, __stackend, 0, sys_path
6
;-------------------------------------------------------------------------------
6
;-------------------------------------------------------------------------------
7
    include "../../../macros.inc"
7
    include "../../../macros.inc"
8
    include "../../../proc32.inc"
8
    include "../../../proc32.inc"
9
    include "../../../dll.inc"
9
    include "../../../dll.inc"
10
    include "../../../KOSfuncs.inc"
10
    include "../../../KOSfuncs.inc"
11
    include "../../../load_lib.mac"
11
    include "../../../load_lib.mac"
12
    ;include "../../../debug.inc"
12
    ;include "../../../debug.inc"
13
 
13
 
14
    include "DATA.INC"
14
    include "DATA.INC"
15
    include "NAME.INC"
15
    include "NAME.INC"
16
 
16
 
17
    @use_library \
17
    @use_library \
18
        mem.Alloc, mem.Free, mem.ReAlloc, dll.Load
18
        mem.Alloc, mem.Free, mem.ReAlloc, dll.Load
19
;================================================================================
19
;================================================================================
20
 
20
 
21
main:
21
main:
22
; ==== Init ====
22
; ==== Init ====
23
    mcall   SF_SYS_MISC, SSF_HEAP_INIT
23
    mcall   SF_SYS_MISC, SSF_HEAP_INIT
24
    mcall   SF_STYLE_SETTINGS, SSF_GET_COLORS, sc, sizeof.system_colors
24
    mcall   SF_STYLE_SETTINGS, SSF_GET_COLORS, sc, sizeof.system_colors
25
    call    LOAD_ICONS
25
    call    LOAD_ICONS
26
 
26
 
27
    mcall   SF_SYSTEM, SSF_GET_ACTIVE_WINDOW
27
    mcall   SF_SYSTEM, SSF_GET_ACTIVE_WINDOW
28
    mov     [win.psid], eax
28
    mov     [win.psid], eax
29
 
29
 
30
    mcall   SF_SET_EVENTS_MASK, EVM_REDRAW+EVM_BUTTON+EVM_MOUSE ;+EVM_DEKSTOP to update colors on skin change
30
    mcall   SF_SET_EVENTS_MASK, EVM_REDRAW+EVM_BUTTON+EVM_MOUSE ;+EVM_DEKSTOP to update colors on skin change
31
    
31
    
32
; ==== Load libs ====
32
; ==== Load libs ====
33
    load_libraries load_lib_start, load_lib_end
33
    load_libraries load_lib_start, load_lib_end
34
 
34
 
35
; ==== Config LibINI ====
35
; ==== Config LibINI ====
36
    invoke  ini.get_int, ini_data.file_name, ini_data.settings_name, ini_data.location_name, 2
36
    invoke  ini.get_int, ini_data.file_name, ini_data.settings_name, ini_data.location_name, 2
37
    test    eax,eax
37
    test    eax,eax
38
    jz      exit
38
    jz      exit
39
    mov     [dock_items.location], eax
39
    mov     [dock_items.location], eax
40
    invoke  ini.get_int, ini_data.file_name, ini_data.settings_name, ini_data.fsize_name, 0
40
    invoke  ini.get_int, ini_data.file_name, ini_data.settings_name, ini_data.fsize_name, 0
41
    mov     [dock_items.fsize], eax
41
    mov     [dock_items.fsize], eax
42
    invoke  ini.get_int, ini_data.file_name, ini_data.settings_name, ini_data.ashow_name, 0
42
    invoke  ini.get_int, ini_data.file_name, ini_data.settings_name, ini_data.ashow_name, 0
43
    mov     [dock_items.ashow], eax
43
    mov     [dock_items.ashow], eax
44
 
44
 
45
    invoke  ini.sections, ini_data.file_name, sections_callback
45
    invoke  ini.sections, ini_data.file_name, sections_callback
46
 
46
 
47
; ==== Config window ====
47
; ==== Config window ====
48
    mov     eax, dword[dock_items.location]
48
    mov     eax, dword[dock_items.location]
49
    and     eax, 1b
49
    and     eax, 1b
50
    cmp     eax, 0
50
    cmp     eax, 0
51
    je      .vert
51
    je      .vert
52
    jmp     .setshape
52
    jmp     .setshape
53
 
53
 
54
 .vert:
54
 .vert:
55
    mov     byte[win.isvert], 1
55
    mov     byte[win.isvert], 1
56
 
56
 
57
 .setshape:
57
 .setshape:
58
    cmp     byte[win.isvert], 1
58
    cmp     byte[win.isvert], 1
59
    je      .vert_sp
59
    je      .vert_sp
60
 
60
 
61
 .horz_sp:
61
 .horz_sp:
62
    call    .HORZ_WIDTH
62
    call    .HORZ_WIDTH
63
    call    .HORZ_X
63
    call    .HORZ_X
64
    call    .HORZ_HEIGHT
64
    call    .HORZ_HEIGHT
65
    cmp     dword[dock_items.location], 1
65
    cmp     dword[dock_items.location], 1
66
    je      .settop
66
    je      .settop
67
 
67
 
68
 .setbottom:
68
 .setbottom:
69
    call    .HORZ_Y_BOTTOM
69
    call    .HORZ_Y_BOTTOM
70
    jmp     .SETDEF
70
    jmp     .SETDEF
71
 
71
 
72
 .settop:
72
 .settop:
73
    call    .HORZ_Y_TOP
73
    call    .HORZ_Y_TOP
74
    jmp     .SETDEF
74
    jmp     .SETDEF
75
 
75
 
76
 
76
 
77
 .vert_sp:
77
 .vert_sp:
78
    call    .VERT_WIDTH
78
    call    .VERT_WIDTH
79
    call    .VERT_HEIGHT
79
    call    .VERT_HEIGHT
80
    call    .VERT_Y
80
    call    .VERT_Y
81
    cmp     dword[dock_items.location], 2
81
    cmp     dword[dock_items.location], 2
82
    je      .setleft
82
    je      .setleft
83
 
83
 
84
 .setright:
84
 .setright:
85
    call    .VERT_X_RIGHT
85
    call    .VERT_X_RIGHT
86
    jmp     .SETDEF
86
    jmp     .SETDEF
87
 
87
 
88
 .setleft:
88
 .setleft:
89
    call    .VERT_X_LEFT
89
    call    .VERT_X_LEFT
90
    jmp     .SETDEF
90
    jmp     .SETDEF
91
 
91
 
92
;-------------------------------------------------------------------------------
92
;-------------------------------------------------------------------------------
93
 .HORZ_WIDTH:
93
 .HORZ_WIDTH:
94
    cmp     [dock_items.fsize], byte 1
94
    cmp     [dock_items.fsize], byte 1
95
    je      @f
95
    je      @f
96
    mov     eax, BUTTON_SIZE
96
    mov     eax, BUTTON_SIZE
97
    mov     ebx, [dock_items.count]
97
    mov     ebx, [dock_items.count]
98
    imul    eax, ebx
98
    imul    eax, ebx
99
    add     eax, 24
99
    add     eax, 24
100
    dec     eax
100
    dec     eax
101
    jmp     .set_hw
101
    jmp     .set_hw
102
  @@:
102
  @@:
103
    mcall   SF_GET_SCREEN_SIZE
103
    mcall   SF_GET_SCREEN_SIZE
104
    shr     eax, 16
104
    shr     eax, 16
105
 .set_hw:
105
 .set_hw:
106
    mov     [win.w_opn], eax
106
    mov     [win.w_opn], eax
107
    mov     [win.w_hdn], eax
107
    mov     [win.w_hdn], eax
108
 
108
 
109
    ret
109
    ret
110
 
110
 
111
;-------------------------------------------------------------------------------
111
;-------------------------------------------------------------------------------
112
 .HORZ_X:
112
 .HORZ_X:
113
    mcall   SF_GET_SCREEN_SIZE
113
    mcall   SF_GET_SCREEN_SIZE
114
    shr     eax, 17
114
    shr     eax, 17
115
    mov     ecx, [win.w_opn]
115
    mov     ecx, [win.w_opn]
116
    shr     ecx, 1
116
    shr     ecx, 1
117
    sub     eax, ecx
117
    sub     eax, ecx
118
    mov     [win.x_opn], eax
118
    mov     [win.x_opn], eax
119
    mov     [win.x_hdn], eax
119
    mov     [win.x_hdn], eax
120
 
120
 
121
    ret
121
    ret
122
 
122
 
123
;-------------------------------------------------------------------------------
123
;-------------------------------------------------------------------------------
124
 .HORZ_HEIGHT:
124
 .HORZ_HEIGHT:
125
    mov     dword[win.h_hdn], 3
125
    mov     dword[win.h_hdn], 3
126
    mov     dword[win.h_opn], BUTTON_SIZE
126
    mov     dword[win.h_opn], BUTTON_SIZE
127
 
127
 
128
    ret
128
    ret
129
 
129
 
130
;-------------------------------------------------------------------------------
130
;-------------------------------------------------------------------------------
131
 .HORZ_Y_BOTTOM:
131
 .HORZ_Y_BOTTOM:
132
    mcall   SF_GET_SCREEN_SIZE
132
    mcall   SF_GET_SCREEN_SIZE
133
    and     eax, 0xFFFF
133
    and     eax, 0xFFFF
134
    dec     eax
134
    dec     eax
135
    mov     [win.y_hdn], eax
135
    mov     [win.y_hdn], eax
136
    sub     eax, 43
136
    sub     eax, 43
137
    mov     [win.y_opn], eax
137
    mov     [win.y_opn], eax
138
 
138
 
139
    ret
139
    ret
140
 
140
 
141
 .HORZ_Y_TOP:
141
 .HORZ_Y_TOP:
142
    mov     dword[win.y_opn], 0
142
    mov     dword[win.y_opn], 0
143
    mov     dword[win.y_hdn], 0
143
    mov     dword[win.y_hdn], 0
144
 
144
 
145
    ret
145
    ret
146
 
146
 
147
;-------------------------------------------------------------------------------
147
;-------------------------------------------------------------------------------
148
 .VERT_WIDTH:
148
 .VERT_WIDTH:
149
    mov     dword[win.w_opn], BUTTON_SIZE
149
    mov     dword[win.w_opn], BUTTON_SIZE
150
    mov     dword[win.w_hdn], 3
150
    mov     dword[win.w_hdn], 3
151
 
151
 
152
    ret
152
    ret
153
 
153
 
154
;-------------------------------------------------------------------------------
154
;-------------------------------------------------------------------------------
155
 .VERT_X_LEFT:
155
 .VERT_X_LEFT:
156
    mov     dword[win.x_opn], 0
156
    mov     dword[win.x_opn], 0
157
    mov     dword[win.x_hdn], 0
157
    mov     dword[win.x_hdn], 0
158
 
158
 
159
    ret
159
    ret
160
 
160
 
161
 .VERT_X_RIGHT:
161
 .VERT_X_RIGHT:
162
    mcall   SF_GET_SCREEN_SIZE
162
    mcall   SF_GET_SCREEN_SIZE
163
    and     eax, 0xFFFF0000
163
    and     eax, 0xFFFF0000
164
    shr     eax, 16
164
    shr     eax, 16
165
    mov     [win.x_hdn], eax
165
    mov     [win.x_hdn], eax
166
    sub     eax, BUTTON_SIZE
166
    sub     eax, BUTTON_SIZE
167
    mov     [win.x_opn], eax
167
    mov     [win.x_opn], eax
168
 
168
 
169
    ret
169
    ret
170
 
170
 
171
;-------------------------------------------------------------------------------
171
;-------------------------------------------------------------------------------
172
 .VERT_HEIGHT:
172
 .VERT_HEIGHT:
173
    cmp     [dock_items.fsize], byte 1
173
    cmp     [dock_items.fsize], byte 1
174
    je      @f
174
    je      @f
175
    mov     eax, BUTTON_SIZE
175
    mov     eax, BUTTON_SIZE
176
    mov     ebx, [dock_items.count]
176
    mov     ebx, [dock_items.count]
177
    imul    eax, ebx
177
    imul    eax, ebx
178
    dec     eax
178
    dec     eax
179
    jmp     .set_vh
179
    jmp     .set_vh
180
  @@:
180
  @@:
181
    mcall   SF_GET_SCREEN_SIZE
181
    mcall   SF_GET_SCREEN_SIZE
182
    and     eax, 0xFFFF
182
    and     eax, 0xFFFF
183
 .set_vh:
183
 .set_vh:
184
    mov     [win.h_opn], eax
184
    mov     [win.h_opn], eax
185
    mov     [win.h_hdn], eax
185
    mov     [win.h_hdn], eax
186
 
186
 
187
    ret
187
    ret
188
 
188
 
189
;-------------------------------------------------------------------------------
189
;-------------------------------------------------------------------------------
190
 .VERT_Y:
190
 .VERT_Y:
191
    mcall   SF_GET_SCREEN_SIZE
191
    mcall   SF_GET_SCREEN_SIZE
192
    and     eax, 0xFFFF
192
    and     eax, 0xFFFF
193
    shr     eax, 1
193
    shr     eax, 1
194
 
194
 
195
    mov     esi, [win.h_opn]
195
    mov     esi, [win.h_opn]
196
    shr     esi, 1
196
    shr     esi, 1
197
    sub     eax, esi
197
    sub     eax, esi
198
 
198
 
199
    mov     [win.y_hdn], eax
199
    mov     [win.y_hdn], eax
200
    mov     [win.y_opn], eax
200
    mov     [win.y_opn], eax
201
 
201
 
202
    ret
202
    ret
203
 
203
 
204
;-------------------------------------------------------------------------------
204
;-------------------------------------------------------------------------------
205
 .SETDEF:
205
 .SETDEF:
206
    mov     eax, [win.w_hdn]
206
    mov     eax, [win.w_hdn]
207
    mov     [win.w], eax
207
    mov     [win.w], eax
208
 
208
 
209
    mov     eax, [win.x_hdn]
209
    mov     eax, [win.x_hdn]
210
    mov     [win.x], eax
210
    mov     [win.x], eax
211
 
211
 
212
    mov     eax, [win.h_hdn]
212
    mov     eax, [win.h_hdn]
213
    mov     [win.h], eax
213
    mov     [win.h], eax
214
 
214
 
215
    mov     eax, [win.y_hdn]
215
    mov     eax, [win.y_hdn]
216
    mov     [win.y], eax
216
    mov     [win.y], eax
217
    
217
    
218
    cmp     byte[dock_items.ashow],1
218
    cmp     byte[dock_items.ashow],1
219
    jne     .not_ashow
219
    jne     .not_ashow
220
 
220
 
221
    mov     eax, [win.w_opn]
221
    mov     eax, [win.w_opn]
222
    mov     [win.w], eax
222
    mov     [win.w], eax
223
 
223
 
224
    mov     eax, [win.x_opn]
224
    mov     eax, [win.x_opn]
225
    mov     [win.x], eax
225
    mov     [win.x], eax
226
 
226
 
227
    mov     eax, [win.h_opn]
227
    mov     eax, [win.h_opn]
228
    mov     [win.h], eax
228
    mov     [win.h], eax
229
 
229
 
230
    mov     eax, [win.y_opn]
230
    mov     eax, [win.y_opn]
231
    mov     [win.y], eax
231
    mov     [win.y], eax
232
 
232
 
233
 .not_ashow:
233
 .not_ashow:
234
 
234
 
235
 
235
 
236
;-------------------------------------------------------------------------------
236
;-------------------------------------------------------------------------------
237
; ==== START ====
237
; ==== START ====
238
    mcall   SF_THREAD_INFO, win.procinfo, -1
238
    mcall   SF_THREAD_INFO, win.procinfo, -1
239
    mov     ecx, [win.procinfo + 30]
239
    mov     ecx, [win.procinfo + 30]
240
    mcall   SF_SYSTEM, SSF_GET_THREAD_SLOT
240
    mcall   SF_SYSTEM, SSF_GET_THREAD_SLOT
241
    and     eax, 0xFFFF
241
    and     eax, 0xFFFF
242
    mov     [win.sid], eax
242
    mov     [win.sid], eax
243
 
243
 
244
    call    main_loop
244
    call    main_loop
245
;-------------------------------------------------------------------------------
245
;-------------------------------------------------------------------------------
246
exit:
246
exit:
247
    mcall   SF_SYSTEM, SSF_TERMINATE_THREAD, [nwin.sid]
247
    mcall   SF_SYSTEM, SSF_TERMINATE_THREAD, [nwin.sid]
248
    mcall   SF_TERMINATE_PROCESS
248
    mcall   SF_TERMINATE_PROCESS
249
;-------------------------------------------------------------------------------
249
;-------------------------------------------------------------------------------
-
 
250
error_exit:
-
 
251
    push    .notify
-
 
252
    dec     esp
-
 
253
    push    0
-
 
254
    push    0
-
 
255
    push    .error_message
-
 
256
    push    0
-
 
257
    push    SSF_START_APP
-
 
258
 
-
 
259
    mcall   SF_FILE, esp
-
 
260
    add     esp, 6*4 + 1
-
 
261
    mcall   SF_SYSTEM, SSF_TERMINATE_THREAD, [nwin.sid]
-
 
262
    mcall   SF_TERMINATE_PROCESS
-
 
263
.error_message:
-
 
264
    db  '"@DOCKY\nError load @RESHARE" -tdE',0
-
 
265
.notify:
-
 
266
    db  '/sys/@notify',0
-
 
267
;-------------------------------------------------------------------------------
250
align 4
268
align 4
251
main_loop:
269
main_loop:
252
    mcall   SF_WAIT_EVENT
270
    mcall   SF_WAIT_EVENT
253
 
271
 
254
    cmp     eax, EV_REDRAW
272
    cmp     eax, EV_REDRAW
255
    je      event_redraw
273
    je      event_redraw
256
 
274
 
257
    cmp     eax, EV_BUTTON
275
    cmp     eax, EV_BUTTON
258
    je      event_button
276
    je      event_button
259
 
277
 
260
    cmp     eax, EV_MOUSE
278
    cmp     eax, EV_MOUSE
261
    je      event_mouse
279
    je      event_mouse
262
 
280
 
263
    jmp     main_loop
281
    jmp     main_loop
264
;-------------------------------------------------------------------------------
282
;-------------------------------------------------------------------------------
265
event_redraw:
283
event_redraw:
266
    call    DRAW_WINDOW
284
    call    DRAW_WINDOW
267
    jmp     main_loop
285
    jmp     main_loop
268
;-------------------------------------------------------------------------------
286
;-------------------------------------------------------------------------------
269
DRAW_WINDOW:
287
DRAW_WINDOW:
270
    mcall   SF_REDRAW, SSF_BEGIN_DRAW
288
    mcall   SF_REDRAW, SSF_BEGIN_DRAW
271
    
289
    
272
    push    dword [sc.work]
290
    push    dword [sc.work]
273
    mcall   SF_STYLE_SETTINGS, SSF_GET_COLORS, sc, sizeof.system_colors
291
    mcall   SF_STYLE_SETTINGS, SSF_GET_COLORS, sc, sizeof.system_colors
274
    pop     eax
292
    pop     eax
275
    cmp     dword [sc.work], eax
293
    cmp     dword [sc.work], eax
276
    je      @f
294
    je      @f
277
    call    LOAD_ICONS
295
    call    LOAD_ICONS
278
  @@:
296
  @@:
279
    mov     esi, [sc.work]
297
    mov     esi, [sc.work]
280
    or        esi, 0x01000000
298
    or        esi, 0x01000000
281
    mcall   SF_CREATE_WINDOW, <[win.x], [win.w]>, <[win.y], [win.h]>, [sc.work], , [sc.work_dark]
299
    mcall   SF_CREATE_WINDOW, <[win.x], [win.w]>, <[win.y], [win.h]>, [sc.work], , [sc.work_dark]
282
 
300
 
283
    xor     edi, edi
301
    xor     edi, edi
284
  @@:
302
  @@:
285
    cmp     edi, [dock_items.count]
303
    cmp     edi, [dock_items.count]
286
    je        @f
304
    je        @f
287
 
305
 
288
    push    edi
306
    push    edi
289
    mov     eax, SF_DEFINE_BUTTON
307
    mov     eax, SF_DEFINE_BUTTON
290
    mov     edx, 0x60000002
308
    mov     edx, 0x60000002
291
    mov     esi, [sc.work]
309
    mov     esi, [sc.work]
292
    imul    edi, BUTTON_SIZE
310
    imul    edi, BUTTON_SIZE
293
    add     edi, 12
311
    add     edi, 12
294
    shl     edi, 16
312
    shl     edi, 16
295
    add     edi, BUTTON_SIZE
313
    add     edi, BUTTON_SIZE
296
    cmp     byte[win.isvert], 1
314
    cmp     byte[win.isvert], 1
297
    je        .vert_btn
315
    je        .vert_btn
298
    mcall   , edi, <0, BUTTON_SIZE>
316
    mcall   , edi, <0, BUTTON_SIZE>
299
    jmp     .endbtn
317
    jmp     .endbtn
300
 .vert_btn:
318
 .vert_btn:
301
    sub     edi, 12 shl 16
319
    sub     edi, 12 shl 16
302
    mcall   , <0, BUTTON_SIZE>, edi
320
    mcall   , <0, BUTTON_SIZE>, edi
303
 .endbtn:
321
 .endbtn:
304
    pop     edi
322
    pop     edi
305
 
323
 
306
    cmp     byte[dock_items.separator + edi], 1
324
    cmp     byte[dock_items.separator + edi], 1
307
    jne     .end_separator
325
    jne     .end_separator
308
 
326
 
309
 .draw_separator:
327
 .draw_separator:
310
    push    ebx
328
    push    ebx
311
    push    ecx
329
    push    ecx
312
 
330
 
313
    mov     eax, SF_DRAW_RECT
331
    mov     eax, SF_DRAW_RECT
314
    mov     ebx, edi
332
    mov     ebx, edi
315
    imul    ebx, BUTTON_SIZE
333
    imul    ebx, BUTTON_SIZE
316
    add     ebx, BUTTON_SIZE
334
    add     ebx, BUTTON_SIZE
317
    add     ebx, 12-1
335
    add     ebx, 12-1
318
    shl     ebx, 16
336
    shl     ebx, 16
319
    add     ebx, 2
337
    add     ebx, 2
320
 
338
 
321
    cmp     byte[win.isvert], 1
339
    cmp     byte[win.isvert], 1
322
    je      .vert_draw_sep
340
    je      .vert_draw_sep
323
    mcall   , , <4,  36>, [sc.work_dark]
341
    mcall   , , <4,  36>, [sc.work_dark]
324
    jmp     .end_inner_sep
342
    jmp     .end_inner_sep
325
 .vert_draw_sep:
343
 .vert_draw_sep:
326
    sub     ebx, 12 shl 16
344
    sub     ebx, 12 shl 16
327
    mov     ecx, ebx
345
    mov     ecx, ebx
328
    mcall   , <4, 36>, , [sc.work_dark]
346
    mcall   , <4, 36>, , [sc.work_dark]
329
 .end_inner_sep:
347
 .end_inner_sep:
330
    pop     ecx
348
    pop     ecx
331
    pop     ebx
349
    pop     ebx
332
 .end_separator:
350
 .end_separator:
333
 
351
 
334
    cmp     byte[win.isvert], 1
352
    cmp     byte[win.isvert], 1
335
    je        .vert_dig
353
    je        .vert_dig
336
    mov     edx, ebx
354
    mov     edx, ebx
337
    and     edx, 0xFFFF0000
355
    and     edx, 0xFFFF0000
338
    add     edx, 0x00060006
356
    add     edx, 0x00060006
339
    jmp     .digend
357
    jmp     .digend
340
 .vert_dig:
358
 .vert_dig:
341
    mov     edx, ecx
359
    mov     edx, ecx
342
    and     edx, 0xFFFF0000
360
    and     edx, 0xFFFF0000
343
    shr     edx, 16
361
    shr     edx, 16
344
    add     edx, 0x00060006
362
    add     edx, 0x00060006
345
 .digend:
363
 .digend:
346
 
364
 
347
    imul    ebx, edi, 4
365
    imul    ebx, edi, 4
348
    add     ebx, dock_items.icon
366
    add     ebx, dock_items.icon
349
    mov     ebx, [ebx]
367
    mov     ebx, [ebx]
350
 
368
 
351
    push    edi
369
    push    edi
352
    imul    ebx, 32*32*4
370
    imul    ebx, 32*32*4
353
    add     ebx, [icons_inactive]
371
    add     ebx, [icons_inactive]
354
    mcall   SF_PUT_IMAGE_EXT, , <32, 32>, , 32, 0, 0
372
    mcall   SF_PUT_IMAGE_EXT, , <32, 32>, , 32, 0, 0
355
    pop     edi 
373
    pop     edi 
356
 
374
 
357
    inc     edi
375
    inc     edi
358
    jmp     @b
376
    jmp     @b
359
  @@:
377
  @@:
360
 
378
 
361
    mcall   SF_REDRAW, SSF_END_DRAW
379
    mcall   SF_REDRAW, SSF_END_DRAW
362
 
380
 
363
    ret
381
    ret
364
;-------------------------------------------------------------------------------
382
;-------------------------------------------------------------------------------
365
event_button:
383
event_button:
366
    mcall   SF_GET_BUTTON
384
    mcall   SF_GET_BUTTON
367
 
385
 
368
    ;; it must not be possible to close dock
386
    ;; it must not be possible to close dock
369
    ;cmp     ah, 1
387
    ;cmp     ah, 1
370
    ;je        .button_close
388
    ;je        .button_close
371
 
389
 
372
    cmp     ah, 2
390
    cmp     ah, 2
373
    je      .button_dock
391
    je      .button_dock
374
 
392
 
375
    jmp     @f
393
    jmp     @f
376
 
394
 
377
 ;.button_close:
395
 ;.button_close:
378
 ;   jmp     exit
396
 ;   jmp     exit
379
 
397
 
380
 .button_dock:
398
 .button_dock:
381
    mov     edi, [win.btn_index]
399
    mov     edi, [win.btn_index]
382
    imul    edi, 256
400
    imul    edi, 256
383
 
401
 
384
    mov     dword[fi.p00], SSF_START_APP
402
    mov     dword[fi.p00], SSF_START_APP
385
 
403
 
386
    mov     esi, edi
404
    mov     esi, edi
387
    add     esi, dock_items.path
405
    add     esi, dock_items.path
388
    mov     dword[fi.p21], esi
406
    mov     dword[fi.p21], esi
389
 
407
 
390
    mov     esi, edi
408
    mov     esi, edi
391
    add     esi, dock_items.param
409
    add     esi, dock_items.param
392
    mov     dword[fi.p08], esi
410
    mov     dword[fi.p08], esi
393
 
411
 
394
    mcall   SF_FILE, fi
412
    mcall   SF_FILE, fi
395
 
413
 
396
    mov     ecx, eax
414
    mov     ecx, eax
397
    mcall   SF_SYSTEM, SSF_GET_THREAD_SLOT
415
    mcall   SF_SYSTEM, SSF_GET_THREAD_SLOT
398
    and     eax, 0xFFFF
416
    and     eax, 0xFFFF
399
    mov     [win.psid], eax
417
    mov     [win.psid], eax
400
 
418
 
401
    jmp     wnd_hide
419
    jmp     wnd_hide
402
 
420
 
403
  @@:
421
  @@:
404
    jmp     main_loop
422
    jmp     main_loop
405
;-------------------------------------------------------------------------------
423
;-------------------------------------------------------------------------------
406
event_mouse:
424
event_mouse:
407
  ; ==== IS MOUSE INNER ====
425
  ; ==== IS MOUSE INNER ====
408
    mcall   SF_MOUSE_GET, SSF_WINDOW_POSITION
426
    mcall   SF_MOUSE_GET, SSF_WINDOW_POSITION
409
    mov     edi, eax
427
    mov     edi, eax
410
    mov     esi, eax
428
    mov     esi, eax
411
    shr     edi, 16
429
    shr     edi, 16
412
    and     esi, 0xFFFF
430
    and     esi, 0xFFFF
413
 
431
 
414
    cmp     edi, 0
432
    cmp     edi, 0
415
    jl        wnd_hide
433
    jl        wnd_hide
416
    dec     edi
434
    dec     edi
417
    cmp     edi, [win.w]
435
    cmp     edi, [win.w]
418
    jg        wnd_hide
436
    jg        wnd_hide
419
    cmp     esi, 0
437
    cmp     esi, 0
420
    jl        wnd_hide
438
    jl        wnd_hide
421
    dec     esi
439
    dec     esi
422
    cmp     esi, [win.h]
440
    cmp     esi, [win.h]
423
    jg        wnd_hide
441
    jg        wnd_hide
424
 
442
 
425
  ; ==== COUNT INDEX ====
443
  ; ==== COUNT INDEX ====
426
 
444
 
427
    mov     eax, [dock_items.location]
445
    mov     eax, [dock_items.location]
428
    and     eax, 1b
446
    and     eax, 1b
429
    cmp     eax, 1
447
    cmp     eax, 1
430
    jne     .vert
448
    jne     .vert
431
    mov     eax, edi
449
    mov     eax, edi
432
    jmp     .nxt
450
    jmp     .nxt
433
 
451
 
434
 .vert:
452
 .vert:
435
    mov     eax, esi
453
    mov     eax, esi
436
    add     eax, 12
454
    add     eax, 12
437
 
455
 
438
 .nxt:
456
 .nxt:
439
    sub     eax, 12
457
    sub     eax, 12
440
    mov     edx, 0
458
    mov     edx, 0
441
    mov     ebx, BUTTON_SIZE
459
    mov     ebx, BUTTON_SIZE
442
    div     ebx
460
    div     ebx
443
 
461
 
444
    cmp     eax, [dock_items.count]
462
    cmp     eax, [dock_items.count]
445
    jge     .set0
463
    jge     .set0
446
    jmp     .nxtcmp
464
    jmp     .nxtcmp
447
 
465
 
448
 .set0:
466
 .set0:
449
    mov     eax, 100
467
    mov     eax, 100
450
 
468
 
451
 .nxtcmp:
469
 .nxtcmp:
452
    cmp     [win.btn_index], eax
470
    cmp     [win.btn_index], eax
453
    je        .nxt2
471
    je        .nxt2
454
 
472
 
455
    push    dword[win.btn_index]
473
    push    dword[win.btn_index]
456
    pop     dword[win.prev_index]
474
    pop     dword[win.prev_index]
457
 
475
 
458
    mov     [win.btn_index], eax
476
    mov     [win.btn_index], eax
459
 
477
 
460
 ; ==== DRAW SELECTION ====
478
 ; ==== DRAW SELECTION ====
461
    call    DRAW_SELECTION
479
    call    DRAW_SELECTION
462
 
480
 
463
 .nxt2:
481
 .nxt2:
464
    mov     eax, [win.btn_index]
482
    mov     eax, [win.btn_index]
465
    imul    eax, BUTTON_SIZE
483
    imul    eax, BUTTON_SIZE
466
    cmp     byte[win.isvert], 1
484
    cmp     byte[win.isvert], 1
467
    je        .vert_name
485
    je        .vert_name
468
    add     eax, [win.x]
486
    add     eax, [win.x]
469
    mov     [nwin.x], eax
487
    mov     [nwin.x], eax
470
    mov     byte[nwin.swap_shape], 1
488
    mov     byte[nwin.swap_shape], 1
471
    mcall   SF_DRAW_RECT, <0, [win.w]>, <[win.h], 1>, [sc.work_dark]
489
    mcall   SF_DRAW_RECT, <0, [win.w]>, <[win.h], 1>, [sc.work_dark]
472
    jmp     .vert_end
490
    jmp     .vert_end
473
 .vert_name:
491
 .vert_name:
474
    add     eax, [win.y]
492
    add     eax, [win.y]
475
    add     eax, 14
493
    add     eax, 14
476
    mov     [nwin.y], eax
494
    mov     [nwin.y], eax
477
    mov     byte[nwin.swap_shape], 1
495
    mov     byte[nwin.swap_shape], 1
478
    mcall   SF_DRAW_RECT, <[win.w], 1>, <0, [win.h]>, [sc.work_dark]
496
    mcall   SF_DRAW_RECT, <[win.w], 1>, <0, [win.h]>, [sc.work_dark]
479
 .vert_end:
497
 .vert_end:
480
 
498
 
481
 ; ==== OPEN/CLOSE WINDOW ====
499
 ; ==== OPEN/CLOSE WINDOW ====
482
    cmp     byte[win.state], 1
500
    cmp     byte[win.state], 1
483
    je        main_loop
501
    je        main_loop
484
 
502
 
485
    mov     edx, esp
503
    mov     edx, esp
486
    add     edx, 512
504
    add     edx, 512
487
    mcall   SF_CREATE_THREAD, 1, n_main
505
    mcall   SF_CREATE_THREAD, 1, n_main
488
 
506
 
489
    mcall   SF_SYSTEM, SSF_GET_ACTIVE_WINDOW
507
    mcall   SF_SYSTEM, SSF_GET_ACTIVE_WINDOW
490
    mov     [win.psid], eax
508
    mov     [win.psid], eax
491
 
509
 
492
    mcall   SF_SYSTEM, SSF_FOCUS_WINDOW, [win.sid]
510
    mcall   SF_SYSTEM, SSF_FOCUS_WINDOW, [win.sid]
493
 
511
 
494
    mov     byte[win.state], 1
512
    mov     byte[win.state], 1
495
 
513
 
496
    m2m     dword [win.x], dword [win.x_opn]
514
    m2m     dword [win.x], dword [win.x_opn]
497
    m2m     dword [win.y], dword [win.y_opn]
515
    m2m     dword [win.y], dword [win.y_opn]
498
    m2m     dword [win.w], dword [win.w_opn]
516
    m2m     dword [win.w], dword [win.w_opn]
499
    m2m     dword [win.h], dword [win.h_opn]
517
    m2m     dword [win.h], dword [win.h_opn]
500
 
518
 
501
    cmp     byte[dock_items.ashow],1
519
    cmp     byte[dock_items.ashow],1
502
    je       .change_nothing
520
    je       .change_nothing
503
    mcall   SF_CHANGE_WINDOW, [win.x], [win.y], [win.w], [win.h]
521
    mcall   SF_CHANGE_WINDOW, [win.x], [win.y], [win.w], [win.h]
504
 
522
 
505
  .change_nothing:
523
  .change_nothing:
506
    call    DRAW_WINDOW
524
    call    DRAW_WINDOW
507
    call    DRAW_SELECTION
525
    call    DRAW_SELECTION
508
    jmp     main_loop
526
    jmp     main_loop
509
 
527
 
510
;-------------------------------------------------------------------------------
528
;-------------------------------------------------------------------------------
511
wnd_hide:
529
wnd_hide:
512
    cmp     byte[win.state], 0
530
    cmp     byte[win.state], 0
513
    je        main_loop
531
    je        main_loop
514
 
532
 
515
    mov     byte[nwin.close], 1
533
    mov     byte[nwin.close], 1
516
 
534
 
517
    mcall   SF_SYSTEM, SSF_FOCUS_WINDOW, [win.psid]
535
    mcall   SF_SYSTEM, SSF_FOCUS_WINDOW, [win.psid]
518
 
536
 
519
    mov     byte[win.state], 0
537
    mov     byte[win.state], 0
520
    mov     byte[win.btn_index], -1
538
    mov     byte[win.btn_index], -1
521
 
539
 
522
    cmp     byte[dock_items.ashow],1
540
    cmp     byte[dock_items.ashow],1
523
    je       .do_no_hide
541
    je       .do_no_hide
524
 
542
 
525
    m2m     dword [win.x], dword [win.x_hdn]
543
    m2m     dword [win.x], dword [win.x_hdn]
526
    m2m     dword [win.y], dword [win.y_hdn]
544
    m2m     dword [win.y], dword [win.y_hdn]
527
    m2m     dword [win.w], dword [win.w_hdn]
545
    m2m     dword [win.w], dword [win.w_hdn]
528
    m2m     dword [win.h], dword [win.h_hdn]
546
    m2m     dword [win.h], dword [win.h_hdn]
529
 
547
 
530
    mcall   SF_CHANGE_WINDOW, [win.x], [win.y], [win.w], [win.h]
548
    mcall   SF_CHANGE_WINDOW, [win.x], [win.y], [win.w], [win.h]
531
 
549
 
532
  .do_no_hide:
550
  .do_no_hide:
533
    call    DRAW_WINDOW
551
    call    DRAW_WINDOW
534
    jmp     main_loop
552
    jmp     main_loop
535
;-------------------------------------------------------------------------------
553
;-------------------------------------------------------------------------------
536
DRAW_SELECTION:
554
DRAW_SELECTION:
537
    mov     ebx, [win.prev_index]
555
    mov     ebx, [win.prev_index]
538
    imul    ebx, BUTTON_SIZE
556
    imul    ebx, BUTTON_SIZE
539
    add     ebx, 14
557
    add     ebx, 14
540
    shl     ebx, 16
558
    shl     ebx, 16
541
    add     ebx, 40
559
    add     ebx, 40
542
    mov     ecx, 0x00020028
560
    mov     ecx, 0x00020028
543
 
561
 
544
    cmp     byte[win.isvert], 1
562
    cmp     byte[win.isvert], 1
545
    jne     @f
563
    jne     @f
546
    xchg    ebx, ecx
564
    xchg    ebx, ecx
547
    sub     ecx, 0x000C0000
565
    sub     ecx, 0x000C0000
548
  @@:
566
  @@:
549
 
567
 
550
    mcall   SF_DRAW_RECT, , , [sc.work]
568
    mcall   SF_DRAW_RECT, , , [sc.work]
551
 
569
 
552
    mov     edx, ebx
570
    mov     edx, ebx
553
    shr     ecx, 16
571
    shr     ecx, 16
554
    mov     dx,  cx
572
    mov     dx,  cx
555
    add     edx, 0x00040004
573
    add     edx, 0x00040004
556
 
574
 
557
    mov     ebx, [win.prev_index]
575
    mov     ebx, [win.prev_index]
558
    imul    ebx, 4
576
    imul    ebx, 4
559
    add     ebx, dock_items.icon
577
    add     ebx, dock_items.icon
560
    mov     ebx, [ebx]
578
    mov     ebx, [ebx]
561
    imul    ebx, 32*32*4
579
    imul    ebx, 32*32*4
562
    add     ebx, [icons_inactive]
580
    add     ebx, [icons_inactive]
563
    mcall   SF_PUT_IMAGE_EXT, , <32, 32>, , 32, 0, 0
581
    mcall   SF_PUT_IMAGE_EXT, , <32, 32>, , 32, 0, 0
564
 
582
 
565
    mov     ebx, [win.btn_index]
583
    mov     ebx, [win.btn_index]
566
    imul    ebx, BUTTON_SIZE
584
    imul    ebx, BUTTON_SIZE
567
    add     ebx, 14
585
    add     ebx, 14
568
    shl     ebx, 16
586
    shl     ebx, 16
569
    add     ebx, 40
587
    add     ebx, 40
570
    mov     ecx, 0x00020028
588
    mov     ecx, 0x00020028
571
 
589
 
572
    cmp     byte[win.isvert], 1
590
    cmp     byte[win.isvert], 1
573
    jne     @f
591
    jne     @f
574
    xchg    ebx, ecx
592
    xchg    ebx, ecx
575
    sub     ecx, 0x000C0000
593
    sub     ecx, 0x000C0000
576
  @@:
594
  @@:
577
 
595
 
578
    mcall   SF_DRAW_RECT, , , [sc.work_button]
596
    mcall   SF_DRAW_RECT, , , [sc.work_button]
579
 
597
 
580
    mov     edx, ebx
598
    mov     edx, ebx
581
    shr     ecx, 16
599
    shr     ecx, 16
582
    mov     dx, cx
600
    mov     dx, cx
583
    add     edx, 0x00040004
601
    add     edx, 0x00040004
584
 
602
 
585
    mov     ebx, [win.btn_index]
603
    mov     ebx, [win.btn_index]
586
    imul    ebx, 4
604
    imul    ebx, 4
587
    add     ebx, dock_items.icon
605
    add     ebx, dock_items.icon
588
    mov     ebx, [ebx]
606
    mov     ebx, [ebx]
589
    imul    ebx, 32*32*4
607
    imul    ebx, 32*32*4
590
    add     ebx, [icons_active]
608
    add     ebx, [icons_active]
591
    mcall   SF_PUT_IMAGE_EXT, , <32, 32>, , 32, 0, 0
609
    mcall   SF_PUT_IMAGE_EXT, , <32, 32>, , 32, 0, 0
592
    
610
    
593
    ret
611
    ret
594
;-------------------------------------------------------------------------------
612
;-------------------------------------------------------------------------------
595
proc icon32cpy uses ecx edx edi esi, dest:dword, src:dword, len:dword, bgcol:dword
613
proc icon32cpy uses ecx edx edi esi, dest:dword, src:dword, len:dword, bgcol:dword
596
    mov     edi, [dest] 
614
    mov     edi, [dest] 
597
    mov     esi, [src] 
615
    mov     esi, [src] 
598
    mov     ecx, [len]
616
    mov     ecx, [len]
599
    mov     edx, [bgcol]
617
    mov     edx, [bgcol]
600
.loop: 
618
.loop: 
601
    m2m     dword [edi], dword [esi]
619
    m2m     dword [edi], dword [esi]
602
    cmp     dword [edi], 0
620
    cmp     dword [edi], 0
603
    jne     @f
621
    jne     @f
604
    mov     dword [edi], edx 
622
    mov     dword [edi], edx 
605
   @@:
623
   @@:
606
    add     edi, 4
624
    add     edi, 4
607
    add     esi, 4
625
    add     esi, 4
608
    sub     ecx, 4
626
    sub     ecx, 4
609
    cmp     ecx, 4
627
    cmp     ecx, 4
610
    jg      .loop
628
    jg      .loop
611
 
629
 
612
    ret 
630
    ret 
613
endp
631
endp
614
;-------------------------------------------------------------------------------
632
;-------------------------------------------------------------------------------
615
LOAD_ICONS:
633
LOAD_ICONS:
616
    mov     esi, 0 ; esi is a counter of mem_open attempts
634
    mov     esi, 0 ; esi is a counter of mem_open attempts
617
  @@:
635
  @@:
618
    ; try to open shr memory, if failed then make 5 attempts more
636
    ; try to open shr memory, if failed then make 5 attempts more
619
    mcall   SF_SYS_MISC, SSF_MEM_OPEN,icons_resname ; 0 = SHM_READ
637
    mcall   SF_SYS_MISC, SSF_MEM_OPEN,icons_resname ; 0 = SHM_READ
-
 
638
    cmp     edx, 5
-
 
639
    jz      error_exit
-
 
640
 
620
    cmp     eax,0
641
    cmp     eax,0
621
    jne     @f
642
    jne     @f
622
    inc     esi
643
    inc     esi
623
    cmp     esi,10
644
    cmp     esi,10
624
    je      exit
645
    je      exit
625
    mcall   SF_SLEEP, 70
646
    mcall   SF_SLEEP, 70
626
    jmp     @b
647
    jmp     @b
627
  @@:
648
  @@:
628
    mov     [shr_icons_ptr], eax
649
    mov     [shr_icons_ptr], eax
629
    mov     [shr_icons_len], edx
650
    mov     [shr_icons_len], edx
630
    
651
    
631
    mcall   SF_SYS_MISC, SSF_MEM_FREE,  [icons_active]
652
    mcall   SF_SYS_MISC, SSF_MEM_FREE,  [icons_active]
632
    mcall   SF_SYS_MISC, SSF_MEM_ALLOC, [shr_icons_len]
653
    mcall   SF_SYS_MISC, SSF_MEM_ALLOC, [shr_icons_len]
633
    mov     [icons_active], eax
654
    mov     [icons_active], eax
634
    
655
    
635
    mcall   SF_SYS_MISC, SSF_MEM_FREE,  [icons_inactive]
656
    mcall   SF_SYS_MISC, SSF_MEM_FREE,  [icons_inactive]
636
    mcall   SF_SYS_MISC, SSF_MEM_ALLOC, [shr_icons_len]
657
    mcall   SF_SYS_MISC, SSF_MEM_ALLOC, [shr_icons_len]
637
    mov     [icons_inactive], eax  
658
    mov     [icons_inactive], eax  
638
    
659
    
639
    stdcall icon32cpy, [icons_inactive], [shr_icons_ptr], [shr_icons_len], [sc.work]
660
    stdcall icon32cpy, [icons_inactive], [shr_icons_ptr], [shr_icons_len], [sc.work]
640
    stdcall icon32cpy, [icons_active],   [shr_icons_ptr], [shr_icons_len], [sc.work_button]
661
    stdcall icon32cpy, [icons_active],   [shr_icons_ptr], [shr_icons_len], [sc.work_button]
641
    
662
    
642
    mcall   SF_SYS_MISC, SSF_MEM_CLOSE,icons_resname
663
    mcall   SF_SYS_MISC, SSF_MEM_CLOSE,icons_resname
643
    
664
    
644
    ret
665
    ret
645
;-------------------------------------------------------------------------------
666
;-------------------------------------------------------------------------------
646
proc sections_callback, _file_name, _section_name
667
proc sections_callback, _file_name, _section_name
647
    mov     eax, [_section_name]
668
    mov     eax, [_section_name]
648
    cmp     byte[eax], '@'
669
    cmp     byte[eax], '@'
649
    jne     @f
670
    jne     @f
650
 
671
 
651
    dec     dword[dock_items.count]
672
    dec     dword[dock_items.count]
652
    jmp     .endproc
673
    jmp     .endproc
653
 
674
 
654
  @@:
675
  @@:
655
    ; ==== GET NAME ====
676
    ; ==== GET NAME ====
656
    mov     ebx, [dock_items.count]
677
    mov     ebx, [dock_items.count]
657
    imul    ebx, 16
678
    imul    ebx, 16
658
    add     ebx, dock_items.name
679
    add     ebx, dock_items.name
659
 
680
 
660
    mov     eax, [_section_name]
681
    mov     eax, [_section_name]
661
 
682
 
662
    mov     edi, 0
683
    mov     edi, 0
663
  @@:
684
  @@:
664
    mov     cl, byte[eax]
685
    mov     cl, byte[eax]
665
    mov     byte[ebx + edi], cl
686
    mov     byte[ebx + edi], cl
666
 
687
 
667
    inc     eax
688
    inc     eax
668
    inc     edi
689
    inc     edi
669
    cmp     edi, 10
690
    cmp     edi, 10
670
    jne     @b
691
    jne     @b
671
 
692
 
672
  ; ==== GET PATH ====
693
  ; ==== GET PATH ====
673
    mov     ebx, [dock_items.count]
694
    mov     ebx, [dock_items.count]
674
    imul    ebx, 256
695
    imul    ebx, 256
675
    add     ebx, dock_items.path
696
    add     ebx, dock_items.path
676
 
697
 
677
    invoke  ini.get_str, [_file_name], [_section_name], ini_data.path_name, ebx, 256, 0
698
    invoke  ini.get_str, [_file_name], [_section_name], ini_data.path_name, ebx, 256, 0
678
 
699
 
679
  ; === GET  PARAM ===
700
  ; === GET  PARAM ===
680
    mov     ebx, [dock_items.count]
701
    mov     ebx, [dock_items.count]
681
    imul    ebx, 256
702
    imul    ebx, 256
682
    add     ebx, dock_items.param
703
    add     ebx, dock_items.param
683
 
704
 
684
    invoke  ini.get_str, [_file_name], [_section_name], ini_data.param_name, ebx, 256, 0
705
    invoke  ini.get_str, [_file_name], [_section_name], ini_data.param_name, ebx, 256, 0
685
 
706
 
686
  ; ==== GET ICON ====
707
  ; ==== GET ICON ====
687
    invoke  ini.get_int, [_file_name], [_section_name], ini_data.icon_name, 0
708
    invoke  ini.get_int, [_file_name], [_section_name], ini_data.icon_name, 0
688
 
709
 
689
    mov     ebx, [dock_items.count]
710
    mov     ebx, [dock_items.count]
690
    imul    ebx, 4
711
    imul    ebx, 4
691
    mov     [dock_items.icon + ebx], eax
712
    mov     [dock_items.icon + ebx], eax
692
 
713
 
693
  ; ==== GET SEPARATOR ====
714
  ; ==== GET SEPARATOR ====
694
    invoke  ini.get_int, [_file_name], [_section_name], ini_data.separator_name, 0
715
    invoke  ini.get_int, [_file_name], [_section_name], ini_data.separator_name, 0
695
 
716
 
696
    mov     ebx, [dock_items.count]
717
    mov     ebx, [dock_items.count]
697
    mov     byte[dock_items.separator + ebx], al
718
    mov     byte[dock_items.separator + ebx], al
698
 
719
 
699
  ; ====== END =======
720
  ; ====== END =======
700
 .endproc:
721
 .endproc:
701
    mov     eax, 1
722
    mov     eax, 1
702
    inc     dword[dock_items.count]
723
    inc     dword[dock_items.count]
703
    ret
724
    ret
704
endp
725
endp
705
;-------------------------------------------------------------------------------
726
;-------------------------------------------------------------------------------
706
    include "MEMORY.INC"
727
    include "MEMORY.INC"