Subversion Repositories Kolibri OS

Rev

Rev 9876 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 9876 Rev 9877
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:
250
error_exit:
251
    push    .notify
251
    push    .notify
252
    dec     esp
252
    dec     esp
253
    push    0
253
    push    0
254
    push    0
254
    push    0
255
    push    .error_message
255
    push    .error_message
256
    push    0
256
    push    0
257
    push    SSF_START_APP
257
    push    SSF_START_APP
258
 
258
 
259
    mcall   SF_FILE, esp
259
    mcall   SF_FILE, esp
260
    add     esp, 6*4 + 1
260
    add     esp, 6*4 + 1
261
    mcall   SF_SYSTEM, SSF_TERMINATE_THREAD, [nwin.sid]
261
    mcall   SF_SYSTEM, SSF_TERMINATE_THREAD, [nwin.sid]
262
    mcall   SF_TERMINATE_PROCESS
262
    mcall   SF_TERMINATE_PROCESS
263
.error_message:
263
.error_message:
264
    db  '"@DOCKY\nError load @RESHARE" -tdE',0
264
    db  '"@DOCKY\nError load @RESHARE" -tdE',0
265
.notify:
265
.notify:
266
    db  '/sys/@notify',0
266
    db  '/sys/@notify',0
267
;-------------------------------------------------------------------------------
267
;-------------------------------------------------------------------------------
268
align 4
268
align 4
269
main_loop:
269
main_loop:
270
    mcall   SF_WAIT_EVENT
270
    mcall   SF_WAIT_EVENT
271
 
271
 
272
    cmp     eax, EV_REDRAW
272
    cmp     eax, EV_REDRAW
273
    je      event_redraw
273
    je      event_redraw
274
 
274
 
275
    cmp     eax, EV_BUTTON
275
    cmp     eax, EV_BUTTON
276
    je      event_button
276
    je      event_button
277
 
277
 
278
    cmp     eax, EV_MOUSE
278
    cmp     eax, EV_MOUSE
279
    je      event_mouse
279
    je      event_mouse
280
 
280
 
281
    jmp     main_loop
281
    jmp     main_loop
282
;-------------------------------------------------------------------------------
282
;-------------------------------------------------------------------------------
283
event_redraw:
283
event_redraw:
284
    call    DRAW_WINDOW
284
    call    DRAW_WINDOW
285
    jmp     main_loop
285
    jmp     main_loop
286
;-------------------------------------------------------------------------------
286
;-------------------------------------------------------------------------------
287
DRAW_WINDOW:
287
DRAW_WINDOW:
288
    mcall   SF_REDRAW, SSF_BEGIN_DRAW
288
    mcall   SF_REDRAW, SSF_BEGIN_DRAW
289
    
289
    
290
    push    dword [sc.work]
290
    push    dword [sc.work]
291
    mcall   SF_STYLE_SETTINGS, SSF_GET_COLORS, sc, sizeof.system_colors
291
    mcall   SF_STYLE_SETTINGS, SSF_GET_COLORS, sc, sizeof.system_colors
292
    pop     eax
292
    pop     eax
293
    cmp     dword [sc.work], eax
293
    cmp     dword [sc.work], eax
294
    je      @f
294
    je      @f
295
    call    LOAD_ICONS
295
    call    LOAD_ICONS
296
  @@:
296
  @@:
297
    mov     esi, [sc.work]
297
    mov     esi, [sc.work]
298
    or        esi, 0x01000000
298
    or        esi, 0x01000000
299
    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]
300
 
300
 
301
    xor     edi, edi
301
    xor     edi, edi
302
  @@:
302
  @@:
303
    cmp     edi, [dock_items.count]
303
    cmp     edi, [dock_items.count]
304
    je        @f
304
    je        @f
305
 
305
 
306
    push    edi
306
    push    edi
307
    mov     eax, SF_DEFINE_BUTTON
307
    mov     eax, SF_DEFINE_BUTTON
308
    mov     edx, 0x60000002
308
    mov     edx, 0x60000002
309
    mov     esi, [sc.work]
309
    mov     esi, [sc.work]
310
    imul    edi, BUTTON_SIZE
