Subversion Repositories Kolibri OS

Rev

Rev 4270 | Rev 4319 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
341 heavyiron 1
;   RDsave для Kolibri (0.6.5.0 и старше)
4213 heavyiron 2
;   Save RAM-disk to hard or floppy drive
1606 mario79 3
;---------------------------------------------------------------------
205 heavyiron 4
;   Mario79 2005
341 heavyiron 5
;   Heavyiron 12.02.2007
1070 Lrz 6
;        11.05.2009 - для работы нужна системная библиотека box_lib.obj
4213 heavyiron 7
;   Mario79   08.09.2010 - select path with OpenDialog,keys 1,2,3,4 for select options
8
;   Heavyiron 01.12.2013 - new logic
341 heavyiron 9
;---------------------------------------------------------------------
205 heavyiron 10
appname equ 'RDsave '
4270 heavyiron 11
version equ '1.41'
4213 heavyiron 12
debug   equ no
3634 fedesco 13
 
4213 heavyiron 14
use32        ; включить 32-битный режим ассемблера
15
org 0x0      ; адресация с нуля
205 heavyiron 16
 
4213 heavyiron 17
db 'MENUET01'    ; 8-байтный идентификатор MenuetOS
18
dd 0x01          ; версия заголовка (всегда 1)
19
dd START         ; адрес первой команды
20
dd IM_END        ; размер программы
21
dd I_END         ; количество памяти
22
dd stacktop      ; адрес вершины стека
23
dd PARAMS        ; адрес буфера для параметров
24
dd cur_dir_path
205 heavyiron 25
 
4213 heavyiron 26
 
27
include 'lang.inc'
28
include '../../../macros.inc'
29
if debug eq yes
30
include '../../../debug.inc'
31
end if
32
include '../../../proc32.inc'
33
include '../../../dll.inc'
1111 Lrz 34
include '../../../develop/libraries/box_lib/load_lib.mac'
1373 IgorA 35
include '../../../develop/libraries/box_lib/trunk/box_lib.mac'
4213 heavyiron 36
include 'str.inc'
1070 Lrz 37
 
4213 heavyiron 38
        @use_library
341 heavyiron 39
;---------------------------------------------------------------------
40
;---  НАЧАЛО ПРОГРАММЫ  ----------------------------------------------
41
;---------------------------------------------------------------------
1070 Lrz 42
align 4
43
START:
4213 heavyiron 44
;---------------------------------------------------------------------
45
        mcall  48,3,sc,sizeof.system_colors
46
        mcall  68,11
1606 mario79 47
 
48
load_libraries l_libs_start,end_l_libs
4213 heavyiron 49
        inc     eax
50
        test    eax,eax
51
        jz      close
1606 mario79 52
 
4213 heavyiron 53
stdcall dll.Init,[init_lib]
205 heavyiron 54
 
4213 heavyiron 55
invoke  ini_get_int,ini_file,asettings,aautoclose,0
56
        mov   [autoclose],eax
4270 heavyiron 57
invoke  ini_get_str,ini_file,apath,apath,fname_buf,4096,path
58
stdcall _lstrcpy,ini_path,fname_buf
4213 heavyiron 59
 
4270 heavyiron 60
stdcall _lstrcpy,filename_area,start_temp_file_name
61
 
62
        mov   eax,PARAMS
63
        cmp   byte[eax], 0
4213 heavyiron 64
        je    no_params
4270 heavyiron 65
        cmp   byte[eax], 'h'
4213 heavyiron 66
        je    @f
4270 heavyiron 67
        cmp   byte[eax], 'H'
4213 heavyiron 68
        jne   .no_h
1606 mario79 69
@@:
4213 heavyiron 70
        mov   [hidden],1
71
        jmp   no_params
72
.no_h:
73
        mov   [param],1
4270 heavyiron 74
        stdcall _lstrcpy,fname_buf,eax
75
        xor   eax,eax
4213 heavyiron 76
        mov   ah,2
77
        jmp   noclose
1228 Lrz 78
 
4270 heavyiron 79
;---------------------------------------------------------------------
4213 heavyiron 80
no_params:
4270 heavyiron 81
stdcall _lstrcpy,check_dir,ini_path
4213 heavyiron 82
        call    check_path
