Subversion Repositories Kolibri OS

Rev

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

Rev 111 Rev 131
1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2
;                                              ;
2
;                                              ;
3
;   SYSTEM X-TREE BROWSER                      ;
3
;   SYSTEM X-TREE BROWSER                      ;
4
;                                              ;
4
;                                              ;
5
;   Author: Pavlushin Evgeni waptap@mail.ru    ;
5
;   Author: Pavlushin Evgeni waptap@mail.ru    ;
6
;                   site: www.deck4.narod.ru   ;
6
;                   site: www.deck4.narod.ru   ;
7
;                                              ;
7
;                                              ;
8
;   Compile with FASM for MenuetOS             ;
8
;   Compile with FASM for MenuetOS             ;
9
;                                              ;
9
;                                              ;
10
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
10
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
11
 
11
 
12
;Bug report +bug deleted  -bug not deleted
12
;Bug report +bug deleted  -bug not deleted
13
;show/fade del notwork+
13
;show/fade del notwork+
14
;64Ver Run file from HD bug deleted.
14
;64Ver Run file from HD bug deleted.
15
;65Ver The bad scroll realization
15
;65Ver The bad scroll realization
16
;66Ver The good scroll realization, url line anti-flick
16
;66Ver The good scroll realization, url line anti-flick
17
;67Ver Url line monolith procedure
17
;67Ver Url line monolith procedure
18
;68Ver Mini icon on left of file name
18
;68Ver Mini icon on left of file name
19
;69Ver Getimg proc size minus 900 bytes
19
;69Ver Getimg proc size minus 900 bytes
20
;70Ver Del data area ramsize minus 140000 bytes
20
;70Ver Del data area ramsize minus 140000 bytes
21
;72Ver Quick sort, ramsize minus 200000 bytes
21
;72Ver Quick sort, ramsize minus 200000 bytes
22
;73Ver Url flick and out bugs delete
22
;73Ver Url flick and out bugs delete
23
;74Ver scroll bug deleted
23
;74Ver scroll bug deleted
24
;75Ver hd partition fast change button. Add bmp,txt,exec,asm and inc icons.
24
;75Ver hd partition fast change button. Add bmp,txt,exec,asm and inc icons.
25
; sort type in headmenu bug del
25
; sort type in headmenu bug del
26
;78Ver directory extension bug fix by Asko Vuori
26
;78Ver directory extension bug fix by Asko Vuori
27
;79Ver Asko Vuori volume label add and "put in command line" bug fix
27
;79Ver Asko Vuori volume label add and "put in command line" bug fix
28
;80Ver prompt edit fatal bug deleted, antiflick when move list up/down
28
;80Ver prompt edit fatal bug deleted, antiflick when move list up/down
29
;81Ver Save Dialog bug deleted
29
;81Ver Save Dialog bug deleted
30
;600000 bytes memory!
30
;600000 bytes memory!
31
 
31
 
32
;******************************************************************************
32
;******************************************************************************
33
  use32
33
  use32
34
  org    0x0
34
  org	   0x0
35
  db     'MENUET01'   ; 8 byte id
35
  db	 'MENUET01'   ; 8 byte id
36
  dd     0x01         ; header version
36
  dd	 0x01		; header version
37
  dd     START        ; program start
37
  dd	 START	      ; program start
38
  dd     I_END        ; program image size
38
  dd	 I_END	      ; program image size
39
  dd     RAM_END      ; memory
39
  dd	 RAM_END      ; memory
40
  dd     RAM_END      ; stack
40
  dd	 RAM_END      ; stack
41
  dd     param_area ,0x0   ; param,icon
41
  dd	 param_area ,0x0   ; param,icon
42
;  dd 0,0
42
;  dd 0,0
43
 
43
 
44
;******************************************************************************
44
;******************************************************************************
45
include 'lang.inc'
-
 
46
include 'macros.inc'
45
include 'macros.inc'
47
include 'ascl.inc'
46
include 'ascl.inc'
48
include 'ascgl.inc'
47
include 'ascgl.inc'
-
 
48
 
49
    gif_hash_offset = gif_hash
49
    gif_hash_offset = gif_hash
50
 
50
 
51
START:                          ; start of execution
51
START:		    ; start of execution
52
; //// Willow
52
; //// Willow
53
    mov eax,58
53
;    mov eax,58
54
    mov ebx,MRUfile
54
;    mov ebx,MRUfile
55
    int 0x40
55
;    int 0x40
56
; //// Willow
56
; //// Willow
-
 
57
    mcall 18,11,1,table_area
-
 
58
    mov edi,hdimg+62*2
-
 
59
    cmp [table_area+2],byte 0
-
 
60
    je	  no_hdpartition_on_hd0
-
 
61
    mov esi,hdimg1
-
 
62
    mov ecx,62
-
 
63
    rep movsb
-
 
64
 no_hdpartition_on_hd0:
-
 
65
    cmp [table_area+3],byte 0
-
 
66
    je	  no_hdpartition_on_hd1
-
 
67
    mov esi,hdimg2
-
 
68
    mov ecx,62
-
 
69
    rep movsb
-
 
70
 no_hdpartition_on_hd1:
-
 
71
    cmp [table_area+4],byte 0
-
 
72
    je	  no_hdpartition_on_hd2
-
 
73
    mov esi,hdimg3
-
 
74
    mov ecx,62
-
 
75
    rep movsb
-
 
76
 no_hdpartition_on_hd2:
-
 
77
    cmp [table_area+5],byte 0
-
 
78
    je	  no_hdpartition_on_hd3
-
 
79
    mov esi,hdimg4
-
 
80
    mov ecx,62
-
 
81
    rep movsb
-
 
82
 no_hdpartition_on_hd3:
57
 
83
 
58
    mov eax,40
84
    mov eax,40
59
    mov ebx,0100111b
85
    mov ebx,0100111b
60
    int 0x40
86
    int 0x40
61
 
87
 
62
    cmp byte [param_area],0 ;test parameters line
88
    cmp byte [param_area],0 ;test parameters line
63
    jne no_brow             ;it's dialog
89
    jne no_brow     ;it's dialog
64
    mov [browser],dword 1   ;it's browser
90
    mov [browser],dword 1   ;it's browser
65
no_brow:
91
no_brow:
66
 
92
 
67
    cmp [browser],dword 1
93
    cmp [browser],dword 1
68
    je  no_dlg
94
    je	    no_dlg
69
 
95
 
70
    mov al,byte [param_area+5]
96
    mov al,byte [param_area+5]
71
    mov [dlg_type],al
97
    mov [dlg_type],al
72
 
98
 
73
    mov eax,9
99
    mov eax,9
74
    mov ebx,procinfo
100
    mov ebx,procinfo
75
    mov ecx,-1
101
    mov ecx,-1
76
    int 0x40
102
    int 0x40
77
 
103
 
78
    mov eax,dword [procinfo+30]
104
    mov eax,dword [procinfo+30]
79
    mov edi,MYPID+4-1
105
    mov edi,MYPID+4-1
80
    mov ecx,4
106
    mov ecx,4
81
    mov ebx,10
107
    mov ebx,10
82
    cld
108
    cld
83
 
109
 
84
new_d:
110
new_d:
85
    xor edx,edx
111
    xor edx,edx
86
    div ebx
112
    div ebx
87
    add dl,'0'
113
    add dl,'0'
88
    mov [edi],dl
114
    mov [edi],dl
89
    dec edi
115
    dec edi
90
    loop new_d
116
    loop new_d
91
 
117
 
92
    movzx eax,byte [param_area]
118
    movzx eax,byte [param_area]
93
    sub eax,48
119
    sub eax,48
94
    imul eax,10
120
    imul eax,10
95
    movzx ebx,byte [param_area+1]
121
    movzx ebx,byte [param_area+1]
96
    add eax,ebx
122
    add eax,ebx
97
    sub eax,48
123
    sub eax,48
98
    imul eax,10
124
    imul eax,10
99
    movzx ebx,byte [param_area+2]
125
    movzx ebx,byte [param_area+2]
100
    add eax,ebx
126
    add eax,ebx
101
    sub eax,48
127
    sub eax,48
102
    imul eax,10
128
    imul eax,10
103
    movzx ebx,byte [param_area+3]
129
    movzx ebx,byte [param_area+3]
104
    add eax,ebx
130
    add eax,ebx
105
    sub eax,48
131
    sub eax,48
106
 
132
 
107
    mov ecx,eax ;pid to ecx
133
    mov ecx,eax ;pid to ecx
108
    mov eax,60
134
    mov eax,60
109
    mov ebx,2
135
    mov ebx,2
110
    mov edx,MYPID
136
    mov edx,MYPID
111
    mov esi,4
137
    mov esi,4
112
    int 0x40
138
    int 0x40
113
no_dlg:
139
no_dlg:
114
 
140
 
115
    giftoimg but_file,tempimg
141
    giftoimg but_file,tempimg
116
 
142
 
117
;************************
143
;************************
118
;      Get images
144
;      Get images
119
;************************
145
;************************
120
 
146
 
121
    mov eax,0  ;x
147
    mov eax,0  ;x
122
    mov ebx,0     ;y
148
    mov ebx,0	    ;y
123
    mov esi,286     ;xs
149
    mov esi,286     ;xs
124
    mov edi,16      ;ys
150
    mov edi,16		;ys
125
    mov ecx,tempimg ;src
151
    mov ecx,tempimg ;src
126
    mov edx,butimg   ;dest
152
    mov edx,butimg   ;dest
127
    call getimgproc
153
    call getimgproc
128
    mov eax,288
154
    mov eax,288
129
    mov esi,60
155
    mov esi,60
130
    mov edx,logoimg  ;dest
156
    mov edx,logoimg  ;dest
131
    call getimgproc
157
    call getimgproc
132
    mov eax,0  ;x
158
    mov eax,0  ;x
133
    mov ebx,16     ;y
159
    mov ebx,16	       ;y
134
    mov esi,51     ;xs
160
    mov esi,51	       ;xs
135
    mov edi,esi      ;ys
161
    mov edi,esi      ;ys
136
    mov edx,logoinfimg   ;dest
162
    mov edx,logoinfimg	     ;dest
137
    call getimgproc
163
    call getimgproc
138
    mov eax,51  ;x
164
    mov eax,51	    ;x
139
    mov esi,8     ;xs
165
    mov esi,8	    ;xs
140
    mov edi,9      ;ys
166
    mov edi,9	     ;ys
141
    mov edx,upsb   ;dest
167
    mov edx,upsb   ;dest
142
    call getimgproc
168
    call getimgproc
143
    mov eax,51+8  ;x
169
    mov eax,51+8  ;x
144
    mov edx,dnsb   ;dest
170
    mov edx,dnsb   ;dest
145
    call getimgproc
171
    call getimgproc
146
 
172
 
147
    mov eax,51+16  ;x
173
    mov eax,51+16  ;x
148
    mov ebx,16     ;y
174
    mov ebx,16	       ;y
149
    mov esi,12     ;xs
175
    mov esi,12	       ;xs
150
    mov edi,9      ;ys
176
    mov edi,9	     ;ys
151
 
177
 
152
    mov ecx,tempimg ;src
178
    mov ecx,tempimg ;src
153
    mov edx,hdico   ;dest
179
    mov edx,hdico   ;dest
154
    mov ebp,9
180
    mov ebp,9
155
loogetimg:
181
loogetimg:
156
    call getimgproc
182
    call getimgproc
157
    add edx,9*12*3+8
183
    add edx,9*12*3+8
158
    add eax,12
184
    add eax,12
159
    dec ebp
185
    dec ebp
160
    jnz loogetimg
186
    jnz loogetimg
161
    jmp endgip
187
    jmp endgip
162
 
188
 
163
getimgproc:
189
getimgproc:
164
    pushad
190
    pushad
165
    mov dword [edx],esi ;xs
191
    mov dword [edx],esi ;xs
166
    mov dword [edx+4],edi ;ys
192
    mov dword [edx+4],edi ;ys
167
 
193
 
168
    mov ebp,eax
194
    mov ebp,eax
169
    mov eax,dword [ecx] ;getx size
195
    mov eax,dword [ecx] ;getx size
170
    push edx
196
    push edx
171
    push ecx
197
    push ecx
172
    lea ecx,[eax+2*eax]
198
    lea ecx,[eax+2*eax]
173
 
199
 
174
    mul ebx
200
    mul ebx
175
    add eax,ebp ;x
201
    add eax,ebp ;x
176
    mov edx,ecx
202
    mov edx,ecx
177
    lea eax,[eax+2*eax]  ;eax=offset on imsrc
203
    lea eax,[eax+2*eax]  ;eax=offset on imsrc
178
 
204
 
179
    mov ecx,esi ;xs
205
    mov ecx,esi ;xs
180
    mov ebx,edi ;ys
206
    mov ebx,edi ;ys
181
 
207
 
182
    mov ebp,esi
208
    mov ebp,esi
183
 
209
 
184
    pop edi
210
    pop edi
185
    lea esi,[eax+8+edi]
211
    lea esi,[eax+8+edi]
186
 
212
 
187
    pop edi
213
    pop edi
188
    add edi,8
214
    add edi,8
189
 
215
 
190
    cld
216
    cld
191
cyc:
217
cyc:
192
    movsw
218
    movsw
193
    movsb
219
    movsb
194
    dec ecx
220
    dec ecx
195
    jne cyc
221
    jne cyc
196
    add esi,edx
222
    add esi,edx
197
    mov ecx,ebp ;xs
223
    mov ecx,ebp ;xs
198
    sub esi,ecx
224
    sub esi,ecx
199
    sub esi,ecx
225
    sub esi,ecx
200
    sub esi,ecx
226
    sub esi,ecx
201
    dec ebx
227
    dec ebx
202
    jne cyc
228
    jne cyc
203
 
229
 
204
    popad
230
    popad
205
    ret
231
    ret
206
 
232
 
207
endgip:
233
endgip:
208
 
234
 
209
    call read_directory
235
    call read_directory
210
;    call convertation
236
;    call convertation
211
red:
237
red:
212
    call draw_window            ; at first, draw the window
238
    call draw_window	    ; at first, draw the window
213
 
239
 
214
still:
240
still:
215
    mov eax,9
241
    mov eax,9
216
    mov ebx,procinfo
242
    mov ebx,procinfo
217
    mov ecx,-1
243
    mov ecx,-1
218
    int 0x40
244
    int 0x40
219
 
245
 
220
    wtevent red,key,button
246
    wtevent red,key,button
221
 
247
 
222
scrolltest:
248
scrolltest:
223
    mov eax,37
249
    mov eax,37
224
    mov ebx,2
250
    mov ebx,2
225
    int 0x40
251
    int 0x40
226
    cmp eax,1
252
    cmp eax,1
227
    jne still
253
    jne still
228
 
254
 
229
scrl:
255
scrl:
230
    mov eax,37
256
    mov eax,37
231
    mov ebx,1
257
    mov ebx,1
232
    int 0x40
258
    int 0x40
233
    mov ebx,eax
259
    mov ebx,eax
234
    shr eax,16       ;x
260
    shr eax,16		 ;x
235
    and ebx,0xffff   ;y
261
    and ebx,0xffff   ;y
236
 
262
 
237
    mov ebp,eax
263
    mov ebp,eax
238
    sub ebp,[listx] ;[procinfo.x_size]
264
    sub ebp,[listx] ;[procinfo.x_size]
239
    sub ebp,[listxsize]
265
    sub ebp,[listxsize]
240
    add ebp,[scrollsize]
266
    add ebp,[scrollsize]
241
    cmp ebp,dword [scrollsize] ;8
267
    cmp ebp,dword [scrollsize] ;8
242
    ja menu_test ; still
268
    ja menu_test ; still
243
 
269
 
244
    mov ebp,ebx
270
    mov ebp,ebx
245
    sub ebp,[listy] ;76    ;up scroll
271
    sub ebp,[listy] ;76    ;up scroll
246
    sub ebp,[scrollbutsize]
272
    sub ebp,[scrollbutsize]
247
    cmp ebp,0
273
    cmp ebp,0
248
    jl  menu_test
274
    jl	    menu_test
249
    mov [mousey],ebp
275
    mov [mousey],ebp
250
 
276
 
251
    push eax ebx edx
277
    push eax ebx edx
252
    mov  edx,0
278
    mov  edx,0
253
    mov  eax,[listysize]
279
    mov  eax,[listysize]
254
    sub  eax,2
280
    sub  eax,2
255
    mov  ebx,dword 10
281
    mov  ebx,dword 10
256
    div  ebx
282
    div  ebx
257
 
283
 
258
    mov  [filelistsize],eax
284
    mov  [filelistsize],eax
259
    mov  ebx,eax
285
    mov  ebx,eax
260
    cmp  ebx,[listsize]  ;filelistsize in ebx
286
    cmp  ebx,[listsize]  ;filelistsize in ebx
261
    ja   notusescrl
287
    ja	     notusescrl
262
 
288
 
263
    mov edx,0
289
    mov edx,0
264
    mov eax,[listysize]
290
    mov eax,[listysize]
265
    sub eax,[scrollbutsize]
291
    sub eax,[scrollbutsize]
266
    sub eax,[scrollbutsize]
292
    sub eax,[scrollbutsize]
267
 
293
 
268
    shl eax,16+6
294
    shl eax,16+6
269
    div dword [listsize]
295
    div dword [listsize]
270
    mul ebx
296
    mul ebx
271
    shr eax,16+6
297
    shr eax,16+6
272
 
298
 
273
    mov ebp,eax    ; in ebp ysize of scroll
299
    mov ebp,eax    ; in ebp ysize of scroll
274
 
300
 
275
    mov edx,0
301
    mov edx,0
276
    mov eax,[listsize]
302
    mov eax,[listsize]
277
 
303
 
278
    mov ebx,[listysize]
304
    mov ebx,[listysize]
279
    sub ebx,[scrollbutsize]
305
    sub ebx,[scrollbutsize]
280
    sub ebx,[scrollbutsize]
306
    sub ebx,[scrollbutsize]
281
    shl eax,16
307
    shl eax,16
282
    div ebx ;dword [listsize]
308
    div ebx ;dword [listsize]
283
    mul [mousey]
309
    mul [mousey]
284
    shr eax,16
310
    shr eax,16
285
 
311
 
286
    mov ebx,[listsize]
312
    mov ebx,[listsize]
287
    sub ebx,[filelistsize]
313
    sub ebx,[filelistsize]
288
    cmp eax,ebx
314
    cmp eax,ebx
289
    jnae no_cor
315
    jnae no_cor
290
    mov eax,[listsize]      ;correction for full dirs (1000 files)
316
    mov eax,[listsize]		;correction for full dirs (1000 files)
291
    sub eax,[filelistsize]
317
    sub eax,[filelistsize]
292
no_cor:
318
no_cor:
293
    mov [filecursor],eax
319
    mov [filecursor],eax
294
 
320
 
295
    jmp  usescrl
321
    jmp  usescrl
296
notusescrl:
322
notusescrl:
297
    mov [filecursor],0 ;ebp
323
    mov [filecursor],0 ;ebp
298
usescrl:
324
usescrl:
299
 
325
 
300
    pop  edx ebx eax
326
    pop  edx ebx eax
301
 
327
 
302
    mov esi,[listy];[procinfo.y_size]
328
    mov esi,[listy];[procinfo.y_size]
303
    add esi,[listysize]
329
    add esi,[listysize]
304
    sub esi,[scrollbutsize]
330
    sub esi,[scrollbutsize]
305
 
331
 
306
    cmp ebx,esi
332
    cmp ebx,esi
307
    jna oks ;menu_test ;still
333
    jna oks ;menu_test ;still
308
 
334
 
309
    sub esi,ebp
335
    sub esi,ebp
310
    inc esi ;correction
336
    inc esi ;correction
311
    cmp ebx,esi
337
    cmp ebx,esi
312
    ja  menu_test ;still
338
    ja	    menu_test ;still
313
oks:
339
oks:
314
 
340
 
315
    mov [flick],1
341
    mov [flick],1
316
    jmp anti_flick ;red
342
    jmp anti_flick ;red
317
 
343
 
318
menu_test:
344
menu_test:
319
    cmp [pmenu_draw],1 ;if menu is show, update all
345
    cmp [pmenu_draw],1 ;if menu is show, update all
320
    jne still
346
    jne still
321
    mov [pmenu_draw],0
347
    mov [pmenu_draw],0
322
    jmp red            ;update all window
348
    jmp red	     ;update all window
323
 
349
 
324
;this function not use in dialog when poup menu's is not used
350
;this function not use in dialog when poup menu's is not used
325
;in dialog's
351
;in dialog's
326
 
352
 
327
;===================
353
;===================
328
; Test keyboard
354
; Test keyboard
329
;===================
355
;===================
330
key:                          ; key
356
key:		  ; key
331
    mov  eax,2
357
    mov  eax,2
332
    int  0x40
358
    int  0x40
333
    cmp dword [focus],0
359
    cmp dword [focus],0
334
    jne con_edit
360
    jne con_edit
335
    cmp  ah,key_Up
361
    cmp  ah,key_Up
336
    jne  no_upk
362
    jne  no_upk
337
    mov  ebx,1
363
    mov  ebx,1
338
    jmp  up
364
    jmp  up
339
no_upk:
365
no_upk:
340
    cmp  ah,key_Down
366
    cmp  ah,key_Down
341
    jne  no_downk
367
    jne  no_downk
342
    mov  ebx,1
368
    mov  ebx,1
343
    jmp  down
369
    jmp  down
344
no_downk:
370
no_downk:
345
    cmp  ah,key_PgUp
371
    cmp  ah,key_PgUp
346
    jne  no_pgup
372
    jne  no_pgup
347
    mov  ebx,10
373
    mov  ebx,10
348
    jmp  up
374
    jmp  up
349
no_pgup:
375
no_pgup:
350
    cmp  ah,key_PgDown
376
    cmp  ah,key_PgDown
351
    jne  no_pgdown
377
    jne  no_pgdown
352
    mov  ebx,10
378
    mov  ebx,10
353
    jmp  down
379
    jmp  down
