LinkExchange

DOS/4G FAQ, Section 7:
File I/O


Do you have any suggestions for speeding up file I/O?

The best way to speed up DOS file I/O in DOS/4G is to write large blocks (up to 65535 bytes, or the largest number that will fit in a 16-bit int) at a time from a buffer in low memory. In this case, DOS/4G has to copy the least amount of data and make the fewest number of DOS calls in order to process the I/O request.

Low memory is allocated through Interrupt 31h/0100h (Allocate DOS Memory Block). You can convert the real mode segment address returned by Interrupt 31h/100h to a pointer (suitable for passing to setvbuf()) by shifting it left four bits.


[Previous Section] * [Index of FAQ] * [Next Section]
Last modified 97/04/11, webmaster@tenberry.com