310
    imul    edi, BUTTON_SIZE
311
    add     edi, 12
311
    add     edi, 12
312
    shl     edi, 16
312
    shl     edi, 16
313
    add     edi, BUTTON_SIZE
313
    add     edi, BUTTON_SIZE
314
    cmp     byte[win.isvert], 1
314
    cmp     byte[win.isvert], 1
315
    je        .vert_btn
315
    je        .vert_btn
316
    mcall   , edi, <0, BUTTON_SIZE>
316
    mcall   , edi, <0, BUTTON_SIZE>
317
    jmp     .endbtn
317
    jmp     .endbtn
318
 .vert_btn:
318
 .vert_btn:
319
    sub     edi, 12 shl 16
319
    sub     edi, 12 shl 16
320
    mcall   , <0, BUTTON_SIZE>, edi
320
    mcall   , <0, BUTTON_SIZE>, edi
321
 .endbtn:
321
 .endbtn:
322
    pop     edi
322
    pop     edi
323
 
323
 
324
    cmp     byte[dock_items.separator + edi], 1
324
    cmp     byte[dock_items.separator + edi], 1
325
    jne     .end_separator
325
    jne     .end_separator
326
 
326
 
327
 .draw_separator:
327
 .draw_separator:
328
    push    ebx
328
    push    ebx
329
    push    ecx
329
    push    ecx
330
 
330
 
331
    mov     eax, SF_DRAW_RECT
331
    mov     eax, SF_DRAW_RECT
332
    mov     ebx, edi
332
    mov     ebx, edi
333
    imul    ebx, BUTTON_SIZE
333
    imul    ebx, BUTTON_SIZE
334
    add     ebx, BUTTON_SIZE
334
    add     ebx, BUTTON_SIZE
335
    add     ebx, 12-1
335
    add     ebx, 12-1
336
    shl     ebx, 16
336
    shl     ebx, 16
337
    add     ebx, 2
337
    add     ebx, 2
338
 
338
 
339
    cmp     byte[win.isvert], 1
339
    cmp     byte[win.isvert], 1
340
    je      .vert_draw_sep
340
    je      .vert_draw_sep
341
    mcall   , , <4,  36>, [sc.work_dark]
341
    mcall   , , <4,  36>, [sc.work_dark]
342
    jmp     .end_inner_sep
342
    jmp     .end_inner_sep
343
 .vert_draw_sep:
343
 .vert_draw_sep:
344
    sub     ebx, 12 shl 16
344
    sub     ebx, 12 shl 16
345
    mov     ecx, ebx
345
    mov     ecx, ebx
346
    mcall   , <4, 36>, , [sc.work_dark]
346
    mcall   , <4, 36>, , [sc.work_dark]
347
 .end_inner_sep:
347
 .end_inner_sep:
348
    pop     ecx
348
    pop     ecx
349
    pop     ebx
349
    pop     ebx
350
 .end_separator:
350
 .end_separator:
351
 
351
 
352
    cmp     byte[win.isvert], 1
352
    cmp     byte[win.isvert], 1
353
    je        .vert_dig
353
    je        .vert_dig
354
    mov     edx, ebx
354
    mov     edx, ebx
355
    and     edx, 0xFFFF0000
355
    and     edx, 0xFFFF0000
356
    add     edx, 0x00060006
356
    add     edx, 0x00060006
357
    jmp     .digend
357
    jmp     .digend
358
 .vert_dig:
358
 .vert_dig:
359
    mov     edx, ecx
359
    mov     edx, ecx
360
    and     edx, 0xFFFF0000
360
    and     edx, 0xFFFF0000
361
    shr     edx, 16
361
    shr     edx, 16
362
    add     edx, 0x00060006
362
    add     edx, 0x00060006
363
 .digend:
363
 .digend:
364
 
364
 
365
    imul    ebx, edi, 4
365
    imul    ebx, edi, 4
366
    add     ebx, dock_items.icon
366
    add     ebx, dock_items.icon
367
    mov     ebx, [ebx]
367
    mov     ebx, [ebx]
368
 
368
 
369
    push    edi
369
    push    edi
370
    imul    ebx, 32*32*4