354
no_pgdown:
380
no_pgdown:
355
    cmp  ah,key_Enter
381
    cmp  ah,key_Enter
356
    jne  no_k_ent
382
    jne  no_k_ent
357
    jmp  kfad
383
    jmp  kfad
358
no_k_ent:
384
no_k_ent:
359
    cmp  ah,key_Bspace
385
    cmp  ah,key_Bspace
360
    je   back
386
    je	     back
361
    cmp  ah,key_F2
387
    cmp  ah,key_F2
362
    je   viewset
388
    je	     viewset
363
    cmp  ah,key_F3
389
    cmp  ah,key_F3
364
    je   textopen
390
    je	     textopen
365
    cmp  ah,key_F5
391
    cmp  ah,key_F5
366
    je   copy_to_clip
392
    je	     copy_to_clip
367
    cmp  ah,key_F6
393
    cmp  ah,key_F6
368
    je   paste_from_clip
394
    je	     paste_from_clip
369
    cmp  ah,key_F11
395
    cmp  ah,key_F11
370
    je   edit_prompt
396
    je	     edit_prompt
371
    cmp  ah,key_F12
397
    cmp  ah,key_F12
372
    je   update
398
    je	     update
373
    jmp  still
399
    jmp  still
374
 
400
 
375
; test input string
401
; test input string
376
con_edit:
402
con_edit:
377
    cmp  ah,key_Enter
403
    cmp  ah,key_Enter
378
    jne  no_con_ent
404
    jne  no_con_ent
379
    not  [focus]
405
    not  [focus]
380
    jmp  savetest
406
    jmp  savetest
381
    jmp  update
407
    jmp  update
382
no_con_ent:
408
no_con_ent:
383
    cmp  ah,key_Left
409
    cmp  ah,key_Left
384
    jne  no_con_left
410
    jne  no_con_left
385
    dec  [cursor]
411
    dec  [cursor]
386
    mov  [flick],2
412
    mov  [flick],2
387
    jmp  anti_flick ;red
413
    jmp  anti_flick ;red
388
no_con_left:
414
no_con_left:
389
    cmp  ah,key_Right
415
    cmp  ah,key_Right
390
    jne  no_con_right
416
    jne  no_con_right
391
    inc  [cursor]
417
    inc  [cursor]
392
    mov  [flick],2
418
    mov  [flick],2
393
    jmp  anti_flick ;red
419
    jmp  anti_flick ;red
394
no_con_right:
420
no_con_right:
395
    cmp  ah,key_Bspace
421
    cmp  ah,key_Bspace
396
    jne  no_con_bspace
422
    jne  no_con_bspace
397
 
423
 
398
    mov ecx,[cursor]
424
    mov ecx,[cursor]
399
    cmp ecx,0
425
    cmp ecx,0
400
    je  still
426
    je	    still
401
    dec ecx
427
    dec ecx
402
    mov  ebp,[cursor]
428
    mov  ebp,[cursor]
403
lobsp:
429
lobsp:
404
    mov  bl,byte [path+ebp]
430
    mov  bl,byte [path+ebp]
405
    mov  byte [path+ebp-1],bl
431
    mov  byte [path+ebp-1],bl
406
    inc  ebp
432
    inc  ebp
407
    cmp  ebp,100
433
    cmp  ebp,100
408
    jne  lobsp
434
    jne  lobsp
409
    dec  [cursor]
435
    dec  [cursor]
410
    mov  [flick],2
436
    mov  [flick],2
411
    jmp  anti_flick ;red
437
    jmp  anti_flick ;red
412
no_con_bspace:
438
no_con_bspace:
413
 
439
 
414
    mov  ecx,[cursor]
440
    mov  ecx,[cursor]
415
    dec  ecx
441
    dec  ecx
416
    mov  ebp,100 ;[cursor]
442
    mov  ebp,100 ;[cursor]
417
losx:
443
losx:
418
    mov  bl,byte [path+ebp]
444
    mov  bl,byte [path+ebp]
419
    mov  byte [path+ebp+1],bl
445
    mov  byte [path+ebp+1],bl
420
    dec  ebp
446
    dec  ebp
421
    cmp  ebp,ecx ;100
447
    cmp  ebp,ecx ;100
422
    jne  losx
448
    jne  losx
423
 
449
 
424
    mov  ebp, [cursor]
450
    mov  ebp, [cursor]
425
    cmp  ebp,100
451
    cmp  ebp,100
426
    ja   still
452
    ja	     still
427
 
453
 
428
    mov  byte [path+ebp],ah
454
    mov  byte [path+ebp],ah
429
    inc  dword [cursor]
455
    inc  dword [cursor]
430
 
456
 
431
    mov  [flick],2
457
    mov  [flick],2
432
    jmp  anti_flick
458
    jmp  anti_flick
433
 
459
 
434
 
460
 
435
;----------------------------
461
;----------------------------
436
;Test on mouse button
462
;Test on mouse button
437
;-----------------------------
463
;-----------------------------
438
 
464
 
439
  button:                       ; button
465
  button:	  ; button
440
    mov eax,17
466
    mov eax,17
441
    int 0x40
467
    int 0x40
442
 
468
 
443
    cmp ah,2           ;Edit prompt line?
469
    cmp ah,2	       ;Edit prompt line?
444
    je  edit_prompt
470
    je	    edit_prompt
445
 
471
 
446
    cmp ah,4
472
    cmp ah,4
447
    jne no_filelist
473
    jne no_filelist
448
 
474
 
449
mousetest:
475
mousetest:
450
    mov eax,37
476
    mov eax,37
451
    mov ebx,1
477
    mov ebx,1
452
    int 0x40
478
    int 0x40
453
    mov ebx,eax
479
    mov ebx,eax
454
    shr eax,16       ;x
480
    shr eax,16		 ;x
455
    and ebx,0xffff   ;y
481
    and ebx,0xffff   ;y
456
 
482
 
457
    sub ebx,[listy] ;80
483
    sub ebx,[listy] ;80
458
    mov [mousey],ebx
484
    mov [mousey],ebx
459
 
485
 
460
    mov ecx,[listx]
486
    mov ecx,[listx]
461
    cmp eax,ecx
487
    cmp eax,ecx
462
    jl  still
488
    jl	    still
463
    add ecx,[listxsize]
489
    add ecx,[listxsize]
464
    cmp eax,ecx
490
    cmp eax,ecx
465
    jg  still
491
    jg	    still
466
 
492
 
467
filexadd:
493
filexadd:
468
 
494
 
469
; Enter in directory
495
; Enter in directory
470
file_add:
496
file_add:
471
    mov edx,0  ;for div correct work div
497
    mov edx,0  ;for div correct work div
472
    mov eax,dword [mousey]
498
    mov eax,dword [mousey]
473
    mov ebx,10
499
    mov ebx,10
474
    div ebx
500
    div ebx
475
 
501
 
476
    add eax,[filecursor]
502
    add eax,[filecursor]
477
    jmp no_kfad
503
    jmp no_kfad
478
kfad:
504
kfad:
479
    mov eax,[filecursor]
505
    mov eax,[filecursor]
480
no_kfad:
506
no_kfad:
481
    mov ebx,62
507
    mov ebx,62
482
    mul ebx
508
    mul ebx
483
    mov ebp,eax
509
    mov ebp,eax
484
 
510
 
485
    mov edi,paramtest ;clear param string
511
    mov edi,paramtest ;clear param string
486
    mov ecx,256
512
    mov ecx,256
487
    mov al,0
513
    mov al,0
488
    rep stosb
514
    rep stosb
489
 
515
 
490
 
516
 
491
    mov  esi,0
517
    mov  esi,0
492
lll2:
518
lll2:
493
    mov al,byte [path+esi]
519
    mov al,byte [path+esi]
494
    cmp al,byte 0 ;' '; '/'
520
    cmp al,byte 0 ;' '; '/'
495
    je  fis2
521
    je	    fis2
496
    cmp al,byte ' '; '/'
522
    cmp al,byte ' '; '/'
497
    je  fis2
523
    je	    fis2
498
    inc esi
524
    inc esi
499
    cmp esi,100
525
    cmp esi,100
500
    jna lll2
526
    jna lll2
501
    jmp fis2
527
    jmp fis2
502
 
528
 
503
fis2:
529
fis2:
504
    mov edi,ebp
530
    mov edi,ebp
505
    cmp [convinfo+edi+26],dword 'FOL '
531
    cmp [convinfo+edi+26],dword 'FOL '
506
    jne openf
532
    jne openf
507
    mov [path+esi],byte '/'
533
    mov [path+esi],byte '/'
508
    inc esi
534
    inc esi
509
    mov ebp,8
535
    mov ebp,8
510
 
536
 
511
los:                              ;directory extension bug fix
537
los:		  ;directory extension bug fix
512
    mov al,[convinfo+edi]
538
    mov al,[convinfo+edi]
513
    cmp al,' '
539
    cmp al,' '
514
    jz  skip_name_space
540
    jz	    skip_name_space
515
    mov [path+esi],al
541
    mov [path+esi],al
516
    inc esi
542
    inc esi
517
  skip_name_space:
543
  skip_name_space:
518
    inc edi
544
    inc edi
519
    dec ebp
545
    dec ebp
520
    jnz los
546
    jnz los
521
 
547
 
522
    cmp byte [convinfo+edi],'.'
548
    cmp byte [convinfo+edi],'.'
523
    jnz dir_name_end
549
    jnz dir_name_end
524
    cmp byte [convinfo+edi+1],' '
550
    cmp byte [convinfo+edi+1],' '
525
    jz  dir_name_end
551
    jz	    dir_name_end
526
    mov ebp,4
552
    mov ebp,4
527
  dir_ext_char:
553
  dir_ext_char:
528
    mov al,[convinfo+edi]
554
    mov al,[convinfo+edi]
529
    cmp al,' '
555
    cmp al,' '
530
    jz  dir_name_end
556
    jz	    dir_name_end
531
    mov [path+esi],al
557
    mov [path+esi],al
532
    inc esi
558
    inc esi
533
    inc edi
559
    inc edi
534
    dec ebp
560
    dec ebp
535
    jnz dir_ext_char
561
    jnz dir_ext_char
536
  dir_name_end:
562
  dir_name_end:
537
    mov [filecursor],0
563
    mov [filecursor],0
538
 
564
 
539
;los:
565
;los:
540
;    mov al,[convinfo+edi]
566
;    mov al,[convinfo+edi]
541
;    mov [path+esi],al
567
;    mov [path+esi],al
542
;    inc esi
568
;    inc esi
543
;    inc edi
569
;    inc edi
544
;    dec ebp
570
;    dec ebp
545
;    jnz los
571
;    jnz los
546
;    mov [filecursor],0
572
;    mov [filecursor],0
547
;    cmp byte [dlg_type],'S'
573
;    cmp byte [dlg_type],'S'
548
;    je  savetest
574
;    je  savetest
549
;no_save:
575
;no_save:
550
 
576
 
551
    call read_directory
577
    call read_directory
552
;;    call convertation
578
;;    call convertation
553
    call draw_window
579
    call draw_window
554
;    jmp still
580
;    jmp still
555
 
581
 
556
;Savetest
582
;Savetest
557
savetest:
583
savetest:
558
    cmp byte [dlg_type],'S'
584
    cmp byte [dlg_type],'S'
559
    je  savetest_yes
585
    je	    savetest_yes
560
    jmp still
586
    jmp still
561
savetest_yes:
587
savetest_yes:
562
    mov ecx,100
588
    mov ecx,100
563
savetestloop:
589
savetestloop:
564
    cmp [path+ecx],byte 0
590
    cmp [path+ecx],byte 0
565
    je  next_byte
591
    je	    next_byte
566
    cmp [path+ecx],byte 32
592
    cmp [path+ecx],byte 32
567
    je  next_byte
593
    je	    next_byte
568
    cmp [path+ecx],byte '.'
594
    cmp [path+ecx],byte '.'
569
    je  openf  ;it's file
595
    je	    openf  ;it's file
570
;    cmp [path+ecx],byte '/'
596
;    cmp [path+ecx],byte '/'
571
;    je  no_save  ;it's dir
597
;    je  no_save  ;it's dir
572
next_byte:
598
next_byte:
573
    dec ecx
599
    dec ecx
574
    jnz savetestloop
600
    jnz savetestloop
575
    jmp still
601
    jmp still
576
 
602
 
577
;Open/Run file
603
;Open/Run file
578
 
604
 
579
openf:
605
openf:
580
    mov ecx,100
606
    mov ecx,100
581
lopt:
607
lopt:
582
    mov al,[path+ecx]
608
    mov al,[path+ecx]
583
    mov [paramtest+ecx],al
609
    mov [paramtest+ecx],al
584
    dec ecx
610
    dec ecx
585
    jns lopt
611
    jns lopt
586
 
612
 
587
;    mov ebp,100
613
;    mov ebp,100
588
;loow:
614
;loow:
589
;    cmp [paramtest+ebp],byte '.'
615
;    cmp [paramtest+ebp],byte '.'
590
;    je  file_set
616
;    je  file_set
591
;    dec ebp
617
;    dec ebp
592
;    jnz loow   ;is file set not file add
618
;    jnz loow   ;is file set not file add
593
 
619
 
594
    cmp dword [focus],0 ;if prompt line with focus no add file name from frame
620
    cmp dword [focus],0 ;if prompt line with focus no add file name from frame
595
    jne file_set
621
    jne file_set
596
 
622
 
597
    mov [paramtest+esi],byte '/'
623
    mov [paramtest+esi],byte '/'
598
    inc esi
624
    inc esi
599
    mov ebp,8+4
625
    mov ebp,8+4
600
    mov edx,edi
626
    mov edx,edi
601
losf:
627
losf:
602
    mov al,[convinfo+edi]
628
    mov al,[convinfo+edi]
603
    mov [paramtest+esi],al
629
    mov [paramtest+esi],al
604
    inc esi
630
    inc esi
605
    inc edi
631
    inc edi
606
    dec ebp
632
    dec ebp
607
    jnz losf
633
    jnz losf
608
file_set:
634
file_set:
609
 
635
 
610
    cmp [browser],0
636
    cmp [browser],0
611
    jne is_brow
637
    jne is_brow
612
 
638
 
613
    movzx eax,byte [param_area]
639
    movzx eax,byte [param_area]
614
    sub eax,48
640
    sub eax,48
615
    imul eax,10
641
    imul eax,10
616
    movzx ebx,byte [param_area+1]
642
    movzx ebx,byte [param_area+1]
617
    add eax,ebx
643
    add eax,ebx
618
    sub eax,48
644
    sub eax,48
619
    imul eax,10
645
    imul eax,10
620
    movzx ebx,byte [param_area+2]
646
    movzx ebx,byte [param_area+2]
621
    add eax,ebx
647
    add eax,ebx
622
    sub eax,48
648
    sub eax,48
623
    imul eax,10
649
    imul eax,10
624
    movzx ebx,byte [param_area+3]
650
    movzx ebx,byte [param_area+3]
625
    add eax,ebx
651
    add eax,ebx
626
    sub eax,48
652
    sub eax,48
627
 
653
 
628
    mov ecx,eax ;pid to ecx
654
    mov ecx,eax ;pid to ecx
629
    mov eax,60
655
    mov eax,60
630
    mov ebx,2
656
    mov ebx,2
631
    mov edx,paramtest
657
    mov edx,paramtest
632
    mov esi,100
658
    mov esi,100
633
    int 0x40
659
    int 0x40
634
 
660
 
635
    jmp exit
661
    jmp exit
636
 
662
 
637
is_brow:
663
is_brow:
638
 
664
 
639
;    cmp [convinfo+edi+26],dword 'Fvol'
665
;    cmp [convinfo+edi+26],dword 'Fvol'
640
;    je  edit
666
;    je  edit
641
 
667
 
642
    mov eax,dword [convinfo+edx+8]
668
    mov eax,dword [convinfo+edx+8]
643
    cmp eax,'.   '
669
    cmp eax,'.   '
644
    jne noexecute
670
    jne noexecute
645
    mov ebx,0
671
    mov ebx,0
646
    jmp execute
672
    jmp execute
647
noexecute:
673
noexecute:
648
 
674
 
649
    cmp eax,'.JPG'
675
    cmp eax,'.JPG'
650
    jne nojv
676
    jne nojv
651
jpg_jpe:
677
jpg_jpe:
652
    mov ebx,jpgview
678
    mov ebx,jpgview
653
    jmp run
679
    jmp run
654
nojv:
680
nojv:
655
    cmp eax,'.JPE'
681
    cmp eax,'.JPE'
656
    je  jpg_jpe
682
    je	    jpg_jpe
657
    cmp eax,'.GIF'
683
    cmp eax,'.GIF'
658
    jne nojv1
684
    jne nojv1
659
    mov ebx,gifview
685
    mov ebx,gifview
660
    jmp run
686
    jmp run
661
nojv1:
687
nojv1:
662
    cmp eax,'.WAV'
688
    cmp eax,'.WAV'
663
    jne nojv12
689
    jne nojv12
664
    mov ebx,ac97wav
690
    mov ebx,ac97wav
665
    jmp run
691
    jmp run
666
nojv12:
692
nojv12:
-
 
693
    cmp eax,'.MID'
-
 
694
    jne nojv13
-
 
695
    mov ebx,midamp
-
 
696
    jmp run
-
 
697
nojv13:
667
    cmp eax,'.BMP'
698
    cmp eax,'.BMP'
668
    jne nobv
699
    jne nobv
669
    mov ebx,bmpview
700
    mov ebx,bmpview
670
    jmp run
701
    jmp run
671
nobv:
702
nobv:
672
; //// Willow
703
; //// Willow
673
    cmp eax,'.PNG'
704
    cmp eax,'.PNG'
674
    jne nopngv
705
    jne nopngv
675
    mov ebx,pngview
706
    mov ebx,pngview
676
    jmp run
707
    jmp run
677
nopngv:
708
nopngv:
678
; //// Willow
709
; //// Willow
-
 
710
    cmp eax,'.RTF'
-
 
711
    jne nortf
-
 
712
    mov ebx,rtfread
-
 
713
    jmp run
-
 
714
nortf:
679
    cmp eax,'.ASM'
715
    cmp eax,'.ASM'
680
    je edit
716
    je edit
681
    cmp eax,'.TXT'
717
    cmp eax,'.TXT'
682
    je edit
718
    je edit
683
    cmp eax,'.INC'
719
    cmp eax,'.INC'
684
    je edit
720
    je edit
685
    cmp eax,'.DAT'
-
 
686
    je edit
-
 
687
    jmp still
721
    jmp still
688
edit:
722
edit:
689
    mov ebx,editor
723
    mov ebx,editor
690
    jmp run
724
    jmp run
691
 
725
 
692
execute:
726
execute:
693
    mov ecx,0 ;200
727
    mov ecx,0 ;200
694
loexe:
728
loexe:
695
    mov al,[paramtest+ecx]
729
    mov al,[paramtest+ecx]
696
;    cmp al,0
730
;    cmp al,0
697
;    je setzr
731
;    je setzr
698
;    cmp al,' '
732
;    cmp al,' '
699
;    je setzr
733
;    je setzr
700
;    je  badl
734
;    je  badl
701
    cmp al,'.'
735
    cmp al,'.'
702
    je setzr
736
    je setzr
703
;    je  badl
737
;    je  badl
704
;    jmp okl
738
;    jmp okl
705
;badl:
739
;badl:
706
;    mov al,0
740
;    mov al,0
707
okl:
741
okl:
708
    mov [open_path+ecx],al
742
    mov [open_path+ecx],al
709
    inc ecx
743
    inc ecx
710
    cmp ecx,200
744
    cmp ecx,200
711
    jnae loexe
745
    jnae loexe
712
 
746
 
713
setzr:
747
setzr:
714
;    add ecx,3
748
;    add ecx,3
715
;    mov al,0
749
;    mov al,0
716
    mov [open_path+ecx],byte 0 ;al
750
    mov [open_path+ecx],byte 0 ;al
717
 
751
 
718
    mov eax,58
752
    mov eax,58
719
    mov ebx,fileinfo_start
753
    mov ebx,fileinfo_start
720
    int 0x40
754
    int 0x40
721
 
755
 
722
    jmp still
756
    jmp still
723
 
757
 
724
run:
758
run:
725
    mov ecx,paramtest
759
    mov ecx,paramtest
726
    mov eax,19
760
    mov eax,19
727
    int 0x40
761
    int 0x40
728
    jmp still
762
    jmp still
729
 
763
 
730
no_filelist:
764
no_filelist:
731
 
765
 
732
    cmp ah,5    ;OPEN/SAVE button
766
    cmp ah,5	;OPEN/SAVE button
733
    je  kfad
767
    je	    kfad
734
 
768
 
735
    cmp ah,6    ;Scroll up
769
    cmp ah,6	;Scroll up
736
    jne no_scrlup
770
    jne no_scrlup
737
    mov ebx,1
771
    mov ebx,1
738
    jmp up
772
    jmp up
739
no_scrlup:
773
no_scrlup:
740
 
774
 
741
    cmp ah,7    ;Scroll down
775
    cmp ah,7	;Scroll down
742
    jne no_scrldown
776
    jne no_scrldown
743
    mov ebx,1
777
    mov ebx,1
744
    jmp down
778
    jmp down
745
no_scrldown:
779
no_scrldown:
746
 
780
 
747
    cmp ah,8
781
    cmp ah,8
748
    jne no_update
782
    jne no_update
749
update:
783
update:
750
    call read_directory
784
    call read_directory
751
;    call convertation
785
;    call convertation
752
;    mov [filecursor],0
786
;    mov [filecursor],0
753
    call draw_window
787
    call draw_window
754
no_update:
788
no_update:
755
 
789
 
756
    cmp ah,9
790
    cmp ah,9
757
    jne no_textopen
791
    jne no_textopen
758
textopen:
792
textopen:
759
    mov  esi,0
793
    mov  esi,0
760
xlll2:
794
xlll2:
761
    mov al,byte [path+esi]
795
    mov al,byte [path+esi]
762
    cmp al,byte '/'
796
    cmp al,byte '/'
763
    jne  xfis2
