;       SCCSID = @(#)d_getmm.asm	6.1 91/02/15
;      SCCSID = @(#)d_getmm.asm	6.2 90/01/22
; ****************************************************************************
; *									     *
; *			  IBM/Microsoft Confidential			     *
; *									     *
; *		    Copyright (c) IBM Corporation  1987, 1990		     *
; *		    Copyright (c) Microsoft Corp.  1987, 1990		     *
; *			      All Rights Reserved			     *
; *									     *
; ****************************************************************************
;***  d_getmm.asm - API stub routine DosGetMachineMode
;
;	Member of API library
;	Bill Mershon
;	Copyright MicroSoft Corporation, 1986
;	15-Apr-1986
;
;	library routine for API simulator
;
;	Called from dos 2.x,3.x compatible dos 5.x applications
;
;	Special Information
;		none
;
;	Modification History
;

include dos2equ.inc

;***	DOSGETMACHINEMODE - stub to emulate DOSGETMACHINEMODE function call
;
;	simulates DOS 5.0 call from DOS 2.x,3.x environment
;
;	errorcode = unsigned far pascal
;	DosGetMachineMode ()
;
;	ENTRY:
;
;	RETURN:
;		AX - 0 (no error)
;
;	EXIT:
;
;	USES:
;		AX
;
;	Pseudo Code:
;		save registers
;		use BP as pointer to stack parameters
;		store 0 (real mode) at return address
;		restore registers
;		return
;
;	WARNING:
;		none
;
;	EFFECTS:
;		none
;

	title	DOSGETMACHINEMODE - stub to emulate DOSGETMACHINEMODE function
;
;	EXTRN	DOSGETMACHINEMODE:FAR
;
;	PUSH	@BYTE ptr_MachineMode
;	CALL	DOSGETMACHINEMODE
;


_TEXT	segment byte public 'CODE'

	assume	CS:_TEXT,DS:NOTHING

	public	DOSGETMACHINEMODE

ptr_MachineMode	equ	[BP+6]

DOSGETMACHINEMODE	proc	far
	push	bp
	mov	bp,sp
	push	ds

	lds	bp,[ptr_MachineMode]	; DS:BP <- pointer to ret addr
	xor	ax,ax			; no error AND machine mode (REAL)
	mov	ds:[bp],al		; store result

	pop	ds
	pop	bp
	ret	4	; clear stack of entry parameters (bytes)
DOSGETMACHINEMODE	endp

_TEXT	ends

	end
