[NTVDM]
- Add support for DOS VDM reentry, i.e. the fact that a DOS app can start a 32-bit app, which in turn can start another DOS app, ad infinitum...
CORE-9711 CORE-9773 #resolve
- Add a small COMMAND.COM which is, for now, completely included in NTVDM. This COMMAND.COM is needed in order to support reentrancy. The fact that I chose to put it inside NTVDM is that any user can use instead his/her own COMMAND.COM, while retaining the possibility to perform VDM reentrancy (on Windows, if you remove the COMMAND.COM in windows\system32 and replace it with your own, you will break VDM reentrancy on windows' ntvdm).
CORE-5221 #resolve #comment I choose for the moment an internal COMMAND.COM, but you can recompile NTVDM to use it externally instead.
Global remarks:
- Quite a few DPRINTs were added for diagnostic purposes (since DOS reentrancy is a new feature), to be sure everything behaves as expected when being used with a large panel of applications. They will be removed when everything is OK.
- Support for current directories and 16/32-bit environment translation (in ntvdm + basevdm-side) remain to be implemented.
Other changes:
- Improve a bit the VDM shutdown code by gathering it at one place (there's still room for other improvements).
- Add suppport for properly pausing/resuming NTVDM.
- Bufferize some console events before dispatching.
Have fun ;^)
svn path=/trunk/; revision=69204
2015-09-12 20:09:25 +00:00
|
|
|
/*
|
|
|
|
* COPYRIGHT: See COPYING in the top level directory
|
|
|
|
* PROJECT: ReactOS Kernel
|
|
|
|
* FILE: asmxtras.inc
|
|
|
|
* PURPOSE: Extended ASM macros for GAS and MASM/ML64
|
|
|
|
* PROGRAMMERS: Hermes Belusca-Maito (hermes.belusca@sfr.fr)
|
|
|
|
*
|
|
|
|
* NOTE: This file is an extension to our well-known asm.inc that defines
|
|
|
|
* a set of macros allowing us to assemble specially-crafted ASM files
|
|
|
|
* with both GAS and MASM/ML.
|
|
|
|
*
|
|
|
|
* The additions introduced here are:
|
|
|
|
* - a 'long' define for MASM/ML that aliases to DWORD, and a 'dword'
|
|
|
|
* and 'DWORD' defines for GAS that alias to long.
|
|
|
|
* - an OFF(...) macro that is used for initializing global symbols with
|
|
|
|
* the offset value of another symbol.
|
|
|
|
* - a set of macros for defining and using structures.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __ASMXTRAS_INC__
|
|
|
|
#define __ASMXTRAS_INC__
|
|
|
|
|
|
|
|
/* 'long' / 'dword'|'DWORD' macros for MASM/ML and GAS */
|
|
|
|
#ifdef _USE_ML
|
|
|
|
#define long dword
|
|
|
|
#else
|
|
|
|
#define dword long
|
|
|
|
#define DWORD long
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* OFFset macro */
|
|
|
|
#ifdef _USE_ML
|
|
|
|
#define OFF(x) offset x
|
|
|
|
#else
|
|
|
|
#define OFF(x) x
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Set of macros for defining and using structures:
|
|
|
|
* - STRUCT(name, ...) defines a structure of name 'name'.
|
|
|
|
* - FIELD_DECL(field, type, value) adds a new structure member 'field'
|
|
|
|
* of type 'type', with the default value 'value'.
|
|
|
|
* - ENDS(name) terminates the definition of the structure 'name'.
|
|
|
|
* - A symbol 'name' of type 'struct' is declared with VAR_STRUCT(name, struct).
|
|
|
|
* - Referencing a member 'field' of a symbol 'name' is done with FIELD(name, field).
|
|
|
|
*/
|
|
|
|
#ifdef _USE_ML
|
|
|
|
|
|
|
|
#define STRUCT(name, ...) \
|
|
|
|
name STRUCT __VA_ARGS__
|
|
|
|
|
|
|
|
#define FIELD_DECL(field, type, value) \
|
|
|
|
field type value
|
|
|
|
|
|
|
|
#define ENDS(name) \
|
|
|
|
name ENDS
|
|
|
|
|
|
|
|
#define VAR_STRUCT(name, struct) \
|
|
|
|
name struct <>
|
|
|
|
|
|
|
|
#define FIELD(name, field) \
|
|
|
|
name##.##field
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
#define STRUCT(name, ...) \
|
|
|
|
MACRO(name, VarName)
|
|
|
|
|
|
|
|
#define FIELD_DECL(field, type, value) \
|
|
|
|
VarName\()_\()field: .type value
|
|
|
|
|
|
|
|
#define ENDS(...) ENDM
|
|
|
|
|
|
|
|
#define VAR_STRUCT(name, struct) \
|
2015-09-13 01:18:50 +00:00
|
|
|
name: struct name
|
[NTVDM]
- Add support for DOS VDM reentry, i.e. the fact that a DOS app can start a 32-bit app, which in turn can start another DOS app, ad infinitum...
CORE-9711 CORE-9773 #resolve
- Add a small COMMAND.COM which is, for now, completely included in NTVDM. This COMMAND.COM is needed in order to support reentrancy. The fact that I chose to put it inside NTVDM is that any user can use instead his/her own COMMAND.COM, while retaining the possibility to perform VDM reentrancy (on Windows, if you remove the COMMAND.COM in windows\system32 and replace it with your own, you will break VDM reentrancy on windows' ntvdm).
CORE-5221 #resolve #comment I choose for the moment an internal COMMAND.COM, but you can recompile NTVDM to use it externally instead.
Global remarks:
- Quite a few DPRINTs were added for diagnostic purposes (since DOS reentrancy is a new feature), to be sure everything behaves as expected when being used with a large panel of applications. They will be removed when everything is OK.
- Support for current directories and 16/32-bit environment translation (in ntvdm + basevdm-side) remain to be implemented.
Other changes:
- Improve a bit the VDM shutdown code by gathering it at one place (there's still room for other improvements).
- Add suppport for properly pausing/resuming NTVDM.
- Bufferize some console events before dispatching.
Have fun ;^)
svn path=/trunk/; revision=69204
2015-09-12 20:09:25 +00:00
|
|
|
|
|
|
|
#define FIELD(name, field) \
|
|
|
|
name##_##field
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* __ASMXTRAS_INC__ */
|