797
    jne  xfis2
764
    inc esi
798
    inc esi
765
    cmp esi,12*20
799
    cmp esi,12*20
766
    jnae xlll2
800
    jnae xlll2
767
    jmp still
801
    jmp still
768
xfis2:
802
xfis2:
769
    mov al,byte [path+esi]
803
    mov al,byte [path+esi]
770
    cmp al,byte ' '
804
    cmp al,byte ' '
771
    je  xaa2
805
    je	    xaa2
772
    inc esi
806
    inc esi
773
    cmp esi,12*20
807
    cmp esi,12*20
774
    jnae xfis2
808
    jnae xfis2
775
    jmp still
809
    jmp still
776
xaa2:
810
xaa2:
777
    mov eax,[filecursor]
811
    mov eax,[filecursor]
778
    mov ebx,62
812
    mov ebx,62
779
    mul ebx
813
    mul ebx
780
    mov edi,eax
814
    mov edi,eax
781
    cmp [convinfo+edi+26],dword 'FOL '
815
    cmp [convinfo+edi+26],dword 'FOL '
782
    je  still
816
    je	    still
783
    mov ecx,12*20
817
    mov ecx,12*20
784
xlopt:
818
xlopt:
785
    mov al,[path+ecx]
819
    mov al,[path+ecx]
786
    mov [paramtest+ecx],al
820
    mov [paramtest+ecx],al
787
    dec ecx
821
    dec ecx
788
    jns xlopt
822
    jns xlopt
789
    mov [paramtest+esi],byte '/'
823
    mov [paramtest+esi],byte '/'
790
    inc esi
824
    inc esi
791
    mov ebp,8+4
825
    mov ebp,8+4
792
    mov edx,edi
826
    mov edx,edi
793
xlosf:
827
xlosf:
794
    mov al,[convinfo+edi]
828
    mov al,[convinfo+edi]
795
    mov [paramtest+esi],al
829
    mov [paramtest+esi],al
796
    inc esi
830
    inc esi
797
    inc edi
831
    inc edi
798
    dec ebp
832
    dec ebp
799
    jnz xlosf
833
    jnz xlosf
800
    mov [paramtest+esi],byte 0
834
    mov [paramtest+esi],byte 0
801
    mov ebx,editor
835
    mov ebx,editor
802
    mov ecx,paramtest
836
    mov ecx,paramtest
803
    mov eax,19
837
    mov eax,19
804
    int 0x40
838
    int 0x40
805
    jmp red ;still
839
    jmp red ;still
806
 
840
 
807
no_textopen:
841
no_textopen:
808
 
842
 
809
    cmp  ah,11
843
    cmp  ah,11
810
    jne  no_view
844
    jne  no_view
811
viewset:
845
viewset:
812
;    not  dword [delflag]
846
;    not  dword [delflag]
813
    inc dword [viewmode]
847
    inc dword [viewmode]
814
    cmp dword [viewmode],8
848
    cmp dword [viewmode],8
815
    jnae not_cm
849
    jnae not_cm
816
    mov [viewmode],0
850
    mov [viewmode],0
817
not_cm:
851
not_cm:
818
    call read_directory
852
    call read_directory
819
;    call convertation
853
;    call convertation
820
    mov [filecursor],0
854
    mov [filecursor],0
821
    call draw_window
855
    call draw_window
822
    jmp still
856
    jmp still
823
no_view:
857
no_view:
824
 
858
 
825
    cmp  ah,12        ;move back
859
    cmp  ah,12	      ;move back
826
    jne  no_back
860
    jne  no_back
827
back:
861
back:
828
    mov  esi,12*20
862
    mov  esi,12*20
829
lll:
863
lll:
830
    mov al,byte [path+esi]
864
    mov al,byte [path+esi]
831
    cmp al,byte ' '
865
    cmp al,byte ' '
832
    jne  findsl
866
    jne  findsl
833
    dec esi
867
    dec esi
834
    jnz lll
868
    jnz lll
835
    jmp still
869
    jmp still
836
findsl:
870
findsl:
837
    dec esi
871
    dec esi
838
fis:
872
fis:
839
    mov al,byte [path+esi]
873
    mov al,byte [path+esi]
840
    cmp al,byte '/'
874
    cmp al,byte '/'
841
    je  aa
875
    je	    aa
842
    mov [path+esi],byte 0 ;' '
876
    mov [path+esi],byte 0 ;' '
843
    dec esi
877
    dec esi
844
    jnz fis
878
    jnz fis
845
aa:
879
aa:
846
    mov [path+esi],byte 0 ;' '
880
    mov [path+esi],byte 0 ;' '
847
 
881
 
848
    mov [filecursor],0
882
    mov [filecursor],0
849
    call read_directory
883
    call read_directory
850
;    call convertation
884
;    call convertation
851
    call draw_window
885
    call draw_window
852
    jmp still
886
    jmp still
853
 
887
 
854
no_back:
888
no_back:
855
    cmp  ah,13        ;string up?
889
    cmp  ah,13	      ;string up?
856
    jne  no_up
890
    jne  no_up
857
    mov  ebx,1        ;step
891
    mov  ebx,1	      ;step
858
up:
892
up:
859
    mov  [downstop],0
893
    mov  [downstop],0
860
    sub  [filecursor],ebx
894
    sub  [filecursor],ebx
861
    cmp  [filecursor],0
895
    cmp  [filecursor],0
862
    jnl  cr_ok
896
    jnl  cr_ok
863
    mov  [filecursor],0
897
    mov  [filecursor],0
864
cr_ok:
898
cr_ok:
865
    jmp  draw_wd
899
    jmp  draw_wd
866
no_up:
900
no_up:
867
    cmp  ah,14       ;string down?
901
    cmp  ah,14		 ;string down?
868
    jne  no_dn
902
    jne  no_dn
869
    mov  ebx,1       ;step
903
    mov  ebx,1		 ;step
870
down:
904
down:
871
    cmp  [downstop],1
905
    cmp  [downstop],1
872
    je   no_dn
906
    je	     no_dn
873
    add  [filecursor],ebx
907
    add  [filecursor],ebx
874
    jmp  draw_wd
908
    jmp  draw_wd
875
no_dn:
909
no_dn:
876
 
910
 
877
    cmp  ah,15
911
    cmp  ah,15
878
    jne  no_copyclip    ;copy to clipboard
912
    jne  no_copyclip	;copy to clipboard
879
copy_to_clip:
913
copy_to_clip:
880
    mov  ebx,param_area ;clipfilp
914
    mov  ebx,param_area ;clipfilp
881
    mov  eax,32
915
    mov  eax,32
882
    int  0x40
916
    int  0x40
883
    mov  esi,0
917
    mov  esi,0
884
wlll2:
918
wlll2:
885
    mov al,byte [path+esi]
919
    mov al,byte [path+esi]
886
    cmp al,byte '/'
920
    cmp al,byte '/'
887
    jne wfis2
921
    jne wfis2
888
    inc esi
922
    inc esi
889
    cmp esi,12*20
923
    cmp esi,12*20
890
    jnae wlll2
924
    jnae wlll2
891
    jmp still
925
    jmp still
892
wfis2:
926
wfis2:
893
    mov al,byte [path+esi]
927
    mov al,byte [path+esi]
894
    cmp al,byte ' '
928
    cmp al,byte ' '
895
    je  waa2
929
    je	    waa2
896
    inc esi
930
    inc esi
897
    cmp esi,12*20
931
    cmp esi,12*20
898
    jnae wfis2
932
    jnae wfis2
899
    jmp still
933
    jmp still
900
waa2:
934
waa2:
901
    mov eax,[filecursor]
935
    mov eax,[filecursor]
902
    mov ebx,62
936
    mov ebx,62
903
    mul ebx
937
    mul ebx
904
    mov edi,eax
938
    mov edi,eax
905
    cmp [convinfo+edi+26],dword 'FOL '
939
    cmp [convinfo+edi+26],dword 'FOL '
906
    je  still
940
    je	    still
907
    mov ecx,12*20
941
    mov ecx,12*20
908
wlopt:
942
wlopt:
909
    mov al,[path+ecx]
943
    mov al,[path+ecx]
910
    mov [paramtest+ecx],al
944
    mov [paramtest+ecx],al
911
    dec ecx
945
    dec ecx
912
    jns wlopt
946
    jns wlopt
913
    mov [paramtest+esi],byte '/'
947
    mov [paramtest+esi],byte '/'
914
    inc esi
948
    inc esi
915
    mov ebp,8+4
949
    mov ebp,8+4
916
    mov edx,edi
950
    mov edx,edi
917
wlosf:
951
wlosf:
918
    mov al,[convinfo+edi]
952
    mov al,[convinfo+edi]
919
    mov [paramtest+esi],al
953
    mov [paramtest+esi],al
920
    inc esi
954
    inc esi
921
    inc edi
955
    inc edi
922
    dec ebp
956
    dec ebp
923
    jnz wlosf
957
    jnz wlosf
924
    mov [paramtest+esi],byte 0
958
    mov [paramtest+esi],byte 0
925
    mov ebx,param_area ;clipfile
959
    mov ebx,param_area ;clipfile
926
    mov ecx,paramtest
960
    mov ecx,paramtest
927
    mov edx,100
961
    mov edx,100
928
    mov esi,0
962
    mov esi,0
929
    mov eax,33
963
    mov eax,33
930
    int 0x40
964
    int 0x40
931
    jmp still
965
    jmp still
932
no_copyclip:
966
no_copyclip:
933
 
967
 
934
    cmp ah,16
968
    cmp ah,16
935
    jne no_clippaste
969
    jne no_clippaste
936
paste_from_clip:
970
paste_from_clip:
937
    mov ebx,param_area ;clipfile
971
    mov ebx,param_area ;clipfile
938
    mov ecx,0
972
    mov ecx,0
939
    mov edx,-1
973
    mov edx,-1
940
    mov esi,sourcepath
974
    mov esi,sourcepath
941
    mov eax,6
975
    mov eax,6
942
    int 0x40
976
    int 0x40
943
 
977
 
944
    mov ecx,99
978
    mov ecx,99
945
cdestp:
979
cdestp:
946
    mov al,[path+ecx]
980
    mov al,[path+ecx]
947
    mov [destpath+ecx],al
981
    mov [destpath+ecx],al
948
    dec ecx
982
    dec ecx
949
    jns cdestp
983
    jns cdestp
950
 
984
 
951
    mov esi,0
985
    mov esi,0
952
zlll2:
986
zlll2:
953
    mov al,byte [destpath+esi]
987
    mov al,byte [destpath+esi]
954
    cmp al,byte '/'
988
    cmp al,byte '/'
955
    jne zfis2
989
    jne zfis2
956
    inc esi
990
    inc esi
957
    cmp esi,100
991
    cmp esi,100
958
    jnae zlll2
992
    jnae zlll2
959
    jmp still
993
    jmp still
960
zfis2:
994
zfis2:
961
    mov al,byte [destpath+esi]
995
    mov al,byte [destpath+esi]
962
    cmp al,byte ' '
996
    cmp al,byte ' '
963
    je  zaa2
997
    je	    zaa2
964
    inc esi
998
    inc esi
965
    cmp esi,100
999
    cmp esi,100
966
    jnae zfis2
1000
    jnae zfis2
967
    jmp still
1001
    jmp still
968
zaa2:
1002
zaa2:
969
    mov byte [destpath+esi],'/'
1003
    mov byte [destpath+esi],'/'
970
    inc esi
1004
    inc esi
971
 
1005
 
972
    mov edi,0
1006
    mov edi,0
973
qlll2:
1007
qlll2:
974
    mov al,byte [sourcepath+edi]
1008
    mov al,byte [sourcepath+edi]
975
    cmp al,byte '.'
1009
    cmp al,byte '.'
976
    je  qfis2
1010
    je	    qfis2
977
    inc edi
1011
    inc edi
978
    cmp edi,100
1012
    cmp edi,100
979
    jnae qlll2
1013
    jnae qlll2
980
    jmp still
1014
    jmp still
981
qfis2:
1015
qfis2:
982
    sub edi,8  ;.-8=start of file name
1016
    sub edi,8  ;.-8=start of file name
983
 
1017
 
984
    mov ecx,11 ;11 sybols
1018
    mov ecx,11 ;11 sybols
985
cfname:
1019
cfname:
986
    mov al,[sourcepath+edi]
1020
    mov al,[sourcepath+edi]
987
    cmp al,byte ' '
1021
    cmp al,byte ' '
988
    je  dar
1022
    je	    dar
989
    mov [destpath+esi],al
1023
    mov [destpath+esi],al
990
    inc esi
1024
    inc esi
991
dar:
1025
dar:
992
    inc edi
1026
    inc edi
993
    dec ecx
1027
    dec ecx
994
    jns cfname
1028
    jns cfname
995
 
1029
 
996
;    mov [destpath+esi],byte 0
1030
;    mov [destpath+esi],byte 0
997
 
1031
 
998
    mov ecx,199
1032
    mov ecx,199
999
cdestjp:
1033
cdestjp:
1000
    mov al,[sourcepath+ecx]
1034
    mov al,[sourcepath+ecx]
1001
    cmp al,byte 0
1035
    cmp al,byte 0
1002
    jne nor
1036
    jne nor
1003
    mov al,byte 32
1037
    mov al,byte 32
1004
nor:
1038
nor:
1005
    mov [sourcepath+ecx],al
1039
    mov [sourcepath+ecx],al
1006
    dec ecx
1040
    dec ecx
1007
    jns cdestjp
1041
    jns cdestjp
1008
 
1042
 
1009
    cmp [browser],dword 1
1043
    cmp [browser],dword 1
1010
    jne no_outpath
1044
    jne no_outpath
1011
    mov  eax,4                     ; function 4 : write text to window
1045
    mov  eax,4		   ; function 4 : write text to window
1012
    mov  ebx,10*65536+67             ; [x start] *65536 + [y start]
1046
    mov  ebx,10*65536+67     ; [x start] *65536 + [y start]
1013
    mov  ecx,0x00000000 ;[sc.grab_text] ; color of text RRGGBB
1047
    mov  ecx,0x00000000 ;[sc.grab_text] ; color of text RRGGBB
1014
    mov  edx,sourcepath                  ; pointer to text beginning
1048
    mov  edx,sourcepath      ; pointer to text beginning
1015
    mov  esi,100 ;12*20             ; text length
1049
    mov  esi,100 ;12*20             ; text length
1016
    int  0x40
1050
    int  0x40
1017
    mov  ebx,250*65536+67             ; [x start] *65536 + [y start]
1051
    mov  ebx,250*65536+67	; [x start] *65536 + [y start]
1018
    mov  ecx,0x00000000 ;[sc.grab_text] ; color of text RRGGBB
1052
    mov  ecx,0x00000000 ;[sc.grab_text] ; color of text RRGGBB
1019
    mov  edx,destpath                  ; pointer to text beginning
1053
    mov  edx,destpath		 ; pointer to text beginning
1020
    mov  esi,100 ;12*20             ; text length
1054
    mov  esi,100 ;12*20             ; text length
1021
    int  0x40
1055
    int  0x40
1022
no_outpath:
1056
no_outpath:
1023
 
1057
 
1024
    mov ebx,copyrfile
1058
    mov ebx,copyrfile
1025
    mov ecx,sourcepath
1059
    mov ecx,sourcepath
1026
    mov eax,19
1060
    mov eax,19
1027
    int 0x40
1061
    int 0x40
1028
    delay 50   ;wait recoed file
1062
    delay 50   ;wait recoed file
1029
    jmp update ;still
1063
    jmp update ;still
1030
no_clippaste:
1064
no_clippaste:
1031
 
1065
 
1032
    cmp ah,19         ;Delete from floppy
1066
    cmp ah,19		;Delete from floppy
1033
delete_file:
1067
delete_file:
1034
    jne no_delt
1068
    jne no_delt
1035
    cmp dword [path],'/RD/'
1069
    cmp dword [path],'/RD/'
1036
    jne no_delt
1070
    jne no_delt
1037
    cmp byte [path+4],'1'
1071
    cmp byte [path+4],'1'
1038
    jne no_delt
1072
    jne no_delt
1039
 
1073
 
1040
    mov eax,[filecursor]
1074
    mov eax,[filecursor]
1041
    mov ebx,62
1075
    mov ebx,62
1042
    mul ebx
1076
    mul ebx
1043
    mov edi,eax
1077
    mov edi,eax
1044
    add edi,convinfo
1078
    add edi,convinfo
1045
    mov ebp,edi
1079
    mov ebp,edi
1046
    mov eax,dword [edi]
1080
    mov eax,dword [edi]
1047
    mov dword [paramtest],eax
1081
    mov dword [paramtest],eax
1048
    mov eax,dword [edi+4]
1082
    mov eax,dword [edi+4]
1049
    mov dword [paramtest+4],eax
1083
    mov dword [paramtest+4],eax
1050
    mov eax,dword [edi+4+4+1]
1084
    mov eax,dword [edi+4+4+1]
1051
    mov dword [paramtest+4+4],eax
1085
    mov dword [paramtest+4+4],eax
1052
 
1086
 
1053
    mov ebx,paramtest
1087
    mov ebx,paramtest
1054
    mov eax,32
1088
    mov eax,32
1055
    int 0x40
1089
    int 0x40
1056
    jmp update
1090
    jmp update
1057
no_delt:
1091
no_delt:
1058
 
1092
 
1059
    cmp ah,20         ;I - Help
1093
    cmp ah,20		;I - Help
1060
    je  help_scr
1094
    je	    help_scr
1061
 
1095
 
1062
    cmp ah,22
1096
    cmp ah,22
1063
    jne no_headfile
1097
    jne no_headfile
1064
    mov [drawhf],1
1098
    mov [drawhf],1
1065
    call draw_window
1099
    call draw_window
1066
    mov [drawhf],0
1100
    mov [drawhf],0
1067
    mov [pmenu_draw],1
1101
    mov [pmenu_draw],1
1068
    jmp still
1102
    jmp still
1069
no_headfile:
1103
no_headfile:
1070
 
1104
 
1071
    cmp ah,23
1105
    cmp ah,23
1072
    jne no_headview
1106
    jne no_headview
1073
    mov [drawhv],1
1107
    mov [drawhv],1
1074
    call draw_window
1108
    call draw_window
1075
    mov [drawhv],0
1109
    mov [drawhv],0
1076
    mov [pmenu_draw],1
1110
    mov [pmenu_draw],1
1077
    jmp still
1111
    jmp still
1078
no_headview:
1112
no_headview:
1079
 
1113
 
1080
    cmp ah,24
1114
    cmp ah,24
1081
    jne no_headinfo
1115
    jne no_headinfo
1082
    mov [drawhi],1
1116
    mov [drawhi],1
1083
    call draw_window
1117
    call draw_window
1084
    mov [drawhi],0
1118
    mov [drawhi],0
1085
    mov [pmenu_draw],1
1119
    mov [pmenu_draw],1
1086
    jmp still
1120
    jmp still
1087
no_headinfo:
1121
no_headinfo:
1088
 
1122
 
1089
;FILE MENU
1123
;FILE MENU
1090
    cmp ah,30
1124
    cmp ah,30
1091
    je kfad
1125
    je kfad
1092
 
1126
 
1093
    cmp ah,31
1127
    cmp ah,31
1094
    je  copy_to_clip    ;Copy
1128
    je	    copy_to_clip      ;Copy
1095
 
1129
 
1096
    cmp ah,32
1130
    cmp ah,32
1097
    je  paste_from_clip ;Paste
1131
    je	    paste_from_clip ;Paste
1098
 
1132
 
1099
    cmp ah,33
1133
    cmp ah,33
1100
    je  delete_file     ;Delte
1134
    je	    delete_file     ;Delte
1101
 
1135
 
1102
    cmp ah,34
1136
    cmp ah,34
1103
    je  textopen        ;Edit in Tinypad
1137
    je	    textopen	;Edit in Tinypad
1104
 
1138
 
1105
    cmp ah,37
1139
    cmp ah,37
1106
    je  exit
1140
    je	    exit
1107
 
1141
 
1108
;VIEW MENU
1142
;VIEW MENU
1109
    cmp ah,40         ;Sort by name show del
1143
    cmp ah,40		;Sort by name show del
1110
    jne no_sn
1144
    jne no_sn
1111
;    mov dword [viewmode],0
1145
;    mov dword [viewmode],0
1112
    and dword [viewmode],100b
1146
    and dword [viewmode],100b
1113
    jmp update
1147
    jmp update
1114
no_sn:
1148
no_sn:
1115
 
1149
 
1116
    cmp ah,41         ;Sort by extension show del
1150
    cmp ah,41		;Sort by extension show del
1117
    jne no_se
1151
    jne no_se
1118
    and dword [viewmode],1101b
1152
    and dword [viewmode],1101b
1119
    or  dword [viewmode],0001b
1153
    or	    dword [viewmode],0001b
1120
    jmp update
1154
    jmp update
1121
no_se:
1155
no_se:
1122
 
1156
 
1123
    cmp ah,42         ;Sort by size show del
1157
    cmp ah,42		;Sort by size show del
1124
    jne no_ss
1158
    jne no_ss
1125
    and dword [viewmode],1110b
1159
    and dword [viewmode],1110b
1126
    or  dword [viewmode],0010b
1160
    or	    dword [viewmode],0010b
1127
    jmp update
1161
    jmp update
1128
no_ss:
1162
no_ss:
1129
 
1163
 
1130
    cmp ah,43         ;Sort by date show del
1164
    cmp ah,43		;Sort by date show del
1131
    jne no_sd
1165
    jne no_sd
1132
    or  dword [viewmode],0011b
1166
    or	    dword [viewmode],0011b
1133
    jmp update
1167
    jmp update
1134
no_sd:
1168
no_sd:
1135
 
1169
 
1136
    cmp ah,44         ;Show del files
1170
    cmp ah,44		;Show del files
1137
    jne no_ds
1171
    jne no_ds
1138
    or  dword [viewmode],0100b
1172
    or	    dword [viewmode],0100b
1139
    jmp update
1173
    jmp update
1140
no_ds:
1174
no_ds:
1141
 
