mirror of
https://github.com/reactos/reactos.git
synced 2024-09-19 17:21:14 +00:00
3cad6a80cf
Introduce DDK headers needed for Virtual Device Drivers development. nt_vdd.h and vddsvc.h will get populated with functions as soon as they will be implemented in NTVDM. isvbop.h/.inc is fully implemented. isvbop.inc defines 3rd-party VDD bops and "function"-calls for 16-bit apps (in assembler), and isvbop.h defines the same in C-language. They are both MSVC and GCC-compatible. svn path=/branches/ntvdm/; revision=61352
52 lines
1.6 KiB
C
52 lines
1.6 KiB
C
/*
|
|
* isvbop.h
|
|
*
|
|
* Windows NT Device Driver Kit
|
|
*
|
|
* This file is part of the ReactOS DDK package.
|
|
*
|
|
* Contributors:
|
|
* Hermes Belusca-Maito (hermes.belusca@sfr.fr)
|
|
*
|
|
* THIS SOFTWARE IS NOT COPYRIGHTED
|
|
*
|
|
* This source code is offered for use in the public domain. You may
|
|
* use, modify or distribute it freely.
|
|
*
|
|
* This code is distributed in the hope that it will be useful but
|
|
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
|
* DISCLAIMED. This includes but is not limited to warranties of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
*
|
|
*/
|
|
|
|
/*
|
|
* The corresponding ASM header of this file is isvbop.inc.
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
/* BOP Identifiers */
|
|
#define BOP_3RDPARTY 0x58 // 3rd-party VDD BOP
|
|
#define BOP_UNSIMULATE 0xFE // Stop execution
|
|
|
|
#if defined(__GNUC__)
|
|
|
|
#define RegisterModule() __asm__(".byte 0xC4, 0xC4, %c0, 0" : : "i"(BOP_3RDPARTY))
|
|
#define UnRegisterModule() __asm__(".byte 0xC4, 0xC4, %c0, 1" : : "i"(BOP_3RDPARTY))
|
|
#define DispatchCall() __asm__(".byte 0xC4, 0xC4, %c0, 2" : : "i"(BOP_3RDPARTY))
|
|
#define VDDUnSimulate16() __asm__(".byte 0xC4, 0xC4, %c0" : : "i"(BOP_UNSIMULATE))
|
|
|
|
#elif defined(_MSC_VER)
|
|
|
|
#define RegisterModule() _asm _emit 0xC4 _asm _emit 0xC4 _asm _emit BOP_3RDPARTY _asm _emit 0
|
|
#define UnRegisterModule() _asm _emit 0xC4 _asm _emit 0xC4 _asm _emit BOP_3RDPARTY _asm _emit 1
|
|
#define DispatchCall() _asm _emit 0xC4 _asm _emit 0xC4 _asm _emit BOP_3RDPARTY _asm _emit 2
|
|
#define VDDUnSimulate16() _asm _emit 0xC4 _asm _emit 0xC4 _asm _emit BOP_UNSIMULATE
|
|
|
|
#else
|
|
#error Unknown compiler for inline assembler
|
|
#endif
|
|
|
|
/* EOF */
|