Author: Dale Roberts, Direct I/O and Windows NT
Here are two helpful hints to get you going with GIVEIO. The first
section below mentions the INSTDRV utility that is provided with the
Microsoft DDK. If you do not have access to the DDK, you can use Paula
Tomlinson's program LOADDRV instead. She describes it in her May 1995
article in Windows/DOS Developer's Journal (now Windows Developer's
Journal). You can get the program from their FTP site at:
ftp://ftp.mfi.com/pub/windev/1995/may95.zip.
------------------------------------------------------------------
Device Driver Installation Made Easy
The Microsoft NT Device Driver Kit documentation implies in several
places that there are several steps involved in installing a device driver
and making it accessible to a Win32 application. It explains that you
should edit the registry manually and then reboot the system. But
device drivers are dynamically loadable and unloadable in NT, and the
DDK comes with a very handy utility called INSTDRV that
demonstrates this facility in a very practical manner.
INSTDRV is a console application that will register, load, and start a
kernel mode device driver. It does not require you to edit the registry
manually or reboot the computer. On the command line you simply
give the name of your device driver and the complete path to the .SYS
file (which does not need to be in the system's DRIVERS directory).
After this command is executed, you will find that the driver has been
registered with the system and appears in the Devices applet in the
control panel. If you give the word remove instead of the path, the
driver is removed from the system and taken out of the driver database.
Once the driver is loaded and started, you can use the control panel's
Devices applet to start and stop it, or you can use the net start and net
stop commands (these are much faster) from a console window. When
a kernel mode device is stopped, it is in also unloaded from memory.
The next time you start the device, a fresh copy of the driver is read
from the hard drive, if it has been modified. This makes it very
convenient to develop device drivers, since you can go through the
modify, stop, start cycle repeatedly without ever needing to reboot. If
you need your driver to load at boot time, you can go into the Devices
applet and change its startup mode to boot.
The other component that is needed to make the driver visible to user
mode applications, so they can use CreateFile() calls to access the
driver, is registering the name in the DOS Devices name space. This
can be done, as documented in the DDK, by editing the registry
manually and rebooting. Or, much more simply, the kernel mode
driver can call the IoCreateSymbolicLink() function to register the
name itself. The GIVEIO driver shown in Listing Four uses the later
technique. Once the name is registered, user mode applications can get
a file handle to the device driver by calling CreateFile() with the driver
name as the file parameter, but preceding the driver name with the
special cookie \\.\. The TESTIO application in Listing Five uses this
technique.
------------------------------------------------------------------
Quick Trick: Using DEBUG With Port I/O
Sometimes you just need to do a quick I/O operation to a port. In DOS,
you could use the DEBUG program to accomplish this. In NT, once
you have the GIVEIO device driver up and running, you can once
again use DEBUG for port I/O. If you look at the source code for the
test application, you'll see that all it does is open and close the GIVEIO
device driver. It uses the special cookie \\.\ before the driver name in
order to access it. Without modifying DEBUG, you can have it open
this device driver by simply typing debug \\.\giveio in an NT console
window. You will get an error message complaining that the file
\\.\giveio is not found, but it will give DEBUG I/O access anyway.
Subsequent DOS applications that are run from this console window
will also have I/O access.
WIN32 applications executed from this console window will still cause
exceptions. This is because DEBUG (and any other DOS application)
runs in the context of the VDM (Virtual DOS Machine) process of the
console box, whereas each WIN32 application gets its own process.
The VDM process stays active as long as the console window is open,
but each WIN32 application creates a brand new process with the
IOPM offset initialized to point beyond the end of the TSS.
没有合适的资源?快使用搜索试试~ 我知道了~
JTAG 下载源码(内含sum 6400 bin文件)
共121个文件
scc:20个
c:16个
obj:14个
需积分: 17 1 下载量 39 浏览量
2010-12-08
10:19:54
上传
评论 1
收藏 2.49MB RAR 举报
温馨提示
JTAG 下载源码(内含sum 6400 bin文件)
资源详情
资源评论
资源推荐
收起资源包目录
JTAG 下载源码(内含sum 6400 bin文件) (121个子文件)
u-boot.bin 192KB
u-boot.bin 192KB
6400_OtgMon.bin 118KB
6400_OtgMon.bin 118KB
6400_OtgMon.bin 116KB
6400_OtgMon_NOR.bin 62KB
6400_OtgMon_NOR.bin 62KB
6400_BL_NAND.bin 3KB
6400_BL_NAND.bin 3KB
6400_BL_NAND.bin 3KB
SJF6400.bsc 2.01MB
S3C6400_070430.bsdl 99KB
K9G8G08.c 29KB
K9F1G08.c 23KB
mem_rdwr.c 23KB
K9S1208.c 16KB
swecc.c 14KB
pin6400.c 12KB
strata32.c 11KB
jtag.c 9KB
SJF6400.c 6KB
AM29F800.c 6KB
GIVEIO.C 6KB
TOTALIO.C 4KB
POKEIO.C 2KB
TSTIO.C 2KB
ppt.c 1KB
POKEPROC.C 652B
space.css 27KB
5eb96fd8632387e939012fcf.css 12KB
mods.css 7KB
SJF6400_UserGuide_v0.0.doc 803KB
SJF6400.dsp 6KB
SJF6400.dsw 539B
CMD.EXE 290KB
SJF6400.exe 248KB
TSTIO.EXE 33KB
460-jtag-2.gif 29KB
3339Fig02.gif 9KB
pin6400.h 8KB
swecc.h 5KB
jtag.h 1KB
mem_rdwr.h 1KB
ppt.h 518B
Def.h 392B
bch_enc.h 166B
sjf6400.h 164B
strata32.h 111B
am29f800.h 110B
k9f1g08.h 98B
K9G8G08.h 98B
k9s1208.h 98B
关于JTAG原理和sjf2410源码分析(转)_silent-night.htm 27KB
vc60.idb 73KB
SJF6400.ilk 268KB
giveio.inf 2KB
giveio.INI 195B
popup.js 14KB
global.js 9KB
g_spjs.js 2KB
_OBJECTS.MAC 254B
MAKEFILE 267B
MAKEFILE 267B
K9G8g08.obj 44KB
mem_rdwr.obj 42KB
TSTIO.OBJ 33KB
k9s1208.obj 28KB
k9f1g08.obj 26KB
sjf6400.obj 19KB
pin6400.obj 15KB
am29f800.obj 15KB
strata32.obj 15KB
jtag.obj 13KB
ppt.obj 13KB
bch_enc.obj 8KB
swecc.obj 6KB
TOTALIO.OBJ 1KB
SJF6400.opt 57KB
SJF6400.pch 2.71MB
SJF6400.pdb 681KB
vc60.pdb 68KB
20080327030215_JTAG%e5%8e%9f%e7%90%86%e5%8f%8asjf2410%e6%ba%90%e7%a0%81%e5%88%86%e6%9e%90.pdf 372KB
20080327030215_JTAG原理及sjf2410源码分析.pdf 372KB
SJF6400.plg 1KB
pin6400.sbr 0B
k9f1g08.sbr 0B
k9s1208.sbr 0B
strata32.sbr 0B
mem_rdwr.sbr 0B
jtag.sbr 0B
am29f800.sbr 0B
ppt.sbr 0B
swecc.sbr 0B
K9G8g08.sbr 0B
sjf6400.sbr 0B
vssver.scc 576B
vssver.scc 240B
vssver.scc 224B
mssccprj.scc 177B
vssver.scc 160B
共 121 条
- 1
- 2
中国168
- 粉丝: 42
- 资源: 36
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0