制作DOS启动盘

1.       Create pure edition DOS

Tools: hpusbfw.exe

Note:The option is as below:

Result:Only 3 files are created: MSDOS.SYS, IO.SYS,COMMAND.COM.

2.      Even though you can start DOSSystem after finish the first step above, but more files are needed. Downloadfile “usb-hdd-1218.rar” from CSDN website, and decompress it, then you will geta lots of files, among which there are files “AUTOEXEC.BAT”, “CONFIG.SYS”, “HIMEM.SYS”,“SMARTDRV.EXE” that should be copied to USB BOOT DISK.

3.      OK, restart your system, andthere are five options to choose:

(1)  Boot   DOS   with   CDROM

(2)  Boot   DOS   with   CDROM   +   NTFS

(3)  Boot   DOS   ONLY   (No   Any   Drivers)

(4)  REBOOT   YOUR    PC
(5)   SHUTDOWN   YOUR   PC

ChooseOption 2 “Boot DOS with CDROM+NTFS” to enter DOS.

4.      Install complier DJGPP. DJGPPis a 32-bit complier, which can be used to access PCI Configuration AddressPort (0CF8h) and Configuration Data Port (0CFCh) that must be accessed inDWORD.

Download DJGPP from website: http://www.delorie.com/djgpp/

Select “Zip picker” in the web page, thenyou will be allowed to select which kind of DJGPP to download.

In the option” Which operatingsystem will you be using?”, you should select “MS-DOS,OpenDOS, PC-DOS”. Finally, click toolbar “Tell me which files I need” to downthe files.

5. Follow thisexample, substituting paths as appropriate (type the bold parts):

C:\> mkdir djgpp

C:\> cd djgpp

Use djgpp's unzip32.exe to unzip all the zips you downloaded into theC:\DJGPP folder. Don't unzip them each into separate folders - unzip them allto the same place. The directory structure inside each zip file should bepreserved, so you end up with files like c:\djgpp\bin\gcc.exe andc:\djgpp\include\stdio.h

C:\> mkdir djgpp

C:\> cd djgpp

C:\DJGPP> unzip32 d:\tmp\djdev203.zip

C:\DJGPP> unzip32 d:\tmp\faq230b.zip

C:\DJGPP> unzip32 d:\tmp\rhid15ab.zip

C:\DJGPP> unzip32 d:\tmp\bnu2211b.zip

C:\DJGPP> unzip32 d:\tmp\gcc471b.zip

C:\DJGPP> unzip32 d:\tmp\gdb75b.zip

C:\DJGPP> unzip32 d:\tmp\mak3791b.zip

C:\DJGPP> unzip32 d:\tmp\txi412b.zip

C:\DJGPP> unzip32 d:\tmp\csdpmi7b.zip

When properly installed, you should have a c:\djgpp\bin directory, and init should be at least gcc.exe, as.exe, and stubify.exe. If all the files are inc:\djgpp with no subdirectories, or you see directories likec:\djgpp\djdev203\, you need to delete everything and try a different unzipprogram.

You need to update your C:\CONFIG.SYS to include the following lines (editthe first to suit your installation, and if these lines already exist, it's OKif they have larger numbers than these examples):

shell=c:\dos\command.com c:\dos /e:2048 /p

files=40

fcbs=40,0

You need to update your C:\AUTOEXEC.BAT to include the following lines:

set PATH=C:\DJGPP\BIN;%PATH%

set DJGPP=C:\DJGPP\DJGPP.ENV

Note that the PATH statement should follow any other PATH statements, oryou may edit an existing PATH statement.

You'll need to reboot your computer for these changes to take effect.

6. The program ofEnumerating PCI Devices is in the file “Enumerate_PCI_Devices.c”

7. In the DOS commandline, type “RHIDE”to start DJGPP. Compile and run the program and you will getthe result as below:

There's Function 0 in Device 0 on Bus 0

There's Function 1 in Device 0 on Bus 0

There's Function 2 in Device 0 on Bus 0

There's Function 3 in Device 0 on Bus 0

There's Function 4 in Device 0 on Bus 0

There's Function 5 in Device 0 on Bus 0

There's Function 6 in Device 0 on Bus 0

There's Function 7 in Device 0 on Bus 0

There's Function 0 in Device 1 on Bus 0

There's Function 0 in Device 2 on Bus 0

There's Function 0 in Device 3 on Bus 0

There's Function 1 in Device 3 on Bus 0

There's Function 0 in Device 13 on Bus 0

There's Function 0 in Device 15 on Bus 0

There's Function 0 in Device 16 on Bus 0

There's Function 1 in Device 16 on Bus 0

There's Function 2 in Device 16 on Bus 0

There's Function 4 in Device 16 on Bus 0

There's Function 0 in Device 17 on Bus 0

There's Function 7 in Device 17 on Bus 0

There's Function 0 in Device 19 on Bus 0

There's Function 0 in Device 20 on Bus 0

There's Function 0 in Device 0 on Bus 1

There's Function 0 in Device 0 on Bus 2

8. Compare the resultabove with that of software “RW-Everything.exe” which runs in windowsXP, and itproves that the program is successfule to enumerate the PCI Devices.

 

The software “RW-Everything.exe” enumerates the PCIDevices as below:

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值