83
        test    eax,eax
84
        jz      path_ok
85
        cmp     eax,6
86
        je      path_ok
87
;---------------------------------------------------------------------
88
if debug eq yes
89
dps 'read_folder_error'
90
newline
91
end if
92
;---------------------------------------------------------------------
93
 
94
stdcall _lstrcpy,fname_buf,communication_area_default_path
95
 
96
        mov     [hidden],0
97
 
98
;OpenDialog     initialisation
99
        push    dword OpenDialog_data
100
        call    [OpenDialog_Init]
101
 
1606 mario79 102
; prepare for PathShow
4213 heavyiron 103
        push    dword PathShow_data_1
104
        call    [PathShow_prepare]
105
        call    draw_window
106
        mov     ah,3
107
        mov     ecx,fname_buf
108
        jmp     noclose
109
;---------------------------------------------------------------------
110
path_ok:
111
;OpenDialog     initialisation
112
        push    dword OpenDialog_data
113
        call    [OpenDialog_Init]
1606 mario79 114
 
4213 heavyiron 115
; prepare for PathShow
116
        push    dword PathShow_data_1
117
        call    [PathShow_prepare]
205 heavyiron 118
 
4213 heavyiron 119
        mcall   40,0x00000027
120
 
121
        cmp     [hidden],1
122
        jne     red
123
        mov     ah,2
124
        jmp     noclose
125
red:
126
        call    draw_window
341 heavyiron 127
;---------------------------------------------------------------------
128
still:
4213 heavyiron 129
        mcall 10
205 heavyiron 130
 
4213 heavyiron 131
        dec     eax      ; перерисовать окно?
132
        jz      red      ; если да - на метку red
133
        dec     eax
134
        jz      key
135
        dec     eax
136
        jz      button
137
        jmp     still
1606 mario79 138
;---------------------------------------------------------------------
341 heavyiron 139
button:
4213 heavyiron 140
        mcall   17      ; получить идентификатор нажатой кнопки
141
        dec     ah
142
        jz      close
143
        cmp     ah,1             ; кнопка с id=1("закрыть")?
144
        jne     noclose
1070 Lrz 145
close:
4213 heavyiron 146
        or       eax,-1          ; функция -1: завершить программу
147
        mcall
148
;---------------------------------------------------------------------
149
key:
150
        mcall   2
151
        cmp     ah,0x1b
152
        je      close
153
        cmp     ah,0x0D
154
        jne     @f
155
        mov     ah,2
156
        jmp     noclose
157
@@:
158
        cmp     ah,9h
159
        jne     still
160
;---------------------------------------------------------------------
341 heavyiron 161
noclose:
4270 heavyiron 162
        mov     ecx,fname_buf
4213 heavyiron 163
        push  16
164
        mov   ebx,1
165
        cmp   byte[ecx+1],'f'
166
        je    @f
167
        cmp   byte[ecx+1],'F'
168
        jne   not_fdd
169
@@:
170
        cmp   byte[ecx+4],'1'
171
        jne   @f
172
        cmp   ah,2
173
        je    doit
174
@@:
175
        inc   ebx
176
        cmp   ah,2
177
        je    doit
178
not_fdd:
179
        push  18
180
        mov   ebx,6     ; 18.6 = save to specified folder
181
        cmp   ah,2
182
        je    doit
1606 mario79 183
 
184
; invoke OpenDialog
4213 heavyiron 185
        push    dword OpenDialog_data
186
        call    [OpenDialog_Start]
187
        cmp     [OpenDialog_data.status],1
188
        jne     still
1606 mario79 189
 
190
; prepare for PathShow
4213 heavyiron 191
        push    dword PathShow_data_1
192
        call    [PathShow_prepare]
193
        call    draw_window
194
        mov     ecx,fname_buf
195
        mov     ah,2
196
        jmp     noclose
1606 mario79 197
 
4213 heavyiron 198
doit:
4270 heavyiron 199
        cmp     [param],0
200
        jne     @f
4213 heavyiron 201
        call    save_ini
4270 heavyiron 202
@@:
203
        cmp   byte[ecx+1],'r'
204
        je    @f
205
        cmp   byte[ecx+1],'R'
