|
GOTOmsdos
铂金会员
       C++启程者
积分 5154
发帖 1827
注册 2003-7-18
状态 离线
|
『楼 主』:
****压缩分卷!扇区/镜象/扇区读写] 迷你硬盘读写器完工了B
使用 LLM 解释/回答一下
DOS下迷你硬盘读写器终于完工了!
可读写绝对扇区,支持大硬盘,U盘(需加载驱动),软盘。。
由于代码效率高,速度很快。
初步通过测试。
最后在自己的机子上大胆进行了写测试,即用坏数据写入硬盘,硬盘崩溃后,再用本程序把预先备份的数据恢复到硬盘,结果硬盘完好如初。。
有源码大家玩玩。。。
对不起:第一次传错了可执行文件,现在重传了。。
刚加了如果读写出错,给原因的提示
换成了 C 的注释,这样,不用TC3(BC31),TC2就可编译了
刚解决了基本INT13不出现出错提示的BUG..
除了考虑到能读写2048GB,没有加入起始扇区和要处理的扇区参数的对误输入负数的检测外(,否则的话,只能读写1024GB左右了.)对其他几个输入参数都进行了检测..
考虑 DOSFOREVER 的中肯意见
今天 加了 如果 不支持扩展13中断,就先获取硬盘本身的参数来显示出来,调用基本13中断以其参数CHS值来读写,这样就兼容了 非 磁头255,扇区63 的硬盘(也就是很老的硬盘),这样程序的兼容性就很强了。。
也加入了读写 "非1.44mb"软盘的功能, 说明见主帖。。。
另,即使支持扩展,也根据扩展48号功能,获取硬盘参数,显示出来。
显示出硬盘参数,能让用户心中有数。。。
另,把扩展13的读写缓冲增为100扇区的字节数,这样速度就更快了!
(不能再超过了,否则,就超过了文件读写的最大数了)
程序到此 ,基本告一段落了。。。
需要在扩展程序功能的,可在程序上再加上去吧。。
欢迎大家下载玩玩。。。
希望对有兴趣的有点帮助。。
***********************************
%%%%%%%%%%%%%%%%%%%%%%%%%%%
已成功加入了压缩和分卷功能!并采用LINUX帮助风格。。。
初步通过了测试!欢迎试玩!。。
主帖程序更新了!
Last edited by GOTOmsdos on 2006-8-8 at 12:14 ]
The mini hard disk reader and writer under DOS is finally completed!
Can read and write absolute sectors, support large hard disks, USB flash drives (need to load drivers), and floppy disks..
Due to high code efficiency, it is very fast.
Preliminarily passed the test.
Finally, a bold write test was carried out on my own machine, that is, writing bad data to the hard disk. After the hard disk crashed, the pre-backed-up data was restored to the hard disk with this program, and the hard disk was as good as new..
There is source code for everyone to play with...
Sorry: The first time I uploaded the wrong executable file, now I have re-uploaded it.
Just added a prompt for the reason if there is a reading or writing error
Replaced with C comments, so it can be compiled without TC3 (BC31), TC2
Just solved the BUG that the basic INT13 does not show the error prompt..
In addition to considering being able to read and write 2048GB, the detection of negative numbers for incorrect input of the starting sector and the number of sectors to be processed is not added (otherwise, it can only read and write about 1024GB). Detection has been carried out for the other several input parameters..
Considering the objective opinions of DOSFOREVER
Today, added that if the extended 13 interrupt is not supported, the parameters of the hard disk itself are first obtained and displayed, and the basic 13 interrupt is called to read and write with its CHS value, so that it is compatible with hard disks that are not 255 heads and 63 sectors (that is, very old hard disks), so that the compatibility of the program is very strong..
Also added the function of reading and writing "non-1.44mb" floppy disks, and the instructions are in the main post...
In addition, even if the extension is supported, the hard disk parameters are obtained according to the extended 48th function and displayed.
Displaying the hard disk parameters can make the user have a clear understanding..
In addition, the read-write buffer of the extended 13 is increased to the number of bytes of 100 sectors, so that the speed is faster!
(Can't exceed this anymore, otherwise, it will exceed the maximum number of file reads and writes)
The program is basically coming to an end here...
If you need to expand the program functions, you can add them to the program..
Everyone is welcome to download and play..
I hope it will be a little helpful for those who are interested..
***********************************
%%%%%%%%%%%%%%%%%%%%%%%%%%%
Successfully added compression and volume splitting functions! And adopted the Linux help style...
Preliminarily passed the test! Welcome to try out!..
The main post program has been updated!
Last edited by GOTOmsdos on 2006-8-8 at 12:14 ]
附件
1: mydisk.rar (2006-8-6 22:18, 170.57 KiB, 下载附件所需积分 1 点
,下载次数: 339)
|
|
2006-7-8 02:29 |
|
|
asbai
高级用户
   
