Hi!
21-Мар-2004 15:31 [EMAIL PROTECTED] (Bart Oldeman) wrote to
[EMAIL PROTECTED]:
> A few suggestions from Arkady. Saves 5 bytes.
:)
> int nBytesRead, toRead = CHUNK;
> seg sp = start_seg;
> + while (1)
> {
> if (exe_size < CHUNK/16)
> toRead = exe_size*16;
> nBytesRead = (int)DosRWSft(fd, toRead, MK_FP(sp, 0), XFR_READ);
> + if (nBytesRead < toRead || exe_size <= CHUNK/16)
> break;
This is not completely the same: in my code was no "nBytesRead" - BC
for such simple variables usually generates extra code to save AX on stack.
:( Also, I think, "!=" is more precise (and safe! - no issues with
signed/unsigned comparisions) condition, than "<".
PS: Bart, please, explain, why kernel returns nonzero root_entries filed in
current BPB32 (whereas both default BPB and boot record contain zero in this
field)?
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click
_______________________________________________
Freedos-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freedos-devel