|
nre
银牌会员
     nre
积分 1210
发帖 361
注册 2002-12-28
状态 离线
|
『楼 主』:
谁有能对软盘和硬盘的引导扇区进行读写操作的小程序
使用 LLM 解释/回答一下
DOS下用的,越小越好
For use under DOS, as small as possible
|

Teamwork ! |
|
2004-3-7 00:00 |
|
|
gotomsdos
铂金会员
       C++启程者
积分 5154
发帖 1827
注册 2003-7-18
状态 离线
|
『第 2 楼』:
使用 LLM 解释/回答一下
debug不是最合适吗?有了它还需要其他吗?
Isn't debug the most suitable? Do you need anything else with it?
|
|
2004-3-8 00:00 |
|
|
chrysalis
初级用户
 
积分 152
发帖 10
注册 2004-3-6
状态 离线
|
『第 3 楼』:
使用 LLM 解释/回答一下
我看到一本光盘刻录的书有写到一个read sector的小软件,小心注意一下,说不定能找到。
I saw a book about CD burning mention a small software for reading sectors. Be careful to pay attention, maybe you can find it.
|
|
2004-3-8 00:00 |
|
|
chrysalis
初级用户
 
积分 152
发帖 10
注册 2004-3-6
状态 离线
|
『第 4 楼』:
使用 LLM 解释/回答一下
我看到一本光盘刻录的书有写到一个read sector的小软件,小心注意一下,说不定能找到。
I saw a book about CD burning mentioned a small software for reading sectors. Be careful and you might be able to find it.
|
|
2004-3-8 00:00 |
|
|
qzwqzw
银牌会员
     天的白色影子
积分 2343
发帖 636
注册 2004-3-6
状态 离线
|
『第 5 楼』:
使用 LLM 解释/回答一下
debug 最好用,也非常小,而且不愁找不到。
读磁盘引导区
-L 100 0 0 1
-N boot.dat
-W
-Q
写磁盘引导区
-N boot.dat
-L
-W 100 0 0 1
-Q
100 指保存或读取的内存地址
第一个0指a盘,c盘是2,以此类推
Debug is the best, very small, and not hard to find.
Read disk boot sector
-L 100 0 0 1
-N boot.dat
-W
-Q
Write disk boot sector
-N boot.dat
-L
-W 100 0 0 1
-Q
100 refers to the memory address for saving or reading
The first 0 refers to drive A, drive C is 2, and so on
|
|
2004-3-9 00:00 |
|
|
nre
银牌会员
     nre
积分 1210
发帖 361
注册 2002-12-28
状态 离线
|
『第 6 楼』:
使用 LLM 解释/回答一下
谢谢, 请问怎么用DEBUG将以上操作生成带参数的程序 比如文件名叫 bs.com
我想程序可以实现 bs 0 boot.dat 向A
bs 1 boot.dat 向B
Thanks, may I ask how to use DEBUG to generate a program with parameters as above, for example, the file name is bs.com. I want the program to be able to achieve bs 0 boot.dat to A and bs 1 boot.dat to B.
|

Teamwork ! |
|
2004-3-13 00:00 |
|
|
willsort
元老会员
         Batchinger
积分 4432
发帖 1512
注册 2002-10-18
状态 离线
|
『第 7 楼』:
使用 LLM 解释/回答一下
Re nre:
可以用批处理做界面,下面给出简单代码:
::BOOTMAN.BAT - By Will Sort, 2004/03/13
@echo off
if == goto help
set file=%3
if == set file=boot_%2.dat
for %%a in (S s SAVE save) do if == goto save
for %%a in (L l load save) do if == goto load
:help
echo.
echo BOOTMAN.BAT - 引导扇区保存/恢复工具
echo.
echo 使用用法: BOOTMAN 指定操作 指定磁盘
echo 操作: S s SAVE save 均为保存, L l LOAD load 均为恢复;
echo 磁盘: A为0,B为1,以此类推
echo 文件: 完整文件名,缺省时为boot_磁盘参数.dat
goto end
:savepre
echo L 100 %2 0 1>%temp%.\bootman.asd
echo N %file%>>%temp%.\bootman.asd
echo W>>%temp%.\bootman.asd
echo Q>>%temp%.\bootman.asd
goto operate
:loadpre
echo L 100 %2 0 1>%temp%.\bootman.asd
echo N %file%>>%temp%.\bootman.asd
echo W>>%temp%.\bootman.asd
echo Q>>%temp%.\bootman.asd
goto operate
<img src="images/smilies/face-surprise.png" align="absmiddle" border="0">perate
if not exist %temp%.\bootman.asd
debug nul
echo 操作完成!
del %temp%.\bootmam.asd
set file=
:end
这是命令行直接操作的界面程序,也可做成向导型界面,可以参考下面这个程序
当场书写,未经测试,请楼主谨慎使用!
http://model.chinajewelry.net/dos/dosbbs/dispbbs.asp?boardID=6&ID=9587
Re nre:
You can use batch processing to create an interface. The following is a simple code:
::BOOTMAN.BAT - By Will Sort, 2004/03/13
@echo off
if == goto help
set file=%3
if == set file=boot_%2.dat
for %%a in (S s SAVE save) do if == goto save
for %%a in (L l load save) do if == goto load
:help
echo.
echo BOOTMAN.BAT - Boot sector save/restore tool
echo.
echo Usage: BOOTMAN specifies operation specifies disk
echo Operation: S s SAVE save are all for saving, L l LOAD load are all for restoring;
echo Disk: A is 0, B is 1, and so on
echo File: Complete file name, if not specified, it is boot_disk parameter.dat
goto end
:savepre
echo L 100 %2 0 1>%temp%.\bootman.asd
echo N %file%>>%temp%.\bootman.asd
echo W>>%temp%.\bootman.asd
echo Q>>%temp%.\bootman.asd
goto operate
:loadpre
echo L 100 %2 0 1>%temp%.\bootman.asd
echo N %file%>>%temp%.\bootman.asd
echo W>>%temp%.\bootman.asd
echo Q>>%temp%.\bootman.asd
goto operate
:operate
if not exist %temp%.\bootman.asd
debug nul
echo Operation completed!
del %temp%.\bootmam.asd
set file=
:end
This is a command-line direct operation interface program. It can also be made into a wizard-type interface. You can refer to the following program
Written on the spot, not tested, please use it with caution, building!
http://model.chinajewelry.net/dos/dosbbs/dispbbs.asp?boardID=6&ID=9587
|