370
    imul    ebx, 32*32*4
371
    add     ebx, [icons_inactive]
371
    add     ebx, [icons_inactive]
372
    mcall   SF_PUT_IMAGE_EXT, , <32, 32>, , 32, 0, 0
372
    mcall   SF_PUT_IMAGE_EXT, , <32, 32>, , 32, 0, 0
373
    pop     edi 
373
    pop     edi 
374
 
374
 
375
    inc     edi
375
    inc     edi
376
    jmp     @b
376
    jmp     @b
377
  @@:
377
  @@:
378
 
378
 
379
    mcall   SF_REDRAW, SSF_END_DRAW
379
    mcall   SF_REDRAW, SSF_END_DRAW
380
 
380
 
381
    ret
381
    ret
382
;-------------------------------------------------------------------------------
382
;-------------------------------------------------------------------------------
383
event_button:
383
event_button:
384
    mcall   SF_GET_BUTTON
384
    mcall   SF_GET_BUTTON
385
 
385
 
386
    ;; it must not be possible to close dock
386
    ;; it must not be possible to close dock
387
    ;cmp     ah, 1
387
    ;cmp     ah, 1
388
    ;je        .button_close
388
    ;je        .button_close
389
 
389
 
390
    cmp     ah, 2
390
    cmp     ah, 2
391
    je      .button_dock
391
    je      .button_dock
392
 
392
 
393
    jmp     @f
393
    jmp     @f
394
 
394
 
395
 ;.button_close:
395
 ;.button_close:
396
 ;   jmp     exit
396
 ;   jmp     exit
397
 
397
 
398
 .button_dock:
398
 .button_dock:
399
    mov     edi, [win.btn_index]
399
    mov     edi, [win.btn_index]
400
    imul    edi, 256
400
    imul    edi, 256
401
 
401
 
402
    mov     dword[fi.p00], SSF_START_APP
402
    mov     dword[fi.p00], SSF_START_APP
403
 
403
 
404
    mov     esi, edi
404
    mov     esi, edi
405
    add     esi, dock_items.path
405
    add     esi, dock_items.path
406
    mov     dword[fi.p21], esi
406
    mov     dword[fi.p21], esi
407
 
407
 
408
    mov     esi, edi
408
    mov     esi, edi
409
    add     esi, dock_items.param
409
    add     esi, dock_items.param
410
    mov     dword[fi.p08], esi
410
    mov     dword[fi.p08], esi
411
 
411
 
412
    mcall   SF_FILE, fi
412
    mcall   SF_FILE, fi
413
 
413
 
414
    mov     ecx, eax
414
    mov     ecx, eax
415
    mcall   SF_SYSTEM, SSF_GET_THREAD_SLOT
415
    mcall   SF_SYSTEM, SSF_GET_THREAD_SLOT
416
    and     eax, 0xFFFF
416
    and     eax, 0xFFFF
417
    mov     [win.psid], eax
417
    mov     [win.psid], eax
418
 
418
 
419
    jmp     wnd_hide
419
    jmp     wnd_hide
420
 
420
 
421
  @@:
421
  @@:
422
    jmp     main_loop
422
    jmp     main_loop
423
;-------------------------------------------------------------------------------
423
;-------------------------------------------------------------------------------
424
event_mouse:
424
event_mouse:
425
  ; ==== IS MOUSE INNER ====
425
  ; ==== IS MOUSE INNER ====
426
    mcall   SF_MOUSE_GET, SSF_WINDOW_POSITION
426
    mcall   SF_MOUSE_GET, SSF_WINDOW_POSITION
427
    mov     edi, eax
427
    mov     edi, eax
428
    mov     esi, eax
428
    mov     esi, eax
429
    shr     edi, 16
429
    shr     edi, 16
430
    and     esi, 0xFFFF
430
    and     esi, 0xFFFF
431
 
431
 
432
    cmp     edi, 0
432
    cmp     edi, 0
433
    jl        wnd_hide
433
    jl        wnd_hide
434
    dec     edi
434
    dec     edi
435
    cmp     edi, [win.w]
435
    cmp     edi, [win.w]
436
    jg        wnd_hide
436
    jg        wnd_hide