1175
 
1142
    cmp ah,45         ;Fade del files
1176
    cmp ah,45		;Fade del files
1143
    jne no_df
1177
    jne no_df
1144
    and dword [viewmode],11111011b
1178
    and dword [viewmode],11111011b
1145
    jmp update
1179
    jmp update
1146
no_df:
1180
no_df:
1147
 
1181
 
1148
;HELP MENU
1182
;HELP MENU
1149
    cmp ah,50         ;Help?
1183
    cmp ah,50		;Help?
1150
    je  help_scr
1184
    je	    help_scr
1151
 
1185
 
1152
    cmp ah,51         ;Info?
1186
    cmp ah,51		;Info?
1153
    je  info_scr
1187
    je	    info_scr
1154
 
1188
 
1155
    cmp ah,83
1189
    cmp ah,83
1156
    ja  no_hd_part
1190
    ja	    no_hd_part
1157
    cmp ah,80
1191
    cmp ah,80
1158
    jb  no_hd_part
1192
    jb	    no_hd_part
1159
    mov ecx,0
1193
    mov ecx,0
1160
    sub ah,80
1194
    sub ah,80
1161
    inc ah
1195
    inc ah
1162
    mov cl,ah
1196
    mov cl,ah
1163
    mov eax,21
1197
    mov eax,21
1164
    mov ebx,8 ;7
1198
    mov ebx,8 ;7
1165
    int 0x40
1199
    int 0x40
1166
 
1200
 
1167
no_hd_part:
1201
no_hd_part:
1168
 
1202
 
1169
    cmp ah,1                   ; test on exit button
1203
    cmp ah,1	       ; test on exit button
1170
    je  exit
1204
    je	    exit
1171
 
1205
 
1172
    jmp still
1206
    jmp still
1173
 
1207
 
1174
exit:
1208
exit:
1175
; //// Willow
1209
; //// Willow
1176
    mov eax,58
1210
;    mov eax,58
1177
    mov ebx,MRUfile
1211
;    mov ebx,MRUfile
1178
    mov dword[ebx+8],255
1212
;    mov dword[ebx+8],255
1179
    inc dword[ebx]
1213
;    inc dword[ebx]
1180
    int 0x40
1214
;    int 0x40
1181
; //// Willow
1215
; //// Willow
1182
    mov eax,-1
1216
    mov eax,-1
1183
    int 0x40
1217
    int 0x40
1184
 
1218
 
1185
draw_wd:
1219
draw_wd:
1186
;    call draw_window
1220
;    call draw_window
1187
;    jmp still
1221
;    jmp still
1188
    mov [flick],1
1222
    mov [flick],1
1189
    jmp anti_flick
1223
    jmp anti_flick
1190
 
1224
 
1191
edit_prompt:
1225
edit_prompt:
1192
    not  [focus]
1226
    not  [focus]
1193
    jmp  red
1227
    jmp  red
1194
 
1228
 
1195
help_scr:
1229
help_scr:
1196
    mov esi,14
1230
    mov esi,14
1197
    mov ebp,help_text
1231
    mov ebp,help_text
1198
    jmp screen
1232
    jmp screen
1199
 
1233
 
1200
info_scr:
1234
info_scr:
1201
    mov esi,6
1235
    mov esi,6
1202
    mov ebp,info_text
1236
    mov ebp,info_text
1203
    jmp screen
1237
    jmp screen
1204
 
1238
 
1205
screen:
1239
screen:
1206
    cmp [browser],dword 1 ;it's browser?
1240
    cmp [browser],dword 1 ;it's browser?
1207
    jne dialogscr
1241
    jne dialogscr
1208
 
1242
 
1209
    mov eax,[procinfo.y_size]
1243
    mov eax,[procinfo.y_size]
1210
    sub eax,90
1244
    sub eax,90
1211
    drawfbox 40,76,300,eax,0x00000000
1245
    drawfbox 40,76,300,eax,0x00000000
1212
    mov eax,[procinfo.y_size]
1246
    mov eax,[procinfo.y_size]
1213
    sub eax,92
1247
    sub eax,92
1214
    drawfbox 41,77,298,eax,0x00ffffff
1248
    drawfbox 41,77,298,eax,0x00ffffff
1215
    mov edi,esi ;14
1249
    mov edi,esi ;14
1216
    mov ebx,(41+26)*65536+(77+20)
1250
    mov ebx,(41+26)*65536+(77+20)
1217
    mov ecx,cl_Black
1251
    mov ecx,cl_Black
1218
    mov edx,ebp ;help_text
1252
    mov edx,ebp ;help_text
1219
    jmp outlab
1253
    jmp outlab
1220
 
1254
 
1221
dialogscr:
1255
dialogscr:
1222
    mov eax,[procinfo.y_size]
1256
    mov eax,[procinfo.y_size]
1223
    sub eax,84
1257
    sub eax,84
1224
    drawfbox 16,54,270,eax,0x00000000
1258
    drawfbox 16,54,270,eax,0x00000000
1225
    mov eax,[procinfo.y_size]
1259
    mov eax,[procinfo.y_size]
1226
    sub eax,86
1260
    sub eax,86
1227
    drawfbox 17,55,268,eax,0x00ffffff
1261
    drawfbox 17,55,268,eax,0x00ffffff
1228
    mov edi,esi ;14
1262
    mov edi,esi ;14
1229
    mov ebx,(17+10)*65536+(55+1)
1263
    mov ebx,(17+10)*65536+(55+1)
1230
    mov ecx,cl_Black
1264
    mov ecx,cl_Black
1231
    mov edx,ebp ;help_text
1265
    mov edx,ebp ;help_text
1232
 
1266
 
1233
outlab:         ;out labels
1267
outlab:     ;out labels
1234
    mov eax,4
1268
    mov eax,4
1235
    mov esi,40
1269
    mov esi,40
1236
helploo:
1270
helploo:
1237
    int 0x40
1271
    int 0x40
1238
    add ebx,11
1272
    add ebx,11
1239
    add edx,40
1273
    add edx,40
1240
    dec edi
1274
    dec edi
1241
    jnz helploo
1275
    jnz helploo
1242
 
1276
 
1243
    setimg 48,84,logoinfimg
1277
    setimg 48,84,logoinfimg
1244
 
1278
 
1245
    jmp still
1279
    jmp still
1246
 
1280
 
1247
;HELP TEXT
1281
;HELP TEXT
1248
help_text:
1282
help_text:
1249
       ;0123456789012345678901234567890123456789
1283
       ;0123456789012345678901234567890123456789
1250
    db '        ~~~~~ SYSTEM X-TREE ~~~~~       '
1284
    db '        ~~~~~ SYSTEM X-TREE ~~~~~       '
1251
    db '                   HELP                 '
1285
    db '                   HELP                 '
1252
    db '                                        '
1286
    db '                                        '
1253
    db '                                        '
1287
    db '                                        '
1254
    db 'F2 - CHANGE SORTMODE (name,ext,size,dat)'
1288
    db 'F2 - CHANGE SORTMODE (name,ext,size,dat)'
1255
    db 'F3 - VIEW file in tinypad               '
1289
    db 'F3 - VIEW file in tinypad               '
1256
 
1290
 
1257
    db 'F5 - COPY FILE to clipboard             '
1291
    db 'F5 - COPY FILE to clipboard             '
1258
    db 'F6 - PASTE FILE from clipboard          '
1292
    db 'F6 - PASTE FILE from clipboard          '
1259
    db 'F11- EDIT PROMPT string                 '
1293
    db 'F11- EDIT PROMPT string                 '
1260
    db 'F12- UPDATE directory sources           '
1294
    db 'F12- UPDATE directory sources           '
1261
    db '                                        '
1295
    db '                                        '
1262
 
1296
 
1263
    db 'Enter - input to directory              '
1297
    db 'Enter - input to directory              '
1264
    db 'Backspace - back to previos directory   '
1298
    db 'Backspace - back to previos directory   '
1265
    db 'PageDn/PageUp, Up/Down - move cursor    '
1299
    db 'PageDn/PageUp, Up/Down - move cursor    '
1266
 
1300
 
1267
info_text:
1301
info_text:
1268
    db '        ~~~~~ SYSTEM X-TREE ~~~~~       '
1302
    db '        ~~~~~ SYSTEM X-TREE ~~~~~       '
1269
    db '               INFO 81 Ver              '
1303
    db '               INFO 81 Ver              '
1270
    db '                                        '
1304
    db '                                        '
1271
    db '        Create by Pavlushin Evgeni      '
1305
    db '        Create by Pavlushin Evgeni      '
1272
    db ' with ASCL libary special for Menuet OS '
1306
    db ' with ASCL libary special for Menuet OS '
1273
    db ' www.deck4.narod.ru      waptap@mail.ru '
1307
    db ' www.deck4.narod.ru      waptap@mail.ru '
1274
 
1308
 
1275
 
1309
 
1276
;   *********************************************
1310
;   *********************************************
1277
;   *******  WINDOW DEFINITIONS AND DRAW ********
1311
;   *******  WINDOW DEFINITIONS AND DRAW ********
1278
;   ********    FILE BROWSER / DIALOG   *********
1312
;   ********    FILE BROWSER / DIALOG   *********
1279
 
1313
 
1280
;draw_browser_window:
1314
;draw_browser_window:
1281
 
1315
 
1282
draw_window:
1316
draw_window:
1283
 
1317
 
1284
;    mov eax,9
1318
;    mov eax,9
1285
;    mov ebx,procinfo
1319
;    mov ebx,procinfo
1286
;    mov ecx,-1
1320
;    mov ecx,-1
1287
;    int 0x40
1321
;    int 0x40
1288
;    mov  eax,[procinfo.x_size]
1322
;    mov  eax,[procinfo.x_size]
1289
;    cmp  eax,66
1323
;    cmp  eax,66
1290
;    jg  temp12345
1324
;    jg  temp12345
1291
;    ret
1325
;    ret
1292
; temp12345:
1326
; temp12345:
1293
    mov  eax,48
1327
    mov  eax,48
1294
    mov  ebx,3
1328
    mov  ebx,3
1295
    mov  ecx,sc
1329
    mov  ecx,sc
1296
    mov  edx,sizeof.system_colors
1330
    mov  edx,sizeof.system_colors
1297
    int  0x40
1331
    int  0x40
1298
 
1332
 
1299
    mov  eax,[sc.work_button]
1333
    mov  eax,[sc.work_button]
1300
    mov  [b_color],eax
1334
    mov  [b_color],eax
1301
 
1335
 
1302
    mov  eax,12                    ; function 12:tell os about windowdraw
1336
    mov  eax,12        ; function 12:tell os about windowdraw
1303
    mov  ebx,1                     ; 1, start of draw
1337
    mov  ebx,1		   ; 1, start of draw
1304
    int  0x40
1338
    int  0x40
1305
 
1339
 
1306
;Window
1340
;Window
1307
 
1341
 
1308
    xor  eax,eax                   ; function 0 : define and draw window
1342
    xor  eax,eax       ; function 0 : define and draw window
1309
 
1343
 
1310
    cmp  [browser],dword 1 ;it's browser
1344
    cmp  [browser],dword 1 ;it's browser
1311
    jne  nob1
1345
    jne  nob1
1312
    mov  ebx,140*65536+400         ; [x start] *65536 + [x size]
1346
    mov  ebx,140*65536+400     ; [x start] *65536 + [x size]
1313
    mov  ecx,160*65536+280         ; [y start] *65536 + [y size]
1347
    mov  ecx,160*65536+280     ; [y start] *65536 + [y size]
1314
    jmp  isb1
1348
    jmp  isb1
1315
nob1:
1349
nob1:
1316
    mov  ebx,140*65536+320         ; [x start] *65536 + [x size]
1350
    mov  ebx,140*65536+320     ; [x start] *65536 + [x size]
1317
    mov  ecx,260*65536+240         ; [y start] *65536 + [y size]
1351
    mov  ecx,260*65536+240     ; [y start] *65536 + [y size]
1318
isb1:
1352
isb1:
1319
;    mov  edx,[sc.work]             ; color of work area RRGGBB
1353
;    mov  edx,[sc.work]             ; color of work area RRGGBB
1320
    or   edx,0x03ffffff;000000
1354
    or	     edx,0x03ffffff;000000
1321
    int  0x40
1355
    int  0x40
1322
 
1356
 
1323
;Get proc info
1357
;Get proc info
1324
    mov eax,9
1358
    mov eax,9
1325
    mov ebx,procinfo
1359
    mov ebx,procinfo
1326
    mov ecx,-1
1360
    mov ecx,-1
1327
    int 0x40
1361
    int 0x40
1328
 
1362
 
1329
    mov  eax,[procinfo.x_size]
1363
    mov  eax,[procinfo.x_size]
1330
    cmp  eax,66
1364
    cmp  eax,66
1331
    jg  temp12345
1365
    jg	    temp12345
1332
    ret
1366
    ret
1333
 temp12345:
1367
 temp12345:
1334
 
1368
 
1335
    cmp  [browser],dword 1 ;it's browser
1369
    cmp  [browser],dword 1 ;it's browser
1336
    jne  nob9
1370
    jne  nob9
1337
    mov  [listx],120
1371
    mov  [listx],120
1338
    mov  eax,[procinfo.x_size]
1372
    mov  eax,[procinfo.x_size]
1339
    sub  eax,[listx]
1373
    sub  eax,[listx]
1340
    sub  eax,7
1374
    sub  eax,7
1341
    mov  [listxsize],eax
1375
    mov  [listxsize],eax
1342
    mov  [listy],73
1376
    mov  [listy],73
1343
    mov  eax,[procinfo.y_size]
1377
    mov  eax,[procinfo.y_size]
1344
    sub  eax,[listy]
1378
    sub  eax,[listy]
1345
    sub  eax,7
1379
    sub  eax,7
1346
    mov  [listysize],eax
1380
    mov  [listysize],eax
1347
    jmp isb9
1381
    jmp isb9
1348
nob9:
1382
nob9:
1349
    mov  [listx],10
1383
    mov  [listx],10
1350
    mov  eax,[procinfo.x_size]
1384
    mov  eax,[procinfo.x_size]
1351
    sub  eax,[listx]
1385
    sub  eax,[listx]
1352
    sub  eax,7
1386
    sub  eax,7
1353
    mov  [listxsize],eax
1387
    mov  [listxsize],eax
1354
    mov  [listy],54
1388
    mov  [listy],54
1355
    mov  eax,[procinfo.y_size]
1389
    mov  eax,[procinfo.y_size]
1356
    sub  eax,[listy]
1390
    sub  eax,[listy]
1357
    sub  eax,34
1391
    sub  eax,34
1358
    mov  [listysize],eax
1392
    mov  [listysize],eax
1359
isb9:
1393
isb9:
1360
 
1394
 
1361
 
1395
 
1362
;Draw only browser components
1396
;Draw only browser components
1363
    cmp  [browser],dword 1 ;it's browser
1397
    cmp  [browser],dword 1 ;it's browser
1364
    jne  nob2
1398
    jne  nob2
1365
 
1399
 
1366
    mov  eax,[sc.grab_text]        ; color of text RRGGBB
1400
    mov  eax,[sc.grab_text]	 ; color of text RRGGBB
1367
    or   eax,0x10000000
1401
    or	     eax,0x10000000
1368
    label 8,8,'SYSTEM X-TREE FILE BROWSER',eax
1402
    glabel 8,8,'SYSTEM X-TREE FILE BROWSER',eax
1369
 
1403
 
1370
;Draw buttons headers
1404
;Draw buttons headers
1371
    mov  eax,8
1405
    mov  eax,8
1372
    mov  ebx,8*65536+(6*8-1) ;start pos x
1406
    mov  ebx,8*65536+(6*8-1) ;start pos x
1373
    mov  ecx,23*65536+10      ;start pos y
1407
    mov  ecx,23*65536+10      ;start pos y
1374
    mov  edx,22;+1000000000000000000000000000000b  ;spoke butt
1408
    mov  edx,22;+1000000000000000000000000000000b  ;spoke butt
1375
    mov  edi,3                ;draw 13 button's
1409
    mov  edi,3		  ;draw 13 button's
1376
    mov  esi,0x00339933
1410
    mov  esi,0x00339933
1377
    int  0x40
1411
    int  0x40
1378
    dec edi
1412
    dec edi
1379
nexthbut:
1413
nexthbut:
1380
    add  ebx,(6*8)*65536
1414
    add  ebx,(6*8)*65536
1381
    inc  edx
1415
    inc  edx
1382
    int  0x40
1416
    int  0x40
1383
    dec  edi
1417
    dec  edi
1384
    jnz  nexthbut
1418
    jnz  nexthbut
1385
 
1419
 
1386
;DRAW PARTITION BUTTONS
1420
;DRAW PARTITION BUTTONS
1387
    mov  eax,8
1421
    mov  eax,8
1388
    mov  ebx,340*65536+5 ;start pos x
1422
    mov  ebx,340*65536+5 ;start pos x
1389
    mov  ecx,24*65536+8      ;start pos y
1423
    mov  ecx,24*65536+8      ;start pos y
1390
    mov  edx,80;+1000000000000000000000000000000b  ;spoke butt
1424
    mov  edx,80;+1000000000000000000000000000000b  ;spoke butt
1391
    mov  edi,4                ;draw 13 button's
1425
    mov  edi,4		  ;draw 13 button's
1392
    mov  esi,0x00339933
1426
    mov  esi,0x00339933
1393
    int  0x40
1427
    int  0x40
1394
    dec edi
1428
    dec edi
1395
nextpbut:
1429
nextpbut:
1396
    add  ebx,6*65536
1430
    add  ebx,6*65536
1397
    inc  edx
1431
    inc  edx
1398
    int  0x40
1432
    int  0x40
1399
    dec  edi
1433
    dec  edi
1400
    jnz  nextpbut
1434
    jnz  nextpbut
1401
 
1435
 
1402
;DRAW PARTITON TEXT
1436
;DRAW PARTITON TEXT
1403
    label 341,25,'1234',cl_White;Black
1437
    glabel 341,25,'1234',cl_White;Black
1404
 
1438
 
1405
;File STRING
1439
;File STRING
1406
    label 8,25,'  FILE    VIEW    INFO  ',  ;cl_White ;Black
1440
    glabel 8,25,'  FILE    VIEW    INFO  ',  ;cl_White ;Black
1407
 
1441
 
1408
;BlackLine
1442
;BlackLine
1409
    mov eax,[procinfo.x_size]
1443
    mov eax,[procinfo.x_size]
1410
    sub eax,10
1444
    sub eax,10
1411
    drawfbox 5,35, eax, 1, cl_Black
1445
    drawfbox 5,35, eax, 1, cl_Black
1412
 
1446
 
1413
;BlackLine2
1447
;BlackLine2
1414
    mov eax,[procinfo.x_size]
1448
    mov eax,[procinfo.x_size]
1415
    sub eax,10
1449
    sub eax,10
1416
    drawfbox 5,68, eax, 1, cl_Black
1450
    drawfbox 5,68, eax, 1, cl_Black
1417
 
1451
 
1418
;BlackLine2 vertical
1452
;BlackLine2 vertical
1419
;    mov eax,[procinfo.y_size]
1453
;    mov eax,[procinfo.y_size]
1420
;    sub eax,69+4
1454
;    sub eax,69+4
1421
;    drawfbox 115, 69, 1, eax, cl_Black
1455
;    drawfbox 115, 69, 1, eax, cl_Black
1422
 
1456
 
1423
;Set logo img
1457
;Set logo img
1424
    setimg 34,88,logoinfimg
1458
    setimg 34,88,logoinfimg
1425
    label 20,165,'SYSTEM X-TREE',cl_Black
1459
    glabel 20,165,'SYSTEM X-TREE',cl_Black
1426
    add  ebx,10
1460
    add  ebx,10
1427
    label ,,'FOR  MENUETOS',
1461
    glabel ,,'FOR  MENUETOS',
1428
 
1462
 
1429
    add  ebx,9*65536+20
1463
    add  ebx,9*65536+20
1430
    label ,,'welcome to',cl_Green
1464
    glabel ,,'welcome to',cl_Green
1431
    add  ebx,-15*65536+10
1465
    add  ebx,-15*65536+10
1432
    label ,,'www.menuetos.org',cl_Green
1466
    glabel ,,'www.menuetos.org',cl_Green
1433
 
1467
 
1434
;    label ,,'Create by',cl_Green
1468
;    glabel ,,'Create by',cl_Green
1435
;    add  ebx,10
1469
;    add  ebx,10
1436
;    label ,,'   Pavlushin',
1470
;    glabel ,,'   Pavlushin',
1437
;    add  ebx,10
1471
;    add  ebx,10
1438
;    label ,,'       Evgeni',
1472
;    glabel ,,'       Evgeni',
1439
 
1473
 
1440
 
1474
 
1441
;Draw head->file buttons
1475
;Draw head->file buttons
1442
    cmp [drawhf],1
1476
    cmp [drawhf],1
1443
    jne  no_drawhf
1477
    jne  no_drawhf
1444
    mov  ebx,8*65536+6*12 ;start pos x
1478
    mov  ebx,8*65536+6*12 ;start pos x
1445
    mov  ecx,35*65536+10      ;start pos y
1479
    mov  ecx,35*65536+10      ;start pos y
1446
    mov  edx,30  ;spoke butt
1480
    mov  edx,30  ;spoke butt
1447
    mov  edi,8                ;draw 4 button's
1481
    mov  edi,8		  ;draw 4 button's
1448
    mov  esi,cl_Grey
1482
    mov  esi,cl_Grey
1449
    call menubutton
1483
    call menubutton
1450
no_drawhf:
1484
no_drawhf:
1451
 
1485
 
1452
;Draw head->view buttons
1486
;Draw head->view buttons
1453
    cmp [drawhv],1
1487
    cmp [drawhv],1
1454
    jne  no_drawhv
1488
    jne  no_drawhv
1455
    mov  ebx,(8+6*8)*65536+6*12 ;start pos x
1489
    mov  ebx,(8+6*8)*65536+6*12 ;start pos x
1456
    mov  ecx,35*65536+10      ;start pos y
