Differences
This shows you the differences between two versions of the page.
Next revisionBoth sides next revision | |||
en:docs:fapi:dosgetmachinemode [2018/08/31 08:23] – created prokushev | en:docs:fapi:dosgetmachinemode [2018/09/01 14:56] – prokushev | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | {{logos: | ||
+ | |||
+ | ====== DosGetMachineMode ====== | ||
This call returns the current mode of the processor, whether the processor is running in the DOS mode or the OS/2 mode. This allows an application to determine whether a dynamic link call is valid or not. | This call returns the current mode of the processor, whether the processor is running in the DOS mode or the OS/2 mode. This allows an application to determine whether a dynamic link call is valid or not. | ||
==Syntax== | ==Syntax== | ||
- | | + | |
+ | | ||
==Parameters== | ==Parameters== | ||
- | ;MachineMode (PBYTE) - output: Address of the value to indicate the current processor mode. This value may be: | + | |
- | ::0 - DOS mode | + | * MachineMode (PBYTE) - output: Address of the value to indicate the current processor mode. This value may be: |
- | ::1 - OS/2 mode. | + | *0 - DOS (real) |
+ | *1 - OS/2 (protected) | ||
==Return Code== | ==Return Code== | ||
- | ;rc (USHORT) - return:Return code description is: | + | |
- | *0 NO_ERROR | + | * rc (USHORT) - return |
+ | |||
+ | Return code description is: | ||
+ | |||
+ | | ||
==Remarks== | ==Remarks== | ||
All dynamic link calls are available to an application if the MachineMode value indicates the program is in OS/2 mode. This method provides a self-tailoring application that allows the application to adapt to the execution environment by limiting or enhancing the functions it provides. | All dynamic link calls are available to an application if the MachineMode value indicates the program is in OS/2 mode. This method provides a self-tailoring application that allows the application to adapt to the execution environment by limiting or enhancing the functions it provides. | ||
- | If the MachineMode value indicates the program is in DOS mode, the application is limited to a subset of dynamic link calls listed in the [[Family API]]. | + | If the MachineMode value indicates the program is in DOS mode (or real), the application is limited to a subset of dynamic link calls listed in the [[en: |
==Example Code== | ==Example Code== | ||
+ | |||
===C Binding=== | ===C Binding=== | ||
- | <PRE> | ||
- | #define INCL_DOSQUEUES | ||
- | USHORT | + | #define INCL_DOSMISC |
- | PBYTE | + | |
- | USHORT | + | |
- | </ | + | PBYTE |
+ | USHORT | ||
===MASM Binding=== | ===MASM Binding=== | ||
- | <PRE> | ||
- | EXTRN DosGetMachineMode: | ||
- | INCL_DOSQUEUES | ||
- | PUSH@ BYTE MachineMode | + | EXTRN DosGetMachineMode: |
- | CALL | + | INCL_DOSMISC |
+ | |||
+ | | ||
+ | CALL | ||
Returns WORD | Returns WORD | ||
- | </ | ||
- | |||
- | |||
====== Note ====== | ====== Note ====== |