437
    cmp     esi, 0
437
    cmp     esi, 0
438
    jl        wnd_hide
438
    jl        wnd_hide
439
    dec     esi
439
    dec     esi
440
    cmp     esi, [win.h]
440
    cmp     esi, [win.h]
441
    jg        wnd_hide
441
    jg        wnd_hide
442
 
442
 
443
  ; ==== COUNT INDEX ====
443
  ; ==== COUNT INDEX ====
444
 
444
 
445
    mov     eax, [dock_items.location]
445
    mov     eax, [dock_items.location]
446
    and     eax, 1b
446
    and     eax, 1b
447
    cmp     eax, 1
447
    cmp     eax, 1
448
    jne     .vert
448
    jne     .vert
449
    mov     eax, edi
449
    mov     eax, edi
450
    jmp     .nxt
450
    jmp     .nxt
451
 
451
 
452
 .vert:
452
 .vert:
453
    mov     eax, esi
453
    mov     eax, esi
454
    add     eax, 12
454
    add     eax, 12
455
 
455
 
456
 .nxt:
456
 .nxt:
457
    sub     eax, 12
457
    sub     eax, 12
458
    mov     edx, 0
458
    mov     edx, 0
459
    mov     ebx, BUTTON_SIZE
459
    mov     ebx, BUTTON_SIZE
460
    div     ebx
460
    div     ebx
461
 
461
 
462
    cmp     eax, [dock_items.count]
462
    cmp     eax, [dock_items.count]
463
    jge     .set0
463
    jge     .set0
464
    jmp     .nxtcmp
464
    jmp     .nxtcmp
465
 
465
 
466
 .set0:
466
 .set0:
467
    mov     eax, 100
467
    mov     eax, 100
468
 
468
 
469
 .nxtcmp:
469
 .nxtcmp:
470
    cmp     [win.btn_index], eax
470
    cmp     [win.btn_index], eax
471
    je        .nxt2
471
    je        .nxt2
472
 
472
 
473
    push    dword[win.btn_index]
473
    push    dword[win.btn_index]
474
    pop     dword[win.prev_index]
474
    pop     dword[win.prev_index]
475
 
475
 
476
    mov     [win.btn_index], eax
476
    mov     [win.btn_index], eax
477
 
477
 
478
 ; ==== DRAW SELECTION ====
478
 ; ==== DRAW SELECTION ====
479
    call    DRAW_SELECTION
479
    call    DRAW_SELECTION
480
 
480
 
481
 .nxt2:
481
 .nxt2:
482
    mov     eax, [win.btn_index]
482
    mov     eax, [win.btn_index]
483
    imul    eax, BUTTON_SIZE
483
    imul    eax, BUTTON_SIZE
484
    cmp     byte[win.isvert], 1
484
    cmp     byte[win.isvert], 1
485
    je        .vert_name
485
    je        .vert_name
486
    add     eax, [win.x]
486
    add     eax, [win.x]
487
    mov     [nwin.x], eax
487
    mov     [nwin.x], eax
488
    mov     byte[nwin.swap_shape], 1
488
    mov     byte[nwin.swap_shape], 1
489
    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]
490
    jmp     .vert_end
490
    jmp     .vert_end
491
 .vert_name:
491
 .vert_name:
492
    add     eax, [win.y]
492
    add     eax, [win.y]
493
    add     eax, 14
493
    add     eax, 14
494
    mov     [nwin.y], eax
494
    mov     [nwin.y], eax
495
    mov     byte[nwin.swap_shape], 1
495
    mov     byte[nwin.swap_shape], 1
496
    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]
497
 .vert_end:
497
 .vert_end:
498
 
498
 
499
 ; ==== OPEN/CLOSE WINDOW ====
499
 ; ==== OPEN/CLOSE WINDOW ====
500
    cmp     byte[win.state], 1
500
    cmp     byte[win.state], 1
501
    je        main_loop
501
    je        main_loop
502
 
502
 
503
    mov     edx, esp
503
    mov     edx, esp
504
    add     edx, 512
504
    add     edx, 512
505
    mcall   SF_CREATE_THREAD, 1, n_main