1490
    mov  ecx,35*65536+10      ;start pos y
1457
    mov  edx,40  ;spoke butt
1491
    mov  edx,40  ;spoke butt
1458
    mov  edi,6                ;draw 4 button's
1492
    mov  edi,6		  ;draw 4 button's
1459
    mov  esi,cl_Grey
1493
    mov  esi,cl_Grey
1460
    call menubutton
1494
    call menubutton
1461
no_drawhv:
1495
no_drawhv:
1462
 
1496
 
1463
;Draw head->info buttons
1497
;Draw head->info buttons
1464
    cmp [drawhi],1
1498
    cmp [drawhi],1
1465
    jne  no_drawhi
1499
    jne  no_drawhi
1466
    mov  ebx,(8+12*8)*65536+6*12 ;start pos x
1500
    mov  ebx,(8+12*8)*65536+6*12 ;start pos x
1467
    mov  ecx,35*65536+10      ;start pos y
1501
    mov  ecx,35*65536+10      ;start pos y
1468
    mov  edx,50  ;spoke butt
1502
    mov  edx,50  ;spoke butt
1469
    mov  edi,2                ;draw 2 button's
1503
    mov  edi,2		  ;draw 2 button's
1470
    mov  esi,cl_Grey
1504
    mov  esi,cl_Grey
1471
    call menubutton
1505
    call menubutton
1472
no_drawhi:
1506
no_drawhi:
1473
 
1507
 
1474
nob2:
1508
nob2:
1475
 
1509
 
1476
;Draw buttons instruments
1510
;Draw buttons instruments
1477
    mov  eax,8
1511
    mov  eax,8
1478
    cmp  [browser],dword 1 ;it's browser
1512
    cmp  [browser],dword 1 ;it's browser
1479
    jne  nob3
1513
    jne  nob3
1480
    mov  ebx,10*65536+16+5 ;start pos x
1514
    mov  ebx,10*65536+16+5 ;start pos x
1481
    mov  ecx,37*65536+15      ;start pos y
1515
    mov  ecx,37*65536+15      ;start pos y
1482
    jmp isb3
1516
    jmp isb3
1483
nob3:
1517
nob3:
1484
    mov  ebx,16*65536+16+5 ;start pos x
1518
    mov  ebx,16*65536+16+5 ;start pos x
1485
    mov  ecx,29*65536+15      ;start pos y
1519
    mov  ecx,29*65536+15      ;start pos y
1486
isb3:
1520
isb3:
1487
    mov  edx,8;+1000000000000000000000000000000b  ;spoke butt
1521
    mov  edx,8;+1000000000000000000000000000000b  ;spoke butt
1488
    mov  edi,13                ;draw 13 button's
1522
    mov  edi,13        ;draw 13 button's
1489
    mov  esi,cl_Grey
1523
    mov  esi,cl_Grey
1490
    int  0x40
1524
    int  0x40
1491
    dec edi
1525
    dec edi
1492
nextbut:
1526
nextbut:
1493
    add  ebx,(16+6)*65536
1527
    add  ebx,(16+6)*65536
1494
    inc  edx
1528
    inc  edx
1495
    int  0x40
1529
    int  0x40
1496
    dec  edi
1530
    dec  edi
1497
    jnz  nextbut
1531
    jnz  nextbut
1498
 
1532
 
1499
 
1533
 
1500
    cmp  [browser],dword 1 ;it's browser
1534
    cmp  [browser],dword 1 ;it's browser
1501
    jne  nob4
1535
    jne  nob4
1502
;But img browser
1536
;But img browser
1503
    setimg 10,37,butimg
1537
    setimg 10,37,butimg
1504
;left logo
1538
;left logo
1505
    add eax,[procinfo.x_size]
1539
    add eax,[procinfo.x_size]
1506
    sub eax,80
1540
    sub eax,80
1507
    mov [temp],eax
1541
    mov [temp],eax
1508
    setimg [temp],37,logoimg
1542
    setimg [temp],37,logoimg
1509
    jmp isb4
1543
    jmp isb4
1510
nob4:
1544
nob4:
1511
;But img dialog
1545
;But img dialog
1512
    setimg 16,29,butimg
1546
    setimg 16,29,butimg
1513
isb4:
1547
isb4:
1514
 
1548
 
1515
    cmp  [browser],dword 1 ;it's browser
1549
    cmp  [browser],dword 1 ;it's browser
1516
    jne  nob5
1550
    jne  nob5
1517
 
1551
 
1518
    mov [urlx],48
1552
    mov [urlx],48
1519
    mov [urly],55
1553
    mov [urly],55
1520
    mov eax,[procinfo.x_size]
1554
    mov eax,[procinfo.x_size]
1521
    sub eax,48+10
1555
    sub eax,48+10
1522
    mov [urlxsize],eax
1556
    mov [urlxsize],eax
1523
    mov [urlysize],12
1557
    mov [urlysize],12
1524
 
1558
 
1525
    label 20,57,"URL:",cl_Black
1559
    glabel 20,57,"URL:",cl_Black
1526
 
1560
 
1527
;Out view mode info
1561
;Out view mode info
1528
    mov eax,[viewmode]
1562
    mov eax,[viewmode]
1529
    mov ebx,16
1563
    mov ebx,16
1530
    mul ebx
1564
    mul ebx
1531
    mov edx,eax
1565
    mov edx,eax
1532
    mov eax,4
1566
    mov eax,4
1533
    mov ebx,180*65536+25
1567
    mov ebx,180*65536+25
1534
    mov ecx,cl_Black
1568
    mov ecx,cl_Black
1535
    add edx,modetext
1569
    add edx,modetext
1536
    mov esi,16
1570
    mov esi,16
1537
    int 0x40
1571
    int 0x40
1538
 
1572
 
1539
;List size
1573
;List size
1540
    outcount [listsize],294,25,cl_Black,4*65536
1574
    outcount [listsize],294,25,cl_Black,4*65536
1541
    jmp isb5
1575
    jmp isb5
1542
 
1576
 
1543
head_dlg: db 'OPEN FILE'
1577
head_dlg: db 'OPEN FILE'
1544
          db 'SAVE FILE'
1578
      db 'SAVE FILE'
1545
but_dlg:  db 'OPEN'
1579
but_dlg:  db 'OPEN'
1546
          db 'SAVE'
1580
      db 'SAVE'
1547
 
1581
 
1548
nob5:
1582
nob5:
1549
 
1583
 
1550
    mov [urlx],10
1584
    mov [urlx],10
1551
    mov eax,[procinfo.y_size]
1585
    mov eax,[procinfo.y_size]
1552
    sub eax,24
1586
    sub eax,24
1553
    mov [urly],eax
1587
    mov [urly],eax
1554
    mov eax,[procinfo.x_size]
1588
    mov eax,[procinfo.x_size]
1555
    sub eax,80
1589
    sub eax,80
1556
    mov [urlxsize],eax
1590
    mov [urlxsize],eax
1557
    mov [urlysize],12
1591
    mov [urlysize],12
1558
 
1592
 
1559
    cmp byte [dlg_type],'O'     ;if byte O - is Open dialog
1593
    cmp byte [dlg_type],'O'    ;if byte O - is Open dialog
1560
    jne no_openh
1594
    jne no_openh
1561
    mov edx,head_dlg          ;draw in head OPEN FILE
1595
    mov edx,head_dlg	      ;draw in head OPEN FILE
1562
    jmp out_laby
1596
    jmp out_laby
1563
no_openh:
1597
no_openh:
1564
    cmp byte [dlg_type],'S'     ;if byte S - is Save dialog
1598
    cmp byte [dlg_type],'S'    ;if byte S - is Save dialog
1565
    jne no_saveh
1599
    jne no_saveh
1566
    mov edx,head_dlg+9        ;draw in head SAVE FILE
1600
    mov edx,head_dlg+9	      ;draw in head SAVE FILE
1567
out_laby:
1601
out_laby:
1568
    mov ebx,8*65536+8
1602
    mov ebx,8*65536+8
1569
    mov ecx,[sc.grab_text]        ; color of text RRGGBB
1603
    mov ecx,[sc.grab_text]    ; color of text RRGGBB
1570
    or  ecx,0x10000000
1604
    or	    ecx,0x10000000
1571
    mov esi,9
1605
    mov esi,9
1572
    mov eax,4
1606
    mov eax,4
1573
    int 0x40
1607
    int 0x40
1574
no_saveh:
1608
no_saveh:
1575
 
1609
 
1576
 
1610
 
1577
;Draw OPEN\SAVE button
1611
;Draw OPEN\SAVE button
1578
    mov ebx,0*65536+50
1612
    mov ebx,0*65536+50
1579
    mov ecx,0*65536+12
1613
    mov ecx,0*65536+12
1580
    mov eax,[procinfo.x_size]
1614
    mov eax,[procinfo.x_size]
1581
    sub eax,63
1615
    sub eax,63
1582
    shl eax,16
1616
    shl eax,16
1583
    add ebx,eax
1617
    add ebx,eax
1584
    mov eax,[procinfo.y_size]
1618
    mov eax,[procinfo.y_size]
1585
    sub eax,25
1619
    sub eax,25
1586
    shl eax,16
1620
    shl eax,16
1587
    add ecx,eax
1621
    add ecx,eax
1588
    mov  eax,8
1622
    mov  eax,8
1589
    mov  edx,5 ;button ID
1623
    mov  edx,5 ;button ID
1590
    mov  esi,0x006699aa  ;gradient!!!
1624
    mov  esi,0x006699aa  ;gradient!!!
1591
    int  0x40
1625
    int  0x40
1592
 
1626
 
1593
; label OPEN or SAVE
1627
; label OPEN or SAVE
1594
    mov ebx,[procinfo.x_size]
1628
    mov ebx,[procinfo.x_size]
1595
    sub ebx,48
1629
    sub ebx,48
1596
    mov eax,[procinfo.y_size]
1630
    mov eax,[procinfo.y_size]
1597
    sub eax,22
1631
    sub eax,22
1598
    shl ebx,16
1632
    shl ebx,16
1599
    add ebx,eax
1633
    add ebx,eax
1600
 
1634
 
1601
    cmp byte [dlg_type],'O'     ;if byte O - is Open dialog
1635
    cmp byte [dlg_type],'O'    ;if byte O - is Open dialog
1602
    jne no_openb
1636
    jne no_openb
1603
    mov edx,but_dlg          ;draw in head OPEN FILE
1637
    mov edx,but_dlg	   ;draw in head OPEN FILE
1604
    jmp out_labx
1638
    jmp out_labx
1605
no_openb:
1639
no_openb:
1606
    cmp byte [dlg_type],'S'     ;if byte S - is Save dialog
1640
    cmp byte [dlg_type],'S'    ;if byte S - is Save dialog
1607
    jne no_saveb
1641
    jne no_saveb
1608
    mov edx,but_dlg+4        ;draw in head SAVE FILE
1642
    mov edx,but_dlg+4	       ;draw in head SAVE FILE
1609
out_labx:
1643
out_labx:
1610
    mov ecx,cl_White
1644
    mov ecx,cl_White
1611
    mov esi,4
1645
    mov esi,4
1612
    mov eax,4
1646
    mov eax,4
1613
    int 0x40
1647
    int 0x40
1614
no_saveb:
1648
no_saveb:
1615
 
1649
 
1616
isb5:
1650
isb5:
1617
 
1651
 
1618
anti_flick:
1652
anti_flick:
1619
 
1653
 
1620
    cmp [flick],2
1654
    cmp [flick],2
1621
    je draw_url
1655
    je draw_url
1622
    cmp [flick],0
1656
    cmp [flick],0
1623
    jne no_flick_url
1657
    jne no_flick_url
1624
 
1658
 
1625
;***************************
1659
;***************************
1626
;    DRAW URL LINE
1660
;    DRAW URL LINE
1627
;***************************
1661
;***************************
1628
draw_url:
1662
draw_url:
1629
 
1663
 
1630
;Draw URL focus button
1664
;Draw URL focus button
1631
    mov ebx,[urlx]
1665
    mov ebx,[urlx]
1632
    shl ebx,16
1666
    shl ebx,16
1633
    add ebx,[urlxsize]
1667
    add ebx,[urlxsize]
1634
    mov ecx,[urly]
1668
    mov ecx,[urly]
1635
    shl ecx,16
1669
    shl ecx,16
1636
    add ecx,[urlysize]
1670
    add ecx,[urlysize]
1637
    dec ebx
1671
    dec ebx
1638
    dec ecx
1672
    dec ecx
1639
    mov  eax,8
1673
    mov  eax,8
1640
    mov  edx,2 ;button ID
1674
    mov  edx,2 ;button ID
1641
    mov  esi,0x00aaaaaa  ;gradient!!!
1675
    mov  esi,0x00aaaaaa  ;gradient!!!
1642
    int  0x40
1676
    int  0x40
1643
 
1677
 
1644
;Draw URL String
1678
;Draw URL String
1645
    mov eax,13
1679
    mov eax,13
1646
    mov edx,cl_Black
1680
    mov edx,cl_Black
1647
    int 0x40
1681
    int 0x40
1648
    add ebx,1*65536-2+1
1682
    add ebx,1*65536-2+1
1649
    add ecx,1*65536-2+1
1683
    add ecx,1*65536-2+1
1650
    mov edx,cl_White
1684
    mov edx,cl_White
1651
    int 0x40
1685
    int 0x40
1652
 
1686
 
1653
;Draw URL Cursor
1687
;Draw URL Cursor
1654
    mov eax,6
1688
    mov eax,6
1655
    mul [cursor]
1689
    mul [cursor]
1656
    mov ebx,[urlx]
1690
    mov ebx,[urlx]
1657
    add ebx,eax
1691
    add ebx,eax
1658
    shl ebx,16
1692
    shl ebx,16
1659
    add ebx,2*65536+1
1693
    add ebx,2*65536+1
1660
    mov ecx,[urly]
1694
    mov ecx,[urly]
1661
    shl ecx,16
1695
    shl ecx,16
1662
    add ecx,[urlysize]
1696
    add ecx,[urlysize]
1663
    add ecx,2*65536-4
1697
    add ecx,2*65536-4
1664
    mov eax,13
1698
    mov eax,13
1665
    mov edx,cl_Black
1699
    mov edx,cl_Black
1666
    int 0x40
1700
    int 0x40
1667
 
1701
 
1668
; OUT TEXT
1702
; OUT TEXT
1669
    mov eax,[urlxsize]  ;calculating text leight
1703
    mov eax,[urlxsize]	    ;calculating text leight
1670
    sub eax,8
1704
    sub eax,8
1671
    mov ebx,6
1705
    mov ebx,6
1672
    div ebx
1706
    div ebx
1673
    mov esi,eax
1707
    mov esi,eax
1674
 
1708
 
1675
    mov  ebx,[urlx]
1709
    mov  ebx,[urlx]
1676
    shl  ebx,16
1710
    shl  ebx,16
1677
    add  ebx,[urly]
1711
    add  ebx,[urly]
1678
    add  ebx,3*65536+2
1712
    add  ebx,3*65536+2
1679
    mov  eax,4                     ; function 4 : write text to window
1713
    mov  eax,4		   ; function 4 : write text to window
1680
    mov  ecx,0x00000000 ;[sc.grab_text] ; color of text RRGGBB
1714
    mov  ecx,0x00000000 ;[sc.grab_text] ; color of text RRGGBB
1681
    mov  edx,path                  ; pointer to text beginning
1715
    mov  edx,path	 ; pointer to text beginning
1682
    int  0x40
1716
    int  0x40
1683
 
1717
 
1684
    cmp  [flick],2
1718
    cmp  [flick],2
1685
    jne  no_flick_url
1719
    jne  no_flick_url
1686
    mov  [flick],0
1720
    mov  [flick],0
1687
    jmp  still
1721
    jmp  still
1688
no_flick_url:
1722
no_flick_url:
1689
 
1723
 
1690
 
1724
 
1691
;***************************
1725
;***************************
1692
;    DRAW FILE LIST
1726
;    DRAW FILE LIST
1693
;***************************
1727
;***************************
1694
 
1728
 
1695
;Draw Scroll Line
1729
;Draw Scroll Line
1696
    mov eax,13
1730
    mov eax,13
1697
 
1731
 
1698
    mov ebx,[listx]
1732
    mov ebx,[listx]
1699
    add ebx,[listxsize]
1733
    add ebx,[listxsize]
1700
    sub ebx,[scrollsize]
1734
    sub ebx,[scrollsize]
1701
    shl ebx,16
1735
    shl ebx,16
1702
    add ebx,dword [scrollsize]
1736
    add ebx,dword [scrollsize]
1703
    mov ecx,[listy]
1737
    mov ecx,[listy]
1704
    add ecx,[scrollbutsize]
1738
    add ecx,[scrollbutsize]
1705
    shl ecx,16
1739
    shl ecx,16
1706
    add ecx,[listysize]
1740
    add ecx,[listysize]
1707
    sub ecx,[scrollbutsize]
1741
    sub ecx,[scrollbutsize]
1708
    sub ecx,[scrollbutsize]
1742
    sub ecx,[scrollbutsize]
1709
    mov edx,[scrollcolor] ;0x00006600
1743
    mov edx,[scrollcolor] ;0x00006600
1710
    int 0x40
1744
    int 0x40
1711
 
1745
 
1712
;Draw Scroll Box
1746
;Draw Scroll Box
1713
    mov  edx,0
1747
    mov  edx,0
1714
    mov  eax,[listysize]
1748
    mov  eax,[listysize]
1715
    sub  eax,2
1749
    sub  eax,2
1716
    mov  ebx,dword 10
1750
    mov  ebx,dword 10
1717
    div  ebx
1751
    div  ebx
1718
 
1752
 
1719
    mov edx,0
1753
    mov edx,0
1720
    mov ebx,eax
1754
    mov ebx,eax
1721
    cmp ebx,[listsize]  ;filelistsize in ebx
1755
    cmp ebx,[listsize]	    ;filelistsize in ebx
1722
    ja  notusescroll
1756
    ja	    notusescroll
1723
;usescroll
1757
;usescroll
1724
    mov eax,[listysize]
1758
    mov eax,[listysize]
1725
    sub eax,[scrollbutsize]
1759
    sub eax,[scrollbutsize]
1726
    sub eax,[scrollbutsize]
1760
    sub eax,[scrollbutsize]
1727
    shl eax,16
1761
    shl eax,16
1728
    div dword [listsize]
1762
    div dword [listsize]
1729
    mul ebx
1763
    mul ebx
1730
    shr eax,16
1764
    shr eax,16
1731
    mov esi,[mousey]
1765
    mov esi,[mousey]
1732
    shl esi,16
1766
    shl esi,16
1733
    add esi,eax
1767
    add esi,eax
1734
 
1768
 
1735
    mov eax,13
1769
    mov eax,13
1736
    mov ebx,[listx]
1770
    mov ebx,[listx]
1737
    add ebx,[listxsize]
1771
    add ebx,[listxsize]
1738
    sub ebx,[scrollsize]
1772
    sub ebx,[scrollsize]
1739
    shl ebx,16
1773
    shl ebx,16
1740
    add ebx,dword [scrollsize]
1774
    add ebx,dword [scrollsize]
1741
    mov ecx,[listy]
1775
    mov ecx,[listy]
1742
    add ecx,[scrollbutsize]
1776
    add ecx,[scrollbutsize]
1743
    shl ecx,16
1777
    shl ecx,16
1744
    add ecx,esi
1778
    add ecx,esi
1745
    mov edx,[scrollboxcol]
1779
    mov edx,[scrollboxcol]
1746
    int 0x40
1780
    int 0x40
1747
notusescroll:
1781
notusescroll:
1748
 
1782
 
1749
 
1783
 
1750
;Draw list button for get file name
1784
;Draw list button for get file name
1751
    mov  ebx,[listx]
1785
    mov  ebx,[listx]
1752
    shl  ebx,16
1786
    shl  ebx,16
1753
    add  ebx,[listxsize]
1787
    add  ebx,[listxsize]
1754
    sub  ebx,15              ;right free zone
1788
    sub  ebx,15      ;right free zone
1755
    sub  ebx,[scrollsize]
1789
    sub  ebx,[scrollsize]
1756
    mov  ecx,[listy]
1790
    mov  ecx,[listy]
1757
    shl  ecx,16
1791
    shl  ecx,16
1758
    add  ecx,[listysize]
1792
    add  ecx,[listysize]
1759
 
1793
 
1760
    mov  eax,8
1794
    mov  eax,8
1761
    mov  edx,4+1000000000000000000000000000000b  ;spoke butt
1795
    mov  edx,4+1000000000000000000000000000000b  ;spoke butt
1762
    int  0x40
1796
    int  0x40
1763
 
1797
 
1764
    add  ebx,15
1798
    add  ebx,15
1765
    mov  eax,13
1799
    mov  eax,13
1766
    mov  edx,[listcolor] ;ffffff
1800
    mov  edx,[listcolor] ;ffffff
1767
    int  0x40
1801
    int  0x40
1768
 
1802
 
1769
;Draw up/down buttons
1803
;Draw up/down buttons
1770
    mov  ebx,[listx]
1804
    mov  ebx,[listx]
1771
    add  ebx,[listxsize]
1805
    add  ebx,[listxsize]
1772
    sub  ebx,[scrollsize]
1806
    sub  ebx,[scrollsize]
1773
    shl  ebx,16
1807
    shl  ebx,16
1774
    add  ebx,[scrollsize]
1808
    add  ebx,[scrollsize]
1775
    mov  ecx,[listy]
1809
    mov  ecx,[listy]
1776
    shl  ecx,16
1810
    shl  ecx,16
1777
    add  ecx,[scrollbutsize]
1811
    add  ecx,[scrollbutsize]
1778
    dec  ecx     ;correction
1812
    dec  ecx	 ;correction
1779
    mov  eax,8
1813
    mov  eax,8
1780
    mov  edx,6+1000000000000000000000000000000b  ;spoke butt
1814
    mov  edx,6+1000000000000000000000000000000b  ;spoke butt
1781
    int  0x40
1815
    int  0x40