积分 653
发帖 252
注册 2006-4-16
状态 离线
|
『第 2 楼』:
使用 LLM 解释/回答一下
支持一下GOTOmsdos兄!
Give support to Brother GOTOmsdos!
|
|
2006-7-8 03:26 |
|
|
crshen
中级用户
  
积分 447
发帖 126
注册 2004-2-10
状态 离线
|
『第 3 楼』:
使用 LLM 解释/回答一下
深更半夜发贴子,看来颇费了一番精力,估计就是 C语言和汇编语言结合的 扩展INT13编程吧,好像暂时用不着,不过还是下载看看,支持
Posting in the middle of the night, it seems you've put in quite some effort. It's estimated to be about the extended INT13 programming combining C language and assembly language. It might not be needed for now, but I'll still download it and support it.
|

从来不用别人的东西,要用,也先改成自己的再说! |
|
2006-7-8 12:18 |
|
|
GOTOmsdos
铂金会员
       C++启程者
积分 5154
发帖 1827
注册 2003-7-18
状态 离线
|
『第 4 楼』:
使用 LLM 解释/回答一下
感谢关注,
这几天在弄硬盘读写,DOS和2K/XP的都有,刚全部完工,都在熬夜。。
主要是扩展INT13和基本INT13,INT25,INT26结合。。
由于是命令行方式,所以,如果有程序需要以命令行方式读写硬盘扇区的话,就能用它解决问题了。。
Last edited by GOTOmsdos on 2006-7-8 at 12:35 ]
Thanks for your attention,
These days I've been working on hard disk reading and writing, both for DOS and 2K/XP, and just finished all of it, staying up late.
Mainly expanding INT13 and basic INT13, combining INT25 and INT26..
Since it's in command line mode, so if there are programs that need to read and write hard disk sectors in command line mode, this can solve the problem..
Last edited by GOTOmsdos on 2006-7-8 at 12:35 ]
|
|
2006-7-8 12:32 |
|
|
gmy
版主
        操作系统爱好者
积分 1113
发帖 392
注册 2002-11-11
状态 离线
|
|
2006-7-8 17:59 |
|
|
MySOFT2006
初级用户
 
积分 55
发帖 22
注册 2006-5-26
状态 离线
|
|
2006-7-8 18:40 |
|
|
GOTOmsdos
铂金会员
       C++启程者
积分 5154
发帖 1827
注册 2003-7-18
状态 离线
|
|
2006-7-8 23:49 |
|
|
johnsonlam
银牌会员
     阿林
积分 1410
发帖 497
注册 2004-6-28 来自 九龍,香港
状态 离线
|
『第 8 楼』:
使用 LLM 解释/回答一下
Originally posted by GOTOmsdos at 2006-7-8 02:29 AM:
DOS下迷你硬盘读写器终于完工了!
可读写绝对扇区,支持大硬盘,U盘(需加载驱动),软盘。。
由于代码效率高,速度很快。
支 持 ! 辛 苦 了 gotoMSDOS 兄 熬 夜 編 程 ...
請 問 甚 麼 是 U 盤 ?
有 些 意 見 :
1) 記 得 從 前 玩 Apple]
dolba
Example:
Read to file: dolba r 2 0 254 c:\backup
Write from file: dolba w 2 0 c:\backup
謝 謝 分 享 !
Originally posted by GOTOmsdos at 2006-7-8 02:29 AM:
The mini hard disk reader/writer under DOS is finally completed!
Can read and write absolute sectors, support large hard disks, USB flash drives (need to load drivers), and floppy disks.
Due to high code efficiency, it is very fast.
Support! Thanks for your hard work, Brother gotoMSDOS, staying up late to program...
What is a USB flash drive?
Some suggestions:
1) I remember when playing Apple]
dolba
Example:
Read to file: dolba r 2 0 254 c:\backup
Write from file: dolba w 2 0 c:\backup
Thanks for sharing!
|