505
    mcall   SF_CREATE_THREAD, 1, n_main
506
 
506
 
507
    mcall   SF_SYSTEM, SSF_GET_ACTIVE_WINDOW
507
    mcall   SF_SYSTEM, SSF_GET_ACTIVE_WINDOW
508
    mov     [win.psid], eax
508
    mov     [win.psid], eax
509
 
509
 
510
    mcall   SF_SYSTEM, SSF_FOCUS_WINDOW, [win.sid]
510
    mcall   SF_SYSTEM, SSF_FOCUS_WINDOW, [win.sid]
511
 
511
 
512
    mov     byte[win.state], 1
512
    mov     byte[win.state], 1
513
 
513
 
514
    m2m     dword [win.x], dword [win.x_opn]
514
    m2m     dword [win.x], dword [win.x_opn]
515
    m2m     dword [win.y], dword [win.y_opn]
515
    m2m     dword [win.y], dword [win.y_opn]
516
    m2m     dword [win.w], dword [win.w_opn]
516
    m2m     dword [win.w], dword [win.w_opn]
517
    m2m     dword [win.h], dword [win.h_opn]
517
    m2m     dword [win.h], dword [win.h_opn]
518
 
518
 
519
    cmp     byte[dock_items.ashow],1
519
    cmp     byte[dock_items.ashow],1
520
    je       .change_nothing
520
    je       .change_nothing
521
    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]
522
 
522
 
523
  .change_nothing:
523
  .change_nothing:
524
    call    DRAW_WINDOW
524
    call    DRAW_WINDOW
525
    call    DRAW_SELECTION
525
    call    DRAW_SELECTION
526
    jmp     main_loop
526
    jmp     main_loop
527
 
527
 
528
;-------------------------------------------------------------------------------
528
;-------------------------------------------------------------------------------
529
wnd_hide:
529
wnd_hide:
530
    cmp     byte[win.state], 0
530
    cmp     byte[win.state], 0
531
    je        main_loop
531
    je        main_loop
532
 
532
 
533
    mov     byte[nwin.close], 1
533
    mov     byte[nwin.close], 1
534
 
534
 
535
    mcall   SF_SYSTEM, SSF_FOCUS_WINDOW, [win.psid]
535
    mcall   SF_SYSTEM, SSF_FOCUS_WINDOW, [win.psid]
536
 
536
 
537
    mov     byte[win.state], 0
537
    mov     byte[win.state], 0
538
    mov     byte[win.btn_index], -1
538
    mov     byte[win.btn_index], -1
539
 
539
 
540
    cmp     byte[dock_items.ashow],1
540
    cmp     byte[dock_items.ashow],1
541
    je       .do_no_hide
541
    je       .do_no_hide
542
 
542
 
543
    m2m     dword [win.x], dword [win.x_hdn]
543
    m2m     dword [win.x], dword [win.x_hdn]
544
    m2m     dword [win.y], dword [win.y_hdn]
544
    m2m     dword [win.y], dword [win.y_hdn]
545
    m2m     dword [win.w], dword [win.w_hdn]
545
    m2m     dword [win.w], dword [win.w_hdn]
546
    m2m     dword [win.h], dword [win.h_hdn]
546
    m2m     dword [win.h], dword [win.h_hdn]
547
 
547
 
548
    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]
549
 
549
 
550
  .do_no_hide:
550
  .do_no_hide:
551
    call    DRAW_WINDOW
551
    call    DRAW_WINDOW
552
    jmp     main_loop
552
    jmp     main_loop
553
;-------------------------------------------------------------------------------
553
;-------------------------------------------------------------------------------
554
DRAW_SELECTION:
554
DRAW_SELECTION:
555
    mov     ebx, [win.prev_index]
555
    mov     ebx, [win.prev_index]
556
    imul    ebx, BUTTON_SIZE
556
    imul    ebx, BUTTON_SIZE
557
    add     ebx, 14
557
    add     ebx, 14
558
    shl     ebx, 16
558
    shl     ebx, 16
559
    add     ebx, 40
559
    add     ebx, 40
560
    mov     ecx, 0x00020028
560
    mov     ecx, 0x00020028
561
 
