Rev 5363 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5363 | Rev 8064 | ||
---|---|---|---|
Line 4... | Line 4... | ||
4 | ;; Distributed under terms of the GNU General Public License ;; |
4 | ;; Distributed under terms of the GNU General Public License ;; |
5 | ;; ;; |
5 | ;; ;; |
6 | ;; RAMDISK functions ;; |
6 | ;; RAMDISK functions ;; |
7 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
7 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
Line 8... | Line 8... | ||
8 | 8 | ||
Line 9... | Line 9... | ||
9 | $Revision: 5363 $ |
9 | $Revision: 8064 $ |
10 | 10 | ||
11 | iglobal |
11 | iglobal |
12 | align 4 |
12 | align 4 |
Line 43... | Line 43... | ||
43 | stdcall disk_media_changed, eax, 1 |
43 | stdcall disk_media_changed, eax, 1 |
44 | ; 2. We don't know actual size of loaded image, |
44 | ; 2. We don't know actual size of loaded image, |
45 | ; so try to calculate it using partition structure, |
45 | ; so try to calculate it using partition structure, |
46 | ; assuming that file systems fill the real size based on contents of the partition. |
46 | ; assuming that file systems fill the real size based on contents of the partition. |
47 | ; 2a. Prepare for loop over partitions. |
47 | ; 2a. Prepare for loop over partitions. |
- | 48 | xor eax, eax |
|
48 | xor ecx, ecx |
49 | xor ecx, ecx |
49 | xor edx, edx |
50 | xor edx, edx |
50 | ; 2b. Check that at least one partition was recognized. |
51 | ; 2b. Check that at least one partition was recognized. |
51 | cmp [ebx+DISK.NumPartitions], ecx |
52 | cmp [ebx+DISK.NumPartitions], ecx |
52 | jz .fail |
53 | jz .fail |
Line 78... | Line 79... | ||
78 | call free_page |
79 | call free_page |
79 | add edx, 0x1000 |
80 | add edx, 0x1000 |
80 | dec esi |
81 | dec esi |
81 | jnz @b |
82 | jnz @b |
82 | .no_reclaim: |
83 | .no_reclaim: |
- | 84 | mov eax, ebx |
|
83 | pop esi ebx ; restore used registers to be stdcall |
85 | pop esi ebx ; restore used registers to be stdcall |
84 | ret |
86 | ret |
85 | .fail: |
87 | .fail: |
86 | dbgstr 'Failed to initialize ramdisk' |
88 | dbgstr 'Failed to initialize ramdisk' |
87 | pop esi ebx ; restore used registers to be stdcall |
89 | pop esi ebx ; restore used registers to be stdcall |