Subversion Repositories Kolibri OS

Rev

Rev 129 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 129 Rev 384
Line -... Line 1...
-
 
1
iglobal
-
 
2
saverd_fileinfo:
-
 
3
        dd      2               ; subfunction: write
-
 
4
        dd      0               ; (reserved)
-
 
5
        dd      0               ; (reserved)
-
 
6
        dd      1440*1024       ; size 1440 Kb
-
 
7
        dd      0x100000 - std_application_base_address ; base address
-
 
8
        db      0
-
 
9
.name:
-
 
10
        dd      ?
-
 
11
endg
1
sysfn_saveramdisk:    ; 18.6 = SAVE FLOPPY IMAGE (HD version only)
12
sysfn_saveramdisk:      ; 18.6 = SAVE FLOPPY IMAGE (HD version only)
2
     cmp  ebx,1
-
 
3
     jnz  img_save_hd_1
13
        call    restorefatchain
4
     mov  edx,bootpath             ; path = '/KOLIBRI    '
14
        mov     eax, saverd_fileinfo - std_application_base_address
5
     jmp  img_save_hd_3
15
        mov     [saverd_fileinfo.name], ebx
6
 img_save_hd_1:
-
 
7
     cmp  ebx,2
16
        pushad
8
     jnz  img_save_hd_2
-
 
9
     mov  edx,bootpath2             ; path = 0 (root dir)
-
 
10
     jmp  img_save_hd_3
-
 
11
 img_save_hd_2:
-
 
12
     cmp  ebx,3
17
        push    eax
13
     jnz  exit_for_anyone
-
 
14
     mov edx,[0x3010]
-
 
15
     mov edx,[edx+TASKDATA.mem_start]
-
 
16
     add edx,ecx
-
 
17
 img_save_hd_3:
-
 
18
     call    reserve_hd1
18
        call    file_system_lfn
19
     call restorefatchain      ; restore FAT !!!
-
 
20
     mov  eax,image_save
19
        pop     eax
21
     mov  ebx,1440*1024        ; size 1440 Kb
-
 
22
     mov  ecx,0x100000         ; address of image
-
 
23
     call file_write
20
        popad
24
     mov  [esp+36],eax
21
        mov     [esp+36], eax
25
     ret
22
        ret