561
 
562
    cmp     byte[win.isvert], 1
562
    cmp     byte[win.isvert], 1
563
    jne     @f
563
    jne     @f
564
    xchg    ebx, ecx
564
    xchg    ebx, ecx
565
    sub     ecx, 0x000C0000
565
    sub     ecx, 0x000C0000
566
  @@:
566
  @@:
567
 
567
 
568
    mcall   SF_DRAW_RECT, , , [sc.work]
568
    mcall   SF_DRAW_RECT, , , [sc.work]
569
 
569
 
570
    mov     edx, ebx
570
    mov     edx, ebx
571
    shr     ecx, 16
571
    shr     ecx, 16
572
    mov     dx,  cx
572
    mov     dx,  cx
573
    add     edx, 0x00040004
573
    add     edx, 0x00040004
574
 
574
 
575
    mov     ebx, [win.prev_index]
575
    mov     ebx, [win.prev_index]
576
    imul    ebx, 4
576
    imul    ebx, 4
577
    add     ebx, dock_items.icon
577
    add     ebx, dock_items.icon
578
    mov     ebx, [ebx]
578
    mov     ebx, [ebx]
579
    imul    ebx, 32*32*4
579
    imul    ebx, 32*32*4
580
    add     ebx, [icons_inactive]
580
    add     ebx, [icons_inactive]
581
    mcall   SF_PUT_IMAGE_EXT, , <32, 32>, , 32, 0, 0
581
    mcall   SF_PUT_IMAGE_EXT, , <32, 32>, , 32, 0, 0
582
 
582
 
583
    mov     ebx, [win.btn_index]
583
    mov     ebx, [win.btn_index]
584
    imul    ebx, BUTTON_SIZE
584
    imul    ebx, BUTTON_SIZE
585
    add     ebx, 14
585
    add     ebx, 14
586
    shl     ebx, 16
586
    shl     ebx, 16
587
    add     ebx, 40
587
    add     ebx, 40
588
    mov     ecx, 0x00020028
588
    mov     ecx, 0x00020028
589
 
589
 
590
    cmp     byte[win.isvert], 1
590
    cmp     byte[win.isvert], 1
591
    jne     @f
591
    jne     @f
592
    xchg    ebx, ecx
592
    xchg    ebx, ecx
593
    sub     ecx, 0x000C0000
593
    sub     ecx, 0x000C0000
594
  @@:
594
  @@:
595
 
595
 
596
    mcall   SF_DRAW_RECT, , , [sc.work_button]
596
    mcall   SF_DRAW_RECT, , , [sc.work_button]
597
 
597
 
598
    mov     edx, ebx
598
    mov     edx, ebx
599
    shr     ecx, 16
599
    shr     ecx, 16
600
    mov     dx, cx
600
    mov     dx, cx
601
    add     edx, 0x00040004
601
    add     edx, 0x00040004
602
 
602
 
603
    mov     ebx, [win.btn_index]
603
    mov     ebx, [win.btn_index]
604
    imul    ebx, 4
604
    imul    ebx, 4
605
    add     ebx, dock_items.icon
605
    add     ebx, dock_items.icon
606
    mov     ebx, [ebx]
606
    mov     ebx, [ebx]
607
    imul    ebx, 32*32*4
607
    imul    ebx, 32*32*4
608
    add     ebx, [icons_active]
608
    add     ebx, [icons_active]
609
    mcall   SF_PUT_IMAGE_EXT, , <32, 32>, , 32, 0, 0
609
    mcall   SF_PUT_IMAGE_EXT, , <32, 32>, , 32, 0, 0
610
    
610
    
611
    ret
611
    ret
612
;-------------------------------------------------------------------------------
612
;-------------------------------------------------------------------------------
613
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
614
    mov     edi, [dest] 
614
    mov     edi, [dest] 
615
    mov     esi, [src] 
615
    mov     esi, [src] 
616
    mov     ecx, [len]
616
    mov     ecx, [len]
617
    mov     edx, [bgcol]
617
    mov     edx, [bgcol]
618
.loop: 
618
.loop: 
619
    m2m     dword [edi], dword [esi]
619
    m2m     dword [edi], dword [esi]
