en:docs:fapi:dosgetmachinemode

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:docs:fapi:dosgetmachinemode [2021/09/17 06:08] prokusheven:docs:fapi:dosgetmachinemode [2021/12/05 09:59] (current) prokushev
Line 5: Line 5:
 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 =====
  
 <code c> <code c>
Line 11: Line 11:
 </code> </code>
  
-====== Parameters ======+===== Parameters =====
  
  
-  * MachineMode (PBYTE) - output: Address of the value to indicate the current processor mode. This value may be:+  * MachineMode ([[PBYTE]]) - output: Address of the value to indicate the current processor mode. This value may be:
     *0 - DOS (real) mode     *0 - DOS (real) mode
     *1 - OS/2 (protected) mode.     *1 - OS/2 (protected) mode.
  
-====== Return Code ======+===== Return Code =====
  
- +rc ([[USHORT]]) - return
-  * rc (USHORT) - return+
  
 Return code description is: Return code description is:
Line 27: Line 26:
   *0 NO_ERROR   *0 NO_ERROR
  
-====== 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.
Line 33: Line 32:
 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:docs:fapi|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:docs:fapi|Family API]].
  
-====== Example Code ======+===== Example Code =====
  
-===== C Binding =====+==== C Binding ====
  
 <code c> <code c>
Line 45: Line 44:
 </code> </code>
  
-===== MASM Binding =====+==== MASM Binding ====
  
-<code c>+<code asm>
   EXTRN  DosGetMachineMode:FAR   EXTRN  DosGetMachineMode:FAR
   INCL_DOSMISC      EQU 1   INCL_DOSMISC      EQU 1
Line 57: Line 56:
 Returns WORD Returns WORD
  
-====== Note ======+===== Note =====
  
 Text based on [[http://www.edm2.com/index.php/DosGetMachineMode]] Text based on [[http://www.edm2.com/index.php/DosGetMachineMode]]