206
        jne   not_rd
207
@@:
208
        mov   edx,rdError
209
        call  print_err
210
        cmp     [param],1
211
        je      @f
212
        jmp     still
213
@@:
214
        mov     [param],0
215
        jmp     no_params
216
not_rd:
4213 heavyiron 217
        pop     eax
218
        mcall
219
        call    check_for_error
220
        cmp     [param],1
221
        je      @f
222
        jmp     still
223
@@:
4270 heavyiron 224
        mov     [param],0
4213 heavyiron 225
        jmp     no_params
1606 mario79 226
 
227
;---------------------------------------------------------------------
4213 heavyiron 228
check_for_error:                      ;Обработчик ошибок
229
stdcall _lstrcpy,check_dir,ok
230
stdcall _lstrcat,check_dir,fname_buf
231
        mov     edx,check_dir
232
        test    eax,eax
233
        jz      print_ok
234
        cmp     ebx,6
235
        je      @f
236
        mov     edx,error11
237
        jmp     print_err
238
@@:
239
        cmp     eax, 11
240
        ja      .unknown
4270 heavyiron 241
        mov     edx, [errors+eax*4]
242
        stdcall _lstrcat,error_msg,edx
4213 heavyiron 243
        mov     edx, error_msg
244
        jmp     print_err
245
.unknown:
246
        mov     edx, aUnknownError
247
print_err:
4270 heavyiron 248
        pushad
249
        stdcall _lstrlen,ini_path
250
        invoke  ini_set_str,ini_file,apath,apath,ini_path,eax
251
        stdcall _lstrcpy,fname_buf,ini_path
252
        popad
253
        cmp     [hidden],1
254
        je      @f
255
        cmp     [param],1
256
        je      @f
257
        stdcall _lstrlen,edx
258
        imul    eax,6
259
        mov     ebx,390
260
        sub     ebx,eax
261
        sar     ebx,1
262
        shl     ebx,16
263
        add     ebx,96
264
        mov     ecx,[sc.work_text]
265
        or      ecx,0xc0880000
266
        mcall   4, , , , ,[sc.work]
4213 heavyiron 267
        ret
4270 heavyiron 268
@@:
269
        mov     dword [is_notify + 8], edx
270
        mcall   70, is_notify
271
        ret
4213 heavyiron 272
print_ok:
273
        cmp     [hidden],1
4270 heavyiron 274
        je       @f
275
        cmp     [param],1
276
        je       @f
277
        stdcall _lstrlen,edx
278
        imul    eax,6
279
        mov     ebx,390
280
        sub     ebx,eax
281
        sar     ebx,1
282
        shl     ebx,16
283
        add     ebx,96
284
        mov     ecx,[sc.work_text]
285
        or      ecx,0xc0008800
286
        mcall   4, , , , ,[sc.work]
287
        mcall   5,100
288
        cmp     [autoclose],1
4213 heavyiron 289
        je      close
4270 heavyiron 290
        ret
4213 heavyiron 291
@@:
4270 heavyiron 292
        mov     dword [is_notify + 8], edx
293
        mcall   70, is_notify
294
        mcall   5,100
295
        jmp     close
1606 mario79 296
;---------------------------------------------------------------------
4213 heavyiron 297
draw_PathShow:
298
        pushad
299
        mcall   13,<15,280>,<32,16>,0xffffff
300
        push    dword PathShow_data_1
301
        call    [PathShow_draw]
302
        popad
303
        ret
1606 mario79 304
;---------------------------------------------------------------------
4213 heavyiron 305
save_ini:
306
        pushad
307
        stdcall _lstrlen,fname_buf
308
        invoke  ini_set_str,ini_file,apath,apath,fname_buf,eax
309
        invoke  ini_set_int,ini_file,asettings,aautoclose,[autoclose]
310
        popad
311
        ret
341 heavyiron 312
;---------------------------------------------------------------------
4213 heavyiron 313
check_path:
314
stdcall _lstrlen,check_dir
315
        mov     edi,check_dir
316
        add     edi,eax
317
@@:
318
        mov     byte [edi],0
319
        dec     edi
320
        cmp     byte [edi],'/'
321
        jne     @b
322
 