620
    cmp     dword [edi], 0
620
    cmp     dword [edi], 0
621
    jne     @f
621
    jne     @f
622
    mov     dword [edi], edx 
622
    mov     dword [edi], edx 
623
   @@:
623
   @@:
624
    add     edi, 4
624
    add     edi, 4
625
    add     esi, 4
625
    add     esi, 4
626
    sub     ecx, 4
626
    sub     ecx, 4
627
    cmp     ecx, 4
627
    cmp     ecx, 4
628
    jg      .loop
628
    jg      .loop
629
 
629
 
630
    ret 
630
    ret 
631
endp
631
endp
632
;-------------------------------------------------------------------------------
632
;-------------------------------------------------------------------------------
633
LOAD_ICONS:
633
LOAD_ICONS:
634
    mov     esi, 0 ; esi is a counter of mem_open attempts
634
    mov     esi, 0 ; esi is a counter of mem_open attempts
-
 
635
    mov     edi, esi
635
  @@:
636
  @@:
636
    ; try to open shr memory, if failed then make 5 attempts more
637
    ; try to open shr memory, if failed then make 5 attempts more
637
    mcall   SF_SYS_MISC, SSF_MEM_OPEN,icons_resname ; 0 = SHM_READ
638
    mcall   SF_SYS_MISC, SSF_MEM_OPEN,icons_resname ; 0 = SHM_READ
638
    cmp     edx, 5
-
 
639
    jz      error_exit
-
 
640
 
639
 
641
    cmp     eax,0
640
    cmp     eax,0
642
    jne     @f
641
    jne     @f
643
    inc     esi
642
    inc     edi
644
    cmp     esi,10
643
    cmp     edi,10
645
    je      exit
644
    je      error_exit
646
    mcall   SF_SLEEP, 70
645
    mcall   SF_SLEEP, 70
647
    jmp     @b
646
    jmp     @b
648
  @@:
647
  @@:
649
    mov     [shr_icons_ptr], eax
648
    mov     [shr_icons_ptr], eax
650
    mov     [shr_icons_len], edx
649
    mov     [shr_icons_len], edx
651
    
650
    
652
    mcall   SF_SYS_MISC, SSF_MEM_FREE,  [icons_active]
651
    mcall   SF_SYS_MISC, SSF_MEM_FREE,  [icons_active]
653
    mcall   SF_SYS_MISC, SSF_MEM_ALLOC, [shr_icons_len]
652
    mcall   SF_SYS_MISC, SSF_MEM_ALLOC, [shr_icons_len]
654
    mov     [icons_active], eax
653
    mov     [icons_active], eax
655
    
654
    
656
    mcall   SF_SYS_MISC, SSF_MEM_FREE,  [icons_inactive]
655
    mcall   SF_SYS_MISC, SSF_MEM_FREE,  [icons_inactive]
657
    mcall   SF_SYS_MISC, SSF_MEM_ALLOC, [shr_icons_len]
656
    mcall   SF_SYS_MISC, SSF_MEM_ALLOC, [shr_icons_len]
658
    mov     [icons_inactive], eax  
657
    mov     [icons_inactive], eax  
659
    
658
    
660
    stdcall icon32cpy, [icons_inactive], [shr_icons_ptr], [shr_icons_len], [sc.work]
659
    stdcall icon32cpy, [icons_inactive], [shr_icons_ptr], [shr_icons_len], [sc.work]
661
    stdcall icon32cpy, [icons_active],   [shr_icons_ptr], [shr_icons_len], [sc.work_button]
660
    stdcall icon32cpy, [icons_active],   [shr_icons_ptr], [shr_icons_len], [sc.work_button]
662
    
661
    
663
    mcall   SF_SYS_MISC, SSF_MEM_CLOSE,icons_resname
662
    mcall   SF_SYS_MISC, SSF_MEM_CLOSE,icons_resname
664
    
663
    
665
    ret
664
    ret
666
;-------------------------------------------------------------------------------
665
;-------------------------------------------------------------------------------
667
proc sections_callback, _file_name, _section_name
666
proc sections_callback, _file_name, _section_name
668
    mov     eax, [_section_name]