我 的 網 站 - http://optimizr.dyndns.org
|
|
2006-7-9 02:03 |
|
|
Michael
钻石会员
       
积分 10046
发帖 3039
注册 2002-11-11
状态 离线
|
『第 9 楼』:
使用 LLM 解释/回答一下
回楼上,U盘就是flash drive
Go back to the upper floor, the USB flash drive is flash drive
|

简单就是美 |
|
2006-7-9 02:16 |
|
|
johnsonlam
银牌会员
     阿林
积分 1410
发帖 497
注册 2004-6-28 来自 九龍,香港
状态 离线
|
|
2006-7-9 02:33 |
|
|
GOTOmsdos
铂金会员
       C++启程者
积分 5154
发帖 1827
注册 2003-7-18
状态 离线
|
『第 11 楼』:
使用 LLM 解释/回答一下
感谢关注
dolba
这样好像不妥当
因为只有 当 w 时 才可 省略 sectorToDo
所以写成两行 才清楚:
dolba r|w driveNum startSector sectorToDo file
dolba w driveNum startSector file
Last edited by GOTOmsdos on 2006-7-9 at 03:33 ]
Thanks for your attention
dolba
This doesn't seem appropriate
Because only when w, can sectorToDo be omitted
So writing two lines is clearer:
dolba r|w driveNum startSector sectorToDo file
dolba w driveNum startSector file
Last edited by GOTOmsdos on 2006-7-9 at 03:33 ]
|
|
2006-7-9 03:32 |
|
|
DOSforever
金牌会员
     
积分 4639
发帖 2239
注册 2005-1-30
状态 离线
|
『第 12 楼』:
使用 LLM 解释/回答一下
下载后测试了一下,就以读取第一个硬盘的主引导扇区为例,过程显示如下:
dolba r 2 0 1 sec0
dolba version 1.0 Copyright (c) 2006 by GOTOmsdos Email: tdaim@sina.com
Read :
Drive 2
Starting sector 0
1 Sectors
To :
File "sec0" ? (Y/N)y
Extended int13 supported.
Press Esc to stop.
100% sectors done.
Done.
没想到读出的不是主引导扇区的内容,也不知道是哪个扇区的。但如果使用 DOS 的缺省环境,即不使用 config.sys 和 autoexec.bat 的内存配置环境下读出的内容却正常。另外,按理做一个扇区的操作应该是很快的事,即便是几个扇区,在现在的机器上也应该在瞬间完成,但我这次读取MBR到文件的测试过程却可以察觉到人可以感觉得到的延迟(在有 config.sys 和 autoexec.bat 的内存配置环境下)。
After downloading, I tested it. Taking reading the master boot sector of the first hard drive as an example, the process is shown as follows:
dolba r 2 0 1 sec0
dolba version 1.0 Copyright (c) 2006 by GOTOmsdos Email: tdaim@sina.com
Read :
Drive 2
Starting sector 0
1 Sectors
To :
File "sec0" ? (Y/N)y
Extended int13 supported.
Press Esc to stop.
100% sectors done.
Done.
Unexpectedly, the content read is not the content of the master boot sector, and I don't know which sector it is. But if the default DOS environment is used, that is, the memory configuration environment without config.sys and autoexec.bat is used, the read content is normal. In addition,按理说 an operation of one sector should be a very quick thing. Even if there are several sectors, it should be completed in an instant on the current machine, but the test process of my reading the MBR to a file this time can be perceived by people with a noticeable delay (in the memory configuration environment with config.sys and autoexec.bat).
|

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 |
|
2006-7-9 04:43 |
|
|
johnsonlam
银牌会员
     阿林
积分 1410
发帖 497
注册 2004-6-28 来自 九龍,香港
状态 离线
|
『第 13 楼』:
使用 LLM 解释/回答一下
Originally posted by GOTOmsdos at 2006-7-9 03:32 AM:
感谢关注
dolba
这样好像不妥当
因为只有 当 w 时 才可 省略 sectorToDo
我 原 意 是 把 參 數 括 起 來 , 沒 括 起 看 得 不 清 楚 , 有 範 例 參 考 比 較 不 易 出 錯 。
Originally posted by GOTOmsdos at 2006-7-9 03:32 AM:
Thanks for your attention
dolba
This doesn't seem appropriate
Because only when w can sectorToDo be omitted
My original intention was to enclose the parameters, but it was not clear without enclosing. Having examples for reference is less error-prone.
|