1782
 
1816
 
1783
    inc  ecx
1817
    inc  ecx
1784
    mov  eax,13
1818
    mov  eax,13
1785
    mov  edx,[scrollbutcol] ;ffffff
1819
    mov  edx,[scrollbutcol] ;ffffff
1786
    int  0x40
1820
    int  0x40
1787
 
1821
 
1788
; Draw image on up button
1822
; Draw image on up button
1789
    pushad
1823
    pushad
1790
    shr  ebx,16
1824
    shr  ebx,16
1791
    mov  edx,ebx
1825
    mov  edx,ebx
1792
    shl  edx,16
1826
    shl  edx,16
1793
    shr  ecx,16
1827
    shr  ecx,16
1794
    add  edx,ecx
1828
    add  edx,ecx
1795
    mov  ecx,8*65536+9
1829
    mov  ecx,8*65536+9
1796
    mov  ebx,upsb+8
1830
    mov  ebx,upsb+8
1797
    mov  eax,7
1831
    mov  eax,7
1798
    int  0x40
1832
    int  0x40
1799
    popad
1833
    popad
1800
 
1834
 
1801
 
1835
 
1802
    dec  ecx     ;correction
1836
    dec  ecx	 ;correction
1803
    mov  edx,7+1000000000000000000000000000000b  ;spoke butt
1837
    mov  edx,7+1000000000000000000000000000000b  ;spoke butt
1804
    mov  eax,[listysize]
1838
    mov  eax,[listysize]
1805
    sub  eax,[scrollbutsize]
1839
    sub  eax,[scrollbutsize]
1806
    shl  eax,16
1840
    shl  eax,16
1807
    add  ecx,eax
1841
    add  ecx,eax
1808
 
1842
 
1809
    mov  eax,8
1843
    mov  eax,8
1810
    int  0x40
1844
    int  0x40
1811
 
1845
 
1812
    inc  ecx
1846
    inc  ecx
1813
    mov  eax,13
1847
    mov  eax,13
1814
    mov  edx,[scrollbutcol] ;ffffff
1848
    mov  edx,[scrollbutcol] ;ffffff
1815
    int  0x40
1849
    int  0x40
1816
 
1850
 
1817
; Draw image on down button
1851
; Draw image on down button
1818
    pushad
1852
    pushad
1819
    shr  ebx,16
1853
    shr  ebx,16
1820
    mov  edx,ebx
1854
    mov  edx,ebx
1821
    shl  edx,16
1855
    shl  edx,16
1822
    shr  ecx,16
1856
    shr  ecx,16
1823
    add  edx,ecx
1857
    add  edx,ecx
1824
    mov  ecx,8*65536+9
1858
    mov  ecx,8*65536+9
1825
    mov  ebx,dnsb+8
1859
    mov  ebx,dnsb+8
1826
    mov  eax,7
1860
    mov  eax,7
1827
    int  0x40
1861
    int  0x40
1828
    popad
1862
    popad
1829
 
1863
 
1830
 
1864
 
1831
; Draw text in file list
1865
; Draw text in file list
1832
 
1866
 
1833
    mov  eax,[listxsize]
1867
    mov  eax,[listxsize]
1834
    sub  eax,40*6  ;leight of string
1868
    sub  eax,40*6  ;leight of string
1835
    shr  eax,1
1869
    shr  eax,1
1836
    add  eax,[listx]
1870
    add  eax,[listx]
1837
    shl  eax,16
1871
    shl  eax,16
1838
    add  eax,[listy]
1872
    add  eax,[listy]
1839
    add  eax,2
1873
    add  eax,2
1840
 
1874
 
1841
    mov  [filelistxy],eax ;dword 19*65536+58
1875
    mov  [filelistxy],eax ;dword 19*65536+58
1842
 
1876
 
1843
    mov  edx,0
1877
    mov  edx,0
1844
    mov  eax,[listysize]
1878
    mov  eax,[listysize]
1845
    sub  eax,2
1879
    sub  eax,2
1846
    mov  ebx,dword 10
1880
    mov  ebx,dword 10
1847
    div  ebx
1881
    div  ebx
1848
    mov  [filelistsize],eax  ;dword 40
1882
    mov  [filelistsize],eax  ;dword 40
1849
 
1883
 
1850
; OUT FILE DATA
1884
; OUT FILE DATA
1851
    mov  eax,[filecursor]           ;calc cursor position
1885
    mov  eax,[filecursor]     ;calc cursor position
1852
    mov  ebx,62
1886
    mov  ebx,62
1853
    mul  ebx
1887
    mul  ebx
1854
 
1888
 
1855
;OUT TEXT
1889
;OUT TEXT
1856
    mov  ebp,4096 ; 16             ;out strings process
1890
    mov  ebp,4096 ; 16             ;out strings process
1857
    sub  ebp,[filecursor]
1891
    sub  ebp,[filecursor]
1858
    mov  edx,convinfo ;fileinfo+11
1892
    mov  edx,convinfo ;fileinfo+11
1859
    add  edx,eax
1893
    add  edx,eax
1860
    mov  ebx,dword [filelistxy]
1894
    mov  ebx,dword [filelistxy]
1861
loo:
1895
loo:
1862
    mov  ecx,0x00888888        ;for another file's color white
1896
    mov  ecx,0x00888888        ;for another file's color white
1863
    cmp  [edx+26],dword 'FOL ' ;folder yellow
1897
    cmp  [edx+26],dword 'FOL ' ;folder yellow
1864
    jne  nb
1898
    jne  nb
1865
    mov  ecx,0x00006666
1899
    mov  ecx,0x00006666
1866
    jmp cset1
1900
    jmp cset1
1867
nb:
1901
nb:
1868
    mov eax,[edx+8]
1902
    mov eax,[edx+8]
1869
;Color set
1903
;Color set
1870
    cmp  eax,dword '.TXT'  ;text's blue
1904
    cmp  eax,dword '.TXT'  ;text's blue
1871
    je  itx
1905
    je	    itx
1872
    cmp  eax,dword '.INC'
1906
    cmp  eax,dword '.INC'
1873
    je  itx
1907
    je	    itx
1874
    cmp  eax,dword '.ASM'
1908
    cmp  eax,dword '.ASM'
1875
    je  itx
1909
    je	    itx
-
 
1910
    cmp  eax,dword '.RTF'
-
 
1911
    je	    itx
1876
    jmp nt
1912
    jmp nt
1877
itx:
1913
itx:
1878
    mov  ecx,0x00446666
1914
    mov  ecx,0x00446666
1879
    jmp cset
1915
    jmp cset
1880
nt:
1916
nt:
1881
    cmp  eax,dword '.BMP'  ;picture's pure
1917
    cmp  eax,dword '.BMP'  ;picture's pure
1882
    je  ipic
1918
    je	    ipic
1883
    cmp  eax,dword '.JPG'
1919
    cmp  eax,dword '.JPG'
1884
    je  ipic
1920
    je	    ipic
1885
    cmp  eax,dword '.JPE'
1921
    cmp  eax,dword '.JPE'
1886
    je  ipic
1922
    je	    ipic
1887
    cmp  eax,dword '.GIF'
1923
    cmp  eax,dword '.GIF'
1888
    je  ipic
1924
    je	    ipic
1889
; //// Willow
1925
; //// Willow
1890
    cmp  eax,dword '.PNG'
1926
    cmp  eax,dword '.PNG'
1891
    je  ipic
1927
    je	ipic
1892
; //// Willow
1928
; //// Willow
1893
    cmp  eax,dword '.WAV'
1929
    cmp  eax,dword '.WAV'
1894
    je  ipic
1930
    je	    ipic
-
 
1931
    cmp  eax,dword '.MID'
-
 
1932
    je	    ipic
1895
    jmp np
1933
    jmp np
1896
ipic:
1934
ipic:
1897
    mov  ecx,0x00226688
1935
    mov  ecx,0x00226688
1898
    jmp cset
1936
    jmp cset
1899
np:
1937
np:
1900
    cmp  eax,dword '.   '  ;execute's green
1938
    cmp  eax,dword '.   '  ;execute's green
1901
    jne  nexec
1939
    jne  nexec
1902
    mov  ecx,0x00008866
1940
    mov  ecx,0x00008866
1903
    jmp cset
1941
    jmp cset
1904
nexec:
1942
nexec:
1905
cset:
1943
cset:
1906
 
1944
 
1907
cset1:
1945
cset1:
1908
    mov  esi,40 ;symbols out 62 ;32
1946
    mov  esi,40 ;symbols out 62 ;32
1909
    mov  eax,4
1947
    mov  eax,4
1910
    pushad
1948
    pushad
1911
    int  0x40
1949
    int  0x40
1912
;    popad
1950
;    popad
1913
 
1951
 
1914
;    pushad
1952
;    pushad
1915
    cmp  [edx+26],dword 'Fvol' ;volume label
1953
    cmp  [edx+26],dword 'Fvol' ;volume label
1916
    jne  no_volico
1954
    jne  no_volico
1917
    push hdico+8
1955
    push hdico+8
1918
    jmp out_ico
1956
    jmp out_ico
1919
no_volico:
1957
no_volico:
1920
    cmp  [edx+26],dword 'FOL '
1958
    cmp  [edx+26],dword 'FOL '
1921
    jne  no_folico
1959
    jne  no_folico
1922
    cmp  [edx+9],dword 'HARD'
1960
    cmp  [edx+9],dword 'HARD'
1923
    jne  no_hdico
1961
    jne  no_hdico
1924
    push hdico+8
1962
    push hdico+8
1925
    jmp out_ico
1963
    jmp out_ico
1926
no_hdico:
1964
no_hdico:
1927
    cmp  [edx+9],dword 'RAMD'
1965
    cmp  [edx+9],dword 'RAMD'
1928
    jne  no_rdico
1966
    jne  no_rdico
1929
    push rdico+8
1967
    push rdico+8
1930
    jmp out_ico
1968
    jmp out_ico
1931
no_rdico:
1969
no_rdico:
-
 
1970
    cmp  [edx+9],dword 'FLOP'
-
 
1971
    jne  no_fdico
-
 
1972
    push rdico+8
-
 
1973
    jmp out_ico
-
 
1974
no_fdico:
1932
    push folico+8
1975
    push folico+8
1933
    jmp out_ico
1976
    jmp out_ico
1934
no_folico:
1977
no_folico:
1935
    cmp  [edx+8],dword '.BMP'
1978
    cmp  [edx+8],dword '.BMP'
1936
    je   is_imgico
1979
    je	     is_imgico
1937
    cmp  [edx+8],dword '.JPG'
1980
    cmp  [edx+8],dword '.JPG'
1938
    je   is_imgico
1981
    je	     is_imgico
1939
    cmp  [edx+8],dword '.JPE'
1982
    cmp  [edx+8],dword '.JPE'
1940
    je   is_imgico
1983
    je	     is_imgico
1941
    cmp  [edx+8],dword '.GIF'
1984
    cmp  [edx+8],dword '.GIF'
1942
    je   is_imgico
1985
    je	     is_imgico
1943
; //// Willow
1986
; //// Willow
1944
    cmp  [edx+8],dword '.PNG'
1987
    cmp  [edx+8],dword '.PNG'
1945
    je   is_imgico
1988
    je	 is_imgico
1946
; //// Willow
1989
; //// Willow
1947
    cmp  [edx+8],dword '.WAV'
1990
    cmp  [edx+8],dword '.WAV'
1948
    je   is_imgico
1991
    je	     is_imgico
-
 
1992
    cmp  [edx+8],dword '.MID'
-
 
1993
    je	     is_imgico
1949
    jmp  no_imgico
1994
    jmp  no_imgico
1950
is_imgico:
1995
is_imgico:
1951
    push imgico+8
1996
    push imgico+8
1952
    jmp out_ico
1997
    jmp out_ico
1953
no_imgico:
1998
no_imgico:
1954
    cmp  [edx+8],dword '.ASM'
1999
    cmp  [edx+8],dword '.ASM'
1955
    je   is_asmincico
2000
    je	     is_asmincico
1956
    cmp  [edx+8],dword '.INC'
2001
    cmp  [edx+8],dword '.INC'
1957
    je   is_asmincico
2002
    je	     is_asmincico
1958
    jmp  no_asmincico
2003
    jmp  no_asmincico
1959
is_asmincico:
2004
is_asmincico:
1960
    push asmincico+8
2005
    push asmincico+8
1961
    jmp out_ico
2006
    jmp out_ico
1962
no_asmincico:
2007
no_asmincico:
-
 
2008
    cmp  [edx+8],dword '.RTF'
-
 
2009
    je	 @f
1963
    cmp  [edx+8],dword '.TXT'
2010
    cmp  [edx+8],dword '.TXT'
1964
    jne  no_txtico
2011
    jne  no_txtico
-
 
2012
 @@:
1965
    push txtico+8
2013
    push txtico+8
1966
    jmp out_ico
2014
    jmp out_ico
1967
no_txtico:
2015
no_txtico:
1968
    cmp  [edx+8],dword '.   '
2016
    cmp  [edx+8],dword '.   '
1969
    jne  no_execico
2017
    jne  no_execico
1970
    push execico+8
2018
    push execico+8
1971
    jmp out_ico
2019
    jmp out_ico
1972
no_execico:
2020
no_execico:
1973
    cmp  [edx+26],dword 'DAT '
2021
    cmp  [edx+26],dword 'DAT '
1974
    jne  no_datico
2022
    jne  no_datico
1975
    push datico+8
2023
    push datico+8
1976
    jmp out_ico
2024
    jmp out_ico
1977
no_datico:
2025
no_datico:
1978
    cmp  [edx+26],dword 'DEL '
2026
    cmp  [edx+26],dword 'DEL '
1979
    jne  no_out_ico
2027
    jne  no_out_ico
1980
    push delico+8
2028
    push delico+8
1981
    jmp out_ico
2029
    jmp out_ico
1982
out_ico:
2030
out_ico:
1983
 
2031
 
1984
    mov  edx,ebx
2032
    mov  edx,ebx
1985
    sub  edx,14*65536+1
2033
    sub  edx,14*65536+1
1986
    mov  ecx,12*65536+9
2034
    mov  ecx,12*65536+9
1987
;    mov  ebx,upsb+8
2035
;    mov  ebx,upsb+8
1988
    pop  ebx
2036
    pop  ebx
1989
    mov  eax,7
2037
    mov  eax,7
1990
    int  0x40
2038
    int  0x40
1991
no_out_ico:
2039
no_out_ico:
1992
    popad
2040
    popad
1993
 
2041
 
1994
 
2042
 
1995
    add  ebx,10
2043
    add  ebx,10
1996
noout:
2044
noout:
1997
    add  edx,62
2045
    add  edx,62
1998
 
2046
 
1999
    dec  [filelistsize]
2047
    dec  [filelistsize]
2000
    cmp  [filelistsize],dword 0
2048
    cmp  [filelistsize],dword 0
2001
    je   extloo
2049
    je	     extloo
2002
 
2050
 
2003
    dec  ebp
2051
    dec  ebp
2004
    jnz  loo
2052
    jnz  loo
2005
dext:
2053
dext:
2006
    mov [downstop],1
2054
    mov [downstop],1
2007
 
2055
 
2008
extloo:
2056
extloo:
2009
 
2057
 
2010
    cmp  [browser],dword 1 ;it's browser
2058
    cmp  [browser],dword 1 ;it's browser
2011
    jne  nob8
2059
    jne  nob8
2012
 
2060
 
2013
;Draw text for head->file buttons
2061
;Draw text for head->file buttons
2014
    cmp [drawhf],1
2062
    cmp [drawhf],1
2015
    jne  no_drawhftext
2063
    jne  no_drawhftext
2016
    drawfbox 8,35,(6*12)+1,11*8,0x00000000
2064
    drawfbox 8,35,(6*12)+1,11*8,0x00000000
2017
    drawfbox 9,36,(6*12)-1,(11*8)-2,0x00ffffff
2065
    drawfbox 9,36,(6*12)-1,(11*8)-2,0x00ffffff
2018
 
2066
 
2019
    mov edi,8
2067
    mov edi,8
2020
    mov ebx,9*65536+37
2068
    mov ebx,9*65536+37
2021
    mov ecx,cl_Black
2069
    mov ecx,cl_Black
2022
    mov edx,file_text_label
2070
    mov edx,file_text_label
2023
    call drawmenu
2071
    call drawmenu
2024
    jmp no_drawhftext
2072
    jmp no_drawhftext
2025
 
2073
 
2026
file_text_label:
2074
file_text_label:
2027
    db   '    Open    '
2075
    db	     '    Open    '
2028
    db   '    Copy    '
2076
    db	     '    Copy    '
2029
    db   '    Paste   '
2077
    db	     '    Paste   '
2030
    db   '   Delete   '
2078
    db	     '   Delete   '
2031
    db   '   Tinypad  '
2079
    db	     '   Tinypad  '
2032
    db   '    Edit    '
2080
    db	     '    Edit    '
2033
    db   '            '
2081
    db	     '            '
2034
    db   '    Exit    '
2082
    db	     '    Exit    '
2035
 
2083
 
2036
no_drawhftext:
2084
no_drawhftext:
2037
 
2085
 
2038
;Draw text for head->view buttons
2086
;Draw text for head->view buttons
2039
    cmp [drawhv],1
2087
    cmp [drawhv],1
2040
    jne  no_drawhvtext
2088
    jne  no_drawhvtext
2041
    drawfbox (8+6*8),35,(6*12)+1,(11*6),0x00000000
2089
    drawfbox (8+6*8),35,(6*12)+1,(11*6),0x00000000
2042
    drawfbox (9+6*8),36,(6*12)-1,(11*6)-2,0x00ffffff
2090
    drawfbox (9+6*8),36,(6*12)-1,(11*6)-2,0x00ffffff
2043
 
2091
 
2044
    mov edi,6 ;4
2092
    mov edi,6 ;4
2045
    mov ebx,(9+6*8)*65536+37
2093
    mov ebx,(9+6*8)*65536+37
2046
    mov ecx,cl_Black
2094
    mov ecx,cl_Black
2047
    mov edx,view_text_label
2095
    mov edx,view_text_label
2048
    call drawmenu
2096
    call drawmenu
2049
    jmp no_drawhvtext
2097
    jmp no_drawhvtext
2050
 
2098
 
2051
view_text_label:
2099
view_text_label:
2052
    db   '  Name sort '
2100
    db	     '  Name sort '
2053
    db   '  Ext. sort '
2101
    db	     '  Ext. sort '
2054
    db   '  Size sort '
2102
    db	     '  Size sort '
2055
    db   '  Date sort '
2103
    db	     '  Date sort '
2056
    db   '  Show DEL  '
2104
    db	     '  Show DEL  '
2057
    db   '  Fade DEL  '
2105
    db	     '  Fade DEL  '
2058
 
2106
 
2059
no_drawhvtext:
2107
no_drawhvtext:
2060
 
2108
 
2061
;Draw text for head->info buttons
2109
;Draw text for head->info buttons
2062
    cmp [drawhi],1
2110
    cmp [drawhi],1
2063
    jne  no_drawhitext
2111
    jne  no_drawhitext
2064
    drawfbox (8+12*8),35,(6*12)+1,(11*2),0x00000000
2112
    drawfbox (8+12*8),35,(6*12)+1,(11*2),0x00000000
2065
    drawfbox (9+12*8),36,(6*12)-1,(11*2)-2,0x00ffffff
2113
    drawfbox (9+12*8),36,(6*12)-1,(11*2)-2,0x00ffffff
2066
 
2114
 
2067
    mov edi,2
2115
    mov edi,2
2068
    mov eax,4
2116
    mov eax,4
2069
    mov ebx,(9+12*8)*65536+37
2117
    mov ebx,(9+12*8)*65536+37
2070
    mov ecx,cl_Black
2118
    mov ecx,cl_Black
2071
    mov edx,info_text_label
2119
    mov edx,info_text_label
2072
    call drawmenu
2120
    call drawmenu
2073
    jmp no_drawhitext
2121
    jmp no_drawhitext
2074
 
2122
 
2075
info_text_label:
2123
info_text_label:
2076
    db   '   Help     '
2124
    db	     '   Help     '
2077
    db   '   About    '
2125
    db	     '   About    '
2078
 
2126
 
2079
no_drawhitext:
2127
no_drawhitext:
2080
 
2128
 
2081
nob8:
2129
nob8:
2082
    cmp  [flick],1
2130
    cmp  [flick],1
2083
    jne  no_flick
2131
    jne  no_flick
2084
    mov  [flick],0
2132
    mov  [flick],0
2085
    jmp  still
2133
    jmp  still
2086
no_flick:
2134
no_flick:
2087
 
2135
 
2088
    mov  eax,12                    ; function 12:tell os about windowdraw
2136
    mov  eax,12        ; function 12:tell os about windowdraw
2089
    mov  ebx,2                     ; 2, end of draw
2137
    mov  ebx,2		   ; 2, end of draw
2090
    int  0x40
2138
    int  0x40
2091
 
2139
 
2092
    ret
2140
    ret
2093
 
2141
 
2094
;FILE LIST PARAMETRS
2142
;FILE LIST PARAMETRS
2095
 
2143
 
2096
listx     dd 15
2144
listx	    dd 15
2097
listy     dd 72
2145
listy	    dd 72
2098
listxsize dd 350
2146
listxsize dd 350
2099
listysize dd 41
2147
listysize dd 41
2100
 
2148
 
2101
filelistxy    dd 0
2149
filelistxy    dd 0
2102
filelistsize  dd 0
2150
filelistsize  dd 0
2103
scrollsize    dd 8
2151
scrollsize    dd 8
2104
listcolor     dd 0xffffff ;0xeeeeee
2152
listcolor     dd 0xffffff ;0xeeeeee
2105
scrollcolor   dd 0x778877
2153
scrollcolor   dd 0x778877
2106
scrollboxcol  dd 0x335533
2154
scrollboxcol  dd 0x335533
2107
scrollbutcol  dd 0x224422
2155
scrollbutcol  dd 0x224422
2108
scrollbutsize dd 9
2156
scrollbutsize dd 9
2109
usescroll     dd 1
2157
usescroll     dd 1
2110
 
