18,7 → 18,7 |
|
pushad |
|
mov esi, [_rd_fat] |
mov esi,RAMDISK+512 |
mov edi,RAMDISK_FAT |
|
fcnew: |
56,7 → 56,7 |
pushad |
|
mov esi,RAMDISK_FAT |
mov edi, [_rd_fat] |
mov edi,RAMDISK+512 |
|
fcnew2: |
mov eax,dword [esi] |
72,11 → 72,11 |
add edi,6 |
add esi,8 |
|
cmp edi, [_rd_fat_end] ;4274 bytes - all used FAT |
cmp edi,RAMDISK+512+4278 ;4274 bytes - all used FAT |
jb fcnew2 |
|
mov esi,[_rd_fat] ; duplicate fat chain |
lea edi,[esi+0x1200] |
mov esi,RAMDISK+512 ; duplicate fat chain |
mov edi,RAMDISK+512+0x1200 |
mov ecx,1069 ;4274/4 |
cld |
rep movsd |
208,7 → 208,7 |
sub ecx,edx |
fr_do1: |
shl ebx,9 |
mov esi, [_rd_root] |
mov esi,RAMDISK+512*19 |
add esi,ebx |
shl ecx,7 |
cld |
252,7 → 252,7 |
|
add eax,31 ;bootsector+2*fat+filenames |
shl eax,9 ;*512 |
add eax, [_rd_base] ;image base |
add eax,RAMDISK ;image base |
mov ebx,[esp+8] |
mov ecx,512 ;[esp+4] |
|
304,7 → 304,7 |
;by Mihasik |
;IN: eax - pointer to filename OUT: filestring+11 in edi or notZero in flags and fnf in eax,ebx |
|
mov edi, [_rd_root] ;Point at directory |
mov edi,RAMDISK+512*18+512 ;Point at directory |
cld |
rd_newsearch: |
mov esi,eax |
313,7 → 313,7 |
je rd_ff |
add cl,21 |
add edi,ecx |
cmp edi, [_rd_root_end] |
cmp edi,RAMDISK+512*33 |
jb rd_newsearch |
mov eax,5 ;if file not found - eax=5 |
xor ebx,ebx |
750,12 → 750,12 |
ret |
|
ramdisk_root_first: |
mov edi, [_rd_root] |
mov edi, RAMDISK+512*19 |
clc |
ret |
ramdisk_root_next: |
add edi, 0x20 |
cmp edi, [_rd_root_end] |
cmp edi, RAMDISK+512*33 |
cmc |
ret |
|
793,8 → 793,7 |
cmp eax, 2849 |
jae .err |
shl eax, 9 |
lea edi, [eax+(31 shl 9)] |
add edi, [_rd_base] |
lea edi, [eax+(31 shl 9)+RAMDISK] |
clc |
ret |
.err2: |
824,8 → 823,7 |
mov [RAMDISK_FAT+ecx*2], di |
mov [eax], edi |
shl edi, 9 |
add edi, (31 shl 9) |
add edi, [_rd_base] |
add edi, (31 shl 9)+RAMDISK |
mov [esp], edi |
xor eax, eax |
mov ecx, 128 |
936,7 → 934,7 |
jae .eof |
lea eax, [edi+31] ; bootsector+2*fat+filenames |
shl eax, 9 ; *512 |
add eax, [_rd_base] ; image base |
add eax, RAMDISK ; image base |
; now eax points to data of cluster |
sub ebx, 512 |
jae .skip |
1025,7 → 1023,7 |
.main_loop: |
mov edi, eax |
shl edi, 9 |
add edi, [_rd_base] |
add edi, RAMDISK |
push eax |
.l1: |
call fat_get_name |
1050,7 → 1048,7 |
@@: |
mov edi, eax |
shl edi, 9 |
add edi, [_rd_base] |
add edi, RAMDISK |
push eax |
.do_bdfe: |
inc dword [edx+8] ; new file found |
1696,8 → 1694,7 |
cmp byte [esp+16+20+28], 0 |
jnz .writedir |
shl eax, 9 |
add eax, 31*512 |
add eax, [_rd_base] |
add eax, RAMDISK+31*512 |
.writefile: |
mov ebx, edx |
xchg eax, ebx |
1736,8 → 1733,7 |
.writedir: |
mov edi, eax |
shl edi, 9 |
add edi, [_rd_base] |
add edi, 31*512 |
add edi, RAMDISK+31*512 |
mov esi, edx |
mov ecx, 32/4 |
push ecx |
1886,8 → 1882,7 |
@@: |
mov eax, edi |
shl eax, 9 |
add eax, [_rd_base] |
add eax, 31*512+0x200 |
add eax, RAMDISK+31*512+0x200 |
sub eax, ebx |
mov ebx, eax |
mov eax, edx |
1941,8 → 1936,7 |
push eax edi |
mov edi, eax |
shl edi, 9 |
add edi, [_rd_base] |
lea edi, [edi+31*512+0x200+ecx] |
lea edi, [edi+RAMDISK+31*512+0x200+ecx] |
neg ecx |
xor eax, eax |
rep stosb |
1984,8 → 1978,7 |
@@: |
push edi |
shl edi, 9 |
add edi, [_rd_base] |
add edi, 31*512 |
add edi, RAMDISK+31*512 |
xor eax, eax |
mov ecx, 512/4 |
rep stosd |
2089,8 → 2082,7 |
push ecx |
mov edi, ecx |
shl edi, 9 |
add edi, [_rd_base] |
lea edi, [edi+31*512+eax+0x200] |
lea edi, [edi+RAMDISK+31*512+eax+0x200] |
mov ecx, eax |
neg ecx |
xor eax, eax |
2203,8 → 2195,7 |
push ebx |
mov ebx, eax |
shl ebx, 9 |
add ebx, [_rd_base] |
add ebx, 31*0x200 + 2*0x20 |
add ebx, RAMDISK + 31*0x200 + 2*0x20 |
.checkempty: |
cmp byte [ebx], 0 |
jz .empty |
2218,8 → 2209,7 |
jz .empty |
mov ebx, eax |
shl ebx, 9 |
add ebx, [_rd_base] |
add ebx, 31*0x200 |
add ebx, RAMDISK + 31*0x200 |
jmp .checkempty |
.notempty: |
pop ebx |
2245,8 → 2235,7 |
pop [rd_prev_sector] |
or [rd_prev_prev_sector], -1 |
shl edi, 9 |
add edi, [_rd_base] |
add edi, 31*0x200 + 0x200 |
add edi, RAMDISK + 31*0x200 + 0x200 |
@@: |
sub edi, 0x20 |
cmp byte [edi], 0xE5 |