323
if debug eq yes
324
dps     'read_folder_name: '
325
        mov     edx,check_dir
326
        call    debug_outstr
327
newline
328
end if
329
        mcall   70,read_folder
330
        ret
1606 mario79 331
;---------------------------------------------------------------------
4213 heavyiron 332
;---  Draw window  ---------------------------------------------------
341 heavyiron 333
;---------------------------------------------------------------------
205 heavyiron 334
draw_window:
4213 heavyiron 335
        mcall   12,1
205 heavyiron 336
 
4213 heavyiron 337
        mov     edx,[sc.work]
338
        or      edx,0x34000000
4270 heavyiron 339
        mcall   0,<200,400>,<200,130>, , ,title
205 heavyiron 340
 
4213 heavyiron 341
;buttons
342
        mcall   8,<198,70>,<68,20>,2,[sc.work_button]
343
        inc     edx
344
        mcall    ,<125,70>,
345
        inc     edx
346
        mcall    ,<300,75>,<30,20>
1070 Lrz 347
 
4213 heavyiron 348
;labels
349
        mov     ecx,[sc.work_button_text]
350
        or      ecx,0x80000000
351
        mcall   4,<134,75>, ,save
352
        mcall    ,<215,75>, ,cansel
353
        mcall    ,<315,36>, ,select
354
 
355
        mov     ecx,[sc.work]
356
        mov     dword [frame_data.font_backgr_color],ecx
357
        push    dword frame_data
358
        call    [Frame_draw]
205 heavyiron 359
 
4213 heavyiron 360
        call    draw_PathShow
205 heavyiron 361
 
4213 heavyiron 362
        mcall   12,2
363
        ret
205 heavyiron 364
 
341 heavyiron 365
;---------------------------------------------------------------------
4213 heavyiron 366
;---  Data  ----------------------------------------------------------
1606 mario79 367
;---------------------------------------------------------------------
205 heavyiron 368
if lang eq ru
4213 heavyiron 369
save            db 'Сохранить',0
370
cansel          db 'Отмена',0
371
select          db 'Изменить',0
372
label1          db ' Образ будет сохранен в: ',0
373
ok              db 'RAM-диск сохранен успешно в ',0
374
error1          db 'Не определена база и/или раздел жёсткого диска',0
375
error2          db 'Функция не поддерживается для данной файловой системы',0
376
error3          db 'Неизвестная файловая система',0
377
error4          db 'Странно... Ошибка 4',0
378
error5          db 'Несуществующий путь',0
379
error6          db 'Файл закончился',0
380
error7          db 'Указатель вне памяти приложения',0
381
error8          db 'Диск заполнен',0
382
error9          db 'Файловая структура разрушена',0
383
error10         db 'Доступ запрещён',0
384
error11         db 'Ошибка устройства',0
4270 heavyiron 385
aUnknownError   db 'Неизвестная ошибка',0
386
rdError         db 'Нельзя сохранять образ в самого себя',0
387
error_msg       db 'Ошибка: ',0
1606 mario79 388
;---------------------------------------------------------------------
605 kaitz 389
else if lang eq et
4213 heavyiron 390
save            db 'Salvesta',0
391
cansel          db 'Cansel',0
392
select          db ' Valige',0
393
label1          db ' RAM-drive will be saved as: ',0
394
ok              db 'RAM-ketas salvestatud edukalt ',0
395
error1          db 'Hard disk base and/or partition not defined',0
396
error2          db 'The file system does not support this function',0
397
error3          db 'Tundmatu failis№steem',0
398
error4          db 'Strange... Error 4',0
399
error5          db 'Vigane teekond',0
400
error6          db 'End of file',0
401
error7          db 'Pointer is outside of application memory',0
402
error8          db 'Ketas tфis',0
403
error9          db 'FAT tabel vigane',0
404
error10         db 'Juurdepффs keelatud',0
405
error11         db 'Seadme viga',0
406
aUnknownError   db 'Tundmatu viga',0
4271 heavyiron 407
rdError         db "You can't save image on itself",0
4270 heavyiron 408
error_msg       db 'Viga: ',0
1606 mario79 409
;---------------------------------------------------------------------
3634 fedesco 410
else if lang eq it
4213 heavyiron 411
save            db '  Salva',0
412
cansel          db 'Cansel',0
413
select          db 'Seleziona',0
414
label1          db ' RAM-drive will be saved as: ',0
415
ok              db 'Il RAM-drivet e stato salvato ',0
416
error1          db 'Hard disk base and/or partition not defined',0
417
error2          db 'The file system does not support this function',0
418
error3          db 'Filesystem sconosciuto',0
419
error4          db 'Strange... Error 4',0
420
error5          db 'Percorso non valido',0
421
error6          db 'End of file',0
422
error7          db 'Pointer is outside of application memory',0
423
error8          db 'Disco pieno',0
424
error9          db 'Tabella FAT corrotta',0
425
error10         db 'Accesso negato',0
426
error11         db 'Errore di device',0
427
aUnknownError   db 'Errore sconosciuto',0
4271 heavyiron 428
rdError         db "You can't save image on itself",0
4270 heavyiron 429
error_msg       db 'Errore: ',0
3634 fedesco 430
;---------------------------------------------------------------------
205 heavyiron 431
else
4213 heavyiron 432
save            db '  Save',0
433
cansel          db 'Cansel',0
434
select          db ' Select',0
435
label1          db ' RAM-drive will be saved as: ',0
436
ok              db 'RAM-drive was saved successfully in ',0
437
error1          db 'Hard disk base and/or partition not defined',0
438
error2          db 'The file system does not support this function',0
439
error3          db 'Unknown file system',0
440
error4          db 'Strange... Error 4',0
441
error5          db 'Incorrect path',0
442
error6          db 'End of file',0
443
error7          db 'Pointer is outside of application memory',0
444
error8          db 'Disk is full',0
445
error9          db 'File structure is destroyed',0
446
error10         db 'Access denied',0
447
error11         db 'Device error',0
448
aUnknownError   db 'Unknown error',0
4271 heavyiron 449
rdError         db "You can't save image on itself",0
4270 heavyiron 450
error_msg       db 'Error: ',0
205 heavyiron 451
end if
4213 heavyiron 452
;---------------------------------------------------------------------
453
errors:
454
        dd      ok