2158
 
2111
;URL LINE PARAMETRS
2159
;URL LINE PARAMETRS
2112
 
2160
 
2113
urlx     dd 10
2161
urlx	 dd 10
2114
urly     dd 20
2162
urly	 dd 20
2115
urlxsize dd 350
2163
urlxsize dd 350
2116
urlysize dd 12
2164
urlysize dd 12
2117
 
2165
 
2118
 
2166
 
2119
drawmenu:
2167
drawmenu:
2120
    mov eax,4
2168
    mov eax,4
2121
    mov esi,12
2169
    mov esi,12
2122
menuloo:
2170
menuloo:
2123
    int 0x40
2171
    int 0x40
2124
    add ebx,11
2172
    add ebx,11
2125
    add edx,12
2173
    add edx,12
2126
    dec edi
2174
    dec edi
2127
    jnz menuloo
2175
    jnz menuloo
2128
    ret
2176
    ret
2129
 
2177
 
2130
menubutton:
2178
menubutton:
2131
    mov  eax,8
2179
    mov  eax,8
2132
nextmenubut:
2180
nextmenubut:
2133
    int  0x40
2181
    int  0x40
2134
    add  ecx,11*65536
2182
    add  ecx,11*65536
2135
    inc  edx
2183
    inc  edx
2136
    dec  edi
2184
    dec  edi
2137
    jnz  nextmenubut
2185
    jnz  nextmenubut
2138
    ret
2186
    ret
2139
 
2187
 
2140
;*****************************
2188
;*****************************
2141
; READ FILE STRUCTURE PROC
2189
; READ FILE STRUCTURE PROC
2142
;*****************************
2190
;*****************************
2143
 
2191
 
2144
read_directory:
2192
read_directory:
2145
 
2193
 
2146
; STEP 0 SEt TYPE OF SORT
2194
; STEP 0 SEt TYPE OF SORT
2147
 
2195
 
2148
    mov eax,[viewmode]
2196
    mov eax,[viewmode]
2149
;with no show del files
2197
;with no show del files
2150
    and eax,0FFFFFFFBh
2198
    and eax,0FFFFFFFBh
2151
    cmp eax,0
2199
    cmp eax,0
2152
    jnz no_sort_by_name
2200
    jnz no_sort_by_name
2153
    mov [start],0
2201
    mov [start],0
2154
    mov [x0],12
2202
    mov [x0],12
2155
    mov [x1],99
2203
    mov [x1],99
2156
    mov [x2],99
2204
    mov [x2],99
2157
    mov [x3],99
2205
    mov [x3],99
2158
    jmp sortset
2206
    jmp sortset
2159
 
2207
 
2160
no_sort_by_name:
2208
no_sort_by_name:
2161
    dec eax
2209
    dec eax
2162
    jnz  no_sort_by_ext
2210
    jnz  no_sort_by_ext
2163
    mov [start],9
2211
    mov [start],9
2164
    mov [x0],9
2212
    mov [x0],9
2165
    mov [x1],99
2213
    mov [x1],99
2166
    mov [x2],99
2214
    mov [x2],99
2167
    mov [x3],12
2215
    mov [x3],12
2168
    jmp sortset
2216
    jmp sortset
2169
 
2217
 
2170
no_sort_by_ext:
2218
no_sort_by_ext:
2171
    dec eax
2219
    dec eax
2172
    jnz  no_sort_by_size
2220
    jnz  no_sort_by_size
2173
    mov [start],30
2221
    mov [start],30
2174
    mov [x0],12
2222
    mov [x0],12
2175
    mov [x1],99
2223
    mov [x1],99
2176
    mov [x2],99
2224
    mov [x2],99
2177
    mov [x3],38
2225
    mov [x3],38
2178
    jmp sortset
2226
    jmp sortset
2179
 
2227
 
2180
no_sort_by_size:
2228
no_sort_by_size:
2181
    dec eax
2229
    dec eax
2182
    mov [start],21
2230
    mov [start],21
2183
    mov [x0],12
2231
    mov [x0],12
2184
    mov [x1],17
2232
    mov [x1],17
2185
    mov [x2],20
2233
    mov [x2],20
2186
    mov [x3],26
2234
    mov [x3],26
2187
    jmp sortset  ;sort by date
2235
    jmp sortset  ;sort by date
2188
 
2236
 
2189
;SORT VARILE
2237
;SORT VARILE
2190
start dd 0
2238
start dd 0
2191
x0 dd 0
2239
x0 dd 0
2192
x1 dd 0
2240
x1 dd 0
2193
x2 dd 0
2241
x2 dd 0
2194
x3 dd 0
2242
x3 dd 0
2195
 
2243
 
2196
sortset:
2244
sortset:
2197
 
2245
 
2198
;STEP 1 CLEAR CONVINFO
2246
;STEP 1 CLEAR CONVINFO
2199
    mov  edi,convinfo
2247
    mov  edi,convinfo
2200
    mov  al,255
2248
    mov  al,255
2201
    mov  ecx,4096*62  ;512
2249
    mov  ecx,4096*62  ;512
2202
    cld
2250
    cld
2203
    rep  stosb
2251
    rep  stosb
2204
 
2252
 
2205
;STEP 2 TEST ON HD OR PARTITION
2253
;STEP 2 TEST ON HD OR PARTITION
2206
    cmp [path],byte '/'
2254
    cmp [path],byte '/'
2207
    je nstep
2255
    je nstep
2208
    mov ecx,61+62
2256
    mov ecx,61+62*5
2209
loxhd:
2257
loxhd:
2210
    mov al,[hdimg+ecx]
2258
    mov al,[hdimg+ecx]
2211
    mov [convinfo+ecx],al
2259
    mov [convinfo+ecx],al
2212
    dec ecx
2260
    dec ecx
2213
    jns loxhd
2261
    jns loxhd
2214
    mov [listsize],0
2262
    mov [listsize],0
2215
    ret
2263
    ret
2216
nstep:
2264
nstep:
2217
    cmp [path+3],byte '/'
2265
    cmp [path+3],byte '/'
2218
    je nstep2
2266
    je nstep2
-
 
2267
    cmp [path+4],byte '/'
-
 
2268
    je nstep2
-
 
2269
    cmp [path+1],word 'RD'
-
 
2270
    jne nostep_RD
-
 
2271
    mov ecx,61
-
 
2272
    jmp loxpt
-
 
2273
nostep_RD:
-
 
2274
    cmp [path+1],word 'FD'
-
 
2275
    jne nostep_FD
2219
    mov ecx,61+62
2276
    mov ecx,61+62
-
 
2277
    jmp loxpt
-
 
2278
nostep_FD:
-
 
2279
    cmp [path+1],dword 'HD0'
-
 
2280
    jne nostep_HD0
-
 
2281
    mov cl,[table_area+2]
-
 
2282
    movzx ecx,cl
-
 
2283
    imul ecx,62
-
 
2284
    dec  ecx
-
 
2285
    jmp loxpt
-
 
2286
nostep_HD0:
-
 
2287
    cmp [path+1],dword 'HD1'
-
 
2288
    jne nostep_HD1
-
 
2289
    mov cl,[table_area+3]
-
 
2290
    movzx ecx,cl
-
 
2291
    imul ecx,62
-
 
2292
    dec  ecx
-
 
2293
    jmp loxpt
-
 
2294
nostep_HD1:
-
 
2295
    cmp [path+1],dword 'HD2'
-
 
2296
    jne nostep_HD2
-
 
2297
    mov cl,[table_area+4]
-
 
2298
    movzx ecx,cl
-
 
2299
    imul ecx,62
-
 
2300
    dec  ecx
-
 
2301
    jmp loxpt
-
 
2302
nostep_HD2:
-
 
2303
    cmp [path+1],dword 'HD3'
-
 
2304
    jne nostep_HD3
-
 
2305
    mov cl,[table_area+5]
-
 
2306
    movzx ecx,cl
-
 
2307
    imul ecx,62
-
 
2308
    dec  ecx
-
 
2309
    jmp loxpt
-
 
2310
nostep_HD3:
-
 
2311
 
-
 
2312
    mov ecx,61+62   ;+496
-
 
2313
 
2220
loxpt:
2314
loxpt:
2221
    mov al,[ptimg+ecx]
2315
    mov al,[ptimg+ecx]
2222
    mov [convinfo+ecx],al
2316
    mov [convinfo+ecx],al
2223
    dec ecx
2317
    dec ecx
2224
    jns loxpt
2318
    jns loxpt
2225
    mov [listsize],0
2319
    mov [listsize],0
2226
    ret
2320
    ret
2227
nstep2:
2321
nstep2:
2228
 
2322
 
2229
;STEP 3 CLEAR OUTINFO
2323
;STEP 3 CLEAR OUTINFO
2230
    mov  edi,outinfo ;0x14000 ;0x20000
2324
    mov  edi,outinfo ;0x14000 ;0x20000
2231
    xor  eax,eax
2325
    xor  eax,eax
2232
    mov  ecx,4096*32  ;512
2326
    mov  ecx,4096*32  ;512
2233
    cld
2327
    cld
2234
    rep  stosb
2328
    rep  stosb
2235
 
2329
 
2236
;STEP 4 READ DATA FROM HD
2330
;STEP 4 READ DATA FROM HD
2237
    mov  dword [farea],outinfo
2331
    mov  dword [farea],outinfo
2238
    mov  dword [readblock],0
2332
    mov  dword [readblock],0
2239
 
2333
 
2240
loorhd:
2334
loorhd:
2241
    mov  eax,[readblock]
2335
    mov  eax,[readblock]
2242
    mov  [fileinfoblock+4],eax
2336
    mov  [fileinfoblock+4],eax
2243
    mov  eax,58
2337
    mov  eax,58
2244
    mov  ebx,fileinfoblock
2338
    mov  ebx,fileinfoblock
2245
    int  0x40
2339
    int  0x40
2246
    cmp  eax,0
2340
    cmp  eax,0
2247
    jne  hd_err
2341
    jne  hd_err
2248
    add  dword [farea],512
2342
    add  dword [farea],512
2249
    inc  dword [readblock]
2343
    inc  dword [readblock]
2250
    cmp  dword [readblock],4096/16
2344
    cmp  dword [readblock],4096/16
2251
    jna  loorhd
2345
    jna  loorhd
2252
 
2346
 
2253
hd_err:
2347
hd_err:
2254
    mov ebx,dword [readblock]
2348
    mov ebx,dword [readblock]
2255
    shl ebx,4
2349
    shl ebx,4
2256
    mov dword [blocksread],ebx ; for quick resorting
2350
    mov dword [blocksread],ebx ; for quick resorting
2257
 
2351
 
2258
    cmp eax,5
2352
    cmp eax,5
2259
    je  end_of_dir
2353
    je	    end_of_dir
2260
 
2354
 
2261
;  It's erorr's test is poor code
2355
;  It's erorr's test is poor code
2262
 
2356
 
2263
    cmp eax,1
2357
    cmp eax,1
2264
    jne no_inv_part
2358
    jne no_inv_part
2265
    label 10,10,'Invalid partition or hd base',cl_Red+font_Big
2359
    glabel 10,10,'Invalid partition or hd base',cl_Red+font_Big
2266
    jmp end_of_dir
2360
    jmp end_of_dir
2267
no_inv_part:
2361
no_inv_part:
2268
    cmp eax,3
2362
    cmp eax,3
2269
    jne no_unk_fs
2363
    jne no_unk_fs
2270
    label 10,10,'Unknow file system',cl_Red+font_Big
2364
    glabel 10,10,'Unknow file system',cl_Red+font_Big
2271
    jmp end_of_dir
2365
    jmp end_of_dir
2272
no_unk_fs:
2366
no_unk_fs:
2273
 
2367
 
2274
end_of_dir:
2368
end_of_dir:
2275
    mov  [dirlen],ebx
2369
    mov  [dirlen],ebx
2276
 
2370
 
2277
    ; command succesful
2371
    ; command succesful
2278
 
2372
 
2279
    mov  esi,outinfo ;data_area+1024
2373
    mov  esi,outinfo ;data_area+1024
2280
;    mov  edi,fileinfo+11
2374
;    mov  edi,fileinfo+11
2281
    mov  edx,0 ;4096  ;16
2375
    mov  edx,0 ;4096  ;16
2282
 
2376
 
2283
  newlineb:
2377
  newlineb:
2284
 
2378
 
2285
    mov  edi,fileinfo+11
2379
    mov  edi,fileinfo+11
2286
 
2380
 
2287
    pushad               ; clear
2381
    pushad	 ; clear
2288
    mov  al,32
2382
    mov  al,32
2289
    mov  ecx,58
2383
    mov  ecx,58
2290
    sub  edi,11
2384
    sub  edi,11
2291
    cld
2385
    cld
2292
    rep  stosb
2386
    rep  stosb
2293
    popad
2387
    popad
2294
 
2388
 
2295
    mov  cl,[esi]       ; end of entries ?
2389
    mov  cl,[esi]    ; end of entries ?
2296
    cmp  cl,6
2390
    cmp  cl,6
2297
    jnz  noib0
2391
    jnz  noib0
2298
 
2392
 
2299
    mov  [edi+26],dword 'EOE '
2393
    mov  [edi+26],dword 'EOE '
2300
    add  esi,32
2394
    add  esi,32
2301
;    add  edi,62
2395
;    add  edi,62
2302
    jmp  inf
2396
    jmp  inf
2303
 
2397
 
2304
  noib0:
2398
  noib0:
2305
 
2399
 
2306
    mov  cl,[esi+0]
2400
    mov  cl,[esi+0]
2307
    cmp  cl,0xe5
2401
    cmp  cl,0xe5
2308
    je   yesdelfil
2402
    je	     yesdelfil
2309
 
2403
 
2310
    mov  cl,[esi+11]    ; long fat32 name ?
2404
    mov  cl,[esi+11]	; long fat32 name ?
2311
    cmp  cl,0xf
2405
    cmp  cl,0xf
2312
    jnz  noib1
2406
    jnz  noib1
2313
 
2407
 
2314
    mov  [edi+26],dword 'F32 '
2408
    mov  [edi+26],dword 'F32 '
2315
    add  esi,32
2409
    add  esi,32
2316
;    add  edi,62
2410
;    add  edi,62
2317
    jmp  inf
2411
    jmp  inf
2318
 
2412
 
2319
  noib1:
2413
  noib1:
2320
 
2414
 
2321
    mov  eax,'DAT '     ; data or .. ?
2415
    mov  eax,'DAT '    ; data or .. ?
2322
 
2416
 
2323
    mov  cl,[esi+0]     ; deleted file
2417
    mov  cl,[esi+0]    ; deleted file
2324
    cmp  cl,0xe5
2418
    cmp  cl,0xe5
2325
    je   yesdelfil
2419
    je	     yesdelfil
2326
    cmp  cl,0x0
2420
    cmp  cl,0x0
2327
    je   yesdelfil
2421
    je	     yesdelfil
2328
    jmp  nodelfil
2422
    jmp  nodelfil
2329
   yesdelfil:
2423
   yesdelfil:
2330
    mov  eax,'DEL '
2424
    mov  eax,'DEL '
2331
    jmp  ffile
2425
    jmp  ffile
2332
 
2426
 
2333
  nodelfil:
2427
  nodelfil:
2334
 
2428
 
2335
    mov  cl,[esi+11]    ; folder
2429
    mov  cl,[esi+11]	; folder
2336
    and  cl,0x10
2430
    and  cl,0x10
2337
    jz   ffile
2431
    jz	     ffile
2338
    mov  eax,'FOL '
2432
    mov  eax,'FOL '
2339
    mov  [edi+26],eax
2433
    mov  [edi+26],eax
2340
    jmp  nosize
2434
    jmp  nosize
2341
  ffile:
2435
  ffile:
2342
 
2436
 
2343
; Asko patch for v79
2437
; Asko patch for v79
2344
    mov  cl,[esi+11]    ; fold
2438
    mov  cl,[esi+11]	; fold
2345
    and  cl,0xf
2439
    and  cl,0xf
2346
    cmp  cl,0xf         ; skip long filename
2440
    cmp  cl,0xf     ; skip long filename
2347
    jz   novol
2441
    jz	     novol
2348
    test cl,0x8         ; is it fold label?
2442
    test cl,0x8     ; is it fold label?
2349
    jz   novol         ; no
2443
    jz	     novol	 ; no
2350
    mov  eax,'Fvol'
2444
    mov  eax,'Fvol'
2351
    mov  [edi+26],eax
2445
    mov  [edi+26],eax
2352
    jmp  nosize
2446
    jmp  nosize
2353
  novol:
2447
  novol:
2354
 
2448
 
2355
    mov  [edi+26],eax
2449
    mov  [edi+26],eax
2356
 
2450
 
2357
    pusha               ; size
2451
    pusha     ; size
2358
    mov  eax,[esi+28]
2452
    mov  eax,[esi+28]
2359
    mov  esi,edi
2453
    mov  esi,edi
2360
    add  esi,37
2454
    add  esi,37
2361
    mov  ebx,10
2455
    mov  ebx,10
2362
    mov  ecx,8
2456
    mov  ecx,8
2363
  newnum:
2457
  newnum:
2364
    xor  edx,edx
2458
    xor  edx,edx
2365
    div  ebx
2459
    div  ebx
2366
    add  dl,48
2460
    add  dl,48
2367
    mov  [esi],dl
2461
    mov  [esi],dl
2368
    test eax,eax
2462
    test eax,eax
2369
    jz   zernum
2463
    jz	     zernum
2370
    dec  esi
2464
    dec  esi
2371
    loop newnum
2465
    loop newnum
2372
  zernum:
2466
  zernum:
2373
    popa
2467
    popa
2374
  nosize:
2468
  nosize:
2375
 
2469
 
2376
    pusha                    ; date
2470
    pusha	   ; date
2377
    mov  [edi+17],dword '.  .'
2471
    mov  [edi+17],dword '.  .'
2378
 
2472
 
2379
    movzx eax,word [esi+24]
2473
    movzx eax,word [esi+24]
2380
    shr  eax,9         ; year
2474
    shr  eax,9	       ; year
2381
    add  eax,1980
2475
    add  eax,1980
2382
    mov  ecx,4
2476
    mov  ecx,4
2383
  newdel1:
2477
  newdel1:
2384
    dec  ecx
2478
    dec  ecx
2385
    xor  edx,edx
2479
    xor  edx,edx
2386
    mov  ebx,10
2480
    mov  ebx,10
2387
    div  ebx
2481
    div  ebx
2388
    add  edx,48
2482
    add  edx,48
2389
    mov  [edi+ecx+21],dl
2483
    mov  [edi+ecx+21],dl
2390
    test ecx,ecx
2484
    test ecx,ecx
2391
    jnz  newdel1
2485
    jnz  newdel1
2392
 
2486
 
2393
    movzx eax,word [esi+24]
2487
    movzx eax,word [esi+24]
2394
    shr  eax,5    ; month
2488
    shr  eax,5	      ; month
2395
    and  eax,0x0f
2489
    and  eax,0x0f
2396
    mov  ecx,2
2490
    mov  ecx,2
2397
  newdel2:
2491
  newdel2:
2398
    dec  ecx
2492
    dec  ecx
2399
    xor  edx,edx
2493
    xor  edx,edx
2400
    mov  ebx,10
2494
    mov  ebx,10
2401
    div  ebx
2495
    div  ebx
2402
    add  edx,48
2496
    add  edx,48
2403
    mov  [edi+ecx+18],dl
2497
    mov  [edi+ecx+18],dl
2404
    test ecx,ecx
2498
    test ecx,ecx
2405
    jnz  newdel2
2499
    jnz  newdel2
2406
 
2500
 
2407
    movzx eax,word [esi+24]
2501
    movzx eax,word [esi+24]
2408
    and  eax,0x1f ; day
2502
    and  eax,0x1f ; day
2409
    mov  ecx,2
2503
    mov  ecx,2
2410
  newdel3:
2504
  newdel3:
2411
    dec  ecx
2505
    dec  ecx
2412
    xor  edx,edx
2506
    xor  edx,edx
2413
    mov  ebx,10
2507
    mov  ebx,10
2414
    div  ebx
2508
    div  ebx
2415
    add  edx,48
2509
    add  edx,48
2416
    mov  [edi+ecx+15],dl
2510
    mov  [edi+ecx+15],dl
2417
    test ecx,ecx
2511
    test ecx,ecx
2418
    jnz  newdel3
2512
    jnz  newdel3
2419
 
2513
 
2420
    popa
2514
    popa
2421
 
2515
 
2422
 
2516
 
2423
    pusha                    ; number
2517
    pusha	   ; number
2424
    mov  eax,edx
2518
    mov  eax,edx
2425
    sub  eax,4096
2519
    sub  eax,4096
2426
    neg  eax
2520
    neg  eax
2427
 
2521
 
2428
    xor  edx,edx
2522
    xor  edx,edx
2429
    mov  ebx,10
2523
    mov  ebx,10
2430
    div  ebx
2524
    div  ebx
2431
    add  dl,48
2525
    add  dl,48
2432
    mov  [edi+43],dl          ;0001
2526
    mov  [edi+43],dl	      ;0001
2433
    xor  edx,edx
2527
    xor  edx,edx
2434
    div  ebx
2528
    div  ebx
2435
    add  dl,48
2529
    add  dl,48
2436
    mov  [edi+42],dl          ;0010
2530
    mov  [edi+42],dl	      ;0010
2437
    xor  edx,edx
2531
    xor  edx,edx
2438
    div  ebx
2532
    div  ebx
2439
    add  al,48
2533
    add  al,48
2440
    add  dl,48
2534
    add  dl,48
2441
    mov  [edi+41],dl          ;0100
2535
    mov  [edi+41],dl	      ;0100
2442
    mov  [edi+40],byte 0      ;1000
2536
    mov  [edi+40],byte 0      ;1000
2443
    popa
2537
    popa
2444
 
2538
 
2445
    mov  ecx,8          ; first 8
2539
    mov  ecx,8		; first 8
2446
    cld
2540
    cld
2447
    rep  movsb