667
    mov     eax, [_section_name]
669
    cmp     byte[eax], '@'
668
    cmp     byte[eax], '@'
670
    jne     @f
669
    jne     @f
671
 
670
 
672
    dec     dword[dock_items.count]
671
    dec     dword[dock_items.count]
673
    jmp     .endproc
672
    jmp     .endproc
674
 
673
 
675
  @@:
674
  @@:
676
    ; ==== GET NAME ====
675
    ; ==== GET NAME ====
677
    mov     ebx, [dock_items.count]
676
    mov     ebx, [dock_items.count]
678
    imul    ebx, 16
677
    imul    ebx, 16
679
    add     ebx, dock_items.name
678
    add     ebx, dock_items.name
680
 
679
 
681
    mov     eax, [_section_name]
680
    mov     eax, [_section_name]
682
 
681
 
683
    mov     edi, 0
682
    mov     edi, 0
684
  @@:
683
  @@:
685
    mov     cl, byte[eax]
684
    mov     cl, byte[eax]
686
    mov     byte[ebx + edi], cl
685
    mov     byte[ebx + edi], cl
687
 
686
 
688
    inc     eax
687
    inc     eax
689
    inc     edi
688
    inc     edi
690
    cmp     edi, 10
689
    cmp     edi, 10
691
    jne     @b
690
    jne     @b
692
 
691
 
693
  ; ==== GET PATH ====
692
  ; ==== GET PATH ====
694
    mov     ebx, [dock_items.count]
693
    mov     ebx, [dock_items.count]
695
    imul    ebx, 256
694
    imul    ebx, 256
696
    add     ebx, dock_items.path
695
    add     ebx, dock_items.path
697
 
696
 
698
    invoke  ini.get_str, [_file_name], [_section_name], ini_data.path_name, ebx, 256, 0
697
    invoke  ini.get_str, [_file_name], [_section_name], ini_data.path_name, ebx, 256, 0
699
 
698
 
700
  ; === GET  PARAM ===
699
  ; === GET  PARAM ===
701
    mov     ebx, [dock_items.count]
700
    mov     ebx, [dock_items.count]
702
    imul    ebx, 256
701
    imul    ebx, 256
703
    add     ebx, dock_items.param
702
    add     ebx, dock_items.param
704
 
703
 
705
    invoke  ini.get_str, [_file_name], [_section_name], ini_data.param_name, ebx, 256, 0
704
    invoke  ini.get_str, [_file_name], [_section_name], ini_data.param_name, ebx, 256, 0
706
 
705
 
707
  ; ==== GET ICON ====
706
  ; ==== GET ICON ====
708
    invoke  ini.get_int, [_file_name], [_section_name], ini_data.icon_name, 0
707
    invoke  ini.get_int, [_file_name], [_section_name], ini_data.icon_name, 0
709
 
708
 
710
    mov     ebx, [dock_items.count]
709
    mov     ebx, [dock_items.count]
711
    imul    ebx, 4
710
    imul    ebx, 4
712
    mov     [dock_items.icon + ebx], eax
711
    mov     [dock_items.icon + ebx], eax
713
 
712
 
714
  ; ==== GET SEPARATOR ====
713
  ; ==== GET SEPARATOR ====
715
    invoke  ini.get_int, [_file_name], [_section_name], ini_data.separator_name, 0
714
    invoke  ini.get_int, [_file_name], [_section_name], ini_data.separator_name, 0
716
 
715
 
717
    mov     ebx, [dock_items.count]
716
    mov     ebx, [dock_items.count]
718
    mov     byte[dock_items.separator + ebx], al
717
    mov     byte[dock_items.separator + ebx], al
719
 
718
 
720
  ; ====== END =======
719
  ; ====== END =======
721
 .endproc:
720
 .endproc:
722
    mov     eax, 1
721
    mov     eax, 1
723
    inc     dword[dock_items.count]
722
    inc     dword[dock_items.count]
724
    ret
723
    ret
725
endp
724
endp
726
;-------------------------------------------------------------------------------
725
;-------------------------------------------------------------------------------
727
    include "MEMORY.INC"
726
    include "MEMORY.INC"