Rev 593 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 593 | Rev 1229 | ||
---|---|---|---|
Line 6... | Line 6... | ||
6 | ;; FAT12.INC ;; |
6 | ;; FAT12.INC ;; |
7 | ;; (C) 2005 Mario79, License: GPL ;; |
7 | ;; (C) 2005 Mario79, License: GPL ;; |
8 | ;; ;; |
8 | ;; ;; |
9 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
9 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
Line 10... | Line 10... | ||
10 | 10 | ||
Line 11... | Line 11... | ||
11 | $Revision: 593 $ |
11 | $Revision: 1229 $ |
12 | 12 | ||
13 | 13 | ||
Line 86... | Line 86... | ||
86 | mov esi,FLOPPY_BUFF |
86 | mov esi,FLOPPY_BUFF |
87 | add esi,ebx |
87 | add esi,ebx |
88 | shl ecx,9 |
88 | shl ecx,9 |
89 | cld |
89 | cld |
90 | rep movsb |
90 | rep movsb |
- | 91 | xor eax,eax |
|
- | 92 | xor ebx,ebx |
|
91 | mov eax,0 ; ok read |
93 | ; mov eax,0 ; ok read |
92 | mov ebx,0 |
94 | ; mov ebx,0 |
93 | mov [flp_status],0 |
95 | mov [flp_status],eax |
94 | ret |
96 | ret |
95 | fdc_status_error_1: |
97 | fdc_status_error_1: |
- | 98 | xor eax,eax |
|
96 | mov [flp_status],0 |
99 | mov [flp_status],eax |
97 | mov eax,10 |
100 | mov eax,10 |
98 | mov ebx,-1 |
101 | or ebx,-1 |
99 | ret |
102 | ret |
Line 100... | Line 103... | ||
100 | 103 | ||
101 | fr_noroot_1: |
104 | fr_noroot_1: |
102 | sub esp,32 |
105 | sub esp,32 |
103 | call expand_filename |
106 | call expand_filename |
104 | frfloppy_1: |
107 | frfloppy_1: |
105 | cmp ebx,0 |
108 | test ebx,ebx |
106 | jne frfl5_1 |
109 | jnz frfl5_1 |
107 | mov ebx,1 |
110 | mov ebx,1 |
108 | frfl5_1: |
111 | frfl5_1: |
109 | cmp ecx,0 |
112 | test ecx,ecx |
110 | jne frfl6_1 |
113 | jnz frfl6_1 |
111 | mov ecx,1 |
114 | mov ecx,1 |
112 | frfl6_1: |
115 | frfl6_1: |
113 | dec ebx |
116 | dec ebx |
114 | push eax |
117 | push eax |
Line 135... | Line 138... | ||
135 | rep cmpsb ;Found the file? |
138 | rep cmpsb ;Found the file? |
136 | je fifound_1 ;Yes |
139 | je fifound_1 ;Yes |
137 | add ecx,21 |
140 | add ecx,21 |
138 | add edi, ecx ;Advance to next entry |
141 | add edi, ecx ;Advance to next entry |
139 | dec dl |
142 | dec dl |
140 | cmp dl,0 |
143 | test dl,dl |
141 | jne l.21_1 |
144 | jnz l.21_1 |
142 | dec dh |
145 | dec dh |
143 | cmp dh,0 |
146 | test dh,dh |
144 | jne l.20_1 |
147 | jnz l.20_1 |
145 | fdc_status_error_3: |
148 | fdc_status_error_3: |
146 | mov eax,5 ; file not found ? |
149 | mov eax,5 ; file not found ? |
147 | mov ebx,-1 |
150 | or ebx,-1 |
148 | add esp,32+28 |
151 | add esp,32+28 |
149 | mov [flp_status],0 |
152 | mov [flp_status],0 |
150 | ret |
153 | ret |
151 | fdc_status_error_3_2: |
154 | fdc_status_error_3_2: |
152 | cmp [FDC_Status],0 |
155 | cmp [FDC_Status],0 |
Line 230... | Line 233... | ||
230 | frnoread_1: |
233 | frnoread_1: |
231 | pop edi esi edx ecx |
234 | pop edi esi edx ecx |
232 | add esp,4 |
235 | add esp,4 |
233 | pop ebx ; ebx <- eax : size of file |
236 | pop ebx ; ebx <- eax : size of file |
234 | add esp,36 |
237 | add esp,36 |
235 | mov eax,0 |
238 | xor eax,eax |
236 | mov [flp_status],0 |
239 | mov [flp_status],eax |
237 | ret |
240 | ret |
Line 238... | Line 241... | ||
238 | 241 | ||
239 | fdc_status_error_5: |
242 | fdc_status_error_5: |
240 | pop edi esi edx ecx |
243 | pop edi esi edx ecx |
Line 497... | Line 500... | ||
497 | xor edx,edx |
500 | xor edx,edx |
498 | mov ebx,2 |
501 | mov ebx,2 |
499 | div ebx |
502 | div ebx |
500 | mov [FDD_Track],al |
503 | mov [FDD_Track],al |
501 | mov [FDD_Head],0 |
504 | mov [FDD_Head],0 |
502 | cmp edx,0 |
505 | test edx,edx |
503 | je no_head_2 |
506 | jz no_head_2 |
504 | inc [FDD_Head] |
507 | inc [FDD_Head] |
505 | no_head_2: |
508 | no_head_2: |
506 | mov dl,[old_track] |
509 | mov dl,[old_track] |
507 | cmp dl,[FDD_Track] |
510 | cmp dl,[FDD_Track] |
508 | je no_seek_track_1 |
511 | je no_seek_track_1 |