I've tried several times, and it's all like this. The input and output related to the process are displayed as pasted above. Even if I have an input error (referring to grammatical errors), your program shouldn't execute but should give a usage prompt, right? And interestingly, the content of the error sector saved each time is different, heh.
The delay mainly occurs between "100% sectors done." and the last line "Done." displayed. I'm only reading one sector, and even on a 386 machine, there shouldn't be a perceptible delay. You write about ten thousand sectors and it only takes about 2 or 3 seconds, and I estimate there's about a half-second delay.
You can refer to my DOS memory configuration environment here:
http://www.cn-dos.net/forum/viewthread.php?tid=21215
The DOS version used is MS-DOS 6.22.
Strangely, when I tested in the DOS window of Windows 98, I could get the correct result (only reading the MBR).
But now, let you know a good news, I found the cause of the problem. It turned out to be due to loading the DMA driver under DOS. The DMA driver I'm using is version 2.7 of UDMA2.
Also, I don't know what compiler you're using, why can you mix the comment styles of C and C++?
The delay mainly occurs between "100% sectors done." and the last line "Done." displayed. I'm only reading one sector, and even on a 386 machine, there shouldn't be a perceptible delay. You write about ten thousand sectors and it only takes about 2 or 3 seconds, and I estimate there's about a half-second delay.
You can refer to my DOS memory configuration environment here:
http://www.cn-dos.net/forum/viewthread.php?tid=21215
The DOS version used is MS-DOS 6.22.
Strangely, when I tested in the DOS window of Windows 98, I could get the correct result (only reading the MBR).
But now, let you know a good news, I found the cause of the problem. It turned out to be due to loading the DMA driver under DOS. The DMA driver I'm using is version 2.7 of UDMA2.
Also, I don't know what compiler you're using, why can you mix the comment styles of C and C++?
DOS倒下了,但永远不死
DOS NEVER DIES !
投票调查:
http://www.cn-dos.net/forum/viewthread.php?tid=46187
本人尚未解决的疑难问题:
http://www.cn-dos.net/forum/viewthread.php?tid=15135
http://www.cn-dos.net/forum/viewthread.php?tid=47663
http://www.cn-dos.net/forum/viewthread.php?tid=48747
DOS NEVER DIES !
投票调查:
http://www.cn-dos.net/forum/viewthread.php?tid=46187
本人尚未解决的疑难问题:
http://www.cn-dos.net/forum/viewthread.php?tid=15135
http://www.cn-dos.net/forum/viewthread.php?tid=47663
http://www.cn-dos.net/forum/viewthread.php?tid=48747

