;       SCCSID = @(#)stubmac.inc	6.1 90/11/17
;      SCCSID = @(#)stubmac.inc	6.2 90/01/24
; ****************************************************************************
; *                                                                          *
; *                       IBM/Microsoft Confidential                         *
; *                                                                          *
; *                 Copyright (c) IBM Corporation  1987, 1990                *
; *                 Copyright (c) Microsoft Corp.  1987, 1990                *
; *                           All Rights Reserved                            *
; *                                                                          *
; ****************************************************************************

;
; Macro file for MTDOS Family API Library Stub loader
;

BREAK   <NewSeg - Map a Pre-reloc offset to a segment>

NewSeg  MACRO   segname,segreg,scratchreg
        mov     AX,offset &segname
        add     AX,PARAsizeB - 1
        shr     AX,1
        shr     AX,1
        shr     AX,1
        shr     AX,1
        mov     &scratchreg,CS
        add     AX,&scratchreg
        mov     &segreg,AX
        ENDM
