Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
ITek_asm.asm
Package: mac.zip [view]
Upload User: cnfair
Upload Date: 2007-01-07
Package Size: 32k
Code Size: 3k
Category:
Driver Develop
Development Platform:
Visual C++
- .LALL
- ; written by Sang-Eun Han
- ;
- ;
- TITLE ITEK
- .386P
- .XLIST
- include vmm.inc
- include ndis.inc
- include netvxd.inc
- include vwin32.inc
- include debug.inc
- .LIST
- EXTRN _OnSysDynamicDeviceInit@0:PROC
- EXTRN _OnSysDynamicDeviceExit@0:PROC
- DECLARE_VIRTUAL_DEVICE %MAC, 3, 10, <%MAC>_Control, Undefined_Device_Id,
- MAC_Init_Order
- ;data
- IFDEF CHICAGO
- VxD_LOCKED_DATA_SEG
- Public bInitAlready
- bInitAlready DB 0
- VxD_LOCKED_DATA_ENDS
- ENDIF
- ; code
- VxD_LOCKED_CODE_SEG
- ;----------------------------------------------------------------------------------
- Begin_Control_Dispatch %MAC
- Control_Dispatch Device_Init, OnSysDynamicDeviceInitWrap
- Control_Dispatch Sys_Dynamic_Device_Init, OnSysDynamicDeviceInitWrap
- Control_Dispatch Sys_Dynamic_Device_Exit, OnSysDynamicDeviceExitWrap
- Control_Dispatch W32_DeviceIoControl, OnW32DeviceIoControl, sCall, <ecx, ebx, edx, esi>
- End_Control_Dispatch %MAC
- VxD_LOCKED_CODE_ENDS
- ;----------------------------------------------------------------------------------
- ;
- ; OnSysDynamicDeviceInitWrap
- ;
- ;----------------------------------------------------------------------------------
- BeginProc OnSysDynamicDeviceInitWrap, init
- IFDEF CHICAGO
- mov al, bInitAlready
- cmp al, 0 ; Make sure we' haven't been called already.
- jnz Succeed_Init_Phase
- inc bInitAlready ; Set the "Called Already" Flag
- ENDIF
- ; Make sure the wrapper (Ndis.386) is loaded
- VxDcall NdisGetVersion
- jc Fail_Init_Phase
- call _OnSysDynamicDeviceInit@0
- cmp eax, NDIS_STATUS_SUCCESS
- jne Fail_Init_Phase
- ; Success
- Succeed_Init_Phase:
- clc
- ret
- Fail_Init_Phase:
- stc
- ret
- EndProc OnSysDynamicDeviceInitWrap
- ;----------------------------------------------------------------------------------
- ;
- ; OnSysDynamicDeviceExitWrap
- ;
- ;----------------------------------------------------------------------------------
- BeginProc OnSysDynamicDeviceExitWrap, locked
- call _OnSysDynamicDeviceExit@0
- clc
- ret
- EndProc OnSysDynamicDeviceExitWrap
- END
- ;----------------------------------------------------------------------------------
- ;
- ; R E A L M O D E I N I T C O D E
- ;
- ; MAC_Real_Init
- ; DESCRIPTION:
- ; ENTRY:
- ; EXIT:
- ; USES:
- ;
- ; Comments: Is there anybody who knows the funtionality of these codes?
- ;----------------------------------------------------------------------------------
- VxD_REAL_INIT_SEG
- BeginProc MAC_Real_Init
- ;
- ; If another us is loaded then don't load -- Just abort our load
- ;
- test bx, Duplicate_From_INT2F OR Duplicate_Device_ID
- jnz SHORT Ndis_RI_Abort_Load
- ; No other is loaded.
- xor bx, bx
- xor si, si
- mov ax, Device_Load_Ok
- ret
- Ndis_RI_Abort_Load:
- xor bx, bx
- xor si, si
- mov ax, Abort_Device_Load
- ret
- EndProc MAC_Real_Init
- VxD_REAL_INIT_ENDS
- END MAC_Real_Init