455
        dd      error1
456
        dd      error2
457
        dd      error3
458
        dd      error4
459
        dd      error5
460
        dd      error6
461
        dd      error7
462
        dd      error8
463
        dd      error9
464
        dd      error10
465
        dd      error11
466
;---------------------------------------------------------------------
4270 heavyiron 467
 
468
title   db appname,version,0
469
 
4213 heavyiron 470
;Lib_DATA
1070 Lrz 471
;Всегда соблюдать последовательность в имени.
4213 heavyiron 472
system_dir_Boxlib       db '/sys/lib/box_lib.obj',0
473
system_dir_ProcLib      db '/sys/lib/proc_lib.obj',0
474
system_dir_libini       db '/sys/lib/libini.obj',0
475
;---------------------------------------------------------------------
1070 Lrz 476
head_f_i:
4213 heavyiron 477
head_f_l        db 'System error',0
1606 mario79 478
 
4213 heavyiron 479
err_message_found_lib1  db 'box_lib.obj - Not found!',0
480
err_message_found_lib2  db 'proc_lib.obj - Not found!',0
481
err_message_found_lib3  db 'libini.obj - Not found!',0
1606 mario79 482
 
4213 heavyiron 483
err_message_import1     db 'box_lib.obj - Wrong import!',0
484
err_message_import2     db 'proc_lib.obj - Wrong import!',0
485
err_message_import3     db 'libini.obj - Wrong import!',0
1606 mario79 486
;---------------------------------------------------------------------
487
l_libs_start:
488
 
489
library01  l_libs system_dir_Boxlib+9, cur_dir_path, library_path, system_dir_Boxlib, \
490
err_message_found_lib1, head_f_l, Box_lib_import, err_message_import1, head_f_i
491
 
492
library02  l_libs system_dir_ProcLib+9, cur_dir_path, library_path, system_dir_ProcLib, \
493
err_message_found_lib2, head_f_l, ProcLib_import, err_message_import2, head_f_i
494
 
4213 heavyiron 495
library03  l_libs system_dir_libini+9, cur_dir_path, library_path, system_dir_libini, \
496
err_message_found_lib3, head_f_l, libini_import, err_message_import3, head_f_i
497
 