我 的 網 站 - http://optimizr.dyndns.org
|
|
2006-7-9 13:45 |
|
|
GOTOmsdos
铂金会员
       C++启程者
积分 5154
发帖 1827
注册 2003-7-18
状态 离线
|
『第 14 楼』:
使用 LLM 解释/回答一下
TO DOSforever
看了你说的情况,不知道是什么原因,如果你的输入没问题的话,找你说的,跟CONFIG.SYS,AUTOEXEC.BAT有关。
如果这是真的,就有点匪夷所思了,照理说,CONFIG.SYS,AUTOEXEC.BAT配置不可能对硬盘结构造成什么影响(我也一直用着其配置)
不妨把你的造成“影响”的CONFIG.SYS,AUTOEXEC.BAT配置贴出来,看一下。
另,最好重试一下,确认操作输入无误。。
建议烦请您,作个小试验吧:
在同样的CONFIG.SYS,AUTOEXEC.BAT配置下,试一下用其他读写硬盘扇区的工具也作同样的事,看看结果如何?如果此工具成功,而我的程序不成功,那就说明我的程序前考虑了。。
至于速度,
我的机子是733,应该说较老了, 速度非成快,(感觉比SPFDISK,DISKEDIT 还要快一点,可能没有引入 写校验,因为我觉得没必要,况且影响速度)
比如,写一万个扇区,大约只需要2,3秒。10万个扇区大约在半分钟左右。
这几天一直在测试,先用SPFDISK存一遍,然后用我的程序存,然后 FC /B 他们,
都一样。 并进行了好几次写操作,目前没有问题(有几个BUG,已改正了)
其他坛友,如有兴趣,可测试一下读操作。。看结果怎样?
最后,测8.4g外, 就是超过16434494扇区。
刚刚又改进更新了代码。。
Last edited by GOTOmsdos on 2006-7-9 at 20:02 ]
TO DOSforever
After reading the situation you described, I don't know the reason. If your input is correct, it might be related to what you mentioned about CONFIG.SYS and AUTOEXEC.BAT.
If this is true, it's a bit strange. Logically speaking, the configurations of CONFIG.SYS and AUTOEXEC.BAT shouldn't have an impact on the hard disk structure (I've been using such configurations all the time).
不妨 put your "influencing" CONFIG.SYS and AUTOEXEC.BAT configurations here for us to take a look.
Also, it's best to retry to confirm that the operation input is correct..
It is suggested that you do a small test:
Under the same CONFIG.SYS and AUTOEXEC.BAT configurations, try using other tools that read and write hard disk sectors to do the same thing and see the result? If this tool succeeds and my program doesn't, then it means there's an issue with my program.
As for the speed,
My computer is 733, which is relatively old. The speed is not extremely fast, (it feels a bit faster than SPFDISK, DISKEDIT, maybe because I didn't introduce write verification, because I don't think it's necessary, and it affects the speed)
For example, writing ten thousand sectors takes only about 2 or 3 seconds. Writing one hundred thousand sectors takes about half a minute.
I've been testing these days. First, I save with SPFDISK, then with my program, then FC /B them,
they are all the same. And I've done several write operations, and there are no problems at present (a few bugs have been fixed).
Other forum users, if interested, can test the read operation. See how the result is?
Finally, testing beyond 8.4g is, that is, exceeding 16434494 sectors.
Just updated the code with improvements again.
Last edited by GOTOmsdos on 2006-7-9 at 20:02 ]
|
|
2006-7-9 17:03 |
|
|
GOTOmsdos
铂金会员
       C++启程者
积分 5154
发帖 1827
注册 2003-7-18
状态 离线
|
『第 15 楼』:
使用 LLM 解释/回答一下
Originally posted by johnsonlam at 2006-7-9 01:45 PM:
我 原 意 是 把 參 數 括 起 來 , 沒 括 起 看 得 不 清 楚 , 有 範 例 參 考 比 較 不 易 出 錯 。
可是方括号是表示可选的意思啊!不是表美观的啊。。
Originally posted by johnsonlam at 2006-7-9 01:45 PM:
I originally intended to enclose the parameters, but without enclosing them makes it unclear. Having examples for reference is less likely to make mistakes.
But square brackets indicate optional, not for aesthetics!
|
|
2006-7-9 17:08 |
|