※ Batchinger 致 Bat Fans:请访问 批处理编程的异类 ,欢迎交流与共享批处理编程心得! |
|
2004-3-13 00:00 |
|
|
nre
银牌会员
     nre
积分 1210
发帖 361
注册 2002-12-28
状态 离线
|
|
2004-3-13 00:00 |
|
|
Climbing
铂金会员
       网络独行侠
积分 6962
发帖 2753
注册 2003-4-16 来自 河北保定
状态 离线
|
『第 9 楼』:
使用 LLM 解释/回答一下
Bart的MKBT可以读写引导扇区,连NT/2k/2003的引导扇区好象都支持的。
链接: http://www.nu2.nu/mkbt
读:mkbt -x -c c: c:\bootsect.bin
写: mkbt -x c:\bootsect.bin c:
Bart's MKBT can read and write boot sectors, and it seems to support the boot sectors of NT/2k/2003 as well.
Link: http://www.nu2.nu/mkbt
Read: mkbt -x -c c: c:\bootsect.bin
Write: mkbt -x c:\bootsect.bin c:
|

偶只喜欢回答那些标题和描述都很清晰的帖子!
如想解决问题,请认真学习“这个帖子”和“这个帖子”并努力遵守,如果可能,请告诉更多的人!
|
|
2004-3-14 00:00 |
|
|
moroko
高级用户
   
积分 919
发帖 198
注册 2004-1-17
状态 离线
|
『第 10 楼』:
使用 LLM 解释/回答一下
以下是引用qzwqzw在2004-3-9 21:43:16的发言:
debug 最好用,也非常小,而且不愁找不到。
读磁盘引导区
-L 100 0 0 1
-N boot.dat
-W
-Q
写磁盘引导区
-N boot.dat
-L
-W 100 0 0 1
-Q
100 指保存或读取的内存地址
第一个0指a盘,c盘是2,以此类推
可以把软盘的引导写到硬盘吗???
The following is the speech of qzwqzw on 2004-3-9 21:43:16:
Debug is the best, also very small, and not to worry about not finding.
Read disk boot sector
-L 100 0 0 1
-N boot.dat
-W
-Q
Write disk boot sector
-N boot.dat
-L
-W 100 0 0 1
-Q
100 refers to the memory address for saving or reading
The first 0 refers to drive A, drive C is 2, and so on
Can the boot of a floppy disk be written to a hard disk? ? ?
|
|
2004-3-15 00:00 |
|
|
qzwqzw
银牌会员
     天的白色影子
积分 2343
发帖 636
注册 2004-3-6
状态 离线
|
『第 11 楼』:
使用 LLM 解释/回答一下
当然可以,而且更简单
-L 100 0 0 1
-W 100 2 0 1
-Q
以上是写到c盘的,d盘把w那句的2改称3,其他盘以此类推。
Sure, and it's simpler.
-L 100 0 0 1
-W 100 2 0 1
-Q
The above is written to the C drive. For the D drive, change the 2 in the W line to 3, and so on for other drives.
|
|
2004-3-15 00:00 |
|
|
Kinglion
铂金会员
       痴迷DOS者
积分 5798
发帖 1924
注册 2003-6-20 来自 金獅電腦軟體工作室
状态 离线
|
『第 12 楼』:
使用 LLM 解释/回答一下
请楼主去 http://model.chinajewelry.net/dos/dosbbs/dispbbs.asp?boardID=6&ID=9076 看一看,那里有我编写的一个小程序,里面有读写软盘引导扇区的代码。希望能对楼主有些帮助。
Please go to http://model.chinajewelry.net/dos/dosbbs/dispbbs.asp?boardID=6&ID=9076 to take a look. There is a small program I wrote there, which has code for reading and writing the floppy disk boot sector. It may be helpful to the楼主.
|

熟能生巧,巧能生精,一艺不精,终生无成,精亦求精,始有所成,臻于完美,永无止境!
金狮電腦軟體工作室愿竭诚为您服务!
QQ群:8393170(定期清理不发言者)
个人网站:http://www.520269.cn
电子邮件:doujiehui@vip.qq.com
微信公众号: doujiehui
|
|
2004-3-20 00:00 |
|