1606 mario79 498
end_l_libs:
499
;---------------------------------------------------------------------
500
OpenDialog_data:
4213 heavyiron 501
.type                   dd 1    ; Save
502
.procinfo               dd procinfo     ;+4
503
.com_area_name          dd communication_area_name      ;+8
504
.com_area               dd 0    ;+12
505
.opendir_path           dd temp_dir_path        ;+16
506
.dir_default_path       dd communication_area_default_path      ;+20
507
.start_path             dd open_dialog_path     ;+24
508
.draw_window            dd draw_window  ;+28
509
.status                 dd 0    ;+32
510
.openfile_pach          dd fname_buf    ;+36
511
.filename_area          dd filename_area        ;+40
512
.filter_area            dd Filter
1606 mario79 513
.x:
4213 heavyiron 514
.x_size                 dw 420 ;+48 ; Window X size
515
.x_start                dw 200 ;+50 ; Window X position
1606 mario79 516
.y:
4213 heavyiron 517
.y_size                 dw 320 ;+52 ; Window y size
518
.y_start                dw 120 ;+54 ; Window Y position
1606 mario79 519
 
520
communication_area_name:
4213 heavyiron 521
        db 'FFFFFFFF_open_dialog',0
1606 mario79 522
open_dialog_path:
1702 Lrz 523
if __nightbuild eq yes
524
    db '/sys/MANAGERS/opendial',0
525
else
526
    db '/sys/File Managers/opendial',0
527
end if
4213 heavyiron 528
communication_area_default_path:
529
        db '/',0
1606 mario79 530
 
531
Filter:
4213 heavyiron 532
dd      Filter.end - Filter
1606 mario79 533
.1:
4213 heavyiron 534
db      'IMG',0
535
db      'IMA',0
1606 mario79 536
.end:
4213 heavyiron 537
db      0
1606 mario79 538
 
4213 heavyiron 539
start_temp_file_name:   db 'kolibri.img',0
1606 mario79 540
 
541
;---------------------------------------------------------------------
1070 Lrz 542
align 4
1606 mario79 543
ProcLib_import:
4213 heavyiron 544
OpenDialog_Init         dd aOpenDialog_Init
545
OpenDialog_Start        dd aOpenDialog_Start
1606 mario79 546
        dd      0
547
        dd      0
4213 heavyiron 548
aOpenDialog_Init        db 'OpenDialog_init',0
549
aOpenDialog_Start       db 'OpenDialog_start',0
1606 mario79 550
;---------------------------------------------------------------------
4213 heavyiron 551
PathShow_data_1:
552
.type                   dd 0    ;+0
553
.start_y                dw 36   ;+4
554
.start_x                dw 20   ;+6
555
.font_size_x            dw 6    ;+8     ; 6 - for font 0, 8 - for font 1
556
.area_size_x            dw 270  ;+10
557
.font_number            dd 0    ;+12    ; 0 - monospace, 1 - variable
558
.background_flag        dd 0    ;+16
559
.font_color             dd 0    ;+20
560
.background_color       dd 0    ;+24
561
.text_pointer           dd fname_buf    ;+28
562
.work_area_pointer      dd text_work_area       ;+32
563
.temp_text_length       dd 0    ;+36
564
;---------------------------------------------------------------------
1606 mario79 565
align 4
3634 fedesco 566
Box_lib_import:
4213 heavyiron 567
;edit_box_draw           dd aEdit_box_draw
568
;edit_box_key            dd aEdit_box_key
569
;edit_box_mouse          dd aEdit_box_mouse
570
;version_ed              dd aVersion_ed
485 heavyiron 571
 
4213 heavyiron 572
PathShow_prepare        dd sz_PathShow_prepare
573
PathShow_draw           dd sz_PathShow_draw
574
Frame_draw              dd sz_Frame_draw
575
                        dd 0
576
                        dd 0
1070 Lrz 577
 
4213 heavyiron 578
;aEdit_box_draw          db 'edit_box',0
579
;aEdit_box_key           db 'edit_box_key',0
580
;aEdit_box_mouse         db 'edit_box_mouse',0
581
;aVersion_ed             db 'version_ed',0
1070 Lrz 582
 
4213 heavyiron 583
sz_PathShow_prepare     db 'PathShow_prepare',0
584
sz_PathShow_draw        db 'PathShow_draw',0
1070 Lrz 585
 
4213 heavyiron 586
sz_Frame_draw           db 'frame_draw',0
587
;szVersion_frame        db 'version_frame',0
588
;---------------------------------------------------------------------
589
frame_data:
590
.type                   dd 0 ;+0
591
.x:
592
.x_size                 dw 374 ;+4
593
.x_start                dw 8 ;+6
594
.y:
595
.y_size                 dw 45 ;+8
596
.y_start                dw 17 ;+10
597
.ext_fr_col             dd 0x888888 ;+12
598
.int_fr_col             dd 0xffffff ;+16
599
.draw_text_flag         dd 1 ;+20
600
.text_pointer           dd label1 ;+24
601
.text_position          dd 0 ;+28
602
.font_number            dd 0 ;+32
603
.font_size_y            dd 9 ;+36
604
.font_color             dd 0x0 ;+40
605
.font_backgr_color      dd 0xdddddd ;+44
606
;---------------------------------------------------------------------
607
align 4
608
libini_import:
609
init_lib     dd a_init
610
ini_get_str  dd aini_get_str
611
ini_get_int  dd aini_get_int
612
ini_set_str  dd aini_set_str
613
ini_set_int  dd aini_set_int
614
             dd 0
615
             dd 0
616
a_init       db 'lib_init',0
617
aini_get_str db 'ini_get_str',0
618
aini_get_int db 'ini_get_int',0
619
aini_set_str db 'ini_set_str',0
620
aini_set_int db 'ini_set_int',0
621
;---------------------------------------------------------------------
1070 Lrz 622
 
4213 heavyiron 623
apath db 'path',0
624
asettings db 'settings',0
625
aautoclose db 'autoclose',0
626
path    db '/hd2/1/kolibri.img',0
627
ini_file db  '/sys/settings/rdsave.ini',0
628
;ini_file db  '/sys/rdsave.ini',0
629
;---------------------------------------------------------------------
630
is_notify:
631
    dd    7, 0, ok, 0, 0
632
    db    "/rd/1/@notify", 0
633
 
634
read_folder:
635
.subfunction    dd 1
636
.start          dd 0
637
.flags          dd 0
638
.size           dd 1
639
.return         dd folder_data
640
                db 0
641
.name:          dd check_dir
1070 Lrz 642
 
4213 heavyiron 643
param dd 0
644
hidden dd 0
645
;---------------------------------------------------------------------
646
IM_END:
647
;---------------------------------------------------------------------
648
align 4
649
PARAMS:
650
       rb 256
651
ini_path:
652
        rb 4096
653
check_dir:
654
        rb 4096
1606 mario79 655
 
4213 heavyiron 656
sc     system_colors
1606 mario79 657
 
4213 heavyiron 658
autoclose rd 1
1606 mario79 659
 
4213 heavyiron 660
folder_data:
661
        rb 304*32+32 ; 9 Kb
1606 mario79 662
;---------------------------------------------------------------------
663
cur_dir_path:
4213 heavyiron 664
        rb 4096
1606 mario79 665
;---------------------------------------------------------------------
666
library_path:
4213 heavyiron 667
        rb 4096
1606 mario79 668
;---------------------------------------------------------------------
4213 heavyiron 669
temp_dir_path:
670
        rb 4096
1606 mario79 671
;---------------------------------------------------------------------
672
fname_buf:
4213 heavyiron 673
        rb 4096
1606 mario79 674
;---------------------------------------------------------------------
675
procinfo:
4213 heavyiron 676
        rb 1024
1606 mario79 677
;---------------------------------------------------------------------
678
filename_area:
4213 heavyiron 679
        rb 256
1606 mario79 680
;---------------------------------------------------------------------
681
text_work_area:
4213 heavyiron 682
        rb 1024
1606 mario79 683
;---------------------------------------------------------------------
4213 heavyiron 684
align 32
685
        rb 4096
1606 mario79 686
stacktop:
4213 heavyiron 687
I_END:  ; метка конца программы