2541
    rep  movsb
2448
    mov  [edi],byte '.'
2542
    mov  [edi],byte '.'
2449
    inc  edi
2543
    inc  edi
2450
    mov  ecx,3          ; last 3
2544
    mov  ecx,3		; last 3
2451
    cld
2545
    cld
2452
    rep  movsb
2546
    rep  movsb
2453
 
2547
 
2454
    add  esi,(32-11)
2548
    add  esi,(32-11)
2455
;    add  edi,(60-12+2)
2549
;    add  edi,(60-12+2)
2456
 
2550
 
2457
  inf:
2551
  inf:
2458
 
2552
 
2459
    pushad
2553
    pushad
2460
 
2554
 
2461
;STEP 5 Test on WRITE OR NOTWRITE
2555
;STEP 5 Test on WRITE OR NOTWRITE
2462
    mov  edx,fileinfo+11
2556
    mov  edx,fileinfo+11
2463
looo:
2557
looo:
2464
 
2558
 
2465
;   Delete del, eoe, f32 and another head-names
2559
;   Delete del, eoe, f32 and another head-names
2466
    cmp  [viewmode],3  ;0-3 no outdel
2560
    cmp  [viewmode],3  ;0-3 no outdel
2467
    ja   del_out
2561
    ja	     del_out
2468
    cmp  [edx+26],dword 'DEL '
2562
    cmp  [edx+26],dword 'DEL '
2469
    je   nextfl
2563
    je	     nextfl
2470
del_out:
2564
del_out:
2471
    cmp  [edx+26],dword 'DEL '
2565
    cmp  [edx+26],dword 'DEL '
2472
    jne  no_del
2566
    jne  no_del
2473
    cmp  [edx],dword 0 ;431 ;435 ;484 +10% speed
2567
    cmp  [edx],dword 0 ;431 ;435 ;484 +10% speed
2474
    je   nextfl
2568
    je	     nextfl
2475
no_del:
2569
no_del:
2476
    cmp  [edx+26],dword 'EOE '
2570
    cmp  [edx+26],dword 'EOE '
2477
    je   nextfl
2571
    je	     nextfl
2478
    cmp  [edx+26],dword 'F32 '  ;F32 not useles
2572
    cmp  [edx+26],dword 'F32 '	    ;F32 not useles
2479
    je   nextfl
2573
    je	     nextfl
2480
    cmp  [edx],dword '.   '
2574
    cmp  [edx],dword '.   '
2481
    je   nextfl
2575
    je	     nextfl
2482
    cmp  [edx],dword '..  '
2576
    cmp  [edx],dword '..  '
2483
    je   nextfl
2577
    je	     nextfl
2484
    cmp  [edx],dword 'FIRS'
2578
    cmp  [edx],dword 'FIRS'
2485
    je   nextfl
2579
    je	     nextfl
2486
 
2580
 
2487
; ---------_______-------_______ --------_________-----------
2581
; ---------_______-------_______ --------_________-----------
2488
; SORT by name and del deletet files or f32 headers from list
2582
; SORT by name and del deletet files or f32 headers from list
2489
; _________-------_______ --------_______---------___________
2583
; _________-------_______ --------_______---------___________
2490
 
2584
 
2491
; STEP 6 UNIVERSAL SORT ALGORYTHM
2585
; STEP 6 UNIVERSAL SORT ALGORYTHM
2492
 
2586
 
2493
xxx:
2587
xxx:
2494
    mov esi,0 ;[tekfilename] ;0
2588
    mov esi,0 ;[tekfilename] ;0
2495
    mov ebx,[start] ; 0
2589
    mov ebx,[start] ; 0
2496
 
2590
 
2497
; At first Fold after Dat and Del
2591
; At first Fold after Dat and Del
2498
 
2592
 
2499
ftestname:
2593
ftestname:
2500
    cmp byte [fileinfo+11+26],'F'
2594
    cmp byte [fileinfo+11+26],'F'
2501
    je  F
2595
    je	    F
2502
    cmp byte [fileinfo+11+26],'D'
2596
    cmp byte [fileinfo+11+26],'D'
2503
    je  D
2597
    je	    D
2504
    jmp add_element
2598
    jmp add_element
2505
D:  cmp byte [convinfo+esi+26],'D'
2599
D:  cmp byte [convinfo+esi+26],'D'
2506
    je  add_element
2600
    je	    add_element
2507
    cmp byte [convinfo+esi+26],'F'
2601
    cmp byte [convinfo+esi+26],'F'
2508
    je  skipfile
2602
    je	    skipfile
2509
    jmp add_element
2603
    jmp add_element
2510
F:  cmp byte [convinfo+esi+26],'D'
2604
F:  cmp byte [convinfo+esi+26],'D'
2511
    je writenow
2605
    je writenow
2512
;    cmp byte [convinfo+esi+26],'F'
2606
;    cmp byte [convinfo+esi+26],'F'
2513
;    je  add_element
2607
;    je  add_element
2514
;    jmp add_element
2608
;    jmp add_element
2515
 
2609
 
2516
add_element:
2610
add_element:
2517
    mov al,[fileinfo+ebx+11]
2611
    mov al,[fileinfo+ebx+11]
2518
    cmp al,[convinfo+esi+ebx]
2612
    cmp al,[convinfo+esi+ebx]
2519
    je  equal
2613
    je	    equal
2520
    jb  writenow
2614
    jb	    writenow
2521
skipfile:
2615
skipfile:
2522
    add esi,62
2616
    add esi,62
2523
    mov ebx,[start]  ;0
2617
    mov ebx,[start]  ;0
2524
    jmp ftestname
2618
    jmp ftestname
2525
 
2619
 
2526
equal:
2620
equal:
2527
    inc ebx
2621
    inc ebx
2528
    cmp ebx,[x0]
2622
    cmp ebx,[x0]
2529
    je  writefile
2623
    je	    writefile
2530
    cmp ebx,[x1]
2624
    cmp ebx,[x1]
2531
    je  x1p
2625
    je	    x1p
2532
    cmp ebx,[x2]
2626
    cmp ebx,[x2]
2533
    je  x2p
2627
    je	    x2p
2534
    cmp ebx,[x3]
2628
    cmp ebx,[x3]
2535
    jae x3p
2629
    jae x3p
2536
    jmp add_element
2630
    jmp add_element
2537
 
2631
 
2538
x1p:
2632
x1p:
2539
    mov ebx,18
2633
    mov ebx,18
2540
    jmp add_element
2634
    jmp add_element
2541
x2p:
2635
x2p:
2542
    mov ebx,15
2636
    mov ebx,15
2543
    jmp add_element
2637
    jmp add_element
2544
x3p:
2638
x3p:
2545
    mov ebx,0
2639
    mov ebx,0
2546
    jmp add_element
2640
    jmp add_element
2547
 
2641
 
2548
writenow:
2642
writenow:
2549
    mov ecx,4096*62
2643
    mov ecx,4096*62
2550
    sub ecx,esi
2644
    sub ecx,esi
2551
ldloop:
2645
ldloop:
2552
    mov al,[convinfo+ecx+esi]
2646
    mov al,[convinfo+ecx+esi]
2553
    mov [convinfo+ecx+esi+62],al
2647
    mov [convinfo+ecx+esi+62],al
2554
    dec ecx
2648
    dec ecx
2555
    jns ldloop
2649
    jns ldloop
2556
 
2650
 
2557
 
2651
 
2558
writefile:
2652
writefile:
2559
    mov ecx,61
2653
    mov ecx,61
2560
wfloop:
2654
wfloop:
2561
    mov al,[fileinfo+ecx+11]
2655
    mov al,[fileinfo+ecx+11]
2562
    mov [convinfo+ecx+esi],al
2656
    mov [convinfo+ecx+esi],al
2563
    dec ecx
2657
    dec ecx
2564
    jns wfloop
2658
    jns wfloop
2565
 
2659
 
2566
nextfile:
2660
nextfile:
2567
 
2661
 
2568
nextfl:
2662
nextfl:
2569
;    popad
2663
;    popad
2570
;    pushad
2664
;    pushad
2571
    mov eax,edx
2665
    mov eax,edx
2572
    shl eax,26
2666
    shl eax,26
2573
    cmp eax,0
2667
    cmp eax,0
2574
    jne no_outcnt
2668
    jne no_outcnt
2575
    push edx
2669
    push edx
2576
    drawfbox 294,25,(4*6),10,cl_White
2670
    drawfbox 294,25,(4*6),10,cl_White
2577
    pop  ebp
2671
    pop  ebp
2578
    outcount ebp,294,25,cl_Black,4*65536
2672
    outcount ebp,294,25,cl_Black,4*65536
2579
no_outcnt:
2673
no_outcnt:
2580
    popad
2674
    popad
2581
 
2675
 
2582
    inc edx
2676
    inc edx
2583
    cmp edx,4096
2677
    cmp edx,4096
2584
    jnae newlineb
2678
    jnae newlineb
2585
 
2679
 
2586
 
2680
 
2587
;STEP 8 GET SIZE OF RESORTING LIST
2681
;STEP 8 GET SIZE OF RESORTING LIST
2588
    mov ecx,0
2682
    mov ecx,0
2589
    mov edi,0
2683
    mov edi,0
2590
    mov eax,[blocksread]
2684
    mov eax,[blocksread]
2591
    mov ebx,62
2685
    mov ebx,62
2592
    mul ebx
2686
    mul ebx
2593
    mov edx,eax
2687
    mov edx,eax
2594
loogs:
2688
loogs:
2595
    mov eax,dword [convinfo+edi+26]
2689
    mov eax,dword [convinfo+edi+26]
2596
    cmp eax,dword 0xffffffff
2690
    cmp eax,dword 0xffffffff
2597
    je endgs
2691
    je endgs
2598
    add edi,62
2692
    add edi,62
2599
    inc ecx
2693
    inc ecx
2600
    cmp edi,edx ;4096*62
2694
    cmp edi,edx ;4096*62
2601
    jnae loogs
2695
    jnae loogs
2602
endgs:
2696
endgs:
2603
    mov [listsize],ecx
2697
    mov [listsize],ecx
2604
    ret
2698
    ret
2605
 
2699
 
2606
;******************************************************************************
2700
;******************************************************************************
2607
 
2701
 
2608
; DATA AREA
2702
; DATA AREA
2609
pmenu_draw dd 0  ;if poup menu is draw,update all window
2703
pmenu_draw dd 0  ;if poup menu is draw,update all window
2610
flick      dd 0  ;anti flick on ?
2704
flick	     dd 0  ;anti flick on ?
2611
drawhf     dd 0  ;draw file menu?
2705
drawhf	       dd 0  ;draw file menu?
2612
drawhv     dd 0  ;draw view menu?
2706
drawhv	       dd 0  ;draw view menu?
2613
drawhi     dd 0  ;draw info menu?
2707
drawhi	       dd 0  ;draw info menu?
2614
browser    dd 0  ;0-dialog, 1-browser
2708
browser    dd 0  ;0-dialog, 1-browser
2615
cursor     dd 0  ;cursor in prompt line
2709
cursor	       dd 0  ;cursor in prompt line
2616
focus      dd 0  ;prompt edit or window?
2710
focus	     dd 0  ;prompt edit or window?
2617
viewmode   dd 0  ;folder sort & not del
2711
viewmode   dd 0  ;folder sort & not del
2618
downstop   dd 0
2712
downstop   dd 0
2619
filecursor dd 0
2713
filecursor dd 0
2620
mousex     dd 0
2714
mousex	       dd 0
2621
mousey     dd 0
2715
mousey	       dd 0
2622
blocksread dd 0
2716
blocksread dd 0
2623
listsize   dd 0  ;num of files in directory
2717
listsize   dd 0  ;num of files in directory
2624
temp       dd 0
2718
temp	   dd 0
2625
readblock  dd 1
2719
readblock  dd 1
2626
dlg_type   db 0 ;S-save O-open
2720
dlg_type   db 0 ;S-save O-open
-
 
2721
 
-
 
2722
hdimg1 db 'HD0      HARDDISK         FOL                                 '
-
 
2723
hdimg2 db 'HD1      HARDDISK         FOL                                 '
-
 
2724
hdimg3 db 'HD2      HARDDISK         FOL                                 '
-
 
2725
hdimg4 db 'HD3      HARDDISK         FOL                                 '
2627
 
2726
 
2628
          ;01234567890123456789012345678901234567890123456789012345678912
2727
      ;01234567890123456789012345678901234567890123456789012345678912
2629
hdimg  db 'HD       HARDDISK         FOL                                 '
2728
hdimg  db 'RD       RAMDISK          FOL                                 '
-
 
2729
       db 'FD       FLOPPYDISK       FOL                                 '
-
 
2730
       db '                                                              '
-
 
2731
       db '                                                              '
-
 
2732
       db '                                                              '
2630
       db 'RD       RAMDISK          FOL                                 '
2733
       db '                                                              '
2631
 
2734
 
2632
ptimg  db '1        FIRST  PARTITION FOL                                 '
2735
ptimg  db '1        FIRST  PARTITION FOL                                 '
2633
       db '2        SECOND PARTITION FOL                                 '
2736
       db '2        SECOND PARTITION FOL                                 '
-
 
2737
       db '3        NEXT   PARTITION FOL                                 '
-
 
2738
       db '4        NEXT   PARTITION FOL                                 '
-
 
2739
       db '5        NEXT   PARTITION FOL                                 '
-
 
2740
       db '6        NEXT   PARTITION FOL                                 '
-
 
2741
       db '7        NEXT   PARTITION FOL                                 '
-
 
2742
       db '8        NEXT   PARTITION FOL                                 '
-
 
2743
       db '9        NEXT   PARTITION FOL                                 '
-
 
2744
       db '10       NEXT   PARTITION FOL                                 '
-
 
2745
       db '11       NEXT   PARTITION FOL                                 '
-
 
2746
       db '12       NEXT   PARTITION FOL                                 '
-
 
2747
       db '13       NEXT   PARTITION FOL                                 '
-
 
2748
       db '14       NEXT   PARTITION FOL                                 '
-
 
2749
       db '15       NEXT   PARTITION FOL                                 '
-
 
2750
       db '16       NEXT   PARTITION FOL                                 '
-
 
2751
       db '17       NEXT   PARTITION FOL                                 '
-
 
2752
       db '18       NEXT   PARTITION FOL                                 '
-
 
2753
       db '19       NEXT   PARTITION FOL                                 '
-
 
2754
       db '20       NEXT   PARTITION FOL                                 '
2634
 
2755
 
2635
modetext:
2756
modetext:
2636
      ;0123456789012345
2757
      ;0123456789012345
2637
   db 'SORT BY NAME   0'
2758
   db 'SORT BY NAME   0'
2638
   db 'SORT BY EXT.   1'
2759
   db 'SORT BY EXT.   1'
2639
   db 'SORT BY SIZE   2' ;type sort
2760
   db 'SORT BY SIZE   2' ;type sort
2640
   db 'SORT BY DATE   3'
2761
   db 'SORT BY DATE   3'
2641
   db 'DEL SORT NAME  4'
2762
   db 'DEL SORT NAME  4'
2642
   db 'DEL SORT EXT.  5'
2763
   db 'DEL SORT EXT.  5'
2643
   db 'DEL SORT SIZE  6' ;type sort
2764
   db 'DEL SORT SIZE  6' ;type sort
2644
   db 'DEL SORT DATE  7'
2765
   db 'DEL SORT DATE  7'
2645
 
2766
 
2646
dirlen    dd   0x1
2767
dirlen	      dd     0x1
2647
b_color   dd   0x6677cc
2768
b_color   dd   0x6677cc
2648
 
2769
 
2649
; //// Willow
2770
; //// Willow
2650
MRUfile:
2771
;MRUfile:
2651
   dd 0x0
2772
;   dd 0x0
2652
   dd 0x0
2773
;   dd 0x0
2653
   dd 0x1
2774
;   dd 0x1
2654
   dd path
2775
;   dd path
2655
   dd tempzone
2776
;   dd tempzone
2656
   db '/RD/1/MRU.LST',0
2777
;   db '/RD/1/MRU.LST',0
2657
; //// Willow
2778
; //// Willow
2658
 
2779
 
2659
;Name of programs
2780
;Name of programs
2660
editor    db 'TINYPAD    '
2781
editor	      db 'TINYPAD    '
2661
bmpview   db 'MV         '
2782
bmpview   db 'MV         '
2662
jpgview   db 'JPEGVIEW   '
2783
jpgview   db 'JPEGVIEW   '
2663
gifview   db 'GIFVIEW    '
2784
gifview   db 'GIFVIEW    '
2664
ac97wav   db 'AC97WAV    '
2785
ac97wav   db 'AC97WAV    '
2665
copyrfile db 'COPYR      '
2786
copyrfile db 'COPYR      '
-
 
2787
rtfread   db 'RTFREAD    '
2666
; //// Willow
2788
; //// Willow
2667
pngview   db '@RCHER     '
2789
pngview   db '@RCHER     '
2668
; //// Willow
2790
; //// Willow
-
 
2791
midamp	  db 'MIDAMP     '
2669
 
2792
 
2670
fileinfo_start:
2793
fileinfo_start:
2671
dd 16
2794
dd 16
2672
dd 0
2795
dd 0
2673
dd 0 ;tempzone+1000;
2796
dd 0 ;tempzone+1000;
2674
dd 0
2797
dd 0
2675
dd tempzone ;0x10000
2798
dd tempzone ;0x10000
2676
open_path:
2799
open_path:
2677
times 256 db 0  ;run app path
2800
times 256 db 0	    ;run app path
2678
 
2801
 
2679
fileinfoblock:
2802
fileinfoblock:
2680
   dd 0x0       ; read
2803
   dd 0x0    ; read
2681
   dd 0x0       ; first block
2804
   dd 0x0    ; first block
2682
   dd 0x1       ; number of blocks to read
2805
   dd 0x1    ; number of blocks to read
2683
farea:
2806
farea:
2684
   dd outinfo   ; ret offset
2807
   dd outinfo	  ; ret offset
2685
   dd tempzone    ; work size of sytemram
2808
   dd tempzone	      ; work size of sytemram
2686
path:
2809
path:
2687
times 256 db 0  ;path
2810
times 256 db 0	    ;path
-
 
2811
 
-
 
2812
table_area:
-
 
2813
rb 10
-
 
2814
 
2688
;rb 256
2815
;rb 256
2689
but_file:
2816
but_file:
2690
file 'systr12.GIF'
2817
file 'systr12.GIF'
2691
butimg:
2818
butimg:
2692
rb 400*16*3+8   ;buttons (left pice of picture)
2819
rb 400*16*3+8	  ;buttons (left pice of picture)
2693
logoimg:
2820
logoimg:
2694
rb 70*16*3+8    ;logo (right pice of picture)
2821
rb 70*16*3+8	;logo (right pice of picture)
2695
logoinfimg:
2822
logoinfimg:
2696
rb 60*60*3+8    ;logoinfo (right pice of picture)
2823
rb 60*60*3+8	;logoinfo (right pice of picture)
2697
upsb:
2824
upsb:
2698
rb 8*9*3+8      ;up scroll button
2825
rb 8*9*3+8    ;up scroll button
2699
dnsb:
2826
dnsb:
2700
rb 8*9*3+8      ;down scroll button
2827
rb 8*9*3+8    ;down scroll button
2701
 
2828
 
2702
;ICONS RESERVE AREA
2829
;ICONS RESERVE AREA
2703
hdico:
2830
hdico:
2704
rb 12*9*3+8
2831
rb 12*9*3+8
2705
rdico:
2832
rdico:
2706
rb 12*9*3+8
2833
rb 12*9*3+8
2707
folico:
2834
folico:
2708
rb 12*9*3+8
2835
rb 12*9*3+8
2709
datico:
2836
datico:
2710
rb 12*9*3+8
2837
rb 12*9*3+8
2711
delico:
2838
delico:
2712
rb 12*9*3+8
2839
rb 12*9*3+8
2713
imgico:
2840
imgico:
2714
rb 12*9*3+8
2841
rb 12*9*3+8
2715
txtico:
2842
txtico:
2716
rb 12*9*3+8
2843
rb 12*9*3+8
2717
asmincico:
2844
asmincico:
2718
rb 12*9*3+8
2845
rb 12*9*3+8
2719
execico:
2846
execico:
2720
rb 12*9*3+8
2847
rb 12*9*3+8
2721
 
2848
 
2722
tempimg:        ;reserve ram for images
2849
tempimg:    ;reserve ram for images
2723
rb 400*100*3+8   ;for picture
2850
rb 400*100*3+8	     ;for picture
2724
rb 8000
2851
rb 8000
2725
 
2852
 
2726
gif_hash:
2853
gif_hash:
2727
rd 4096
2854
rd 4096
2728
tempzone:   ;temp zone for 58 function
2855
tempzone:   ;temp zone for 58 function
2729
rb 4000
2856
rb 4000
2730
 
2857
 
2731
sourcepath rb 100
2858
sourcepath rb 100
2732
destpath   rb 100
2859
destpath   rb 100
2733
 
2860
 
2734
MYPID:
2861
MYPID:
2735
rd 8
2862
rd 8
2736
 
2863
 
2737
I_END:
2864
I_END:
2738
 
2865
 
2739
param_area:
2866
param_area:
2740
rb 256
2867
rb 256
2741
paramtest:
2868
paramtest:
2742
rb 256
2869
rb 256
2743
filedir:
2870
filedir:
2744
rb 256
2871
rb 256
2745
 
2872
 
2746
procinfo process_information
2873
procinfo process_information
2747
sc system_colors
2874
sc system_colors
2748
 
2875
 
2749
fileinfo:
2876
fileinfo:
2750
rb 200 ;4096*62+1024
2877
rb 200 ;4096*62+1024
2751
 
2878
 
2752
outinfo:
2879
outinfo:
2753
rb 4096*34+1024
2880
rb 4096*34+1024
2754
 
2881
 
2755
convinfo:
2882
convinfo:
2756
rb 4096*62+1024
2883
rb 4096*62+1024
2757
 
2884
 
2758
RAM_END:
2885
RAM_END: